1 2018-07-26 Tom de Vries <tdevries@suse.de>
4 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
6 2018-07-26 Tom de Vries <tdevries@suse.de>
8 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
9 DW_AT_count can't be translated to a dynamic prop.
11 2018-07-25 Tom de Vries <tdevries@suse.de>
13 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
16 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
18 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
20 2018-07-25 Joel Brobecker <brobecker@adacore.com>
22 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
24 2018-07-24 Keith Seitz <keiths@redhat.comt
27 * dwarf2read.c (dw2_add_symbol_to_list): New function.
28 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
29 instead of add_symbol_to_list.
30 (read_file_scope): Call prepare_one_comp_unit before reading
33 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
35 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
37 2018-07-24 Tom Tromey <tom@tromey.com>
39 * utils.c (malloc, realloc, free): Don't declare.
40 * configure, config.in: Rebuild.
41 * configure.ac: Don't check for declarations of free, malloc, or
44 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
47 (aarch64_linux_nat_target::stopped_data_address): Remove unused
49 * arm-linux-nat.c (fetch_regs): Likewise.
50 (store_regs): Likewise.
51 (fetch_vfp_regs): Likewise.
52 (store_vfp_regs): Likewise.
53 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
54 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
55 (arm_linux_nat_target::insert_watchpoint): Likewise.
56 (arm_linux_nat_target::remove_watchpoint): Likewise.
57 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
59 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
61 * ppc-linux-nat.c (fetch_register): Likewise.
62 (fetch_all_gp_regs): Likewise.
63 (fetch_ppc_registers): Likewise.
64 (store_all_gp_regs): Likewise.
65 (store_ppc_registers): Likewise.
66 (hwdebug_insert_point): Likewise.
67 (can_use_watchpoint_cond_accel): Likewise.
68 * remote-sim.c (gdb_os_write_stdout): Likewise.
70 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
71 Tom Tromey <tom@tromey.com>
73 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
77 2018-07-22 Tom Tromey <tom@tromey.com>
79 * regformats/regdat.sh: Define xmltarget_${name} inside
80 #ifndef IN_PROCESS_AGENT.
82 2018-07-22 Tom Tromey <tom@tromey.com>
84 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
86 2018-07-22 Tom Tromey <tom@tromey.com>
88 * symfile.c (reread_symbols): Notify iter, not objfile.
90 2018-07-22 Tom Tromey <tom@tromey.com>
92 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
94 (ravenscar_thread_target::prepare_to_store): Likewise.
96 2018-07-22 Tom Tromey <tom@tromey.com>
98 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
99 unused variable. Call value_fetch_lazy when needed.
100 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
101 Remove unused variable. Call value_fetch_lazy when needed.
103 2018-07-22 Tom Tromey <tom@tromey.com>
105 * m32c-tdep.c (mark_dma): Return void.
106 (make_regs): Remove unused declarations.
108 2018-07-22 Tom Tromey <tom@tromey.com>
110 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
111 cmdscm_get_valid_command_smob_arg_unsafe for effect.
112 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
113 bkscm_get_valid_block_smob_arg_unsafe for effect.
115 2018-07-22 Tom Tromey <tom@tromey.com>
117 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
120 2018-07-22 Tom Tromey <tom@tromey.com>
122 * windows-nat.c (saved_context): Conditionally define.
123 * remote.c (remote_target::remote_btrace_maybe_reopen):
124 Conditionally declare "warned".
125 * inflow.c (sigquit_ours): Conditionally define.
126 (new_tty): Move "tty" declaration inside #if.
127 * guile/guile.c (guile_datadir): Conditionally define.
128 * charset.c (set_be_le_names): Move some declarations inside #if.
129 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
131 (parse_xml_btrace_conf): Likewise.
133 2018-07-22 Tom Tromey <tom@tromey.com>
135 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
137 2018-07-22 Tom Tromey <tom@tromey.com>
139 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
140 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
141 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
142 * buildsym-legacy.c (get_macro_table): Remove unused variable.
143 * stack.c (frame_apply_level_command): Remove unused variable.
144 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
145 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
146 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
148 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
149 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
150 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
152 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
153 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
155 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
156 Remove unused variable.
157 * cli/cli-script.c (recurse_read_control_structure): Remove unused
159 * common/tdesc.c (print_xml_feature::visit): Remove unused
161 * compile/compile-object-load.c (store_regs): Remove unused
163 * complaints.c (clear_complaints): Remove unused variable.
164 * corelow.c (core_target_open): Remove unused variable.
165 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
167 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
169 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
171 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
173 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
175 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
177 * ia64-tdep.c (examine_prologue): Remove unused variable.
178 * infcall.c (run_inferior_call): Remove unused variable.
179 * inferior.c (exit_inferior): Remove unused variable.
180 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
181 * linespec.c (decode_line_2): Remove unused variable.
182 * linux-nat.c (super_close): Remove.
183 * linux-tdep.c (linux_info_proc): Remove unused variable.
184 * mi/mi-main.c (mi_execute_command): Remove unused variable.
185 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
186 Remove unused variable.
187 * parse.c (find_minsym_type_and_address): Remove unused variable.
188 * printcmd.c (info_symbol_command, printf_floating): Remove unused
190 * python/py-breakpoint.c (bppy_set_commands): Remove unused
192 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
194 * record-btrace.c (record_btrace_target::store_registers): Remove
196 (cmd_show_record_btrace_cpu): Remove unused variable.
197 * riscv-tdep.c (riscv_register_reggroup_p)
198 (riscv_push_dummy_call, riscv_return_value): Remove unused
200 * rust-exp.y (literal): Remove unused variable.
201 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
203 <STRUCTOP_ANONYMOUS>: Likewise.
204 * s390-linux-tdep.c (s390_linux_init_abi_31)
205 (s390_linux_init_abi_64): Remove unused variable.
206 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
207 (file_select_thread, net_windows_open, _initialize_ser_windows):
208 Remove unused variables.
209 * symtab.c (find_pc_sect_line): Remove unused variable.
210 * target-memory.c (compute_garbled_blocks): Remove unused
212 (target_write_memory_blocks): Remove unused variable.
213 * target.c (target_stack::unpush): Remove unused variables.
214 * tracepoint.c (start_tracing, all_tracepoint_actions)
215 (merge_uploaded_trace_state_variables)
216 (print_one_static_tracepoint_marker): Remove unused variable.
217 * unittests/basic_string_view/element_access/char/1.cc (test01):
218 Remove unused variable.
219 * windows-nat.c (windows_continue, windows_add_all_dlls)
220 (do_initial_windows_stuff, windows_nat_target::create_inferior):
221 Remove unused variables.
223 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
225 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
226 attr_profile in HAVE_ELF.
227 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
230 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
232 * frame.c (frame_register_unwind): Change parameter name.
233 (frame_unwind_register): Likewise.
234 (frame_unwind_register_value): Likewise.
235 (frame_unwind_register_signed): Likewise.
236 (frame_unwind_register_unsigned): Likewise.
237 * frame.h (frame_register_unwind): Likewise.
238 (frame_unwind_register): Likewise.
239 (frame_unwind_register_value): Likewise.
240 (frame_unwind_register_signed): Likewise.
241 (frame_unwind_register_unsigned): Likewise.
242 (frame_unwind_arch): Likewise.
244 2018-07-20 Maciej W. Rozycki <macro@mips.com>
246 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
249 2018-07-20 Maciej W. Rozycki <macro@mips.com>
251 * mips-linux-nat.c (mips_linux_nat_target::read_description):
252 Call `get_ptrace_pid' rather than extracting the ptrace PID by
255 2018-07-20 Keith Seitz <keiths@redhat.com>
257 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
258 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
259 m_compunit_symtab, m_language>: Add "m_" prefix.
261 * buildsym.c: Update all uses.
263 2018-07-20 Tom Tromey <tom@tromey.com>
265 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
266 * buildsym.h (record_line_ftype): Remove typedef.
268 2018-07-20 Tom Tromey <tom@tromey.com>
270 * buildsym-legacy.h (augment_type_symtab): Don't declare.
271 (end_expandable_symtab): Likewise.
272 (end_symtab_get_static_block): Likewise.
273 (end_symtab_from_static_block): Likewise.
274 * buildsym-legacy.c (augment_type_symtab): Remove.
275 (end_expandable_symtab): Remove.
276 (end_symtab_get_static_block): Remove.
277 (end_symtab_from_static_block): Remove.
279 2018-07-20 Tom Tromey <tom@tromey.com>
281 * dwarf2read.c: Include buildsym.h.
282 (struct dwarf2_cu) <builder>: New method.
283 (fixup_go_packaging): Update.
284 (process_full_comp_unit, process_full_type_unit): Update. Don't
285 use scoped_free_pendings.
286 (using_directives): Add "cu" parameter, remove "language".
287 (read_import_statement, setup_type_unit_groups, )
288 (read_func_scope, read_lexical_block_scope)
289 (dwarf2_record_block_ranges, read_namespace): Update.
290 (lnp_state_machine::lnp_state_machine): Add cu parameter.
291 (lnp_state_machine::handle_end_sequence): Update.
292 (class lnp_state_machine) <m_cu>: New member.
293 <m_record_line_callback>: Remove.
294 <m_currently_recording_lines>: New member.
295 (lnp_state_machine::handle_set_file): Update.
296 (noop_record_line): Remove.
297 (dwarf_record_line_p): Add cu parameter.
298 (dwarf_record_line_1, dwarf_finish_line): Likewise.
299 (lnp_state_machine::record_line)
300 (lnp_state_machine::lnp_state_machine)
301 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
302 (dwarf_decode_lines): Update.
303 (dwarf2_start_subfile): Add cu parameter.
304 (dwarf2_start_symtab, new_symbol): Update.
305 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
306 Remove dwarf2_per_objfile parameter.
307 (dwarf_decode_macros): Update.
309 2018-07-20 Tom Tromey <tom@tromey.com>
311 * stabsread.c (define_symbol): Update.
312 * buildsym-legacy.h (get_buildsym_compunit): Declare.
313 * dwarf2read.c (new_symbol): Update.
314 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
315 * cp-namespace.c: Include buildsym.h.
316 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
317 * buildsym-legacy.c (get_buildsym_compunit): New function.
319 2018-07-20 Tom Tromey <tom@tromey.com>
321 * xcoffread.c: Include buildsym-legacy.h.
322 * windows-nat.c: Include buildsym-legacy.h.
323 * stabsread.c: Include buildsym-legacy.h.
324 * mdebugread.c: Include buildsym-legacy.h.
325 * buildsym-legacy.h: New file.
326 * buildsym-legacy.c: New file, from buildsym.c.
327 * go32-nat.c: Include buildsym-legacy.h.
328 * dwarf2read.c: Include buildsym-legacy.h.
329 * dbxread.c: Include buildsym-legacy.h.
330 * cp-namespace.c: Include buildsym-legacy.h.
331 * coffread.c: Include buildsym-legacy.h.
332 * buildsym.h: Move some contents to buildsym-legacy.h.
333 * buildsym.c: Include buildsym-legacy.h. Move many functions to
335 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
337 2018-07-20 Tom Tromey <tom@tromey.com>
339 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
340 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
341 (buildsym_compunit::buildsym_compunit)
342 (buildsym_compunit::~buildsym_compunit)
343 (buildsym_compunit::get_macro_table): Define.
345 2018-07-20 Tom Tromey <tom@tromey.com>
347 * buildsym.c (reset_symtab_globals): Remove.
348 (buildsym_compunit::end_symtab_from_static_block): Update.
349 (buildsym_compunit::augment_type_symtab): Update.
350 (end_symtab_from_static_block): Call free_buildsym_compunit.
351 (augment_type_symtab, end_symtab, end_expandable_symtab):
354 2018-07-20 Tom Tromey <tom@tromey.com>
356 * arch-utils.c: Do not include buildsym.h.
357 * mipsread.c: Do not include buildsym.h.
358 * machoread.c: Do not include buildsym.h.
359 * elfread.c: Do not include buildsym.h.
361 2018-07-20 Tom Tromey <tom@tromey.com>
363 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
365 (buildsym_compunit): Add new constructor.
366 (struct buildsym_compunit) <get_last_source_file, finish_block,
367 record_block_range, start_subfile, patch_subfile_names,
368 push_subfile, pop_subfile, record_line, get_compunit_symtab,
369 set_last_source_start_addr, get_last_source_start_addr,
370 get_local_using_directives, set_local_using_directives,
371 get_global_using_directives, outermost_context_p,
372 get_current_context_stack, get_context_stack_depth,
373 get_current_subfile, get_local_symbols, get_file_symbols,
374 get_global_symbols, record_debugformat, record_producer,
375 push_context, pop_context, end_symtab_get_static_block,
376 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
378 <record_pending_block, finish_block_internal, make_blockvector,
379 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
383 2018-05-22 Tom Tromey <tom@tromey.com>
385 * buildsym.c (record_pending_block): Move earlier. Remove objfile
387 (finish_block_internal): Update.
389 2018-07-20 Tom Tromey <tom@tromey.com>
391 * buildsym.c (record_pending_block): Move earlier. Remove objfile
393 (finish_block_internal): Update.
395 2018-07-20 Tom Tromey <tom@tromey.com>
397 * buildsym.h (EXTERN): Don't define or undef.
398 * buildsym.c (EXTERN): Don't define.
400 2018-07-20 Tom Tromey <tom@tromey.com>
402 * buildsym.c: Remove TODO comment.
404 2018-07-20 Tom Tromey <tom@tromey.com>
406 * coffread.c (coff_symtab_read): Update.
407 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
408 (xcoff_new_init): Update.
409 * mipsread.c (mipscoff_new_init): Update.
410 * mdebugread.c (mdebug_build_psymtabs): Update.
411 * elfread.c (elf_new_init): Update.
412 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
414 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
415 (coffstab_build_psymtabs, elfstab_build_psymtabs)
416 (stabsect_build_psymtabs): Update.
417 * buildsym.h (buildsym_init): Don't declare.
418 * buildsym.c: Update comment.
419 (prepare_for_building): Remove.
420 (start_symtab, restart_symtab): Update.
421 (reset_symtab_globals): Update comment.
422 (buildsym_init): Remove.
424 2018-07-20 Tom Tromey <tom@tromey.com>
426 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
427 * stabsread.c (patch_block_stabs, define_symbol, read_type)
428 (read_enum_type, common_block_start, common_block_end)
429 (cleanup_undefined_types_1, finish_global_stabs): Update.
430 * mdebugread.c (psymtab_to_symtab_1): Update.
431 * dwarf2read.c (fixup_go_packaging, read_func_scope)
432 (read_lexical_block_scope, new_symbol): Update.
433 * dbxread.c (process_one_symbol): Update.
434 * coffread.c (coff_symtab_read, process_coff_symbol)
435 (coff_read_enum_type): Update.
436 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
438 (get_local_symbols, get_file_symbols, get_global_symbols): New
440 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
442 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
443 (~scoped_free_pendings): Update.
444 (finish_block, prepare_for_building, reset_symtab_globals)
445 (end_symtab_get_static_block, end_symtab_with_blockvector)
446 (augment_type_symtab, push_context): Update.
447 (get_local_symbols, get_file_symbols, get_global_symbols): New
449 (buildsym_init): Update.
451 2018-07-20 Tom Tromey <tom@tromey.com>
453 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
454 (process_full_type_unit): Likewise.
455 (dwarf2_start_symtab): Set list_in_scope.
457 2018-07-20 Tom Tromey <tom@tromey.com>
459 * dwarf2read.c (process_psymtab_comp_unit_reader)
460 (build_type_psymtabs_reader): Do not set list_in_scope.
462 2018-07-20 Tom Tromey <tom@tromey.com>
464 * buildsym.c (free_pendings): Remove.
465 (add_symbol_to_list, scoped_free_pendings)
466 (finish_block_internal, buildsym_init): Update.
468 2018-07-20 Tom Tromey <tom@tromey.com>
470 * xcoffread.c (read_xcoff_symtab): Update.
471 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
473 * dbxread.c (process_one_symbol): Update.
474 * coffread.c (coff_symtab_read): Update.
475 * buildsym.h (finish_block): Update.
476 * buildsym.c (finish_block): Remove "listhead" argument.
477 (end_symtab_get_static_block): Update.
479 2018-07-20 Tom Tromey <tom@tromey.com>
481 * buildsym.h (class scoped_free_pendings): Remove constructor.
482 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
484 <m_pending_block_obstack, m_pending_blocks>: New members.
485 (pending_block_obstack, pending_blocks): Remove.
486 (scoped_free_pendings::scoped_free_pendings): Default.
487 (~scoped_free_pendings): Update.
488 (free_pending_blocks): Remove.
489 (finish_block_internal, record_pending_block, make_blockvector)
490 (end_symtab_get_static_block, augment_type_symtab, push_context)
491 (buildsym_init): Update.
493 2018-07-20 Tom Tromey <tom@tromey.com>
495 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
496 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
498 (pending_addrmap, pending_addrmap_obstack)
499 (pending_addrmap_interesting): Remove.
500 (scoped_free_pendings, record_block_range, make_blockvector)
501 (prepare_for_building, reset_symtab_globals, buildsym_init):
504 2018-07-20 Tom Tromey <tom@tromey.com>
506 * xcoffread.c (process_linenos): Update.
507 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
508 * mdebugread.c (psymtab_to_symtab_1): Update.
509 * dwarf2read.c (setup_type_unit_groups)
510 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
511 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
512 * dbxread.c (process_one_symbol): Update.
513 * coffread.c (coff_symtab_read, enter_linenos)
514 (process_coff_symbol): Update.
515 * buildsym.h (current_subfile): Don't declare.
516 (get_current_subfile): Declare.
517 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
519 (start_subfile, free_buildsym_compunit, push_subfile)
520 (prepare_for_building, start_symtab): Update.
521 (get_current_subfile): New function.
523 2018-07-20 Tom Tromey <tom@tromey.com>
525 * coffread.c (coff_symtab_read): Update.
526 * xcoffread.c (read_xcoff_symtab): Update.
527 * dwarf2read.c (new_symbol): Update.
528 (read_func_scope, read_lexical_block_scope): Update.
529 * dbxread.c (process_one_symbol): Update.
530 * buildsym.h (context_stack, context_stack_depth): Don't declare.
531 (outermost_context_p): Remove macro.
532 (outermost_context_p, get_current_context_stack)
533 (get_context_stack_depth): Declare.
534 (pop_context): Return struct context_stack.
535 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
537 (context_stack_size): Remove.
538 (INITIAL_CONTEXT_STACK_SIZE): Remove.
539 (prepare_for_building, end_symtab_get_static_block)
540 (augment_type_symtab, push_context): Update.
541 (pop_context): Return struct context_stack.
542 (outermost_context_p, get_current_context_stack)
543 (get_context_stack_depth): New functions.
544 (buildsym_init): Update.
546 2018-07-20 Tom Tromey <tom@tromey.com>
548 * rust-exp.y: Now a pure parser. Update all rules.
549 (%union): Move earlier.
550 (current_parser, work_obstack): Remove globals.
551 (rust_parser, ~rust_parser): Update.
552 (class rust_parser) <copy_name, concat3, crate_name, super_name,
553 lex_character, lex_number, lex_string, lex_identifier,
554 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
555 convert_name, convert_params_to_expression,
556 convert_ast_to_expression, ast_basic_type, ast_operation,
557 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
558 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
559 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
560 ast_array_type, ast_slice_type, ast_reference_type,
561 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
562 (rust_parse): Update.
563 (rustyyerror, rustyylex): Add parser parameter.
564 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
565 (rust_lex_stringish_test, rust_lex_test_sequence)
566 (rust_lex_test_trailing_dot, rust_lex_test_completion)
567 (rust_lex_test_push_back, rust_lex_tests): Update.
569 2018-07-19 Pedro Alves <palves@redhat.com>
571 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
572 gdb::unique_xmalloc_ptr.
573 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
574 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
575 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
577 * guile/scm-pretty-print.c (ppscm_print_children): Use
578 gdb::unique_xmalloc_ptr instead of cleanups.
579 (gdbscm_apply_val_pretty_printer): Remove cleanups.
580 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
581 gdb::unique_xmalloc_ptr.
582 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
583 Adjust to use gdb::unique_xmalloc_ptr.
584 * guile/scm-utils.c (extract_arg): Adjust.
585 * guile/scm-value.c (gdbscm_value_field): Adjust to use
586 gdb::unique_xmalloc_ptr instead of a cleanup.
588 2018-07-19 Tom Tromey <tom@tromey.com>
590 * utils.c (do_value_free_to_mark)
591 (make_cleanup_value_free_to_mark): Remove.
592 * utils.h (make_cleanup_value_free_to_mark): Remove.
594 2018-07-19 Pedro Alves <palves@redhat.com>
596 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
597 forwarding reference.
599 2018-07-18 Pedro Alves <palves@redhat.com>
601 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
602 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
605 2018-07-18 Pedro Alves <palves@redhat.com>
607 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
609 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
611 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
612 directly instead of a cleanup.
613 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
614 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
615 (vlscm_binop_gdbthrow): New, factored out from ...
616 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
617 (vlscm_rich_compare): Use gdbscm_wrap.
618 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
619 instead of a cleanup.
620 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
622 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
623 Use xfree directly instead of a cleanup.
624 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
625 Adjust to use gdbscm_wrap and scoped_value_mark.
626 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
627 (gdbscm_value_address, gdbscm_value_dereference)
628 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
630 (gdbscm_value_dynamic_type): Use scoped_value_mark.
631 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
633 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
634 gdbscm_wrap and scoped_value_mark.
635 (gdbscm_value_to_string): Use xfree directly instead of a
636 cleanup. Move 'buffer' unique_ptr to TRY scope.
637 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
638 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
640 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
641 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
643 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
646 2018-07-18 Tom de Vries <tdevries@suse.de>
648 * findvar.c (default_read_var_value): Also resolve dynamic type for
649 LOC_OPTIMIZED_OUT vars.
651 2018-07-18 Maciej W. Rozycki <macro@mips.com>
653 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
656 2018-07-17 Tom Tromey <tom@tromey.com>
658 * guile/scm-param.c (pascm_set_func, pascm_show_func)
659 (compute_enum_list, pascm_set_param_value_x)
660 (gdbscm_parameter_value): Update.
661 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
662 (gdbscm_scm_to_host_string): Update.
663 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
665 * guile/scm-cmd.c (cmdscm_add_completion): Update.
666 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
667 * guile/scm-string.c (gdbscm_scm_to_string): Return
669 (gdbscm_scm_to_host_string): Likewise.
671 2018-07-17 Tom Tromey <tom@tromey.com>
673 * guile/guile.c (gdbscm_eval_from_control_command): Update.
674 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
675 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
676 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
679 2018-07-17 Tom Tromey <tom@tromey.com>
681 * guile/scm-param.c (pascm_signal_setshow_error): Update.
682 * guile/guile-internal.h (gdbscm_exception_message_to_string):
684 * guile/scm-cmd.c (cmdscm_function): Update.
685 * guile/scm-pretty-print.c
686 (ppscm_print_exception_unless_memory_error): Update.
687 * guile/scm-exception.c (gdbscm_exception_message_to_string):
688 Return unique_xmalloc_ptr.
690 2018-07-17 Tom Tromey <tom@tromey.com>
692 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
695 2018-07-17 Jim Wilson <jimw@sifive.com>
697 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
698 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
699 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
700 unecessary braces after EF_RISCV_RVC test. Delete call to
701 set_gdbarch_decr_pc_after_break.
703 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
704 RISCV_LAST_FP_REGNUM + 1.
705 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
707 2018-07-17 Tom Tromey <tom@tromey.com>
709 * configure.ac: Remove --disable-gdbcli.
710 * configure: Rebuild.
711 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
712 (SUBDIR_CLI_CFLAGS): Remove.
713 (SFILES): Use SUBDIR_CLI_SRCS.
714 (COMMON_OBS): Use SUBDIR_CLI_OBS.
716 2018-07-17 Tom Tromey <tom@tromey.com>
719 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
721 2018-07-16 Jim Wilson <jimw@sifive.com>
723 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
725 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
727 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
729 (libunwind_frame_sniffer): Likewise.
730 (libunwind_frame_prev_register): Likewise.
731 (libunwind_sigtramp_frame_sniffer): Likewise.
732 * ia64-tdep.c (ia64_access_reg): Likewise.
733 (ia64_access_rse_reg): Likewise.
734 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
735 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
737 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
739 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
741 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
743 * remote-sim.c (gdbsim_target::close,
744 gdbsim_target::mourn_inferior): Remove unused variables.
746 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
748 * ia64-tdep.c (ktab_buf): New global.
749 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
750 (get_kernel_table): Adjust.
752 2018-07-16 Tom Tromey <tom@tromey.com>
754 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
755 * dwarf2read.c (using_directives, new_symbol): Use
757 * dbxread.c (process_one_symbol): Use outermost_context_p.
758 * coffread.c (coff_symtab_read): Use outermost_context_p.
760 2018-07-16 Tom Tromey <tom@tromey.com>
762 * dwarf2read.c (using_directives, read_func_scope)
763 (read_lexical_block_scope): Update.
764 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
765 * buildsym.h (local_using_directives, global_using_directives):
767 (get_local_using_directives, set_local_using_directives)
768 (get_global_using_directives): Declare.
769 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
770 m_global_using_directives>: New members.
771 (finish_block_internal, prepare_for_building)
772 (reset_symtab_globals, end_symtab_get_static_block)
773 (push_context): Update.
774 (get_local_using_directives, set_local_using_directives)
775 (get_global_using_directives): New functions.
776 (buildsym_init): Update.
778 2018-07-16 Tom Tromey <tom@tromey.com>
780 * xcoffread.c (xcoff_initial_scan): Don't call
782 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
783 * buildsym.h (class scoped_free_pendings): Add constructor.
784 (free_pending_blocks): Don't declare.
785 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
786 (free_pending_blocks): Now static.
788 2018-07-16 Tom Tromey <tom@tromey.com>
790 * buildsym.h (push_subfile, pop_subfile): Update declarations.
791 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
793 (struct subfile_stack): Remove.
794 (subfile_stack): Remove.
795 (push_subfile, pop_subfile, buildsym_init): Update.
797 2018-07-16 Tom Tromey <tom@tromey.com>
799 * buildsym.c (push_subfile): Use gdb_assert.
800 (pop_subfile): Use gdb_assert.
802 2018-07-16 Tom Tromey <tom@tromey.com>
804 * buildsym.h (merge_symbol_lists): Remove.
805 * buildsym.c (merge_symbol_lists): Remove.
807 2018-07-16 Tom Tromey <tom@tromey.com>
809 * stabsread.c (scan_file_globals): Update comment.
810 * stabsread.h (scan_file_globals): Move from buildsym.h.
811 * buildsym.h (scan_file_globals): Move to stabsread.h.
813 2018-07-16 Tom Tromey <tom@tromey.com>
815 * xcoffread.c (xcoff_new_init): Update.
816 * mipsread.c (mipscoff_new_init): Update.
817 * mdebugread.c (mdebug_build_psymtabs): Update.
818 * elfread.c (elf_new_init): Update.
819 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
820 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
821 * buildsym.h (buildsym_new_init): Don't declare.
822 * buildsym.c (buildsym_new_init): Remove.
824 2018-07-16 Tom Tromey <tom@tromey.com>
826 * stabsread.h (within_function): Move from buildsym.h.
827 * stabsread.c (start_stabs): Clear within_function.
828 * coffread.c (coff_start_symtab): Clear within_function.
829 * buildsym.h (within_function): Move to stabsread.h.
830 * buildsym.c (prepare_for_building): Update.
832 2018-07-16 Tom Tromey <tom@tromey.com>
834 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
835 * dwarf2read.c (dwarf2_start_symtab): Don't set
836 processing_gcc_compilation.
837 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
839 2018-07-16 Tom Tromey <tom@tromey.com>
841 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
842 (next_symbol_text_func): Move from buildsym.h.
843 * stabsread.c (hashname): Move from buildsym.c.
844 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
845 (next_symbol_text_func, hashname): Move to stabsread.h.
846 * buildsym.c: Don't include bcache.h
847 (hashname): Move to stasbread.c.
849 2018-07-16 Tom Tromey <tom@tromey.com>
851 * buildsym.h (context_stack_size): Don't declare.
852 * buildsym.c (context_stack_size): New global.
854 2018-07-16 Tom Tromey <tom@tromey.com>
856 * dbxread.c (processing_acc_compilation): New global.
857 * buildsym.h (processing_acc_compilation): Don't declare.
859 2018-07-16 Tom Tromey <tom@tromey.com>
861 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
862 * dbxread.c (read_ofile_symtab): Update.
863 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
864 * buildsym.h (last_source_start_addr): Remove.
865 (set_last_source_start_addr, get_last_source_start_addr):
867 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
869 (struct buildsym_compunit) <m_last_source_start_addr>: New
871 (prepare_for_building): Remove start_addr parameter.
872 (start_symtab, restart_symtab, end_symtab_get_static_block)
873 (end_symtab_with_blockvector): Update.
874 (set_last_source_start_addr, get_last_source_start_addr): New
877 2018-07-16 Tom Tromey <tom@tromey.com>
879 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
881 (have_line_numbers): Remove.
882 (record_line, prepare_for_building, end_symtab_get_static_block)
883 (augment_type_symtab): Update.
885 2018-07-16 Tom Tromey <tom@tromey.com>
887 * buildsym.c (~buildsym_compunit): Free the macro table.
888 (struct buildsym_compunit) <get_macro_table, release_macros>: New
890 <m_pending_macros>: New member.
891 (pending_macros): Remove.
892 (~scoped_free_pendings, get_macro_table, prepare_for_building)
893 (reset_symtab_globals, end_symtab_get_static_block)
894 (end_symtab_with_blockvector, augment_type_symtab)
895 (buildsym_init): Update.
897 2018-07-16 Tom Tromey <tom@tromey.com>
899 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
901 (buildsym_compunit::set_last_source_file): New method.
902 <m_last_source_file>: New member.
903 (prepare_for_building): Remove "name" parameter.
904 (start_symtab, restart_symtab, reset_symtab_globals): Update.
905 (last_source_file): Remove.
906 (set_last_source_file, get_last_source_file): Update.
908 2018-07-16 Tom Tromey <tom@tromey.com>
910 * buildsym.c (prepare_for_building): Add assert.
912 2018-07-16 Tom Tromey <tom@tromey.com>
914 * buildsym.c (~buildsym_compunit): Update.
915 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
916 (start_subfile, patch_subfile_names)
917 (end_symtab_with_blockvector): Update.
919 2018-07-16 Tom Tromey <tom@tromey.com>
921 * buildsym.c (struct buildsym_compunit): Add constructor,
922 destructor, initializers.
923 (start_buildsym_compunit): Remove.
924 (free_buildsym_compunit): Use "delete".
925 (start_symtab, restart_symtab): Use "new".
927 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
929 * symfile.c (set_objfile_default_section_offset): Remove struct
932 2018-07-14 Stafford Horne <shorne@gmail.com>
934 * (Responsible Maintainers): Add myself as or1k maintainer.
936 2018-07-13 Tom Tromey <tom@tromey.com>
938 * symfile.c (set_objfile_default_section_offset): Use extra braces
941 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
943 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
946 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
948 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
949 unittests/cli-utils-selftests.c
950 * unittests/cli-utils-selftests.c: New file.
952 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
954 * NEWS: Mention new commands. Mention change to 'thread apply'.
956 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
958 * thread.c (thr_try_catch_cmd): New function.
959 (thread_apply_all_command): Handle qcs flags.
960 (thread_apply_command): Handle qcs flags.
961 (taas_command): New function.
962 (tfaas_command): New function.
963 (_initialize_thread): Update to setup the new commands 'taas
964 and 'tfaas'. Change doc string for 'thread apply'.
966 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
968 * stack.c: (trailing_outermost_frame): New function, mostly
969 extracted from backtrace_command_1.
970 (leading_innermost_frame): New function.
971 (backtrace_command_1): Update to call trailing_outermost_frame.
972 (frame_apply_command_count): New function.
973 (frame_apply_level_command): New function.
974 (frame_apply_all_command): New function.
975 (frame_apply_command): New function.
976 (faas_command): New function.
977 (frame_cmd_list): New variable.
978 (_initialize_stack): Update to setup the new commands 'frame apply'
981 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
983 * cli-utils.c (number_or_range_parser::get_number): Only handle
984 numbers or convenience var as numbers.
985 (parse_flags): New function.
986 (parse_flags_qcs): New function.
987 (number_or_range_parser::finished): Ensure parsing end is detected
988 before end of string.
989 * cli-utils.h (parse_flags): New function.
990 (parse_flags_qcs): New function.
991 (number_or_range_parser): Remove m_finished bool.
992 (number_or_range_parser::skip_range): Set m_in_range to false.
994 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
996 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
999 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1000 Jan Kratochvil <jan.kratochvil@redhat.com>
1001 Paul Fertser <fercerpav@gmail.com>
1002 Tsutomu Seki <sekiriki@gmail.com>
1003 Pedro Alves <palves@redhat.com>
1005 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1006 'unittests/parse-connection-spec-selftests.c'.
1007 (COMMON_SFILES): Add 'common/netstuff.c'.
1008 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1009 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1010 * common/netstuff.c: New file.
1011 * common/netstuff.h: New file.
1012 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1013 (wait_for_connect): Update comment. New parameter
1014 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1015 Use 'sock' directly instead of 'scb->fd'.
1016 (try_connect): New function, with code from 'net_open'.
1017 (net_open): Rewrite main loop to deal with multiple
1018 sockets/addresses. Handle IPv6-style hostnames; implement
1019 support for IPv6 connections.
1020 * unittests/parse-connection-spec-selftests.c: New file.
1022 2018-07-11 Pedro Alves <palves@redhat.com>
1025 * remote.c (remote_target::remote_detach_pid): Call
1026 set_current_process.
1028 2018-07-11 Pedro Alves <palves@redhat.com>
1030 * h8300-tdep.c (h8300_gdbarch_init): Remove
1031 set_gdbarch_ecoff_reg_to_regnum calls.
1033 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1036 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1037 offsets/sizes for static members of a class/struct.
1039 2018-07-11 Alan Hayward <alan.hayward@arm.com>
1041 * target-descriptions.c (tdesc_register_bitsize): Rename.
1042 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1043 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1044 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1046 2018-07-10 Tom Tromey <tom@tromey.com>
1048 * breakpoint.c (moribund_locations): Now static and a
1050 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1051 (build_bpstat_chain, update_global_location_list)
1052 (breakpoint_retire_moribund): Update.
1053 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1056 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1058 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1059 (riscv_register_reggroup_p): Use new function, remove unneeded
1061 (riscv_push_dummy_call): Extend assert to compare against xlen or
1062 flen based on register type.
1064 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1066 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1068 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1070 * remote.c (show_hardware_watchpoint_limit): New function.
1071 (show_hardware_watchpoint_length_limit): New function.
1072 (show_hardware_breakpoint_limit): New function.
1073 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1074 where appropriate, update help text.
1076 2018-07-09 Tom Tromey <tom@tromey.com>
1078 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1079 (CLIBS): Don't mention NAT_CLIBS.
1081 2018-07-09 Tom Tromey <tom@tromey.com>
1083 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1084 (LIBGDB_OBS, clean mostlyclean): Update.
1085 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1087 2018-07-09 Tom Tromey <tom@tromey.com>
1089 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1090 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1091 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1093 2018-07-09 Tom Tromey <tom@tromey.com>
1095 * Makefile.in (ALLDEPFILES): Remove exec.c.
1096 (COMMON_OBS): Remove exec.o.
1097 (COMMON_SFILES): Add exec.c.
1099 2018-07-09 Tom Tromey <tom@tromey.com>
1101 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1103 2018-07-09 Tom Tromey <tom@tromey.com>
1105 * Makefile.in (clean mostlyclean): Remove stamp-version.
1106 (version.c): Depend on stamp-version.
1107 (stamp-version): New rule, from version.c rule.
1109 2018-07-09 Tom Tromey <tom@tromey.com>
1111 * Makefile.in (init.c): Depend on stamp-init.
1112 (stamp-init): New rule, from init.c rule.
1113 (clean mostlyclean): Remove stamp-init.
1115 2018-07-09 Tom Tromey <tom@tromey.com>
1117 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1118 SUBDIR_GCC_COMPILE_SRCS.
1120 2018-07-09 Tom Tromey <tom@tromey.com>
1122 * Makefile.in (init.c): Remove some unused sed rules.
1124 2018-07-09 Tom Tromey <tom@tromey.com>
1126 * Makefile.in (TSOBS): Remove.
1127 (INIT_FILES): Update.
1128 (LIBGDB_OBS): Update.
1129 (COMMON_SFILES): Add inflow.c.
1130 (SFILES): Remove inflow.c.
1132 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1134 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1136 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1138 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1139 get_saveloc_name, is_signal_frame_name, step_name,
1140 init_remote_name, create_addr_space_name,
1141 destroy_addr_space_name, search_unwind_table_name,
1142 find_dyn_list_name): Constify.
1144 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1146 * darwin-nat.c (darwin_pthread_kill): New function.
1147 (darwin_resume_thread): Use darwin_pthread_kill.
1149 2018-07-05 Tom de Vries <tdevries@suse.de>
1151 * macroexp.c (macro_buffer) <operator=>: New member function.
1153 2018-07-04 Tom Tromey <tom@tromey.com>
1155 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1157 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
1159 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1160 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1161 * maint.c: Likewise.
1164 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1166 * NEWS: Create a new section for the next release branch.
1167 Rename the section of the current branch, now that it has
1170 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1172 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1173 * version.in: Bump version to 8.2.50.DATE-git.
1175 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1176 Pedro Alves <palves@redhat.com>
1178 * linux-nat.c (linux_init_ptrace): Rename to ...
1179 (linux_init_ptrace_procfs): ... this. Call
1180 linux_proc_init_warnings.
1181 (linux_nat_target::post_attach)
1182 (linux_nat_target::post_startup_inferior): Adjust.
1183 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1184 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1186 2018-07-04 Tom de Vries <tdevries@suse.de>
1188 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1190 (read_comp_unit_head): ... here.
1192 2018-07-03 Tom Tromey <tom@tromey.com>
1194 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1195 (stop_tracing, tstatus_command)
1196 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1197 (print_one_static_tracepoint_marker): Update.
1198 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1200 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
1202 (all_tracepoints, static_tracepoints_here): Return std::vector.
1204 2018-07-03 Tom Tromey <tom@tromey.com>
1206 * common/ptid.c (ptid_equal): Remove.
1207 * common/ptid.h (ptid_equal): Don't declare.
1208 * ada-tasks.c: Update.
1209 * breakpoint.c: Update.
1210 * common/agent.c: Update.
1211 * corelow.c: Update.
1212 * darwin-nat-info.c: Update.
1213 * darwin-nat.c: Update.
1215 * dtrace-probe.c: Update.
1216 * dummy-frame.c: Update.
1217 * fbsd-nat.c: Update.
1219 * gdbthread.h: Update.
1220 * gnu-nat.c: Update.
1221 * go32-nat.c: Update.
1222 * inf-loop.c: Update.
1223 * inf-ptrace.c: Update.
1224 * infcall.c: Update.
1228 * linux-fork.c: Update.
1229 * linux-nat.c: Update.
1230 * linux-thread-db.c: Update.
1231 * mi/mi-cmd-var.c: Update.
1232 * mi/mi-interp.c: Update.
1233 * mi/mi-main.c: Update.
1234 * nto-procfs.c: Update.
1235 * ppc-linux-tdep.c: Update.
1237 * python/py-inferior.c: Update.
1238 * python/py-record-btrace.c: Update.
1239 * python/py-record.c: Update.
1240 * ravenscar-thread.c: Update.
1241 * regcache.c: Update.
1242 * remote-sim.c: Update.
1244 * sol-thread.c: Update.
1247 * tui/tui-stack.c: Update.
1249 * windows-nat.c: Update.
1250 * windows-tdep.c: Update.
1252 2018-07-03 Tom Tromey <tom@tromey.com>
1254 * common/ptid.c (ptid_match): Remove.
1255 * common/ptid.h (ptid_match): Don't declare.
1256 * fbsd-nat.c: Update.
1259 * linux-nat.c: Update.
1260 * record-btrace.c: Update.
1261 * regcache.c: Update.
1264 2018-07-03 Tom Tromey <tom@tromey.com>
1266 * common/ptid.c (ptid_tid_p): Remove.
1267 * common/ptid.h (ptid_tid_p): Don't declare.
1268 * sol-thread.c: Update.
1270 2018-07-03 Tom Tromey <tom@tromey.com>
1272 * common/ptid.c (ptid_lwp_p): Remove.
1273 * common/ptid.h (ptid_lwp_p): Don't declare.
1274 * fbsd-nat.c: Update.
1275 * linux-nat.c: Update.
1276 * nat/linux-procfs.c: Update.
1277 * nat/x86-linux-dregs.c: Update.
1278 * sol-thread.c: Update.
1280 2018-07-03 Tom Tromey <tom@tromey.com>
1282 * common/ptid.c (ptid_is_pid): Remove.
1283 * common/ptid.h (ptid_is_pid): Don't declare.
1285 * linux-nat.c: Update.
1286 * mi/mi-interp.c: Update.
1290 2018-07-03 Tom Tromey <tom@tromey.com>
1292 * common/ptid.c (ptid_get_tid): Remove.
1293 * common/ptid.h (ptid_get_tid): Don't declare.
1294 * ada-tasks.c: Update.
1295 * aix-thread.c: Update.
1296 * bsd-uthread.c: Update.
1297 * darwin-nat.c: Update.
1298 * fbsd-nat.c: Update.
1299 * i386-darwin-nat.c: Update.
1301 * linux-tdep.c: Update.
1302 * nto-procfs.c: Update.
1303 * ppc-ravenscar-thread.c: Update.
1304 * python/py-infthread.c: Update.
1305 * ravenscar-thread.c: Update.
1306 * sol-thread.c: Update.
1307 * sparc-ravenscar-thread.c: Update.
1308 * windows-nat.c: Update.
1310 2018-07-03 Tom Tromey <tom@tromey.com>
1312 * common/ptid.c (ptid_get_lwp): Remove.
1313 * common/ptid.h (ptid_get_lwp): Don't declare.
1314 * aarch64-linux-nat.c: Update.
1315 * ada-tasks.c: Update.
1316 * aix-thread.c: Update.
1317 * amd64-linux-nat.c: Update.
1318 * arm-linux-nat.c: Update.
1319 * corelow.c: Update.
1320 * fbsd-nat.c: Update.
1321 * fbsd-tdep.c: Update.
1322 * gnu-nat.c: Update.
1323 * i386-cygwin-tdep.c: Update.
1324 * i386-gnu-nat.c: Update.
1325 * i386-linux-nat.c: Update.
1326 * ia64-linux-nat.c: Update.
1327 * inf-ptrace.c: Update.
1329 * linux-fork.c: Update.
1330 * linux-nat.c: Update.
1331 * linux-tdep.c: Update.
1332 * linux-thread-db.c: Update.
1333 * mips-linux-nat.c: Update.
1334 * nat/aarch64-linux-hw-point.c: Update.
1335 * nat/aarch64-linux.c: Update.
1336 * nat/linux-btrace.c: Update.
1337 * nat/linux-osdata.c: Update.
1338 * nat/linux-procfs.c: Update.
1339 * nat/x86-linux-dregs.c: Update.
1340 * obsd-nat.c: Update.
1341 * ppc-fbsd-nat.c: Update.
1342 * ppc-linux-nat.c: Update.
1344 * python/py-infthread.c: Update.
1345 * ravenscar-thread.c: Update.
1347 * s390-linux-nat.c: Update.
1348 * sol-thread.c: Update.
1349 * sol2-tdep.c: Update.
1350 * spu-linux-nat.c: Update.
1351 * x86-linux-nat.c: Update.
1352 * xtensa-linux-nat.c: Update.
1354 2018-07-03 Tom Tromey <tom@tromey.com>
1356 * common/ptid.c (ptid_get_pid): Remove.
1357 * common/ptid.h (ptid_get_pid): Don't declare.
1358 * aarch64-linux-nat.c: Update.
1359 * ada-lang.c: Update.
1360 * aix-thread.c: Update.
1361 * alpha-bsd-nat.c: Update.
1362 * amd64-fbsd-nat.c: Update.
1363 * amd64-linux-nat.c: Update.
1364 * arm-linux-nat.c: Update.
1365 * arm-nbsd-nat.c: Update.
1367 * break-catch-syscall.c: Update.
1368 * breakpoint.c: Update.
1369 * bsd-uthread.c: Update.
1370 * corelow.c: Update.
1372 * darwin-nat.c: Update.
1373 * fbsd-nat.c: Update.
1374 * fbsd-tdep.c: Update.
1376 * gnu-nat.c: Update.
1377 * hppa-nbsd-nat.c: Update.
1378 * hppa-obsd-nat.c: Update.
1379 * i386-fbsd-nat.c: Update.
1380 * ia64-linux-nat.c: Update.
1381 * inf-ptrace.c: Update.
1383 * inferior.c: Update.
1384 * inferior.h: Update.
1387 * linux-fork.c: Update.
1388 * linux-nat.c: Update.
1389 * linux-tdep.c: Update.
1390 * linux-thread-db.c: Update.
1391 * m68k-bsd-nat.c: Update.
1392 * mi/mi-interp.c: Update.
1393 * mi/mi-main.c: Update.
1394 * mips-linux-nat.c: Update.
1395 * mips-nbsd-nat.c: Update.
1396 * mips64-obsd-nat.c: Update.
1397 * nat/aarch64-linux-hw-point.c: Update.
1398 * nat/aarch64-linux.c: Update.
1399 * nat/linux-btrace.c: Update.
1400 * nat/linux-osdata.c: Update.
1401 * nat/linux-procfs.c: Update.
1402 * nat/x86-linux-dregs.c: Update.
1403 * nto-procfs.c: Update.
1404 * obsd-nat.c: Update.
1405 * ppc-linux-nat.c: Update.
1406 * ppc-nbsd-nat.c: Update.
1407 * ppc-obsd-nat.c: Update.
1408 * proc-service.c: Update.
1410 * python/py-inferior.c: Update.
1411 * python/py-infthread.c: Update.
1412 * ravenscar-thread.c: Update.
1414 * remote-sim.c: Update.
1416 * rs6000-nat.c: Update.
1417 * s390-linux-nat.c: Update.
1418 * sh-nbsd-nat.c: Update.
1419 * sol-thread.c: Update.
1420 * sparc-nat.c: Update.
1421 * sparc64-tdep.c: Update.
1422 * spu-linux-nat.c: Update.
1423 * spu-tdep.c: Update.
1424 * target-debug.h: Update.
1427 * tid-parse.c: Update.
1428 * tracefile-tfile.c: Update.
1429 * vax-bsd-nat.c: Update.
1430 * windows-nat.c: Update.
1431 * x86-linux-nat.c: Update.
1432 * x86-nat.c: Update.
1434 2018-07-03 Tom Tromey <tom@tromey.com>
1436 * common/ptid.c (pid_to_ptid): Remove.
1437 * common/ptid.h (pid_to_ptid): Don't declare.
1438 * aix-thread.c: Update.
1439 * arm-linux-nat.c: Update.
1440 * common/ptid.c: Update.
1441 * common/ptid.h: Update.
1442 * corelow.c: Update.
1444 * darwin-nat.c: Update.
1445 * fbsd-nat.c: Update.
1446 * fork-child.c: Update.
1447 * gnu-nat.c: Update.
1448 * go32-nat.c: Update.
1449 * inf-ptrace.c: Update.
1451 * inferior.c: Update.
1453 * linux-fork.c: Update.
1454 * linux-nat.c: Update.
1455 * nat/aarch64-linux-hw-point.c: Update.
1456 * nat/fork-inferior.c: Update.
1457 * nat/x86-linux-dregs.c: Update.
1458 * nto-procfs.c: Update.
1459 * obsd-nat.c: Update.
1461 * progspace.c: Update.
1463 * rs6000-nat.c: Update.
1464 * s390-linux-nat.c: Update.
1465 * sol-thread.c: Update.
1466 * spu-linux-nat.c: Update.
1469 * tracefile-tfile.c: Update.
1470 * windows-nat.c: Update.
1472 2018-07-03 Tom Tromey <tom@tromey.com>
1474 * common/ptid.h (ptid_build): Don't declare.
1475 * common/ptid.c (ptid_build): Remove.
1476 * aix-thread.c: Update.
1477 * bsd-kvm.c: Update.
1478 * bsd-uthread.c: Update.
1479 * common/agent.c: Update.
1480 * common/ptid.c: Update.
1481 * common/ptid.h: Update.
1482 * corelow.c: Update.
1483 * darwin-nat.c: Update.
1484 * fbsd-nat.c: Update.
1485 * gnu-nat.c: Update.
1486 * linux-fork.c: Update.
1487 * linux-nat.c: Update.
1488 * linux-thread-db.c: Update.
1489 * nat/linux-osdata.c: Update.
1490 * nat/linux-procfs.c: Update.
1491 * nto-procfs.c: Update.
1492 * obsd-nat.c: Update.
1493 * proc-service.c: Update.
1495 * ravenscar-thread.c: Update.
1496 * remote-sim.c: Update.
1498 * sol-thread.c: Update.
1500 * windows-nat.c: Update.
1502 2018-07-03 Tom Tromey <tom@tromey.com>
1504 * infrun.c (follow_exec): Use exit_inferior_silent.
1505 * inferior.c (exit_inferior_num_silent): Remove.
1506 * inferior.h (exit_inferior_num_silent): Don't declare.
1508 2018-07-03 Tom Tromey <tom@tromey.com>
1511 * darwin-nat.c (darwin_attach_pid): Reset inferior and
1512 inferior_ptid on error.
1514 2018-07-02 Maciej W. Rozycki <macro@mips.com>
1515 Simon Marchi <simon.marchi@polymtl.ca>
1518 * disasm.h (gdb_disassembler): Add
1519 `m_disassembler_options_holder'. member
1520 * disasm.c (get_all_disassembler_options): New function.
1521 (gdb_disassembler::gdb_disassembler): Use it.
1522 (gdb_buffered_insn_length_init_dis): Likewise.
1523 (gdb_buffered_insn_length): Adjust accordingly.
1524 (set_disassembler_options): Handle options with arguments.
1525 (show_disassembler_options_sfunc): Likewise. Add a leading new
1526 line if showing options with descriptions.
1527 (disassembler_options_completer): Adapt to using the
1528 `disasm_options_and_args_t' structure.
1529 * mips-tdep.c (mips_disassembler_options): New variable.
1530 (mips_disassembler_options_o32): Likewise.
1531 (mips_disassembler_options_n32): Likewise.
1532 (mips_disassembler_options_n64): Likewise.
1533 (gdb_print_insn_mips): Don't set `disassembler_options'.
1534 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1536 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
1537 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
1538 `gdbarch_disassembler_options_implicit' and
1539 `gdbarch_valid_disassembler_options'.
1540 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
1541 `disasm_options_and_args_t' structure.
1542 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
1544 (valid_disassembler_options): Switch from `disasm_options_t' to
1545 the `disasm_options_and_args_t' structure.
1546 * NEWS: Document `set disassembler-options' support for the MIPS
1548 * gdbarch.h: Regenerate.
1549 * gdbarch.c: Regenerate.
1551 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
1553 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
1555 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1557 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
1558 parameter in call to amd64_target_description.
1559 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
1560 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
1561 (amd64fbsd_init_abi): Likewise.
1562 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
1563 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
1564 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
1565 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
1567 2018-06-29 Pedro Alves <palves@redhat.com>
1569 * gdb/amd64-tdep.h (amd64_create_target_description): Add
1570 "segments" parameter.
1571 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
1572 (_initialize_amd64_tdep): Update call to
1573 amd64_create_target_description.
1574 (amd64_target_description): Add "segments" parameter. Adjust
1575 the implementation to use it.
1576 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
1577 call to amd64_create_target_description.
1578 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
1579 * gdb/arch/amd64.h (amd64_create_target_description): Add
1580 "segments" register.
1581 * gdb/arch/amd64.c (amd64_create_target_description): Add
1582 "segments" parameter. Call create_feature_i386_64bit_segments
1583 only if SEGMENTS is true.
1584 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
1585 call to amd64_create_target_description.
1587 2018-06-29 Pedro Alves <palves@redhat.com>
1589 * thread.c (thread_target_id_str): New, factored out from ...
1590 (print_thread_info_1): ... here. Use it to compute the max
1591 "Target Id" column width.
1593 2018-06-29 Pedro Alves <palves@redhat.com>
1595 * remote.c (remote_target::extra_thread_info): Delete
1596 'display_buf' and 'n' locals. from the cache, regardless of
1597 packet mechanims is in use. Use cache for qThreadExtra and qP
1600 2018-06-29 Pedro Alves <palves@redhat.com>
1602 * blockframe.c (find_pc_sect_containing_function): New function.
1603 * breakpoint.c (print_breakpoint_location): Don't call
1604 find_pc_sect_function.
1605 * linespec.c (create_sals_line_offset): Record the location's
1607 * linespec.c (convert_address_location_to_sals): Fill in sal's
1608 symbol with find_pc_sect_containing_function.
1609 * symtab.c (find_function_start_sal): Rename to ...
1610 (find_function_start_sal_1): ... this.
1611 (find_function_start_sal): Reimplement as wrapper around
1612 find_function_start_sal_1, and use
1613 find_pc_sect_containing_function to fill in the sal's symbol.
1614 (find_function_start_sal(symbol*, bool)): Adjust.
1615 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
1617 (find_pc_sect_containing_function): Declare.
1619 2018-06-29 Pedro Alves <palves@redhat.com>
1621 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
1622 true if the the location has no symbol.
1624 2018-06-28 Tom Tromey <tom@tromey.com>
1626 * NEWS: Mention --enable-codesign.
1627 * silent-rules.mk (ECHO_SIGN): New variable.
1628 * configure.ac: Add --enable-codesign.
1629 * configure: Rebuild.
1630 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
1631 (gdb$(EXEEXT)): Optionally invoke codesign.
1633 2018-06-28 Pedro Alves <palves@redhat.com>
1635 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
1637 (switch_to_thread_no_regs): Adjust comment.
1638 * infcmd.c (stop_pc): Delete.
1639 (post_create_inferior, info_program_command): Replace references
1640 to stop_pc with references to thread_info->suspend.stop_pc.
1641 * inferior.h (stop_pc): Delete declaration.
1642 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
1643 (handle_inferior_event_1, handle_signal_stop)
1644 (process_event_stop_test, keep_going_stepped_thread)
1645 (handle_step_into_function, handle_step_into_function_backward)
1646 (print_stop_location): Replace references to stop_pc with
1647 references to thread_info->suspend.stop_pc.
1648 (struct infcall_suspend_state) <stop_pc>: Delete field.
1649 (save_infcall_suspend_state, restore_infcall_suspend_state):
1650 Remove references to inf_stat->stop_pc.
1651 * linux-fork.c (fork_load_infrun_state): Likewise.
1652 * record-btrace.c (record_btrace_set_replay): Likewise.
1653 * record-full.c (record_full_goto_entry): Likewise.
1654 * remote.c (print_one_stopped_thread): Likewise.
1655 * target.c (target_resume): Extend comment.
1656 * thread.c (set_executing_thread): New.
1657 (set_executing): Use it.
1658 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
1659 Remove references to stop_pc.
1661 2018-06-28 Pedro Alves <palves@redhat.com>
1663 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
1664 Moving fetching stop_pc until after ecs->event_thread is refreshed.
1666 2018-06-28 Tom Tromey <tom@tromey.com>
1668 * coffread.c (coff_symfile_finish): Update.
1669 * xcoffread.c (xcoff_symfile_finish): Update.
1670 * elfread.c (elf_symfile_finish): Update.
1671 * symfile.h (dwarf2_free_objfile): Don't declare.
1672 * dwarf2read.c (_initialize_dwarf2_read): Use
1673 register_objfile_data_with_cleanup.
1674 (dwarf2_free_objfile): Now static. Change signature.
1676 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1678 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
1679 option "-o" to add-symbol-file-load to add an offset to each
1680 section's load address.
1681 * symfile.c (set_objfile_default_section_offset): New function.
1683 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1685 * symfile.c (add_symbol_file_command): Make sure that sections
1686 with the same name are sorted in the same order.
1688 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1690 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
1691 require the second argument. If omitted, load sections at the
1692 addresses specified in the file.
1694 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1696 * symfile.c (symbol_file_command, symbol_file_add_main_1)
1697 (_initialize_symfile): Add option "-o" to symbol-file to add an
1698 offset to each section of the symbol file.
1700 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1702 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
1704 2018-06-27 Tom Tromey <tom@tromey.com>
1706 * stack.c (_initialize_stack): Update "func" help text.
1708 2018-06-27 Tom Tromey <tom@tromey.com>
1710 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
1712 (unwind_infopy_str, pyuw_create_unwind_info)
1713 (unwind_infopy_add_saved_register, pyuw_sniffer)
1714 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
1716 (struct saved_reg): Add constructor.
1717 <value>: Now a gdbpy_ref<>.
1719 2018-06-27 Tom Tromey <tom@tromey.com>
1721 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
1723 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1725 * gdb-gdb.py.in: Format using autopep8.
1727 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1729 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
1730 (type_lookup_function): Recognize CORE_ADDR values.
1732 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1734 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
1737 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1739 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
1742 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1744 * gdb-gdb.py: Move to...
1745 * gdb-gdb.py.in: ... here.
1746 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
1747 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
1749 (distclean): Remove gdb-gdb.py when cleaning.
1750 (gdb-gdb.py, gdb-gdb.gdb): New rules.
1751 * configure: Re-generate.
1753 2018-06-27 Pedro Alves <palves@redhat.com>
1755 * proc-service.c (get_ps_regcache): New.
1756 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1757 (ps_lsetfpregs): Use it.
1759 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
1762 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
1763 (dwarf_decode_lines_1): Adjust.
1765 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1767 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
1769 <info_proc>: Likewise.
1771 2018-06-26 Joel Brobecker <brobecker@adacore.com>
1773 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
1774 to windows_fetch_one_register, and only handle the case of
1775 fetching one register. Move the code that reloads the context
1776 and iterates over all registers if R is negative to...
1777 (windows_nat_target::fetch_registers): ... here.
1778 (do_windows_store_inferior_registers): Rename to
1779 windows_store_one_register, and only handle the case of storing
1780 one register. Move the code that handles the case where r is
1782 (windows_nat_target::store_registers) ... here.
1784 2018-06-26 Tom Tromey <tom@tromey.com>
1787 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
1788 * rust-lang.c (rust_print_struct_def): Add podata parameter.
1790 (rust_internal_print_type): Add podata parameter.
1791 (rust_print_type): Update.
1793 2018-06-26 Tom Tromey <tom@tromey.com>
1795 * typeprint.h (struct print_offset_data) <update, finish,
1796 maybe_print_hole>: New methods.
1797 <indentation>: New constant.
1798 * typeprint.c (print_offset_data::indentation): Define.
1799 (print_offset_data::maybe_print_hole, print_offset_data::update)
1800 (print_offset_data::finish): Move from c-typeprint.c and rename.
1801 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
1802 (print_spaces_filtered_with_print_options): Update.
1803 (c_print_type_union_field_offset, maybe_print_hole)
1804 (c_print_type_struct_field_offset): Move to typeprint.c and
1806 (c_type_print_base_struct_union): Update.
1808 2018-06-25 Pedro Alves <palves@redhat.com>
1810 * gdbthread.h (thread_info_ref, delete_thread)
1811 (delete_thread_silent, first_thread_of_inferior)
1812 (any_thread_of_inferior, switch_to_thread)
1813 (enable_thread_stack_temporaries)
1814 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1815 (get_last_thread_stack_temporary)
1816 (value_in_thread_stack_temporaries, can_access_registers_thread):
1817 Spell out "struct thread_info" instead of just "thread_info".
1818 * inferior.h (notice_new_inferior): Likewise.
1820 2018-06-25 Pedro Alves <palves@redhat.com>
1822 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1823 pass thread_info pointer to delete_thread.
1824 (windows_nat_target::detach): Pass inferior pointer to
1826 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
1828 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
1829 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
1830 and pass a thread_info pointer to delete_thread.
1831 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
1832 pass thread_info pointer to delete_thread.
1833 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
1834 delete_thread_silent call.
1835 * procfs.c (procfs_target::detach): Pass inferior pointer to
1837 (procfs_target::wait): Pass thread_info pointer to delete_thread.
1838 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
1839 delete_thread_silent call.
1840 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1841 pass thread_info pointer to delete_thread.
1842 (windows_nat_target::detach): Pass inferior pointer to
1845 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1847 * regcache.c (readable_regcache::read_part): Fix asserts.
1848 (reg_buffer::raw_collect_part): New function.
1849 (regcache::write_part): Fix asserts.
1850 (reg_buffer::raw_supply_part): New function.
1851 (regcache::transfer_regset_register): New helper function.
1852 (regcache::transfer_regset): Call new functions.
1853 (regcache_supply_regset): Use gdb_byte*.
1854 (regcache::supply_regset): Likewise.
1855 (regcache_collect_regset): Likewise.
1856 (regcache::collect_regset): Likewise.
1857 * regcache.h (reg_buffer::raw_collect_part): New declaration.
1858 (reg_buffer::raw_supply_part): Likewise.
1859 (regcache::transfer_regset_register): Likewise.
1860 (regcache::transfer_regset): Use gdb_byte*.
1862 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1864 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
1866 2018-06-21 Pedro Alves <palves@redhat.com>
1868 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
1869 instead of a ptid_t. All callers adjusted.
1870 * ada-tasks.c (ada_get_task_number): Likewise. All callers
1872 (print_ada_task_info, display_current_task_id, task_command_1):
1874 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
1876 (breakpoint_kind): Adjust.
1877 (remove_breakpoints_pid): Rename to ...
1878 (remove_breakpoints_inf): ... this. Adjust to take an inferior
1879 pointer. All callers adjusted.
1880 (bpstat_clear_actions): Use inferior_thread.
1881 (get_bpstat_thread): New.
1882 (bpstat_do_actions): Use it.
1883 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
1884 to take a thread_info pointer. All callers adjusted.
1885 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
1886 (breakpoint_re_set_thread): Use inferior_thread.
1887 * breakpoint.h (struct inferior): Forward declare.
1888 (bpstat_stop_status): Update.
1889 (remove_breakpoints_pid): Delete.
1890 (remove_breakpoints_inf): New.
1891 * bsd-uthread.c (bsd_uthread_target::wait)
1892 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
1893 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
1894 (maint_btrace_packet_history_cmd)
1895 (maint_btrace_clear_packet_history_cmd): Adjust.
1896 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
1898 * cli/cli-interp.c: Include "inferior.h".
1899 * common/refcounted-object.h (struct
1900 refcounted_object_ref_policy): New.
1901 * compile/compile-object-load.c: Include gdbthread.h.
1902 (store_regs): Use inferior_thread.
1903 * corelow.c (core_target::close): Use current_inferior.
1904 (core_target_open): Adjust to use first_thread_of_inferior and use
1905 the current inferior.
1906 * ctf.c (ctf_target::close): Adjust to use current_inferior.
1907 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
1908 <thread>: ... this new field. All references adjusted.
1909 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
1910 Take a thread_info pointer instead of a ptid_t.
1911 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
1912 (dummy_frame_discard, register_dummy_frame_dtor): Take a
1913 thread_info pointer instead of a ptid_t.
1914 * elfread.c: Include "inferior.h".
1915 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
1916 Use inferior_thread.
1917 * eval.c (evaluate_subexp): Likewise.
1918 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
1920 * gdb_proc_service.h (struct thread_info): Forward declare.
1921 (struct ps_prochandle) <ptid>: Delete, replaced by ...
1922 <thread>: ... this new field. All references adjusted.
1923 * gdbarch.h, gdbarch.c: Regenerate.
1924 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
1925 'thread' parameter. All implementations and callers adjusted.
1926 * gdbthread.h (thread_info) <set_running>: New method.
1927 (delete_thread, delete_thread_silent): Take a thread_info pointer
1929 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
1930 (first_thread_of_process): Delete, replaced by ...
1931 (first_thread_of_inferior): ... this new function. All callers
1933 (any_live_thread_of_process): Delete, replaced by ...
1934 (any_live_thread_of_inferior): ... this new function. All callers
1936 (switch_to_thread, switch_to_no_thread): Declare.
1937 (is_executing): Delete.
1938 (enable_thread_stack_temporaries): Update comment.
1939 <enable_thread_stack_temporaries>: Take a thread_info pointer
1940 instead of a ptid_t. Incref the thread.
1941 <~enable_thread_stack_temporaries>: Decref the thread.
1944 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1945 (get_last_thread_stack_temporary)
1946 (value_in_thread_stack_temporaries, can_access_registers_thread):
1947 Take a thread_info pointer instead of a ptid_t. All callers
1949 * infcall.c (get_call_return_value): Use inferior_thread.
1950 (run_inferior_call): Work with thread pointers instead of ptid_t.
1951 (call_function_by_hand_dummy): Work with thread pointers instead
1952 of ptid_t. Use thread_info_ref.
1953 * infcmd.c (proceed_thread_callback): Access thread's state
1955 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
1956 access thread's state directly.
1957 (continue_command): Use inferior_thread.
1958 (info_program_command): Use find_thread_ptid and access thread
1960 (proceed_after_attach_callback): Use thread state directly.
1961 (notice_new_inferior): Take a thread_info pointer instead of a
1962 ptid_t. All callers adjusted.
1963 (exit_inferior): Take an inferior pointer instead of a pid. All
1965 (exit_inferior_silent): New.
1966 (detach_inferior): Delete.
1967 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
1968 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
1969 (detach_inferior_command, kill_inferior_command): Use
1970 find_inferior_id instead of valid_gdb_inferior_id and
1971 gdb_inferior_id_to_pid.
1972 (inferior_command): Use inferior and thread pointers.
1973 * inferior.h (struct thread_info): Forward declare.
1974 (notice_new_inferior): Take a thread_info pointer instead of a
1975 ptid_t. All callers adjusted.
1976 (detach_inferior): Delete declaration.
1977 (exit_inferior, exit_inferior_silent): Take an inferior pointer
1978 instead of a pid. All callers adjusted.
1979 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
1980 (valid_gdb_inferior_id): Delete.
1981 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
1982 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
1983 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
1985 <inf>: ... this new field.
1986 <step_ptid>: Delete, replaced by ...
1987 <step_thread>: ... this new field.
1988 (get_displaced_stepping_state): Take an inferior pointer instead
1989 of a pid. All callers adjusted.
1990 (displaced_step_in_progress_any_inferior): Adjust.
1991 (displaced_step_in_progress_thread): Take a thread pointer instead
1992 of a ptid_t. All callers adjusted.
1993 (displaced_step_in_progress, add_displaced_stepping_state): Take
1994 an inferior pointer instead of a pid. All callers adjusted.
1995 (get_displaced_step_closure_by_addr): Adjust.
1996 (remove_displaced_stepping_state): Take an inferior pointer
1997 instead of a pid. All callers adjusted.
1998 (displaced_step_prepare_throw, displaced_step_prepare)
1999 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2000 All callers adjusted.
2001 (start_step_over): Adjust.
2002 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2003 displaced step queue.
2004 (do_target_resume): Adjust.
2005 (fetch_inferior_event): Use inferior_thread.
2006 (context_switch, get_inferior_stop_soon): Take an
2007 execution_control_state pointer instead of a ptid_t. All callers
2009 (switch_to_thread_cleanup): Delete.
2010 (stop_all_threads): Use scoped_restore_current_thread.
2011 * inline-frame.c: Include "gdbthread.h".
2012 (inline_state) <inline_state>: Take a thread pointer instead of a
2013 ptid_t. All callers adjusted.
2014 <ptid>: Delete, replaced by ...
2015 <thread>: ... this new field.
2016 (find_inline_frame_state): Take a thread pointer instead of a
2017 ptid_t. All callers adjusted.
2018 (skip_inline_frames, step_into_inline_frame)
2019 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2020 pointer instead of a ptid_t. All callers adjusted.
2021 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2022 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2023 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2025 * linux-nat.c (get_detach_signal): Likewise.
2026 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2027 (thread_db_notice_clone): Adjust.
2028 (thread_db_find_new_threads_silently)
2029 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2030 a thread pointer instead of a ptid_t. All callers adjusted.
2031 * mi/mi-cmd-var.c: Include "inferior.h".
2032 (mi_cmd_var_update_iter): Update to use thread pointers.
2033 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2035 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2037 (mi_output_running): ... this new function.
2038 (mi_on_resume_1): Adjust to use it.
2039 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2040 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2042 (interrupt_thread_callback): : Adjust to use thread and inferior
2044 * proc-service.c: Include "gdbthread.h".
2045 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2046 * progspace-and-thread.c: Include "inferior.h".
2047 * progspace.c: Include "inferior.h".
2048 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2049 hold a reference to an inferior_object.
2050 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2052 * python/py-inferior.c (struct inferior_object): Give the type a
2053 tag name instead of a typedef.
2054 (python_on_normal_stop): No need to check if the current thread is
2056 (inferior_to_inferior_object): Change return type to
2057 inferior_object. All callers adjusted.
2058 (find_thread_object): Delete, bits factored out to ...
2059 (thread_to_thread_object): ... this new function.
2060 * python/py-infthread.c (create_thread_object): Use
2061 inferior_to_inferior_object.
2062 (thpy_is_stopped): Use thread pointer directly.
2063 (gdbpy_selected_thread): Use inferior_thread.
2064 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2065 field, replaced with ...
2066 <thread>: ... this new field. All users adjusted.
2067 (btpy_insn_or_gap_new): Drop const.
2068 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2070 * python/py-record.c: Include "gdbthread.h".
2071 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2072 a ptid_t. All callers adjusted.
2073 (gdbpy_current_recording): Use inferior_thread.
2074 * python/py-record.h (recpy_record_object) <ptid>: Delete
2075 field, replaced with ...
2076 <thread>: ... this new field. All users adjusted.
2077 (recpy_element_object) <ptid>: Delete
2078 field, replaced with ...
2079 <thread>: ... this new field. All users adjusted.
2080 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2081 a ptid_t. All callers adjusted.
2082 * python/py-threadevent.c: Include "gdbthread.h".
2083 (get_event_thread): Use thread_to_thread_object.
2084 * python/python-internal.h (struct inferior_object): Forward
2086 (find_thread_object, find_inferior_object): Delete declarations.
2087 (thread_to_thread_object, inferior_to_inferior_object): New
2089 * record-btrace.c: Include "inferior.h".
2090 (require_btrace_thread): Use inferior_thread.
2091 (record_btrace_frame_sniffer)
2092 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2093 (get_thread_current_frame): Use scoped_restore_current_thread and
2095 (get_thread_current_frame): Use thread pointer directly.
2096 (record_btrace_replay_at_breakpoint): Use thread's inferior
2098 * record-full.c: Include "inferior.h".
2099 * regcache.c: Include "gdbthread.h".
2100 (get_thread_arch_regcache): Use the inferior's address space
2102 (get_thread_regcache, registers_changed_thread): New.
2103 * regcache.h (get_thread_regcache(thread_info *thread)): New
2105 (registers_changed_thread): New.
2106 (remote_target) <remote_detach_1>: Swap order of parameters.
2107 (remote_add_thread): <remote_add_thread>: Return the new thread.
2108 (get_remote_thread_info(ptid_t)): New overload.
2109 (remote_target::remote_notice_new_inferior): Use thread pointers
2111 (remote_target::process_initial_stop_replies): Use
2112 thread_info::set_running.
2113 (remote_target::remote_detach_1, remote_target::detach)
2114 (extended_remote_target::detach): Adjust.
2115 * stack.c (frame_show_address): Use inferior_thread.
2116 * target-debug.h (target_debug_print_thread_info_pp): New.
2117 * target-delegates.c: Regenerate.
2118 * target.c (default_thread_address_space): Delete.
2119 (memory_xfer_partial_1): Use current_inferior.
2120 (target_detach): Use current_inferior.
2121 (target_thread_address_space): Delete.
2122 (generic_mourn_inferior): Use current_inferior.
2123 * target.h (struct target_ops) <thread_address_space>: Delete.
2124 (target_thread_address_space): Delete.
2125 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2127 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2128 thread pointer instead of a ptid_t. Adjust all callers.
2129 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2130 (first_thread_of_process): Delete, replaced by ...
2131 (first_thread_of_inferior): ... this new function. All callers
2133 (any_thread_of_process): Rename to ...
2134 (any_thread_of_inferior): ... this, and take an inferior pointer.
2135 (any_live_thread_of_process): Rename to ...
2136 (any_live_thread_of_inferior): ... this, and take an inferior
2138 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2139 (value_in_thread_stack_temporaries)
2140 (get_last_thread_stack_temporary): Take a thread pointer instead
2141 of a ptid_t. Adjust all callers.
2142 (thread_info::set_running): New.
2143 (validate_registers_access): Use inferior_thread.
2144 (can_access_registers_ptid): Rename to ...
2145 (can_access_registers_thread): ... this, and take a thread
2147 (print_thread_info_1): Adjust to compare thread pointers instead
2149 (switch_to_no_thread, switch_to_thread): Make extern.
2150 (scoped_restore_current_thread::~scoped_restore_current_thread):
2151 Use m_thread pointer directly.
2152 (scoped_restore_current_thread::scoped_restore_current_thread):
2153 Use inferior_thread.
2154 (thread_command): Use thread pointer directly.
2155 (thread_num_make_value_helper): Use inferior_thread.
2156 * top.c (execute_command): Use inferior_thread.
2157 * tui/tui-interp.c: Include "inferior.h".
2158 * varobj.c (varobj_create): Use inferior_thread.
2159 (value_of_root_1): Use find_thread_global_id instead of
2160 global_thread_id_to_ptid.
2162 2018-06-21 Alan Hayward <alan.hayward@arm.com>
2164 * regcache.c (readable_regcache::read_part): Avoid memcpy when
2166 (regcache::write_part): Likewise.
2167 (readable_regcache::cooked_read_part): Update comment.
2168 (readable_regcache::cooked_write_part): Likewise.
2169 * regcache.h: (readable_regcache::read_part): Likewise.
2170 (regcache::write_part): Likewise.
2172 2018-06-21 Richard Bunt <richard.bunt@arm.com>
2173 Dirk Schubert <dirk.schubert@arm.com>
2175 * aarch64-linux-nat.c (post_attach): New.
2176 (aarch64_linux_nat_target::post_attach): Override post_attach to
2177 record the number of hardware debug registers.
2179 2018-06-20 Tom Tromey <tom@tromey.com>
2181 * python/py-param.c (add_setshow_generic): Make parameters const.
2182 (parmpy_init): Update.
2184 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2186 * regcache.h (regcache_cooked_read_ftype): Rename to...
2187 (register_read_ftype): ...this, change type to function_view.
2188 (class reg_buffer) <save>: Remove src parameter.
2189 (readonly_detached_regcache) <readonly_detached_regcache>: Make
2190 parameter non-const in first overload. Remove src parameter in
2192 * regcache.c (do_cooked_read): Remove.
2193 (readonly_detached_regcache::readonly_detached_regcache): Make
2194 parameter non-const, adjust call to other constructor.
2195 (reg_buffer::save): Remove src parameter.
2196 * frame.c (do_frame_register_read): Remove.
2197 (frame_save_as_regcache): Use lambda function.
2198 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2199 parameter to ppu2spu_data *.
2200 (ppu2spu_sniffer): Use lambda function.
2202 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2204 * record-full.c (record_full_target::insert_breakpoint): Remove
2205 "struct" keyword, add const.
2207 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2209 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2210 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2211 * configure.ac: Remove AC_PREREQ, add missing quoting.
2212 * gnulib/configure.ac: Modernize usage of
2213 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
2214 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2215 (AUTOMAKE_VERSION): Bump to 1.15.1.
2216 * configure: Re-generate.
2217 * config.in: Re-generate.
2218 * aclocal.m4: Re-generate.
2219 * gnulib/aclocal.m4: Re-generate.
2220 * gnulib/config.in: Re-generate.
2221 * gnulib/configure: Re-generate.
2222 * gnulib/import/Makefile.in: Re-generate.
2224 2018-06-19 Pedro Alves <palves@redhat.com>
2226 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2227 (lookup_minimal_symbol_by_pc_section): ... here with
2228 gdb_assert_not_reached added.
2230 2018-06-19 Pedro Alves <palves@redhat.com>
2232 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2233 parameter with a block parameter. Compare location's block symbol
2234 with the frame's block instead of addresses.
2235 (skip_inline_frames): Pass the current block instead of the
2236 frame's address. Break out as soon as we determine the frame
2237 should not be skipped.
2239 2018-06-18 Tom Tromey <tom@tromey.com>
2241 * solib-aix.c (solib_aix_get_section_offsets): Return
2243 (solib_aix_solib_create_inferior_hook): Update.
2245 2018-06-18 Tom Tromey <tom@tromey.com>
2247 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2249 2018-06-18 Tom Tromey <tom@tromey.com>
2251 * solib-frv.c (frv_relocate_main_executable): Use
2253 * solib-dsbt.c (dsbt_relocate_main_executable): Use
2256 2018-06-18 Tom Tromey <tom@tromey.com>
2258 * objfiles.h (inhibit_section_map_updates): Update.
2259 (resume_section_map_updates, resume_section_map_updates_cleanup):
2261 * solib-svr4.c (svr4_handle_solib_event): Update.
2262 * objfiles.c (inhibit_section_map_updates): Return
2263 scoped_restore_tmpl<int>.
2264 (resume_section_map_updates, resume_section_map_updates_cleanup):
2267 2018-06-18 Tom Tromey <tom@tromey.com>
2269 * valprint.h (read_string): Update.
2270 * valprint.c (read_string): Change type of "buffer".
2271 (val_print_string): Update.
2272 * python/py-value.c (valpy_string): Update.
2273 * language.h (struct language_defn) <la_get_string>: Change
2275 (default_get_string, c_get_string): Update.
2276 * language.c (default_get_string): Change type of "buffer".
2277 * guile/scm-value.c (gdbscm_value_to_string): Update.
2278 * c-lang.c (c_get_string): Change type of "buffer".
2280 2018-06-18 Tom Tromey <tom@tromey.com>
2282 * ser-mingw.c (struct pipe_state_destroyer): New.
2283 (pipe_state_up): New typedef.
2284 (cleanup_pipe_state): Remove.
2285 (pipe_windows_open): Use pipe_state_up. Don't release argv.
2287 2018-06-18 Tom Tromey <tom@tromey.com>
2289 * rust-lang.h (rust_yyerror): Don't declare.
2290 * rust-lang.c (rust_language_defn): Update.
2291 * rust-exp.y (yyerror): Now static.
2292 * parse.c (parse_exp_in_context_1): Update.
2293 * p-lang.h (p_yyerror): Don't declare.
2294 * p-lang.c (p_language_defn): Update.
2295 * p-exp.y (yyerror): Now static.
2296 * opencl-lang.c (opencl_language_defn): Update.
2297 * objc-lang.c (objc_language_defn): Update.
2298 * m2-lang.h (m2_yyerror): Don't declare.
2299 * m2-lang.c (m2_language_defn): Update.
2300 * m2-exp.y (yyerror): Now static.
2301 * language.h (struct language_defn) <la_error>: Remove.
2302 * language.c (unk_lang_error): Remove.
2303 (unknown_language_defn, auto_language_defn): Remove.
2304 * go-lang.h (go_yyerror): Don't declare.
2305 * go-lang.c (go_language_defn): Update.
2306 * go-exp.y (yyerror): Now static.
2307 * f-lang.h (f_yyerror): Don't declare.
2308 * f-lang.c (f_language_defn): Update.
2309 * f-exp.y (yyerror): Now static.
2310 * d-lang.h (d_yyerror): Don't declare.
2311 * d-lang.c (d_language_defn): Update.
2312 * d-exp.y (yyerror): Now static.
2313 * c-lang.h (c_yyerror): Don't declare.
2314 * c-lang.c (c_language_defn, cplus_language_defn)
2315 (asm_language_defn, minimal_language_defn): Update.
2316 * c-exp.y (yyerror): Now static.
2317 * ada-lang.h (ada_yyerror): Don't declare.
2318 * ada-lang.c (ada_language_defn): Update.
2319 * ada-exp.y (yyerror): Now static.
2321 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2323 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2324 (store_sveregs_to_thread): Likewise.
2325 (aarch64_linux_fetch_inferior_registers): Check for SVE.
2326 (aarch64_linux_store_inferior_registers): Likewise.
2327 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2329 (aarch64_sve_regs_copy_to_regcache): Likewise.
2330 (aarch64_sve_regs_copy_from_regcache): Likewise.
2331 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2333 (aarch64_sve_regs_copy_to_regcache): Likewise.
2334 (aarch64_sve_regs_copy_from_regcache): Likewise.
2335 (sve_context): Structure from Linux headers.
2336 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2337 (SVE_SIG_ZREG_SIZE): Likewise.
2338 (SVE_SIG_PREG_SIZE): Likewise.
2339 (SVE_SIG_FFR_SIZE): Likewise.
2340 (SVE_SIG_REGS_OFFSET): Likewise.
2341 (SVE_SIG_ZREGS_OFFSET): Likewise.
2342 (SVE_SIG_ZREG_OFFSET): Likewise.
2343 (SVE_SIG_ZREGS_SIZE): Likewise.
2344 (SVE_SIG_PREGS_OFFSET): Likewise.
2345 (SVE_SIG_PREG_OFFSET): Likewise.
2346 (SVE_SIG_PREGS_SIZE): Likewise.
2347 (SVE_SIG_FFR_OFFSET): Likewise.
2348 (SVE_SIG_REGS_SIZE): Likewise.
2349 (SVE_SIG_CONTEXT_SIZE): Likewise.
2350 (SVE_PT_REGS_MASK): Likewise.
2351 (SVE_PT_REGS_FPSIMD): Likewise.
2352 (SVE_PT_REGS_SVE): Likewise.
2353 (SVE_PT_VL_INHERIT): Likewise.
2354 (SVE_PT_VL_ONEXEC): Likewise.
2355 (SVE_PT_REGS_OFFSET): Likewise.
2356 (SVE_PT_FPSIMD_OFFSET): Likewise.
2357 (SVE_PT_FPSIMD_SIZE): Likewise.
2358 (SVE_PT_SVE_ZREG_SIZE): Likewise.
2359 (SVE_PT_SVE_PREG_SIZE): Likewise.
2360 (SVE_PT_SVE_FFR_SIZE): Likewise.
2361 (SVE_PT_SVE_FPSR_SIZE): Likewise.
2362 (SVE_PT_SVE_FPCR_SIZE): Likewise.
2363 (__SVE_SIG_TO_PT): Likewise.
2364 (SVE_PT_SVE_OFFSET): Likewise.
2365 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2366 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2367 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2368 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2369 (SVE_PT_SVE_PREG_OFFSET): Likewise.
2370 (SVE_PT_SVE_PREGS_SIZE): Likewise.
2371 (SVE_PT_SVE_FFR_OFFSET): Likewise.
2372 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2373 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2374 (SVE_PT_SVE_SIZE): Likewise.
2375 (SVE_PT_SIZE): Likewise.
2376 (HAS_SVE_STATE): New define.
2378 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2380 * nat/aarch64-sve-linux-sigcontext.h: New file.
2381 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2383 (SVE_VQ_MIN): Likewise.
2384 (SVE_VQ_MAX): Likewise.
2385 (SVE_VL_MIN): Likewise.
2386 (SVE_VL_MAX): Likewise.
2387 (SVE_NUM_ZREGS): Likewise.
2388 (SVE_NUM_PREGS): Likewise.
2389 (sve_vl_valid): Likewise.
2390 (struct user_sve_header): Likewise.
2392 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
2393 Richard Bunt <Richard.Bunt@arm.com>
2395 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2396 was requested by GDB.
2398 2018-06-15 Tom de Vries <tdevries@suse.de>
2400 * MAINTAINERS (Write After Approval): Add Tom de Vries.
2402 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
2404 * gnulib/update-gnulib.sh: Print expected versions of
2407 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
2409 * arch-utils.c (default_type_align): Use type_length_units.
2410 * gdbtypes.c (type_align): Use type_length_units.
2412 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2414 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2415 of 'define' command.
2417 2018-06-14 Tom de Vries <tdevries@suse.de>
2420 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2421 get_no_prettyformat_print_options.
2423 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
2425 * sparc-nat.h: Include target.h.
2426 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2427 <fetch_registers>: Remove this argument in function call.
2428 <store_registers>: Remove this argument in function call, remove
2430 <low_forget_process>: Call sparc64_forget_process instead of
2431 sparc_forget_process.
2433 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2435 * procfs.c (_initialize_procfs): Use add_inf_child_target.
2436 (procfs_target::make_corefile_notes): Adjust to new
2437 target_read_alloc return type.
2439 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2440 Stephen Roberts <stephen.roberts@arm.com>
2443 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2444 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2445 Move should_notify_stop local into more inner scope.
2447 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2448 Stephen Roberts <stephen.roberts@arm.com>
2451 * infrun.c (resume_1): Add call to mark_async_event_handler.
2453 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2455 * infrun.c (do_target_wait): Change old version of $pc printed.
2457 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
2459 * dwarf2read.c (read_index_from_section): Rename to...
2460 (read_gdb_index_from_section): ... this, update all callers.
2461 (dwarf2_read_index): Rename to...
2462 (dwarf2_read_gdb_index): ... this, update all callers.
2464 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
2466 * gdb/hppa-linux-nat.c
2467 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2468 hppa_linux_nat_target::fetch_registers.
2470 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2472 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2473 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2474 (AARCH64_DWARF_SVE_FFR): Likewise.
2475 (AARCH64_DWARF_SVE_P0): Likewise.
2476 (AARCH64_DWARF_SVE_Z0): Likewise.
2478 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2480 * common/common-regcache.h (raw_compare): New function.
2481 * regcache.c (regcache::raw_compare): Likewise.
2482 * regcache.h (regcache::raw_compare): New declaration.
2484 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2486 * common/common-regcache.h (reg_buffer_common): New structure.
2487 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2488 (reg_buffer::raw_supply): Likewise.
2489 (reg_buffer::raw_supply_integer): Likewise.
2490 (reg_buffer::raw_supply_zeroed): Likewise.
2491 (reg_buffer::raw_collect): Likewise.
2492 (reg_buffer::raw_collect_integer): Likewise.
2493 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2494 (reg_buffer::raw_supply): Likewise.
2495 (reg_buffer::raw_supply_integer): Likewise.
2496 (reg_buffer::raw_supply_zeroed): Likewise.
2497 (reg_buffer::raw_collect): Likewise.
2498 (reg_buffer::raw_collect_integer): Likewise.
2500 2018-06-10 Tom Tromey <tom@tromey.com>
2502 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
2503 (class remote_state) <stop_reply_queue>: Now std::vector.
2504 (remote_state::~remote_state)
2505 (remote_target::stop_reply_queue_length): Update.
2506 (struct queue_iter_param, remove_child_of_pending_fork)
2507 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2508 (check_pending_event_prevents_wildcard_vcont_callback)
2509 (remove_stop_reply_for_inferior)
2510 (remove_stop_reply_of_remote_state)
2511 (remote_notif_remove_once_on_match)
2512 (stop_reply_match_ptid_and_ws)
2513 (remote_kill_child_of_pending_fork): Remove.
2514 (remote_target::remove_new_fork_children)
2515 (remote_target::check_pending_events_prevent_wildcard_vcont)
2516 (remote_target::discard_pending_stop_replies)
2517 (remote_target::discard_pending_stop_replies_in_queue)
2518 (remote_target::remote_notif_remove_queued_reply)
2519 (remote_target::queued_stop_reply)
2520 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2521 (remote_target::wait, remote_target::kill_new_fork_children)
2522 (remote_target::async): Update.
2524 2018-06-10 Tom Tromey <tom@tromey.com>
2526 * record-full.c (record_full_arch_list_cleanups): Remove.
2527 (record_full_message): Use try/catch.
2528 (record_full_wait_cleanups): Remove.
2529 (record_full_wait_1): Use try/catch.
2530 (record_full_restore): Likewise.
2532 2018-06-10 Tom Tromey <tom@tromey.com>
2534 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
2535 declare VEC. Add constructor.
2536 <in_target_beneath>: Now bool.
2537 (record_full_breakpoints): Now a std::vector, static.
2538 (record_full_sync_record_breakpoints)
2539 (record_full_init_record_breakpoints)
2540 (record_full_target::insert_breakpoint)
2541 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
2543 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
2545 * dwarf2read.c (process_cu_includes): Remove struct keyword.
2546 * serial.c (serial_interface_lookup): Remove struct keyword.
2548 2018-06-10 Tom Tromey <tom@tromey.com>
2550 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
2552 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
2554 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
2556 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
2557 "beneath" as a method.
2558 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
2559 Use "beneath" as a method.
2561 2018-06-10 Tom Tromey <tom@tromey.com>
2563 * tracefile.c (struct trace_file_writer_deleter): New.
2564 <operator()>: Rename from trace_file_writer_xfree.
2565 (trace_file_writer_up): New typedef.
2566 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
2568 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2570 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
2571 <m_registers, m_register_status>: Change type to
2573 * regcache.c (reg_buffer::reg_buffer): Use new instead of
2576 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2578 * common/common-regcache.h (enum register_status): Add
2579 underlying type "signed char".
2580 * regcache.h (reg_buffer) <m_register_status>: Change type to
2582 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
2583 register_status instead of signed char.
2584 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
2585 (reg_buffer::get_register_status): Remove cast.
2586 (readable_regcache::raw_read): Remove cast.
2587 (readable_regcache::cooked_read): Remove cast.
2589 2018-06-09 Tom Tromey <tom@tromey.com>
2591 * source.c (reverse_search_command, forward_search_command): Use
2594 2018-06-09 Tom Tromey <tom@tromey.com>
2596 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
2597 (serial_ops_list): Now static, std::vector.
2598 (serial_interface_lookup, serial_add_interface): Update.
2600 2018-06-09 Tom Tromey <tom@tromey.com>
2602 * dwarf2read.c (process_cu_includes): Update.
2603 (process_full_comp_unit): Update.
2604 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
2607 2018-06-08 Paul Koning <paul_koning@dell.com>
2611 * python/python.c (do_start_initialization):
2612 Avoid call to internal Python API.
2613 (init__gdb_module): New function.
2615 2018-06-08 Gary Benson <gbenson@redhat.com>
2617 * linux-thread-db.c (valprint.h): New include.
2618 (struct check_thread_db_info): New structure.
2619 (check_thread_db_on_load, tdb_testinfo): New static globals.
2620 (check_thread_db, check_thread_db_callback): New functions.
2621 (try_thread_db_load_1): Run integrity checks if requested.
2622 (maintenance_check_libthread_db): New function.
2623 (_initialize_thread_db): Register "maint check libthread-db"
2624 and "maint set/show check-libthread-db".
2625 * NEWS: Mention the above new commands.
2627 2018-06-08 Tom Tromey <tom@tromey.com>
2629 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
2632 2018-06-08 Tom Tromey <tom@tromey.com>
2634 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
2636 2018-06-08 Tom Tromey <tom@tromey.com>
2638 * common/btrace-common.h (struct btrace_data): Add constructor,
2639 destructor, move assignment operator.
2640 <empty, clear, fini>: New methods.
2641 <format>: Initialize.
2642 (btrace_data_init, btrace_data_fini, btrace_data_clear)
2643 (btrace_data_empty): Don't declare.
2644 * common/btrace-common.c (btrace_data_init): Remove.
2645 (btrace_data::fini): Rename from btrace_data_fini.
2646 (btrace_data::empty): Rename from btrace_data_empty.
2647 (btrace_data::clear): Rename from btrace_data_clear. Return
2649 * btrace.h (make_cleanup_btrace_data): Don't declare.
2650 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
2651 (parse_xml_btrace): Update.
2652 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
2653 (maint_btrace_clear_packet_history_cmd): Update.
2655 2018-06-07 Pedro Alves <palves@redhat.com>
2657 * target.h (target_ops) <beneath>: Now a method. All references
2659 (class target_stack): New.
2660 * target.c (g_target_stack): New.
2661 (g_current_top_target): Delete.
2662 (current_top_target): Get the top target out of g_target_stack.
2663 (target_stack::push, target_stack::unpush): New.
2664 (push_target, unpush_target): Reimplement.
2665 (target_is_pushed): Reimplement in terms of g_target_stack.
2666 (target_ops::beneath, target_stack::find_beneath): New.
2668 2018-06-07 Pedro Alves <palves@redhat.com>
2670 * target.h (find_target_beneath): Delete declaration.
2671 * target.c (find_target_beneath): Delete definition.
2672 * aix-thread.c: All callers of find_target_beneath adjusted to
2673 call target_ops::beneath instead.
2674 * bsd-uthread.c: Likewise.
2675 * linux-thread-db.c: Likewise.
2676 * ravenscar-thread.c: Likewise.
2677 * sol-thread.c: Likewise.
2678 * spu-multiarch.c: Likewise.
2680 2018-06-07 Pedro Alves <palves@redhat.com>
2682 * target.h (target_ops) <beneath>: Now a method. All references
2684 (target_ops) <m_beneath>: New.
2685 * target.c (target_ops::beneath): New.
2686 * corelow.c: Adjust all references to target_ops::beneath.
2687 * linux-thread-db.c: Likewise.
2688 * make-target-delegates: Likewise.
2689 * record-btrace.c: Likewise.
2690 * record-full.c: Likewise.
2691 * remote.c: Likewise.
2692 * target.c: Likewise.
2693 * target-delegates.c: Regenerate.
2695 2018-06-07 Pedro Alves <palves@redhat.com>
2697 * target.h (target_stack): Delete.
2698 (current_top_target): Declare function.
2699 * target.c (target_stack): Delete.
2700 (g_current_top_target): New.
2701 (current_top_target): New function.
2702 * auxv.c: Use current_top_target instead of target_stack
2704 * avr-tdep.c: Likewise.
2705 * breakpoint.c: Likewise.
2706 * corefile.c: Likewise.
2707 * elfread.c: Likewise.
2709 * exceptions.c: Likewise.
2710 * frame.c: Likewise.
2711 * gdbarch-selftests.c: Likewise.
2712 * gnu-v3-abi.c: Likewise.
2713 * ia64-tdep.c: Likewise.
2714 * ia64-vms-tdep.c: Likewise.
2715 * infcall.c: Likewise.
2716 * infcmd.c: Likewise.
2717 * infrun.c: Likewise.
2718 * linespec.c: Likewise.
2719 * linux-tdep.c: Likewise.
2720 * minsyms.c: Likewise.
2721 * ppc-linux-nat.c: Likewise.
2722 * ppc-linux-tdep.c: Likewise.
2723 * procfs.c: Likewise.
2724 * regcache.c: Likewise.
2725 * remote.c: Likewise.
2726 * rs6000-tdep.c: Likewise.
2727 * s390-linux-nat.c: Likewise.
2728 * s390-tdep.c: Likewise.
2729 * solib-aix.c: Likewise.
2730 * solib-darwin.c: Likewise.
2731 * solib-dsbt.c: Likewise.
2732 * solib-spu.c: Likewise.
2733 * solib-svr4.c: Likewise.
2734 * solib-target.c: Likewise.
2735 * sparc-tdep.c: Likewise.
2736 * sparc64-tdep.c: Likewise.
2737 * spu-tdep.c: Likewise.
2738 * symfile.c: Likewise.
2739 * symtab.c: Likewise.
2740 * target-descriptions.c: Likewise.
2741 * target-memory.c: Likewise.
2742 * target.c: Likewise.
2743 * target.h: Likewise.
2744 * tracefile-tfile.c: Likewise.
2745 * tracepoint.c: Likewise.
2746 * valops.c: Likewise.
2747 * valprint.c: Likewise.
2748 * value.c: Likewise.
2749 * windows-tdep.c: Likewise.
2750 * mi/mi-main.c: Likewise.
2752 2018-06-07 Tom Tromey <tom@tromey.com>
2754 * valprint.h (build_address_symbolic): Declare.
2755 * printcmd.c (print_address_symbolic): Update.
2756 (build_address_symbolic): Change "name" and "filename" to
2758 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
2760 * defs.h (build_address_symbolic): Remove declaration.
2762 2018-06-07 Alan Hayward <alan.hayward@arm.com>
2764 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
2765 (aarch64_vnv_type): Add function.
2766 (aarch64_pseudo_register_name): Add V regs for SVE.
2767 (aarch64_pseudo_register_type): Likewise.
2768 (aarch64_pseudo_register_reggroup_p): Likewise.
2769 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
2770 (aarch64_pseudo_read_value): Add V regs for SVE.
2771 (aarch64_pseudo_write_2): Use V0 offset for SVE
2772 (aarch64_pseudo_write): Add V regs for SVE.
2773 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
2775 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
2777 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
2778 (sve_vl_from_vq): Likewise.
2780 2018-06-05 Tom Tromey <tom@tromey.com>
2782 * cli/cli-cmds.c (show_version): Update.
2783 * top.c (print_gdb_version): Add "interactive" parameter.
2785 * main.c (captured_main_1): Update.
2786 * top.h (print_gdb_version): Add "interactive" parameter and a
2789 2018-06-05 David Malcolm <dmalcolm@redhat.com>
2791 * common/enum-flags.h: Add trailing semicolon to example in
2794 2018-06-05 Tom Tromey <tom@tromey.com>
2797 * NEWS: Add entry about pager.
2798 * utils.c (pagination_disabled_for_command): New global.
2799 (prompt_for_continue): Allow "c" response to prompt.
2800 (reinitialize_more_filter): Clear
2801 pagination_disabled_for_command.
2802 (fputs_maybe_filtered): Check pagination_disabled_for_command.
2804 2018-06-04 Tom Tromey <tom@tromey.com>
2806 * ada-lang.h (ada_lookup_symbol_list): Update.
2807 * ada-lang.c (resolve_subexp): Update.
2808 (symbols_are_identical_enums): Change type of syms. Remove nsyms
2810 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
2811 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
2812 results parameter to std::vector.
2813 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
2815 * ada-exp.y (block_lookup): Update.
2816 (select_possible_type_sym): Change type of syms. Remove nsyms
2818 (write_var_or_type, write_name_assoc): Update.
2820 2018-06-04 Joel Brobecker <brobecker@adacore.com>
2822 * windows-nat.c (windows_nat_target::xfer_partial): Return
2823 TARGET_XFER_E_IO if we need to delegate to the target beneath
2824 but BENEATH is NULL.
2826 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
2828 * Makefile.in (config.status): Add configure.nat as a
2831 2018-06-04 Tom Tromey <tom@tromey.com>
2833 * cp-name-parser.y (cpname_state): Add method declarations.
2834 (HANDLE_QUAL): Update.
2835 (cpname_state::d_grab, cpname_state::fill_comp)
2836 (cpname_state::make_operator, cpname_state::make_dtor)
2837 (cpname_state::make_builtin_type, cpname_state::make_name)
2838 (cpname_state::d_qualify, cpname_state::d_int_type)
2839 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
2840 (%union): Move earlier.
2842 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2844 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
2846 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2848 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
2849 (aarch64_pseudo_write_1): Likewise.
2850 (aarch64_pseudo_read_value): Use helper.
2851 (aarch64_pseudo_write): Likewise.
2853 2018-06-04 Pedro Alves <palves@redhat.com>
2855 * darwin-nat.c (darwin_ops): Delete.
2856 (darwin_attach_pid): Use get_native_target.
2858 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2860 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
2861 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
2863 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2865 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
2866 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
2867 (aarch64_gdbarch_init): Check for SVE.
2868 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
2870 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2872 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
2873 * aarch64-tdep.h (aarch64_read_description): Likewise.
2874 * arch/aarch64.c (aarch64_create_target_description): Likewise.
2875 * arch/aarch64.h (aarch64_create_target_description): Likewise.
2876 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
2877 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
2878 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
2880 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
2882 * value.c (value_fetch_lazy_bitfield): New.
2883 (value_fetch_lazy_memory): New.
2884 (value_fetch_lazy_register): New.
2885 (value_fetch_lazy): Factor out to smaller functions.
2887 2018-06-01 Tom Tromey <tom@tromey.com>
2889 * cp-name-parser.y (backslashable, represented): Now const.
2891 2018-06-01 Tom Tromey <tom@tromey.com>
2893 * cp-name-parser.y: Include parser-defs.h.
2894 (parser_fprintf): Remove declaration.
2896 2018-06-01 Tom Tromey <tom@tromey.com>
2898 * cp-name-parser.y: Use %pure-parser, %lex-param, and
2900 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
2901 (global_result): Remove globals.
2902 (struct cpname_state): New.
2903 (yyparse): Don't declare.
2904 (yylex, yyerror): Move declarations after %union.
2905 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
2906 (make_name): Add state parameter.
2908 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
2910 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
2912 (yylex): Add lvalp, state parameters.
2913 (yyerror): Add state parameter.
2914 (cp_demangled_name_to_comp): Update.
2916 2018-06-01 Tom Tromey <tom@tromey.com>
2918 * cp-name-parser.y (parser_fprintf): Declare.
2919 (GDB_YY_REMAP_PREFIX): Define.
2920 Include yy-remap.h. Don't redefine yy* identifiers.
2922 2018-06-01 Tom Tromey <tom@tromey.com>
2924 * python/py-type.c (typy_legacy_template_argument): Update.
2925 * cp-support.h (cp_demangled_name_to_comp): Update.
2926 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
2927 parameter to be a "std::string *".
2930 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
2932 * ada-lex.l: Include "diagnostics.h" instead of
2933 "common/diagnostics.h".
2934 * unittests/environ-selftests.c: Likewise.
2935 * common/diagnostics.h: Moved to ../include.
2937 2018-06-01 Joel Brobecker <brobecker@adacore.com>
2939 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
2940 to language_mode_manual while calling breakpoint_re_set_one.
2942 2018-06-01 Tom Tromey <tom@tromey.com>
2944 * valops.c (value_cast_structs, destructor_name_p): Update.
2945 * symtab.c (gdb_mangle_name): Update.
2946 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
2948 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
2949 (pascal_object_print_value_fields, pascal_object_print_value):
2951 * p-typeprint.c (pascal_type_print_derivation_info): Update.
2952 * linespec.c (find_methods): Update.
2953 * gdbtypes.h (type_name_no_tag): Remove.
2954 (type_name_or_error): Rename from type_name_no_tag_or_error.
2955 * gdbtypes.c (type_name_no_tag): Remove.
2956 (type_name_or_error): Rename from type_name_no_tag_or_error.
2957 (lookup_struct_elt_type, check_typedef): Update.
2958 * expprint.c (print_subexp_standard): Update.
2959 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
2960 * d-namespace.c (d_lookup_nested_symbol): Update.
2961 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
2962 (cp_print_class_member): Update.
2963 * cp-namespace.c (cp_lookup_nested_symbol): Update.
2964 * completer.c (add_struct_fields): Update.
2965 * c-typeprint.c (cp_type_print_derivation_info)
2966 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
2968 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
2969 (ada_prefer_type, ada_is_exception_sym): Update.
2971 2018-06-01 Tom Tromey <tom@tromey.com>
2973 * valops.c (enum_constant_from_type, value_namespace_elt)
2974 (value_maybe_namespace_elt): Update.
2975 * valarith.c (find_size_for_pointer_math): Update.
2976 * target-descriptions.c (make_gdb_type): Update.
2977 * symmisc.c (print_symbol): Update.
2978 * stabsread.c (define_symbol, read_type)
2979 (complain_about_struct_wipeout, add_undefined_type)
2980 (cleanup_undefined_types_1): Update.
2981 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
2982 (rust_range_type_p, val_print_struct, rust_print_struct_def)
2983 (rust_internal_print_type, rust_composite_type)
2984 (rust_evaluate_funcall, rust_evaluate_subexp)
2985 (rust_inclusive_range_type_p): Update.
2986 * python/py-type.c (typy_get_tag): Update.
2987 * p-typeprint.c (pascal_type_print_base): Update.
2988 * mdebugread.c (parse_symbol, parse_type): Update.
2989 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
2991 * guile/scm-type.c (gdbscm_type_tag): Update.
2992 * go-lang.c (sixg_string_p): Update.
2993 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
2995 * gdbtypes.h (struct main_type) <tag_name>: Remove.
2996 (TYPE_TAG_NAME): Remove.
2997 * gdbtypes.c (type_name_no_tag): Simplify.
2998 (check_typedef, check_types_equal, recursive_dump_type)
2999 (copy_type_recursive, arch_composite_type): Update.
3000 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3001 in summary mode when needed.
3002 * eval.c (evaluate_funcall): Update.
3003 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3004 (process_structure_scope, read_enumeration_type)
3005 (read_namespace_type, read_module_type, determine_prefix): Update.
3006 * cp-support.c (inspect_type): Update.
3007 * coffread.c (process_coff_symbol, decode_base_type): Update.
3008 * c-varobj.c (c_is_path_expr_parent): Update.
3009 * c-typeprint.c (c_type_print_base_struct_union): Update.
3010 (c_type_print_base_1): Update. Print struct/class/union/enum in
3011 summary when using C language.
3012 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3013 (gen_maybe_namespace_elt): Update.
3014 * ada-lang.c (ada_type_name): Simplify.
3015 (empty_record, ada_template_to_fixed_record_type_1)
3016 (template_to_static_fixed_type)
3017 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3019 2018-06-01 Tom Tromey <tom@tromey.com>
3021 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3023 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3024 (c_print_type): Update.
3025 (c_print_type): New overload.
3026 (c_type_print_varspec_prefix, c_type_print_args)
3027 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3028 (c_type_print_base_struct_union, c_type_print_base_1)
3029 (cp_type_print_method_args): Add "language" parameter.
3030 (c_type_print_base): Update.
3031 * c-lang.h (c_print_type): Add new overload.
3033 2018-06-01 Tom Tromey <tom@tromey.com>
3035 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3036 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3038 2018-06-01 Alan Hayward <alan.hayward@arm.com>
3040 * aarch64-tdep.c (aarch64_sve_register_names): New const
3042 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3043 (AARCH64_SVE_Z_REGS_NUM): New define.
3044 (AARCH64_SVE_P_REGS_NUM): Likewise.
3045 (AARCH64_SVE_NUM_REGS): Likewise.
3047 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
3049 * nat/linux-ptrace.h [__alpha__]
3050 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3053 2018-05-31 Maciej W. Rozycki <macro@mips.com>
3055 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3056 the endianness selected.
3057 * NEWS: Document `set endian auto' mode operation update.
3059 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3061 * Makefile.in: Add new header.
3062 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3063 (sve_vl_from_vg): Likewise.
3064 (sve_vq_from_vl): Likewise.
3065 (sve_vl_from_vq): Likewise.
3066 (sve_vq_from_vg): Likewise.
3067 (sve_vg_from_vq): Likewise.
3068 * configure.nat: Add new c file.
3069 * nat/aarch64-sve-linux-ptrace.c: New file.
3070 * nat/aarch64-sve-linux-ptrace.h: New file.
3072 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3074 * aarch64-linux-nat.c (aarch64_linux_read_description):
3076 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3078 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3079 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3080 (aarch64_gdbarch_init): Add parmeter zero.
3081 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3082 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3083 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3085 * doc/gdb.texinfo: Describe SVE feature
3086 * features/aarch64-sve.c: New file.
3088 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
3091 * gdbarch.sh (significant_addr_bit): Default to zero when
3092 not set by target architecture.
3093 * gdbarch.c: Re-generated.
3094 * utils.c (address_significant): Update.
3096 2018-05-30 Joel Brobecker <brobecker@adacore.com>
3098 * stack.c (func_command): Remove trailing newline in call to error.
3100 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3102 * regcache.h (regcache_raw_collect): Remove, update callers to
3103 use regcache::raw_collect.
3104 * regcache.c (regcache_raw_collect): Remove.
3106 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3108 * regcache.h (regcache_raw_supply): Remove, update callers to
3109 use detached_regcache::raw_supply.
3110 * regcache.c (regcache_raw_supply): Remove.
3112 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3114 * regcache.h (regcache_cooked_write_part): Remove, update
3115 callers to use regcache::cooked_write_part.
3116 * regcache.c (regcache_cooked_write_part): Remove.
3118 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3120 * regcache.h (regcache_cooked_read_part): Remove, update callers
3121 to use readable_regcache::cooked_read_part.
3122 * regcache.c (regcache_cooked_read_part): Remove.
3124 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3126 * regcache.h (regcache_cooked_read_value): Remove, update
3127 callers to use readable_regcache::cooked_read_value.
3128 * regcache.c (regcache_cooked_read_value): Remove.
3130 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3132 * regcache.h (regcache_cooked_write): Remove, update callers to
3133 use regcache::cooked_write.
3134 * regcache.c (regcache_cooked_write): Remove.
3136 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3138 * regcache.h (regcache_invalidate): Remove, update callers to
3139 use detached_regcache::invalidate instead.
3140 * regcache.c (regcache_invalidate): Remove.
3142 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3144 * regcache.h (regcache_raw_write_part): Remove, update callers
3145 to use regcache::raw_write_part instead.
3146 * regcache.c (regcache_raw_write_part): Remove.
3148 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3150 * regcache.h (regcache_raw_read_part): Remove, update callers to
3151 use readable_regcache::raw_read_part instead.
3152 * regcache.c (regcache_raw_read_part): Remove.
3154 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3156 * regcache.h (regcache_cooked_read): Remove, update callers to
3157 use readable_regcache::cooked_read instead.
3158 * regcache.c (regcache_cooked_read): Remove.
3160 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3162 * regcache.h (regcache_raw_write): Remove, update callers to use
3163 regcache::raw_write instead.
3164 * regcache.c (regcache_raw_write): Remove.
3166 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3168 * regcache.h (regcache_raw_read): Remove, update callers to use
3169 readable_regcache::raw_read instead.
3170 * regcache.c (regcache_raw_read): Remove.
3172 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3174 * regcache.h (regcache_raw_update): Remove, update callers to
3175 use readable_regcache::raw_update instead.
3176 * regcache.c (regcache_raw_update): Remove.
3178 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3180 * regcache.h (regcache_register_status): Remove, update callers
3181 to use reg_buffer::get_register_status directly instead.
3182 * regcache.c (regcache_register_status): Remove.
3184 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3186 * regcache.h (regcache_get_ptid): Remove, update all callers to
3187 call regcache::ptid instead.
3188 * regcache.c (regcache_get_ptid): Remove.
3190 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3192 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3194 2018-05-30 Pedro Alves <palves@redhat.com>
3196 * common/common-exceptions.h (exception_rethrow): Use
3199 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
3201 * breakpoint.c (print_solib_event, check_status_catch_solib):
3202 Remove struct keyword in range-based for loops.
3203 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3204 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3206 * linespec.c (find_superclass_methods, search_minsyms_for_name):
3208 * symfile.c (addr_info_make_relative): Likewise.
3209 * thread.c (value_in_thread_stack_temporaries): Likewise.
3211 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
3214 * valops.c (value_struct_elt_for_reference): Call check_typedef on
3215 aggregate type to get its real type before accessing it.
3217 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
3219 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3220 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3221 * coff-pe-read.c (add_pe_forwarded_sym): Replace
3222 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3223 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3224 * jit.c (jit_breakpoint_re_set_internal): Likewise.
3225 * printcmd.c (info_address_command): Likewise.
3227 2018-05-29 Tom Tromey <tom@tromey.com>
3229 * windows-nat.c (handle_exception): Update fall-through comment.
3231 2018-05-29 Tom Tromey <tom@tromey.com>
3233 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
3234 (struct program_space) <added_solibs>: Now a std::vector.
3235 * breakpoint.c (print_solib_event): Update.
3236 (check_status_catch_solib): Update.
3237 * progspace.c (clear_program_space_solib_cache): Update.
3238 * solib.c (update_solib_list): Update.
3240 2018-05-29 Tom Tromey <tom@tromey.com>
3242 * python/py-type.c (typy_richcompare): Update.
3243 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3244 * gdbtypes.h (types_deeply_equal): Return bool.
3245 (types_equal): Likewise.
3246 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
3248 (check_types_equal): Change worklist to std::vector. Return
3250 (struct type_equality_entry): Add constructor.
3251 (compare_maybe_null_strings): Return bool.
3252 (check_types_worklist): Return bool. Change worklist to
3254 (types_deeply_equal): Use std::vector.
3255 (types_equal): Return bool.
3256 (compare_maybe_null_strings): Simplify.
3258 2018-05-29 Tom Tromey <tom@tromey.com>
3260 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
3262 2018-05-29 Tom Tromey <tom@tromey.com>
3264 * objc-lang.h: Don't include cp-support.h.
3265 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
3268 2018-05-27 Tom Tromey <tom@tromey.com>
3270 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3272 2018-05-25 Tom Tromey <tom@tromey.com>
3274 * value.c (value::location): Initialize.
3276 2018-05-25 Tom Tromey <tom@tromey.com>
3278 * dbxread.c (init_bincl_list): Remove.
3279 (bincl_list): Now a std::vector.
3280 (bincls_allocated, next_bincl): Remove.
3281 (free_bincl_list, do_free_bincl_list_cleanup)
3282 (make_cleanup_free_bincl_list): Remove.
3283 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3285 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3286 (struct header_file_location): Add constructor.
3287 (add_bincl_to_list): Remove.
3289 2018-05-25 Tom Tromey <tom@tromey.com>
3291 * tui/tui.c (tui_enable): Update.
3292 * mi/mi-interp.c (mi_interp::init): Update.
3293 * interps.h (class interp) <name>: New method.
3294 <m_name>: Rename from name.
3295 (~scoped_restore_interp): Update.
3296 * interps.c (interp::interp): Update.
3297 (interp_add, interp_set, interp_lookup_existing)
3298 (current_interp_named_p): Update.
3300 2018-05-25 Tom Tromey <tom@tromey.com>
3302 * interps.c (interp_name): Remove.
3303 * mi/mi-interp.c (mi_interp::init): Update.
3304 * interps.h (interp_name): Remove.
3305 (~scoped_restore_interp): Update.
3306 * tui/tui.c (tui_enable): Update.
3308 2018-05-25 Tom Tromey <tom@tromey.com>
3310 * utils.c (fputs_maybe_filtered): Update.
3311 * linespec.c (decode_line_full): Update.
3312 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3313 (mi_print_breakpoint_for_event, mi_solib_loaded)
3314 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3315 (mi_user_selected_context_changed): Update.
3316 * mi/mi-main.c (mi_execute_command): Update.
3317 * cli/cli-script.c (execute_control_command): Update.
3318 * python/python.c (execute_gdb_command): Update.
3319 * solib.c (info_sharedlibrary_command): Update.
3320 * interps.c (interp_ui_out): Remove.
3321 * interps.h (interp_ui_out): Remove.
3323 2018-05-25 Tom Tromey <tom@tromey.com>
3325 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3326 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3327 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3329 2018-05-25 Tom Tromey <tom@tromey.com>
3331 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3332 * interps.c (interp_exec): Use scoped_restore.
3334 2018-05-25 Tom Tromey <tom@tromey.com>
3336 * remote.c (remote_target::remote_file_get): Use
3338 (remote_target::remote_file_put): Likewise.
3340 2018-05-25 Tom Tromey <tom@tromey.com>
3342 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3344 (get_pe_section_index, add_pe_exported_sym): Update.
3345 (read_pe_exported_syms): Use gdb::def_vector.
3347 2018-05-25 Tom Tromey <tom@tromey.com>
3349 * frame.c (remove_prev_frame): Remove.
3350 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3352 2018-05-25 Maciej W. Rozycki <macro@mips.com>
3354 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3356 * mips-linux-nat.c (supply_fpregset): Always call
3357 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3358 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3359 `mips_fill_fpregset'.
3360 * mips-linux-tdep.c (mips_supply_fpregset)
3361 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3362 (mips_fill_fpregset_wrapper): Remove functions.
3363 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3364 (mips_linux_fpregset): Remove variable.
3365 (mips_linux_iterate_over_regset_sections): Use
3366 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3367 (mips_linux_o32_sigframe_init): Remove comment.
3369 2018-05-25 Pedro Alves <palves@redhat.com>
3371 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3372 (struct readahead_cache, struct packet_reg, struct
3373 remote_arch_state, class remote_state): Move higher up in the
3375 (remote_target::m_remote_state): Now an object instead of a pointer.
3376 (remote_target::get_remote_state): Adjust.
3378 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3380 * stack.c (select_and_print_frame): Delete.
3381 (struct function_bounds): Move struct within function.
3382 (func_command): Most content moved into new function
3383 find_frame_for_function, use new function, print result, add
3385 (find_frame_for_function): New function, now returns a result.
3387 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3389 * stack.c (iterate_over_block_arg_vars): Fix comment.
3390 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3392 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3396 (scoped_restore_selected_frame::scoped_restore_selected_frame):
3398 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3400 * frame.h (class scoped_restore_selected_frame): New class.
3401 * stack.c (print_frame_local_vars): Remove catching and rethrowing
3402 of any exception, use scoped_restore_selected_frame to restore the
3405 2018-05-24 Pedro Alves <palves@redhat.com>
3407 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3410 2018-05-23 Tom Tromey <tom@tromey.com>
3412 * complaints.c (struct complaints): Remove.
3413 (symfile_complaint_book): Remove.
3414 (series): New global.
3415 (complaint_internal): Update.
3416 (clear_complaints): Update.
3418 2018-05-23 Tom Tromey <tom@tromey.com>
3420 * complaints.c (counters): New global.
3421 (struct complain): Remove.
3422 (struct complaints) <root>: Remove.
3423 (complaint_sentinel): Remove.
3424 (symfile_complaint_book): Update.
3425 (find_complaint) Remove.
3426 (complaint_internal, clear_complaints): Update.
3428 2018-05-23 Tom Tromey <tom@tromey.com>
3430 * complaints.c (struct complain) <file, line>: Remove.
3431 (find_complaint): Remove file, line parameters.
3432 (complaint_internal): Update.
3434 2018-05-23 Tom Tromey <tom@tromey.com>
3436 * complaints.c (vcomplaint): Remove.
3437 (complaint_internal) Merge in contents of vcomplaint.
3439 2018-05-23 Tom Tromey <tom@tromey.com>
3441 * complaints.c (struct complaints) <explanation>: Remove.
3442 (symfile_explanations): Remove.
3443 (symfile_complaint_book): Update.
3444 (vcomplaint): Update.
3445 (struct explanation): Remove.
3447 2018-05-23 Tom Tromey <tom@tromey.com>
3449 * complaints.c (symfile_complaints): Remove.
3450 (complaint_internal): Remove "complaints" parameter.
3451 (clear_complaints, vcomplaint): Remove "c" parameter.
3452 (get_complaints): Remove.
3453 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3454 (dwarf2_debug_line_missing_file_complaint)
3455 (dwarf2_debug_line_missing_end_sequence_complaint)
3456 (dwarf2_complex_location_expr_complaint)
3457 (dwarf2_const_value_length_mismatch_complaint)
3458 (dwarf2_section_buffer_overflow_complaint)
3459 (dwarf2_macro_malformed_definition_complaint)
3460 (dwarf2_invalid_attrib_class_complaint)
3461 (create_addrmap_from_index, dw2_symtab_iter_next)
3462 (dw2_expand_marked_cus)
3463 (dw2_debug_names_iterator::find_vec_in_debug_names)
3464 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3465 (create_debug_type_hash_table, init_cutu_and_read_dies)
3466 (partial_die_parent_scope, add_partial_enumeration)
3467 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3468 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3469 (read_import_statement, read_file_scope, create_dwo_cu_reader)
3470 (create_cus_hash_table, create_dwp_hash_table)
3471 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3472 (dwarf2_rnglists_process, dwarf2_ranges_process)
3473 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3474 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3475 (handle_struct_member_die, process_structure_scope)
3476 (read_array_type, read_common_block, read_module_type)
3477 (read_tag_pointer_type, read_typedef, read_base_type)
3478 (read_subrange_type, load_partial_dies, partial_die_info::read)
3479 (partial_die_info::read, partial_die_info::read)
3480 (partial_die_info::read, read_checked_initial_length_and_offset)
3481 (dwarf2_string_attr, read_formatted_entries)
3482 (dwarf_decode_line_header)
3483 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3484 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3485 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3486 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3487 (get_signatured_type, get_DW_AT_signature_type)
3488 (decode_locdesc, file_file_name, consume_improper_spaces)
3489 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3490 (dwarf_decode_macro_bytes, dwarf_decode_macros)
3491 (dwarf2_symbol_mark_computed, set_die_type)
3492 (read_attribute_value): Update.
3493 * stap-probe.c (handle_stap_probe, get_stap_base_address):
3495 * dbxread.c (unknown_symtype_complaint)
3496 (lbrac_mismatch_complaint, repeated_header_complaint)
3497 (set_namestring, function_outside_compilation_unit_complaint)
3498 (read_dbx_symtab, process_one_symbol): Update.
3499 * gdbtypes.c (stub_noname_complaint): Update.
3500 * windows-nat.c (handle_unload_dll): Update.
3501 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3502 (decode_base_type): Update.
3503 * xcoffread.c (bf_notfound_complaint, ef_complaint)
3504 (eb_complaint, record_include_begin, record_include_end)
3505 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3506 (process_xcoff_symbol, read_symbol)
3507 (function_outside_compilation_unit_complaint)
3508 (scan_xcoff_symtab): Update.
3509 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3510 * buildsym.c (finish_block_internal, make_blockvector)
3511 (end_symtab_get_static_block, augment_type_symtab): Update.
3512 * dtrace-probe.c (dtrace_process_dof)
3513 (dtrace_static_probe_ops::get_probes): Update.
3514 * complaints.h (struct complaint): Don't declare.
3515 (symfile_complaints): Remove.
3516 (complaint_internal): Remove "complaints" parameter.
3517 (complaint): Likewise.
3518 (clear_complaints): Likewise.
3519 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3520 (reread_symbols): Update.
3521 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3522 (dwarf2_frame_cache, decode_frame_entry): Update.
3523 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3524 * objc-lang.c (lookup_objc_class, lookup_child_selector)
3525 (info_selectors_command): Update.
3526 * macrotab.c (macro_include, check_for_redefinition)
3527 (macro_undef): Update.
3528 * objfiles.c (filter_overlapping_sections): Update.
3529 * stabsread.c (invalid_cpp_abbrev_complaint)
3530 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3531 (define_symbol, error_type, read_type, rs6000_builtin_type)
3532 (stabs_method_name_from_physname, read_member_functions)
3533 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3534 (attach_fields_to_type, complain_about_struct_wipeout)
3535 (read_range_type, read_args, common_block_start)
3536 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
3538 * mdebugread.c (index_complaint, unknown_ext_complaint)
3539 (basic_type_complaint, bad_tag_guess_complaint)
3540 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
3541 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
3542 (parse_procedure, parse_lines)
3543 (function_outside_compilation_unit_complaint)
3544 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
3545 (bad_tag_guess_complaint, reg_value_complaint): Update.
3546 * cp-support.c (demangled_name_complaint): Update.
3547 * macroscope.c (sal_macro_scope): Update.
3548 * dwarf-index-write.c (class debug_names): Update.
3550 2018-05-23 Tom Tromey <tom@tromey.com>
3552 * complaints.c (clear_complaints): Remove "noisy" parameter.
3553 * complaints.h (clear_complaints): Update.
3554 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3555 (reread_symbols): Update.
3557 2018-05-23 Tom Tromey <tom@tromey.com>
3559 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
3561 (vcomplaint, clear_complaints): Update.
3562 (symfile_explanations): Remove some messages.
3564 2018-05-23 Tom Tromey <tom@tromey.com>
3566 * complaints.c (internal_complaint): Remove.
3567 * complaints.h (internal_complaint): Remove.
3569 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3571 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
3573 2018-05-22 Pedro Alves <palves@redhat.com>
3575 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
3576 (remote_fileio_badfd, remote_fileio_return_errno)
3577 (remote_fileio_return_success, remote_fileio_func_open)
3578 (remote_fileio_func_open, remote_fileio_func_close)
3579 (remote_fileio_func_read, remote_fileio_func_write)
3580 (remote_fileio_func_lseek, remote_fileio_func_rename)
3581 (remote_fileio_func_unlink, remote_fileio_func_stat)
3582 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
3583 (remote_fileio_func_isatty, remote_fileio_func_system): Add
3584 remote_target parameter.
3585 (remote_fio_func_map) <func>: Add remote_target parameter.
3586 (do_remote_fileio_request, remote_fileio_request):
3587 * remote-fileio.h (remote_fileio_request):
3588 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
3589 remote_target parameter.
3590 (remote_notif_process, handle_notification): Adjust to pass down
3592 (remote_notif_state_allocate): Add remote_target parameter. Save
3594 * remote-notif.h (struct remote_target): Forward declare.
3595 (struct notif_client) <parse, ack, can_get_pending_events>: Add
3596 remote_target parameter.
3597 (struct remote_notif_state) <remote>: New field.
3598 (remote_notif_ack, remote_notif_parse): Add remote_target
3600 (remote_notif_state_allocate, remote_notif_state_allocate): Add
3601 remote_target parameter.
3602 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
3603 (threads_listing_context, rmt_thread_action, protocol_feature)
3604 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
3605 (packet_result, struct threads_listing_context, remote_state):
3606 Move definitions and declarations higher up.
3607 (remote_target) <~remote_target>: Declare.
3608 (remote_download_command_source, remote_file_put, remote_file_get)
3609 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
3610 (remote_hostio_pread_vFile, remote_hostio_send_command)
3611 (remote_hostio_set_filesystem, remote_hostio_open)
3612 (remote_hostio_close, remote_hostio_unlink, remote_state)
3613 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
3614 (get_memory_write_packet_size, get_memory_read_packet_size)
3615 (append_pending_thread_resumptions, remote_detach_1)
3616 (append_resumption, remote_resume_with_vcont)
3617 (add_current_inferior_and_thread, wait_ns, wait_as)
3618 (process_stop_reply, remote_notice_new_inferior)
3619 (process_initial_stop_replies, remote_add_thread)
3620 (btrace_sync_conf, remote_btrace_maybe_reopen)
3621 (remove_new_fork_children, kill_new_fork_children)
3622 (discard_pending_stop_replies, stop_reply_queue_length)
3623 (check_pending_events_prevent_wildcard_vcont)
3624 (discard_pending_stop_replies_in_queue, stop_reply)
3625 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
3626 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
3627 (remote_interrupt_as, remote_interrupt_ns)
3628 (remote_get_noisy_reply, remote_query_attached)
3629 (remote_add_inferior, remote_current_thread, get_current_thread)
3630 (set_thread, set_general_thread, set_continue_thread)
3631 (set_general_process, write_ptid)
3632 (remote_unpack_thread_info_response, remote_get_threadinfo)
3633 (parse_threadlist_response, remote_get_threadlist)
3634 (remote_threadlist_iterator, remote_get_threads_with_ql)
3635 (remote_get_threads_with_qxfer)
3636 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
3637 (get_offsets, remote_check_symbols, remote_supported_packet)
3638 (remote_query_supported, remote_packet_size)
3639 (remote_serial_quit_handler, remote_detach_pid)
3640 (remote_vcont_probe, remote_resume_with_hc)
3641 (send_interrupt_sequence, interrupt_query)
3642 (remote_notif_get_pending_events, fetch_register_using_p)
3643 (send_g_packet, process_g_packet, fetch_registers_using_g)
3644 (store_register_using_P, store_registers_using_G)
3645 (set_remote_traceframe, check_binary_download)
3646 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
3647 (remote_xfer_live_readonly_partial, remote_read_bytes)
3648 (remote_send_printf, remote_flash_write, readchar)
3649 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
3650 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
3651 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
3652 (extended_remote_disable_randomization, extended_remote_run)
3653 (send_environment_packet, extended_remote_environment_support)
3654 (extended_remote_set_inferior_cwd, remote_write_qxfer)
3655 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
3656 (packet_command): Now methods of ...
3657 (remote_target): ... this class.
3658 (m_remote_state) <remote_target>: New field.
3659 (struct remote_state) <stop_reply_queue,
3660 remote_async_inferior_event_token, wait_forever_enabled_p>: New
3662 (remote_state::remote_state): Allocate stop_reply_queue.
3663 (remote_state): Delete global.
3664 (get_remote_state_raw): Delete.
3665 (remote_target::get_remote_state): Allocate m_remote_state on
3667 (get_current_remote_target): New.
3668 (remote_ops, extended_remote_ops): Delete.
3669 (wait_forever_enabled_p, remote_async_inferior_event_token):
3670 Delete, moved to struct remote_state.
3671 (remote_target::close): Delete self. Destruction bits split to
3673 (remote_target::~remote_target): ... this.
3674 (show_memory_packet_size): Adjust to use
3675 get_current_remote_target.
3676 (struct protocol_feature) <func>: Add remote_target parameter.
3677 All callers adjusted.
3678 (curr_quit_handler_target): New.
3679 (remote_serial_quit_handler): Reimplement.
3680 (remote_target::open_1): Adjust to use get_current_remote_target.
3681 Heap-allocate remote_target/extended_remote_target instances.
3682 (vcont_builder::vcont_builder): Add remote_target parameter, and
3683 save it in m_remote. All callers adjusted.
3684 (vcont_builder::m_remote): New field.
3685 (vcont_builder::restart, vcont_builder::flush)
3686 (vcont_builder::push_action): Use it.
3687 (remote_target::commit_resume): Use it.
3688 (struct queue_iter_param) <remote>: New field.
3689 (remote_target::remove_new_fork_children): Fill in 'remote' field.
3690 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
3691 (check_pending_event_prevents_wildcard_vcont_callback)
3692 (remote_target::check_pending_events_prevent_wildcard_vcont)
3693 (remote_target::discard_pending_stop_replies)
3694 (remote_target::discard_pending_stop_replies_in_queue)
3695 (remote_target::remote_notif_remove_queued_reply): Fill in
3697 (remote_notif_get_pending_events): New.
3698 (remote_target::readchar, remote_target::remote_serial_write):
3699 Save/restore curr_quit_handler_target.
3701 (kill_new_fork_children): Fill in 'remote' field.
3702 (packet_command): Use get_current_remote_target, defer to
3703 remote_target method of same name.
3704 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
3705 parameter, and save it in m_remote. All callers adjusted.
3706 (scoped_remote_fd::release): Use m_remote.
3707 (scoped_remote_fd::m_remote): New field.
3708 (remote_file_put, remote_file_get, remote_file_delete): Use
3709 get_current_remote_target, defer to remote_target method of same
3711 (remote_btrace_reset): Add remote_state paremeter. Update all
3713 (remote_async_inferior_event_handler). Pass down 'data'.
3714 (remote_new_objfile): Use get_current_remote_target.
3715 (remote_target::vcont_r_supported): New.
3716 (set_range_stepping): Use get_current_remote_target and
3717 remote_target::vcont_r_supported.
3718 (_initialize_remote): Don't allocate 'remote_state' and
3719 'stop_reply_queue' globals.
3720 * remote.h (struct remote_target): Forward declare.
3721 (getpkt, putpkt, remote_notif_get_pending_events): Add
3722 'remote_target' parameter.
3724 2018-05-22 Pedro Alves <palves@redhat.com>
3726 * remote.c (vcont_builder): Now a class. Make all data members
3728 (vcont_builder) <vcont_builder, restart, flush, push_action>:
3730 (vcont_builder_restart): Rename to ...
3731 (vcont_builder::restart): ... this.
3732 (vcont_builder_flush): Rename to ...
3733 (vcont_builder::flush): ... this.
3734 (vcont_builder_push_action): Rename to ...
3735 (vcont_builder::push_action): ... this.
3736 (remote_target::commit_resume): Adjust.
3738 2018-05-22 Pedro Alves <palves@redhat.com>
3740 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
3741 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
3742 (get_fixed_memory_packet_size): New.
3743 (get_memory_packet_size): Use it.
3744 (set_memory_packet_size): Don't override the config size with
3745 DEFAULT_MAX_MEMORY_PACKET_SIZE.
3746 (show_memory_packet_size): Use get_fixed_memory_packet_size.
3747 Don't refer to get_memory_packet_size if not connected to a remote
3748 target. Show "(default)" if configured size is 0.
3750 2018-05-22 Pedro Alves <palves@redhat.com>
3752 * remote.c (remote_target::mourn_inferior): Move
3753 discard_pending_stop_replies call here from ...
3754 (_initialize_remote): ... here.
3756 2018-05-22 Pedro Alves <palves@redhat.com>
3758 * remote.c (compare_section_command): Remove set_general_process
3761 2018-05-22 Pedro Alves <palves@redhat.com>
3763 * remote.c (struct packet_reg, struct remote_arch_state):
3764 Move higher up in the file.
3765 (remote_state) <m_arch_states>: Store remote_arch_state values
3766 instead of remote_arch_state pointers.
3767 (remote_state::get_remote_arch_state): Adjust.
3769 2018-05-22 Pedro Alves <palves@redhat.com>
3771 * remote.c: Include <unordered_map>.
3772 (remote_state): Now a class.
3773 (remote_state) <get_remote_arch_state>: Declare method.
3774 <get_remote_arch_state>: New field.
3775 (remote_arch_state) <remote_arch_state>: Declare ctor.
3776 <regs>: Now a unique_ptr.
3777 (remote_gdbarch_data_handle): Delete.
3778 (get_remote_arch_state): Delete.
3779 (remote_state::get_remote_arch_state): New.
3780 (get_remote_state): Adjust to call remote_state's
3781 get_remote_arch_state method.
3782 (init_remote_state): Delete, bits factored out to ...
3783 (remote_arch_state::remote_arch_state): ... this new method.
3784 (get_remote_packet_size, get_memory_packet_size)
3785 (process_g_packet, remote_target::fetch_registers)
3786 (remote_target::prepare_to_store, store_registers_using_G)
3787 (remote_target::store_registers, remote_target::get_trace_status):
3788 Adjust to call remote_state's method.
3789 (_initialize_remote): Remove reference to
3790 remote_gdbarch_data_handle.
3792 2018-05-22 Pedro Alves <palves@redhat.com>
3794 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
3795 pread>: New method declarations.
3796 (remote_target::open_1): Adjust.
3797 (readahead_cache_invalidate): Rename to ...
3798 (readahead_cache::invalidate): ... this, and adjust to be a class
3800 (readahead_cache_invalidate_fd): Rename to ...
3801 (readahead_cache::invalidate_fd): ... this, and adjust to be a
3803 (remote_hostio_pwrite): Adjust.
3804 (remote_hostio_pread_from_cache): Rename to ...
3805 (readahead_cache::pread): ... this, and adjust to be a class
3807 (remote_hostio_close): Adjust.
3809 2018-05-22 Pedro Alves <palves@redhat.com>
3811 * remote.c (remote_hostio_close_cleanup): Delete.
3812 (class scoped_remote_fd): New.
3813 (remote_file_put, remote_file_get): Use it.
3815 2018-05-22 Pedro Alves <palves@redhat.com>
3817 (struct vCont_action_support): Use bool and initialize all fields.
3818 (struct readahead_cache): Initialize all fields.
3819 (remote_state): Use bool and initialize all fields.
3820 (remote_state::remote_state, remote_state::~remote_state): New.
3821 (new_remote_state): Delete.
3822 (_initialize_remote): Use new to allocate remote_state.
3824 2018-05-22 Pedro Alves <palves@redhat.com>
3828 * c-exp.y: Include "c-support.h".
3829 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
3830 of tolower. Use c_ident_is_alpha to scan names.
3831 * c-lang.c: Include "c-support.h".
3832 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
3833 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
3834 * c-support.h: New file, with bits factored out from ...
3835 * cp-name-parser.y: ... this file.
3836 Include "c-support.h".
3837 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
3838 c-support.h and renamed.
3839 (symbol_end, yylex): Adjust.
3841 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3843 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
3844 parameter type to CORE_ADDR.
3845 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
3846 parameter type in declaration to CORE_ADDR.
3847 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
3848 target_auxv_search to get AT_HWCAP and use the result to get the
3850 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
3851 to CORE_ADDR. Remove the cast of the return value to unsigned
3852 long. Fix error predicate of target_auxv_search.
3853 (ppc_linux_nat_target::read_description): Change the type of the
3854 hwcap variable to CORE_ADDR.
3856 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3858 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
3859 if the size of fpscr is larger than 32 bits.
3861 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3863 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
3864 (ppc32_linux_vsxregmap): New global.
3865 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
3866 regcache_supply_regset, and regcache_collect_regset.
3867 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
3868 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
3869 (fetch_vsx_register, store_vsx_register): Remove.
3870 (fetch_vsx_registers): Add regno parameter. Get regset using
3871 ppc_linux_vsxregset. Use regset to supply registers.
3872 (store_vsx_registers): Add regno parameter. Get regset using
3873 ppc_linux_vsxregset. Use regset to collect registers.
3874 (fetch_register): Call fetch_vsx_registers instead of
3876 (store_register): Call store_vsx_registers instead of
3878 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
3879 new regno parameter.
3880 (store_ppc_registers): Call store_vsx_registers with -1 for the
3881 new regno parameter.
3882 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
3883 (ppc_collect_vsxregset): Remove.
3885 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3887 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
3889 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
3890 for vector register offset fields.
3891 (ppc64_fbsd_reg_offsets): Likewise.
3892 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3893 to vector register offset fields.
3894 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3895 to vector register offset fields.
3896 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
3897 vector register offset fields.
3898 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
3899 initializers for vector register offset fields.
3900 (rs6000_aix64_reg_offsets): Likewise.
3901 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
3902 (ppc_supply_vrregset): Remove.
3903 (ppc_collect_vrregset): Remove.
3904 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
3905 (ppc_linux_vrregset) : New function.
3906 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
3907 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
3908 (ppc32_linux_vrregset): Remove.
3909 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
3910 and use result instead of ppc32_linux_vrregset.
3911 (ppc32_linux_reg_offsets): Remove initializers for vector register
3913 (ppc64_linux_reg_offsets): Likewise.
3914 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
3915 * ppc-linux-nat.c: Include regset.h.
3916 (gdb_vrregset_t): Adjust comment to account for little-endian
3918 (supply_vrregset, fill_vrregset): Remove.
3919 (fetch_altivec_register, store_altivec_register): Remove.
3920 (fetch_altivec_registers): Add regno parameter. Get regset using
3921 ppc_linux_vrregset. Use regset to supply registers.
3922 (store_altivec_registers): Add regno parameter. Get regset using
3923 ppc_linux_vrregset. Use regset to collect registers.
3924 (fetch_register): Call fetch_altivec_registers instead of
3925 fetch_altivec_register.
3926 (store_register): Call store_altivec_registers instead of
3927 store_altivec_register.
3928 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
3929 the new regno parameter.
3930 (store_ppc_registers): Call store_altivec_registers with -1 for
3931 the new regno parameter.
3933 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3935 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
3936 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
3937 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3938 (gdb_vrregset_t): Change array type size to
3939 PPC_LINUX_SIZEOF_VRREGSET.
3940 (gdb_vsxregset_t): Change array type size to
3941 PPC_LINUX_SIZEOF_VSXREGSET.
3942 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
3943 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
3944 PPC_LINUX_SIZEOF_VSXREGSET.
3946 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3948 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
3949 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
3951 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
3952 ppc_linux_target_wordsize with tid.
3953 (ppc_linux_nat_target::read_description): Call ppc_linux_target
3955 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
3956 (ppc64_64bit_inferior_p): Add static and inline specifiers.
3957 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
3958 tid parameter. Remove static specifier.
3959 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
3960 (ppc_linux_target_wordsize): New declaration.
3962 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3964 * arch/ppc-linux-common.c: New file.
3965 * arch/ppc-linux-common.h: New file.
3966 * arch/ppc-linux-tdesc.h: New file.
3967 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
3968 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
3969 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
3970 arch/ppc-linux-tdesc.h.
3971 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
3972 arch/ppc-linux-tdesc.h.
3973 (ppc_linux_nat_target::read_description): Remove target
3974 description matching code. Fill a ppc_linux_features struct and
3975 call ppc_linux_match_description with it. Move comment about ISA
3976 2.05 to ppc-linux-common.c.
3977 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
3978 arch/ppc-linux-tdesc.h.
3979 (ppc_linux_core_read_description): Remove target description
3980 matching code. Fill a ppc_linux_features struct and call
3981 ppc_linux_match_description with it.
3982 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3983 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3984 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3985 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3986 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3987 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3988 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3989 (tdesc_powerpc_e500l): Remove.
3991 2018-05-22 Joel Brobecker <brobecker@adacore.com>
3993 * ada-lang.c (catch_assert_command): Pass empty string instead
3994 of NULL for excep_string argument.
3996 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3998 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
3999 the width of the requested register exceeds the width of the
4002 2018-05-21 Tom Tromey <tom@tromey.com>
4004 * printcmd.c (output_command): Remove.
4005 (output_command_const): Rename to output_command.
4006 * valprint.h (output_command): Rename from output_command_const.
4007 * tracepoint.c (trace_dump_actions): Call output_command.
4009 2018-05-21 Tom Tromey <tom@tromey.com>
4011 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4012 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4013 * ada-lang.h (create_ada_exception_catchpoint): Update.
4014 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4016 (create_excep_cond_exprs, ~ada_catchpoint)
4017 (should_stop_exception, print_one_exception)
4018 (print_mention_exception, print_recreate_exception): Update.
4019 (ada_get_next_arg): Remove.
4020 (catch_ada_exception_command_split): Use std::string. Change type
4021 of "excep_string", "cond_string".
4022 (catch_ada_exception_command): Update.
4023 (create_ada_exception_catchpoint): Change type of excep_string.
4024 (ada_exception_sal): Remove excep_string parameter.
4025 (~ada_catchpoint): Remove.
4027 2018-05-21 Tom Tromey <tom@tromey.com>
4029 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4032 2018-05-21 Tom Tromey <tom@tromey.com>
4034 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4035 Return unique_xmalloc_ptr.
4036 (print_it_exception): Update.
4038 2018-05-21 Tom Tromey <tom@tromey.com>
4040 * tracepoint.c (trace_dump_actions): Use std::string.
4042 2018-05-21 Tom Tromey <tom@tromey.com>
4044 * symfile.c (reread_symbols): Use std::string for original_name.
4046 2018-05-21 Tom Tromey <tom@tromey.com>
4048 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4049 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4052 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4054 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4056 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4057 * objfiles.c (get_objfile_bfd_data): Allocate
4058 objfile_per_bfd_storage with obstack_new when allocating on
4061 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4063 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4065 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4066 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4067 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4068 (add_pending): Likewise.
4069 (parse_symbol): Likewise.
4070 (parse_partial_symbols): Likewise.
4071 (psymtab_to_symtab_1): Likewise.
4072 (new_psymtab): Likewise.
4073 (elfmdebug_build_psymtabs): Likewise.
4074 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4075 * objfiles.c (get_objfile_bfd_data): Likewise.
4076 (objfile_register_static_link): Likewise.
4077 * psymtab.c (allocate_psymtab): Likewise.
4078 * stabsread.c (read_member_functions): Likewise.
4079 * xcoffread.c (xcoff_end_psymtab): Likewise.
4081 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4083 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4084 compiler supports std::is_trivially_constructible.
4085 * common/poison.h: Include obstack.h.
4086 (IsMallocable): Define to is_trivially_constructible if the
4087 compiler supports it, define to true_type otherwise.
4091 (XOBNEWVEC): Redefine.
4092 * gdb_obstack.h (obstack_zalloc): New.
4093 (OBSTACK_ZALLOC): Redefine.
4094 (obstack_calloc): New.
4095 (OBSTACK_CALLOC): Redefine.
4097 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4098 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4100 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4101 obstack_calloc/obstack_zalloc.
4102 (gdbarch_obstack_zalloc): Remove.
4103 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4105 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4107 * stack.c (backtrace_command_1): Remove useless variable int i.
4109 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4111 * stack.c (print_frame_info): Fix comment.
4113 2018-05-18 Tom Tromey <tom@tromey.com>
4115 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4116 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4117 (~dwarf2_per_objfile): Update
4118 (dwarf2_get_dwz_file): Use new.
4119 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4122 2018-05-18 Tom Tromey <tom@tromey.com>
4124 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4126 * dwarf2read.c (struct dwp_file): Add constructor and
4128 (open_and_init_dwp_file): Return a unique_ptr.
4129 (dwarf2_per_objfile, create_dwp_hash_table)
4130 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4131 (lookup_dwo_unit_in_dwp): Update.
4132 (open_and_init_dwp_file, get_dwp_file): Update.
4134 2018-05-18 Tom Tromey <tom@tromey.com>
4136 * dwarf2read.c (dwarf2_per_objfile): Update.
4137 (struct mapped_index): Add initializers.
4138 (dwarf2_read_index): Use new.
4139 (dw2_symtab_iter_init): Update.
4140 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4143 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4145 * dwarf2read.c (mapped_index) <total_size>: Remove.
4147 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4149 * unittests/format_pieces-selftests.c (test_format_specifier):
4152 2018-05-18 Tom Tromey <tom@tromey.com>
4154 * c-typeprint.c (maybe_print_hole): New function.
4155 (c_print_type_struct_field_offset): Update.
4156 (c_type_print_base_struct_union): Call maybe_print_hole.
4158 2018-05-17 Keith Seitz <keiths@redhat.com>
4160 * breakpoint.c (build_bpstat_chain): New function, moved from
4162 (bpstat_stop_status): Add optional parameter, `stop_chain'.
4163 If no stop chain is passed, call build_bpstat_chain to build it.
4164 * breakpoint.h (build_bpstat_chain): Declare.
4165 (bpstat_stop_status): Move documentation here from breakpoint.c.
4166 * infrun.c (handle_signal_stop): Before eliding inlined frames,
4167 build the stop chain and pass it to skip_inline_frames.
4168 Pass this stop chain to bpstat_stop_status.
4169 * inline-frame.c: Include breakpoint.h.
4170 (stopped_by_user_bp_inline_frame): New function.
4171 (skip_inline_frames): Add parameter `stop_chain'.
4172 Move documention to inline-frame.h.
4173 If non-NULL, use stopped_by_user_bp_inline_frame to determine
4174 whether the frame should be elided.
4175 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4176 Add moved documentation and update for new parameter.
4178 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4181 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4182 unittests/format_pieces-selftests.c.
4183 * common/format.h (format_piece) <operator==>: New.
4184 (format_pieces) <operator[]>: Remove.
4185 * common/format.c (format_pieces::format_pieces): Handle \e.
4186 * unittests/format_pieces-selftests.c: New.
4188 2018-05-17 Tom Tromey <tom@tromey.com>
4191 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4192 (dw2_instantiate_symtab): Add skip_partial parameter.
4193 (dw2_find_last_source_symtab, dw2_map_expand_apply)
4194 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4195 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4196 (dw2_expand_symtabs_matching_one)
4197 (dw2_find_pc_sect_compunit_symtab)
4198 (dw2_debug_names_lookup_symbol)
4199 (dw2_debug_names_expand_symtabs_for_function): Update.
4200 (init_cutu_and_read_dies): Add skip_partial parameter.
4201 (process_psymtab_comp_unit, build_type_psymtabs_1)
4202 (process_skeletonless_type_unit, load_partial_comp_unit)
4203 (psymtab_to_symtab_1): Update.
4204 (load_full_comp_unit): Add skip_partial parameter.
4205 (process_imported_unit_die, dwarf2_read_addr_index)
4206 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4207 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4208 (read_signatured_type): Update.
4210 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4212 * value.c (release_value): Remove unused variable.
4213 (record_latest_value): Likewise.
4214 (access_value_history): Likewise.
4215 (preserve_values): Likewise.
4217 2018-05-17 Tom Tromey <tom@tromey.com>
4219 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4222 2018-05-16 Maciej W. Rozycki <macro@mips.com>
4225 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4226 Also handle registers whose width is not a multiple of
4228 (linux_nat_trad_target::store_register): Likewise.
4230 2018-05-16 Tom Tromey <tom@tromey.com>
4232 * gdbcore.h (core_bfd): Redefine.
4233 * corelow.c (core_target::close): Update.
4234 (core_target_open): Update.
4235 * progspace.h (struct program_space) <cbfd>: Now a
4238 2018-05-16 Tom Tromey <tom@tromey.com>
4241 * symfile-add-flags.h (enum symfile_add_flags)
4242 <SYMFILE_NOT_FILENAME>: New constant.
4243 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
4244 objfile name from BFD.
4245 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4246 * minidebug.c (find_separate_debug_file_in_section): Put
4247 ".gnu_debugdata" into BFD's file name.
4249 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
4251 * regcache.c (regcache_read_ftype, regcache_write_ftype):
4254 2018-05-15 Tamar Christina <tamar.christina@arm.com>
4257 * aarch64-tdep.c (aarch64_analyze_prologue,
4258 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4259 Indicate not interested in errors.
4261 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4263 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4264 Supply the MIPS_ZERO_REGNUM register.
4266 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4268 * mips-tdep.c (mask_address_var): Make variable static.
4270 2018-05-14 Tom Tromey <tom@tromey.com>
4272 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4274 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
4276 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4277 FXSAVE_ADDR for the mxcsr register.
4279 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
4281 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4283 2018-05-11 Pedro Alves <palves@redhat.com>
4285 * corelow.c (core_target) <core_target>: No longer inline.
4286 Initialize m_core_gdbarch, m_core_vec and build the section table
4288 <~core_target>: New.
4289 <core_gdbarch, get_core_register_section>: New methods.
4290 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4291 factored out from ...
4292 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4294 (sniff_core_bfd): Add gdbarch parameter.
4295 (core_close): Delete, merged into ...
4296 (core_target::close): ... here. Delete self.
4297 (core_close_cleanup): Delete.
4298 (core_target_open): Allocate a core_target on the heap. Use a
4299 unique_ptr instead of a cleanup. Bits moved into the core_target
4300 ctor. Adjust to use core_target methods instead of globals.
4301 (get_core_register_section): Rename to ...
4302 (core_target::get_core_register_section): ... this and adjust.
4303 (struct get_core_registers_cb_data): New.
4304 (get_core_registers_cb): Use it. Use bool.
4305 (core_target::fetch_registers, core_target::files_info)
4306 (core_target::xfer_partial, core_target::read_description)
4307 (core_target::pid_to, core_target::thread_name): Adjust to
4308 reference class fields instead of globals.
4309 * target.h (struct target_ops_deleter, target_ops_up): New.
4311 2018-05-11 Pedro Alves <palves@redhat.com>
4313 * corefile.c (core_file_command): Move to corelow.c.
4314 * corelow.c (the_core_target): Delete.
4315 (core_file_command): Moved from corefile.c. Check exec_bfd
4316 instead of the_core_target. Use target_detach instead of calling
4317 into the_core_target directly.
4318 (maybe_say_no_core_file_now): New.
4319 (core_target::detach): Use it.
4320 (_initialize_corelow): Remove references to the_core_target.
4321 * gdbcore.h (the_core_target): Delete.
4323 2018-05-11 Tom Tromey <tromey@redhat.com>
4324 Pedro Alves <palves@redhat.com>
4326 * corefile.c (core_bfd): Remove.
4327 * gdbcore.h (core_bfd): Now a macro.
4328 * progspace.h (struct program_space) <cbfd>: New field.
4330 2018-05-11 Tom Tromey <tom@tromey.com>
4332 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4335 2018-05-10 Tom Tromey <tom@tromey.com>
4337 * configure: Rebuild.
4338 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4340 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4343 * regformats/regdat.sh: Adjust script, following the addition
4344 of the new expedite_regs parameter to init_target_desc.
4346 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
4349 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4350 set_gdbarch_significant_addr_bit.
4351 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4352 set_gdbarch_significant_addr_bit.
4353 * utils.c (address_significant): Update to sign extend addr.
4355 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
4357 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4358 (xtensa_linux_init_abi): Limit tdep->num_regs by
4359 tdep->num_nopriv_regs.
4360 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4361 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4364 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
4366 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4368 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4370 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4371 (I387_MXCSR_INIT_VAL): New constant.
4372 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4373 buffer if it was supplied by the inferior.
4374 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4375 (i387_xsave_get_clear_bv): New function.
4376 (i387_supply_xsave): Only read x87 control registers from the
4377 xsave buffer if the feature is enabled, and the state will have
4378 been written, otherwise, provide a suitable default.
4379 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4380 including x87 control registers. Update control registers if they
4381 have changed from the default value, and mark features as enabled
4383 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4385 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4387 * spu-tdep.c (info_spu_event_command): Fix output formatting.
4389 2018-05-07 Tom Tromey <tom@tromey.com>
4391 * configure: Rebuild.
4392 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4394 2018-05-07 Tom Tromey <tom@tromey.com>
4397 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4398 bit. Use correct value for VDIV.
4400 2018-05-04 Tom Tromey <tom@tromey.com>
4402 * configure: Rebuild.
4403 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4405 2018-05-04 Tom Tromey <tom@tromey.com>
4407 * linux-record.c (record_linux_system_call) <case
4408 RECORD_SYS_RECVFROM>: Add "break".
4410 2018-05-04 Tom Tromey <tom@tromey.com>
4412 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4413 Add missing "break".
4414 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4415 Add missing "break".
4417 2018-05-04 Tom Tromey <tom@tromey.com>
4419 * rs6000-tdep.c (ppc_process_record_op4)
4420 (ppc_process_record_op63): Add fall-through comment.
4422 2018-05-04 Tom Tromey <tom@tromey.com>
4424 * i386-tdep.c (i386_process_record): Add fall-through comment.
4426 2018-05-04 Tom Tromey <tom@tromey.com>
4428 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4431 2018-05-04 Tom Tromey <tom@tromey.com>
4433 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4434 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4435 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4437 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4439 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4442 2018-05-04 Tom Tromey <tom@tromey.com>
4444 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4446 2018-05-04 Tom Tromey <tom@tromey.com>
4448 * s390-tdep.c (s390_process_record): Fix fall-through comments.
4449 * xcoffread.c (scan_xcoff_symtab): Move comment later.
4450 * symfile.c (section_is_mapped): Fix fall-through comment.
4451 * stabsread.c (define_symbol, read_member_functions): Fix
4452 fall-through comment.
4453 * s390-linux-tdep.c (s390_process_record): Fix fall-through
4455 * remote.c (remote_wait_as): Fix fall-through comment.
4456 * p-exp.y (yylex): Fix fall-through comment.
4457 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4459 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4460 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4461 * jv-exp.y (yylex): Fix fall-through comment.
4462 * go-exp.y (lex_one_token): Fix fall-through comment.
4463 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4464 fall-through comment.
4465 * f-exp.y (yylex): Fix fall-through comment.
4466 * dwarf2read.c (process_die): Fix fall-through comments.
4467 * dbxread.c (process_one_symbol): Fix fall-through comment.
4468 * d-exp.y (lex_one_token): Fix fall-through comment.
4469 * cp-name-parser.y (yylex): Fix fall-through comment.
4470 * coffread.c (coff_symtab_read): Fix fall-through comment.
4471 * c-exp.y (lex_one_token): Fix fall-through comment.
4472 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4474 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4477 2018-05-04 Tom Tromey <tom@tromey.com>
4480 * NEWS: Mention gdb.execute change.
4481 * gdbcmd.h (execute_control_command): Don't declare.
4482 * python/python.c (execute_gdb_command): Use read_command_lines_1,
4483 execute_control_commands, execute_control_commands_to_string.
4484 * cli/cli-script.h (execute_control_commands)
4485 (execute_control_commands_to_string): Declare.
4486 (execute_control_command): Add from_tty parameter.
4487 * cli/cli-script.c (execute_control_commands)
4488 (execute_control_commands_to_string): New functions.
4489 (execute_user_command): Use execute_control_commands.
4490 (execute_control_command_1): Add "from_tty" parameter. Update.
4491 (execute_control_command): Likewise.
4493 2018-05-04 Tom Tromey <tom@tromey.com>
4496 * NEWS: Mention that breakpoint commands are writable.
4497 * python/py-breakpoint.c (bppy_set_commands): New function.
4498 (breakpoint_object_getset) <"commands">: Use it.
4500 2018-05-04 Tom Tromey <tom@tromey.com>
4502 * tracepoint.c (actions_command): Update.
4503 * mi/mi-cmd-break.c (mi_command_line_array)
4504 (mi_command_line_array_cnt, mi_command_line_array_ptr)
4505 (mi_read_next_line): Remove.
4506 (mi_cmd_break_commands): Update.
4507 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4509 * cli/cli-script.c (get_command_line): Update.
4510 (process_next_line): Use function_view. Constify.
4511 (recurse_read_control_structure, read_command_lines)
4512 (read_command_lines_1): Change argument types to function_view.
4513 (do_define_command, document_command): Update.
4514 * breakpoint.h (check_tracepoint_command): Don't declare.
4515 * breakpoint.c (check_tracepoint_command): Remove.
4516 (commands_command_1, create_tracepoint_from_upload): Update.
4518 2018-05-04 Tom Tromey <tom@tromey.com>
4521 * cli/cli-script.h (enum command_control_type) <define_control>:
4523 * cli/cli-script.c (multi_line_command_p): Handle define_control.
4524 (build_command_line, execute_control_command_1)
4525 (process_next_line): Likewise.
4526 (do_define_command): New function, extracted from define_command.
4527 (define_command): Use it.
4529 2018-05-04 Tom Tromey <tom@tromey.com>
4531 * tracepoint.c (actions_command): Update.
4532 * cli/cli-script.h (read_command_lines): Update.
4533 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4534 (MAX_TMPBUF): Remove define.
4535 (define_command): Use string_printf.
4536 (document_command): Likewise.
4537 * breakpoint.c (commands_command_1): Update.
4539 2018-05-04 Tom Tromey <tom@tromey.com>
4541 * top.c (execute_command): Update.
4542 * cli/cli-script.h (print_command_lines): Now varargs.
4543 * cli/cli-script.c (print_command_lines): Now varargs.
4544 (execute_control_command_1) <case while_control, case if_control>:
4547 2018-05-04 Tom Tromey <tom@tromey.com>
4549 * tracepoint.c (all_tracepoint_actions): Rename from
4550 all_tracepoint_actions_and_cleanup. Change return type.
4551 (actions_command, encode_actions_1, encode_actions)
4552 (trace_dump_actions, tdump_command): Update.
4553 * remote.c (remote_download_command_source): Update.
4554 * python/python.c (gdbpy_eval_from_control_command)
4555 (python_command, python_interactive_command): Update.
4556 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
4557 * guile/guile.c (guile_command)
4558 (gdbscm_eval_from_control_command, guile_command): Update.
4559 * compile/compile.c (compile_code_command)
4560 (compile_print_command, compile_to_object): Update.
4561 * cli/cli-script.h (struct command_lines_deleter): New.
4562 (counted_command_line): New typedef.
4563 (struct command_line): Add constructor, destructor.
4564 <body_list>: Remove.
4565 <body_list_0, body_list_1>: New members.
4566 (command_line_up): Remove typedef.
4567 (read_command_lines, read_command_lines_1, get_command_line):
4569 (copy_command_lines): Don't declare.
4570 * cli/cli-script.c (build_command_line): Use "new".
4571 (get_command_line): Return counted_command_line.
4572 (print_command_lines, execute_user_command)
4573 (execute_control_command_1, while_command, if_command): Update.
4574 (realloc_body_list): Remove.
4575 (process_next_line, recurse_read_control_structure): Update.
4576 (read_command_lines, read_command_lines_1): Return counted_command_line.
4577 (free_command_lines): Use "delete".
4578 (copy_command_lines): Remove.
4579 (define_command, document_command, show_user_1): Update.
4580 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
4581 a counted_command_line.
4582 * breakpoint.h (counted_command_line): Remove typedef.
4583 (breakpoint_set_commands): Update.
4584 * breakpoint.c (check_no_tracepoint_commands)
4585 (validate_commands_for_breakpoint): Update.
4586 (breakpoint_set_commands): Change commands to be a
4587 counted_command_line.
4588 (commands_command_1, update_dprintf_command_list)
4589 (create_tracepoint_from_upload): Update.
4591 2018-05-04 Tom Tromey <tom@tromey.com>
4593 * cli/cli-decode.h (cmd_list_element): New constructor.
4594 (~cmd_list_element): New destructor.
4595 (struct cmd_list_element): Add initializers.
4596 * cli/cli-decode.c (do_add_cmd): Use "new".
4597 (delete_cmd): Use "delete".
4599 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4600 Pedro Alves <palves@redhat.com>
4602 PR breakpoints/19806 and support for PR external/20207.
4603 * NEWS: Mention Aarch64 watchpoint improvements.
4604 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
4605 watchpoints and PR external/20207 watchpoints.
4606 * nat/aarch64-linux-hw-point.c
4607 (kernel_supports_any_contiguous_range): New.
4608 (aarch64_watchpoint_offset): New.
4609 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
4610 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
4611 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
4612 (aarch64_align_watchpoint): New parameters aligned_offset_p and
4613 next_addr_orig_p. Support PR external/20207 watchpoints.
4614 (aarch64_downgrade_regs): New.
4615 (aarch64_dr_state_insert_one_point): New parameters offset and
4617 (aarch64_dr_state_remove_one_point): Likewise.
4618 (aarch64_handle_breakpoint): Update caller.
4619 (aarch64_handle_aligned_watchpoint): Likewise.
4620 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
4622 (aarch64_linux_set_debug_regs): Remove const from state. Call
4623 aarch64_downgrade_regs.
4624 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
4625 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
4626 (DR_CONTROL_MASK): ... this.
4627 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
4628 (unsigned int aarch64_watchpoint_offset): New prototype.
4629 (aarch64_linux_set_debug_regs): Remove const from state.
4630 * utils.c (align_up, align_down): Move to ...
4631 * common/common-utils.c (align_up, align_down): ... here.
4632 * utils.h (align_up, align_down): Move to ...
4633 * common/common-utils.h (align_up, align_down): ... here.
4635 2018-05-04 Joel Brobecker <brobecker@adacore.com>
4637 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
4638 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
4639 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
4640 Re-implement to match the ABI as summarized in GCC's
4641 gcc/config/sparc/sparc.c. All callers updated.
4642 (sparc32_store_arguments): Remove assertion.
4644 2018-05-04 Tom Tromey <tom@tromey.com>
4646 * printcmd.c: Don't include tui.h.
4647 (decode_format): Use skip_spaces.
4649 2018-05-04 Tom Tromey <tom@tromey.com>
4652 * printcmd.c (last_count): New global.
4653 (x_command): Use saved count when repeating.
4655 2018-05-04 Tom Tromey <tom@tromey.com>
4657 * nto-procfs.c (do_closedir_cleanup): Remove.
4658 (procfs_pidlist): Use gdb_dir_up.
4659 * procfs.c (do_closedir_cleanup): Remove.
4660 (proc_update_threads): Use gdb_dir_up.
4661 * common/filestuff.h (struct gdb_dir_deleter): New.
4662 (gdb_dir_up): New typedef.
4664 2018-05-04 Tom Tromey <tom@tromey.com>
4666 * ada-lang.c (print_mention_exception): Use std::string.
4668 2018-05-04 Tom Tromey <tom@tromey.com>
4670 * ada-lang.c (create_excep_cond_exprs): Update.
4671 (ada_exception_catchpoint_cond_string): Use std::string.
4673 2018-05-04 Tom Tromey <tom@tromey.com>
4675 * ada-lang.c (xget_renaming_scope): Return std::string.
4676 (old_renaming_is_invisible): Update.
4678 2018-05-04 Tom Tromey <tom@tromey.com>
4680 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
4681 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
4683 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
4685 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
4687 2018-05-04 Tom Tromey <tom@tromey.com>
4689 * remote.c (remote_query_supported_append): Change type.
4690 (remote_check_symbols): Update.
4692 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
4695 * configure.ac: Prepend libpython.
4696 * python/python-config.py: Likewise.
4697 * configure: Regenerate.
4699 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
4701 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
4703 2018-05-03 Pedro Alves <palves@redhat.com>
4706 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
4707 override. Write 'true' instead of '1'.
4708 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
4711 2018-05-02 Pedro Alves <palves@redhat.com>
4713 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
4714 add_inf_child_target.
4715 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
4716 add_inf_child_target.
4717 * aix-thread.c (aix_thread_target_info): New.
4718 (aix_thread_target) <shortname, longname, doc>: Delete.
4720 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
4721 add_inf_child_target.
4722 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
4723 add_inf_child_target.
4724 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
4725 add_inf_child_target.
4726 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
4727 add_inf_child_target.
4728 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
4729 add_inf_child_target.
4730 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
4731 add_inf_child_target.
4732 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
4733 add_inf_child_target.
4734 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
4735 add_inf_child_target.
4736 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
4737 add_inf_child_target.
4738 * bfd-target.c (target_bfd_target_info): New.
4739 (target_bfd) <shortname, longname, doc>: Delete.
4741 * bsd-kvm.c (bsd_kvm_target_info): New.
4742 (bsd_kvm_target) <shortname, longname, doc>: Delete.
4744 (bsd_kvm_target::open): Rename to ...
4745 (bsd_kvm_target_open): ... this. Adjust.
4746 * bsd-uthread.c (bsd_uthread_target_info): New.
4747 (bsd_uthread_target) <shortname, longname, doc>: Delete.
4749 * corefile.c (core_file_command): Adjust.
4750 * corelow.c (core_target_info): New.
4751 (core_target) <shortname, longname, doc>: Delete.
4753 (core_target::open): Rename to ...
4754 (core_target_open): ... this. Adjust.
4755 * ctf.c (ctf_target_info): New.
4756 (ctf_target) <shortname, longname, doc>: Delete.
4758 (ctf_target::open): Rename to ...
4759 (ctf_target_open): ... this.
4760 (_initialize_ctf): Adjust.
4761 * exec.c (exec_target_info): New.
4762 (exec_target) <shortname, longname, doc>: Delete.
4764 (exec_target::open): Rename to ...
4765 (exec_target_open): ... this.
4766 * gdbcore.h (core_target_open): Declare.
4767 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
4768 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
4769 add_inf_child_target.
4770 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
4771 add_inf_child_target.
4772 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
4773 add_inf_child_target.
4774 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
4775 add_inf_child_target.
4776 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
4777 add_inf_child_target.
4778 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
4779 add_inf_child_target.
4780 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
4781 add_inf_child_target.
4782 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
4783 add_inf_child_target.
4784 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
4785 add_inf_child_target.
4786 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
4787 add_inf_child_target.
4788 * inf-child.c (inf_child_target_info): New.
4789 (inf_child_target::info): New.
4790 (inf_child_open_target): Remove 'target' parameter. Use
4791 get_native_target instead.
4792 (inf_child_target::open): Delete.
4793 (add_inf_child_target): New.
4794 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
4797 (add_inf_child_target): Declare.
4798 (inf_child_open_target): Declare.
4799 * linux-thread-db.c (thread_db_target_info): New.
4800 (thread_db_target) <shortname, longname, doc>: Delete.
4802 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
4803 add_inf_child_target.
4804 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
4805 add_inf_child_target.
4806 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
4807 add_inf_child_target.
4808 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
4809 add_inf_child_target.
4810 * make-target-delegates (print_class): Adjust.
4811 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
4812 add_inf_child_target.
4813 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
4814 add_inf_child_target.
4815 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
4816 add_inf_child_target.
4817 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
4818 add_inf_child_target.
4819 * nto-procfs.c (nto_native_target_info): New.
4820 (nto_procfs_target_native) <shortname, longname, doc>:
4823 (nto_procfs_target_info): New.
4824 (nto_procfs_target_procfs) <shortname, longname, doc>:
4827 (init_procfs_targets): Adjust.
4828 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
4829 add_inf_child_target.
4830 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
4831 add_inf_child_target.
4832 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
4833 add_inf_child_target.
4834 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
4835 add_inf_child_target.
4836 * ravenscar-thread.c (ravenscar_target_info): New.
4837 (ravenscar_thread_target) <shortname, longname, doc>:
4840 * record-btrace.c (record_btrace_target_info):
4841 (record_btrace_target) <shortname, longname, doc>: Delete.
4843 (record_btrace_target::open): Rename to ...
4844 (record_btrace_target_open): ... this. Adjust.
4845 * record-full.c (record_longname, record_doc): New.
4846 (record_full_base_target) <shortname, longname, doc>: Delete.
4848 (record_full_target_info): New.
4849 (record_full_target): <shortname>: Delete.
4851 (record_full_core_open_1, record_full_open_1): Update comments.
4852 (record_full_base_target::open): Rename to ...
4853 (record_full_open): ... this.
4854 (cmd_record_full_restore): Update.
4855 (_initialize_record_full): Update.
4856 * remote-sim.c (remote_sim_target_info): New.
4857 (gdbsim_target) <shortname, longname, doc>: Delete.
4859 (gdbsim_target::open): Rename to ...
4860 (gdbsim_target_open): ... this.
4861 (_initialize_remote_sim): Adjust.
4862 * remote.c (remote_doc): New.
4863 (remote_target_info): New.
4864 (remote_target) <shortname, longname, doc>: Delete.
4866 (extended_remote_target_info): New.
4867 (extended_remote_target) <shortname, longname, doc>: Delete.
4869 (remote_target::open_1): Make static. Adjust.
4870 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
4871 * s390-linux-nat.c (_initialize_s390_nat): Use
4872 add_inf_child_target.
4873 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
4874 add_inf_child_target.
4875 * sol-thread.c (thread_db_target_info): New.
4876 (sol_thread_target) <shortname, longname, doc>: Delete.
4878 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
4879 add_inf_child_target.
4880 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
4881 add_inf_child_target.
4882 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
4883 add_inf_child_target.
4884 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
4885 add_inf_child_target.
4886 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
4887 add_inf_child_target.
4888 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
4889 add_inf_child_target.
4890 * spu-linux-nat.c (_initialize_spu_nat): Use
4891 add_inf_child_target.
4892 * spu-multiarch.c (spu_multiarch_target_info): New.
4893 (spu_multiarch_target) <shortname, longname, doc>: Delete.
4895 * target-delegates.c: Regenerate.
4896 * target.c: Include <unordered_map>.
4897 (target_ops_p): Delete.
4898 (DEF_VEC_P(target_ops_p)): Delete.
4899 (target_factories): New.
4900 (test_target_info): New.
4901 (test_target_ops::info): New.
4902 (open_target): Adjust to use target_factories.
4903 (add_target_with_completer): Rename to ...
4904 (add_target): ... this. Change prototype. Register target_info
4905 and open callback in target_factories. Register target_info in
4906 command context instead of target_ops.
4907 (add_target): Delete old implementation.
4908 (add_deprecated_target_alias): Change prototype. Adjust.
4909 (the_native_target): New.
4910 (set_native_target, get_native_target): New.
4911 (find_default_run_target): Use the_native_target.
4912 (find_attach_target, find_run_target): Simplify.
4913 (target_ops::open): Delete.
4914 (dummy_target_info): New.
4915 (dummy_target::shortname, dummy_target::longname)
4916 (dummy_target::doc): Delete.
4917 (dummy_target::info): New.
4918 (debug_target::shortname, debug_target::longname)
4919 (debug_target::doc): Delete.
4920 (debug_target::info): New.
4921 * target.h (struct target_info): New.
4922 (target_ops::~target_ops): Add comment.
4923 (target_ops::info): New.
4924 (target_ops::shortname, target_ops::longname, target_ops::doc): No
4925 longer virtual. Implement in terms of target_info.
4926 (set_native_target, get_native_target): Declare.
4927 (target_open_ftype): New.
4928 (add_target, add_target_with_completer)
4929 (add_deprecated_target_alias): Change prototype.
4930 (test_target) <shortname, longname, doc>: Delete.
4932 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
4933 add_inf_child_target.
4934 * tracefile-tfile.c (tfile_target_info): New.
4935 (tfile_target) <shortname, longname, doc>: Delete.
4937 (tfile_target::open): Rename to ...
4938 (tfile_target_open): ... this.
4939 (_initialize_tracefile_tfile): Adjust.
4940 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
4941 add_inf_child_target.
4942 * windows-nat.c (_initialize_windows_nat): Use
4943 add_inf_child_target.
4944 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
4945 add_inf_child_target.
4947 2018-05-02 Pedro Alves <palves@redhat.com>
4949 * linux-nat.h (linux_nat_target) <low_new_thread,
4950 low_delete_thread, low_new_fork, low_forget_process,
4951 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
4952 New virtual methods.
4953 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4954 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
4955 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
4956 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4957 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
4959 * linux-fork.c (delete_fork): Adjust to call low method.
4960 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
4961 (linux_nat_new_fork, linux_nat_forget_process_hook)
4962 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
4963 (linux_nat_status_is_event):
4964 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
4965 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
4967 (sigtrap_is_event): Rename to ...
4968 (linux_nat_target::low_status_is_event): ... this.
4969 (linux_nat_set_status_is_event): Delete.
4970 (save_stop_reason, linux_nat_wait_1)
4971 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
4973 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4974 (linux_nat_set_new_fork, linux_nat_set_forget_process)
4975 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4976 (linux_nat_set_prepare_to_resume): Delete.
4977 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
4978 low virtual methods.
4979 * amd64-linux-nat.c: Likewise.
4980 * arm-linux-nat.c: Likewise.
4981 * i386-linux-nat.c: Likewise.
4982 * ia64-linux-nat.c: Likewise.
4983 * mips-linux-nat.c: Likewise.
4984 * ppc-linux-nat.c: Likewise.
4985 * s390-linux-nat.c: Likewise.
4986 * sparc64-linux-nat.c: Likewise.
4987 * x86-linux-nat.c: Likewise.
4988 * x86-linux-nat.h: Include "nat/x86-linux.h".
4989 (x86_linux_nat_target) <low_new_fork, low_forget_process,
4990 low_prepare_to_resume, low_new_thread, low_delete_thread>:
4993 2018-05-02 Pedro Alves <palves@redhat.com>
4995 * target.h (target_ops)
4996 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4997 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
4998 stopped_by_watchpoint, have_continuable_watchpoint,
4999 stopped_data_address, watchpoint_addr_within_range,
5000 can_accel_watchpoint_condition, can_run, thread_alive,
5001 has_all_memory, has_memory, has_stack, has_registers,
5002 has_execution, can_async_p, is_async_p, supports_non_stop,
5003 always_non_stop_p, can_execute_reverse, supports_multi_process,
5004 supports_enable_disable_tracepoint,
5005 supports_disable_randomization, supports_string_tracing,
5006 supports_evaluation_of_breakpoint_conditions,
5007 can_run_breakpoint_commands, filesystem_is_local,
5008 can_download_tracepoint, get_trace_state_variable_value,
5009 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5010 record_is_replaying, record_will_replay,
5011 augmented_libraries_svr4_read>: Adjust to return bool.
5012 * aarch64-linux-nat.c: All implementations adjusted.
5013 * aix-thread.c: All implementations adjusted.
5014 * arm-linux-nat.c: All implementations adjusted.
5015 * breakpoint.c: All implementations adjusted.
5016 * bsd-kvm.c: All implementations adjusted.
5017 * bsd-uthread.c: All implementations adjusted.
5018 * corelow.c: All implementations adjusted.
5019 * ctf.c: All implementations adjusted.
5020 * darwin-nat.c: All implementations adjusted.
5021 * darwin-nat.h: All implementations adjusted.
5022 * exec.c: All implementations adjusted.
5023 * fbsd-nat.c: All implementations adjusted.
5024 * fbsd-nat.h: All implementations adjusted.
5025 * gnu-nat.c: All implementations adjusted.
5026 * gnu-nat.h: All implementations adjusted.
5027 * go32-nat.c: All implementations adjusted.
5028 * ia64-linux-nat.c: All implementations adjusted.
5029 * inf-child.c: All implementations adjusted.
5030 * inf-child.h: All implementations adjusted.
5031 * inf-ptrace.c: All implementations adjusted.
5032 * inf-ptrace.h: All implementations adjusted.
5033 * linux-nat.c: All implementations adjusted.
5034 * linux-nat.h: All implementations adjusted.
5035 * mips-linux-nat.c: All implementations adjusted.
5036 * nto-procfs.c: All implementations adjusted.
5037 * ppc-linux-nat.c: All implementations adjusted.
5038 * procfs.c: All implementations adjusted.
5039 * ravenscar-thread.c: All implementations adjusted.
5040 * record-btrace.c: All implementations adjusted.
5041 * record-full.c: All implementations adjusted.
5042 * remote-sim.c: All implementations adjusted.
5043 * remote.c: All implementations adjusted.
5044 * s390-linux-nat.c: All implementations adjusted.
5045 * sol-thread.c: All implementations adjusted.
5046 * spu-multiarch.c: All implementations adjusted.
5047 * target-delegates.c: All implementations adjusted.
5048 * target.c: All implementations adjusted.
5049 * target.h: All implementations adjusted.
5050 * tracefile-tfile.c: All implementations adjusted.
5051 * tracefile.c: All implementations adjusted.
5052 * tracefile.h: All implementations adjusted.
5053 * windows-nat.c: All implementations adjusted.
5054 * x86-linux-nat.h: All implementations adjusted.
5055 * x86-nat.h: All implementations adjusted.
5057 2018-05-02 Pedro Alves <palves@redhat.com>
5059 * make-target-delegates (scan_target_h): Don't trim lines here.
5060 Replace sequences of tabs and/or whitespace with a single
5062 (top level, parsing methods): Trim each line before processing it
5065 2018-05-02 Pedro Alves <palves@redhat.com>
5066 John Baldwin <jhb@freebsd.org>
5068 * target.h (enum strata) <debug_stratum>: New.
5069 (struct target_ops) <all delegation methods>: Replace by C++
5070 virtual methods, and drop "to_" prefix. All references updated
5072 <to_shortname, to_longname, to_doc, to_data,
5073 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5074 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5075 virtual methods. All references updated throughout.
5076 <can_attach, supports_terminal_ours, can_create_inferior,
5077 get_thread_control_capabilities, attach_no_wait>: New
5079 <insert_breakpoint, remove_breakpoint>: Now
5080 TARGET_DEFAULT_NORETURN methods.
5081 <info_proc>: Now returns bool.
5083 (OPS_MAGIC): Delete.
5084 (current_target): Delete. All references replaced by references
5086 (target_stack): ... this. New.
5087 (target_shortname, target_longname): Adjust.
5088 (target_can_run): Now a function declaration.
5089 (default_child_has_all_memory, default_child_has_memory)
5090 (default_child_has_stack, default_child_has_registers)
5091 (default_child_has_execution): Remove target_ops parameter.
5092 (complete_target_initialization): Delete.
5093 (memory_breakpoint_target): New template class.
5094 (test_target_ops): Refactor as a C++ class with virtual methods.
5095 * make-target-delegates (NAME_PART): Tighten.
5096 (POINTER_PART, CP_SYMBOL): New.
5097 (SIMPLE_RETURN_PART): Reimplement.
5098 (VEC_RETURN_PART): Expect less.
5099 (RETURN_PART, VIRTUAL_PART): New.
5100 (METHOD): Adjust to C++ virtual methods.
5101 (scan_target_h): Remove reference to C99.
5102 (dname): Output "target_ops::" prefix.
5103 (write_function_header): Adjust to output a C++ class method.
5104 (write_declaration): New.
5105 (write_delegator): Adjust to output a C++ class method.
5106 (tdname): Output "dummy_target::" prefix.
5107 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5109 (tdefault_names, debug_names): Delete.
5110 (return_types, tdefaults, styles, argtypes_array): New.
5111 (top level): All methods are delegators.
5113 (top level): Print dummy_target and debug_target classes.
5114 * target-delegates.c: Regenerate.
5115 * target-debug.h (target_debug_print_enum_info_proc_what)
5116 (target_debug_print_thread_control_capabilities)
5117 (target_debug_print_thread_info_p): New.
5118 * target.c (dummy_target): Delete.
5119 (the_dummy_target, the_debug_target): New.
5120 (target_stack): Now extern.
5121 (set_targetdebug): Push/unpush debug target.
5122 (default_child_has_all_memory, default_child_has_memory)
5123 (default_child_has_stack, default_child_has_registers)
5124 (default_child_has_execution): Remove target_ops parameter.
5125 (complete_target_initialization): Delete.
5126 (add_target_with_completer): No longer call
5127 complete_target_initialization.
5128 (target_supports_terminal_ours): Use regular delegation.
5129 (update_current_target): Delete.
5130 (push_target): No longer check magic number. Don't call
5131 update_current_target.
5132 (unpush_target): Don't call update_current_target.
5133 (target_is_pushed): No longer check magic number.
5134 (target_require_runnable): Skip for all stratums over
5136 (target_ops::info_proc): New.
5137 (target_info_proc): Use find_target_at and
5138 find_default_run_target.
5139 (target_supports_disable_randomization): Use regular delegation.
5140 (target_get_osdata): Use find_target_at.
5141 (target_ops::open, target_ops::close, target_ops::can_attach)
5142 (target_ops::attach, target_ops::can_create_inferior)
5143 (target_ops::create_inferior, target_ops::can_run)
5144 (target_can_run): New.
5145 (default_fileio_target): Use regular delegation.
5146 (target_ops::fileio_open, target_ops::fileio_pwrite)
5147 (target_ops::fileio_pread, target_ops::fileio_fstat)
5148 (target_ops::fileio_close, target_ops::fileio_unlink)
5149 (target_ops::fileio_readlink): New.
5150 (target_fileio_open_1, target_fileio_unlink)
5151 (target_fileio_readlink): Always call the target method. Handle
5153 (return_zero, return_zero_has_execution): Delete.
5154 (init_dummy_target): Delete.
5155 (dummy_target::dummy_target, dummy_target::shortname)
5156 (dummy_target::longname, dummy_target::doc)
5157 (debug_target::debug_target, debug_target::shortname)
5158 (debug_target::longname, debug_target::doc): New.
5159 (target_supports_delete_record): Use regular delegation.
5160 (setup_target_debug): Delete.
5161 (maintenance_print_target_stack): Skip debug_stratum.
5162 (initialize_targets): Instantiate the_dummy_target and
5164 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
5166 (target_auxv_search, fprint_target_auxv): Adjust.
5167 (info_auxv_command): Adjust to use target_stack.
5168 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5169 * exceptions.c (print_flush): Handle a NULL target_stack.
5170 * regcache.c (target_ops_no_register): Refactor as class with
5173 * exec.c (exec_target): New class.
5174 (exec_ops): Now an exec_target.
5175 (exec_open, exec_close_1, exec_get_section_table)
5176 (exec_xfer_partial, exec_files_info, exec_has_memory)
5177 (exec_make_note_section): Refactor as exec_target methods.
5178 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5180 (exec_target::find_memory_regions): New.
5181 (_initialize_exec): Don't call init_exec_ops.
5182 * gdbcore.h (exec_file_clear): Delete.
5184 * corefile.c (core_target): Delete.
5185 (core_file_command): Adjust.
5186 * corelow.c (core_target): New class.
5187 (the_core_target): New.
5188 (core_close): Remove target_ops parameter.
5189 (core_close_cleanup): Adjust.
5190 (core_target::close): New.
5191 (core_open, core_detach, get_core_registers, core_files_info)
5192 (core_xfer_partial, core_thread_alive, core_read_description)
5193 (core_pid_to_str, core_thread_name, core_has_memory)
5194 (core_has_stack, core_has_registers, core_info_proc): Rework as
5195 core_target methods.
5196 (ignore, core_remove_breakpoint, init_core_ops): Delete.
5197 (_initialize_corelow): Initialize the_core_target.
5198 * gdbcore.h (core_target): Delete.
5199 (the_core_target): New.
5201 * ctf.c: (ctf_target): New class.
5202 (ctf_ops): Now a ctf_target.
5203 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5204 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5205 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5207 (init_ctf_ops): Delete.
5208 (_initialize_ctf): Don't call it.
5209 * tracefile-tfile.c (tfile_target): New class.
5210 (tfile_ops): Now a tfile_target.
5211 (tfile_open, tfile_close, tfile_files_info)
5212 (tfile_get_tracepoint_status, tfile_trace_find)
5213 (tfile_fetch_registers, tfile_xfer_partial)
5214 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5215 Refactor as tfile_target methods.
5216 (tfile_xfer_partial_features): Remove target_ops parameter.
5217 (init_tfile_ops): Delete.
5218 (_initialize_tracefile_tfile): Don't call it.
5219 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5220 (tracefile_has_stack, tracefile_has_registers)
5221 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5222 tracefile_target methods.
5223 (init_tracefile_ops): Delete.
5224 (tracefile_target::tracefile_target): New.
5225 * tracefile.h: Include "target.h".
5226 (tracefile_target): New class.
5227 (init_tracefile_ops): Delete.
5229 * spu-multiarch.c (spu_multiarch_target): New class.
5230 (spu_ops): Now a spu_multiarch_target.
5231 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5232 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5233 (spu_search_memory, spu_mourn_inferior): Refactor as
5234 spu_multiarch_target methods.
5235 (init_spu_ops): Delete.
5236 (_initialize_spu_multiarch): Remove references to init_spu_ops,
5237 complete_target_initialization.
5239 * ravenscar-thread.c (ravenscar_thread_target): New class.
5240 (ravenscar_ops): Now a ravenscar_thread_target.
5241 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5242 (ravenscar_thread_alive, ravenscar_pid_to_str)
5243 (ravenscar_fetch_registers, ravenscar_store_registers)
5244 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5245 (ravenscar_stopped_by_hw_breakpoint)
5246 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5247 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5248 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5250 (init_ravenscar_thread_ops): Delete.
5251 (_initialize_ravenscar): Remove references to
5252 init_ravenscar_thread_ops and complete_target_initialization.
5254 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5255 (bsd_uthread_target): New class.
5256 (bsd_uthread_ops): Now a bsd_uthread_target.
5257 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5258 (bsd_uthread_close, bsd_uthread_mourn_inferior)
5259 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5260 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5261 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5262 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5263 (bsd_uthread_target): Delete function.
5264 (_initialize_bsd_uthread): Remove reference to
5265 complete_target_initialization.
5267 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
5268 (target_bfd): ... this new class.
5269 (target_bfd_xfer_partial, target_bfd_get_section_table)
5270 (target_bfd_close): Refactor as target_bfd methods.
5271 (target_bfd::~target_bfd): New.
5272 (target_bfd_reopen): Adjust.
5273 (target_bfd::close): New.
5275 * record-btrace.c (record_btrace_target): New class.
5276 (record_btrace_ops): Now a record_btrace_target.
5277 (record_btrace_open, record_btrace_stop_recording)
5278 (record_btrace_disconnect, record_btrace_close)
5279 (record_btrace_async, record_btrace_info)
5280 (record_btrace_insn_history, record_btrace_insn_history_range)
5281 (record_btrace_insn_history_from, record_btrace_call_history)
5282 (record_btrace_call_history_range)
5283 (record_btrace_call_history_from, record_btrace_record_method)
5284 (record_btrace_is_replaying, record_btrace_will_replay)
5285 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5286 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5287 (record_btrace_store_registers, record_btrace_prepare_to_store)
5288 (record_btrace_to_get_unwinder)
5289 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5290 (record_btrace_commit_resume, record_btrace_wait)
5291 (record_btrace_stop, record_btrace_can_execute_reverse)
5292 (record_btrace_stopped_by_sw_breakpoint)
5293 (record_btrace_supports_stopped_by_sw_breakpoint)
5294 (record_btrace_stopped_by_hw_breakpoint)
5295 (record_btrace_supports_stopped_by_hw_breakpoint)
5296 (record_btrace_update_thread_list, record_btrace_thread_alive)
5297 (record_btrace_goto_begin, record_btrace_goto_end)
5298 (record_btrace_goto, record_btrace_stop_replaying_all)
5299 (record_btrace_execution_direction)
5300 (record_btrace_prepare_to_generate_core)
5301 (record_btrace_done_generating_core): Refactor as
5302 record_btrace_target methods.
5303 (init_record_btrace_ops): Delete.
5304 (_initialize_record_btrace): Remove reference to
5305 init_record_btrace_ops.
5306 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5307 the execution_direction global.
5308 (record_full_base_target, record_full_target)
5309 (record_full_core_target): New classes.
5310 (record_full_ops): Now a record_full_target.
5311 (record_full_core_ops): Now a record_full_core_target.
5312 (record_full_target::detach, record_full_target::disconnect)
5313 (record_full_core_target::disconnect)
5314 (record_full_target::mourn_inferior, record_full_target::kill):
5316 (record_full_open, record_full_close, record_full_async): Refactor
5317 as methods of the record_full_base_target class.
5318 (record_full_resume, record_full_commit_resume): Refactor
5319 as methods of the record_full_target class.
5320 (record_full_wait, record_full_stopped_by_watchpoint)
5321 (record_full_stopped_data_address)
5322 (record_full_stopped_by_sw_breakpoint)
5323 (record_full_supports_stopped_by_sw_breakpoint)
5324 (record_full_stopped_by_hw_breakpoint)
5325 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5326 methods of the record_full_base_target class.
5327 (record_full_store_registers, record_full_xfer_partial)
5328 (record_full_insert_breakpoint, record_full_remove_breakpoint):
5329 Refactor as methods of the record_full_target class.
5330 (record_full_can_execute_reverse, record_full_get_bookmark)
5331 (record_full_goto_bookmark, record_full_execution_direction)
5332 (record_full_record_method, record_full_info, record_full_delete)
5333 (record_full_is_replaying, record_full_will_replay)
5334 (record_full_goto_begin, record_full_goto_end, record_full_goto)
5335 (record_full_stop_replaying): Refactor as methods of the
5336 record_full_base_target class.
5337 (record_full_core_resume, record_full_core_kill)
5338 (record_full_core_fetch_registers)
5339 (record_full_core_prepare_to_store)
5340 (record_full_core_store_registers, record_full_core_xfer_partial)
5341 (record_full_core_insert_breakpoint)
5342 (record_full_core_remove_breakpoint)
5343 (record_full_core_has_execution): Refactor
5344 as methods of the record_full_core_target class.
5345 (record_full_base_target::supports_delete_record): New.
5346 (init_record_full_ops): Delete.
5347 (init_record_full_core_ops): Delete.
5348 (record_full_save): Refactor as method of the
5349 record_full_base_target class.
5350 (_initialize_record_full): Remove references to
5351 init_record_full_ops and init_record_full_core_ops.
5353 * remote.c (remote_target, extended_remote_target): New classes.
5354 (remote_ops): Now a remote_target.
5355 (extended_remote_ops): Now an extended_remote_target.
5356 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5357 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5358 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5359 (remote_pass_signals, remote_set_syscall_catchpoint)
5360 (remote_program_signals, )
5361 (remote_thread_always_alive): Remove target_ops parameter.
5362 (remote_thread_alive, remote_thread_name)
5363 (remote_update_thread_list, remote_threads_extra_info)
5364 (remote_static_tracepoint_marker_at)
5365 (remote_static_tracepoint_markers_by_strid)
5366 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5367 (remote_open): Refactor as methods of remote_target.
5368 (extended_remote_open, extended_remote_detach)
5369 (extended_remote_attach, extended_remote_post_attach):
5370 (extended_remote_supports_disable_randomization)
5371 (extended_remote_create_inferior): : Refactor as method of
5372 extended_remote_target.
5373 (remote_set_permissions, remote_open_1, remote_detach)
5374 (remote_follow_fork, remote_follow_exec, remote_disconnect)
5375 (remote_resume, remote_commit_resume, remote_stop)
5376 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5377 (remote_terminal_ours, remote_wait, remote_fetch_registers)
5378 (remote_prepare_to_store, remote_store_registers)
5379 (remote_flash_erase, remote_flash_done, remote_files_info)
5380 (remote_kill, remote_mourn, remote_insert_breakpoint)
5381 (remote_remove_breakpoint, remote_insert_watchpoint)
5382 (remote_watchpoint_addr_within_range)
5383 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5384 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5385 (remote_supports_stopped_by_sw_breakpoint)
5386 (remote_stopped_by_hw_breakpoint)
5387 (remote_supports_stopped_by_hw_breakpoint)
5388 (remote_stopped_by_watchpoint, remote_stopped_data_address)
5389 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5390 (remote_verify_memory): Refactor as methods of remote_target.
5391 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5393 (remote_xfer_partial, remote_get_memory_xfer_limit)
5394 (remote_search_memory, remote_rcmd, remote_memory_map)
5395 (remote_pid_to_str, remote_get_thread_local_address)
5396 (remote_get_tib_address, remote_read_description): Refactor as
5397 methods of remote_target.
5398 (remote_target::fileio_open, remote_target::fileio_pwrite)
5399 (remote_target::fileio_pread, remote_target::fileio_close): New.
5400 (remote_hostio_readlink, remote_hostio_fstat)
5401 (remote_filesystem_is_local, remote_can_execute_reverse)
5402 (remote_supports_non_stop, remote_supports_disable_randomization)
5403 (remote_supports_multi_process, remote_supports_cond_breakpoints)
5404 (remote_supports_enable_disable_tracepoint)
5405 (remote_supports_string_tracing)
5406 (remote_can_run_breakpoint_commands, remote_trace_init)
5407 (remote_download_tracepoint, remote_can_download_tracepoint)
5408 (remote_download_trace_state_variable, remote_enable_tracepoint)
5409 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5410 (remote_trace_start, remote_get_trace_status)
5411 (remote_get_tracepoint_status, remote_trace_stop)
5412 (remote_trace_find, remote_get_trace_state_variable_value)
5413 (remote_save_trace_data, remote_get_raw_trace_data)
5414 (remote_set_disconnected_tracing, remote_core_of_thread)
5415 (remote_set_circular_trace_buffer, remote_traceframe_info)
5416 (remote_get_min_fast_tracepoint_insn_len)
5417 (remote_set_trace_buffer_size, remote_set_trace_notes)
5418 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5419 (remote_disable_btrace, remote_teardown_btrace)
5420 (remote_read_btrace, remote_btrace_conf)
5421 (remote_augmented_libraries_svr4_read, remote_load)
5422 (remote_pid_to_exec_file, remote_can_do_single_step)
5423 (remote_execution_direction, remote_thread_handle_to_thread_info):
5424 Refactor as methods of remote_target.
5425 (init_remote_ops, init_extended_remote_ops): Delete.
5426 (remote_can_async_p, remote_is_async_p, remote_async)
5427 (remote_thread_events, remote_upload_tracepoints)
5428 (remote_upload_trace_state_variables): Refactor as methods of
5430 (_initialize_remote): Remove references to init_remote_ops and
5431 init_extended_remote_ops.
5433 * remote-sim.c (gdbsim_target): New class.
5434 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5435 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5436 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5437 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5438 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5439 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5440 Refactor as methods of gdbsim_target.
5441 (gdbsim_ops): Now a gdbsim_target.
5442 (init_gdbsim_ops): Delete.
5443 (gdbsim_cntrl_c): Adjust.
5444 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5446 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5447 (the_amd64_linux_nat_target): New.
5448 (amd64_linux_fetch_inferior_registers)
5449 (amd64_linux_store_inferior_registers): Refactor as methods of
5450 amd64_linux_nat_target.
5451 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
5452 * i386-linux-nat.c: Don't include "linux-nat.h".
5453 (i386_linux_nat_target): New class.
5454 (the_i386_linux_nat_target): New.
5455 (i386_linux_fetch_inferior_registers)
5456 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5457 as methods of i386_linux_nat_target.
5458 (_initialize_i386_linux_nat): Adjust. Set linux_target.
5459 * inf-child.c (inf_child_ops): Delete.
5460 (inf_child_fetch_inferior_registers)
5461 (inf_child_store_inferior_registers): Delete.
5462 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5463 methods of inf_child_target.
5464 (inf_child_target::supports_terminal_ours)
5465 (inf_child_target::terminal_init)
5466 (inf_child_target::terminal_inferior)
5467 (inf_child_target::terminal_ours_for_output)
5468 (inf_child_target::terminal_ours, inf_child_target::interrupt)
5469 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5471 (inf_child_open, inf_child_disconnect, inf_child_close)
5472 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5473 (inf_child_post_startup_inferior, inf_child_can_run)
5474 (inf_child_pid_to_exec_file): Refactor as methods of
5476 (inf_child_follow_fork): Delete.
5477 (inf_child_target::can_create_inferior)
5478 (inf_child_target::can_attach): New.
5479 (inf_child_target::has_all_memory, inf_child_target::has_memory)
5480 (inf_child_target::has_stack, inf_child_target::has_registers)
5481 (inf_child_target::has_execution): New.
5482 (inf_child_fileio_open, inf_child_fileio_pwrite)
5483 (inf_child_fileio_pread, inf_child_fileio_fstat)
5484 (inf_child_fileio_close, inf_child_fileio_unlink)
5485 (inf_child_fileio_readlink, inf_child_use_agent)
5486 (inf_child_can_use_agent): Refactor as methods of
5488 (return_zero, inf_child_target): Delete.
5489 (inf_child_target::inf_child_target): New.
5490 * inf-child.h: Include "target.h".
5491 (inf_child_target): Delete function prototype.
5492 (inf_child_target): New class.
5493 (inf_child_open_target, inf_child_mourn_inferior)
5494 (inf_child_maybe_unpush_target): Delete.
5495 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5496 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5497 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5498 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5499 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5500 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5501 (inf_ptrace_wait, inf_ptrace_xfer_partial)
5502 (inf_ptrace_thread_alive, inf_ptrace_files_info)
5503 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5504 methods of inf_ptrace_target.
5505 (inf_ptrace_target): Delete function.
5506 * inf-ptrace.h: Include "inf-child.h".
5507 (inf_ptrace_target): Delete function declaration.
5508 (inf_ptrace_target): New class.
5509 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5510 * linux-nat.c (linux_target): New.
5511 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5512 (linux_nat_target::~linux_nat_target): New.
5513 (linux_child_post_attach, linux_child_post_startup_inferior)
5514 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5515 (linux_child_remove_fork_catchpoint)
5516 (linux_child_insert_vfork_catchpoint)
5517 (linux_child_remove_vfork_catchpoint)
5518 (linux_child_insert_exec_catchpoint)
5519 (linux_child_remove_exec_catchpoint)
5520 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5521 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5522 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5523 (linux_nat_stopped_data_address)
5524 (linux_nat_stopped_by_sw_breakpoint)
5525 (linux_nat_supports_stopped_by_sw_breakpoint)
5526 (linux_nat_stopped_by_hw_breakpoint)
5527 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5528 (linux_nat_kill, linux_nat_mourn_inferior)
5529 (linux_nat_xfer_partial, linux_nat_thread_alive)
5530 (linux_nat_update_thread_list, linux_nat_pid_to_str)
5531 (linux_nat_thread_name, linux_child_pid_to_exec_file)
5532 (linux_child_static_tracepoint_markers_by_strid)
5533 (linux_nat_is_async_p, linux_nat_can_async_p)
5534 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5535 (linux_nat_supports_multi_process)
5536 (linux_nat_supports_disable_randomization, linux_nat_async)
5537 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
5538 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
5539 (linux_nat_fileio_open, linux_nat_fileio_readlink)
5540 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
5541 methods of linux_nat_target.
5542 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
5543 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
5545 (check_stopped_by_watchpoint): Adjust.
5546 (linux_xfer_partial): Delete.
5547 (linux_target_install_ops, linux_target, linux_nat_add_target):
5549 (linux_nat_target::linux_nat_target): New.
5550 * linux-nat.h: Include "inf-ptrace.h".
5551 (linux_nat_target): New.
5552 (linux_target, linux_target_install_ops, linux_nat_add_target):
5553 Delete function declarations.
5554 (linux_target): Declare global.
5555 * linux-thread-db.c (thread_db_target): New.
5556 (thread_db_target::thread_db_target): New.
5557 (thread_db_ops): Delete.
5558 (the_thread_db_target): New.
5559 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
5560 (thread_db_update_thread_list, thread_db_pid_to_str)
5561 (thread_db_extra_thread_info)
5562 (thread_db_thread_handle_to_thread_info)
5563 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
5564 (thread_db_resume): Refactor as methods of thread_db_target.
5565 (init_thread_db_ops): Delete.
5566 (_initialize_thread_db): Remove reference to init_thread_db_ops.
5567 * x86-linux-nat.c: Don't include "linux-nat.h".
5568 (super_post_startup_inferior): Delete.
5569 (x86_linux_nat_target::~x86_linux_nat_target): New.
5570 (x86_linux_child_post_startup_inferior)
5571 (x86_linux_read_description, x86_linux_enable_btrace)
5572 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
5573 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
5574 methods of x86_linux_nat_target.
5575 (x86_linux_create_target): Delete. Bits folded ...
5576 (x86_linux_add_target): ... here. Now takes a linux_nat_target
5578 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
5579 (x86_linux_nat_target): New class.
5580 (x86_linux_create_target): Delete.
5581 (x86_linux_add_target): Now takes a linux_nat_target pointer.
5582 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
5583 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
5584 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
5585 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
5586 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
5588 (x86_use_watchpoints): Delete.
5589 * x86-nat.h: Include "breakpoint.h" and "target.h".
5590 (x86_use_watchpoints): Delete.
5591 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
5592 (x86_stopped_by_watchpoint, x86_stopped_data_address)
5593 (x86_insert_watchpoint, x86_remove_watchpoint)
5594 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
5595 (x86_stopped_by_hw_breakpoint): New declarations.
5596 (x86_nat_target): New template class.
5598 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
5599 (the_ppc_linux_nat_target): New.
5600 (ppc_linux_fetch_inferior_registers)
5601 (ppc_linux_can_use_hw_breakpoint)
5602 (ppc_linux_region_ok_for_hw_watchpoint)
5603 (ppc_linux_ranged_break_num_registers)
5604 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
5605 (ppc_linux_insert_mask_watchpoint)
5606 (ppc_linux_remove_mask_watchpoint)
5607 (ppc_linux_can_accel_watchpoint_condition)
5608 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
5609 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
5610 (ppc_linux_watchpoint_addr_within_range)
5611 (ppc_linux_masked_watch_num_registers)
5612 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
5613 (ppc_linux_read_description): Refactor as methods of
5614 ppc_linux_nat_target.
5615 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
5617 * procfs.c (procfs_xfer_partial): Delete forward declaration.
5618 (procfs_target): New class.
5619 (the_procfs_target): New.
5620 (procfs_target): Delete function.
5621 (procfs_auxv_parse, procfs_attach, procfs_detach)
5622 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
5623 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
5624 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
5625 (procfs_create_inferior, procfs_update_thread_list)
5626 (procfs_thread_alive, procfs_pid_to_str)
5627 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
5628 (procfs_stopped_data_address, procfs_insert_watchpoint)
5629 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
5630 (proc_find_memory_regions, procfs_info_proc)
5631 (procfs_make_note_section): Refactor as methods of procfs_target.
5632 (_initialize_procfs): Adjust.
5633 * sol-thread.c (sol_thread_target): New class.
5634 (sol_thread_ops): Now a sol_thread_target.
5635 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
5636 (sol_thread_fetch_registers, sol_thread_store_registers)
5637 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
5638 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
5639 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
5640 (init_sol_thread_ops): Delete.
5641 (_initialize_sol_thread): Adjust. Remove references to
5642 init_sol_thread_ops and complete_target_initialization.
5644 * windows-nat.c (windows_nat_target): New class.
5645 (windows_fetch_inferior_registers)
5646 (windows_store_inferior_registers, windows_resume, windows_wait)
5647 (windows_attach, windows_detach, windows_pid_to_exec_file)
5648 (windows_files_info, windows_create_inferior)
5649 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
5650 (windows_close, windows_pid_to_str, windows_xfer_partial)
5651 (windows_get_tib_address, windows_get_ada_task_ptid)
5652 (windows_thread_name, windows_thread_alive): Refactor as
5653 windows_nat_target methods.
5654 (do_initial_windows_stuff): Adjust.
5655 (windows_target): Delete function.
5656 (_initialize_windows_nat): Adjust.
5658 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
5659 (darwin_mourn_inferior, darwin_kill_inferior)
5660 (darwin_create_inferior, darwin_attach, darwin_detach)
5661 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
5662 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
5663 (darwin_supports_multi_process): Refactor as darwin_nat_target
5665 (darwin_resume_to, darwin_files_info): Delete.
5666 (_initialize_darwin_inferior): Rename to ...
5667 (_initialize_darwin_nat): ... this. Adjust to C++ification.
5668 * darwin-nat.h: Include "inf-child.h".
5669 (darwin_nat_target): New class.
5670 (darwin_complete_target): Delete.
5671 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
5672 (darwin_target): New.
5673 (i386_darwin_fetch_inferior_registers)
5674 (i386_darwin_store_inferior_registers): Refactor as methods of
5676 (darwin_complete_target): Delete, with ...
5677 (_initialize_i386_darwin_nat): ... bits factored out here.
5679 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
5680 (the_alpha_linux_nat_target): New.
5681 (alpha_linux_register_u_offset): Refactor as
5682 alpha_linux_nat_target method.
5683 (_initialize_alpha_linux_nat): Adjust.
5684 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
5685 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5686 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
5687 methods of linux_nat_trad_target.
5688 (linux_trad_target): Delete.
5689 * linux-nat-trad.h (linux_trad_target): Delete function.
5690 (linux_nat_trad_target): New class.
5691 * mips-linux-nat.c (mips_linux_nat_target): New class.
5692 (super_fetch_registers, super_store_registers, super_close):
5694 (the_mips_linux_nat_target): New.
5695 (mips64_linux_regsets_fetch_registers)
5696 (mips64_linux_regsets_store_registers)
5697 (mips64_linux_fetch_registers, mips64_linux_store_registers)
5698 (mips_linux_register_u_offset, mips_linux_read_description)
5699 (mips_linux_can_use_hw_breakpoint)
5700 (mips_linux_stopped_by_watchpoint)
5701 (mips_linux_stopped_data_address)
5702 (mips_linux_region_ok_for_hw_watchpoint)
5703 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5704 (mips_linux_close): Refactor as methods of mips_linux_nat.
5705 (_initialize_mips_linux_nat): Adjust to C++ification.
5707 * aix-thread.c (aix_thread_target): New class.
5708 (aix_thread_ops): Now an aix_thread_target.
5709 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
5710 (aix_thread_fetch_registers, aix_thread_store_registers)
5711 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
5712 (aix_thread_thread_alive, aix_thread_pid_to_str)
5713 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
5714 Refactor as methods of aix_thread_target.
5715 (init_aix_thread_ops): Delete.
5716 (_initialize_aix_thread): Remove references to init_aix_thread_ops
5717 and complete_target_initialization.
5718 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
5719 (rs6000_nat_target): New class.
5720 (the_rs6000_nat_target): New.
5721 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
5722 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
5723 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
5724 (super_create_inferior): Delete.
5725 (_initialize_rs6000_nat): Adjust to C++ification.
5727 * arm-linux-nat.c (arm_linux_nat_target): New class.
5728 (the_arm_linux_nat_target): New.
5729 (arm_linux_fetch_inferior_registers)
5730 (arm_linux_store_inferior_registers, arm_linux_read_description)
5731 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
5732 (arm_linux_remove_hw_breakpoint)
5733 (arm_linux_region_ok_for_hw_watchpoint)
5734 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
5735 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
5736 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
5737 arm_linux_nat_target.
5738 (_initialize_arm_linux_nat): Adjust to C++ification.
5740 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
5741 (the_aarch64_linux_nat_target): New.
5742 (aarch64_linux_fetch_inferior_registers)
5743 (aarch64_linux_store_inferior_registers)
5744 (aarch64_linux_child_post_startup_inferior)
5745 (aarch64_linux_read_description)
5746 (aarch64_linux_can_use_hw_breakpoint)
5747 (aarch64_linux_insert_hw_breakpoint)
5748 (aarch64_linux_remove_hw_breakpoint)
5749 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
5750 (aarch64_linux_region_ok_for_hw_watchpoint)
5751 (aarch64_linux_stopped_data_address)
5752 (aarch64_linux_stopped_by_watchpoint)
5753 (aarch64_linux_watchpoint_addr_within_range)
5754 (aarch64_linux_can_do_single_step): Refactor as methods of
5755 aarch64_linux_nat_target.
5756 (super_post_startup_inferior): Delete.
5757 (_initialize_aarch64_linux_nat): Adjust to C++ification.
5759 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
5760 (the_hppa_linux_nat_target): New.
5761 (hppa_linux_fetch_inferior_registers)
5762 (hppa_linux_store_inferior_registers): Refactor as methods of
5763 hppa_linux_nat_target.
5764 (_initialize_hppa_linux_nat): Adjust to C++ification.
5766 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
5767 (the_ia64_linux_nat_target): New.
5768 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
5769 (ia64_linux_stopped_data_address)
5770 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
5771 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
5772 ia64_linux_nat_target methods.
5773 (super_xfer_partial): Delete.
5774 (_initialize_ia64_linux_nat): Adjust to C++ification.
5776 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
5777 (the_m32r_linux_nat_target): New.
5778 (m32r_linux_fetch_inferior_registers)
5779 (m32r_linux_store_inferior_registers): Refactor as
5780 m32r_linux_nat_target methods.
5781 (_initialize_m32r_linux_nat): Adjust to C++ification.
5783 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
5784 (the_m68k_linux_nat_target): New.
5785 (m68k_linux_fetch_inferior_registers)
5786 (m68k_linux_store_inferior_registers): Refactor as
5787 m68k_linux_nat_target methods.
5788 (_initialize_m68k_linux_nat): Adjust to C++ification.
5790 * s390-linux-nat.c (s390_linux_nat_target): New class.
5791 (the_s390_linux_nat_target): New.
5792 (s390_linux_fetch_inferior_registers)
5793 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
5794 (s390_insert_watchpoint, s390_remove_watchpoint)
5795 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
5796 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
5797 (s390_auxv_parse, s390_read_description): Refactor as methods of
5798 s390_linux_nat_target.
5799 (_initialize_s390_nat): Adjust to C++ification.
5801 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
5802 (the_sparc_linux_nat_target): New.
5803 (_initialize_sparc_linux_nat): Adjust to C++ification.
5804 * sparc-nat.c (sparc_fetch_inferior_registers)
5805 (sparc_store_inferior_registers): Remove target_ops parameter.
5806 * sparc-nat.h (sparc_fetch_inferior_registers)
5807 (sparc_store_inferior_registers): Remove target_ops parameter.
5808 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
5809 (the_sparc64_linux_nat_target): New.
5810 (_initialize_sparc64_linux_nat): Adjust to C++ification.
5812 * spu-linux-nat.c (spu_linux_nat_target): New class.
5813 (the_spu_linux_nat_target): New.
5814 (spu_child_post_startup_inferior, spu_child_post_attach)
5815 (spu_child_wait, spu_fetch_inferior_registers)
5816 (spu_store_inferior_registers, spu_xfer_partial)
5817 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
5819 (_initialize_spu_nat): Adjust to C++ification.
5821 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
5822 (the_tilegx_linux_nat_target): New.
5823 (fetch_inferior_registers, store_inferior_registers):
5824 Refactor as methods.
5825 (_initialize_tile_linux_nat): Adjust to C++ification.
5827 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
5828 (the_xtensa_linux_nat_target): New.
5829 (xtensa_linux_fetch_inferior_registers)
5830 (xtensa_linux_store_inferior_registers): Refactor as
5831 xtensa_linux_nat_target methods.
5832 (_initialize_xtensa_linux_nat): Adjust to C++ification.
5834 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
5835 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
5836 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
5837 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
5838 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
5839 (fbsd_stopped_by_sw_breakpoint)
5840 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
5841 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
5842 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
5843 (fbsd_post_startup_inferior, fbsd_post_attach)
5844 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
5845 (fbsd_set_syscall_catchpoint)
5846 (super_xfer_partial, super_resume, super_wait)
5847 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
5848 (fbsd_handle_debug_trap): Remove target_ops parameter.
5849 (fbsd_nat_add_target): Delete.
5850 * fbsd-nat.h: Include "inf-ptrace.h".
5851 (fbsd_nat_add_target): Delete.
5852 (USE_SIGTRAP_SIGINFO): Define.
5853 (fbsd_nat_target): New class.
5855 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
5856 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
5857 (amd64bsd_target): Delete.
5858 * amd64-bsd-nat.h: New file.
5859 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
5861 (amd64_fbsd_nat_target): New class.
5862 (the_amd64_fbsd_nat_target): New.
5863 (amd64fbsd_read_description): Refactor as method of
5864 amd64_fbsd_nat_target.
5865 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5866 (_initialize_amd64fbsd_nat): Adjust to C++ification.
5867 * amd64-nat.h (amd64bsd_target): Delete function declaration.
5868 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
5869 (i386bsd_store_inferior_registers): Remove target_ops parameter.
5870 (i386bsd_target): Delete.
5871 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
5872 (i386bsd_fetch_inferior_registers)
5873 (i386bsd_store_inferior_registers): Declare.
5874 (i386_bsd_nat_target): New class.
5875 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
5876 (the_i386_fbsd_nat_target): New.
5877 (i386fbsd_resume, i386fbsd_read_description): Refactor as
5878 i386_fbsd_nat_target methods.
5879 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5880 (_initialize_i386fbsd_nat): Adjust to C++ification.
5881 * x86-bsd-nat.c (super_mourn_inferior): Delete.
5882 (x86bsd_mourn_inferior, x86bsd_target): Delete.
5883 (_initialize_x86_bsd_nat): Adjust to C++ification.
5884 * x86-bsd-nat.h: Include "x86-nat.h".
5885 (x86bsd_target): Delete declaration.
5886 (x86bsd_nat_target): New class.
5888 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
5889 (the_aarch64_fbsd_nat_target): New.
5890 (aarch64_fbsd_fetch_inferior_registers)
5891 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
5892 aarch64_fbsd_nat_target.
5893 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
5894 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
5895 (the_alpha_bsd_nat_target): New.
5896 (alphabsd_fetch_inferior_registers)
5897 (alphabsd_store_inferior_registers): Refactor as
5898 alpha_bsd_nat_target methods.
5899 (_initialize_alphabsd_nat): Refactor as methods of
5900 alpha_bsd_nat_target.
5901 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
5902 (the_amd64_nbsd_nat_target): New.
5903 (_initialize_amd64nbsd_nat): Adjust to C++ification.
5904 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
5905 (the_amd64_obsd_nat_target): New.
5906 (_initialize_amd64obsd_nat): Adjust to C++ification.
5907 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
5908 (the_arm_fbsd_nat_target): New.
5909 (arm_fbsd_fetch_inferior_registers)
5910 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
5911 (_initialize_arm_fbsd_nat): Refactor as methods of
5912 arm_fbsd_nat_target.
5913 (_initialize_arm_fbsd_nat): Adjust to C++ification.
5914 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
5915 (the_arm_netbsd_nat_target): New.
5916 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
5917 arm_netbsd_nat_target.
5918 (_initialize_arm_netbsd_nat): Adjust to C++ification.
5919 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
5920 (the_hppa_nbsd_nat_target): New.
5921 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
5922 hppa_nbsd_nat_target methods.
5923 (_initialize_hppanbsd_nat): Adjust to C++ification.
5924 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
5925 (the_hppa_obsd_nat_target): New.
5926 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
5927 methods of hppa_obsd_nat_target.
5928 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
5930 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
5931 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
5933 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
5934 (_initialize_i386obsd_nat): Use add_target.
5935 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
5936 (the_m68k_bsd_nat_target): New.
5937 (m68kbsd_fetch_inferior_registers)
5938 (m68kbsd_store_inferior_registers): Refactor as methods of
5939 m68k_bsd_nat_target.
5940 (_initialize_m68kbsd_nat): Adjust to C++ification.
5941 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
5942 (the_mips_fbsd_nat_target): New.
5943 (mips_fbsd_fetch_inferior_registers)
5944 (mips_fbsd_store_inferior_registers): Refactor as methods of
5945 mips_fbsd_nat_target.
5946 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
5948 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
5949 (the_mips_nbsd_nat_target): New.
5950 (mipsnbsd_fetch_inferior_registers)
5951 (mipsnbsd_store_inferior_registers): Refactor as methods of
5952 mips_nbsd_nat_target.
5953 (_initialize_mipsnbsd_nat): Adjust to C++ification.
5954 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
5955 (the_mips64_obsd_nat_target): New.
5956 (mips64obsd_fetch_inferior_registers)
5957 (mips64obsd_store_inferior_registers): Refactor as methods of
5958 mips64_obsd_nat_target.
5959 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
5961 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
5963 * nbsd-nat.h: Include "inf-ptrace.h".
5964 (nbsd_nat_target): New class.
5965 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
5966 (obsd_wait): Refactor as methods of obsd_nat_target.
5967 (obsd_add_target): Delete.
5968 * obsd-nat.h: Include "inf-ptrace.h".
5969 (obsd_nat_target): New class.
5970 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
5971 (the_ppc_fbsd_nat_target): New.
5972 (ppcfbsd_fetch_inferior_registers)
5973 (ppcfbsd_store_inferior_registers): Refactor as methods of
5974 ppc_fbsd_nat_target.
5975 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
5977 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
5978 (the_ppc_nbsd_nat_target): New.
5979 (ppcnbsd_fetch_inferior_registers)
5980 (ppcnbsd_store_inferior_registers): Refactor as methods of
5981 ppc_nbsd_nat_target.
5982 (_initialize_ppcnbsd_nat): Adjust to C++ification.
5983 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
5984 (the_ppc_obsd_nat_target): New.
5985 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
5986 methods of ppc_obsd_nat_target.
5987 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
5989 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
5990 (the_sh_nbsd_nat_target): New.
5991 (shnbsd_fetch_inferior_registers)
5992 (shnbsd_store_inferior_registers): Refactor as methods of
5994 (_initialize_shnbsd_nat): Adjust to C++ification.
5995 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
5996 (inf_ptrace_xfer_partial): Delete.
5997 (sparc_xfer_partial, sparc_target): Delete.
5998 * sparc-nat.h (sparc_fetch_inferior_registers)
5999 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6000 (sparc_target): Delete function declaration.
6001 (sparc_target): New template class.
6002 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6003 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6004 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6005 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6007 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6008 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6009 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6010 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6012 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6013 (the_vax_bsd_nat_target): New.
6014 (vaxbsd_fetch_inferior_registers)
6015 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6017 (_initialize_vaxbsd_nat): Adjust to C++ification.
6019 * bsd-kvm.c (bsd_kvm_target): New class.
6020 (bsd_kvm_ops): Now a bsd_kvm_target.
6021 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6022 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6023 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6025 (bsd_kvm_return_one): Delete.
6026 (bsd_kvm_add_target): Adjust to C++ification.
6028 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6029 (nto_procfs_target_procfs): New classes.
6030 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6031 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6032 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6033 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6034 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6035 (procfs_remove_hw_breakpoint, procfs_resume)
6036 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6037 (procfs_kill_inferior, procfs_store_registers)
6038 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6039 as methods of nto_procfs_target.
6040 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6041 (nto_native_ops): Delete.
6042 (procfs_open, procfs_native_open): Delete.
6043 (nto_native_ops): Now an nto_procfs_target_native.
6044 (init_procfs_targets): Adjust to C++ification.
6045 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6046 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6047 Refactor as methods of nto_procfs_target.
6049 * go32-nat.c (go32_nat_target): New class.
6050 (the_go32_nat_target): New.
6051 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6052 (go32_store_registers, go32_xfer_partial, go32_files_info)
6053 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6054 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6055 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6056 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6057 (go32_target): Delete.
6058 (_initialize_go32_nat): Adjust to C++ification.
6060 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6061 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6062 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6063 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6065 (gnu_target): Delete.
6066 * gnu-nat.h (gnu_target): Delete.
6067 (gnu_nat_target): New class.
6068 * i386-gnu-nat.c (gnu_base_target): New.
6069 (i386_gnu_nat_target): New class.
6070 (the_i386_gnu_nat_target): New.
6071 (_initialize_i386gnu_nat): Adjust to C++ification.
6073 2018-05-02 Pedro Alves <palves@redhat.com>
6075 * bfd-target.c (target_bfd_xclose): Rename to ...
6076 (target_bfd_close): ... this.
6077 (target_bfd_reopen): Adjust.
6078 * target.c (target_close): Remove references to to_xclose.
6079 * target.h (target_ops::to_xclose): Delete.
6080 (target_ops::to_close): Update comments.
6082 2018-05-02 Pedro Alves <palves@redhat.com>
6084 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6086 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6087 * inf-ptrace.c (inf_ptrace_register_u_offset)
6088 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6089 (inf_ptrace_store_register, inf_ptrace_store_registers)
6090 (inf_ptrace_trad_target): Move to ...
6091 * linux-nat-trad.c: ... this new file.
6092 * linux-nat-trad.h: New file.
6093 * linux-nat.c (linux_target_install_ops): Make extern.
6094 (linux_trad_target): Delete.
6095 * linux-nat.h (linux_trad_target): Delete declaration.
6096 (linux_target_install_ops): Declare.
6097 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6100 2018-05-02 Pedro Alves <palves@redhat.com>
6102 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6103 procfs_target/add_target here.
6104 * procfs.c (procfs_target): Make static.
6105 (_initialize_procfs): Call add_target here.
6106 * procfs.h (struct target_ops): Remove forward declaration.
6107 (procfs_target): Remove declaration.
6108 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6110 2018-05-02 Pedro Alves <palves@redhat.com>
6112 * procfs.c (procfs_stopped_by_watchpoint)
6113 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6114 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6116 (procfs_use_watchpoints): Delete, move contents...
6117 (procfs_target): ... here.
6118 * procfs.h (procfs_use_watchpoints): Delete declaration.
6119 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6120 procfs_use_watchpoints.
6121 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6122 procfs_use_watchpoints.
6124 2018-05-02 Tom Tromey <tom@tromey.com>
6127 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6128 and var_zuinteger_unlimited.
6129 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6130 and PARAM_ZUINTEGER_UNLIMITED.
6131 (set_parameter_value): Handle var_zuinteger and
6132 var_zuinteger_unlimited.
6133 (add_setshow_generic): Likewise.
6134 (parmpy_init): Likewise.
6136 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6139 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6140 pointer is not null before dereferencing it.
6142 2018-04-30 Tom Tromey <tom@tromey.com>
6144 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6147 2018-04-30 Tom Tromey <tom@tromey.com>
6149 * breakpoint.c (mention): Remove use of is_mi_like_p.
6150 (print_mention_ranged_breakpoint): Likewise.
6151 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6154 2018-04-30 Tom Tromey <tom@tromey.com>
6156 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6158 2018-04-30 Tom Tromey <tom@tromey.com>
6160 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6161 (info_spu_event_command): Remove some uses of is_mi_like_p.
6163 2018-04-30 Tom Tromey <tom@tromey.com>
6165 * python/py-framefilter.c (py_print_single_arg)
6166 (enumerate_locals, py_print_args, py_print_frame): Remove some
6167 uses of is_mi_like_p.
6169 2018-04-30 Tom Tromey <tom@tromey.com>
6172 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6173 * ui-out.h (ui_out::is_mi_like_p): Now const.
6174 (ui_out::do_is_mi_like_p): Now const.
6175 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6177 2018-04-30 Tom Tromey <tom@tromey.com>
6179 * varobj.c (varobj_set_visualizer): Use new_reference.
6180 * python/python.c (gdbpy_decode_line): Use new_reference.
6181 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6184 2018-04-30 Tom Tromey <tom@tromey.com>
6186 * varobj.c (install_new_value): Use new_reference.
6187 * value.h (value_incref): Return void. Swap intro comment with
6189 * value.c (set_value_parent): Use new_reference.
6190 (value_incref): Return void. Update intro comment.
6191 (release_value): Use new_reference.
6192 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6194 2018-04-30 Tom Tromey <tom@tromey.com>
6196 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6197 * gdb_bfd.h (new_bfd_ref): Remove.
6198 (gdb_bfd_open): Update comment.
6199 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6200 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6201 (gdb_bfd_fdopenr): Use new_reference.
6202 * exec.c (exec_file_attach): Use new_reference.
6204 2018-04-30 Tom Tromey <tom@tromey.com>
6206 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6209 2018-04-30 Tom Tromey <tom@tromey.com>
6211 * jit.c (jit_read_code_entry): Use type_align.
6212 * i386-tdep.c (i386_gdbarch_init): Don't call
6213 set_gdbarch_long_long_align_bit.
6214 * gdbarch.sh: Remove long_long_align_bit.
6215 * gdbarch.c, gdbarch.h: Rebuild.
6216 * arc-tdep.c (arc_type_align): New function.
6217 (arc_gdbarch_init): Use arc_type_align. Don't call
6218 set_gdbarch_long_long_align_bit.
6220 2018-04-30 Tom Tromey <tom@tromey.com>
6222 * rust-lang.c (rust_type_alignment): Remove.
6223 (rust_composite_type): Use type_align.
6225 2018-04-30 Tom Tromey <tom@tromey.com>
6227 * NEWS: Mention Type.align.
6228 * python/py-type.c (typy_get_alignof): New function.
6229 (type_object_getset): Add "alignof".
6231 2018-04-30 Tom Tromey <tom@tromey.com>
6235 * std-operator.def (UNOP_ALIGNOF): New operator.
6236 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6238 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6239 * c-lang.c (c_op_print_tab): Add alignof.
6240 * c-exp.y (ALIGNOF): New token.
6241 (exp): Add "ALIGNOF" production.
6242 (ident_tokens): Add _Alignof and alignof.
6244 2018-04-30 Tom Tromey <tom@tromey.com>
6246 * i386-tdep.c (i386_type_align): New function.
6247 (i386_gdbarch_init): Update.
6248 * gdbarch.sh (type_align): New method.
6249 * gdbarch.c, gdbarch.h: Rebuild.
6250 * arch-utils.h (default_type_align): Declare.
6251 * arch-utils.c (default_type_align): New function.
6252 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6253 (struct type) <align_log2>: New field.
6254 <instance_flags>: Now a bitfield.
6255 (TYPE_RAW_ALIGN): New macro.
6256 (type_align, type_raw_align, set_type_align): Declare.
6257 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6259 * dwarf2read.c (quirk_rust_enum): Set type alignment.
6260 (get_alignment, maybe_set_alignment): New functions.
6261 (read_structure_type, read_enumeration_type, read_array_type)
6262 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6263 (read_subrange_type, read_base_type): Set type alignment.
6265 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
6267 * dwarf2read.c (read_index_from_section): Use bool.
6269 2018-04-29 Fabian Groffen <grobian@gentoo.org>
6272 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6275 2018-04-29 John Reiser <jreiser@BitWagon.com>
6278 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6279 last step, and do it atomically.
6281 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
6283 * compile/compile-c-types.c (convert_int, convert_float):
6286 2018-04-27 Tom Tromey <tom@tromey.com>
6289 * rust-lang.c (rust_inclusive_range_type_p): New function.
6290 (rust_range): Handle inclusive ranges.
6291 (rust_compute_range): Likewise.
6292 * rust-exp.y (struct rust_op) <inclusive>: New field.
6293 (DOTDOTEQ): New constant.
6294 (range_expr): Add "..=" productions.
6295 (operator_tokens): Add "..=" token.
6296 (ast_range): Add "inclusive" parameter.
6297 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6299 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6301 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6302 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6304 * expprint.c (print_subexp_standard): Handle new bounds values.
6305 (dump_subexp_body_standard): Likewise.
6307 2018-04-27 Tom Tromey <tom@tromey.com>
6309 * configure: Rebuild.
6310 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6311 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6313 (class symbol_needs_eval_context): Likewise.
6314 * dwarf2read.c (mock_mapped_index::symbol_name_count)
6315 (mock_mapped_index::symbol_name_at): Use "override". Remove
6317 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6319 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6320 * aarch64-tdep.c (instruction_reader::read): Use "override".
6321 (instruction_reader_test::read): Likewise.
6322 * arm-tdep.c (instruction_reader::read): Use "override".
6323 (instruction_reader_thumb::read): Likewise.
6325 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
6328 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6329 instead of remote_send.
6330 (remote_send): Remove.
6332 2018-04-26 Pedro Alves <palves@redhat.com>
6334 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6335 find_function_start_sal instead of find_pc_line.
6337 2018-04-26 Pedro Alves <palves@redhat.com>
6339 * breakpoint.c (set_breakpoint_location_function): Handle
6341 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6342 * elfread.c (elf_symtab_read): Give data symbols with
6343 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6344 (elf_rel_plt_read): Update comment.
6345 * linespec.c (convert_linespec_to_sals): Handle
6347 (minsym_found): Handle mst_data_gnu_ifunc.
6348 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6349 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6350 * parse.c (find_minsym_type_and_address): Handle
6352 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6353 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6354 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6356 <mst_data_gnu_ifunc>: New enumerator.
6358 2018-04-26 Pedro Alves <palves@redhat.com>
6360 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6361 (lookup_minimal_symbol_by_pc_section): ... this. Replace
6362 'want_trampoline' parameter by a lookup_msym_prefer parameter.
6364 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6365 (lookup_minimal_symbol_by_pc): Adjust.
6366 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6367 (lookup_solib_trampoline_symbol_by_pc): Adjust.
6368 * minsyms.h (lookup_msym_prefer): New enum.
6369 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6370 parameter by a lookup_msym_prefer parameter.
6372 2018-04-26 Pedro Alves <palves@redhat.com>
6374 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6375 ends in "@plt" instead of looking at the symbol's section.
6377 2018-04-26 Pedro Alves <palves@redhat.com>
6379 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
6381 (find_pc_partial_function_gnu_ifunc): Rename to ...
6382 (find_pc_partial_function): ... this, and remove references to
6384 (find_pc_partial_function): Delete old implementation.
6385 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6387 2018-04-26 Pedro Alves <palves@redhat.com>
6389 * linespec.c (struct bound_minimal_symbol_search_key): New.
6390 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
6391 skip first line if we found a GNU ifunc minimal symbol by name.
6392 (compare_msymbols): Change parameters to work with a destructured
6394 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6397 2018-04-26 Pedro Alves <palves@redhat.com>
6399 * breakpoint.c (set_breakpoint_location_function): Don't resolve
6400 ifunc targets here. Instead, if we have an ifunc minsym, use its
6402 (add_location_to_breakpoint): Store the minsym and the objfile in
6403 the breakpoint location.
6404 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6405 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6406 Record the minsym in the sal.
6407 * symtab.h (symtab_and_line) <msymbol>: New field.
6409 2018-04-26 Pedro Alves <palves@redhat.com>
6411 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6412 unless we actually resolved the ifunc.
6414 2018-04-26 Pedro Alves <palves@redhat.com>
6416 * c-exp.y (variable production): Prefer ifunc minsyms over
6417 regular function symbols.
6418 * symtab.c (find_gnu_ifunc): New function.
6419 * minsyms.h (lookup_msym_prefer): New enum.
6420 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6421 parameter by a lookup_msym_prefer parameter.
6422 * symtab.h (find_gnu_ifunc): New declaration.
6424 2018-04-26 Pedro Alves <palves@redhat.com>
6426 * blockframe.c (find_gnu_ifunc_target_type): New function.
6427 (find_function_type): New.
6428 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6429 return a value with a memory address.
6430 (eval_call): For calls to GNU ifunc functions, try to find the
6431 type of the target function from the type that the resolver
6433 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6435 * infcall.c (find_function_return_type): Delete.
6436 (find_function_addr): Add 'function_type' parameter. For calls to
6437 GNU ifunc functions, try to find the type of the target function
6438 from the type that the resolver returns, and return it via
6440 (call_function_by_hand_dummy): Adjust to use the function type
6441 returned by find_function_addr.
6442 (find_function_addr): Add 'function_type' parameter and move
6444 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6447 2018-04-26 Pedro Alves <palves@redhat.com>
6449 * c-exp.y (variable production): Skip finding an alias for ifunc
6452 2018-04-26 Pedro Alves <palves@redhat.com>
6454 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6456 2018-04-25 Pedro Alves <palves@redhat.com>
6458 * infcmd.c (kill_command): Print the pid as string, not the whole
6459 thread's ptid. Add comment. s/has been killed/killed/ in output
6461 * remote.c (remote_detach_1): Print the pid as string, not the
6462 whole thread's ptid.
6464 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6465 Sergio Durigan Junior <sergiodj@redhat.com>
6466 Pedro Alves <palves@redhat.com>
6468 * infcmd.c (kill_command): Print message when inferior has
6470 * inferior.c (print_inferior_events): Remove 'static'. Set as
6472 (add_inferior): Improve message printed when
6473 'print_inferior_events' is on.
6474 (exit_inferior): Remove message printed when
6475 'print_inferior_events' is on.
6476 (detach_inferior): Improve message printed when
6477 'print_inferior_events' is on.
6478 (initialize_inferiors): Use 'add_inferior_silent' to set
6479 'current_inferior_'.
6480 * inferior.h (print_inferior_events): Declare here as
6482 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6483 '[Detaching...]' messages when 'print_inferior_events' is on.
6484 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
6485 as prefix/suffix for messages. Remove periods. Fix erroneous
6486 'Detaching after fork from child...', replace it by '... from
6488 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6489 prefix/suffix when printing 'Detaching...' messages. Print
6490 them when 'print_inferior_events' is on.
6491 * remote.c (remote_detach_1): Print message when detaching
6492 from inferior and '!is_fork_parent'.
6494 2018-04-24 Tom Tromey <tom@tromey.com>
6496 * cli-out.h: Reindent.
6498 2018-04-24 Tom Tromey <tom@tromey.com>
6500 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6501 (cli_ui_out::do_field_string): Use fputs_filtered.
6502 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6504 2018-04-23 Tom Tromey <tom@tromey.com>
6506 * guile/scm-frame.c (gdbscm_frame_read_var): Use
6507 gdb::unique_xmalloc_ptr.
6509 2018-04-23 Tom Tromey <tom@tromey.com>
6511 * configure: Rebuild.
6513 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
6516 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6517 prepare_for_testing. Set normal_bp to r_debug_state if target
6520 2018-04-21 Pedro Alves <palves@redhat.com>
6521 Rajendra SY <rajendra.sy@gmail.com>
6523 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6524 * remote.c (extended_remote_attach): In all-stop mode, mark the
6525 thread as executing.
6527 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6529 * thread.c (thread_apply_all_command): Fix comment.
6530 (thread_command): Fix comment.
6532 2018-04-10 Alan Hayward <alan.hayward@arm.com>
6534 * common/tdesc.h (tdesc_create_feature): Remove xml filename
6536 * features/aarch64-core.c (create_feature_aarch64_core):
6538 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
6540 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
6542 * features/i386/32bit-avx512.c
6543 (create_feature_i386_32bit_avx512): Likewise.
6544 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
6546 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
6548 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
6550 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
6552 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
6554 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
6556 * features/i386/64bit-avx512.c
6557 (create_feature_i386_64bit_avx512): Likewise.
6558 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
6560 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
6562 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
6564 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
6566 * features/i386/64bit-segments.c
6567 (create_feature_i386_64bit_segments): Likewise.
6568 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
6570 * features/i386/x32-core.c
6571 (create_feature_i386_x32_core): Likewise.
6572 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
6573 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
6574 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
6575 * target-descriptions.c: In generated code, don't pass xml
6578 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6580 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
6581 (print_xml_feature::visit_post): Likewise.
6582 (print_xml_feature::visit): Likewise.
6583 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
6584 (print_xml_feature): Add new class.
6585 * regformats/regdat.sh: Null xmltarget on feature targets.
6586 * target-descriptions.c (struct target_desc): Add xmltarget.
6587 (maintenance_check_tdesc_xml_convert): Add unittest function.
6588 (tdesc_get_features_xml): Add function to get xml.
6589 (maintenance_check_xml_descriptions): Test xml generation.
6590 * xml-tdesc.c (string_read_description_xml): Add function.
6591 * xml-tdesc.h (string_read_description_xml): Add declaration.
6593 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6595 * features/Makefile: Add feature marker to targets with new style
6596 target descriptions.
6597 * regformats/aarch64.dat: Regenerate.
6598 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
6599 * regformats/i386/amd64-avx-linux.dat: Likewise.
6600 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
6601 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
6602 * regformats/i386/amd64-linux.dat: Likewise.
6603 * regformats/i386/amd64-mpx-linux.dat: Likewise.
6604 * regformats/i386/amd64.dat: Likewise.
6605 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
6606 * regformats/i386/i386-avx-linux.dat: Likewise.
6607 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
6608 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
6609 * regformats/i386/i386-linux.dat: Likewise.
6610 * regformats/i386/i386-mmx-linux.dat: Likewise.
6611 * regformats/i386/i386-mpx-linux.dat: Likewise.
6612 * regformats/i386/i386.dat: Likewise.
6613 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
6614 * regformats/i386/x32-avx-linux.dat: Likewise.
6615 * regformats/i386/x32-linux.dat: Likewise.
6616 * regformats/tic6x-c62x-linux.dat: Likewise.
6617 * regformats/tic6x-c64x-linux.dat: Likewise.
6618 * regformats/tic6x-c64xp-linux.dat: Likewise.
6619 * regformats/regdat.sh: Parse feature marker.
6621 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6623 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
6624 (tdesc_osabi_name): Likewise.
6625 * target-descriptions.c (tdesc_architecture_name): Add new
6627 (tdesc_osabi_name): Likewise.
6629 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6631 * common/tdesc.c (tdesc_predefined_type): Move to here.
6632 (tdesc_named_type): Likewise.
6633 (tdesc_create_vector): Likewise.
6634 (tdesc_create_struct): Likewise.
6635 (tdesc_set_struct_size): Likewise.
6636 (tdesc_create_union): Likewise.
6637 (tdesc_create_flags): Likewise.
6638 (tdesc_create_enum): Likewise.
6639 (tdesc_add_field): Likewise.
6640 (tdesc_add_typed_bitfield): Likewise.
6641 (tdesc_add_bitfield): Likewise.
6642 (tdesc_add_flag): Likewise.
6643 (tdesc_add_enum_value): Likewise.
6644 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
6645 (struct tdesc_type_vector): Likewise.
6646 (struct tdesc_type_field): Likewise.
6647 (struct tdesc_type_with_fields): Likewise.
6648 (tdesc_create_enum): Add declaration.
6649 (tdesc_add_typed_bitfield): Likewise.
6650 (tdesc_add_enum_value): Likewise.
6651 * target-descriptions.c (tdesc_type_field): Move from here.
6652 (tdesc_type_builtin): Likewise.
6653 (tdesc_type_vector): Likewise.
6654 (tdesc_type_with_fields): Likewise.
6655 (tdesc_predefined_types): Likewise.
6656 (tdesc_named_type): Likewise.
6657 (tdesc_create_vector): Likewise.
6658 (tdesc_create_struct): Likewise.
6659 (tdesc_set_struct_size): Likewise.
6660 (tdesc_create_union): Likewise.
6661 (tdesc_create_flags): Likewise.
6662 (tdesc_create_enum): Likewise.
6663 (tdesc_add_field): Likewise.
6664 (tdesc_add_typed_bitfield): Likewise.
6665 (tdesc_add_bitfield): Likewise.
6666 (tdesc_add_flag): Likewise.
6667 (tdesc_add_enum_value): Likewise.
6668 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
6669 (tdesc_add_typed_bitfield): Likewise.
6670 (tdesc_add_enum_value): Likewise.
6672 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6674 * common/tdesc.c (tdesc_feature::accept): Move to here.
6675 (tdesc_feature::operator==): Likewise.
6676 (tdesc_create_reg): Likewise.
6677 * common/tdesc.h (tdesc_type_kind): Likewise.
6678 (struct tdesc_type): Likewise.
6679 (struct tdesc_feature): Likewise.
6680 * regformats/regdat.sh: Create a feature.
6681 * target-descriptions.c (tdesc_type_kind): Move from here.
6682 (tdesc_type): Likewise.
6683 (tdesc_type_up): Likewise.
6684 (tdesc_feature): Likewise.
6685 (tdesc_create_reg): Likewise.
6687 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6689 * Makefile.in: Add arch/tdesc.c
6690 * common/tdesc.c: New file.
6691 * common/tdesc.h (tdesc_element_visitor): Move to here.
6692 (tdesc_element): Likewise.
6693 (tdesc_reg): Likewise.
6694 (tdesc_reg_up): Likewise.
6695 * regformats/regdef.h (reg): Add offset to constructors.
6696 * target-descriptions.c (tdesc_element_visitor): Move from here.
6697 (tdesc_element): Likewise.
6698 (tdesc_reg): Likewise.
6699 (tdesc_reg_up): Likewise.
6701 2018-04-17 Tom Tromey <tom@tromey.com>
6703 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
6706 2018-04-17 Tom Tromey <tom@tromey.com>
6708 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
6710 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
6712 * symtab.c (print_symbol_info): Skip printing filename and line
6713 number when `last' is NULL.
6714 (symtab_symbol_info): Use empty string instead of NULL for first
6715 invocation of print_symbol_info.
6716 (rbreak_command): Pass NULL to `last' parameter of
6719 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
6721 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
6724 2018-04-16 Pedro Alves <palves@redhat.com>
6726 * MAINTAINERS (sh): Remove.
6727 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
6728 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
6729 (ALLDEPFILES): Remove sh64-tdep.c.
6730 * NEWS: Mentions that support for SH-5/SH64 is removed.
6731 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
6732 (sh*-*-openbsd*): Ditto.
6733 (sh64-*-elf*): Remove.
6735 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
6736 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
6737 * sh-tdep.c: No longer include "sh64-tdep.h".
6738 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
6739 * sh64-tdep.c, sh64-tdep.h: Remove files.
6741 2018-04-16 Pedro Alves <palves@redhat.com>
6743 * MAINTAINERS: Remove m88k.
6744 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
6745 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
6746 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
6747 * NEWS: Mention that support for m88k was removed.
6748 * configure.host (m88*-*-*): Remove support.
6749 * configure.nat (m88k-*-*): Remove support.
6750 * configure.tgt (m88*-*-openbsd*): Remove.
6751 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
6753 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
6755 * configure.tgt (x86_tobjs): New variable.
6756 (amd64_tobjs, i386_tobjs): Use it.
6758 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6760 * symtab.c (print_symbol_info): Precede the symbol definition by
6761 the line number when available.
6762 * NEWS: Advertise this enhancement.
6764 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6766 * NEWS (New options): announce set/show record btrace cpu.
6767 * btrace.c: Include record-btrace.h.
6768 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
6769 the vendor is unknown.
6770 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
6771 Maybe overwrite the btrace configuration's cpu.
6772 (btrace_compute_ftrace): Add cpu parameter. Update callers.
6773 (btrace_fetch): Add cpu parameter. Update callers.
6774 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
6775 Maybe overwrite the btrace configuration's cpu. Skip enabling
6776 errata workarounds if the vendor is unknown.
6777 * python/py-record-btrace.c: Include record-btrace.h.
6778 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
6779 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
6780 * record-btrace.c (record_btrace_cpu_state_kind): New.
6781 (record_btrace_cpu): New.
6782 (set_record_btrace_cpu_cmdlist): New.
6783 (record_btrace_get_cpu): New.
6784 (require_btrace_thread, record_btrace_info)
6785 (record_btrace_resume_thread): Call record_btrace_get_cpu.
6786 (cmd_set_record_btrace_cpu_none): New.
6787 (cmd_set_record_btrace_cpu_auto): New.
6788 (cmd_set_record_btrace_cpu): New.
6789 (cmd_show_record_btrace_cpu): New.
6790 (_initialize_record_btrace): Initialize set/show record btrace cpu
6792 * record-btrace.h (record_btrace_get_cpu): New.
6794 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6796 * record.c (set_record_command): Fix typo in message.
6798 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6800 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
6802 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6804 * infrun.c (process_event_stop_test): Call
6805 gdbarch_in_indirect_branch_thunk.
6806 * gdbarch.sh (in_indirect_branch_thunk): New.
6807 * gdbarch.c: Regenerated.
6808 * gdbarch.h: Regenerated.
6811 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
6812 (HFILES_NO_SRCDIR): Add x86-tdep.h.
6813 (ALLDEPFILES): Add x86-tdep.c.
6814 * arch-utils.h (default_in_indirect_branch_thunk): New.
6815 * arch-utils.c (default_in_indirect_branch_thunk): New.
6816 * i386-tdep: Include x86-tdep.h.
6817 (i386_in_indirect_branch_thunk): New.
6818 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
6820 * amd64-tdep: Include x86-tdep.h.
6821 (amd64_in_indirect_branch_thunk): New.
6822 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
6824 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
6827 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
6828 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
6829 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
6832 2018-04-12 Tom Tromey <tom@tromey.com>
6834 * rust-lang.c (rust_print_struct_def): Remove univariant code.
6835 (rust_evaluate_subexp): Likewise.
6837 2018-04-12 Pedro Alves <palves@redhat.com>
6839 * procfs.c (procfs_detach): Make forward declaration's prototype
6840 match definition's protototype.
6841 (proc_get_LDT_entry): Remove stale do_cleanups call.
6843 2018-04-12 Pedro Alves <palves@redhat.com>
6845 * target.h (target_ops::to_has_exited): Delete.
6846 (target_has_exited): Delete.
6847 * target-delegates.c: Regenerate.
6849 2018-04-11 Pedro Alves <palves@redhat.com>
6851 * target.c (fileio_fh_t::t): Add comment.
6852 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6853 (target_fileio_close): Handle a NULL target.
6854 (invalidate_fileio_fh): New.
6855 (target_close): Call it.
6856 * remote.c (remote_hostio_send_command): No longer check whether
6857 remote_desc is open.
6859 2018-04-11 Pedro Alves <palves@redhat.com>
6861 * target.c (fileio_fh_t): Make it a named struct instead of a
6863 (fileio_fh_t::is_closed): New method.
6864 (DEF_VEC_O (fileio_fh_t)): Remove.
6865 (fileio_fhandles): Now a std::vector.
6866 (is_closed_fileio_fh): Delete.
6867 (acquire_fileio_fd): Adjust. Rename parameters.
6868 (release_fileio_fd): Adjust.
6869 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
6870 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6871 (target_fileio_close): Adjust.
6873 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
6875 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
6878 2018-04-10 Pedro Alves <palves@redhat.com>
6880 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
6881 (scoped_finish_thread_state): New class.
6882 * infcmd.c (run_command_1): Use it instead of finish_thread_state
6884 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
6885 (fetch_inferior_event, normal_stop): Likewise.
6886 * thread.c (finish_thread_state_cleanup): Delete.
6888 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6889 Pedro Alves <palves@redhat.com>
6891 * value.c: Include "selftest.h" and "common/array-view.h".
6892 (struct range) <operator ==>: New.
6893 (test_ranges_contain): New.
6894 (check_ranges_vector): New.
6895 (test_insert_into_bit_range_vector): New.
6896 (_initialize_values): Register selftests.
6897 * common/array-view.h (operator==, operator!=): New.
6899 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6901 * common/gdb_vecs.h (unordered_remove): Add overload that takes
6903 * inline-frame.c: Include <algorithm>.
6904 (struct inline_state): Add constructor.
6905 (inline_state_s): Remove.
6906 (DEF_VEC_O(inline_state_s)): Remove.
6907 (inline_states): Change type to std::vector.
6908 (find_inline_frame_state): Adjust to std::vector.
6909 (allocate_inline_frame_state): Remove.
6910 (clear_inline_frame_state): Adjust to std::vector.
6911 (skip_inline_frames): Adjust to std::vector.
6913 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6915 * tracepoint.h (struct trace_state_variable): Add constructor.
6916 <name>: Change type to std::string.
6917 * tracepoint.c (tsv_s): Remove.
6918 (DEF_VEC_O(tsv_s)): Remove.
6919 (tvariables): Change to std::vector.
6920 (create_trace_state_variable): Adjust to std::vector.
6921 (find_trace_state_variable): Likewise.
6922 (find_trace_state_variable_by_number): Likewise.
6923 (delete_trace_state_variable): Likewise.
6924 (trace_variable_command): Adjust to std::string.
6925 (delete_trace_variable_command): Likewise.
6926 (tvariables_info_1): Adjust to std::vector.
6927 (save_trace_state_variables): Likewise.
6928 (start_tracing): Likewise.
6929 (merge_uploaded_trace_state_variables): Adjust to std::vector
6931 * target.h (struct target_ops)
6932 <to_download_trace_state_variable>: Pass reference to
6933 trace_state_variable.
6934 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
6935 * target-delegates.c: Re-generate.
6936 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
6937 (mi_tsv_deleted): Likewise.
6938 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
6939 * remote.c (remote_download_trace_state_variable): Change
6940 pointer to reference and adjust.
6941 * make-target-delegates (parse_argtypes): Handle references.
6942 (write_function_header): Likewise.
6943 (munge_type): Likewise.
6945 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6947 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6948 string_view-selftests.c.
6949 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
6951 * unittests/basic_string_view/cons/char/1.cc: Likewise.
6952 * unittests/basic_string_view/cons/char/2.cc: Likewise.
6953 * unittests/basic_string_view/cons/char/3.cc: Likewise.
6954 * unittests/basic_string_view/element_access/char/1.cc:
6956 * unittests/basic_string_view/element_access/char/empty.cc:
6958 * unittests/basic_string_view/element_access/char/front_back.cc:
6960 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
6961 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
6963 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
6965 * unittests/basic_string_view/modifiers/swap/char/1.cc:
6967 * unittests/basic_string_view/operations/compare/char/1.cc:
6969 * unittests/basic_string_view/operations/compare/char/13650.cc:
6971 * unittests/basic_string_view/operations/copy/char/1.cc:
6973 * unittests/basic_string_view/operations/data/char/1.cc:
6975 * unittests/basic_string_view/operations/find/char/1.cc:
6977 * unittests/basic_string_view/operations/find/char/2.cc:
6979 * unittests/basic_string_view/operations/find/char/3.cc:
6981 * unittests/basic_string_view/operations/find/char/4.cc:
6983 * unittests/basic_string_view/operations/rfind/char/1.cc:
6985 * unittests/basic_string_view/operations/rfind/char/2.cc:
6987 * unittests/basic_string_view/operations/rfind/char/3.cc:
6989 * unittests/basic_string_view/operations/substr/char/1.cc:
6991 * unittests/basic_string_view/operators/char/2.cc: Likewise.
6992 * unittests/string_view-selftests.c: New file.
6994 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6996 * unittests/basic_string_view/capacity/1.cc: New file.
6997 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
6998 * unittests/basic_string_view/cons/char/1.cc: New file.
6999 * unittests/basic_string_view/cons/char/2.cc: New file.
7000 * unittests/basic_string_view/cons/char/3.cc: New file.
7001 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7002 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7003 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7004 * unittests/basic_string_view/element_access/char/1.cc: New file.
7005 * unittests/basic_string_view/element_access/char/2.cc: New file.
7006 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7007 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7008 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7009 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7010 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7011 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7012 * unittests/basic_string_view/include.cc: New file.
7013 * unittests/basic_string_view/inserters/char/1.cc: New file.
7014 * unittests/basic_string_view/inserters/char/2.cc: New file.
7015 * unittests/basic_string_view/inserters/char/3.cc: New file.
7016 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7017 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7018 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7019 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7020 * unittests/basic_string_view/literals/types.cc: New file.
7021 * unittests/basic_string_view/literals/values.cc: New file.
7022 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7023 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7024 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7025 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7026 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7027 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7028 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7029 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7030 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7031 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7032 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7033 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7034 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7035 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7036 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7037 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7038 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7039 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7040 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7041 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7042 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7043 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7044 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7045 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7046 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7047 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7048 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7049 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7050 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7051 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7052 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7053 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7054 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7055 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7056 * unittests/basic_string_view/operators/char/2.cc: New file.
7057 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7058 * unittests/basic_string_view/range_access/char/1.cc: New file.
7059 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7060 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7061 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7062 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7063 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7064 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7065 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7066 * unittests/basic_string_view/typedefs.cc: New file.
7067 * unittests/basic_string_view/types/1.cc: New file.
7069 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7071 * common/gdb_string_view.h: Remove libstdc++ implementation
7072 details, adjust to gdb reality.
7073 * common/gdb_string_view.tcc: Likewise.
7074 * cli/cli-script.c (struct string_view): Remove.
7075 (user_args) <m_args>: Change element type to gdb::string_view.
7076 (user_args::insert_args): Adjust.
7078 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7080 * common/gdb_string_view.h: New file.
7081 * common/gdb_string_view.tcc: New file.
7083 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7085 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7086 * configure: Re-generate.
7088 2018-04-09 Pedro Alves <palves@redhat.com>
7090 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7091 (set_target_gdbarch): Call
7092 gdb::observers::architecture_changed.notify instead of
7093 observer_notify_architecture_changed.
7095 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7097 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7098 (do_restore_current_traceframe_cleanup): Remove.
7099 (restore_current_traceframe_cleanup_dtor): Remove.
7100 (make_cleanup_restore_current_traceframe): Remove.
7101 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7103 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7104 * infrun.c (fetch_inferior_event): Use
7105 scoped_restore_current_traceframe.
7107 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7109 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7111 <n_allocated_type_units>: Remove.
7112 <all_type_units>: Change to std::vector.
7113 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7114 to std::vector change.
7115 (dwarf2_per_objfile::get_cutu): Likewise.
7116 (dwarf2_per_objfile::get_tu): Likewise.
7117 (create_signatured_type_table_from_index): Likewise.
7118 (create_signatured_type_table_from_debug_names): Likewise.
7119 (dw2_symtab_iter_next): Likewise.
7120 (dw2_print_stats): Likewise.
7121 (dw2_expand_all_symtabs): Likewise.
7122 (dw2_expand_marked_cus): Likewise.
7123 (dw2_debug_names_iterator::next): Likewise.
7124 (dwarf2_initialize_objfile): Likewise.
7125 (add_signatured_type_cu_to_table): Likewise.
7126 (create_all_type_units): Likewise.
7127 (add_type_unit): Likewise.
7128 (struct tu_abbrev_offset): Add constructor.
7129 (build_type_psymtabs_1): Adjust to std::vector change.
7130 (print_tu_stats): Likewise.
7131 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7132 (write_debug_names): Likewise.
7134 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7136 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7137 Make an std::vector.
7138 <n_comp_units>: Remove.
7139 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7140 to std::vector change.
7141 (dwarf2_per_objfile::get_cutu): Likewise.
7142 (dwarf2_per_objfile::get_cu): Likewise.
7143 (create_cus_from_index): Likewise.
7144 (create_addrmap_from_index): Likewise.
7145 (create_addrmap_from_aranges): Likewise.
7146 (dwarf2_read_index): Likewise.
7147 (dw2_find_last_source_symtab): Likewise.
7148 (dw2_map_symtabs_matching_filename): Likewise.
7149 (dw2_symtab_iter_next): Likewise.
7150 (dw2_print_stats): Likewise.
7151 (dw2_expand_all_symtabs): Likewise.
7152 (dw2_expand_symtabs_with_fullname): Likewise.
7153 (dw2_expand_marked_cus): Likewise.
7154 (dw2_map_symbol_filenames): Likewise.
7155 (create_cus_from_debug_names): Likewise.
7156 (dwarf2_read_debug_names): Likewise.
7157 (dw2_debug_names_iterator::next): Likewise.
7158 (dwarf2_initialize_objfile): Likewise.
7159 (set_partial_user): Likewise.
7160 (dwarf2_build_psymtabs_hard): Likewise.
7161 (read_comp_units_from_section): Remove arguments, adjust to
7163 (create_all_comp_units): Adjust to std::vector and
7164 read_comp_units_from_section changes.
7165 (dwarf2_find_containing_comp_unit): Adjust to std::vector
7167 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7168 (psyms_seen_size): Likewise.
7169 (write_gdbindex): Likewise.
7170 (write_debug_names): Likewise.
7172 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7174 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7175 with dwarf2_per_objfile.
7176 (create_cus_from_index): Likewise.
7177 (create_signatured_type_table_from_index): Likewise.
7178 (dwarf2_read_index): Likewise.
7179 (dwarf2_initialize_objfile): Likewise.
7180 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
7181 per_cu rather than get_dwarf2_per_objfile.
7183 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7185 * dwarf2read.h (struct signatured_type): Forward declare.
7186 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7188 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7189 (dw2_get_cutu): ...this.
7190 (dwarf2_per_objfile::get_cu): Rename from...
7191 (dw2_get_cu): ...this.
7192 (dwarf2_per_objfile::get_tu): New.
7193 (create_addrmap_from_index): Adjust.
7194 (create_addrmap_from_aranges): Adjust.
7195 (dw2_find_last_source_symtab): Adjust.
7196 (dw2_map_symtabs_matching_filename): Adjust.
7197 (dw2_symtab_iter_next): Adjust.
7198 (dw2_print_stats): Adjust.
7199 (dw2_expand_all_symtabs): Adjust.
7200 (dw2_expand_symtabs_with_fullname): Adjust.
7201 (dw2_expand_marked_cus): Adjust.
7202 (dw_expand_symtabs_matching_file_matcher): Adjust.
7203 (dw2_map_symbol_filenames): Adjust.
7204 (dw2_debug_names_iterator::next): Adjust.
7205 (dwarf2_initialize_objfile): Adjust.
7206 (set_partial_user): Adjust.
7207 (dwarf2_build_psymtabs_hard): Adjust.
7209 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7211 * dwarf2read.c (create_signatured_type_table_from_debug_names):
7212 Remove unused variables.
7213 (dw2_map_symtabs_matching_filename): Likewise.
7214 (dwarf2_record_block_ranges): Likewise.
7215 (dwarf2_read_addr_index): Likewise.
7216 (follow_die_offset): Likewise.
7218 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7220 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7221 to symbol_file_add_main.
7223 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7226 * mi/mi-console.c (do_fputc_async_safe): New.
7227 (mi_console_file::write_async_safe): New.
7228 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7229 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7231 * ui-file.c (ui_file::putstrn): Adjust call to
7232 fputstrn_unfiltered.
7233 * utils.c (printchar): Replace do_fputs and do_fprintf
7234 parameters by do_fputc.
7235 (fputstr_filtered): Adjust call to printchar.
7236 (fputstr_unfiltered): Likewise.
7237 (fputstrn_filtered): Likewise.
7238 (fputstrn_unfiltered): Add do_fputc parameter, pass to
7240 * utils.h (do_fputc_ftype): New typedef.
7241 (fputstrn_unfiltered): Add do_fputc parameter.
7243 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7245 * regformats/i386/i386-avx.dat: Remove.
7247 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7250 * amd64-tdep.c (amd64_none_init_abi): New function.
7251 (amd64_x32_none_init_abi): New function.
7252 (_initialize_amd64_tdep): Register handlers for x86-64 and
7253 x64_32 with GDB_OSABI_NONE.
7254 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7255 GDB_OSABI_NONE osabi.
7257 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7260 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7262 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7263 * osabi.c (gdb_osabi_names): Add "unknown" entry.
7265 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7267 * common/byte-vector.h (char_vector): New type.
7268 * target.h (target_read_alloc): Return
7269 gdb::optional<byte_vector>.
7270 (target_read_stralloc): Return gdb::optional<char_vector>.
7271 (target_get_osdata): Return gdb::optional<char_vector>.
7272 * target.c (target_read_alloc_1): Templatize. Replacement
7273 manual memory management with vector.
7274 (target_read_alloc): Change return type, adjust.
7275 (target_read_stralloc): Change return type, adjust.
7276 (target_get_osdata): Change return type, adjust.
7277 * auxv.c (struct auxv_info) <length>: Remove.
7278 <data>: Change type to gdb::optional<byte_vector>.
7279 (auxv_inferior_data_cleanup): Free auxv_info with delete.
7280 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7281 (target_auxv_search): Adjust.
7282 (fprint_target_auxv): Adjust.
7283 * avr-tdep.c (avr_io_reg_read_command): Adjust.
7284 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7285 (linux_make_corefile_notes): Adjust.
7286 * osdata.c (get_osdata): Adjust.
7287 * remote.c (remote_get_threads_with_qxfer): Adjust.
7288 (remote_memory_map): Adjust.
7289 (remote_traceframe_info): Adjust.
7290 (btrace_read_config): Adjust.
7291 (remote_read_btrace): Adjust.
7292 (remote_pid_to_exec_file): Adjust.
7293 * solib-aix.c (solib_aix_get_library_list): Adjust.
7294 * solib-dsbt.c (decode_loadmap): Don't free buf.
7295 (dsbt_get_initial_loadmaps): Adjust.
7296 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7297 * solib-target.c (solib_target_current_sos): Adjust.
7298 * tracepoint.c (sdata_make_value): Adjust.
7299 * xml-support.c (xinclude_start_include): Adjust.
7300 (xml_fetch_content_from_file): Adjust.
7301 * xml-support.h (xml_fetch_another): Change return type.
7302 (xml_fetch_content_from_file): Change return type.
7303 * xml-syscall.c (xml_init_syscalls_info): Adjust.
7304 * xml-tdesc.c (file_read_description_xml): Adjust.
7305 (fetch_available_features_from_target): Change return type.
7306 (target_fetch_description_xml): Adjust.
7307 (target_read_description_xml): Adjust.
7309 2018-04-06 Tom Tromey <tom@tromey.com>
7311 * value.c (~value): Update.
7312 (struct value) <contents>: Now unique_xmalloc_ptr.
7313 (value_contents_bits_eq, allocate_value_contents)
7314 (value_contents_raw, value_contents_all_raw)
7315 (value_contents_for_printing, value_contents_for_printing_const)
7316 (set_value_enclosing_type): Update.
7318 2018-04-06 Tom Tromey <tom@tromey.com>
7320 * value.c (range_s): Remove typedef, VEC.
7321 (struct range): Add operator<.
7322 (range_lessthan): Remove.
7323 (ranges_contain): Change type.
7325 (struct value) <unavailable, optimized_out>: Now std::vector.
7326 (value_entirely_available)
7327 (value_entirely_covered_by_range_vector)
7328 (value_entirely_unavailable, value_entirely_optimized_out):
7330 (insert_into_bit_range_vector): Change argument type.
7331 (find_first_range_overlap): Likewise.
7332 (struct ranges_and_idx, value_contents_bits_eq)
7333 (require_not_optimized_out, require_available): Update.
7334 (ranges_copy_adjusted): Change argument types.
7335 (value_optimized_out, value_copy, value_fetch_lazy): Update.
7337 2018-04-06 Tom Tromey <tom@tromey.com>
7339 * value.c (~value): Update.
7340 (struct value) <parent>: Now a value_ref_ptr.
7341 (value_parent, set_value_parent, value_address, value_copy):
7344 2018-04-06 Tom Tromey <tom@tromey.com>
7346 * value.c (struct value): Add constructor, destructor, and member
7348 (allocate_value_lazy, value_decref): Update.
7350 2018-04-06 Tom Tromey <tom@tromey.com>
7352 * value.c (struct value) <released, next>: Remove.
7353 (all_values): Now a std::vector.
7354 (allocate_value_lazy): Update.
7355 (value_next): Remove.
7356 (value_mark, value_free_to_mark, release_value)
7357 (value_release_to_mark): Update.
7359 2018-04-06 Tom Tromey <tom@tromey.com>
7361 * value.h (fetch_subexp_value, value_release_to_mark): Update.
7362 (free_value_chain): Remove.
7363 * value.c (free_value_chain): Remove.
7364 (value_release_to_mark): Return a std::vector.
7365 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7367 (check_condition): Update.
7368 * eval.c (fetch_subexp_value): Change "val_chain" to a
7370 * breakpoint.c (update_watchpoint): Update.
7371 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7373 2018-04-06 Tom Tromey <tom@tromey.com>
7375 * value.h (free_all_values): Remove.
7376 * value.c (free_all_values): Remove.
7378 2018-04-06 Tom Tromey <tom@tromey.com>
7380 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7381 (value_history_chain, value_history_count): Remove.
7382 (value_history): New global.
7383 (record_latest_value, access_value_history, show_values)
7384 (preserve_values): Update.
7386 2018-04-06 Tom Tromey <tom@tromey.com>
7388 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7389 * varobj.c (varobj_set_display_format, varobj_set_value)
7390 (install_default_visualizer, construct_visualizer)
7391 (install_new_value, ~varobj, varobj_get_value_type)
7392 (my_value_of_variable, varobj_editable_p): Update.
7393 * c-varobj.c (c_describe_child, c_value_of_variable)
7394 (cplus_number_of_children, cplus_describe_child): Update.
7395 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7396 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7397 (ada_value_of_variable, ada_value_is_changeable_p): Update.
7399 2018-04-06 Tom Tromey <tom@tromey.com>
7401 * printcmd.c (last_examine_address): Change type to
7403 (do_examine, x_command): Update.
7405 2018-04-06 Tom Tromey <tom@tromey.com>
7407 * value.c (release_value): Update.
7408 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7409 (struct bpstats) <val>: Now a value_ref_ptr.
7410 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7411 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7412 (~watchpoint, print_it_watchpoint, watch_command_1)
7413 (invalidate_bp_value_on_memory_change): Update.
7415 2018-04-06 Tom Tromey <tom@tromey.com>
7417 * varobj.c (varobj_clear_saved_item)
7418 (update_dynamic_varobj_children, install_new_value, ~varobj):
7420 * value.h (value_incref): Move declaration earlier.
7421 (value_decref): Rename from value_free.
7422 (struct value_ref_policy): New.
7423 (value_ref_ptr): New typedef.
7424 (struct value_deleter): Remove.
7425 (gdb_value_up): Remove typedef.
7426 (release_value): Change return type.
7427 (release_value_or_incref): Remove.
7428 * value.c (set_value_parent): Update.
7429 (value_incref): Change return type.
7430 (value_decref): Rename from value_free.
7431 (value_free_to_mark, free_all_values, free_value_chain): Update.
7432 (release_value): Return value_ref_ptr.
7433 (release_value_or_incref): Remove.
7434 (record_latest_value, set_internalvar, clear_internalvar):
7436 * stack.c (info_frame_command): Don't call value_free.
7437 * python/py-value.c (valpy_dealloc, valpy_new)
7438 (value_to_value_object): Update.
7439 * printcmd.c (do_examine): Update.
7440 * opencl-lang.c (lval_func_free_closure): Update.
7441 * mi/mi-main.c (register_changed_p): Don't call value_free.
7442 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7443 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7444 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7446 * guile/scm-value.c (vlscm_free_value_smob)
7447 (vlscm_scm_from_value): Update.
7448 * frame.c (frame_register_unwind, frame_unwind_register_signed)
7449 (frame_unwind_register_unsigned, get_frame_register_bytes)
7450 (put_frame_register_bytes): Don't call value_free.
7451 * findvar.c (address_from_register): Don't call value_free.
7452 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7453 * dwarf2loc.c (entry_data_value_free_closure)
7454 (value_of_dwarf_reg_entry, free_pieced_value_closure)
7455 (dwarf2_evaluate_loc_desc_full): Update.
7456 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7457 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7458 (~watchpoint, watch_command_1)
7459 (invalidate_bp_value_on_memory_change): Update.
7460 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7462 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
7465 * warning.m4: Add -Wno-error=deprecated-register.
7466 * configure: Re-generate.
7468 2018-04-05 Tom Tromey <tom@tromey.com>
7470 * linespec.h: Remove include of "vec.h".
7472 2018-04-05 Tom Tromey <tom@tromey.com>
7474 * linespec.c (typep): Remove typedef.
7475 (find_methods, find_superclass_methods): Take a std::vector.
7476 (find_method): Use std::vector.
7478 2018-04-05 Tom Tromey <tom@tromey.com>
7480 * utils.c (compare_strings): Remove.
7481 * utils.h (compare_strings): Remove.
7482 * objc-lang.h (find_imps): Update.
7483 * objc-lang.c (find_methods): Take a std::vector.
7484 (uniquify_strings, find_imps): Likewise.
7485 * linespec.c (find_methods): Take a std::vector.
7486 (decode_objc): Use std::vector.
7487 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7489 (find_method, find_function_symbols): Use std::vector.
7491 2018-04-05 Tom Tromey <tom@tromey.com>
7493 * completer.c (completion_tracker::completion_tracker): Remove
7495 (completion_tracker::discard_completions): Likewise.
7496 * breakpoint.c (ambiguous_names_p): Remove cast.
7497 * ada-lang.c (_initialize_ada_language): Remove cast.
7498 * utils.h (streq): Update.
7499 (streq_hash): Add new declaration.
7500 * utils.c (streq): Return bool.
7501 (streq_hash): New function.
7503 2018-04-05 Tom Tromey <tom@tromey.com>
7505 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7506 Remove a string copy.
7508 2018-04-05 Tom Tromey <tom@tromey.com>
7510 * linespec.c (filter_results): Use std::vector.
7511 (decode_line_2, decode_line_full): Update.
7513 2018-04-05 Tom Tromey <tom@tromey.com>
7515 * linespec.c (canonical_to_fullform): Return std::string.
7516 (filter_results): Update.
7517 (struct decode_line_2_item): Add constructor.
7518 <fullform, displayform>: Now std::string.
7519 (decode_line_2_compare_items): Now a std::sort comparator.
7520 (decode_line_2): Update.
7522 2018-04-05 Tom Tromey <tom@tromey.com>
7524 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7525 (unexpected_linespec_error): Update.
7526 (linespec_parse_basic, parse_linespec): Update.
7528 2018-04-05 Tom Tromey <tom@tromey.com>
7530 * linespec.c (linespec_parse_basic): Reindent.
7532 2018-04-05 Tom Tromey <tom@tromey.com>
7534 * minsyms.h (iterate_over_minimal_symbols): Update.
7535 * minsyms.c (iterate_over_minimal_symbols): Take a
7537 * linespec.c (struct collect_minsyms): Remove.
7538 (compare_msyms): Now a std::sort comparator.
7539 (add_minsym): Add parameters.
7540 (search_minsyms_for_name): Update. Use std::vector.
7542 2018-04-03 Tom Tromey <tom@tromey.com>
7544 * mipsread.c (read_alphacoff_dynamic_symtab): Use
7547 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7549 * MAINTAINERS (Write After Approval): Add Weimin Pan.
7551 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7554 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
7555 printing static type.
7557 2018-04-01 Tom Tromey <tom@tromey.com>
7559 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
7560 (rs6000_xfer_shared_libraries): Update.
7562 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
7564 * common/gdb_vecs.h (char_ptr): Remove.
7565 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
7567 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7569 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
7571 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
7573 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7575 * tracepoint.h (struct uploaded_tp): Initialize fields.
7576 <actions, step_actions, cmd_strings>: Change type to
7577 std::vector<char *>.
7578 * tracepoint.c (get_uploaded_tp): Allocate with new.
7579 (free_uploaded_tps): Free with delete.
7580 (parse_tracepoint_definition): Adjust to std::vector change.
7581 * breakpoint.c (read_uploaded_action): Likewise.
7582 (create_tracepoint_from_upload): Likewise.
7583 * ctf.c (ctf_write_uploaded_tp): Likewise.
7584 (SET_ARRAY_FIELD): Likewise.
7585 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
7587 2018-03-30 Tom Tromey <tom@tromey.com>
7589 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
7591 (svr4_keep_data_in_core): Update.
7592 (svr4_read_so_list): Update.
7594 2018-03-30 Tom Tromey <tom@tromey.com>
7596 * windows-nat.c (handle_output_debug_string, handle_exception):
7598 * target.h (target_read_string): Update.
7599 * target.c (target_read_string): Change "string" to
7601 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
7603 * solib-frv.c (frv_current_sos): Update.
7604 * solib-dsbt.c (dsbt_current_sos): Update.
7605 * solib-darwin.c (darwin_current_sos): Update.
7606 * linux-thread-db.c (inferior_has_bug): Update.
7607 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
7608 Update. Remove alloca.
7609 * ada-lang.c (ada_main_name): Update.
7611 2018-03-30 Tom Tromey <tom@tromey.com>
7613 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
7614 (struct dwo_file_deleter): New.
7615 (dwo_file_up): New typedef.
7616 (open_and_init_dwo_file): Use dwo_file_up.
7617 (free_dwo_file_cleanup): Remove.
7619 2018-03-30 Tom Tromey <tom@tromey.com>
7621 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
7622 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
7624 2018-03-30 Tom Tromey <tom@tromey.com>
7626 * dwarf2read.c (class free_cached_comp_units): New class.
7627 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
7628 (free_cached_comp_units): Remove function.
7630 2018-03-30 Tom Tromey <tom@tromey.com>
7632 * utils.h (make_cleanup_unpush_target): Remove.
7633 * inf-ptrace.c (struct target_unpusher): New.
7634 (target_unpush_up) New typedef.
7635 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
7637 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
7639 2018-03-27 Tom Tromey <tom@tromey.com>
7641 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
7643 2018-03-27 Pedro Alves <palves@redhat.com>
7644 Tom Tromey <tom@tromey.com>
7646 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
7647 destructor. Now a class.
7648 (gdb_readline_wrapper_cleanup): Remove function.
7649 (gdb_readline_wrapper): Remove cleanups.
7651 2018-03-27 Tom Tromey <tom@tromey.com>
7653 * typeprint.h (struct type_print_options) <local_typedefs,
7654 global_typedefs>: Remove "struct" keyword.
7655 (class typedef_hash_table): New class.
7656 (recursively_update_typedef_hash, add_template_parameters)
7657 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
7658 (find_typedef_in_hash): Don't declare.
7659 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
7660 (typedef_hash_table::recursively_update): Rename from
7661 recursively_update_typedef_hash. Now a member.
7662 (typedef_hash_table::add_template_parameters): Rename from
7663 add_template_parameters. Now a member.
7664 (typedef_hash_table::typedef_hash_table): Now a constructor;
7665 rename from create_typedef_hash.
7666 (typedef_hash_table::~typedef_hash_table): Now a destructor;
7667 rename from free_typedef_hash.
7668 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
7669 (do_free_global_table): Remove.
7670 (typedef_hash_table::typedef_hash_table): New constructor; renamed
7671 from copy_type_recursive.
7672 (create_global_typedef_table): Remove.
7673 (typedef_hash_table::find_global_typedef): Now a member of
7675 (typedef_hash_table::find_typedef): Rename from
7676 find_typedef_in_hash; now a member.
7677 (whatis_exp): Update.
7678 * extension.h (struct ext_lang_type_printers): Add constructor and
7680 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
7682 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
7683 Now a constructor; rename from start_ext_lang_type_printers.
7684 (ext_lang_type_printers): Now a destructor; rename from
7685 free_ext_lang_type_printers.
7686 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
7688 (c_type_print_base_struct_union): Update. Remove cleanups.
7690 2018-03-27 Tom Tromey <tom@tromey.com>
7692 * dwarf-index-write.c: Include <cmath>.
7694 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7696 * NEWS: Add entry describing new "set|show varsize-limit" command.
7697 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
7699 * printcmd.c (_initialize_printcmd): Add "set var" alias of
7702 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
7704 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
7706 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
7707 * dwarf-index-common.c: New file.
7708 * dwarf-index-common.h: New file.
7709 * dwarf-index-write.c: New file.
7710 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
7711 (struct dwarf2_section_info): Move from here.
7712 (dwarf2_section_info_def): Likewise.
7713 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
7714 (offset_type): Likewise.
7715 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
7716 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
7717 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
7718 (byte_swap): Likewise.
7719 (MAYBE_SWAP): Likewise.
7720 (dwarf2_per_cu_ptr): Likewise.
7721 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
7722 (struct tu_stats): Likewise.
7723 (struct dwarf2_per_objfile): Likewise.
7724 (struct dwarf2_per_cu_data): Likewise.
7725 (struct signatured_type): Likewise.
7726 (sig_type_ptr): Likewise.
7727 (DEF_VEC_P (sig_type_ptr)): Likewise.
7728 (INDEX4_SUFFIX): Likewise.
7729 (INDEX5_SUFFIX): Likewise.
7730 (DEBUG_STR_SUFFIX): Likewise.
7731 (dwarf2_read_section): Make non-static.
7732 (mapped_index_string_hash): Move from here.
7733 (dwarf5_djb_hash): Likewise.
7734 (file_write): Likewise.
7735 (class data_buf): Likewise.
7736 (struct symtab_index_entry): Likewise.
7737 (struct mapped_symtab): Likewise.
7738 (find_slot): Likewise.
7739 (hash_expand): Likewise.
7740 (add_index_entry): Likewise.
7741 (uniquify_cu_indices): Likewise.
7742 (class c_str_view): Likewise.
7743 (class c_str_view_hasher): Likewise.
7744 (class vector_hasher): Likewise.
7745 (write_hash_table): Likewise.
7746 (psym_index_map): Likewise.
7747 (struct addrmap_index_data): Likewise.
7748 (add_address_entry): Likewise.
7749 (add_address_entry_worker): Likewise.
7750 (write_address_map): Likewise.
7751 (symbol_kind): Likewise.
7752 (write_psymbols): Likewise.
7753 (struct signatured_type_index_data): Likewise.
7754 (write_one_signatured_type): Likewise.
7755 (recursively_count_psymbols): Likewise.
7756 (recursively_write_psymbols): Likewise.
7757 (class debug_names): Likewise.
7758 (check_dwarf64_offsets): Likewise.
7759 (psyms_seen_size): Likewise.
7760 (write_gdbindex): Likewise.
7761 (write_debug_names): Likewise.
7762 (assert_file_size): Likewise.
7763 (write_psymtabs_to_index): Likewise.
7764 (save_gdb_index_command): Likewise.
7765 (_initialize_dwarf2_read): Don't register the "save gdb-index"
7767 * dwarf2read.h: New file.
7769 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7772 * dwarf2read.c (dwarf2_physname): Do not return the demangled
7773 symbol name if the CU's language stores symbol names in linkage
7775 * language.h (struct language_defn)
7776 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
7777 all instances of this struct.
7779 2018-03-26 Tom Tromey <tom@tromey.com>
7781 * stack.c (backtrace_command_1): Remove verbose code.
7783 2018-03-26 Tom Tromey <tom@tromey.com>
7785 * python/py-framefilter.c (py_print_type): Don't catch
7786 exceptions. Return void.
7787 (py_print_value): Likewise.
7788 (py_print_single_arg): Likewise.
7789 (enumerate_args): Don't catch exceptions.
7790 (py_print_args): Likewise.
7791 (py_print_frame): Likewise.
7792 (gdbpy_apply_frame_filter): Catch exceptions here.
7794 2018-03-26 Tom Tromey <tom@tromey.com>
7796 * stack.c (_initialize_stack): Remove trailing newlines from help
7797 text. Add "Usage" line to "backtrace" help.
7799 2018-03-26 Tom Tromey <tom@tromey.com>
7802 * python/py-framefilter.c (py_print_args): Call wrap_hint.
7804 2018-03-26 Tom Tromey <tom@tromey.com>
7806 * python/py-framefilter.c (py_print_single_arg): Return
7807 EXT_LANG_BT_ERROR from catch.
7809 2018-03-26 Tom Tromey <tom@tromey.com>
7812 * stack.c (backtrace_command_1): Move some code into no-filters
7815 2018-03-26 Tom Tromey <tom@tromey.com>
7817 * python/py-framefilter.c (throw_quit_or_print_exception): New
7819 (gdbpy_apply_frame_filter): Use it.
7821 2018-03-26 Tom Tromey <tom@tromey.com>
7824 * python/py-framefilter.c (py_print_type, py_print_value)
7825 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
7828 2018-03-26 Tom Tromey <tom@tromey.com>
7830 * python/py-framefilter.c (enumerate_args): Use
7831 gdb::unique_xmalloc_ptr.
7833 2018-03-26 Tom Tromey <tom@tromey.com>
7835 * python/py-framefilter.c (py_print_frame): Return
7837 (gdbpy_apply_frame_filter): Update comment.
7838 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
7840 <EXT_LANG_BT_NO_FILTERS>: Change value.
7842 2018-03-26 Tom Tromey <tom@tromey.com>
7845 * stack.c (backtrace_command): Parse "hide" argument.
7846 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
7847 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
7850 2018-03-26 Tom Tromey <tom@tromey.com>
7852 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
7854 (backtrace_command): Remove "fulltrace", add "flags".
7856 2018-03-26 Tom Tromey <tom@tromey.com>
7858 * stack.c (backtrace_command): Rewrite command line parsing.
7860 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7862 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
7864 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7866 * filename-seen-cache.h: Add include guard.
7868 2018-03-26 Keith Seitz <keiths@redhat.com>
7870 * symfile.c (place_section): Remove "struct" from section_addr_info
7872 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
7873 "struct" keyword from section_addr_info.
7875 2018-03-26 Alan Hayward <alan.hayward@arm.com>
7877 * regformats/regdef.h (reg): Add constructors.
7879 2018-03-25 Pedro Alves <palves@redhat.com>
7881 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
7882 if then/else bodies in var_func_name extraction.
7884 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
7886 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
7887 lookup_minimal_symbol() to find symbol entry.
7888 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
7890 2018-03-23 Keith Seitz <keiths@redhat.com>
7893 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
7894 nested type definitions for C++, too.
7896 2018-03-23 Tom Tromey <tom@tromey.com>
7898 * machoread.c (struct oso_el): Add a constructor. Don't define as
7900 (macho_register_oso): Remove.
7901 (macho_symtab_read): Take a std::vector.
7902 (oso_el_compare_name): Now a std::sort comparator.
7903 (macho_symfile_read_all_oso): Take a std::vector.
7904 (macho_symfile_read): Use std::vector. Remove cleanups.
7906 2018-03-22 Tom Tromey <tom@tromey.com>
7908 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
7909 (record_full_goto_bookmark): Use std::string.
7911 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7914 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
7917 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7919 * rs6000-tdep.c (store_insn_p): New function.
7920 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
7921 and cr_reg to their unshifted values. Use store_insn_p to
7922 match LR saves using either R1 or fdata->alloca_reg. Use
7923 store_insn_p to match CR saves. Set alloca_reg_offset
7924 when alloca_reg and framep are set. Remove lr_reg shift
7925 when assigning to fdata->lr_register.
7927 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
7929 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
7930 command line args instead of emitting a warning.
7932 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7934 * tracepoint.h (struct static_tracepoint_marker): Initialize
7935 fields, define default constructor, move constructor and move
7936 assignment, disable the rest.
7937 <str_id, extra>: Make std::string.
7938 (release_static_tracepoint_marker): Remove.
7939 (free_current_marker): Remove.
7940 * tracepoint.c (free_current_marker): Remove.
7941 (parse_static_tracepoint_marker_definition): Adjust to
7942 std::string, use new hex2str overload.
7943 (release_static_tracepoint_marker): Remove.
7944 (print_one_static_tracepoint_marker): Get marker by reference
7945 and adjust to std::string.
7946 (info_static_tracepoint_markers_command): Adjust to std::vector
7948 * target.h (static_tracepoint_marker_p): Remove typedef.
7949 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
7950 (struct target_ops) <to_static_tracepoint_marker_at>: Return
7952 <to_static_tracepoint_markers_by_strid>: Return std::vector.
7954 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
7955 (target_debug_print_std_vector_static_tracepoint_marker): New.
7956 (target_debug_print_struct_static_tracepoint_marker_p): Rename
7958 (target_debug_print_static_tracepoint_marker_p): ... this.
7959 * target-delegates.c: Re-generate.
7960 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
7962 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
7963 (decode_static_tracepoint_spec): Adjust to std::vector.
7964 (tracepoint_print_one_detail): Adjust to std::string.
7965 (strace_marker_decode_location): Adjust to std::string.
7966 (update_static_tracepoint): Adjust to std::string, remove call
7967 to release_static_tracepoint_marker.
7968 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
7969 Adjust to std::vector.
7970 * remote.c (remote_static_tracepoint_marker_at): Return bool.
7971 (remote_static_tracepoint_markers_by_strid): Adjust to
7973 * common/rsp-low.h (hex2str): New overload with explicit count
7975 * common/rsp-low.c (hex2str): New overload with explicit count
7977 * unittests/rsp-low-selftests.c (test_hex2str): New function.
7978 (_initialize_rsp_low_selftests): Add test_hex2str test.
7979 * unittests/tracepoint-selftests.c
7980 (test_parse_static_tracepoint_marker_definition): Adjust to
7983 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7985 * tracepoint.c (parse_static_tracepoint_marker_definition):
7986 Consider case where the definition is followed by more
7988 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7989 tracepoint-selftests.c.
7990 * unittests/tracepoint-selftests.c: New.
7992 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7994 * MAINTAINERS (Write After Approval): Add Pedro Franco de
7997 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7999 * symtab.c (find_pc_sect_line): fixed indentation.
8001 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8003 * symtab.c (find_pc_sect_line): now uses binary search.
8005 2018-03-19 Tom Tromey <tom@tromey.com>
8007 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8010 2018-03-19 Pedro Alves <palves@redhat.com>
8011 Tom Tromey <tom@tromey.com>
8013 * unittests/observable-selftests.c: New file.
8014 * common/observable.h: New file.
8015 * observable.h: New file.
8016 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8017 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8018 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8019 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8020 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8021 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8022 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8023 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8024 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8025 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8026 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8027 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8028 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8029 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8030 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8031 tui/tui-interp.c, valops.c: Update all users.
8032 * tui/tui-hooks.c (tui_bp_created_observer)
8033 (tui_bp_deleted_observer, tui_bp_modified_observer)
8034 (tui_inferior_exit_observer, tui_before_prompt_observer)
8035 (tui_normal_stop_observer, tui_register_changed_observer):
8037 (tui_observers_token): New global.
8038 (attach_or_detach, tui_attach_detach_observers): New functions.
8039 (tui_install_hooks, tui_remove_hooks): Use
8040 tui_attach_detach_observers.
8041 * record-btrace.c (record_btrace_thread_observer): Remove.
8042 (record_btrace_thread_observer_token): New global.
8043 * observer.sh: Remove.
8044 * observer.c: Rename to observable.c.
8045 * observable.c (namespace gdb_observers): Define new objects.
8046 (observer_debug): Move into gdb_observers namespace.
8047 (struct observer, struct observer_list, xalloc_observer_list_node)
8048 (xfree_observer_list_node, generic_observer_attach)
8049 (generic_observer_detach, generic_observer_notify): Remove.
8050 (_initialize_observer): Update.
8051 Don't include observer.inc.
8052 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8053 (clean mostlyclean): Likewise.
8054 (observer.h, observer.inc): Remove targets.
8055 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8056 (COMMON_SFILES): Use observable.c, not observer.c.
8057 * .gitignore: Remove observer.h.
8059 2018-03-18 Tom Tromey <tom@tromey.com>
8061 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8063 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8065 2018-03-17 Tom Tromey <tom@tromey.com>
8067 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8069 2018-03-17 Tom Tromey <tom@tromey.com>
8071 * target.c (class scoped_target_fd): New.
8072 (target_fileio_close_cleanup): Remove.
8073 (target_fileio_read_alloc_1): Use scoped_target_fd.
8075 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8077 * silent-rules.mk: New.
8078 * Makefile.in: Include silent-rules.mk
8079 (srcdir, VPATH, top_srcdir): Move up.
8080 (COMPILE): Add ECHO_CXX.
8081 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8082 (init.c): Add ECHO_INIT_C.
8083 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8084 (version.c): Add ECHO_GEN.
8085 (printcmd.o): Add ECHO_CXX.
8086 (target-float.o): Add ECHO_CXX.
8087 (ada-exp.o): Add ECHO_CXX.
8088 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8089 (insight$(EXEEXT)): Add ECHO_CXXLD.
8090 * gnulib/configure.ac: Add AM_SILENT_RULES.
8091 * gnulib/aclocal.m4: Re-generate.
8092 * gnulib/configure: Re-generate.
8093 * gnulib/import/Makefile.in: Re-generate.
8095 2018-03-16 Tom Tromey <tom@tromey.com>
8097 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8098 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8099 * utils.c (do_free_section_addr_info)
8100 (make_cleanup_free_section_addr_info): Remove.
8101 * symfile.h (struct other_sections): Add constructor.
8102 (struct section_addr_info): Remove.
8103 (section_addr_info): New typedef.
8104 (struct sym_fns) <sym_offsets>: Change type of parameter.
8105 (build_section_addr_info_from_objfile)
8106 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8107 (default_symfile_offsets, symbol_file_add)
8108 (symbol_file_add_from_bfd)
8109 (build_section_addr_info_from_section_table): Update.
8110 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8111 * symfile.c (alloc_section_addr_info): Remove.
8112 (build_section_addr_info_from_section_table): Change return type.
8114 (build_section_addr_info_from_bfd)
8115 (build_section_addr_info_from_objfile): Likewise.
8116 (free_section_addr_info): Remove.
8117 (relative_addr_info_to_section_offsets): Change type of "addrs".
8118 (addrs_section_compar): Now a std::sort comparator.
8119 (addrs_section_sort): Change return type.
8120 (addr_info_make_relative): Change type of "addrs". Update.
8121 (default_symfile_offsets, syms_from_objfile_1)
8122 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8123 (symbol_file_add_separate): Update.
8124 (symbol_file_add): Change type of "addrs". Update.
8125 (add_symbol_file_command): Update. Remove cleanups.
8126 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8128 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8129 * solib.c (solib_read_symbols): Update.
8130 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8131 * machoread.c (macho_symfile_offsets): Update.
8132 * jit.c (jit_bfd_try_read_symtab): Update.
8134 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8136 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8137 unittests/utils-selftests.c.
8138 * unittests/utils-selftests.c: New file.
8140 2018-03-14 Tom Tromey <tom@tromey.com>
8143 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8146 2018-03-14 Tom Tromey <tom@tromey.com>
8149 * printcmd.c (printf_pointer): Allow "-" in format.
8151 2018-03-14 Tom Tromey <tom@tromey.com>
8153 * printcmd.c (_initialize_printcmd): Add usage to printf.
8155 2018-03-14 Yao Qi <qiyao@sourceware.org>
8157 * MAINTAINERS: Update my email address.
8159 2018-03-13 Tom Tromey <tom@tromey.com>
8161 * machoread.c (macho_check_dsym): Change filenamep to a
8163 (macho_symfile_read): Update.
8164 * symfile.c (load_command): Use std::string.
8166 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
8168 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8169 to error message string.
8170 (riscv_register_name): Use xsnprintf instead of sprintf.
8171 (riscv_insn::fetch_instruction): Use gdb_assert instead of
8173 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8175 (riscv_push_dummy_call): Likewise.
8177 2018-03-12 Tom Tromey <tom@tromey.com>
8179 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8180 Use gdb::byte_vector.
8181 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8183 2018-03-12 Yao Qi <yao.qi@linaro.org>
8185 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8186 parameter type to readable_regcache.
8187 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8190 2018-03-11 Tom Tromey <tom@tromey.com>
8192 * dwarf2read.c (struct nextfield): Add initializers.
8193 (struct nextfnfield): Remove.
8194 (struct fnfieldlist): Add initializers. Remove "length" and
8195 "head", use std::vector.
8196 (struct decl_field_list): Remove.
8197 (struct field_info): Add initializers.
8198 <fields, baseclasses>: Now std::vector.
8199 <nbaseclasses, nfnfields, typedef_field_list_count,
8200 nested_types_list_count>: Remove.
8201 (dwarf2_add_field, dwarf2_add_type_defn)
8202 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8203 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8204 (process_structure_scope): Update.
8206 2018-03-11 Tom Tromey <tom@tromey.com>
8208 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8209 for use by std::sort.
8210 (build_type_psymtabs_1): Use std::vector.
8212 2018-03-09 Eli Zaretskii <eliz@gnu.org>
8214 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8215 and LIBMPFR in the printed configuration.
8217 2018-03-08 Tom Tromey <tom@tromey.com>
8219 * source.c (get_filename_and_charpos): Use scoped_fd.
8220 * nto-procfs.c (procfs_open_1): Use scoped_fd.
8221 (procfs_pidlist): Likewise.
8222 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8223 (iterate_over_mappings): Likewise.
8225 2018-03-08 Tom Tromey <tom@tromey.com>
8227 * infcall.c (struct call_return_meta_info)
8228 <stack_temporaries_enabled>: Remove.
8229 (get_call_return_value, call_function_by_hand_dummy): Update.
8230 * thread.c (disable_thread_stack_temporaries): Remove.
8231 (enable_thread_stack_temporaries): Remove.
8232 (thread_stack_temporaries_enabled_p): Return bool.
8233 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8234 (get_last_thread_stack_temporary): Update.
8235 * eval.c (evaluate_subexp): Update.
8236 * gdbthread.h (class enable_thread_stack_temporaries): Now a
8237 class, not a function.
8238 (value_ptr, value_vec): Remove typedefs.
8239 (class thread_info) <stack_temporaries_enabled>: Now bool.
8240 <stack_temporaries>: Now a std::vector.
8241 (thread_stack_temporaries_enabled_p)
8242 (value_in_thread_stack_temporaries): Return bool.
8244 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
8246 * remote.c (putpkt_binary): Fix omitted bytes reporting.
8247 (getpkt_or_notif_sane_1): Likewise.
8249 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8251 * build-id.c (build_id_to_debug_bfd): Use std::string.
8253 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8255 * build-id.c (find_separate_debug_file_by_buildid): Return
8257 * build-id.h (find_separate_debug_file_by_buildid): Return
8259 * coffread.c (coff_symfile_read): Adjust to std::string.
8260 * elfread.c (elf_symfile_read): Adjust to std::string.
8261 * symfile.c (separate_debug_file_exists): Change parameter to
8263 (find_separate_debug_file): Return std::string.
8264 (find_separate_debug_file_by_debuglink): Return std::string.
8265 * symfile.h (find_separate_debug_file_by_debuglink): Return
8268 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8270 * common/xml-utils.c (xml_escape_text): Move code to...
8271 (xml_escape_text_append): ... this new function.
8272 * common/xml-utils.h (xml_escape_text_append): New declaration.
8273 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8275 (_initialize_xml_utils): register test_xml_escape_text_append as
8278 2018-03-07 Alan Hayward <alan.hayward@arm.com>
8280 * defs.h: Remove MAX_REGISTER_SIZE.
8281 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8283 * python/py-unwind.c (pyuw_sniffer): Likewise.
8285 2018-03-07 Tom Tromey <tom@tromey.com>
8287 * linux-tdep.c (linux_info_proc): Update.
8288 * target.h (struct target_ops) <to_fileio_readlink>: Return
8290 (target_fileio_readlink): Return optional<string>.
8291 * remote.c (remote_hostio_readlink): Return optional<string>.
8292 * inf-child.c (inf_child_fileio_readlink): Return
8294 * target.c (target_fileio_readlink): Return optional<string>.
8296 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
8298 * regcache.c (cooked_read_test): Add riscv to the list of
8299 architectures that have a save_reggroup.
8301 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
8303 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8304 value is not a dynamic class object.
8306 2018-03-06 Tom Tromey <tom@tromey.com>
8308 * rust-exp.y: Formatting fixes.
8310 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8312 * riscv-tdep.c (riscv_register_name): Remove target description
8314 (riscv_gdbarch_init): Remove target description check.
8316 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8318 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8320 * riscv-tdep.h: Likewise.
8322 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8324 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8325 (riscv_pseudo_register_write): Delete.
8326 (riscv_gdbarch_init): Remove all use of pseudo registers.
8328 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8330 * record-btrace.c (btrace_print_lines): Replace cleanup
8331 parameter with RAII equivalents.
8332 (btrace_insn_history): Replace cleanup with RAII equivalents.
8333 * ui-out.h (make_cleanup_ui_out_list_begin_end,
8334 make_cleanup_ui_out_tuple_begin_end): Remove.
8335 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8336 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8337 make_cleanup_ui_out_list_begin_end): Remove.
8339 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8341 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8342 parameter types to std::vector. Use bool.
8343 (record_btrace_wait): Replace VEC(tp_t) with
8344 std::vector<thread_info *>.
8345 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8347 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8349 * record-btrace.c (record_btrace_disable_callback): Remove.
8350 (struct scoped_btrace_disable): New.
8351 (record_btrace_open): Use scoped_btrace_disable.
8353 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8355 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8356 reading values from registers.
8358 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8360 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8363 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8365 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8366 change parameter type. Use GDB's print functions, and use
8367 core_addr_to_string where appropriate.
8368 (riscv_push_dummy_call): Use core_addr_to_string where
8369 appropriate, update call to riscv_print_arg_location, and reindent
8371 (riscv_return_value): Update call to riscv_print_arg_location.
8373 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8374 Tim Newsome <tim@sifive.com>
8375 Albert Ou <a0u@eecs.berkeley.edu>
8376 Darius Rad <darius@bluespec.com>
8378 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8379 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8380 (ALLDEPFILES): Add riscv-tdep.c
8381 * configure.tgt: Add riscv support.
8382 * riscv-tdep.c: New file.
8383 * riscv-tdep.h: New file.
8384 * NEWS: Mention new target.
8385 * MAINTAINERS: Add entry for riscv.
8387 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8389 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8390 fields within aggregates.
8392 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
8394 * record-btrace.c (btrace_print_lines): Change type of flags to
8395 gdb_disassembly_flags.
8397 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8399 * fbsd-nat.c: Include "inf-ptrace.h".
8400 (USE_SIGTRAP_SIGINFO): Conditionally define.
8401 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8402 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8403 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8405 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8407 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8409 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8410 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8411 "supports_stopped_by_hw_breakpoint" target methods.
8413 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8415 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8416 * fbsd-nat.c (debug_fbsd_nat): New variable.
8417 (show_fbsd_nat_debug): New function.
8418 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8419 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8421 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8423 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8424 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8426 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8427 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8430 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8432 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8433 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8435 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8437 * charset.c (struct charset_vector): New.
8438 (charsets): Change type to charset_vector.
8439 (find_charset_names): Adjust.
8441 (_initialize_charset): Adjust.
8443 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8445 * progspace.h (struct program_space) <deleted_solibs>: Change
8446 type to std::vector<std::string>.
8447 * progspace.c (clear_program_space_solib_cache): Adjust.
8448 * breakpoint.c (print_solib_event): Adjust.
8449 (check_status_catch_solib): Adjust.
8450 * solib.c (update_solib_list): Adjust.
8451 * ui-out.h (class ui_out) <field_string>: New overload.
8452 * ui-out.c (ui_out::field_string): New overload.
8454 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8456 * progspace.h (struct program_space): Add constructor and
8457 destructor, initialize fields.
8458 (add_program_space): Remove.
8459 * progspace.c (add_program_space): Rename to...
8460 (program_space::program_space): ... this.
8461 (release_program_space): Rename to...
8462 (program_space::~program_space): ... this.
8463 (delete_program_space): Use delete to delete program_space.
8464 (initialize_progspace): Use new to allocate program_space.
8465 * inferior.c (add_inferior_with_spaces): Likewise.
8466 (clone_inferior_command): Likewise.
8467 * infrun.c (follow_fork_inferior): Likewise.
8468 (handle_vfork_child_exec_or_exit): Likewise.
8470 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8472 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8473 (delim_string_to_char_ptr_vec): Return std::vector of
8474 gdb::unique_xmalloc_ptr.
8475 (dirnames_to_char_ptr_vec_append): Take std::vector of
8476 gdb::unique_xmalloc_ptr.
8477 (dirnames_to_char_ptr_vec): Return std::vector of
8478 gdb::unique_xmalloc_ptr.
8479 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8480 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8481 (delim_string_to_char_ptr_vec): Return an std::vector of
8482 gdb::unique_xmalloc_ptr, adjust the code.
8483 (dirnames_to_char_ptr_vec_append): Take an std::vector of
8484 gdb::unique_xmalloc_ptr, adjust the code.
8485 (dirnames_to_char_ptr_vec): Return an std::vector of
8486 gdb::unique_xmalloc_ptr, adjust the code.
8487 * auto-load.c (auto_load_safe_path_vec): Change type to
8488 std::vector of gdb::unique_xmalloc_ptr.
8489 (auto_load_expand_dir_vars): Return an std::vector of
8490 gdb::unique_xmalloc_ptr, adjust the code.
8491 (auto_load_safe_path_vec_update): Adjust.
8492 (filename_is_in_auto_load_safe_path_vec): Adjust.
8493 (auto_load_objfile_script_1): Adjust.
8494 * build-id.c (build_id_to_debug_bfd): Adjust.
8495 * linux-thread-db.c (thread_db_load_search): Adjust.
8496 * source.c (add_path): Adjust.
8498 * symfile.c (find_separate_debug_file): Adjust.
8499 * utils.c (do_free_char_ptr_vec): Remove.
8500 (make_cleanup_free_char_ptr_vec): Remove.
8502 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
8505 * common/pathstuff.c: Conditionally include "<windows.h>".
8507 2018-03-01 Georg Sauthoff <mail@georg.so>
8510 * gcore.in: Quote variables and switch interpreter to bash.
8512 2018-03-01 Tom Tromey <tom@tromey.com>
8514 * dwarf2read.c (alloc_discriminant_info): Fix default_index
8515 assertion. Add assertion for discriminant_index.
8516 (quirk_rust_enum): Use correct base type name in univariant case.
8518 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
8520 * record.c (get_call_history_modifiers): Return a
8522 (cmd_record_call_history): Adjust.
8523 * record-btrace.c (record_btrace_call_history): Adjust.
8524 (record_btrace_call_history_range): Adjust.
8525 (record_btrace_call_history_from): Adjust.
8526 * target-debug.h (target_debug_print_record_print_flags): New.
8527 * target-delegates.c: Re-generate.
8528 * target.c (target_call_history): Change flags type.
8529 (target_call_history_from): Likewise.
8530 (target_call_history_range): Likewise.
8531 * target.h (struct target_ops) <target_call_history>: Likewise.
8532 (target_call_history_from): Likewise.
8533 (target_call_history_range): Likewise.
8535 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8536 Simon Marchi <simon.marchi@polymtl.ca>
8538 * common/common-utils.c: Include "sys/stat.h".
8539 (is_regular_file): Move here from "source.c"; change return
8541 * common/common-utils.h (is_regular_file): New prototype.
8542 * common/pathstuff.c (contains_dir_separator): New function.
8543 * common/pathstuff.h (contains_dir_separator): New prototype.
8544 * source.c: Don't include "sys/stat.h".
8545 (is_regular_file): Move to "common/common-utils.c".
8547 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8549 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
8550 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
8551 * auto-load.c: Include "common/pathstuff.h".
8552 * common/common-def.h (current_directory): Move here.
8553 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
8555 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
8557 * common/pathstuff.c: New file.
8558 * common/pathstuff.h: New file.
8559 * compile/compile.c: Include "common/pathstuff.h".
8560 * defs.h (current_directory): Move to "common/common-defs.h".
8561 * dwarf2read.c: Include "common/pathstuff.h".
8563 * guile/scm-safe-call.c: Likewise.
8564 * linux-thread-db.c: Likewise.
8566 * nto-tdep.c: Likewise.
8567 * objfiles.c: Likewise.
8568 * source.c: Likewise.
8569 * symtab.c: Likewise.
8570 * utils.c: Include "common/pathstuff.h".
8571 (gdb_realpath): Move to "common/pathstuff.c".
8572 (gdb_realpath_keepfile): Likewise.
8573 (gdb_abspath): Likewise.
8574 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
8575 (gdb_realpath_keepfile): Likewise.
8576 (gdb_abspath): Likewise.
8578 2018-02-28 John Baldwin <jhb@FreeBSD.org>
8580 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
8581 wildcard process pid for super_resume for kernels with a
8584 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
8586 * compile/compile.c (get_args): Add additional comments
8587 explaining function.
8589 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
8590 Tom Tromey <tom@tromey.com>
8592 * target.h (memory_write_request_s): Remove typedef. Don't define
8594 (target_write_memory_blocks): Change argument to std::vector.
8595 (struct memory_write_request): Add constructor.
8596 * target-memory.c (compare_block_starting_address): Return bool.
8597 Change argument types.
8598 (claim_memory): Change arguments to use std::vector.
8599 (split_regular_and_flash_blocks, blocks_to_erase)
8600 (compute_garbled_blocks): Likewise.
8601 (cleanup_request_data, cleanup_write_requests_vector): Remove.
8602 (target_write_memory_blocks): Change argument to std::vector.
8603 * symfile.c (struct load_section_data): Add constructor and
8604 destructor. Use std::vector for "requests".
8605 (struct load_progress_data): Add initializers.
8606 (load_section_callback): Update. Use "new".
8607 (clear_memory_write_data): Remove.
8608 (generic_load): Update.
8610 2018-02-27 Alan Hayward <alan.hayward@arm.com>
8612 * arch/aarch64.h: Use common/tdesc.h.
8614 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8616 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
8617 architecture with a 64-bit ABI.
8619 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8621 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
8622 ahead of target description loading.
8624 2018-02-26 Tom Tromey <tom@tromey.com>
8626 * stack.c (backtrace_command_1): Update.
8627 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
8629 * python/py-framefilter.c (py_print_frame)
8630 (gdbpy_apply_frame_filter): Change type of "flags".
8631 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
8633 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
8634 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
8635 * extension.h (enum frame_filter_flag): Rename from
8637 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
8638 (apply_ext_lang_frame_filter): Change type of "flags".
8639 * extension.c (apply_ext_lang_frame_filter): Change type of
8641 * extension-priv.h (struct extension_language_ops)
8642 <apply_frame_filter>: Change type of "flags".
8644 2018-02-26 Tom Tromey <tom@tromey.com>
8647 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
8648 off-by-one in py_end computation.
8649 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
8651 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
8654 2018-02-26 Tom Tromey <tom@tromey.com>
8656 * dwarf2read.c (struct variant_field): New.
8657 (struct nextfield) <variant>: New field.
8658 (dwarf2_add_field): Handle DW_TAG_variant_part.
8659 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
8660 discriminated union.
8661 (read_structure_type): Handle DW_TAG_variant_part.
8662 (handle_struct_member_die): New function, extracted from
8663 process_structure_scope. Handle DW_TAG_variant.
8664 (process_structure_scope): Handle discriminated unions. Call
8665 handle_struct_member_die.
8667 2018-02-26 Tom Tromey <tom@tromey.com>
8669 * rust-lang.h (rust_last_path_segment): Declare.
8670 * rust-lang.c (rust_last_path_segment): Now public. Change
8672 (struct disr_info): Remove.
8673 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
8674 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
8675 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
8676 (rust_enum_p, rust_enum_variant): New function.
8677 (rust_underscore_fields): Remove "offset" parameter.
8678 (rust_print_enum): New function.
8679 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
8680 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
8681 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
8683 (rust_internal_print_type): New function, from rust_print_type.
8685 (rust_print_type): Call rust_internal_print_type.
8686 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
8687 Update enum handling.
8688 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
8689 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
8690 (rust_union_quirks): New functions.
8691 (process_full_comp_unit, process_full_type_unit): Call
8693 (process_structure_scope): Update rust_unions if necessary.
8695 2018-02-26 Tom Tromey <tom@tromey.com>
8697 * value.h (value_union_variant): Declare.
8698 * valops.c (value_union_variant): New function.
8699 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
8700 (struct discriminant_info): New.
8701 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
8703 (struct main_type) <flag_discriminated_union>: New field.
8705 2018-02-26 Tom Tromey <tom@tromey.com>
8707 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8708 unittests/unpack-selftests.c.
8709 * unittests/unpack-selftests.c: New file.
8710 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
8712 2018-02-26 Yao Qi <yao.qi@linaro.org>
8714 * dwarf2read.c (struct partial_die_info) <read>: New method.
8715 (read_partial_die): Remove the declaration.
8716 (load_partial_dies): Update.
8717 (partial_die_info::partial_die_info):
8718 (read_partial_die): Change it to partial_die_info::read.
8720 2018-02-26 Yao Qi <yao.qi@linaro.org>
8722 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
8723 (fixup_partial_die): Remove declaration.
8724 (scan_partial_symbols): Update.
8725 (partial_die_parent_scope): Likewise.
8726 (partial_die_full_name): Likewise.
8727 (fixup_partial_die): Change it to partial_die_info::fixup.
8729 2018-02-26 Yao Qi <yao.qi@linaro.org>
8731 * dwarf2read.c (read_partial_die): Update the declaration.
8732 (load_partial_dies): Caller update.
8733 (read_partial_die): Remove one argument abbrev_len.
8735 2018-02-26 Yao Qi <yao.qi@linaro.org>
8737 * dwarf2read.c (struct partial_die_info): Add ctor, delete
8738 assignment operator.
8739 (load_partial_dies): Use ctor and copy ctor.
8740 (read_partial_die): Update.
8741 (dwarf2_cu::find_partial_die): Use ctor.
8743 2018-02-26 Yao Qi <yao.qi@linaro.org>
8745 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
8746 (find_partial_die_in_comp_unit): Change it to
8747 dwarf2_cu::find_partial_die.
8748 (find_partial_die): Update.
8750 2018-02-26 Yao Qi <yao.qi@linaro.org>
8752 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
8755 2018-02-26 Yao Qi <yao.qi@linaro.org>
8757 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
8759 2018-02-26 Alan Hayward <alan.hayward@arm.com>
8761 * arch/amd64.h: Use common/tdesc.h.
8762 * arch/i386.c: Likewise.
8763 * arch/i386.h: Likewise.
8764 * arch/tic6x.c: Likewise.
8765 * arch/tdesc.h: Move file from here...
8766 * common/tdesc.h: ...to here.
8767 * features/aarch64-core.c: Regenerate.
8768 * features/aarch64-fpu.c: Regenerate.
8769 * features/i386/32bit-avx.c: Regenerate.
8770 * features/i386/32bit-avx512.c: Regenerate.
8771 * features/i386/32bit-core.c: Regenerate.
8772 * features/i386/32bit-linux.c: Regenerate.
8773 * features/i386/32bit-mpx.c: Regenerate.
8774 * features/i386/32bit-pkeys.c: Regenerate.
8775 * features/i386/32bit-sse.c: Regenerate.
8776 * features/i386/64bit-avx.c: Regenerate.
8777 * features/i386/64bit-avx512.c: Regenerate.
8778 * features/i386/64bit-core.c: Regenerate.
8779 * features/i386/64bit-linux.c: Regenerate.
8780 * features/i386/64bit-mpx.c: Regenerate.
8781 * features/i386/64bit-pkeys.c: Regenerate.
8782 * features/i386/64bit-segments.c: Regenerate.
8783 * features/i386/64bit-sse.c: Regenerate.
8784 * features/i386/x32-core.c: Regenerate.
8785 * features/tic6x-c6xp.c: Regenerate.
8786 * features/tic6x-core.c: Regenerate.
8787 * features/tic6x-gp.c: Regenerate.
8788 * target-descriptions.c: Use common/tdesc.h.
8789 * target-descriptions.h: Likewise.
8791 2018-02-24 Tom Tromey <tom@tromey.com>
8793 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
8794 (try_thread_db_load_from_dir, thread_db_load_search): Use
8796 (info_auto_load_libthread_db_compare): Return bool. Change
8798 (info_auto_load_libthread_db): Use std::vector, std::string.
8801 2018-02-24 Tom Tromey <tom@tromey.com>
8803 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
8805 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
8807 * gdbarch.c: Rebuild.
8808 * gdbarch.h: Rebuild.
8809 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
8810 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
8811 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
8814 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
8816 * gdbtypes.h (sect_offset): Change type to uint64_t.
8817 (sect_offset_str): New function.
8818 * dwarf2read.c (create_addrmap_from_aranges): Use
8820 (error_check_comp_unit_head): Likewise.
8821 (create_debug_type_hash_table): Likewise.
8822 (read_cutu_die_from_dwo): Likewise.
8823 (init_cutu_and_read_dies): Likewise.
8824 (init_cutu_and_read_dies_no_follow): Likewise.
8825 (process_psymtab_comp_unit_reader): Likewise.
8826 (partial_die_parent_scope): Likewise.
8827 (peek_die_abbrev): Likewise.
8828 (process_queue): Likewise.
8829 (dwarf2_physname): Likewise.
8830 (read_namespace_alias): Likewise.
8831 (read_import_statement): Likewise.
8832 (create_dwo_cu_reader): Likewise.
8833 (create_cus_hash_table): Likewise.
8834 (lookup_dwo_cutu): Likewise.
8835 (inherit_abstract_dies): Likewise.
8836 (read_func_scope): Likewise.
8837 (read_call_site_scope): Likewise.
8838 (dwarf2_add_member_fn): Likewise.
8839 (read_common_block): Likewise.
8840 (read_module_type): Likewise.
8841 (read_typedef): Likewise.
8842 (read_subrange_type): Likewise.
8843 (load_partial_dies): Likewise.
8844 (read_partial_die): Likewise.
8845 (find_partial_die): Likewise.
8846 (read_str_index): Likewise.
8847 (dwarf2_string_attr): Likewise.
8848 (build_error_marker_type): Likewise.
8849 (lookup_die_type): Likewise.
8850 (dump_die_shallow): Likewise.
8851 (follow_die_ref): Likewise.
8852 (dwarf2_fetch_die_loc_sect_off): Likewise.
8853 (dwarf2_fetch_constant_bytes): Likewise.
8854 (follow_die_sig): Likewise.
8855 (get_signatured_type): Likewise.
8856 (get_DW_AT_signature_type): Likewise.
8857 (dwarf2_find_containing_comp_unit): Likewise.
8858 (set_die_type): Likewise.
8860 2018-02-21 John Baldwin <jhb@FreeBSD.org>
8862 * arch/aarch64.c: Include "common-defs.h".
8863 * arch/amd64.c: Likewise.
8864 * arch/i386.c: Likewise.
8866 2018-02-21 Tom Tromey <tom@tromey.com>
8868 * value.h: (extract_field_op): Update.
8869 * eval.c (extract_field_op): Return a const char *.
8870 * expression.h (parse_expression_for_completion): Update.
8871 * completer.c (complete_expression): Update.
8872 (add_struct_fields): Make fieldname const.
8873 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
8874 (mark_completion_tag, parse_exp_in_context_1): Update.
8875 (parse_expression_for_completion): Change "name" to
8876 unique_xmalloc_ptr*.
8878 2018-02-21 Tom Tromey <tom@tromey.com>
8880 * infcall.c (call_function_by_hand_dummy): Use std::vector.
8882 2018-02-21 Yao Qi <yao.qi@linaro.org>
8884 * avr-tdep.c (avr_read_pc): Change parameter type to
8886 * gdbarch.sh (read_pc): Likewise.
8887 * gdbarch.c: Re-generated.
8888 * gdbarch.h: Re-generated.
8889 * hppa-tdep.c (hppa_read_pc): Change parameter type to
8891 * ia64-tdep.c (ia64_read_pc): Likewise.
8892 * mips-tdep.c (mips_read_pc): Likewise.
8893 * spu-tdep.c (spu_read_pc): Likewise.
8895 2018-02-21 Yao Qi <yao.qi@linaro.org>
8897 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
8898 * regcache-dump.c: New file.
8899 * regcache.c: Move register_dump to regcache-dump.c.
8900 (maintenance_print_registers): Likewise.
8901 (maintenance_print_raw_registers): Likewise.
8902 (maintenance_print_cooked_registers): Likewise.
8903 (maintenance_print_register_groups): Likewise.
8904 (maintenance_print_remote_registers): Likewise.
8905 (_initialize_regcache): Likewise.
8906 * regcache.h (register_dump): Moved from regcache.c.
8908 2018-02-21 Yao Qi <yao.qi@linaro.org>
8910 * regcache.c (regcache::regcache): Update.
8911 (regcache::invalidate): Move it to detached_regcache::invalidate.
8912 (get_thread_arch_aspace_regcache): Update.
8913 (regcache::raw_update): Update.
8914 (regcache::cooked_read): Remove some code.
8915 (regcache::cooked_read_value): Likewise.
8916 (regcache::raw_write): Remove assert on m_readonly_p.
8917 (regcache::raw_supply_integer): Move it to
8918 detached_regcache::raw_supply_integer.
8919 (regcache::raw_supply_zeroed): Likewise.
8920 * regcache.h (detached_regcache) <raw_supply_integer>: New
8922 <raw_supply_zeroed, invalidate>: Likewise.
8923 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
8924 <invalidate>: Likewise.
8925 <m_readonly_p>: Removed.
8927 2018-02-21 Yao Qi <yao.qi@linaro.org>
8929 * infcmd.c (get_return_value): Let stop_regs point to
8930 get_current_regcache.
8931 * regcache.c (regcache::regcache): Remove.
8932 (register_dump_reg_buffer): New class.
8933 (regcache_print): Adjust.
8934 * regcache.h (regcache): Remove constructors.
8936 2018-02-21 Yao Qi <yao.qi@linaro.org>
8938 * regcache.c (class register_dump): New class.
8939 (register_dump_regcache, register_dump_none): New class.
8940 (register_dump_remote, register_dump_groups): New class.
8941 (regcache_print): Update.
8942 * regcache.h (regcache_dump_what): Move it to regcache.c.
8943 (regcache) <dump>: Remove.
8945 2018-02-21 Yao Qi <yao.qi@linaro.org>
8947 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
8949 (jit_unwind_reg_set_impl): Call raw_supply.
8950 (jit_frame_sniffer): Use reg_buffer_rw.
8951 * record-full.c (record_full_core_regbuf): Change its type.
8952 (record_full_core_open_1): Use reg_buffer_rw.
8953 (record_full_close): Likewise.
8954 (record_full_core_fetch_registers): Use regcache->raw_supply.
8955 (record_full_core_store_registers): Likewise.
8956 * regcache.c (regcache::get_register_status): Move it to
8958 (regcache_raw_set_cached_value): Remove.
8959 (regcache::raw_set_cached_value): Remove.
8960 (regcache::raw_write): Call raw_supply.
8961 (regcache::raw_supply): Move it to reg_buffer_rw.
8962 * regcache.h (regcache_raw_set_cached_value): Remove.
8963 (reg_buffer_rw): New class.
8965 2018-02-21 Yao Qi <yao.qi@linaro.org>
8967 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
8968 readonly_detached_regcache.
8969 (dummy_frame_prev_register): Use regcache->cooked_read.
8970 * frame.c (frame_save_as_regcache): Change return type.
8971 (frame_pop): Update.
8972 * frame.h (frame_save_as_regcache): Update declaration.
8973 * inferior.h (get_infcall_suspend_state_regcache): Update
8975 * infrun.c (infcall_suspend_state) <registers>: use
8976 readonly_detached_regcache.
8977 (save_infcall_suspend_state): Don't use regcache_dup.
8978 (get_infcall_suspend_state_regcache): Change return type.
8979 * linux-fork.c (struct fork_info) <savedregs>: Change to
8980 readonly_detached_regcache.
8982 (fork_save_infrun_state): Don't use regcache_dup.
8983 (info_checkpoints_command): Adjust.
8984 * mi/mi-main.c (register_changed_p): Update declaration.
8985 (mi_cmd_data_list_changed_registers): Use
8986 readonly_detached_regcache.
8987 (register_changed_p): Change parameter type to
8988 readonly_detached_regcache.
8989 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
8990 readonly_detached_regcache.
8991 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
8992 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
8994 (regcache::save): Move it to reg_buffer.
8995 (regcache::restore): Change parameter type.
8996 (regcache_dup): Remove.
8997 * regcache.h (reg_buffer) <save>: New method.
8998 (readonly_detached_regcache): New class.
8999 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9000 readonly_detached_regcache.
9001 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9003 2018-02-21 Yao Qi <yao.qi@linaro.org>
9005 * frame.c (frame_save_as_regcache): Use regcache method save.
9006 (frame_pop): Use regcache method restore.
9007 * infrun.c (restore_infcall_suspend_state): Likewise.
9008 * linux-fork.c (fork_load_infrun_state): Likewise.
9009 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9011 * regcache.c (regcache_save): Remove.
9012 (regcache::restore): More asserts.
9013 (regcache_cpy): Remove.
9014 * regcache.h (regcache_save): Remove the declaration.
9015 (regcache::restore): Move from private to public.
9016 Remove the friend declaration of regcache_cpy.
9017 (regcache_cpy): Remove declaration.
9019 2018-02-21 Yao Qi <yao.qi@linaro.org>
9021 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9022 parameter type to 'readable_regcache *'.
9023 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9024 * arm-tdep.c (arm_neon_quad_read): Likewise.
9025 (arm_pseudo_read): Likewise.
9026 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9027 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9028 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9029 * gdbarch.c: Re-generated.
9030 * gdbarch.h: Re-generated.
9031 * gdbarch.sh (pseudo_register_read): Change parameter type to
9032 'readable_regcache *'.
9033 (pseudo_register_read_value): Likewise.
9034 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9035 (h8300_pseudo_register_read): Likewise.
9036 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9037 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9038 (i386_pseudo_register_read_into_value): Likewise.
9039 (i386_pseudo_register_read_value): Likewise.
9040 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9042 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9043 * m32c-tdep.c (m32c_raw_read): Likewise.
9044 (m32c_read_flg): Likewise.
9045 (m32c_banked_register): Likewise.
9046 (m32c_banked_read): Likewise.
9047 (m32c_sb_read): Likewise.
9048 (m32c_part_read): Likewise.
9049 (m32c_cat_read): Likewise.
9050 (m32c_r3r2r1r0_read): Likewise.
9051 (m32c_pseudo_register_read): Likewise.
9052 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9053 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9054 (mep_pseudo_cr64_read): Likewise.
9055 (mep_pseudo_register_read): Likewise.
9056 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9057 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9058 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9059 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9060 (regcache::cooked_read): Likewise.
9061 (regcache::cooked_read_value): Likewise.
9062 (regcache_cooked_read_signed):
9063 (regcache::cooked_read): Likewise.
9064 * regcache.h (readable_regcache): New class.
9065 (regcache): Inherit readable_regcache. Move some methods to
9067 * rl78-tdep.c (rl78_pseudo_register_read): Change
9068 parameter type to 'readable_regcache *'.
9069 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9070 (e500_pseudo_register_read): Change parameter type to
9071 'readable_regcache *'.
9072 (dfp_pseudo_register_read): Likewise.
9073 (vsx_pseudo_register_read): Likewise.
9074 (efpr_pseudo_register_read): Likewise.
9075 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9076 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9077 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9078 (sh64_pseudo_register_read): Likewise.
9079 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9080 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9081 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9082 (spu_pseudo_register_read): Likewise.
9083 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9084 (xtensa_pseudo_register_read): Likewise.
9086 2018-02-21 Yao Qi <yao.qi@linaro.org>
9088 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9089 (regcache::arch): Move it to reg_buffer::arch.
9090 (regcache::register_buffer): Likewise.
9091 (regcache::assert_regnum): Likewise.
9092 (regcache::num_raw_registers): Likewise.
9093 * regcache.h (reg_buffer): New class.
9094 (regcache): Inherit reg_buffer.
9096 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9098 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9099 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9101 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9103 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9105 2018-02-19 Alan Hayward <alan.hayward@arm.com>
9107 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9108 (SFILES): Remove common/*.c files.
9109 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9110 * common/common.host: Add common reference.
9111 * configure.ac: Likewise.
9112 * configure: Regenerate.
9114 2018-02-16 Yao Qi <yao.qi@linaro.org>
9116 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9117 (block_initialize_namespace): Use new.
9118 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9119 (dwarf2_free_objfile): Use delete.
9120 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9121 (copy_type_recursive): Use new.
9122 * gdb_obstack.h (allocate_on_obstack): New.
9124 2018-02-15 Yao Qi <yao.qi@linaro.org>
9127 * inferior.c (exit_inferior_1): Reset inf->control.
9129 2018-02-15 Joel Brobecker <brobecker@adacore.com>
9131 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9134 2018-02-14 Pedro Alves <palves@redhat.com>
9136 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9137 frame_cleanup_after_sniffer on exception.
9139 2018-02-14 Tom Tromey <tom@tromey.com>
9141 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9143 (solib_bfd_open): Make pathname const.
9144 * solib.c (solib_bfd_open): Make pathname const.
9145 * solib-spu.c (spu_bfd_fopen): Make name const.
9146 (spu_bfd_open): Make pathname const.
9147 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9148 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9150 2018-02-14 Tom Tromey <tom@tromey.com>
9152 * symfile.c (symfile_bfd_open): Update.
9153 * source.h (openp, source_full_path_of, find_and_open_source):
9154 Change argument type to unique_xmalloc_ptr.
9155 * source.c (openp): Take a unique_xmalloc_ptr.
9156 (source_full_path_of, find_and_open_source): Likewise.
9157 (open_source_file, symtab_to_fullname): Update.
9158 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9160 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9161 (exec_file_find): Update.
9162 * psymtab.c (psymtab_to_fullname): Update.
9163 * nto-tdep.h (nto_find_and_open_solib): Update.
9164 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9166 * exec.c (exec_file_attach): Update.
9167 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9168 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9170 2018-02-14 Tom Tromey <tom@tromey.com>
9172 * solib.c: Include source.h.
9173 * nto-tdep.c: Include source.h.
9174 * mi/mi-cmd-env.c: Include source.h.
9175 * infcmd.c: Include source.h.
9176 * exec.c: Include source.h.
9177 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9178 (add_path, directory_switch, source_path, init_source_path): Move
9180 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9181 (add_path, directory_switch, source_path, init_source_path):
9184 2018-02-14 Tom Tromey <tom@tromey.com>
9186 * solist.h (exec_file_find, solib_find): Return
9188 (solib_bfd_fopen): Take a const char *.
9189 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9190 (exec_file_find, solib_find): Likewise.
9191 (solib_bfd_fopen): Do not take ownership of "pathname".
9192 (solib_bfd_open): Use unique_xmalloc_ptr.
9193 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9194 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9195 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9196 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9198 2018-02-14 Joel Brobecker <brobecker@adacore.com>
9200 * ada-lang.c (name_match_type_from_name): Remove reference to
9201 ada_name_for_lookup in function's documentation.
9202 * ada-lang.h (ada_name_for_lookup): Delete declaration.
9204 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9206 * defs.h (enum openp_flags): New enum.
9207 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9208 Move to enum openp_flags.
9209 (openp_flags): New enum flags.
9210 (openp): Change parameter type to openp_flags.
9211 * source.c (openp): Change parameter type to openp_flags.
9212 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9213 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9215 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9217 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9220 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
9222 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9224 (class dwarf2_queue_guard): ...the destructor of this new class.
9225 (dw2_do_instantiate_symtab): Create instance of the new class
9226 dwarf2_queue_guard, remove cleanup.
9228 2018-02-09 Tom Tromey <tom@tromey.com>
9230 * source.c (find_source_lines): Don't reference past the end of
9233 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9235 * remote.c (remote_btrace_maybe_reopen): Change error message.
9236 * btrace.c (btrace_enable): Likewise.
9237 (parse_xml_btrace): Likewise.
9238 (parse_xml_btrace_conf): Likewise.
9240 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9242 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9243 (linux_enable_pt, linux_enable_bts): Call
9244 diagnose_perf_event_open_fail.
9246 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9248 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9249 Remove parameter and change return type. Update callers. Move it.
9250 (linux_enable_bts, linux_enable_pt): Improve error message.
9251 (linux_enable_pt): Remove zero buffer size check.
9252 (linux_enable_btrace): Improve error messages. Remove NULL return
9255 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9257 * btrace.c (btrace_enable): Remove target_supports_btrace call.
9258 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9259 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9260 (linux_supports_pt, linux_supports_btrace): Remove.
9261 (linux_enable_bts): Call cpu_supports_bts.
9262 * nat/linux-btrace.h (linux_supports_btrace): Remove.
9263 * remote.c (remote_supports_btrace): Remove.
9264 (init_remote_ops): Remove remote_supports_btrace.
9265 * target-delegates.c: Regenerated.
9266 * target.c (target_supports_btrace): Remove.
9267 * target.h (target_ops) <to_supports_btrace>: Remove
9268 (target_supports_btrace): Remove.
9269 * x86-linux-nat.c (x86_linux_create_target): Remove
9270 linux_supports_btrace.
9272 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9274 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9276 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9277 exception and use message in own exception.
9279 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9281 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9282 (perf_event_pt_event_type): Use gdb_file_up.
9283 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9284 scoped_fd, and scoped_mmap.
9286 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9288 * common/scoped_mmap.h: New.
9289 * unittests/scoped_mmap-selftest.c: New.
9290 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9291 unittests/scoped_mmap-selftest.c.
9293 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9295 * common/scoped_fd.h: New.
9296 * unittests/scoped_fd-selftest.c: New.
9297 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9298 unittests/scoped_fd-selftest.c.
9300 2018-02-09 Tom Tromey <tom@tromey.com>
9302 * auto-load.c (auto_load_section_scripts): Use
9303 gdb::unique_xmalloc_ptr.
9305 2018-02-09 Tom Tromey <tom@tromey.com>
9307 * auto-load.c (execute_script_contents): Use std::string.
9309 2018-02-09 Joel Brobecker <brobecker@adacore.com>
9311 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9312 Python function, rather than a new command.
9314 2018-02-08 Tom Tromey <tom@tromey.com>
9316 * solib.c (solib_find_1): Use std::string.
9317 (solib_bfd_fopen): Use unique_xmalloc_ptr.
9319 2018-02-08 Tom Tromey <tom@tromey.com>
9321 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9323 2018-02-08 Tom Tromey <tom@tromey.com>
9325 * source.c (find_source_lines): Use gdb::def_vector.
9327 2018-02-08 Tom Tromey <tom@tromey.com>
9329 * macrocmd.c (struct temporary_macro_definition): New.
9330 (macro_define_command): Use temporary_macro_definition. Remove
9332 (free_macro_definition_ptr): Remove.
9334 2018-02-08 Tom Tromey <tom@tromey.com>
9336 * macroexp.c (maybe_expand): Use std::string.
9338 2018-02-08 Tom Tromey <tom@tromey.com>
9340 * macroexp.c (struct macro_buffer): Add initializers for some
9342 (init_buffer, init_shared_buffer, free_buffer)
9343 (free_buffer_return_text): Remove.
9344 (macro_buffer): New constructors.
9345 (~macro_buffer): New destructor.
9346 (macro_buffer::set_shared): New method.
9347 (macro_buffer::resize_buffer, macro_buffer::appendc)
9348 (macro_buffer::appendmem): Now methods, not free functions.
9349 (set_token, append_tokens_without_splicing, stringify)
9350 (macro_stringify): Update.
9351 (gather_arguments): Change return type. Remove argc_p argument,
9352 add args_ptr argument. Use std::vector.
9353 (substitute_args): Remove argc argument. Accept std::vector.
9354 (expand): Update. Use std::vector.
9355 (scan, macro_expand, macro_expand_next): Update.
9357 2018-02-08 Tom Tromey <tom@tromey.com>
9359 * symtab.c (default_collect_symbol_completion_matches_break_on):
9360 Use unique_xmalloc_ptr.
9361 * macroscope.h: (sal_macro_scope, user_macro_scope)
9362 (default_macro_scope): Return unique_xmalloc_ptr.
9363 * macroscope.c (sal_macro_scope, user_macro_scope)
9364 (default_macro_scope): Return unique_xmalloc_ptr.
9365 * macroexp.h (macro_expand, macro_expand_once): Return
9367 * macroexp.c (macro_expand, macro_expand_once): Return
9369 * macrocmd.c (macro_expand_command, macro_expand_once_command)
9370 (info_macro_command, info_macros_command): Use
9372 * compile/compile-c-support.c (write_macro_definitions): Use
9374 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9376 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
9378 * value.c (value_static_field): Assign field type instead of
9379 containing type when returning an optimized out value.
9381 2018-02-06 Yao Qi <yao.qi@linaro.org>
9383 * ft32-tdep.c (ft32_read_pc): Remove.
9384 (ft32_write_pc): Remove.
9385 (ft32_gdbarch_init): Update.
9386 * m32r-tdep.c (m32r_read_pc): Remove.
9387 (m32r_gdbarch_init): Update.
9388 * mep-tdep.c (mep_read_pc): Remove.
9389 (mep_gdbarch_init): Update.
9390 * microblaze-tdep.c (microblaze_write_pc): Remove.
9391 (microblaze_gdbarch_init): Update.
9392 * mn10300-tdep.c (mn10300_read_pc): Remove.
9393 (mn10300_write_pc): Remove.
9394 (mn10300_gdbarch_init): Update.
9395 * moxie-tdep.c (moxie_read_pc): Remove.
9396 (moxie_write_pc): Remove.
9397 (moxie_gdbarch_init): Update.
9399 2018-02-06 Yao Qi <yao.qi@linaro.org>
9401 * expprint.c (print_subexp_standard): Handle
9402 OP_F77_UNDETERMINED_ARGLIST.
9403 (dump_subexp_body_standard): Likewise.
9405 2018-02-05 Alan Hayward <alan.hayward@arm.com>
9407 * target-descriptions.c (tdesc_element_visitor) Add empty
9409 (tdesc_type): Move make_gdb_type from here.
9410 (tdesc_type_builtin): Likewise.
9411 (tdesc_type_vector): Likewise.
9412 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9413 (make_gdb_type_struct): Move from tdesc_type_with_fields.
9414 (make_gdb_type_union): Likewise.
9415 (make_gdb_type_flags): Likewise.
9416 (make_gdb_type_enum): Likewise.
9417 (make_gdb_type): New function.
9418 (tdesc_register_type): Use static make_gdb_type.
9420 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
9422 * infcmd.c (default_print_one_register_info): Align natural-format
9423 column values consistently one under another.
9424 (pad_to_column): New function.
9426 2018-02-05 Joel Brobecker <brobecker@adacore.com>
9428 * dwarf2read.c (dwarf2_physname): Move commment.
9430 2018-02-01 Leszek Swirski <leszeks@google.com>
9432 * varobj.c (varobj_formatted_print_options): Allow recursive
9433 pretty printing if pretty printing is enabled.
9435 2018-02-01 Leszek Swirski <leszeks@google.com>
9437 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9438 names after a structop as a filename.
9440 2018-02-01 Yao Qi <yao.qi@linaro.org>
9442 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9443 (arm_record_coproc_data_proc): Likewise.
9445 2018-02-01 Yao Qi <yao.qi@linaro.org>
9447 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9449 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
9451 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9452 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9454 2018-01-31 Pedro Alves <palves@redhat.com>
9456 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9457 * inflow.c (child_terminal_save_inferior): Wrap reference to
9458 tcgetpgrp in HAVE_TERMIOS_H.
9459 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9461 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9462 always iterate over all inferiors.
9463 (gdbsim_cntrl_c): Adjust.
9464 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9466 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9468 * gdbtypes.c (lookup_array_range_type): Make sure the array's
9469 index type is objfile-owned if the element type is as well.
9471 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9475 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
9477 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9478 "features/s390x-linux64.c".
9479 (_initialize_s390_linux_tdep): Remove initialization of tdescs
9480 s390_linux32 and s390x_linux64.
9481 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9483 * s390-tdep.c: Include "features/s390-linux32.c" and
9484 "features/s390x-linux64.c".
9485 (s390_tdesc_valid): Add check for tdesc_has_registers.
9486 (s390_gdbarch_init): Make sure there is always a valid tdesc.
9487 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9488 tdesc_s390x_linux64.
9489 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9490 tdesc_s390x_linux64 to...
9491 * s390-tdep.h: ...here.
9493 2018-01-30 Pedro Alves <palves@redhat.com>
9496 * config.in, configure: Regenerate.
9497 * configure.ac: Check for getpgid.
9498 * go32-nat.c (go32_pass_ctrlc): New.
9499 (go32_target): Install it.
9500 * inf-child.c (inf_child_target): Install
9501 child_terminal_save_inferior, child_pass_ctrlc and
9503 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9504 (inf_ptrace_target): No longer install it.
9505 * infcmd.c (interrupt_target_1): Adjust.
9506 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9507 (child_interrupt): Declare.
9508 (inferior::terminal_state): New.
9509 * inflow.c (struct terminal_info): Update comments.
9510 (inferior_process_group): Delete.
9511 (terminal_is_ours): Delete.
9512 (gdb_tty_state): New.
9513 (child_terminal_init): Adjust.
9514 (is_gdb_terminal, sharing_input_terminal_1)
9515 (sharing_input_terminal): New functions.
9516 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
9517 Set the process's actual process group in the foreground if
9518 possible. Handle is_ours_for_output/is_ours distinction. Don't
9519 mark terminal as the inferior's if not sharing GDB's terminal.
9520 Don't check attach_flag.
9521 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9522 pass down a target_terminal_state.
9523 (child_terminal_save_inferior): New, factored out from ...
9524 (child_terminal_ours_1): ... this. Handle
9525 target_terminal_state::is_ours_for_output.
9526 (child_interrupt, child_pass_ctrlc): New.
9527 (inflow_inferior_exit): Clear the inferior's terminal_state.
9528 (copy_terminal_info): Copy the inferior's terminal state.
9529 (_initialize_inflow): Remove reference to terminal_is_ours.
9530 * inflow.h (inferior_process_group): Delete.
9531 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9532 * procfs.c (procfs_target): Don't install procfs_interrupt.
9533 (procfs_interrupt): Delete.
9534 * remote.c (remote_serial_quit_handler): Adjust.
9535 (remote_interrupt): Remove ptid parameter. Adjust.
9536 * target-delegates.c: Regenerate.
9537 * target.c: Include "terminal.h".
9538 (target_terminal::terminal_state): Rename to ...
9539 (target_terminal::m_terminal_state): ... this.
9540 (target_terminal::init): Adjust.
9541 (target_terminal::inferior): Adjust to per-inferior
9543 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
9544 (target_terminal::ours, target_terminal::ours_for_output): Use
9545 target_terminal_is_ours_kind.
9546 (target_interrupt): Remove ptid parameter. Adjust.
9547 (default_target_pass_ctrlc): Adjust.
9548 * target.h (target_ops::to_terminal_save_inferior): New field.
9549 (target_ops::to_interrupt): Remove ptid_t parameter.
9550 (target_interrupt): Remove ptid_t parameter. Update comment.
9551 (target_pass_ctrlc): Update comment.
9552 * target/target.h (target_terminal_state): New scoped enum,
9554 (target_terminal::terminal_state): ... here.
9555 (target_terminal::inferior): Update comments.
9556 (target_terminal::restore_inferior): New.
9557 (target_terminal::is_inferior, target_terminal::is_ours)
9558 (target_terminal::is_ours_for_output): Adjust.
9559 (target_terminal::scoped_restore_terminal_state): Adjust to
9560 rename, and call restore_inferior() instead of inferior().
9561 (target_terminal::scoped_restore_terminal_state::m_state): Change
9563 (target_terminal::terminal_state): Rename to ...
9564 (target_terminal::m_terminal_state): ... this and change type.
9566 2018-01-30 Pedro Alves <palves@redhat.com>
9568 * linux-nat.c (wait_for_signal): New function.
9569 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
9571 (async_terminal_is_ours)
9572 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
9573 (linux_nat_add_target): Don't override
9574 to_terminal_inferior/to_terminal_ours.
9576 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
9578 * remote.c (remote_follow_fork): Don't call "detach_inferior".
9580 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
9582 * dwarf2read.c (free_dwo_files): Add forward-declaration.
9583 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
9584 dwarf2_per_objfile_free here.
9585 (dwarf2_per_objfile_free): Remove.
9586 (_initialize_dwarf2_read): Don't register
9587 dwarf2_per_objfile_free as a registry cleanup.
9589 2018-01-27 Eli Zaretskii <eliz@gnu.org>
9591 Avoid compilation errors in MinGW native builds
9593 The error is triggered by including python-internal.h, and the
9596 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
9597 from build-gnulib/import/math.h:27,
9598 from d:/usr/Python26/include/pyport.h:235,
9599 from d:/usr/Python26/include/Python.h:58,
9600 from python/python-internal.h:94,
9601 from python/py-arch.c:24:
9602 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
9606 This happens because Python headers define 'hypot' to expand t
9607 '_hypot' in the Windows builds.
9608 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
9609 'hypoth'. This avoids a compilation error.
9611 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9613 * MAINTAINERS (Write After Approval): Fix ordering.
9615 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9617 * MAINTAINERS (Write After Approval): Add Alan Hayward.
9619 2018-01-26 Alan Modra <amodra@gmail.com>
9621 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
9622 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
9623 Remove nop. Make const. Comment.
9624 (powerpc32_plt_stub_so_2): New.
9625 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
9626 Correct count. Update uses.
9627 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
9628 Move common code reading PLT entry word. Correct
9629 powerpc32_plt_stub PLT address calculation.
9630 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
9631 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
9632 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
9633 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
9634 (ppc64_standard_linkage8): Likewise.
9635 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
9636 Correct insns description.
9637 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
9639 2018-01-24 Pedro Alves <palves@redhat.com>
9641 GCC PR libstdc++/83906
9642 * gdbtypes.c (operator==(const dynamic_prop &,
9643 const dynamic_prop &)): New.
9644 (operator==(const range_bounds &, const range_bounds &)): New.
9645 (check_types_equal): Use them instead of memcmp.
9646 * gdbtypes.h (operator==(const dynamic_prop &,
9647 const dynamic_prop &)): Declare.
9648 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
9649 (operator==(const range_bounds &, const range_bounds &)): Declare.
9650 (operator!=(const range_bounds &, const range_bounds &)): Declare.
9652 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9654 * s390-linux-tdep.c (s390_record_address_mask)
9655 (s390_record_calc_disp_common, s390_record_calc_disp)
9656 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9657 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9658 (s390_process_record): Move to s390-tdep.c.
9659 (s390_linux_init_abi_any): Adjust.
9660 * s390-tdep.c (s390_record_address_mask)
9661 (s390_record_calc_disp_common, s390_record_calc_disp)
9662 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9663 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9664 (s390_process_record): Moved from s390-linux-tdep.c
9665 (s390_gdbarch_init): Adjust.
9667 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9669 * s390-linux-nat.c (s390-tdep.h): New include.
9670 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
9671 (HFILES_NO_SRCDIR): Add s390-tdep.h.
9672 (ALLDEPFILES): Add s390-tdep.c.
9673 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
9674 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
9675 * s390-tdep.h: ...this. New file.
9676 * s390-linux-tdep.c (s390-tdep.h): New include.
9677 (_initialize_s390_tdep): Rename to...
9678 (_initialize_s390_linux_tdep): ...this and adjust.
9679 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
9680 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
9682 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
9683 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
9684 (s390_is_partial_instruction, s390_software_single_step)
9685 (is_non_branch_ril, s390_displaced_step_copy_insn)
9686 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
9687 (s390_prologue_data, s390_addr, s390_store, s390_load)
9688 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
9689 (s390_register_call_saved, s390_guess_tracepoint_registers)
9690 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
9691 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
9692 (s390_pseudo_register_name, s390_pseudo_register_type)
9693 (s390_pseudo_register_read, s390_pseudo_register_write)
9694 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
9695 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
9696 (s390_addr_bits_remove, s390_address_class_type_flags)
9697 (s390_address_class_type_flags_to_name)
9698 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
9699 (s390_function_arg_float, s390_function_arg_vector)
9700 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
9701 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
9702 (s390_frame_align, s390_register_return_value, s390_return_value)
9703 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
9704 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
9705 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
9706 (s390_trad_frame_prev_register, s390_unwind_cache)
9707 (s390_prologue_frame_unwind_cache)
9708 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
9709 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
9710 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
9711 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
9712 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
9713 (s390_frame_base_address, s390_local_base_address)
9714 (s390_frame_base, s390_gcc_target_options)
9715 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
9716 (s390_validate_reg_range, s390_tdesc_valid)
9717 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
9718 * s390-tdep.c: ...this. New file.
9720 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9722 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
9723 (s390_process_record, s390_gdbarch_tdep_alloc)
9724 (s390_linux_init_abi_any): Use/set new hook.
9726 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9728 * s390-linux-tdep.c (osabi.h): New include.
9729 (s390_linux_init_abi_31, s390_linux_init_abi_64)
9730 (s390_linux_init_abi_any): New functions.
9731 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
9733 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9735 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
9736 tdesc_has_registers check
9738 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9740 * s390-linux-tdep.c (s390_tdesc_valid): New function.
9741 (s390_validate_reg_range): New macro.
9742 (s390_gdbarch_init): Adjust.
9744 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9746 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
9747 (s390_gdbarch_tdep_alloc): Adjust.
9748 (s390_gdbarch_init): Adjust.
9750 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9752 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
9753 <have_tdb>: Change type to bool.
9754 (s390_gdbarch_tdep_alloc): Adjust.
9755 (s390_gdbarch_init): Adjust.
9757 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9759 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
9760 (gdbarch_tdep) <have_upper, have_vx>: New fields.
9761 (s390_gdbarch_tdep_alloc): New function.
9762 (s390_gdbarch_init): Allocate tdep at start and use its fields
9763 instead of separate variables.
9765 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9767 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
9768 when looking for cached gdbarch and add comment for remaining.
9770 2018-01-22 Pedro Alves <palves@redhat.com>
9771 Sergio Durigan Junior <sergiodj@redhat.com>
9773 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
9776 2018-01-22 Maciej W. Rozycki <macro@mips.com>
9778 * MAINTAINERS: Update my company e-mail address.
9780 2018-01-22 Yao Qi <yao.qi@linaro.org>
9782 * regcache.c (cooked_write_test): New function.
9783 (_initialize_regcache): Register the test.
9785 2018-01-22 Yao Qi <yao.qi@linaro.org>
9787 * ia64-tdep.c (ia64_pseudo_register_read): Call
9788 regcache->cooked_read instead of regcache_cooked_read_unsigned.
9789 * m32c-tdep.c (m32c_cat_read): Likewise.
9790 (m32c_r3r2r1r0_read): Likewise.
9791 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9792 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9794 2018-01-22 Yao Qi <yao.qi@linaro.org>
9796 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
9797 method raw_read instead of regcache_raw_read.
9798 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9799 * arm-tdep.c (arm_neon_quad_read): Likewise.
9800 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9801 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9802 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9803 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
9804 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9805 (i386_pseudo_register_read_into_value): Likewise.
9806 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9807 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9808 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9809 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
9810 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
9811 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9812 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9813 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9814 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
9816 2018-01-22 Yao Qi <yao.qi@linaro.org>
9818 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
9819 * configure.tgt: Remove target mt.
9820 * mt-tdep.c: Remove.
9821 * regcache.c (cooked_read_test): Remove the check for mt.
9823 2018-01-22 Yao Qi <yao.qi@linaro.org>
9825 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
9826 instead of gdbarch_pseudo_register_read_value.
9828 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9830 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
9833 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9835 * linespec.c (create_sals_line_offset): Remove code that preserved
9836 the symtab_and_line's line number.
9838 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9840 * varobj.c (varobj_create): Don't set valid_block when creating a
9843 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9845 * varobj.c (varobj_create): Remove out of date comment.
9847 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9850 * ada-exp.y (write_var_from_sym): Pass extra parameter when
9851 updating innermost block.
9852 * parse.c (innermost_block_tracker::update): Take extra type
9853 parameter, and check types match before updating innermost block.
9854 (write_dollar_variable): Update innermost block for registers.
9855 * parser-defs.h (enum innermost_block_tracker_type): New enum.
9856 (innermost_block_tracker::innermost_block_tracker): Initialise
9858 (innermost_block_tracker::reset): Take type parameter.
9859 (innermost_block_tracker::update): Take type parameter, and pass
9860 type through as needed.
9861 (innermost_block_tracker::m_types): New member.
9862 * varobj.c (varobj_create): Pass type when reseting innermost
9865 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9867 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
9868 * ada-lang.c (resolve_subexp): Likewise.
9869 * breakpoint.c (set_breakpoint_condition) Likewise.
9870 (watch_command_1) Likewise.
9871 * c-exp.y (variable): Likewise.
9872 * d-exp.y (PrimaryExpression): Likewise.
9873 * f-exp.y (variable): Likewise.
9874 * go-exp.y (variable): Likewise.
9875 * m2-exp.y (variable): Likewise.
9876 * objfiles.c (objfile::~objfile): Likewise.
9877 * p-exp.y (variable): Likewise.
9878 * parse.c (innermost_block): Change type.
9879 * parser-defs.h (class innermost_block_tracker): New.
9880 (innermost_block): Change to innermost_block_tracker.
9881 * printcmd.c (display_command): Switch to innermost_block API.
9882 (do_one_display): Likewise.
9883 * rust-exp.y (do_one_display): Likewise.
9884 * symfile.c (clear_symtab_users): Likewise.
9885 * varobj.c (varobj_create): Switch to innermost_block API, replace
9886 use of innermost_block with block stored on varobj object.
9888 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9890 * expression.h (innermost_block): Remove declaration.
9891 * varobj.c: Add 'parser-defs.h' include.
9893 2018-01-19 Tom Tromey <tom@tromey.com>
9895 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
9896 symbols in the static and global blocks.
9898 2018-01-19 James Clarke <jrtc27@jrtc27.com>
9900 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
9901 gdb_ptrace.h, and move including gdb_wait.h ...
9902 * nat/linux-ptrace.h: ... to here.
9904 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9906 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
9907 inf_ptrace_detach_success.
9908 (inf_ptrace_detach_success): Add inferior parameter, use it
9909 instead of inferior_ptid, pass it to detach_inferior.
9910 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
9912 * inferior.c (detach_inferior): Add overload that takes an
9914 * inferior.h (detach_inferior): Likewise.
9915 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
9916 use inferior_ptid, adjust call to inf_ptrace_detach_success.
9917 * linux-thread-db.c (thread_db_detach): Use inf parameter.
9919 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9921 * target.h (struct target_ops) <to_detach>: Add inferior
9923 (target_detach): Likewise.
9924 * target.c (dispose_inferior): Pass inferior down.
9925 (target_detach): Pass inferior down. Assert that it is equal to
9926 the current inferior.
9927 * aix-thread.c (aix_thread_detach): Pass inferior down.
9928 * corefile.c (core_file_command): Pass current_inferior() down.
9929 * corelow.c (core_detach): Add inferior parameter.
9930 * darwin-nat.c (darwin_detach): Likewise.
9931 * gnu-nat.c (gnu_detach): Likewise.
9932 * inf-ptrace.c (inf_ptrace_detach): Likewise.
9933 * infcmd.c (detach_command): Pass current_inferior() down to
9935 * infrun.c (follow_fork_inferior): Pass parent_inf to
9937 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
9939 * linux-nat.c (linux_nat_detach): Add inferior parameter.
9940 * linux-thread-db.c (thread_db_detach): Likewise.
9941 * nto-procfs.c (procfs_detach): Likewise.
9942 * procfs.c (procfs_detach): Likewise.
9943 * record.c (record_detach): Likewise.
9944 * record.h (struct inferior): Forward-declare.
9945 (record_detach): Add inferior parameter.
9946 * remote-sim.c (gdbsim_detach): Likewise.
9947 * remote.c (remote_detach_1): Likewise.
9948 (remote_detach): Likewise.
9949 (extended_remote_detach): Likewise.
9950 * sol-thread.c (sol_thread_detach): Likewise.
9951 * target-debug.h (target_debug_print_inferior_p): New macro.
9952 * target-delegates.c: Re-generate.
9953 * top.c (kill_or_detach): Pass inferior down to target_detach.
9954 * windows-nat.c (windows_detach): Add inferior parameter.
9956 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9958 * target.h (struct target_ops) <to_detach>: Remove args
9960 (target_detach): Likewise.
9961 * target.c (dispose_inferior): Adjust.
9962 (target_detach): Remove args parameter, adjust.
9963 * aix-thread.c (aix_thread_detach): Adjust.
9964 * corefile.c (core_file_command): Adjust.
9965 * corelow.c (core_detach): Adjust.
9966 * darwin-nat.c (darwin_detach): Adjust.
9967 * gnu-nat.c (gnu_detach): Adjust.
9968 * inf-ptrace.c (inf_ptrace_detach): Adjust.
9969 * infcmd.c (detach_command): Adjust
9970 * infrun.c (follow_fork_inferior): Adjust.
9971 (handle_vfork_child_exec_or_exit): Adjust.
9972 * linux-fork.c (linux_fork_detach): Remove args parameter.
9973 * linux-fork.h (linux_fork_detach): Likewise.
9974 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
9975 * linux-thread-db.c (thread_db_detach): Likewise.
9976 * nto-procfs.c (procfs_detach): Likewise.
9977 * procfs.c (procfs_detach): Likewise.
9978 (do_detach): Remove signo parameter.
9979 * record.c (record_detach): Remove args parameter.
9980 * record.h (record_detach): Likewise.
9981 * remote-sim.c (gdbsim_detach): Likewise.
9982 * remote.c (remote_detach_1): Likewise.
9983 (remote_detach): Likewise.
9984 (extended_remote_detach): Likewise.
9985 * sol-thread.c (sol_thread_detach): Likewise.
9986 * target-delegates.c: Re-generate.
9987 * top.c (struct qt_args) <args>: Remove field.
9988 (kill_or_detach): Don't pass args.
9989 (quit_force): Don't set args.
9990 * windows-nat.c (windows_detach): Remove args parameter.
9992 2018-01-19 Yao Qi <yao.qi@linaro.org>
9994 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
9995 (arm_linux_init_abi): Install it.
9997 2018-01-19 Yao Qi <yao.qi@linaro.org>
9999 * osabi.c (gdb_osabi_names): Extend the regexp for
10000 arm-linux-gnueabihf.
10002 2018-01-18 Yao Qi <yao.qi@linaro.org>
10004 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10006 (abbrev_table::add_abbrev): Update.
10007 (abbrev_table::lookup_abbrev): Update.
10009 2018-01-18 Yao Qi <yao.qi@linaro.org>
10011 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10013 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10015 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10018 2018-01-17 Tom Tromey <tom@tromey.com>
10020 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10022 2018-01-17 Tom Tromey <tom@tromey.com>
10024 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10025 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10026 (create_array_type_with_stride): Update.
10027 * dwarf2read.c (set_die_type): Update.
10029 2018-01-17 Tom Tromey <tom@tromey.com>
10031 * dwarf2read.c (delayed_method_info): Remove typedef.
10032 (dwarf2_cu::method_info): Now a std::vector.
10033 (add_to_method_list): Update.
10034 (free_delayed_list): Remove.
10035 (compute_delayed_physnames): Update.
10036 (process_full_comp_unit, process_full_type_unit): Clear the method
10037 list. Remove cleanups.
10038 (psymtab_include_file_name): Add name_holder parameter. Use
10039 unique_xmalloc_ptr.
10040 (dwarf_decode_lines): Update.
10042 2018-01-17 Tom Tromey <tom@tromey.com>
10043 Simon Marchi <simon.marchi@ericsson.com>
10045 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10046 (dwarf2_per_objfile::free_cached_comp_units)
10047 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10048 (init_cutu_and_read_dies_no_follow): Update.
10049 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10050 (dwarf2_cu::~dwarf2_cu): New.
10051 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10052 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10054 2018-01-17 Tom Tromey <tom@tromey.com>
10055 Simon Marchi <simon.marchi@ericsson.com>
10057 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10058 (struct die_reader_specs) <abbrev_table>: New member.
10059 (struct abbrev_table): Add constructor.
10060 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10061 <abbrev_obstack>: Now an auto_obstack.
10062 (abbrev_table_up): New typedef.
10063 (init_cu_die_reader): Add abbrev_table parameter.
10064 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10065 Add result_dwo_abbrev_table.
10066 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10067 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10069 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10071 (skip_children): Update.
10072 (abbrev_table::alloc_abbrev): Rename from
10073 abbrev_table_alloc_abbrev.
10074 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10075 (abbrev_table::lookup_abbrev): Rename from
10076 abbrev_table_lookup_abbrev.
10077 (abbrev_table_read_table): Return abbrev_table_up.
10078 (abbrev_table_free, abbrev_table_free_cleanup)
10079 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10080 (load_partial_dies): Update.
10082 2018-01-17 Tom Tromey <tom@tromey.com>
10084 * dwarf2read.c (dwarf2_compute_name): Update comment.
10085 (read_func_scope, read_variable): Update.
10086 (new_symbol): Remove.
10087 (new_symbol_full): Rename to new_symbol.
10089 2018-01-17 Mike Gulick <mgulick@mathworks.com>
10092 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10093 a warning instead of throwing an error, set section size to 0 and return
10095 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10097 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10099 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10101 (linux_ptrace_attach_fail_reason_string): Likewise.
10102 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10104 (linux_ptrace_attach_fail_reason_string): Likewise.
10105 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10107 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10109 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10111 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10114 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10115 checking for fs_base/gs_base fields in struct user_regs_struct.
10116 * configure: Regenerate.
10118 2018-01-17 Yao Qi <yao.qi@linaro.org>
10120 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10122 (aarch64_linux_init_abi): Install it to gdbarch hook
10123 gcc_target_options.
10125 2018-01-15 Pedro Alves <palves@redhat.com>
10127 * common/signals-state-save-restore.c
10128 (save_original_signals_state): Fix typos.
10130 2017-01-12 Tom Tromey <tom@tromey.com>
10131 Sergio Durigan Junior <sergiodj@redhat.com>
10133 * Makefile.in (install-only): Install gdb-add-index.
10135 2018-01-12 John Baldwin <jhb@FreeBSD.org>
10137 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10139 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10141 * infrun.c (keep_going_pass_signal): Clear step-over info when
10142 insert_breakpoints fails.
10144 2018-01-11 Pedro Alves <palves@redhat.com>
10147 * infrun.c (resume): Rename to ...
10148 (resume_1): ... this.
10149 (resume): Reimplement as wrapper around resume_1.
10151 2018-01-11 Pedro Alves <palves@redhat.com>
10154 * remote.c (remote_parse_stop_reply): Default to the last-set
10155 general thread instead of to 'magic_null_ptid'.
10157 2018-01-10 Pedro Alves <palves@redhat.com>
10159 * language.h (language_get_symbol_name_matcher): Rename ...
10160 (get_symbol_name_matcher): ... this.
10161 * language.c (language_get_symbol_name_matcher): Ditto.
10162 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10165 2018-01-10 Pedro Alves <palves@redhat.com>
10169 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10170 Adjust to use language_get_symbol_name_matcher instead of
10171 language_defn::la_get_symbol_name_matcher.
10172 * language.c (language_get_symbol_name_matcher): If in Ada mode
10173 and the lookup name is a verbatim match, return Ada's matcher.
10174 * language.h (language_get_symbol_name_matcher): Adjust comment.
10175 (ada_lookup_name_info::verbatim_p):: New method.
10177 2018-01-10 Pedro Alves <palves@redhat.com>
10180 * ada-lang.c (ada_collect_symbol_completion_matches): If the
10181 minsym's language is language_auto or language_cplus, pass down
10182 language_ada instead.
10183 * symtab.c (compare_symbol_name): Don't frob symbol language here.
10185 2018-01-10 Pedro Alves <palves@redhat.com>
10188 * minsyms.c (linkage_name_str): New function.
10189 (iterate_over_minimal_symbols): Use it.
10191 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10193 * NEWS: Document that 'info proc' now works on FreeBSD.
10195 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10197 * configure.ac: Check for kinfo_getfile in libutil.
10198 * configure: Regenerate.
10199 * config.in: Regenerate.
10200 * fbsd-nat.c: Include "fbsd-tdep.h".
10201 (fbsd_fetch_cmdline): New.
10202 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10203 rather than calling error.
10204 (fbsd_info_proc): New.
10205 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10206 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10207 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10209 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10211 * fbsd-nat.c (struct free_deleter): Remove.
10212 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10214 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10216 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10217 NULL for an empty pathname.
10219 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10221 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10222 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10223 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10224 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10225 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10226 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10227 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10228 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10229 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10230 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10231 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10232 (fbsd_core_fetch_timeval, fbsd_print_sigset)
10233 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10234 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
10235 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10237 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
10239 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10240 (gnu_xfer_auxv): New function.
10241 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10242 TARGET_OBJECT_AUXV.
10244 2018-01-08 Yao Qi <yao.qi@linaro.org>
10245 Simon Marchi <simon.marchi@ericsson.com>
10247 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10249 (COMMON_OBS): Remove selftest.o.
10250 * configure.ac: Append selftest-arch.c and common/selftest.c to
10251 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
10252 * configure: Re-generated.
10253 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10255 (maintenance_info_selftests): Likewise.
10257 2018-01-08 Xavier Roirand <roirand@adacore.com>
10259 * ada-valprint.c (val_print_packed_array_elements): Use
10260 proper number of elements when printing an array indexed
10261 by an enumeration type.
10263 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10265 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10266 (dw2_get_file_names_reader): Adjust.
10267 (lookup_dwo_signatured_type): Adjust.
10268 (lookup_dwp_signatured_type): Adjust.
10269 (lookup_signatured_type): Adjust.
10270 (create_type_unit_group): Adjust.
10271 (get_type_unit_group): Adjust.
10272 (process_psymtab_comp_unit_reader): Adjust.
10273 (build_type_psymtabs_reader): Adjust.
10274 (scan_partial_symbols): Adjust.
10275 (add_partial_symbol): Adjust.
10276 (add_partial_subprogram): Adjust.
10277 (peek_die_abbrev): Adjust.
10278 (fixup_go_packaging): Adjust.
10279 (process_imported_unit_die): Adjust.
10280 (dwarf2_compute_name): Adjust.
10281 (dwarf2_physname): Adjust.
10282 (read_import_statement): Adjust.
10283 (handle_DW_AT_stmt_list): Adjust.
10284 (read_file_scope): Adjust.
10285 (read_func_scope): Adjust.
10286 (read_lexical_block_scope): Adjust.
10287 (read_call_site_scope): Adjust.
10288 (read_variable): Adjust.
10289 (dwarf2_rnglists_process): Adjust.
10290 (dwarf2_ranges_process): Adjust.
10291 (dwarf2_ranges_read): Adjust.
10292 (dwarf2_get_pc_bounds): Adjust.
10293 (dwarf2_record_block_ranges): Adjust.
10294 (dwarf2_add_field): Adjust.
10295 (dwarf2_add_member_fn): Adjust.
10296 (read_structure_type): Adjust.
10297 (process_structure_scope): Adjust.
10298 (read_enumeration_type): Adjust.
10299 (read_array_type): Adjust.
10300 (mark_common_block_symbol_computed): Adjust.
10301 (read_common_block): Adjust.
10302 (read_namespace_type): Adjust.
10303 (read_namespace): Adjust.
10304 (read_module_type): Adjust.
10305 (read_tag_pointer_type): Adjust.
10306 (read_tag_ptr_to_member_type): Adjust.
10307 (read_tag_string_type): Adjust.
10308 (read_subroutine_type): Adjust.
10309 (read_typedef): Adjust.
10310 (read_base_type): Adjust.
10311 (attr_to_dynamic_prop): Adjust.
10312 (read_subrange_type): Adjust.
10313 (read_unspecified_type): Adjust.
10314 (dwarf2_read_abbrevs): Adjust.
10315 (load_partial_dies): Adjust.
10316 (read_partial_die): Adjust.
10317 (find_partial_die): Adjust.
10318 (guess_partial_die_structure_name): Adjust.
10319 (fixup_partial_die): Adjust.
10320 (read_attribute_value): Adjust.
10321 (read_addr_index): Adjust.
10322 (read_addr_index_from_leb128): Adjust.
10323 (read_str_index): Adjust.
10324 (dwarf2_string_attr): Adjust.
10325 (get_debug_line_section): Adjust.
10326 (dwarf_decode_line_header): Adjust.
10327 (lnp_state_machine::check_line_address): Adjust.
10328 (dwarf_decode_lines_1): Adjust.
10329 (dwarf_decode_lines): Adjust.
10330 (dwarf2_start_symtab): Adjust.
10331 (var_decode_location): Adjust.
10332 (new_symbol_full): Adjust.
10333 (dwarf2_const_value_data): Adjust.
10334 (dwarf2_const_value_attr): Adjust.
10335 (dwarf2_const_value): Adjust.
10336 (die_type): Adjust.
10337 (die_containing_type): Adjust.
10338 (build_error_marker_type): Adjust.
10339 (lookup_die_type): Adjust.
10340 (guess_full_die_structure_name): Adjust.
10341 (anonymous_struct_prefix): Adjust.
10342 (determine_prefix): Adjust.
10343 (dwarf2_name): Adjust.
10344 (follow_die_ref_or_sig): Adjust.
10345 (follow_die_offset): Adjust.
10346 (follow_die_ref): Adjust.
10347 (follow_die_sig_1): Adjust.
10348 (follow_die_sig): Adjust.
10349 (get_signatured_type): Adjust.
10350 (get_DW_AT_signature_type): Adjust.
10351 (decode_locdesc): Adjust.
10352 (dwarf_decode_macros): Adjust.
10353 (cu_debug_loc_section): Adjust.
10354 (fill_in_loclist_baton): Adjust.
10355 (dwarf2_symbol_mark_computed): Adjust.
10356 (init_one_comp_unit): Don't assign
10357 dwarf2_cu::dwarf2_per_objfile.
10358 (set_die_type): Adjust.
10360 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10362 * dwarf2read.c (struct mapped_debug_names): Add constructor.
10363 <dwarf2_per_objfile>: New field.
10364 (dwarf2_per_objfile): Remove global.
10365 (get_dwarf2_per_objfile): New function.
10366 (set_dwarf2_per_objfile): New function.
10367 (dwarf2_build_psymtabs_hard): Change objfile parameter to
10368 dwarf2_per_objfile.
10369 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10370 (read_abbrev_offset): Likewise.
10371 (read_indirect_string): Likewise.
10372 (read_indirect_line_string): Likewise.
10373 (read_indirect_string_at_offset): Likewise.
10374 (read_indirect_string_from_dwz): Likewise.
10375 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10376 dwarf2_per_objfile.
10377 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10378 (create_all_comp_units): Change objfile parameter to
10379 dwarf2_per_objfile.
10380 (create_all_type_units): Likewise.
10381 (process_queue): Add dwarf2_per_objfile parameter.
10382 (read_and_check_comp_unit_head): Likewise.
10383 (lookup_dwo_unit_in_dwp): Likewise.
10384 (get_dwp_file): Likewise.
10385 (process_cu_includes): Likewise.
10386 (struct free_dwo_file_cleanup_data): New struct.
10387 (dwarf2_has_info): Use get_dwarf2_per_objfile and
10388 set_dwarf2_per_objfile.
10389 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10390 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10391 context, adjust calls.
10392 (dw2_instantiate_symtab): Likewise.
10393 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10394 (dw2_get_cu): Likewise.
10395 (create_cu_from_index_list): Change objfile parameter to
10396 dwarf2_per_objfile.
10397 (create_cus_from_index_list): Get dwarf2_per_objfile from
10398 context, adjust calls.
10399 (create_cus_from_index): Likewise.
10400 (create_signatured_type_table_from_index): Change objfile
10401 parameter to dwarf2_per_objfile.
10402 (create_signatured_type_table_from_debug_names): Change objfile
10403 parameter to dwarf2_per_objfile.
10404 (create_addrmap_from_index): Likewise.
10405 (create_addrmap_from_aranges): Likewise.
10406 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10407 (dw2_setup): Remove.
10408 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10410 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10411 get_dwarf2_per_objfile.
10412 (dw2_forget_cached_source_info): Likewise.
10413 (dw2_map_symtabs_matching_filename): Likewise.
10414 (struct dw2_symtab_iterator) <index>: Remove.
10415 <dwarf2_per_objfile>: New field.
10416 (dw2_symtab_iter_init): Replace index parameter with
10417 dwarf2_per_objfile.
10418 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10419 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10420 (dw2_print_stats): Likewise.
10421 (dw2_dump): Likewise.
10422 (dw2_expand_symtabs_for_function): Likewise.
10423 (dw2_expand_all_symtabs): Likewise.
10424 (dw2_expand_symtabs_with_fullname): Likewise.
10425 (dw2_expand_marked_cus): Replace index and objfile parameters
10426 with dwarf2_per_objfile.
10427 (dw_expand_symtabs_matching_file_matcher): Add
10428 dwarf2_per_objfile parameter and adjust calls.
10429 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10431 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10432 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10434 (create_cus_from_debug_names_list): Replace objfile parameter
10435 with dwarf2_per_objfile and adjust calls.
10436 (create_cus_from_debug_names): Likewise.
10437 (dwarf2_read_debug_names): Likewise.
10438 (mapped_debug_names::namei_to_name): Adjust call.
10439 (dw2_debug_names_iterator::next): Likewise.
10440 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10441 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10442 (dw2_debug_names_dump): Likewise.
10443 (dw2_debug_names_expand_symtabs_for_function): Likewise.
10444 (dw2_debug_names_expand_symtabs_matching): Likewise.
10445 (dwarf2_initialize_objfile): Likewise.
10446 (dwarf2_build_psymtabs): Likewise.
10447 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10449 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10450 (read_and_check_comp_unit_head): Likewise.
10451 (read_abbrev_offset): Likewise.
10452 (create_debug_type_hash_table): Likewise.
10453 (create_debug_types_hash_table): Likewise.
10454 (create_all_type_units): Replace objfile parameter with
10455 dwarf2_per_objfile.
10456 (add_type_unit): Add dwarf2_per_objfile parameter.
10457 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10458 with dwarf2_per_objfile.
10459 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10460 (lookup_dwp_signatured_type): Likewise.
10461 (lookup_signatured_type): Likewise.
10462 (read_cutu_die_from_dwo): Likewise.
10463 (init_tu_and_read_dwo_dies): Likewise.
10464 (init_cutu_and_read_dies): Likewise.
10465 (init_cutu_and_read_dies_no_follow): Likewise.
10466 (allocate_type_unit_groups_table): Add objfile parameter.
10467 (create_type_unit_group): Use dwarf2_per_objfile from cu.
10468 (get_type_unit_group): Likewise.
10469 (process_psymtab_comp_unit): Update call.
10470 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10471 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10472 (print_tu_stats): Likewise.
10473 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10474 in void* parameter.
10475 (build_type_psymtabs): Change objfile parameter to
10476 dwarf2_per_objfile.
10477 (process_skeletonless_type_unit): Use dwarf2_per_objfile
10478 passed in void* parameter.
10479 (process_skeletonless_type_units): Change objfile parameter to
10480 dwarf2_per_objfile.
10481 (set_partial_user): Likewise.
10482 (dwarf2_build_psymtabs_hard): Likewise.
10483 (read_comp_units_from_section): Likewise.
10484 (create_all_comp_units): Likewise.
10485 (scan_partial_symbols): Update calls.
10486 (add_partial_symbol): Likewise.
10487 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10488 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10489 (process_queue): Add dwarf2_per_objfile parameter.
10490 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10491 (compute_compunit_symtab_includes): Likewise.
10492 (process_cu_includes): Add dwarf2_per_objfile parameter.
10493 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10494 (process_full_type_unit): Likewise.
10495 (process_imported_unit_die): Update call.
10496 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10497 (read_file_scope): Likewise.
10498 (allocate_dwo_file_hash_table): Add objfile parameter.
10499 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10500 (create_cus_hash_table): Likewise.
10501 (create_dwp_hash_table): Likewise.
10502 (create_dwo_unit_in_dwp_v1): Likewise.
10503 (create_dwp_v2_section): Likewise.
10504 (create_dwo_unit_in_dwp_v2): Likewise.
10505 (lookup_dwo_unit_in_dwp): Likewise.
10506 (try_open_dwop_file): Likewise.
10507 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10508 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10509 cleanup to include a reference to dwarf2_per_objfile.
10510 (open_dwp_file): Add dwarf2_per_objfile parameter.
10511 (open_and_init_dwp_file): Likewise.
10512 (get_dwp_file): Likewise.
10513 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10514 (queue_and_load_all_dwo_tus): Update call.
10515 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10517 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10518 (dwarf2_ranges_process): Likewise.
10519 (dwarf2_get_pc_bounds): Likewise.
10520 (mark_common_block_symbol_computed): Likewise.
10521 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10522 (dwarf2_read_abbrevs): Update call.
10523 (read_partial_die): Use dwarf2_per_objfile from cu.
10524 (find_partial_die): Likewise.
10525 (fixup_partial_die): Likewise.
10526 (read_attribute_value): Likewise.
10527 (read_indirect_string_at_offset_from): Add objfile parameter.
10528 (read_indirect_string_at_offset): Add dwarf2_per_objfile
10530 (read_indirect_string_from_dwz): Add objfile parameter.
10531 (read_indirect_string): Add objfile parameter.
10532 (read_addr_index_1): Add dwarf2_per_objfile parameter.
10533 (read_addr_index): Use dwarf2_per_objfile from cu.
10534 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10536 (read_str_index): Use dwarf2_per_objfile from cu.
10537 (get_debug_line_section): Likewise.
10538 (read_formatted_entries): Add dwarf2_per_objfile parameter.
10539 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
10540 (new_symbol_full): Use dwarf2_per_objfile from cu.
10541 (build_error_marker_type): Likewise.
10542 (lookup_die_type): Likewise.
10543 (determine_prefix): Likewise.
10544 (follow_die_offset): Likewise.
10545 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
10546 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
10547 (dwarf2_fetch_die_type_sect_off): Likewise.
10548 (dwarf2_get_die_type): Likewise.
10549 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
10550 (get_signatured_type): Likewise.
10551 (get_DW_AT_signature_type): Likewise.
10552 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
10553 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
10554 (cu_debug_loc_section): Likewise.
10555 (fill_in_loclist_baton): Likewise.
10556 (dwarf2_symbol_mark_computed): Likewise.
10557 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10558 dwarf2_per_objfile.
10559 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
10561 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10562 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
10563 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
10564 (set_die_type): Use dwarf2_free_objfile from cu.
10565 (get_die_type_at_offset): Likewise.
10566 (dwarf2_per_objfile_free): Don't assign global variable.
10567 (debug_names) <constructor>: Add dwarf2_per_objfile
10568 parameter, update m_debugstrlookup construction.
10569 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
10571 <m_dwarf2_per_objfile>: New field.
10572 <lookup>: Use m_dwarf2_per_objfile.
10573 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
10574 (psyms_seen_size): Likewise.
10575 (write_gdbindex): Replace objfile parameter with
10576 dwarf2_per_objfile.
10577 (write_debug_names): Likewise.
10578 (write_psymtabs_to_index): Likewise.
10579 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
10582 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10584 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
10585 <dwarf2_per_objfile>: New field.
10586 (struct dwarf2_per_cu_data) <objfile>: Remove.
10587 <dwarf2_per_objfile>: New field.
10588 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
10590 (create_signatured_type_table_from_index): Likewise.
10591 (create_debug_type_hash_table): Likewise.
10592 (fill_in_sig_entry_from_dwo_entry): Likewise.
10593 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
10594 (create_type_unit_group): Assign dwarf2_per_objfile instead of
10596 (create_partial_symtab): Access objfile through
10597 dwarf2_per_objfile.
10598 (process_psymtab_comp_unit_reader): Likewise.
10599 (read_comp_units_from_section): Likewise.
10600 (scan_partial_symbols): Likewise.
10601 (add_partial_symbol): Likewise.
10602 (add_partial_subprogram): Likewise.
10603 (peek_die_abbrev): Likewise.
10604 (fixup_go_packaging): Likewise.
10605 (process_full_comp_unit): Likewise.
10606 (process_full_type_unit): Likewise.
10607 (process_imported_unit_die): Likewise.
10608 (dwarf2_compute_name): Likewise.
10609 (dwarf2_physname): Likewise.
10610 (read_import_statement): Likewise.
10611 (create_cus_hash_table): Assign dwarf2_physname instead of
10613 (read_func_scope): Access objfile through dwarf2_per_objfile.
10614 (read_lexical_block_scope): Likewise.
10615 (read_call_site_scope): Likewise.
10616 (read_variable): Likewise.
10617 (dwarf2_rnglists_process): Likewise.
10618 (dwarf2_ranges_process): Likewise.
10619 (dwarf2_ranges_read): Likewise.
10620 (dwarf2_record_block_ranges): Likewise.
10621 (dwarf2_add_field): Likewise.
10622 (dwarf2_add_member_fn): Likewise.
10623 (read_structure_type): Likewise.
10624 (process_structure_scope): Likewise.
10625 (read_enumeration_type): Likewise.
10626 (read_array_type): Likewise.
10627 (read_common_block): Likewise.
10628 (read_namespace_type): Likewise.
10629 (read_namespace): Likewise.
10630 (read_module_type): Likewise.
10631 (read_tag_pointer_type): Likewise.
10632 (read_tag_ptr_to_member_type): Likewise.
10633 (read_tag_string_type): Likewise.
10634 (read_subroutine_type): Likewise.
10635 (read_typedef): Likewise.
10636 (read_base_type): Likewise.
10637 (attr_to_dynamic_prop): Likewise.
10638 (read_subrange_type): Likewise.
10639 (read_unspecified_type): Likewise.
10640 (load_partial_dies): Likewise.
10641 (read_partial_die): Likewise.
10642 (find_partial_die): Likewise.
10643 (guess_partial_die_structure_name): Likewise.
10644 (fixup_partial_die): Likewise.
10645 (read_attribute_value): Likewise.
10646 (read_addr_index_from_leb128): Likewise.
10647 (dwarf2_read_addr_index): Likewise.
10648 (dwarf2_string_attr): Likewise.
10649 (lnp_state_machine::check_line_address): Likewise.
10650 (dwarf_decode_lines_1): Likewise.
10651 (dwarf_decode_lines): Likewise.
10652 (dwarf2_start_symtab): Likewise.
10653 (var_decode_location): Likewise.
10654 (new_symbol_full): Likewise.
10655 (dwarf2_const_value_data): Likewise.
10656 (dwarf2_const_value_attr): Likewise.
10657 (dwarf2_const_value): Likewise.
10658 (die_type): Likewise.
10659 (die_containing_type): Likewise.
10660 (lookup_die_type): Likewise.
10661 (guess_full_die_structure_name): Likewise.
10662 (anonymous_struct_prefix): Likewise.
10663 (dwarf2_name): Likewise.
10664 (follow_die_ref_or_sig): Likewise.
10665 (follow_die_offset): Likewise.
10666 (follow_die_ref): Likewise.
10667 (dwarf2_fetch_die_loc_sect_off): Likewise.
10668 (dwarf2_fetch_constant_bytes): Likewise.
10669 (dwarf2_fetch_die_type_sect_off): Likewise.
10670 (dwarf2_get_die_type): Likewise.
10671 (follow_die_sig): Likewise.
10672 (decode_locdesc): Likewise.
10673 (dwarf2_per_cu_objfile): Likewise.
10674 (dwarf2_per_cu_text_offset): Likewise.
10675 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
10677 (set_die_type): Access objfile through
10678 dwarf2_per_objfile.
10680 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10682 * valprint.c (converted_character_d): Remove typedef.
10683 (DEF_VEC_O (converted_character_d)): Remove.
10684 (count_next_character): Use std::vector.
10685 (print_converted_chars_to_obstack): Likewise.
10686 (generic_printstr): Likewise.
10688 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10690 * xml-support.h (struct gdb_xml_value): Add constructor.
10691 <value>: Change type to unique_xmalloc_ptr.
10692 (gdb_xml_value_s): Remove typedef.
10693 (DEF_VEC_O (gdb_xml_value_s)): Remove.
10694 (gdb_xml_element_start_handler): Change parameter type to
10696 (xml_find_attribute): Likewise.
10697 * xml-support.c (xml_find_attribute): Change parameter type to
10698 std::vector and adjust.
10699 (gdb_xml_values_cleanup): Remove.
10700 (gdb_xml_parser::start_element): Adjust to std::vector.
10701 (xinclude_start_include): Change paraeter type to std::vector
10703 * btrace.c (check_xml_btrace_version): Likewise.
10704 (parse_xml_btrace_block): Likewise.
10705 (parse_xml_btrace_pt_config_cpu): Likewise.
10706 (parse_xml_btrace_pt): Likewise.
10707 (parse_xml_btrace_conf_bts): Likewise.
10708 (parse_xml_btrace_conf_pt): Likewise.
10709 * memory-map.c (memory_map_start_memory): Likewise.
10710 (memory_map_start_property): Likewise.
10711 * osdata.c (osdata_start_osdata): Likewise.
10712 (osdata_start_item): Likewise.
10713 (osdata_start_column): Likewise.
10714 * remote.c (start_thread): Likewise.
10715 * solib-aix.c (library_list_start_library): Likewise.
10716 (library_list_start_list): Likewise.
10717 * solib-svr4.c (library_list_start_library): Likewise.
10718 (svr4_library_list_start_list): Likewise.
10719 * solib-target.c (library_list_start_segment): Likewise.
10720 (library_list_start_section): Likewise.
10721 (library_list_start_library): Likewise.
10722 (library_list_start_list): Likewise.
10723 * tracepoint.c (traceframe_info_start_memory): Likewise.
10724 (traceframe_info_start_tvar): Likewise.
10725 * xml-syscall.c (syscall_start_syscall): Likewise.
10726 * xml-tdesc.c (tdesc_start_target): Likewise.
10727 (tdesc_start_feature): Likewise.
10728 (tdesc_start_reg): Likewise.
10729 (tdesc_start_union): Likewise.
10730 (tdesc_start_struct): Likewise.
10731 (tdesc_start_flags): Likewise.
10732 (tdesc_start_enum): Likewise.
10733 (tdesc_start_field): Likewise.
10734 (tdesc_start_enum_value): Likewise.
10735 (tdesc_start_vector): Likewise.
10737 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10739 * extension.h (struct xmethod_worker) <clone>: Remove.
10740 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
10742 (python_xmethod_worker::clone): Remove.
10743 * valops.c (find_overload_match): Use std::move instead of
10746 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10748 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
10749 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
10750 <free_xmethod_worker_data>: Remove.
10751 <get_matching_xmethod_workers>: Chance VEC to std::vector.
10752 <get_xmethod_arg_types>: Remove.
10753 <get_xmethod_result_type>: Remove.
10754 <invoke_xmethod>: Remove.
10755 * extension.c (new_xmethod_worker): Remove.
10756 (clone_xmethod_worker): Remove.
10757 (get_matching_xmethod_workers): Return void, pass std::vector by
10759 (get_xmethod_arg_types): Rename to...
10760 (xmethod_worker::get_arg_types): ... this, and adjust.
10761 (get_xmethod_result_type): Rename to...
10762 (xmethod_worker::get_result_type): ... this, and adjust.
10763 (invoke_xmethod): Remove.
10764 (free_xmethod_worker): Remove.
10765 (free_xmethod_worker_vec): Remove.
10766 * extension.h (enum ext_lang_rc): Move here from
10768 (struct xmethod_worker): Add constructor and destructor.
10771 <invoke, clone, do_get_result_type, do_get_arg_types>: New
10772 virtual pure methods.
10773 <get_arg_types, get_result_type>: New methods.
10774 (xmethod_worker_ptr): Remove typedef.
10775 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
10776 (xmethod_worker_vec): Remove typedef.
10777 (xmethod_worker_up): New typedef.
10778 (invoke_xmethod): Remove.
10779 (clone_xmethod_worker): Remove.
10780 (free_xmethod_worker): Remove.
10781 (free_xmethod_worker_vec): Remove.
10782 (get_xmethod_arg_types): Remove.
10783 (get_xmethod_result_type): Remove.
10784 * valops.c (find_method_list): Use std::vector, don't use
10785 intermediate vector.
10786 (value_find_oload_method_list): Use std::vector.
10787 (find_overload_match): Use std::vector.
10788 (find_oload_champ): Use std::vector.
10789 * value.c (value_free): Use operator delete.
10790 (value_of_xmethod): Rename to...
10791 (value_from_xmethod): ... this. Don't assign
10792 xmethod_worker::value, take rvalue-reference.
10793 (result_type_of_xmethod): Adjust.
10794 (call_xmethod): Adjust.
10795 * value.h: Include extension.h.
10796 (struct xmethod_worker): Don't forward-declare.
10797 (value_of_xmethod): Rename to...
10798 (value_from_xmethod): ... this, take rvalue-reference.
10799 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
10800 (struct python_xmethod_worker): ... this, add constructor and
10802 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
10803 (gdbpy_free_xmethod_worker_data): Rename to...
10804 (python_xmethod_worker::~python_xmethod_worker): ... this and
10806 (gdbpy_clone_xmethod_worker_data): Rename to...
10807 (python_xmethod_worker::clone): ... this and adjust.
10808 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
10810 (gdbpy_get_xmethod_arg_types): Rename to...
10811 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
10812 (gdbpy_get_xmethod_result_type): Rename to...
10813 (python_xmethod_worker::do_get_result_type): ... this and
10815 (gdbpy_invoke_xmethod): Rename to...
10816 (python_xmethod_worker::invoke): ... this and adjust.
10817 (new_python_xmethod_worker): Rename to...
10818 (python_xmethod_worker::python_xmethod_worker): ... this and
10820 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
10822 (gdbpy_free_xmethod_worker_data): Remove.
10823 (gdbpy_get_matching_xmethod_workers): Use std::vector.
10824 (gdbpy_get_xmethod_arg_types): Remove.
10825 (gdbpy_get_xmethod_result_type): Remove.
10826 (gdbpy_invoke_xmethod): Remove.
10827 * python/python.c (python_extension_ops): Remove obsolete
10830 2018-01-05 Pedro Alves <palves@redhat.com>
10833 * common/signals-state-save-restore.c
10834 (save_original_signals_state): New parameter 'quiet'. Warn if we
10835 find a custom handler preinstalled, instead of internal erroring.
10836 But only warn if !quiet.
10837 * common/signals-state-save-restore.h
10838 (save_original_signals_state): New parameter 'quiet'.
10839 * main.c (captured_main_1): Move save_original_signals_state call
10840 after option handling, and pass QUIET.
10842 2018-01-05 Pedro Alves <palves@redhat.com>
10844 * spu-tdep.c (spu_catch_start): Pass
10845 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
10847 2018-01-05 Pedro Alves <palves@redhat.com>
10850 * ada-lang.c (literal_symbol_name_matcher): New function.
10851 (ada_get_symbol_name_matcher): Use it for
10852 symbol_name_match_type::SEARCH_NAME.
10853 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
10854 it down instead of assuming symbol_name_match_type::FULL.
10855 * block.h (block_lookup_symbol): New parameter 'match_type'.
10856 * c-valprint.c (print_unpacked_pointer): Use
10857 lookup_symbol_search_name instead of lookup_symbol.
10858 * compile/compile-object-load.c (get_out_value_type): Pass down
10859 symbol_name_match_type::SEARCH_NAME.
10860 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
10861 symbol_name_match_type::FULL.
10862 * cp-support.c (cp_get_symbol_name_matcher): Handle
10863 symbol_name_match_type::SEARCH_NAME.
10864 * infrun.c (insert_exception_resume_breakpoint): Use
10865 lookup_symbol_search_name.
10866 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
10867 * psymtab.c (maintenance_check_psymtabs): Use
10868 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
10869 * stack.c (print_frame_args): Use lookup_symbol_search_name and
10870 SYMBOL_SEARCH_NAME.
10871 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
10872 if symbol_name_match_type::SEARCH_NAME.
10873 (lookup_symbol_in_language): Pass down
10874 symbol_name_match_type::FULL.
10875 (lookup_symbol_search_name): New.
10876 (lookup_language_this): Pass down
10877 symbol_name_match_type::SEARCH_NAME.
10878 (lookup_symbol_aux, lookup_local_symbol): New parameter
10879 'match_type'. Pass it down.
10880 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
10881 (lookup_symbol_search_name): New declaration.
10882 (lookup_symbol_in_block): New 'match_type' parameter.
10884 2018-01-05 Pedro Alves <palves@redhat.com>
10887 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
10889 (ada_lookup_symbol): Reimplement in terms of
10890 ada_lookup_symbol_list, bits factored out from
10891 ada_lookup_encoded_symbol.
10893 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10895 * ada-exp.y (write_object_renaming): When subscripting an array
10896 using a symbol as the index, pass the block in call to
10897 ada_lookup_encoded_symbol when looking that symbol up.
10899 2018-01-05 Jerome Guitton <guitton@adacore.com>
10901 * ada-lang.c (ada_array_length): Use ada_index_type instead of
10904 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10906 * ada-lang.c (ada_to_fixed_value_create): Add handling of
10907 the case where VALUE_LVAL (val0) is not lval_memory.
10909 2018-01-05 Xavier Roirand <roirand@adacore.com>
10911 * ada-valprint.c (print_optional_low_bound): Handle
10912 character-indexed array printing like boolean-indexed array
10915 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10917 * NEWS: Create a new section for the next release branch.
10918 Rename the section of the current branch, now that it has
10921 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10923 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
10924 * version.in: Bump version to 8.1.50.DATE-git.
10926 2018-01-03 Xavier Roirand <roirand@adacore.com>
10928 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
10930 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
10932 (default_exception_support_info) <catch_handlers_sym>: Add field.
10933 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
10934 (ada_exception_name_addr_1): Add "catch handlers" handling.
10935 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
10936 Update all callers.
10937 (create_excep_cond_exprs) <ex>: Add parameter.
10938 (re_set_exception): Update create_excep_cond_exprs call.
10939 (print_it_exception, print_one_exception, print_mention_exception)
10940 (print_recreate_exception): Add "catch handler" handling.
10941 (allocate_location_catch_handlers, re_set_catch_handlers)
10942 (check_status_catch_handlers, print_it_catch_handlers)
10943 (print_one_catch_handlers, print_mention_catch_handlers)
10944 (print_recreate_catch_handlers): New function.
10945 (catch_handlers_breakpoint_ops): New variable.
10946 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
10947 Add parameter. Add "catch handler" handling.
10948 (ada_exception_sym_name, ada_exception_breakpoint_ops):
10949 Add "catch handler" handling.
10950 (ada_exception_catchpoint_cond_string): Add "catch handler"
10952 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
10954 (catch_ada_handlers_command): New function.
10955 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
10956 operations structure.
10957 (_initialize_ada_language): Add "catch handlers" command entry.
10958 * NEWS: Document "catch handlers" feature.
10960 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10962 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
10963 account when creating the array type of the slice.
10964 (ada_value_slice): Likewise.
10966 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10968 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
10970 (create_array_type_with_stride): Add byte_stride_prop parameter.
10971 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
10972 New parameter. Update all callers in this file.
10973 (array_type_has_dynamic_stride): New function.
10974 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
10975 of arrays with dynamic byte strides.
10976 * dwarf2read.c (read_array_type): Add support for dynamic
10977 DW_AT_byte_stride attributes.
10979 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10981 * dwarf2read.c (read_unspecified_type): Treat
10982 DW_TAG_enumeration_type DIEs from Ada units as stubs.
10984 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10986 Update copyright year range in all GDB files.
10988 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10990 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
10991 and gdb/testsuite/gdb.base/step-line.c.
10993 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10995 * copyright.py (main): Dump the contents of
10996 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
10997 even if BY_HAND is empty.
10999 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11001 * top.c (print_gdb_version): Update Copyright year in version
11004 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11006 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11008 For older changes see ChangeLog-2017.
11014 version-control: never