1 2018-07-26 Tom Tromey <tromey@redhat.com>
3 * dbxread.c (end_psymtab): Remove dead code.
5 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
7 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
8 DWARF unwinders are disabled.
9 * dwarf2-frame.c: Add dwarf2read.h include.
10 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
12 (dwarf2_frame_unwinders_enabled_p): Define.
13 (show_dwarf_unwinders_enabled_p): New function.
14 (_initialize_dwarf2_frame): Register switch to control DWARF
16 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
17 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
18 (show_dwarf_cmdlist): Remove static keyword.
19 * dwarf2read.h (set_dwarf_cmdlist): Declare.
20 (show_dwarf_cmdlist): Declare.
21 * NEWS: Document new feature.
23 2018-07-26 Tom de Vries <tdevries@suse.de>
26 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
28 2018-07-26 Tom de Vries <tdevries@suse.de>
30 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
31 DW_AT_count can't be translated to a dynamic prop.
33 2018-07-25 Tom de Vries <tdevries@suse.de>
35 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
38 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
40 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
42 2018-07-25 Joel Brobecker <brobecker@adacore.com>
44 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
46 2018-07-24 Keith Seitz <keiths@redhat.comt
49 * dwarf2read.c (dw2_add_symbol_to_list): New function.
50 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
51 instead of add_symbol_to_list.
52 (read_file_scope): Call prepare_one_comp_unit before reading
55 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
57 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
59 2018-07-24 Tom Tromey <tom@tromey.com>
61 * utils.c (malloc, realloc, free): Don't declare.
62 * configure, config.in: Rebuild.
63 * configure.ac: Don't check for declarations of free, malloc, or
66 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
69 (aarch64_linux_nat_target::stopped_data_address): Remove unused
71 * arm-linux-nat.c (fetch_regs): Likewise.
72 (store_regs): Likewise.
73 (fetch_vfp_regs): Likewise.
74 (store_vfp_regs): Likewise.
75 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
76 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
77 (arm_linux_nat_target::insert_watchpoint): Likewise.
78 (arm_linux_nat_target::remove_watchpoint): Likewise.
79 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
81 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
83 * ppc-linux-nat.c (fetch_register): Likewise.
84 (fetch_all_gp_regs): Likewise.
85 (fetch_ppc_registers): Likewise.
86 (store_all_gp_regs): Likewise.
87 (store_ppc_registers): Likewise.
88 (hwdebug_insert_point): Likewise.
89 (can_use_watchpoint_cond_accel): Likewise.
90 * remote-sim.c (gdb_os_write_stdout): Likewise.
92 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
93 Tom Tromey <tom@tromey.com>
95 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
99 2018-07-22 Tom Tromey <tom@tromey.com>
101 * regformats/regdat.sh: Define xmltarget_${name} inside
102 #ifndef IN_PROCESS_AGENT.
104 2018-07-22 Tom Tromey <tom@tromey.com>
106 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
108 2018-07-22 Tom Tromey <tom@tromey.com>
110 * symfile.c (reread_symbols): Notify iter, not objfile.
112 2018-07-22 Tom Tromey <tom@tromey.com>
114 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
116 (ravenscar_thread_target::prepare_to_store): Likewise.
118 2018-07-22 Tom Tromey <tom@tromey.com>
120 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
121 unused variable. Call value_fetch_lazy when needed.
122 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
123 Remove unused variable. Call value_fetch_lazy when needed.
125 2018-07-22 Tom Tromey <tom@tromey.com>
127 * m32c-tdep.c (mark_dma): Return void.
128 (make_regs): Remove unused declarations.
130 2018-07-22 Tom Tromey <tom@tromey.com>
132 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
133 cmdscm_get_valid_command_smob_arg_unsafe for effect.
134 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
135 bkscm_get_valid_block_smob_arg_unsafe for effect.
137 2018-07-22 Tom Tromey <tom@tromey.com>
139 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
142 2018-07-22 Tom Tromey <tom@tromey.com>
144 * windows-nat.c (saved_context): Conditionally define.
145 * remote.c (remote_target::remote_btrace_maybe_reopen):
146 Conditionally declare "warned".
147 * inflow.c (sigquit_ours): Conditionally define.
148 (new_tty): Move "tty" declaration inside #if.
149 * guile/guile.c (guile_datadir): Conditionally define.
150 * charset.c (set_be_le_names): Move some declarations inside #if.
151 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
153 (parse_xml_btrace_conf): Likewise.
155 2018-07-22 Tom Tromey <tom@tromey.com>
157 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
159 2018-07-22 Tom Tromey <tom@tromey.com>
161 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
162 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
163 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
164 * buildsym-legacy.c (get_macro_table): Remove unused variable.
165 * stack.c (frame_apply_level_command): Remove unused variable.
166 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
167 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
168 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
170 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
171 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
172 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
174 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
175 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
177 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
178 Remove unused variable.
179 * cli/cli-script.c (recurse_read_control_structure): Remove unused
181 * common/tdesc.c (print_xml_feature::visit): Remove unused
183 * compile/compile-object-load.c (store_regs): Remove unused
185 * complaints.c (clear_complaints): Remove unused variable.
186 * corelow.c (core_target_open): Remove unused variable.
187 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
189 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
191 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
193 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
195 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
197 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
199 * ia64-tdep.c (examine_prologue): Remove unused variable.
200 * infcall.c (run_inferior_call): Remove unused variable.
201 * inferior.c (exit_inferior): Remove unused variable.
202 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
203 * linespec.c (decode_line_2): Remove unused variable.
204 * linux-nat.c (super_close): Remove.
205 * linux-tdep.c (linux_info_proc): Remove unused variable.
206 * mi/mi-main.c (mi_execute_command): Remove unused variable.
207 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
208 Remove unused variable.
209 * parse.c (find_minsym_type_and_address): Remove unused variable.
210 * printcmd.c (info_symbol_command, printf_floating): Remove unused
212 * python/py-breakpoint.c (bppy_set_commands): Remove unused
214 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
216 * record-btrace.c (record_btrace_target::store_registers): Remove
218 (cmd_show_record_btrace_cpu): Remove unused variable.
219 * riscv-tdep.c (riscv_register_reggroup_p)
220 (riscv_push_dummy_call, riscv_return_value): Remove unused
222 * rust-exp.y (literal): Remove unused variable.
223 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
225 <STRUCTOP_ANONYMOUS>: Likewise.
226 * s390-linux-tdep.c (s390_linux_init_abi_31)
227 (s390_linux_init_abi_64): Remove unused variable.
228 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
229 (file_select_thread, net_windows_open, _initialize_ser_windows):
230 Remove unused variables.
231 * symtab.c (find_pc_sect_line): Remove unused variable.
232 * target-memory.c (compute_garbled_blocks): Remove unused
234 (target_write_memory_blocks): Remove unused variable.
235 * target.c (target_stack::unpush): Remove unused variables.
236 * tracepoint.c (start_tracing, all_tracepoint_actions)
237 (merge_uploaded_trace_state_variables)
238 (print_one_static_tracepoint_marker): Remove unused variable.
239 * unittests/basic_string_view/element_access/char/1.cc (test01):
240 Remove unused variable.
241 * windows-nat.c (windows_continue, windows_add_all_dlls)
242 (do_initial_windows_stuff, windows_nat_target::create_inferior):
243 Remove unused variables.
245 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
247 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
248 attr_profile in HAVE_ELF.
249 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
252 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
254 * frame.c (frame_register_unwind): Change parameter name.
255 (frame_unwind_register): Likewise.
256 (frame_unwind_register_value): Likewise.
257 (frame_unwind_register_signed): Likewise.
258 (frame_unwind_register_unsigned): Likewise.
259 * frame.h (frame_register_unwind): Likewise.
260 (frame_unwind_register): Likewise.
261 (frame_unwind_register_value): Likewise.
262 (frame_unwind_register_signed): Likewise.
263 (frame_unwind_register_unsigned): Likewise.
264 (frame_unwind_arch): Likewise.
266 2018-07-20 Maciej W. Rozycki <macro@mips.com>
268 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
271 2018-07-20 Maciej W. Rozycki <macro@mips.com>
273 * mips-linux-nat.c (mips_linux_nat_target::read_description):
274 Call `get_ptrace_pid' rather than extracting the ptrace PID by
277 2018-07-20 Keith Seitz <keiths@redhat.com>
279 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
280 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
281 m_compunit_symtab, m_language>: Add "m_" prefix.
283 * buildsym.c: Update all uses.
285 2018-07-20 Tom Tromey <tom@tromey.com>
287 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
288 * buildsym.h (record_line_ftype): Remove typedef.
290 2018-07-20 Tom Tromey <tom@tromey.com>
292 * buildsym-legacy.h (augment_type_symtab): Don't declare.
293 (end_expandable_symtab): Likewise.
294 (end_symtab_get_static_block): Likewise.
295 (end_symtab_from_static_block): Likewise.
296 * buildsym-legacy.c (augment_type_symtab): Remove.
297 (end_expandable_symtab): Remove.
298 (end_symtab_get_static_block): Remove.
299 (end_symtab_from_static_block): Remove.
301 2018-07-20 Tom Tromey <tom@tromey.com>
303 * dwarf2read.c: Include buildsym.h.
304 (struct dwarf2_cu) <builder>: New method.
305 (fixup_go_packaging): Update.
306 (process_full_comp_unit, process_full_type_unit): Update. Don't
307 use scoped_free_pendings.
308 (using_directives): Add "cu" parameter, remove "language".
309 (read_import_statement, setup_type_unit_groups, )
310 (read_func_scope, read_lexical_block_scope)
311 (dwarf2_record_block_ranges, read_namespace): Update.
312 (lnp_state_machine::lnp_state_machine): Add cu parameter.
313 (lnp_state_machine::handle_end_sequence): Update.
314 (class lnp_state_machine) <m_cu>: New member.
315 <m_record_line_callback>: Remove.
316 <m_currently_recording_lines>: New member.
317 (lnp_state_machine::handle_set_file): Update.
318 (noop_record_line): Remove.
319 (dwarf_record_line_p): Add cu parameter.
320 (dwarf_record_line_1, dwarf_finish_line): Likewise.
321 (lnp_state_machine::record_line)
322 (lnp_state_machine::lnp_state_machine)
323 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
324 (dwarf_decode_lines): Update.
325 (dwarf2_start_subfile): Add cu parameter.
326 (dwarf2_start_symtab, new_symbol): Update.
327 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
328 Remove dwarf2_per_objfile parameter.
329 (dwarf_decode_macros): Update.
331 2018-07-20 Tom Tromey <tom@tromey.com>
333 * stabsread.c (define_symbol): Update.
334 * buildsym-legacy.h (get_buildsym_compunit): Declare.
335 * dwarf2read.c (new_symbol): Update.
336 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
337 * cp-namespace.c: Include buildsym.h.
338 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
339 * buildsym-legacy.c (get_buildsym_compunit): New function.
341 2018-07-20 Tom Tromey <tom@tromey.com>
343 * xcoffread.c: Include buildsym-legacy.h.
344 * windows-nat.c: Include buildsym-legacy.h.
345 * stabsread.c: Include buildsym-legacy.h.
346 * mdebugread.c: Include buildsym-legacy.h.
347 * buildsym-legacy.h: New file.
348 * buildsym-legacy.c: New file, from buildsym.c.
349 * go32-nat.c: Include buildsym-legacy.h.
350 * dwarf2read.c: Include buildsym-legacy.h.
351 * dbxread.c: Include buildsym-legacy.h.
352 * cp-namespace.c: Include buildsym-legacy.h.
353 * coffread.c: Include buildsym-legacy.h.
354 * buildsym.h: Move some contents to buildsym-legacy.h.
355 * buildsym.c: Include buildsym-legacy.h. Move many functions to
357 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
359 2018-07-20 Tom Tromey <tom@tromey.com>
361 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
362 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
363 (buildsym_compunit::buildsym_compunit)
364 (buildsym_compunit::~buildsym_compunit)
365 (buildsym_compunit::get_macro_table): Define.
367 2018-07-20 Tom Tromey <tom@tromey.com>
369 * buildsym.c (reset_symtab_globals): Remove.
370 (buildsym_compunit::end_symtab_from_static_block): Update.
371 (buildsym_compunit::augment_type_symtab): Update.
372 (end_symtab_from_static_block): Call free_buildsym_compunit.
373 (augment_type_symtab, end_symtab, end_expandable_symtab):
376 2018-07-20 Tom Tromey <tom@tromey.com>
378 * arch-utils.c: Do not include buildsym.h.
379 * mipsread.c: Do not include buildsym.h.
380 * machoread.c: Do not include buildsym.h.
381 * elfread.c: Do not include buildsym.h.
383 2018-07-20 Tom Tromey <tom@tromey.com>
385 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
387 (buildsym_compunit): Add new constructor.
388 (struct buildsym_compunit) <get_last_source_file, finish_block,
389 record_block_range, start_subfile, patch_subfile_names,
390 push_subfile, pop_subfile, record_line, get_compunit_symtab,
391 set_last_source_start_addr, get_last_source_start_addr,
392 get_local_using_directives, set_local_using_directives,
393 get_global_using_directives, outermost_context_p,
394 get_current_context_stack, get_context_stack_depth,
395 get_current_subfile, get_local_symbols, get_file_symbols,
396 get_global_symbols, record_debugformat, record_producer,
397 push_context, pop_context, end_symtab_get_static_block,
398 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
400 <record_pending_block, finish_block_internal, make_blockvector,
401 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
405 2018-05-22 Tom Tromey <tom@tromey.com>
407 * buildsym.c (record_pending_block): Move earlier. Remove objfile
409 (finish_block_internal): Update.
411 2018-07-20 Tom Tromey <tom@tromey.com>
413 * buildsym.c (record_pending_block): Move earlier. Remove objfile
415 (finish_block_internal): Update.
417 2018-07-20 Tom Tromey <tom@tromey.com>
419 * buildsym.h (EXTERN): Don't define or undef.
420 * buildsym.c (EXTERN): Don't define.
422 2018-07-20 Tom Tromey <tom@tromey.com>
424 * buildsym.c: Remove TODO comment.
426 2018-07-20 Tom Tromey <tom@tromey.com>
428 * coffread.c (coff_symtab_read): Update.
429 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
430 (xcoff_new_init): Update.
431 * mipsread.c (mipscoff_new_init): Update.
432 * mdebugread.c (mdebug_build_psymtabs): Update.
433 * elfread.c (elf_new_init): Update.
434 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
436 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
437 (coffstab_build_psymtabs, elfstab_build_psymtabs)
438 (stabsect_build_psymtabs): Update.
439 * buildsym.h (buildsym_init): Don't declare.
440 * buildsym.c: Update comment.
441 (prepare_for_building): Remove.
442 (start_symtab, restart_symtab): Update.
443 (reset_symtab_globals): Update comment.
444 (buildsym_init): Remove.
446 2018-07-20 Tom Tromey <tom@tromey.com>
448 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
449 * stabsread.c (patch_block_stabs, define_symbol, read_type)
450 (read_enum_type, common_block_start, common_block_end)
451 (cleanup_undefined_types_1, finish_global_stabs): Update.
452 * mdebugread.c (psymtab_to_symtab_1): Update.
453 * dwarf2read.c (fixup_go_packaging, read_func_scope)
454 (read_lexical_block_scope, new_symbol): Update.
455 * dbxread.c (process_one_symbol): Update.
456 * coffread.c (coff_symtab_read, process_coff_symbol)
457 (coff_read_enum_type): Update.
458 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
460 (get_local_symbols, get_file_symbols, get_global_symbols): New
462 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
464 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
465 (~scoped_free_pendings): Update.
466 (finish_block, prepare_for_building, reset_symtab_globals)
467 (end_symtab_get_static_block, end_symtab_with_blockvector)
468 (augment_type_symtab, push_context): Update.
469 (get_local_symbols, get_file_symbols, get_global_symbols): New
471 (buildsym_init): Update.
473 2018-07-20 Tom Tromey <tom@tromey.com>
475 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
476 (process_full_type_unit): Likewise.
477 (dwarf2_start_symtab): Set list_in_scope.
479 2018-07-20 Tom Tromey <tom@tromey.com>
481 * dwarf2read.c (process_psymtab_comp_unit_reader)
482 (build_type_psymtabs_reader): Do not set list_in_scope.
484 2018-07-20 Tom Tromey <tom@tromey.com>
486 * buildsym.c (free_pendings): Remove.
487 (add_symbol_to_list, scoped_free_pendings)
488 (finish_block_internal, buildsym_init): Update.
490 2018-07-20 Tom Tromey <tom@tromey.com>
492 * xcoffread.c (read_xcoff_symtab): Update.
493 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
495 * dbxread.c (process_one_symbol): Update.
496 * coffread.c (coff_symtab_read): Update.
497 * buildsym.h (finish_block): Update.
498 * buildsym.c (finish_block): Remove "listhead" argument.
499 (end_symtab_get_static_block): Update.
501 2018-07-20 Tom Tromey <tom@tromey.com>
503 * buildsym.h (class scoped_free_pendings): Remove constructor.
504 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
506 <m_pending_block_obstack, m_pending_blocks>: New members.
507 (pending_block_obstack, pending_blocks): Remove.
508 (scoped_free_pendings::scoped_free_pendings): Default.
509 (~scoped_free_pendings): Update.
510 (free_pending_blocks): Remove.
511 (finish_block_internal, record_pending_block, make_blockvector)
512 (end_symtab_get_static_block, augment_type_symtab, push_context)
513 (buildsym_init): Update.
515 2018-07-20 Tom Tromey <tom@tromey.com>
517 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
518 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
520 (pending_addrmap, pending_addrmap_obstack)
521 (pending_addrmap_interesting): Remove.
522 (scoped_free_pendings, record_block_range, make_blockvector)
523 (prepare_for_building, reset_symtab_globals, buildsym_init):
526 2018-07-20 Tom Tromey <tom@tromey.com>
528 * xcoffread.c (process_linenos): Update.
529 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
530 * mdebugread.c (psymtab_to_symtab_1): Update.
531 * dwarf2read.c (setup_type_unit_groups)
532 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
533 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
534 * dbxread.c (process_one_symbol): Update.
535 * coffread.c (coff_symtab_read, enter_linenos)
536 (process_coff_symbol): Update.
537 * buildsym.h (current_subfile): Don't declare.
538 (get_current_subfile): Declare.
539 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
541 (start_subfile, free_buildsym_compunit, push_subfile)
542 (prepare_for_building, start_symtab): Update.
543 (get_current_subfile): New function.
545 2018-07-20 Tom Tromey <tom@tromey.com>
547 * coffread.c (coff_symtab_read): Update.
548 * xcoffread.c (read_xcoff_symtab): Update.
549 * dwarf2read.c (new_symbol): Update.
550 (read_func_scope, read_lexical_block_scope): Update.
551 * dbxread.c (process_one_symbol): Update.
552 * buildsym.h (context_stack, context_stack_depth): Don't declare.
553 (outermost_context_p): Remove macro.
554 (outermost_context_p, get_current_context_stack)
555 (get_context_stack_depth): Declare.
556 (pop_context): Return struct context_stack.
557 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
559 (context_stack_size): Remove.
560 (INITIAL_CONTEXT_STACK_SIZE): Remove.
561 (prepare_for_building, end_symtab_get_static_block)
562 (augment_type_symtab, push_context): Update.
563 (pop_context): Return struct context_stack.
564 (outermost_context_p, get_current_context_stack)
565 (get_context_stack_depth): New functions.
566 (buildsym_init): Update.
568 2018-07-20 Tom Tromey <tom@tromey.com>
570 * rust-exp.y: Now a pure parser. Update all rules.
571 (%union): Move earlier.
572 (current_parser, work_obstack): Remove globals.
573 (rust_parser, ~rust_parser): Update.
574 (class rust_parser) <copy_name, concat3, crate_name, super_name,
575 lex_character, lex_number, lex_string, lex_identifier,
576 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
577 convert_name, convert_params_to_expression,
578 convert_ast_to_expression, ast_basic_type, ast_operation,
579 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
580 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
581 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
582 ast_array_type, ast_slice_type, ast_reference_type,
583 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
584 (rust_parse): Update.
585 (rustyyerror, rustyylex): Add parser parameter.
586 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
587 (rust_lex_stringish_test, rust_lex_test_sequence)
588 (rust_lex_test_trailing_dot, rust_lex_test_completion)
589 (rust_lex_test_push_back, rust_lex_tests): Update.
591 2018-07-19 Pedro Alves <palves@redhat.com>
593 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
594 gdb::unique_xmalloc_ptr.
595 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
596 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
597 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
599 * guile/scm-pretty-print.c (ppscm_print_children): Use
600 gdb::unique_xmalloc_ptr instead of cleanups.
601 (gdbscm_apply_val_pretty_printer): Remove cleanups.
602 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
603 gdb::unique_xmalloc_ptr.
604 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
605 Adjust to use gdb::unique_xmalloc_ptr.
606 * guile/scm-utils.c (extract_arg): Adjust.
607 * guile/scm-value.c (gdbscm_value_field): Adjust to use
608 gdb::unique_xmalloc_ptr instead of a cleanup.
610 2018-07-19 Tom Tromey <tom@tromey.com>
612 * utils.c (do_value_free_to_mark)
613 (make_cleanup_value_free_to_mark): Remove.
614 * utils.h (make_cleanup_value_free_to_mark): Remove.
616 2018-07-19 Pedro Alves <palves@redhat.com>
618 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
619 forwarding reference.
621 2018-07-18 Pedro Alves <palves@redhat.com>
623 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
624 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
627 2018-07-18 Pedro Alves <palves@redhat.com>
629 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
631 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
633 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
634 directly instead of a cleanup.
635 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
636 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
637 (vlscm_binop_gdbthrow): New, factored out from ...
638 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
639 (vlscm_rich_compare): Use gdbscm_wrap.
640 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
641 instead of a cleanup.
642 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
644 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
645 Use xfree directly instead of a cleanup.
646 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
647 Adjust to use gdbscm_wrap and scoped_value_mark.
648 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
649 (gdbscm_value_address, gdbscm_value_dereference)
650 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
652 (gdbscm_value_dynamic_type): Use scoped_value_mark.
653 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
655 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
656 gdbscm_wrap and scoped_value_mark.
657 (gdbscm_value_to_string): Use xfree directly instead of a
658 cleanup. Move 'buffer' unique_ptr to TRY scope.
659 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
660 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
662 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
663 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
665 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
668 2018-07-18 Tom de Vries <tdevries@suse.de>
670 * findvar.c (default_read_var_value): Also resolve dynamic type for
671 LOC_OPTIMIZED_OUT vars.
673 2018-07-18 Maciej W. Rozycki <macro@mips.com>
675 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
678 2018-07-17 Tom Tromey <tom@tromey.com>
680 * guile/scm-param.c (pascm_set_func, pascm_show_func)
681 (compute_enum_list, pascm_set_param_value_x)
682 (gdbscm_parameter_value): Update.
683 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
684 (gdbscm_scm_to_host_string): Update.
685 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
687 * guile/scm-cmd.c (cmdscm_add_completion): Update.
688 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
689 * guile/scm-string.c (gdbscm_scm_to_string): Return
691 (gdbscm_scm_to_host_string): Likewise.
693 2018-07-17 Tom Tromey <tom@tromey.com>
695 * guile/guile.c (gdbscm_eval_from_control_command): Update.
696 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
697 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
698 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
701 2018-07-17 Tom Tromey <tom@tromey.com>
703 * guile/scm-param.c (pascm_signal_setshow_error): Update.
704 * guile/guile-internal.h (gdbscm_exception_message_to_string):
706 * guile/scm-cmd.c (cmdscm_function): Update.
707 * guile/scm-pretty-print.c
708 (ppscm_print_exception_unless_memory_error): Update.
709 * guile/scm-exception.c (gdbscm_exception_message_to_string):
710 Return unique_xmalloc_ptr.
712 2018-07-17 Tom Tromey <tom@tromey.com>
714 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
717 2018-07-17 Jim Wilson <jimw@sifive.com>
719 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
720 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
721 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
722 unecessary braces after EF_RISCV_RVC test. Delete call to
723 set_gdbarch_decr_pc_after_break.
725 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
726 RISCV_LAST_FP_REGNUM + 1.
727 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
729 2018-07-17 Tom Tromey <tom@tromey.com>
731 * configure.ac: Remove --disable-gdbcli.
732 * configure: Rebuild.
733 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
734 (SUBDIR_CLI_CFLAGS): Remove.
735 (SFILES): Use SUBDIR_CLI_SRCS.
736 (COMMON_OBS): Use SUBDIR_CLI_OBS.
738 2018-07-17 Tom Tromey <tom@tromey.com>
741 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
743 2018-07-16 Jim Wilson <jimw@sifive.com>
745 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
747 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
749 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
751 (libunwind_frame_sniffer): Likewise.
752 (libunwind_frame_prev_register): Likewise.
753 (libunwind_sigtramp_frame_sniffer): Likewise.
754 * ia64-tdep.c (ia64_access_reg): Likewise.
755 (ia64_access_rse_reg): Likewise.
756 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
757 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
759 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
761 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
763 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
765 * remote-sim.c (gdbsim_target::close,
766 gdbsim_target::mourn_inferior): Remove unused variables.
768 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
770 * ia64-tdep.c (ktab_buf): New global.
771 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
772 (get_kernel_table): Adjust.
774 2018-07-16 Tom Tromey <tom@tromey.com>
776 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
777 * dwarf2read.c (using_directives, new_symbol): Use
779 * dbxread.c (process_one_symbol): Use outermost_context_p.
780 * coffread.c (coff_symtab_read): Use outermost_context_p.
782 2018-07-16 Tom Tromey <tom@tromey.com>
784 * dwarf2read.c (using_directives, read_func_scope)
785 (read_lexical_block_scope): Update.
786 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
787 * buildsym.h (local_using_directives, global_using_directives):
789 (get_local_using_directives, set_local_using_directives)
790 (get_global_using_directives): Declare.
791 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
792 m_global_using_directives>: New members.
793 (finish_block_internal, prepare_for_building)
794 (reset_symtab_globals, end_symtab_get_static_block)
795 (push_context): Update.
796 (get_local_using_directives, set_local_using_directives)
797 (get_global_using_directives): New functions.
798 (buildsym_init): Update.
800 2018-07-16 Tom Tromey <tom@tromey.com>
802 * xcoffread.c (xcoff_initial_scan): Don't call
804 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
805 * buildsym.h (class scoped_free_pendings): Add constructor.
806 (free_pending_blocks): Don't declare.
807 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
808 (free_pending_blocks): Now static.
810 2018-07-16 Tom Tromey <tom@tromey.com>
812 * buildsym.h (push_subfile, pop_subfile): Update declarations.
813 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
815 (struct subfile_stack): Remove.
816 (subfile_stack): Remove.
817 (push_subfile, pop_subfile, buildsym_init): Update.
819 2018-07-16 Tom Tromey <tom@tromey.com>
821 * buildsym.c (push_subfile): Use gdb_assert.
822 (pop_subfile): Use gdb_assert.
824 2018-07-16 Tom Tromey <tom@tromey.com>
826 * buildsym.h (merge_symbol_lists): Remove.
827 * buildsym.c (merge_symbol_lists): Remove.
829 2018-07-16 Tom Tromey <tom@tromey.com>
831 * stabsread.c (scan_file_globals): Update comment.
832 * stabsread.h (scan_file_globals): Move from buildsym.h.
833 * buildsym.h (scan_file_globals): Move to stabsread.h.
835 2018-07-16 Tom Tromey <tom@tromey.com>
837 * xcoffread.c (xcoff_new_init): Update.
838 * mipsread.c (mipscoff_new_init): Update.
839 * mdebugread.c (mdebug_build_psymtabs): Update.
840 * elfread.c (elf_new_init): Update.
841 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
842 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
843 * buildsym.h (buildsym_new_init): Don't declare.
844 * buildsym.c (buildsym_new_init): Remove.
846 2018-07-16 Tom Tromey <tom@tromey.com>
848 * stabsread.h (within_function): Move from buildsym.h.
849 * stabsread.c (start_stabs): Clear within_function.
850 * coffread.c (coff_start_symtab): Clear within_function.
851 * buildsym.h (within_function): Move to stabsread.h.
852 * buildsym.c (prepare_for_building): Update.
854 2018-07-16 Tom Tromey <tom@tromey.com>
856 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
857 * dwarf2read.c (dwarf2_start_symtab): Don't set
858 processing_gcc_compilation.
859 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
861 2018-07-16 Tom Tromey <tom@tromey.com>
863 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
864 (next_symbol_text_func): Move from buildsym.h.
865 * stabsread.c (hashname): Move from buildsym.c.
866 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
867 (next_symbol_text_func, hashname): Move to stabsread.h.
868 * buildsym.c: Don't include bcache.h
869 (hashname): Move to stasbread.c.
871 2018-07-16 Tom Tromey <tom@tromey.com>
873 * buildsym.h (context_stack_size): Don't declare.
874 * buildsym.c (context_stack_size): New global.
876 2018-07-16 Tom Tromey <tom@tromey.com>
878 * dbxread.c (processing_acc_compilation): New global.
879 * buildsym.h (processing_acc_compilation): Don't declare.
881 2018-07-16 Tom Tromey <tom@tromey.com>
883 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
884 * dbxread.c (read_ofile_symtab): Update.
885 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
886 * buildsym.h (last_source_start_addr): Remove.
887 (set_last_source_start_addr, get_last_source_start_addr):
889 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
891 (struct buildsym_compunit) <m_last_source_start_addr>: New
893 (prepare_for_building): Remove start_addr parameter.
894 (start_symtab, restart_symtab, end_symtab_get_static_block)
895 (end_symtab_with_blockvector): Update.
896 (set_last_source_start_addr, get_last_source_start_addr): New
899 2018-07-16 Tom Tromey <tom@tromey.com>
901 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
903 (have_line_numbers): Remove.
904 (record_line, prepare_for_building, end_symtab_get_static_block)
905 (augment_type_symtab): Update.
907 2018-07-16 Tom Tromey <tom@tromey.com>
909 * buildsym.c (~buildsym_compunit): Free the macro table.
910 (struct buildsym_compunit) <get_macro_table, release_macros>: New
912 <m_pending_macros>: New member.
913 (pending_macros): Remove.
914 (~scoped_free_pendings, get_macro_table, prepare_for_building)
915 (reset_symtab_globals, end_symtab_get_static_block)
916 (end_symtab_with_blockvector, augment_type_symtab)
917 (buildsym_init): Update.
919 2018-07-16 Tom Tromey <tom@tromey.com>
921 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
923 (buildsym_compunit::set_last_source_file): New method.
924 <m_last_source_file>: New member.
925 (prepare_for_building): Remove "name" parameter.
926 (start_symtab, restart_symtab, reset_symtab_globals): Update.
927 (last_source_file): Remove.
928 (set_last_source_file, get_last_source_file): Update.
930 2018-07-16 Tom Tromey <tom@tromey.com>
932 * buildsym.c (prepare_for_building): Add assert.
934 2018-07-16 Tom Tromey <tom@tromey.com>
936 * buildsym.c (~buildsym_compunit): Update.
937 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
938 (start_subfile, patch_subfile_names)
939 (end_symtab_with_blockvector): Update.
941 2018-07-16 Tom Tromey <tom@tromey.com>
943 * buildsym.c (struct buildsym_compunit): Add constructor,
944 destructor, initializers.
945 (start_buildsym_compunit): Remove.
946 (free_buildsym_compunit): Use "delete".
947 (start_symtab, restart_symtab): Use "new".
949 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
951 * symfile.c (set_objfile_default_section_offset): Remove struct
954 2018-07-14 Stafford Horne <shorne@gmail.com>
956 * (Responsible Maintainers): Add myself as or1k maintainer.
958 2018-07-13 Tom Tromey <tom@tromey.com>
960 * symfile.c (set_objfile_default_section_offset): Use extra braces
963 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
965 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
968 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
970 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
971 unittests/cli-utils-selftests.c
972 * unittests/cli-utils-selftests.c: New file.
974 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
976 * NEWS: Mention new commands. Mention change to 'thread apply'.
978 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
980 * thread.c (thr_try_catch_cmd): New function.
981 (thread_apply_all_command): Handle qcs flags.
982 (thread_apply_command): Handle qcs flags.
983 (taas_command): New function.
984 (tfaas_command): New function.
985 (_initialize_thread): Update to setup the new commands 'taas
986 and 'tfaas'. Change doc string for 'thread apply'.
988 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
990 * stack.c: (trailing_outermost_frame): New function, mostly
991 extracted from backtrace_command_1.
992 (leading_innermost_frame): New function.
993 (backtrace_command_1): Update to call trailing_outermost_frame.
994 (frame_apply_command_count): New function.
995 (frame_apply_level_command): New function.
996 (frame_apply_all_command): New function.
997 (frame_apply_command): New function.
998 (faas_command): New function.
999 (frame_cmd_list): New variable.
1000 (_initialize_stack): Update to setup the new commands 'frame apply'
1003 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1005 * cli-utils.c (number_or_range_parser::get_number): Only handle
1006 numbers or convenience var as numbers.
1007 (parse_flags): New function.
1008 (parse_flags_qcs): New function.
1009 (number_or_range_parser::finished): Ensure parsing end is detected
1010 before end of string.
1011 * cli-utils.h (parse_flags): New function.
1012 (parse_flags_qcs): New function.
1013 (number_or_range_parser): Remove m_finished bool.
1014 (number_or_range_parser::skip_range): Set m_in_range to false.
1016 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
1018 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1021 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1022 Jan Kratochvil <jan.kratochvil@redhat.com>
1023 Paul Fertser <fercerpav@gmail.com>
1024 Tsutomu Seki <sekiriki@gmail.com>
1025 Pedro Alves <palves@redhat.com>
1027 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1028 'unittests/parse-connection-spec-selftests.c'.
1029 (COMMON_SFILES): Add 'common/netstuff.c'.
1030 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1031 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1032 * common/netstuff.c: New file.
1033 * common/netstuff.h: New file.
1034 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1035 (wait_for_connect): Update comment. New parameter
1036 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1037 Use 'sock' directly instead of 'scb->fd'.
1038 (try_connect): New function, with code from 'net_open'.
1039 (net_open): Rewrite main loop to deal with multiple
1040 sockets/addresses. Handle IPv6-style hostnames; implement
1041 support for IPv6 connections.
1042 * unittests/parse-connection-spec-selftests.c: New file.
1044 2018-07-11 Pedro Alves <palves@redhat.com>
1047 * remote.c (remote_target::remote_detach_pid): Call
1048 set_current_process.
1050 2018-07-11 Pedro Alves <palves@redhat.com>
1052 * h8300-tdep.c (h8300_gdbarch_init): Remove
1053 set_gdbarch_ecoff_reg_to_regnum calls.
1055 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1058 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1059 offsets/sizes for static members of a class/struct.
1061 2018-07-11 Alan Hayward <alan.hayward@arm.com>
1063 * target-descriptions.c (tdesc_register_bitsize): Rename.
1064 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1065 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1066 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1068 2018-07-10 Tom Tromey <tom@tromey.com>
1070 * breakpoint.c (moribund_locations): Now static and a
1072 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1073 (build_bpstat_chain, update_global_location_list)
1074 (breakpoint_retire_moribund): Update.
1075 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1078 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1080 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1081 (riscv_register_reggroup_p): Use new function, remove unneeded
1083 (riscv_push_dummy_call): Extend assert to compare against xlen or
1084 flen based on register type.
1086 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1088 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1090 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1092 * remote.c (show_hardware_watchpoint_limit): New function.
1093 (show_hardware_watchpoint_length_limit): New function.
1094 (show_hardware_breakpoint_limit): New function.
1095 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1096 where appropriate, update help text.
1098 2018-07-09 Tom Tromey <tom@tromey.com>
1100 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1101 (CLIBS): Don't mention NAT_CLIBS.
1103 2018-07-09 Tom Tromey <tom@tromey.com>
1105 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1106 (LIBGDB_OBS, clean mostlyclean): Update.
1107 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1109 2018-07-09 Tom Tromey <tom@tromey.com>
1111 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1112 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1113 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1115 2018-07-09 Tom Tromey <tom@tromey.com>
1117 * Makefile.in (ALLDEPFILES): Remove exec.c.
1118 (COMMON_OBS): Remove exec.o.
1119 (COMMON_SFILES): Add exec.c.
1121 2018-07-09 Tom Tromey <tom@tromey.com>
1123 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1125 2018-07-09 Tom Tromey <tom@tromey.com>
1127 * Makefile.in (clean mostlyclean): Remove stamp-version.
1128 (version.c): Depend on stamp-version.
1129 (stamp-version): New rule, from version.c rule.
1131 2018-07-09 Tom Tromey <tom@tromey.com>
1133 * Makefile.in (init.c): Depend on stamp-init.
1134 (stamp-init): New rule, from init.c rule.
1135 (clean mostlyclean): Remove stamp-init.
1137 2018-07-09 Tom Tromey <tom@tromey.com>
1139 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1140 SUBDIR_GCC_COMPILE_SRCS.
1142 2018-07-09 Tom Tromey <tom@tromey.com>
1144 * Makefile.in (init.c): Remove some unused sed rules.
1146 2018-07-09 Tom Tromey <tom@tromey.com>
1148 * Makefile.in (TSOBS): Remove.
1149 (INIT_FILES): Update.
1150 (LIBGDB_OBS): Update.
1151 (COMMON_SFILES): Add inflow.c.
1152 (SFILES): Remove inflow.c.
1154 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1156 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1158 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1160 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1161 get_saveloc_name, is_signal_frame_name, step_name,
1162 init_remote_name, create_addr_space_name,
1163 destroy_addr_space_name, search_unwind_table_name,
1164 find_dyn_list_name): Constify.
1166 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1168 * darwin-nat.c (darwin_pthread_kill): New function.
1169 (darwin_resume_thread): Use darwin_pthread_kill.
1171 2018-07-05 Tom de Vries <tdevries@suse.de>
1173 * macroexp.c (macro_buffer) <operator=>: New member function.
1175 2018-07-04 Tom Tromey <tom@tromey.com>
1177 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1179 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
1181 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1182 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1183 * maint.c: Likewise.
1186 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1188 * NEWS: Create a new section for the next release branch.
1189 Rename the section of the current branch, now that it has
1192 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1194 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1195 * version.in: Bump version to 8.2.50.DATE-git.
1197 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1198 Pedro Alves <palves@redhat.com>
1200 * linux-nat.c (linux_init_ptrace): Rename to ...
1201 (linux_init_ptrace_procfs): ... this. Call
1202 linux_proc_init_warnings.
1203 (linux_nat_target::post_attach)
1204 (linux_nat_target::post_startup_inferior): Adjust.
1205 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1206 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1208 2018-07-04 Tom de Vries <tdevries@suse.de>
1210 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1212 (read_comp_unit_head): ... here.
1214 2018-07-03 Tom Tromey <tom@tromey.com>
1216 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1217 (stop_tracing, tstatus_command)
1218 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1219 (print_one_static_tracepoint_marker): Update.
1220 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1222 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
1224 (all_tracepoints, static_tracepoints_here): Return std::vector.
1226 2018-07-03 Tom Tromey <tom@tromey.com>
1228 * common/ptid.c (ptid_equal): Remove.
1229 * common/ptid.h (ptid_equal): Don't declare.
1230 * ada-tasks.c: Update.
1231 * breakpoint.c: Update.
1232 * common/agent.c: Update.
1233 * corelow.c: Update.
1234 * darwin-nat-info.c: Update.
1235 * darwin-nat.c: Update.
1237 * dtrace-probe.c: Update.
1238 * dummy-frame.c: Update.
1239 * fbsd-nat.c: Update.
1241 * gdbthread.h: Update.
1242 * gnu-nat.c: Update.
1243 * go32-nat.c: Update.
1244 * inf-loop.c: Update.
1245 * inf-ptrace.c: Update.
1246 * infcall.c: Update.
1250 * linux-fork.c: Update.
1251 * linux-nat.c: Update.
1252 * linux-thread-db.c: Update.
1253 * mi/mi-cmd-var.c: Update.
1254 * mi/mi-interp.c: Update.
1255 * mi/mi-main.c: Update.
1256 * nto-procfs.c: Update.
1257 * ppc-linux-tdep.c: Update.
1259 * python/py-inferior.c: Update.
1260 * python/py-record-btrace.c: Update.
1261 * python/py-record.c: Update.
1262 * ravenscar-thread.c: Update.
1263 * regcache.c: Update.
1264 * remote-sim.c: Update.
1266 * sol-thread.c: Update.
1269 * tui/tui-stack.c: Update.
1271 * windows-nat.c: Update.
1272 * windows-tdep.c: Update.
1274 2018-07-03 Tom Tromey <tom@tromey.com>
1276 * common/ptid.c (ptid_match): Remove.
1277 * common/ptid.h (ptid_match): Don't declare.
1278 * fbsd-nat.c: Update.
1281 * linux-nat.c: Update.
1282 * record-btrace.c: Update.
1283 * regcache.c: Update.
1286 2018-07-03 Tom Tromey <tom@tromey.com>
1288 * common/ptid.c (ptid_tid_p): Remove.
1289 * common/ptid.h (ptid_tid_p): Don't declare.
1290 * sol-thread.c: Update.
1292 2018-07-03 Tom Tromey <tom@tromey.com>
1294 * common/ptid.c (ptid_lwp_p): Remove.
1295 * common/ptid.h (ptid_lwp_p): Don't declare.
1296 * fbsd-nat.c: Update.
1297 * linux-nat.c: Update.
1298 * nat/linux-procfs.c: Update.
1299 * nat/x86-linux-dregs.c: Update.
1300 * sol-thread.c: Update.
1302 2018-07-03 Tom Tromey <tom@tromey.com>
1304 * common/ptid.c (ptid_is_pid): Remove.
1305 * common/ptid.h (ptid_is_pid): Don't declare.
1307 * linux-nat.c: Update.
1308 * mi/mi-interp.c: Update.
1312 2018-07-03 Tom Tromey <tom@tromey.com>
1314 * common/ptid.c (ptid_get_tid): Remove.
1315 * common/ptid.h (ptid_get_tid): Don't declare.
1316 * ada-tasks.c: Update.
1317 * aix-thread.c: Update.
1318 * bsd-uthread.c: Update.
1319 * darwin-nat.c: Update.
1320 * fbsd-nat.c: Update.
1321 * i386-darwin-nat.c: Update.
1323 * linux-tdep.c: Update.
1324 * nto-procfs.c: Update.
1325 * ppc-ravenscar-thread.c: Update.
1326 * python/py-infthread.c: Update.
1327 * ravenscar-thread.c: Update.
1328 * sol-thread.c: Update.
1329 * sparc-ravenscar-thread.c: Update.
1330 * windows-nat.c: Update.
1332 2018-07-03 Tom Tromey <tom@tromey.com>
1334 * common/ptid.c (ptid_get_lwp): Remove.
1335 * common/ptid.h (ptid_get_lwp): Don't declare.
1336 * aarch64-linux-nat.c: Update.
1337 * ada-tasks.c: Update.
1338 * aix-thread.c: Update.
1339 * amd64-linux-nat.c: Update.
1340 * arm-linux-nat.c: Update.
1341 * corelow.c: Update.
1342 * fbsd-nat.c: Update.
1343 * fbsd-tdep.c: Update.
1344 * gnu-nat.c: Update.
1345 * i386-cygwin-tdep.c: Update.
1346 * i386-gnu-nat.c: Update.
1347 * i386-linux-nat.c: Update.
1348 * ia64-linux-nat.c: Update.
1349 * inf-ptrace.c: Update.
1351 * linux-fork.c: Update.
1352 * linux-nat.c: Update.
1353 * linux-tdep.c: Update.
1354 * linux-thread-db.c: Update.
1355 * mips-linux-nat.c: Update.
1356 * nat/aarch64-linux-hw-point.c: Update.
1357 * nat/aarch64-linux.c: Update.
1358 * nat/linux-btrace.c: Update.
1359 * nat/linux-osdata.c: Update.
1360 * nat/linux-procfs.c: Update.
1361 * nat/x86-linux-dregs.c: Update.
1362 * obsd-nat.c: Update.
1363 * ppc-fbsd-nat.c: Update.
1364 * ppc-linux-nat.c: Update.
1366 * python/py-infthread.c: Update.
1367 * ravenscar-thread.c: Update.
1369 * s390-linux-nat.c: Update.
1370 * sol-thread.c: Update.
1371 * sol2-tdep.c: Update.
1372 * spu-linux-nat.c: Update.
1373 * x86-linux-nat.c: Update.
1374 * xtensa-linux-nat.c: Update.
1376 2018-07-03 Tom Tromey <tom@tromey.com>
1378 * common/ptid.c (ptid_get_pid): Remove.
1379 * common/ptid.h (ptid_get_pid): Don't declare.
1380 * aarch64-linux-nat.c: Update.
1381 * ada-lang.c: Update.
1382 * aix-thread.c: Update.
1383 * alpha-bsd-nat.c: Update.
1384 * amd64-fbsd-nat.c: Update.
1385 * amd64-linux-nat.c: Update.
1386 * arm-linux-nat.c: Update.
1387 * arm-nbsd-nat.c: Update.
1389 * break-catch-syscall.c: Update.
1390 * breakpoint.c: Update.
1391 * bsd-uthread.c: Update.
1392 * corelow.c: Update.
1394 * darwin-nat.c: Update.
1395 * fbsd-nat.c: Update.
1396 * fbsd-tdep.c: Update.
1398 * gnu-nat.c: Update.
1399 * hppa-nbsd-nat.c: Update.
1400 * hppa-obsd-nat.c: Update.
1401 * i386-fbsd-nat.c: Update.
1402 * ia64-linux-nat.c: Update.
1403 * inf-ptrace.c: Update.
1405 * inferior.c: Update.
1406 * inferior.h: Update.
1409 * linux-fork.c: Update.
1410 * linux-nat.c: Update.
1411 * linux-tdep.c: Update.
1412 * linux-thread-db.c: Update.
1413 * m68k-bsd-nat.c: Update.
1414 * mi/mi-interp.c: Update.
1415 * mi/mi-main.c: Update.
1416 * mips-linux-nat.c: Update.
1417 * mips-nbsd-nat.c: Update.
1418 * mips64-obsd-nat.c: Update.
1419 * nat/aarch64-linux-hw-point.c: Update.
1420 * nat/aarch64-linux.c: Update.
1421 * nat/linux-btrace.c: Update.
1422 * nat/linux-osdata.c: Update.
1423 * nat/linux-procfs.c: Update.
1424 * nat/x86-linux-dregs.c: Update.
1425 * nto-procfs.c: Update.
1426 * obsd-nat.c: Update.
1427 * ppc-linux-nat.c: Update.
1428 * ppc-nbsd-nat.c: Update.
1429 * ppc-obsd-nat.c: Update.
1430 * proc-service.c: Update.
1432 * python/py-inferior.c: Update.
1433 * python/py-infthread.c: Update.
1434 * ravenscar-thread.c: Update.
1436 * remote-sim.c: Update.
1438 * rs6000-nat.c: Update.
1439 * s390-linux-nat.c: Update.
1440 * sh-nbsd-nat.c: Update.
1441 * sol-thread.c: Update.
1442 * sparc-nat.c: Update.
1443 * sparc64-tdep.c: Update.
1444 * spu-linux-nat.c: Update.
1445 * spu-tdep.c: Update.
1446 * target-debug.h: Update.
1449 * tid-parse.c: Update.
1450 * tracefile-tfile.c: Update.
1451 * vax-bsd-nat.c: Update.
1452 * windows-nat.c: Update.
1453 * x86-linux-nat.c: Update.
1454 * x86-nat.c: Update.
1456 2018-07-03 Tom Tromey <tom@tromey.com>
1458 * common/ptid.c (pid_to_ptid): Remove.
1459 * common/ptid.h (pid_to_ptid): Don't declare.
1460 * aix-thread.c: Update.
1461 * arm-linux-nat.c: Update.
1462 * common/ptid.c: Update.
1463 * common/ptid.h: Update.
1464 * corelow.c: Update.
1466 * darwin-nat.c: Update.
1467 * fbsd-nat.c: Update.
1468 * fork-child.c: Update.
1469 * gnu-nat.c: Update.
1470 * go32-nat.c: Update.
1471 * inf-ptrace.c: Update.
1473 * inferior.c: Update.
1475 * linux-fork.c: Update.
1476 * linux-nat.c: Update.
1477 * nat/aarch64-linux-hw-point.c: Update.
1478 * nat/fork-inferior.c: Update.
1479 * nat/x86-linux-dregs.c: Update.
1480 * nto-procfs.c: Update.
1481 * obsd-nat.c: Update.
1483 * progspace.c: Update.
1485 * rs6000-nat.c: Update.
1486 * s390-linux-nat.c: Update.
1487 * sol-thread.c: Update.
1488 * spu-linux-nat.c: Update.
1491 * tracefile-tfile.c: Update.
1492 * windows-nat.c: Update.
1494 2018-07-03 Tom Tromey <tom@tromey.com>
1496 * common/ptid.h (ptid_build): Don't declare.
1497 * common/ptid.c (ptid_build): Remove.
1498 * aix-thread.c: Update.
1499 * bsd-kvm.c: Update.
1500 * bsd-uthread.c: Update.
1501 * common/agent.c: Update.
1502 * common/ptid.c: Update.
1503 * common/ptid.h: Update.
1504 * corelow.c: Update.
1505 * darwin-nat.c: Update.
1506 * fbsd-nat.c: Update.
1507 * gnu-nat.c: Update.
1508 * linux-fork.c: Update.
1509 * linux-nat.c: Update.
1510 * linux-thread-db.c: Update.
1511 * nat/linux-osdata.c: Update.
1512 * nat/linux-procfs.c: Update.
1513 * nto-procfs.c: Update.
1514 * obsd-nat.c: Update.
1515 * proc-service.c: Update.
1517 * ravenscar-thread.c: Update.
1518 * remote-sim.c: Update.
1520 * sol-thread.c: Update.
1522 * windows-nat.c: Update.
1524 2018-07-03 Tom Tromey <tom@tromey.com>
1526 * infrun.c (follow_exec): Use exit_inferior_silent.
1527 * inferior.c (exit_inferior_num_silent): Remove.
1528 * inferior.h (exit_inferior_num_silent): Don't declare.
1530 2018-07-03 Tom Tromey <tom@tromey.com>
1533 * darwin-nat.c (darwin_attach_pid): Reset inferior and
1534 inferior_ptid on error.
1536 2018-07-02 Maciej W. Rozycki <macro@mips.com>
1537 Simon Marchi <simon.marchi@polymtl.ca>
1540 * disasm.h (gdb_disassembler): Add
1541 `m_disassembler_options_holder'. member
1542 * disasm.c (get_all_disassembler_options): New function.
1543 (gdb_disassembler::gdb_disassembler): Use it.
1544 (gdb_buffered_insn_length_init_dis): Likewise.
1545 (gdb_buffered_insn_length): Adjust accordingly.
1546 (set_disassembler_options): Handle options with arguments.
1547 (show_disassembler_options_sfunc): Likewise. Add a leading new
1548 line if showing options with descriptions.
1549 (disassembler_options_completer): Adapt to using the
1550 `disasm_options_and_args_t' structure.
1551 * mips-tdep.c (mips_disassembler_options): New variable.
1552 (mips_disassembler_options_o32): Likewise.
1553 (mips_disassembler_options_n32): Likewise.
1554 (mips_disassembler_options_n64): Likewise.
1555 (gdb_print_insn_mips): Don't set `disassembler_options'.
1556 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1558 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
1559 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
1560 `gdbarch_disassembler_options_implicit' and
1561 `gdbarch_valid_disassembler_options'.
1562 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
1563 `disasm_options_and_args_t' structure.
1564 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
1566 (valid_disassembler_options): Switch from `disasm_options_t' to
1567 the `disasm_options_and_args_t' structure.
1568 * NEWS: Document `set disassembler-options' support for the MIPS
1570 * gdbarch.h: Regenerate.
1571 * gdbarch.c: Regenerate.
1573 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
1575 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
1577 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1579 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
1580 parameter in call to amd64_target_description.
1581 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
1582 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
1583 (amd64fbsd_init_abi): Likewise.
1584 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
1585 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
1586 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
1587 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
1589 2018-06-29 Pedro Alves <palves@redhat.com>
1591 * gdb/amd64-tdep.h (amd64_create_target_description): Add
1592 "segments" parameter.
1593 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
1594 (_initialize_amd64_tdep): Update call to
1595 amd64_create_target_description.
1596 (amd64_target_description): Add "segments" parameter. Adjust
1597 the implementation to use it.
1598 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
1599 call to amd64_create_target_description.
1600 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
1601 * gdb/arch/amd64.h (amd64_create_target_description): Add
1602 "segments" register.
1603 * gdb/arch/amd64.c (amd64_create_target_description): Add
1604 "segments" parameter. Call create_feature_i386_64bit_segments
1605 only if SEGMENTS is true.
1606 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
1607 call to amd64_create_target_description.
1609 2018-06-29 Pedro Alves <palves@redhat.com>
1611 * thread.c (thread_target_id_str): New, factored out from ...
1612 (print_thread_info_1): ... here. Use it to compute the max
1613 "Target Id" column width.
1615 2018-06-29 Pedro Alves <palves@redhat.com>
1617 * remote.c (remote_target::extra_thread_info): Delete
1618 'display_buf' and 'n' locals. from the cache, regardless of
1619 packet mechanims is in use. Use cache for qThreadExtra and qP
1622 2018-06-29 Pedro Alves <palves@redhat.com>
1624 * blockframe.c (find_pc_sect_containing_function): New function.
1625 * breakpoint.c (print_breakpoint_location): Don't call
1626 find_pc_sect_function.
1627 * linespec.c (create_sals_line_offset): Record the location's
1629 * linespec.c (convert_address_location_to_sals): Fill in sal's
1630 symbol with find_pc_sect_containing_function.
1631 * symtab.c (find_function_start_sal): Rename to ...
1632 (find_function_start_sal_1): ... this.
1633 (find_function_start_sal): Reimplement as wrapper around
1634 find_function_start_sal_1, and use
1635 find_pc_sect_containing_function to fill in the sal's symbol.
1636 (find_function_start_sal(symbol*, bool)): Adjust.
1637 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
1639 (find_pc_sect_containing_function): Declare.
1641 2018-06-29 Pedro Alves <palves@redhat.com>
1643 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
1644 true if the the location has no symbol.
1646 2018-06-28 Tom Tromey <tom@tromey.com>
1648 * NEWS: Mention --enable-codesign.
1649 * silent-rules.mk (ECHO_SIGN): New variable.
1650 * configure.ac: Add --enable-codesign.
1651 * configure: Rebuild.
1652 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
1653 (gdb$(EXEEXT)): Optionally invoke codesign.
1655 2018-06-28 Pedro Alves <palves@redhat.com>
1657 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
1659 (switch_to_thread_no_regs): Adjust comment.
1660 * infcmd.c (stop_pc): Delete.
1661 (post_create_inferior, info_program_command): Replace references
1662 to stop_pc with references to thread_info->suspend.stop_pc.
1663 * inferior.h (stop_pc): Delete declaration.
1664 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
1665 (handle_inferior_event_1, handle_signal_stop)
1666 (process_event_stop_test, keep_going_stepped_thread)
1667 (handle_step_into_function, handle_step_into_function_backward)
1668 (print_stop_location): Replace references to stop_pc with
1669 references to thread_info->suspend.stop_pc.
1670 (struct infcall_suspend_state) <stop_pc>: Delete field.
1671 (save_infcall_suspend_state, restore_infcall_suspend_state):
1672 Remove references to inf_stat->stop_pc.
1673 * linux-fork.c (fork_load_infrun_state): Likewise.
1674 * record-btrace.c (record_btrace_set_replay): Likewise.
1675 * record-full.c (record_full_goto_entry): Likewise.
1676 * remote.c (print_one_stopped_thread): Likewise.
1677 * target.c (target_resume): Extend comment.
1678 * thread.c (set_executing_thread): New.
1679 (set_executing): Use it.
1680 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
1681 Remove references to stop_pc.
1683 2018-06-28 Pedro Alves <palves@redhat.com>
1685 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
1686 Moving fetching stop_pc until after ecs->event_thread is refreshed.
1688 2018-06-28 Tom Tromey <tom@tromey.com>
1690 * coffread.c (coff_symfile_finish): Update.
1691 * xcoffread.c (xcoff_symfile_finish): Update.
1692 * elfread.c (elf_symfile_finish): Update.
1693 * symfile.h (dwarf2_free_objfile): Don't declare.
1694 * dwarf2read.c (_initialize_dwarf2_read): Use
1695 register_objfile_data_with_cleanup.
1696 (dwarf2_free_objfile): Now static. Change signature.
1698 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1700 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
1701 option "-o" to add-symbol-file-load to add an offset to each
1702 section's load address.
1703 * symfile.c (set_objfile_default_section_offset): New function.
1705 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1707 * symfile.c (add_symbol_file_command): Make sure that sections
1708 with the same name are sorted in the same order.
1710 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1712 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
1713 require the second argument. If omitted, load sections at the
1714 addresses specified in the file.
1716 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1718 * symfile.c (symbol_file_command, symbol_file_add_main_1)
1719 (_initialize_symfile): Add option "-o" to symbol-file to add an
1720 offset to each section of the symbol file.
1722 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1724 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
1726 2018-06-27 Tom Tromey <tom@tromey.com>
1728 * stack.c (_initialize_stack): Update "func" help text.
1730 2018-06-27 Tom Tromey <tom@tromey.com>
1732 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
1734 (unwind_infopy_str, pyuw_create_unwind_info)
1735 (unwind_infopy_add_saved_register, pyuw_sniffer)
1736 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
1738 (struct saved_reg): Add constructor.
1739 <value>: Now a gdbpy_ref<>.
1741 2018-06-27 Tom Tromey <tom@tromey.com>
1743 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
1745 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1747 * gdb-gdb.py.in: Format using autopep8.
1749 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1751 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
1752 (type_lookup_function): Recognize CORE_ADDR values.
1754 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1756 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
1759 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1761 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
1764 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1766 * gdb-gdb.py: Move to...
1767 * gdb-gdb.py.in: ... here.
1768 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
1769 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
1771 (distclean): Remove gdb-gdb.py when cleaning.
1772 (gdb-gdb.py, gdb-gdb.gdb): New rules.
1773 * configure: Re-generate.
1775 2018-06-27 Pedro Alves <palves@redhat.com>
1777 * proc-service.c (get_ps_regcache): New.
1778 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1779 (ps_lsetfpregs): Use it.
1781 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
1784 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
1785 (dwarf_decode_lines_1): Adjust.
1787 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1789 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
1791 <info_proc>: Likewise.
1793 2018-06-26 Joel Brobecker <brobecker@adacore.com>
1795 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
1796 to windows_fetch_one_register, and only handle the case of
1797 fetching one register. Move the code that reloads the context
1798 and iterates over all registers if R is negative to...
1799 (windows_nat_target::fetch_registers): ... here.
1800 (do_windows_store_inferior_registers): Rename to
1801 windows_store_one_register, and only handle the case of storing
1802 one register. Move the code that handles the case where r is
1804 (windows_nat_target::store_registers) ... here.
1806 2018-06-26 Tom Tromey <tom@tromey.com>
1809 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
1810 * rust-lang.c (rust_print_struct_def): Add podata parameter.
1812 (rust_internal_print_type): Add podata parameter.
1813 (rust_print_type): Update.
1815 2018-06-26 Tom Tromey <tom@tromey.com>
1817 * typeprint.h (struct print_offset_data) <update, finish,
1818 maybe_print_hole>: New methods.
1819 <indentation>: New constant.
1820 * typeprint.c (print_offset_data::indentation): Define.
1821 (print_offset_data::maybe_print_hole, print_offset_data::update)
1822 (print_offset_data::finish): Move from c-typeprint.c and rename.
1823 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
1824 (print_spaces_filtered_with_print_options): Update.
1825 (c_print_type_union_field_offset, maybe_print_hole)
1826 (c_print_type_struct_field_offset): Move to typeprint.c and
1828 (c_type_print_base_struct_union): Update.
1830 2018-06-25 Pedro Alves <palves@redhat.com>
1832 * gdbthread.h (thread_info_ref, delete_thread)
1833 (delete_thread_silent, first_thread_of_inferior)
1834 (any_thread_of_inferior, switch_to_thread)
1835 (enable_thread_stack_temporaries)
1836 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1837 (get_last_thread_stack_temporary)
1838 (value_in_thread_stack_temporaries, can_access_registers_thread):
1839 Spell out "struct thread_info" instead of just "thread_info".
1840 * inferior.h (notice_new_inferior): Likewise.
1842 2018-06-25 Pedro Alves <palves@redhat.com>
1844 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1845 pass thread_info pointer to delete_thread.
1846 (windows_nat_target::detach): Pass inferior pointer to
1848 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
1850 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
1851 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
1852 and pass a thread_info pointer to delete_thread.
1853 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
1854 pass thread_info pointer to delete_thread.
1855 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
1856 delete_thread_silent call.
1857 * procfs.c (procfs_target::detach): Pass inferior pointer to
1859 (procfs_target::wait): Pass thread_info pointer to delete_thread.
1860 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
1861 delete_thread_silent call.
1862 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1863 pass thread_info pointer to delete_thread.
1864 (windows_nat_target::detach): Pass inferior pointer to
1867 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1869 * regcache.c (readable_regcache::read_part): Fix asserts.
1870 (reg_buffer::raw_collect_part): New function.
1871 (regcache::write_part): Fix asserts.
1872 (reg_buffer::raw_supply_part): New function.
1873 (regcache::transfer_regset_register): New helper function.
1874 (regcache::transfer_regset): Call new functions.
1875 (regcache_supply_regset): Use gdb_byte*.
1876 (regcache::supply_regset): Likewise.
1877 (regcache_collect_regset): Likewise.
1878 (regcache::collect_regset): Likewise.
1879 * regcache.h (reg_buffer::raw_collect_part): New declaration.
1880 (reg_buffer::raw_supply_part): Likewise.
1881 (regcache::transfer_regset_register): Likewise.
1882 (regcache::transfer_regset): Use gdb_byte*.
1884 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1886 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
1888 2018-06-21 Pedro Alves <palves@redhat.com>
1890 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
1891 instead of a ptid_t. All callers adjusted.
1892 * ada-tasks.c (ada_get_task_number): Likewise. All callers
1894 (print_ada_task_info, display_current_task_id, task_command_1):
1896 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
1898 (breakpoint_kind): Adjust.
1899 (remove_breakpoints_pid): Rename to ...
1900 (remove_breakpoints_inf): ... this. Adjust to take an inferior
1901 pointer. All callers adjusted.
1902 (bpstat_clear_actions): Use inferior_thread.
1903 (get_bpstat_thread): New.
1904 (bpstat_do_actions): Use it.
1905 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
1906 to take a thread_info pointer. All callers adjusted.
1907 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
1908 (breakpoint_re_set_thread): Use inferior_thread.
1909 * breakpoint.h (struct inferior): Forward declare.
1910 (bpstat_stop_status): Update.
1911 (remove_breakpoints_pid): Delete.
1912 (remove_breakpoints_inf): New.
1913 * bsd-uthread.c (bsd_uthread_target::wait)
1914 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
1915 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
1916 (maint_btrace_packet_history_cmd)
1917 (maint_btrace_clear_packet_history_cmd): Adjust.
1918 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
1920 * cli/cli-interp.c: Include "inferior.h".
1921 * common/refcounted-object.h (struct
1922 refcounted_object_ref_policy): New.
1923 * compile/compile-object-load.c: Include gdbthread.h.
1924 (store_regs): Use inferior_thread.
1925 * corelow.c (core_target::close): Use current_inferior.
1926 (core_target_open): Adjust to use first_thread_of_inferior and use
1927 the current inferior.
1928 * ctf.c (ctf_target::close): Adjust to use current_inferior.
1929 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
1930 <thread>: ... this new field. All references adjusted.
1931 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
1932 Take a thread_info pointer instead of a ptid_t.
1933 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
1934 (dummy_frame_discard, register_dummy_frame_dtor): Take a
1935 thread_info pointer instead of a ptid_t.
1936 * elfread.c: Include "inferior.h".
1937 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
1938 Use inferior_thread.
1939 * eval.c (evaluate_subexp): Likewise.
1940 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
1942 * gdb_proc_service.h (struct thread_info): Forward declare.
1943 (struct ps_prochandle) <ptid>: Delete, replaced by ...
1944 <thread>: ... this new field. All references adjusted.
1945 * gdbarch.h, gdbarch.c: Regenerate.
1946 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
1947 'thread' parameter. All implementations and callers adjusted.
1948 * gdbthread.h (thread_info) <set_running>: New method.
1949 (delete_thread, delete_thread_silent): Take a thread_info pointer
1951 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
1952 (first_thread_of_process): Delete, replaced by ...
1953 (first_thread_of_inferior): ... this new function. All callers
1955 (any_live_thread_of_process): Delete, replaced by ...
1956 (any_live_thread_of_inferior): ... this new function. All callers
1958 (switch_to_thread, switch_to_no_thread): Declare.
1959 (is_executing): Delete.
1960 (enable_thread_stack_temporaries): Update comment.
1961 <enable_thread_stack_temporaries>: Take a thread_info pointer
1962 instead of a ptid_t. Incref the thread.
1963 <~enable_thread_stack_temporaries>: Decref the thread.
1966 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1967 (get_last_thread_stack_temporary)
1968 (value_in_thread_stack_temporaries, can_access_registers_thread):
1969 Take a thread_info pointer instead of a ptid_t. All callers
1971 * infcall.c (get_call_return_value): Use inferior_thread.
1972 (run_inferior_call): Work with thread pointers instead of ptid_t.
1973 (call_function_by_hand_dummy): Work with thread pointers instead
1974 of ptid_t. Use thread_info_ref.
1975 * infcmd.c (proceed_thread_callback): Access thread's state
1977 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
1978 access thread's state directly.
1979 (continue_command): Use inferior_thread.
1980 (info_program_command): Use find_thread_ptid and access thread
1982 (proceed_after_attach_callback): Use thread state directly.
1983 (notice_new_inferior): Take a thread_info pointer instead of a
1984 ptid_t. All callers adjusted.
1985 (exit_inferior): Take an inferior pointer instead of a pid. All
1987 (exit_inferior_silent): New.
1988 (detach_inferior): Delete.
1989 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
1990 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
1991 (detach_inferior_command, kill_inferior_command): Use
1992 find_inferior_id instead of valid_gdb_inferior_id and
1993 gdb_inferior_id_to_pid.
1994 (inferior_command): Use inferior and thread pointers.
1995 * inferior.h (struct thread_info): Forward declare.
1996 (notice_new_inferior): Take a thread_info pointer instead of a
1997 ptid_t. All callers adjusted.
1998 (detach_inferior): Delete declaration.
1999 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2000 instead of a pid. All callers adjusted.
2001 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2002 (valid_gdb_inferior_id): Delete.
2003 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2004 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2005 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2007 <inf>: ... this new field.
2008 <step_ptid>: Delete, replaced by ...
2009 <step_thread>: ... this new field.
2010 (get_displaced_stepping_state): Take an inferior pointer instead
2011 of a pid. All callers adjusted.
2012 (displaced_step_in_progress_any_inferior): Adjust.
2013 (displaced_step_in_progress_thread): Take a thread pointer instead
2014 of a ptid_t. All callers adjusted.
2015 (displaced_step_in_progress, add_displaced_stepping_state): Take
2016 an inferior pointer instead of a pid. All callers adjusted.
2017 (get_displaced_step_closure_by_addr): Adjust.
2018 (remove_displaced_stepping_state): Take an inferior pointer
2019 instead of a pid. All callers adjusted.
2020 (displaced_step_prepare_throw, displaced_step_prepare)
2021 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2022 All callers adjusted.
2023 (start_step_over): Adjust.
2024 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2025 displaced step queue.
2026 (do_target_resume): Adjust.
2027 (fetch_inferior_event): Use inferior_thread.
2028 (context_switch, get_inferior_stop_soon): Take an
2029 execution_control_state pointer instead of a ptid_t. All callers
2031 (switch_to_thread_cleanup): Delete.
2032 (stop_all_threads): Use scoped_restore_current_thread.
2033 * inline-frame.c: Include "gdbthread.h".
2034 (inline_state) <inline_state>: Take a thread pointer instead of a
2035 ptid_t. All callers adjusted.
2036 <ptid>: Delete, replaced by ...
2037 <thread>: ... this new field.
2038 (find_inline_frame_state): Take a thread pointer instead of a
2039 ptid_t. All callers adjusted.
2040 (skip_inline_frames, step_into_inline_frame)
2041 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2042 pointer instead of a ptid_t. All callers adjusted.
2043 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2044 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2045 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2047 * linux-nat.c (get_detach_signal): Likewise.
2048 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2049 (thread_db_notice_clone): Adjust.
2050 (thread_db_find_new_threads_silently)
2051 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2052 a thread pointer instead of a ptid_t. All callers adjusted.
2053 * mi/mi-cmd-var.c: Include "inferior.h".
2054 (mi_cmd_var_update_iter): Update to use thread pointers.
2055 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2057 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2059 (mi_output_running): ... this new function.
2060 (mi_on_resume_1): Adjust to use it.
2061 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2062 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2064 (interrupt_thread_callback): : Adjust to use thread and inferior
2066 * proc-service.c: Include "gdbthread.h".
2067 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2068 * progspace-and-thread.c: Include "inferior.h".
2069 * progspace.c: Include "inferior.h".
2070 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2071 hold a reference to an inferior_object.
2072 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2074 * python/py-inferior.c (struct inferior_object): Give the type a
2075 tag name instead of a typedef.
2076 (python_on_normal_stop): No need to check if the current thread is
2078 (inferior_to_inferior_object): Change return type to
2079 inferior_object. All callers adjusted.
2080 (find_thread_object): Delete, bits factored out to ...
2081 (thread_to_thread_object): ... this new function.
2082 * python/py-infthread.c (create_thread_object): Use
2083 inferior_to_inferior_object.
2084 (thpy_is_stopped): Use thread pointer directly.
2085 (gdbpy_selected_thread): Use inferior_thread.
2086 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2087 field, replaced with ...
2088 <thread>: ... this new field. All users adjusted.
2089 (btpy_insn_or_gap_new): Drop const.
2090 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2092 * python/py-record.c: Include "gdbthread.h".
2093 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2094 a ptid_t. All callers adjusted.
2095 (gdbpy_current_recording): Use inferior_thread.
2096 * python/py-record.h (recpy_record_object) <ptid>: Delete
2097 field, replaced with ...
2098 <thread>: ... this new field. All users adjusted.
2099 (recpy_element_object) <ptid>: Delete
2100 field, replaced with ...
2101 <thread>: ... this new field. All users adjusted.
2102 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2103 a ptid_t. All callers adjusted.
2104 * python/py-threadevent.c: Include "gdbthread.h".
2105 (get_event_thread): Use thread_to_thread_object.
2106 * python/python-internal.h (struct inferior_object): Forward
2108 (find_thread_object, find_inferior_object): Delete declarations.
2109 (thread_to_thread_object, inferior_to_inferior_object): New
2111 * record-btrace.c: Include "inferior.h".
2112 (require_btrace_thread): Use inferior_thread.
2113 (record_btrace_frame_sniffer)
2114 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2115 (get_thread_current_frame): Use scoped_restore_current_thread and
2117 (get_thread_current_frame): Use thread pointer directly.
2118 (record_btrace_replay_at_breakpoint): Use thread's inferior
2120 * record-full.c: Include "inferior.h".
2121 * regcache.c: Include "gdbthread.h".
2122 (get_thread_arch_regcache): Use the inferior's address space
2124 (get_thread_regcache, registers_changed_thread): New.
2125 * regcache.h (get_thread_regcache(thread_info *thread)): New
2127 (registers_changed_thread): New.
2128 (remote_target) <remote_detach_1>: Swap order of parameters.
2129 (remote_add_thread): <remote_add_thread>: Return the new thread.
2130 (get_remote_thread_info(ptid_t)): New overload.
2131 (remote_target::remote_notice_new_inferior): Use thread pointers
2133 (remote_target::process_initial_stop_replies): Use
2134 thread_info::set_running.
2135 (remote_target::remote_detach_1, remote_target::detach)
2136 (extended_remote_target::detach): Adjust.
2137 * stack.c (frame_show_address): Use inferior_thread.
2138 * target-debug.h (target_debug_print_thread_info_pp): New.
2139 * target-delegates.c: Regenerate.
2140 * target.c (default_thread_address_space): Delete.
2141 (memory_xfer_partial_1): Use current_inferior.
2142 (target_detach): Use current_inferior.
2143 (target_thread_address_space): Delete.
2144 (generic_mourn_inferior): Use current_inferior.
2145 * target.h (struct target_ops) <thread_address_space>: Delete.
2146 (target_thread_address_space): Delete.
2147 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2149 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2150 thread pointer instead of a ptid_t. Adjust all callers.
2151 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2152 (first_thread_of_process): Delete, replaced by ...
2153 (first_thread_of_inferior): ... this new function. All callers
2155 (any_thread_of_process): Rename to ...
2156 (any_thread_of_inferior): ... this, and take an inferior pointer.
2157 (any_live_thread_of_process): Rename to ...
2158 (any_live_thread_of_inferior): ... this, and take an inferior
2160 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2161 (value_in_thread_stack_temporaries)
2162 (get_last_thread_stack_temporary): Take a thread pointer instead
2163 of a ptid_t. Adjust all callers.
2164 (thread_info::set_running): New.
2165 (validate_registers_access): Use inferior_thread.
2166 (can_access_registers_ptid): Rename to ...
2167 (can_access_registers_thread): ... this, and take a thread
2169 (print_thread_info_1): Adjust to compare thread pointers instead
2171 (switch_to_no_thread, switch_to_thread): Make extern.
2172 (scoped_restore_current_thread::~scoped_restore_current_thread):
2173 Use m_thread pointer directly.
2174 (scoped_restore_current_thread::scoped_restore_current_thread):
2175 Use inferior_thread.
2176 (thread_command): Use thread pointer directly.
2177 (thread_num_make_value_helper): Use inferior_thread.
2178 * top.c (execute_command): Use inferior_thread.
2179 * tui/tui-interp.c: Include "inferior.h".
2180 * varobj.c (varobj_create): Use inferior_thread.
2181 (value_of_root_1): Use find_thread_global_id instead of
2182 global_thread_id_to_ptid.
2184 2018-06-21 Alan Hayward <alan.hayward@arm.com>
2186 * regcache.c (readable_regcache::read_part): Avoid memcpy when
2188 (regcache::write_part): Likewise.
2189 (readable_regcache::cooked_read_part): Update comment.
2190 (readable_regcache::cooked_write_part): Likewise.
2191 * regcache.h: (readable_regcache::read_part): Likewise.
2192 (regcache::write_part): Likewise.
2194 2018-06-21 Richard Bunt <richard.bunt@arm.com>
2195 Dirk Schubert <dirk.schubert@arm.com>
2197 * aarch64-linux-nat.c (post_attach): New.
2198 (aarch64_linux_nat_target::post_attach): Override post_attach to
2199 record the number of hardware debug registers.
2201 2018-06-20 Tom Tromey <tom@tromey.com>
2203 * python/py-param.c (add_setshow_generic): Make parameters const.
2204 (parmpy_init): Update.
2206 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2208 * regcache.h (regcache_cooked_read_ftype): Rename to...
2209 (register_read_ftype): ...this, change type to function_view.
2210 (class reg_buffer) <save>: Remove src parameter.
2211 (readonly_detached_regcache) <readonly_detached_regcache>: Make
2212 parameter non-const in first overload. Remove src parameter in
2214 * regcache.c (do_cooked_read): Remove.
2215 (readonly_detached_regcache::readonly_detached_regcache): Make
2216 parameter non-const, adjust call to other constructor.
2217 (reg_buffer::save): Remove src parameter.
2218 * frame.c (do_frame_register_read): Remove.
2219 (frame_save_as_regcache): Use lambda function.
2220 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2221 parameter to ppu2spu_data *.
2222 (ppu2spu_sniffer): Use lambda function.
2224 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2226 * record-full.c (record_full_target::insert_breakpoint): Remove
2227 "struct" keyword, add const.
2229 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2231 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2232 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2233 * configure.ac: Remove AC_PREREQ, add missing quoting.
2234 * gnulib/configure.ac: Modernize usage of
2235 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
2236 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2237 (AUTOMAKE_VERSION): Bump to 1.15.1.
2238 * configure: Re-generate.
2239 * config.in: Re-generate.
2240 * aclocal.m4: Re-generate.
2241 * gnulib/aclocal.m4: Re-generate.
2242 * gnulib/config.in: Re-generate.
2243 * gnulib/configure: Re-generate.
2244 * gnulib/import/Makefile.in: Re-generate.
2246 2018-06-19 Pedro Alves <palves@redhat.com>
2248 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2249 (lookup_minimal_symbol_by_pc_section): ... here with
2250 gdb_assert_not_reached added.
2252 2018-06-19 Pedro Alves <palves@redhat.com>
2254 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2255 parameter with a block parameter. Compare location's block symbol
2256 with the frame's block instead of addresses.
2257 (skip_inline_frames): Pass the current block instead of the
2258 frame's address. Break out as soon as we determine the frame
2259 should not be skipped.
2261 2018-06-18 Tom Tromey <tom@tromey.com>
2263 * solib-aix.c (solib_aix_get_section_offsets): Return
2265 (solib_aix_solib_create_inferior_hook): Update.
2267 2018-06-18 Tom Tromey <tom@tromey.com>
2269 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2271 2018-06-18 Tom Tromey <tom@tromey.com>
2273 * solib-frv.c (frv_relocate_main_executable): Use
2275 * solib-dsbt.c (dsbt_relocate_main_executable): Use
2278 2018-06-18 Tom Tromey <tom@tromey.com>
2280 * objfiles.h (inhibit_section_map_updates): Update.
2281 (resume_section_map_updates, resume_section_map_updates_cleanup):
2283 * solib-svr4.c (svr4_handle_solib_event): Update.
2284 * objfiles.c (inhibit_section_map_updates): Return
2285 scoped_restore_tmpl<int>.
2286 (resume_section_map_updates, resume_section_map_updates_cleanup):
2289 2018-06-18 Tom Tromey <tom@tromey.com>
2291 * valprint.h (read_string): Update.
2292 * valprint.c (read_string): Change type of "buffer".
2293 (val_print_string): Update.
2294 * python/py-value.c (valpy_string): Update.
2295 * language.h (struct language_defn) <la_get_string>: Change
2297 (default_get_string, c_get_string): Update.
2298 * language.c (default_get_string): Change type of "buffer".
2299 * guile/scm-value.c (gdbscm_value_to_string): Update.
2300 * c-lang.c (c_get_string): Change type of "buffer".
2302 2018-06-18 Tom Tromey <tom@tromey.com>
2304 * ser-mingw.c (struct pipe_state_destroyer): New.
2305 (pipe_state_up): New typedef.
2306 (cleanup_pipe_state): Remove.
2307 (pipe_windows_open): Use pipe_state_up. Don't release argv.
2309 2018-06-18 Tom Tromey <tom@tromey.com>
2311 * rust-lang.h (rust_yyerror): Don't declare.
2312 * rust-lang.c (rust_language_defn): Update.
2313 * rust-exp.y (yyerror): Now static.
2314 * parse.c (parse_exp_in_context_1): Update.
2315 * p-lang.h (p_yyerror): Don't declare.
2316 * p-lang.c (p_language_defn): Update.
2317 * p-exp.y (yyerror): Now static.
2318 * opencl-lang.c (opencl_language_defn): Update.
2319 * objc-lang.c (objc_language_defn): Update.
2320 * m2-lang.h (m2_yyerror): Don't declare.
2321 * m2-lang.c (m2_language_defn): Update.
2322 * m2-exp.y (yyerror): Now static.
2323 * language.h (struct language_defn) <la_error>: Remove.
2324 * language.c (unk_lang_error): Remove.
2325 (unknown_language_defn, auto_language_defn): Remove.
2326 * go-lang.h (go_yyerror): Don't declare.
2327 * go-lang.c (go_language_defn): Update.
2328 * go-exp.y (yyerror): Now static.
2329 * f-lang.h (f_yyerror): Don't declare.
2330 * f-lang.c (f_language_defn): Update.
2331 * f-exp.y (yyerror): Now static.
2332 * d-lang.h (d_yyerror): Don't declare.
2333 * d-lang.c (d_language_defn): Update.
2334 * d-exp.y (yyerror): Now static.
2335 * c-lang.h (c_yyerror): Don't declare.
2336 * c-lang.c (c_language_defn, cplus_language_defn)
2337 (asm_language_defn, minimal_language_defn): Update.
2338 * c-exp.y (yyerror): Now static.
2339 * ada-lang.h (ada_yyerror): Don't declare.
2340 * ada-lang.c (ada_language_defn): Update.
2341 * ada-exp.y (yyerror): Now static.
2343 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2345 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2346 (store_sveregs_to_thread): Likewise.
2347 (aarch64_linux_fetch_inferior_registers): Check for SVE.
2348 (aarch64_linux_store_inferior_registers): Likewise.
2349 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2351 (aarch64_sve_regs_copy_to_regcache): Likewise.
2352 (aarch64_sve_regs_copy_from_regcache): Likewise.
2353 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2355 (aarch64_sve_regs_copy_to_regcache): Likewise.
2356 (aarch64_sve_regs_copy_from_regcache): Likewise.
2357 (sve_context): Structure from Linux headers.
2358 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2359 (SVE_SIG_ZREG_SIZE): Likewise.
2360 (SVE_SIG_PREG_SIZE): Likewise.
2361 (SVE_SIG_FFR_SIZE): Likewise.
2362 (SVE_SIG_REGS_OFFSET): Likewise.
2363 (SVE_SIG_ZREGS_OFFSET): Likewise.
2364 (SVE_SIG_ZREG_OFFSET): Likewise.
2365 (SVE_SIG_ZREGS_SIZE): Likewise.
2366 (SVE_SIG_PREGS_OFFSET): Likewise.
2367 (SVE_SIG_PREG_OFFSET): Likewise.
2368 (SVE_SIG_PREGS_SIZE): Likewise.
2369 (SVE_SIG_FFR_OFFSET): Likewise.
2370 (SVE_SIG_REGS_SIZE): Likewise.
2371 (SVE_SIG_CONTEXT_SIZE): Likewise.
2372 (SVE_PT_REGS_MASK): Likewise.
2373 (SVE_PT_REGS_FPSIMD): Likewise.
2374 (SVE_PT_REGS_SVE): Likewise.
2375 (SVE_PT_VL_INHERIT): Likewise.
2376 (SVE_PT_VL_ONEXEC): Likewise.
2377 (SVE_PT_REGS_OFFSET): Likewise.
2378 (SVE_PT_FPSIMD_OFFSET): Likewise.
2379 (SVE_PT_FPSIMD_SIZE): Likewise.
2380 (SVE_PT_SVE_ZREG_SIZE): Likewise.
2381 (SVE_PT_SVE_PREG_SIZE): Likewise.
2382 (SVE_PT_SVE_FFR_SIZE): Likewise.
2383 (SVE_PT_SVE_FPSR_SIZE): Likewise.
2384 (SVE_PT_SVE_FPCR_SIZE): Likewise.
2385 (__SVE_SIG_TO_PT): Likewise.
2386 (SVE_PT_SVE_OFFSET): Likewise.
2387 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2388 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2389 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2390 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2391 (SVE_PT_SVE_PREG_OFFSET): Likewise.
2392 (SVE_PT_SVE_PREGS_SIZE): Likewise.
2393 (SVE_PT_SVE_FFR_OFFSET): Likewise.
2394 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2395 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2396 (SVE_PT_SVE_SIZE): Likewise.
2397 (SVE_PT_SIZE): Likewise.
2398 (HAS_SVE_STATE): New define.
2400 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2402 * nat/aarch64-sve-linux-sigcontext.h: New file.
2403 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2405 (SVE_VQ_MIN): Likewise.
2406 (SVE_VQ_MAX): Likewise.
2407 (SVE_VL_MIN): Likewise.
2408 (SVE_VL_MAX): Likewise.
2409 (SVE_NUM_ZREGS): Likewise.
2410 (SVE_NUM_PREGS): Likewise.
2411 (sve_vl_valid): Likewise.
2412 (struct user_sve_header): Likewise.
2414 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
2415 Richard Bunt <Richard.Bunt@arm.com>
2417 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2418 was requested by GDB.
2420 2018-06-15 Tom de Vries <tdevries@suse.de>
2422 * MAINTAINERS (Write After Approval): Add Tom de Vries.
2424 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
2426 * gnulib/update-gnulib.sh: Print expected versions of
2429 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
2431 * arch-utils.c (default_type_align): Use type_length_units.
2432 * gdbtypes.c (type_align): Use type_length_units.
2434 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2436 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2437 of 'define' command.
2439 2018-06-14 Tom de Vries <tdevries@suse.de>
2442 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2443 get_no_prettyformat_print_options.
2445 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
2447 * sparc-nat.h: Include target.h.
2448 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2449 <fetch_registers>: Remove this argument in function call.
2450 <store_registers>: Remove this argument in function call, remove
2452 <low_forget_process>: Call sparc64_forget_process instead of
2453 sparc_forget_process.
2455 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2457 * procfs.c (_initialize_procfs): Use add_inf_child_target.
2458 (procfs_target::make_corefile_notes): Adjust to new
2459 target_read_alloc return type.
2461 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2462 Stephen Roberts <stephen.roberts@arm.com>
2465 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2466 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2467 Move should_notify_stop local into more inner scope.
2469 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2470 Stephen Roberts <stephen.roberts@arm.com>
2473 * infrun.c (resume_1): Add call to mark_async_event_handler.
2475 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2477 * infrun.c (do_target_wait): Change old version of $pc printed.
2479 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
2481 * dwarf2read.c (read_index_from_section): Rename to...
2482 (read_gdb_index_from_section): ... this, update all callers.
2483 (dwarf2_read_index): Rename to...
2484 (dwarf2_read_gdb_index): ... this, update all callers.
2486 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
2488 * gdb/hppa-linux-nat.c
2489 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2490 hppa_linux_nat_target::fetch_registers.
2492 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2494 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2495 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2496 (AARCH64_DWARF_SVE_FFR): Likewise.
2497 (AARCH64_DWARF_SVE_P0): Likewise.
2498 (AARCH64_DWARF_SVE_Z0): Likewise.
2500 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2502 * common/common-regcache.h (raw_compare): New function.
2503 * regcache.c (regcache::raw_compare): Likewise.
2504 * regcache.h (regcache::raw_compare): New declaration.
2506 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2508 * common/common-regcache.h (reg_buffer_common): New structure.
2509 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2510 (reg_buffer::raw_supply): Likewise.
2511 (reg_buffer::raw_supply_integer): Likewise.
2512 (reg_buffer::raw_supply_zeroed): Likewise.
2513 (reg_buffer::raw_collect): Likewise.
2514 (reg_buffer::raw_collect_integer): Likewise.
2515 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2516 (reg_buffer::raw_supply): Likewise.
2517 (reg_buffer::raw_supply_integer): Likewise.
2518 (reg_buffer::raw_supply_zeroed): Likewise.
2519 (reg_buffer::raw_collect): Likewise.
2520 (reg_buffer::raw_collect_integer): Likewise.
2522 2018-06-10 Tom Tromey <tom@tromey.com>
2524 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
2525 (class remote_state) <stop_reply_queue>: Now std::vector.
2526 (remote_state::~remote_state)
2527 (remote_target::stop_reply_queue_length): Update.
2528 (struct queue_iter_param, remove_child_of_pending_fork)
2529 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2530 (check_pending_event_prevents_wildcard_vcont_callback)
2531 (remove_stop_reply_for_inferior)
2532 (remove_stop_reply_of_remote_state)
2533 (remote_notif_remove_once_on_match)
2534 (stop_reply_match_ptid_and_ws)
2535 (remote_kill_child_of_pending_fork): Remove.
2536 (remote_target::remove_new_fork_children)
2537 (remote_target::check_pending_events_prevent_wildcard_vcont)
2538 (remote_target::discard_pending_stop_replies)
2539 (remote_target::discard_pending_stop_replies_in_queue)
2540 (remote_target::remote_notif_remove_queued_reply)
2541 (remote_target::queued_stop_reply)
2542 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2543 (remote_target::wait, remote_target::kill_new_fork_children)
2544 (remote_target::async): Update.
2546 2018-06-10 Tom Tromey <tom@tromey.com>
2548 * record-full.c (record_full_arch_list_cleanups): Remove.
2549 (record_full_message): Use try/catch.
2550 (record_full_wait_cleanups): Remove.
2551 (record_full_wait_1): Use try/catch.
2552 (record_full_restore): Likewise.
2554 2018-06-10 Tom Tromey <tom@tromey.com>
2556 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
2557 declare VEC. Add constructor.
2558 <in_target_beneath>: Now bool.
2559 (record_full_breakpoints): Now a std::vector, static.
2560 (record_full_sync_record_breakpoints)
2561 (record_full_init_record_breakpoints)
2562 (record_full_target::insert_breakpoint)
2563 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
2565 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
2567 * dwarf2read.c (process_cu_includes): Remove struct keyword.
2568 * serial.c (serial_interface_lookup): Remove struct keyword.
2570 2018-06-10 Tom Tromey <tom@tromey.com>
2572 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
2574 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
2576 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
2578 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
2579 "beneath" as a method.
2580 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
2581 Use "beneath" as a method.
2583 2018-06-10 Tom Tromey <tom@tromey.com>
2585 * tracefile.c (struct trace_file_writer_deleter): New.
2586 <operator()>: Rename from trace_file_writer_xfree.
2587 (trace_file_writer_up): New typedef.
2588 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
2590 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2592 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
2593 <m_registers, m_register_status>: Change type to
2595 * regcache.c (reg_buffer::reg_buffer): Use new instead of
2598 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2600 * common/common-regcache.h (enum register_status): Add
2601 underlying type "signed char".
2602 * regcache.h (reg_buffer) <m_register_status>: Change type to
2604 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
2605 register_status instead of signed char.
2606 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
2607 (reg_buffer::get_register_status): Remove cast.
2608 (readable_regcache::raw_read): Remove cast.
2609 (readable_regcache::cooked_read): Remove cast.
2611 2018-06-09 Tom Tromey <tom@tromey.com>
2613 * source.c (reverse_search_command, forward_search_command): Use
2616 2018-06-09 Tom Tromey <tom@tromey.com>
2618 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
2619 (serial_ops_list): Now static, std::vector.
2620 (serial_interface_lookup, serial_add_interface): Update.
2622 2018-06-09 Tom Tromey <tom@tromey.com>
2624 * dwarf2read.c (process_cu_includes): Update.
2625 (process_full_comp_unit): Update.
2626 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
2629 2018-06-08 Paul Koning <paul_koning@dell.com>
2633 * python/python.c (do_start_initialization):
2634 Avoid call to internal Python API.
2635 (init__gdb_module): New function.
2637 2018-06-08 Gary Benson <gbenson@redhat.com>
2639 * linux-thread-db.c (valprint.h): New include.
2640 (struct check_thread_db_info): New structure.
2641 (check_thread_db_on_load, tdb_testinfo): New static globals.
2642 (check_thread_db, check_thread_db_callback): New functions.
2643 (try_thread_db_load_1): Run integrity checks if requested.
2644 (maintenance_check_libthread_db): New function.
2645 (_initialize_thread_db): Register "maint check libthread-db"
2646 and "maint set/show check-libthread-db".
2647 * NEWS: Mention the above new commands.
2649 2018-06-08 Tom Tromey <tom@tromey.com>
2651 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
2654 2018-06-08 Tom Tromey <tom@tromey.com>
2656 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
2658 2018-06-08 Tom Tromey <tom@tromey.com>
2660 * common/btrace-common.h (struct btrace_data): Add constructor,
2661 destructor, move assignment operator.
2662 <empty, clear, fini>: New methods.
2663 <format>: Initialize.
2664 (btrace_data_init, btrace_data_fini, btrace_data_clear)
2665 (btrace_data_empty): Don't declare.
2666 * common/btrace-common.c (btrace_data_init): Remove.
2667 (btrace_data::fini): Rename from btrace_data_fini.
2668 (btrace_data::empty): Rename from btrace_data_empty.
2669 (btrace_data::clear): Rename from btrace_data_clear. Return
2671 * btrace.h (make_cleanup_btrace_data): Don't declare.
2672 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
2673 (parse_xml_btrace): Update.
2674 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
2675 (maint_btrace_clear_packet_history_cmd): Update.
2677 2018-06-07 Pedro Alves <palves@redhat.com>
2679 * target.h (target_ops) <beneath>: Now a method. All references
2681 (class target_stack): New.
2682 * target.c (g_target_stack): New.
2683 (g_current_top_target): Delete.
2684 (current_top_target): Get the top target out of g_target_stack.
2685 (target_stack::push, target_stack::unpush): New.
2686 (push_target, unpush_target): Reimplement.
2687 (target_is_pushed): Reimplement in terms of g_target_stack.
2688 (target_ops::beneath, target_stack::find_beneath): New.
2690 2018-06-07 Pedro Alves <palves@redhat.com>
2692 * target.h (find_target_beneath): Delete declaration.
2693 * target.c (find_target_beneath): Delete definition.
2694 * aix-thread.c: All callers of find_target_beneath adjusted to
2695 call target_ops::beneath instead.
2696 * bsd-uthread.c: Likewise.
2697 * linux-thread-db.c: Likewise.
2698 * ravenscar-thread.c: Likewise.
2699 * sol-thread.c: Likewise.
2700 * spu-multiarch.c: Likewise.
2702 2018-06-07 Pedro Alves <palves@redhat.com>
2704 * target.h (target_ops) <beneath>: Now a method. All references
2706 (target_ops) <m_beneath>: New.
2707 * target.c (target_ops::beneath): New.
2708 * corelow.c: Adjust all references to target_ops::beneath.
2709 * linux-thread-db.c: Likewise.
2710 * make-target-delegates: Likewise.
2711 * record-btrace.c: Likewise.
2712 * record-full.c: Likewise.
2713 * remote.c: Likewise.
2714 * target.c: Likewise.
2715 * target-delegates.c: Regenerate.
2717 2018-06-07 Pedro Alves <palves@redhat.com>
2719 * target.h (target_stack): Delete.
2720 (current_top_target): Declare function.
2721 * target.c (target_stack): Delete.
2722 (g_current_top_target): New.
2723 (current_top_target): New function.
2724 * auxv.c: Use current_top_target instead of target_stack
2726 * avr-tdep.c: Likewise.
2727 * breakpoint.c: Likewise.
2728 * corefile.c: Likewise.
2729 * elfread.c: Likewise.
2731 * exceptions.c: Likewise.
2732 * frame.c: Likewise.
2733 * gdbarch-selftests.c: Likewise.
2734 * gnu-v3-abi.c: Likewise.
2735 * ia64-tdep.c: Likewise.
2736 * ia64-vms-tdep.c: Likewise.
2737 * infcall.c: Likewise.
2738 * infcmd.c: Likewise.
2739 * infrun.c: Likewise.
2740 * linespec.c: Likewise.
2741 * linux-tdep.c: Likewise.
2742 * minsyms.c: Likewise.
2743 * ppc-linux-nat.c: Likewise.
2744 * ppc-linux-tdep.c: Likewise.
2745 * procfs.c: Likewise.
2746 * regcache.c: Likewise.
2747 * remote.c: Likewise.
2748 * rs6000-tdep.c: Likewise.
2749 * s390-linux-nat.c: Likewise.
2750 * s390-tdep.c: Likewise.
2751 * solib-aix.c: Likewise.
2752 * solib-darwin.c: Likewise.
2753 * solib-dsbt.c: Likewise.
2754 * solib-spu.c: Likewise.
2755 * solib-svr4.c: Likewise.
2756 * solib-target.c: Likewise.
2757 * sparc-tdep.c: Likewise.
2758 * sparc64-tdep.c: Likewise.
2759 * spu-tdep.c: Likewise.
2760 * symfile.c: Likewise.
2761 * symtab.c: Likewise.
2762 * target-descriptions.c: Likewise.
2763 * target-memory.c: Likewise.
2764 * target.c: Likewise.
2765 * target.h: Likewise.
2766 * tracefile-tfile.c: Likewise.
2767 * tracepoint.c: Likewise.
2768 * valops.c: Likewise.
2769 * valprint.c: Likewise.
2770 * value.c: Likewise.
2771 * windows-tdep.c: Likewise.
2772 * mi/mi-main.c: Likewise.
2774 2018-06-07 Tom Tromey <tom@tromey.com>
2776 * valprint.h (build_address_symbolic): Declare.
2777 * printcmd.c (print_address_symbolic): Update.
2778 (build_address_symbolic): Change "name" and "filename" to
2780 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
2782 * defs.h (build_address_symbolic): Remove declaration.
2784 2018-06-07 Alan Hayward <alan.hayward@arm.com>
2786 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
2787 (aarch64_vnv_type): Add function.
2788 (aarch64_pseudo_register_name): Add V regs for SVE.
2789 (aarch64_pseudo_register_type): Likewise.
2790 (aarch64_pseudo_register_reggroup_p): Likewise.
2791 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
2792 (aarch64_pseudo_read_value): Add V regs for SVE.
2793 (aarch64_pseudo_write_2): Use V0 offset for SVE
2794 (aarch64_pseudo_write): Add V regs for SVE.
2795 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
2797 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
2799 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
2800 (sve_vl_from_vq): Likewise.
2802 2018-06-05 Tom Tromey <tom@tromey.com>
2804 * cli/cli-cmds.c (show_version): Update.
2805 * top.c (print_gdb_version): Add "interactive" parameter.
2807 * main.c (captured_main_1): Update.
2808 * top.h (print_gdb_version): Add "interactive" parameter and a
2811 2018-06-05 David Malcolm <dmalcolm@redhat.com>
2813 * common/enum-flags.h: Add trailing semicolon to example in
2816 2018-06-05 Tom Tromey <tom@tromey.com>
2819 * NEWS: Add entry about pager.
2820 * utils.c (pagination_disabled_for_command): New global.
2821 (prompt_for_continue): Allow "c" response to prompt.
2822 (reinitialize_more_filter): Clear
2823 pagination_disabled_for_command.
2824 (fputs_maybe_filtered): Check pagination_disabled_for_command.
2826 2018-06-04 Tom Tromey <tom@tromey.com>
2828 * ada-lang.h (ada_lookup_symbol_list): Update.
2829 * ada-lang.c (resolve_subexp): Update.
2830 (symbols_are_identical_enums): Change type of syms. Remove nsyms
2832 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
2833 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
2834 results parameter to std::vector.
2835 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
2837 * ada-exp.y (block_lookup): Update.
2838 (select_possible_type_sym): Change type of syms. Remove nsyms
2840 (write_var_or_type, write_name_assoc): Update.
2842 2018-06-04 Joel Brobecker <brobecker@adacore.com>
2844 * windows-nat.c (windows_nat_target::xfer_partial): Return
2845 TARGET_XFER_E_IO if we need to delegate to the target beneath
2846 but BENEATH is NULL.
2848 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
2850 * Makefile.in (config.status): Add configure.nat as a
2853 2018-06-04 Tom Tromey <tom@tromey.com>
2855 * cp-name-parser.y (cpname_state): Add method declarations.
2856 (HANDLE_QUAL): Update.
2857 (cpname_state::d_grab, cpname_state::fill_comp)
2858 (cpname_state::make_operator, cpname_state::make_dtor)
2859 (cpname_state::make_builtin_type, cpname_state::make_name)
2860 (cpname_state::d_qualify, cpname_state::d_int_type)
2861 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
2862 (%union): Move earlier.
2864 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2866 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
2868 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2870 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
2871 (aarch64_pseudo_write_1): Likewise.
2872 (aarch64_pseudo_read_value): Use helper.
2873 (aarch64_pseudo_write): Likewise.
2875 2018-06-04 Pedro Alves <palves@redhat.com>
2877 * darwin-nat.c (darwin_ops): Delete.
2878 (darwin_attach_pid): Use get_native_target.
2880 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2882 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
2883 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
2885 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2887 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
2888 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
2889 (aarch64_gdbarch_init): Check for SVE.
2890 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
2892 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2894 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
2895 * aarch64-tdep.h (aarch64_read_description): Likewise.
2896 * arch/aarch64.c (aarch64_create_target_description): Likewise.
2897 * arch/aarch64.h (aarch64_create_target_description): Likewise.
2898 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
2899 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
2900 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
2902 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
2904 * value.c (value_fetch_lazy_bitfield): New.
2905 (value_fetch_lazy_memory): New.
2906 (value_fetch_lazy_register): New.
2907 (value_fetch_lazy): Factor out to smaller functions.
2909 2018-06-01 Tom Tromey <tom@tromey.com>
2911 * cp-name-parser.y (backslashable, represented): Now const.
2913 2018-06-01 Tom Tromey <tom@tromey.com>
2915 * cp-name-parser.y: Include parser-defs.h.
2916 (parser_fprintf): Remove declaration.
2918 2018-06-01 Tom Tromey <tom@tromey.com>
2920 * cp-name-parser.y: Use %pure-parser, %lex-param, and
2922 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
2923 (global_result): Remove globals.
2924 (struct cpname_state): New.
2925 (yyparse): Don't declare.
2926 (yylex, yyerror): Move declarations after %union.
2927 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
2928 (make_name): Add state parameter.
2930 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
2932 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
2934 (yylex): Add lvalp, state parameters.
2935 (yyerror): Add state parameter.
2936 (cp_demangled_name_to_comp): Update.
2938 2018-06-01 Tom Tromey <tom@tromey.com>
2940 * cp-name-parser.y (parser_fprintf): Declare.
2941 (GDB_YY_REMAP_PREFIX): Define.
2942 Include yy-remap.h. Don't redefine yy* identifiers.
2944 2018-06-01 Tom Tromey <tom@tromey.com>
2946 * python/py-type.c (typy_legacy_template_argument): Update.
2947 * cp-support.h (cp_demangled_name_to_comp): Update.
2948 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
2949 parameter to be a "std::string *".
2952 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
2954 * ada-lex.l: Include "diagnostics.h" instead of
2955 "common/diagnostics.h".
2956 * unittests/environ-selftests.c: Likewise.
2957 * common/diagnostics.h: Moved to ../include.
2959 2018-06-01 Joel Brobecker <brobecker@adacore.com>
2961 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
2962 to language_mode_manual while calling breakpoint_re_set_one.
2964 2018-06-01 Tom Tromey <tom@tromey.com>
2966 * valops.c (value_cast_structs, destructor_name_p): Update.
2967 * symtab.c (gdb_mangle_name): Update.
2968 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
2970 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
2971 (pascal_object_print_value_fields, pascal_object_print_value):
2973 * p-typeprint.c (pascal_type_print_derivation_info): Update.
2974 * linespec.c (find_methods): Update.
2975 * gdbtypes.h (type_name_no_tag): Remove.
2976 (type_name_or_error): Rename from type_name_no_tag_or_error.
2977 * gdbtypes.c (type_name_no_tag): Remove.
2978 (type_name_or_error): Rename from type_name_no_tag_or_error.
2979 (lookup_struct_elt_type, check_typedef): Update.
2980 * expprint.c (print_subexp_standard): Update.
2981 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
2982 * d-namespace.c (d_lookup_nested_symbol): Update.
2983 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
2984 (cp_print_class_member): Update.
2985 * cp-namespace.c (cp_lookup_nested_symbol): Update.
2986 * completer.c (add_struct_fields): Update.
2987 * c-typeprint.c (cp_type_print_derivation_info)
2988 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
2990 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
2991 (ada_prefer_type, ada_is_exception_sym): Update.
2993 2018-06-01 Tom Tromey <tom@tromey.com>
2995 * valops.c (enum_constant_from_type, value_namespace_elt)
2996 (value_maybe_namespace_elt): Update.
2997 * valarith.c (find_size_for_pointer_math): Update.
2998 * target-descriptions.c (make_gdb_type): Update.
2999 * symmisc.c (print_symbol): Update.
3000 * stabsread.c (define_symbol, read_type)
3001 (complain_about_struct_wipeout, add_undefined_type)
3002 (cleanup_undefined_types_1): Update.
3003 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3004 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3005 (rust_internal_print_type, rust_composite_type)
3006 (rust_evaluate_funcall, rust_evaluate_subexp)
3007 (rust_inclusive_range_type_p): Update.
3008 * python/py-type.c (typy_get_tag): Update.
3009 * p-typeprint.c (pascal_type_print_base): Update.
3010 * mdebugread.c (parse_symbol, parse_type): Update.
3011 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3013 * guile/scm-type.c (gdbscm_type_tag): Update.
3014 * go-lang.c (sixg_string_p): Update.
3015 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3017 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3018 (TYPE_TAG_NAME): Remove.
3019 * gdbtypes.c (type_name_no_tag): Simplify.
3020 (check_typedef, check_types_equal, recursive_dump_type)
3021 (copy_type_recursive, arch_composite_type): Update.
3022 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3023 in summary mode when needed.
3024 * eval.c (evaluate_funcall): Update.
3025 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3026 (process_structure_scope, read_enumeration_type)
3027 (read_namespace_type, read_module_type, determine_prefix): Update.
3028 * cp-support.c (inspect_type): Update.
3029 * coffread.c (process_coff_symbol, decode_base_type): Update.
3030 * c-varobj.c (c_is_path_expr_parent): Update.
3031 * c-typeprint.c (c_type_print_base_struct_union): Update.
3032 (c_type_print_base_1): Update. Print struct/class/union/enum in
3033 summary when using C language.
3034 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3035 (gen_maybe_namespace_elt): Update.
3036 * ada-lang.c (ada_type_name): Simplify.
3037 (empty_record, ada_template_to_fixed_record_type_1)
3038 (template_to_static_fixed_type)
3039 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3041 2018-06-01 Tom Tromey <tom@tromey.com>
3043 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3045 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3046 (c_print_type): Update.
3047 (c_print_type): New overload.
3048 (c_type_print_varspec_prefix, c_type_print_args)
3049 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3050 (c_type_print_base_struct_union, c_type_print_base_1)
3051 (cp_type_print_method_args): Add "language" parameter.
3052 (c_type_print_base): Update.
3053 * c-lang.h (c_print_type): Add new overload.
3055 2018-06-01 Tom Tromey <tom@tromey.com>
3057 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3058 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3060 2018-06-01 Alan Hayward <alan.hayward@arm.com>
3062 * aarch64-tdep.c (aarch64_sve_register_names): New const
3064 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3065 (AARCH64_SVE_Z_REGS_NUM): New define.
3066 (AARCH64_SVE_P_REGS_NUM): Likewise.
3067 (AARCH64_SVE_NUM_REGS): Likewise.
3069 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
3071 * nat/linux-ptrace.h [__alpha__]
3072 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3075 2018-05-31 Maciej W. Rozycki <macro@mips.com>
3077 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3078 the endianness selected.
3079 * NEWS: Document `set endian auto' mode operation update.
3081 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3083 * Makefile.in: Add new header.
3084 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3085 (sve_vl_from_vg): Likewise.
3086 (sve_vq_from_vl): Likewise.
3087 (sve_vl_from_vq): Likewise.
3088 (sve_vq_from_vg): Likewise.
3089 (sve_vg_from_vq): Likewise.
3090 * configure.nat: Add new c file.
3091 * nat/aarch64-sve-linux-ptrace.c: New file.
3092 * nat/aarch64-sve-linux-ptrace.h: New file.
3094 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3096 * aarch64-linux-nat.c (aarch64_linux_read_description):
3098 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3100 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3101 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3102 (aarch64_gdbarch_init): Add parmeter zero.
3103 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3104 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3105 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3107 * doc/gdb.texinfo: Describe SVE feature
3108 * features/aarch64-sve.c: New file.
3110 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
3113 * gdbarch.sh (significant_addr_bit): Default to zero when
3114 not set by target architecture.
3115 * gdbarch.c: Re-generated.
3116 * utils.c (address_significant): Update.
3118 2018-05-30 Joel Brobecker <brobecker@adacore.com>
3120 * stack.c (func_command): Remove trailing newline in call to error.
3122 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3124 * regcache.h (regcache_raw_collect): Remove, update callers to
3125 use regcache::raw_collect.
3126 * regcache.c (regcache_raw_collect): Remove.
3128 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3130 * regcache.h (regcache_raw_supply): Remove, update callers to
3131 use detached_regcache::raw_supply.
3132 * regcache.c (regcache_raw_supply): Remove.
3134 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3136 * regcache.h (regcache_cooked_write_part): Remove, update
3137 callers to use regcache::cooked_write_part.
3138 * regcache.c (regcache_cooked_write_part): Remove.
3140 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3142 * regcache.h (regcache_cooked_read_part): Remove, update callers
3143 to use readable_regcache::cooked_read_part.
3144 * regcache.c (regcache_cooked_read_part): Remove.
3146 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3148 * regcache.h (regcache_cooked_read_value): Remove, update
3149 callers to use readable_regcache::cooked_read_value.
3150 * regcache.c (regcache_cooked_read_value): Remove.
3152 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3154 * regcache.h (regcache_cooked_write): Remove, update callers to
3155 use regcache::cooked_write.
3156 * regcache.c (regcache_cooked_write): Remove.
3158 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3160 * regcache.h (regcache_invalidate): Remove, update callers to
3161 use detached_regcache::invalidate instead.
3162 * regcache.c (regcache_invalidate): Remove.
3164 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3166 * regcache.h (regcache_raw_write_part): Remove, update callers
3167 to use regcache::raw_write_part instead.
3168 * regcache.c (regcache_raw_write_part): Remove.
3170 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3172 * regcache.h (regcache_raw_read_part): Remove, update callers to
3173 use readable_regcache::raw_read_part instead.
3174 * regcache.c (regcache_raw_read_part): Remove.
3176 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3178 * regcache.h (regcache_cooked_read): Remove, update callers to
3179 use readable_regcache::cooked_read instead.
3180 * regcache.c (regcache_cooked_read): Remove.
3182 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3184 * regcache.h (regcache_raw_write): Remove, update callers to use
3185 regcache::raw_write instead.
3186 * regcache.c (regcache_raw_write): Remove.
3188 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3190 * regcache.h (regcache_raw_read): Remove, update callers to use
3191 readable_regcache::raw_read instead.
3192 * regcache.c (regcache_raw_read): Remove.
3194 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3196 * regcache.h (regcache_raw_update): Remove, update callers to
3197 use readable_regcache::raw_update instead.
3198 * regcache.c (regcache_raw_update): Remove.
3200 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3202 * regcache.h (regcache_register_status): Remove, update callers
3203 to use reg_buffer::get_register_status directly instead.
3204 * regcache.c (regcache_register_status): Remove.
3206 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3208 * regcache.h (regcache_get_ptid): Remove, update all callers to
3209 call regcache::ptid instead.
3210 * regcache.c (regcache_get_ptid): Remove.
3212 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3214 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3216 2018-05-30 Pedro Alves <palves@redhat.com>
3218 * common/common-exceptions.h (exception_rethrow): Use
3221 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
3223 * breakpoint.c (print_solib_event, check_status_catch_solib):
3224 Remove struct keyword in range-based for loops.
3225 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3226 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3228 * linespec.c (find_superclass_methods, search_minsyms_for_name):
3230 * symfile.c (addr_info_make_relative): Likewise.
3231 * thread.c (value_in_thread_stack_temporaries): Likewise.
3233 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
3236 * valops.c (value_struct_elt_for_reference): Call check_typedef on
3237 aggregate type to get its real type before accessing it.
3239 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
3241 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3242 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3243 * coff-pe-read.c (add_pe_forwarded_sym): Replace
3244 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3245 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3246 * jit.c (jit_breakpoint_re_set_internal): Likewise.
3247 * printcmd.c (info_address_command): Likewise.
3249 2018-05-29 Tom Tromey <tom@tromey.com>
3251 * windows-nat.c (handle_exception): Update fall-through comment.
3253 2018-05-29 Tom Tromey <tom@tromey.com>
3255 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
3256 (struct program_space) <added_solibs>: Now a std::vector.
3257 * breakpoint.c (print_solib_event): Update.
3258 (check_status_catch_solib): Update.
3259 * progspace.c (clear_program_space_solib_cache): Update.
3260 * solib.c (update_solib_list): Update.
3262 2018-05-29 Tom Tromey <tom@tromey.com>
3264 * python/py-type.c (typy_richcompare): Update.
3265 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3266 * gdbtypes.h (types_deeply_equal): Return bool.
3267 (types_equal): Likewise.
3268 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
3270 (check_types_equal): Change worklist to std::vector. Return
3272 (struct type_equality_entry): Add constructor.
3273 (compare_maybe_null_strings): Return bool.
3274 (check_types_worklist): Return bool. Change worklist to
3276 (types_deeply_equal): Use std::vector.
3277 (types_equal): Return bool.
3278 (compare_maybe_null_strings): Simplify.
3280 2018-05-29 Tom Tromey <tom@tromey.com>
3282 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
3284 2018-05-29 Tom Tromey <tom@tromey.com>
3286 * objc-lang.h: Don't include cp-support.h.
3287 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
3290 2018-05-27 Tom Tromey <tom@tromey.com>
3292 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3294 2018-05-25 Tom Tromey <tom@tromey.com>
3296 * value.c (value::location): Initialize.
3298 2018-05-25 Tom Tromey <tom@tromey.com>
3300 * dbxread.c (init_bincl_list): Remove.
3301 (bincl_list): Now a std::vector.
3302 (bincls_allocated, next_bincl): Remove.
3303 (free_bincl_list, do_free_bincl_list_cleanup)
3304 (make_cleanup_free_bincl_list): Remove.
3305 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3307 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3308 (struct header_file_location): Add constructor.
3309 (add_bincl_to_list): Remove.
3311 2018-05-25 Tom Tromey <tom@tromey.com>
3313 * tui/tui.c (tui_enable): Update.
3314 * mi/mi-interp.c (mi_interp::init): Update.
3315 * interps.h (class interp) <name>: New method.
3316 <m_name>: Rename from name.
3317 (~scoped_restore_interp): Update.
3318 * interps.c (interp::interp): Update.
3319 (interp_add, interp_set, interp_lookup_existing)
3320 (current_interp_named_p): Update.
3322 2018-05-25 Tom Tromey <tom@tromey.com>
3324 * interps.c (interp_name): Remove.
3325 * mi/mi-interp.c (mi_interp::init): Update.
3326 * interps.h (interp_name): Remove.
3327 (~scoped_restore_interp): Update.
3328 * tui/tui.c (tui_enable): Update.
3330 2018-05-25 Tom Tromey <tom@tromey.com>
3332 * utils.c (fputs_maybe_filtered): Update.
3333 * linespec.c (decode_line_full): Update.
3334 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3335 (mi_print_breakpoint_for_event, mi_solib_loaded)
3336 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3337 (mi_user_selected_context_changed): Update.
3338 * mi/mi-main.c (mi_execute_command): Update.
3339 * cli/cli-script.c (execute_control_command): Update.
3340 * python/python.c (execute_gdb_command): Update.
3341 * solib.c (info_sharedlibrary_command): Update.
3342 * interps.c (interp_ui_out): Remove.
3343 * interps.h (interp_ui_out): Remove.
3345 2018-05-25 Tom Tromey <tom@tromey.com>
3347 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3348 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3349 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3351 2018-05-25 Tom Tromey <tom@tromey.com>
3353 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3354 * interps.c (interp_exec): Use scoped_restore.
3356 2018-05-25 Tom Tromey <tom@tromey.com>
3358 * remote.c (remote_target::remote_file_get): Use
3360 (remote_target::remote_file_put): Likewise.
3362 2018-05-25 Tom Tromey <tom@tromey.com>
3364 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3366 (get_pe_section_index, add_pe_exported_sym): Update.
3367 (read_pe_exported_syms): Use gdb::def_vector.
3369 2018-05-25 Tom Tromey <tom@tromey.com>
3371 * frame.c (remove_prev_frame): Remove.
3372 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3374 2018-05-25 Maciej W. Rozycki <macro@mips.com>
3376 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3378 * mips-linux-nat.c (supply_fpregset): Always call
3379 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3380 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3381 `mips_fill_fpregset'.
3382 * mips-linux-tdep.c (mips_supply_fpregset)
3383 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3384 (mips_fill_fpregset_wrapper): Remove functions.
3385 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3386 (mips_linux_fpregset): Remove variable.
3387 (mips_linux_iterate_over_regset_sections): Use
3388 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3389 (mips_linux_o32_sigframe_init): Remove comment.
3391 2018-05-25 Pedro Alves <palves@redhat.com>
3393 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3394 (struct readahead_cache, struct packet_reg, struct
3395 remote_arch_state, class remote_state): Move higher up in the
3397 (remote_target::m_remote_state): Now an object instead of a pointer.
3398 (remote_target::get_remote_state): Adjust.
3400 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3402 * stack.c (select_and_print_frame): Delete.
3403 (struct function_bounds): Move struct within function.
3404 (func_command): Most content moved into new function
3405 find_frame_for_function, use new function, print result, add
3407 (find_frame_for_function): New function, now returns a result.
3409 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3411 * stack.c (iterate_over_block_arg_vars): Fix comment.
3412 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3414 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3418 (scoped_restore_selected_frame::scoped_restore_selected_frame):
3420 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3422 * frame.h (class scoped_restore_selected_frame): New class.
3423 * stack.c (print_frame_local_vars): Remove catching and rethrowing
3424 of any exception, use scoped_restore_selected_frame to restore the
3427 2018-05-24 Pedro Alves <palves@redhat.com>
3429 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3432 2018-05-23 Tom Tromey <tom@tromey.com>
3434 * complaints.c (struct complaints): Remove.
3435 (symfile_complaint_book): Remove.
3436 (series): New global.
3437 (complaint_internal): Update.
3438 (clear_complaints): Update.
3440 2018-05-23 Tom Tromey <tom@tromey.com>
3442 * complaints.c (counters): New global.
3443 (struct complain): Remove.
3444 (struct complaints) <root>: Remove.
3445 (complaint_sentinel): Remove.
3446 (symfile_complaint_book): Update.
3447 (find_complaint) Remove.
3448 (complaint_internal, clear_complaints): Update.
3450 2018-05-23 Tom Tromey <tom@tromey.com>
3452 * complaints.c (struct complain) <file, line>: Remove.
3453 (find_complaint): Remove file, line parameters.
3454 (complaint_internal): Update.
3456 2018-05-23 Tom Tromey <tom@tromey.com>
3458 * complaints.c (vcomplaint): Remove.
3459 (complaint_internal) Merge in contents of vcomplaint.
3461 2018-05-23 Tom Tromey <tom@tromey.com>
3463 * complaints.c (struct complaints) <explanation>: Remove.
3464 (symfile_explanations): Remove.
3465 (symfile_complaint_book): Update.
3466 (vcomplaint): Update.
3467 (struct explanation): Remove.
3469 2018-05-23 Tom Tromey <tom@tromey.com>
3471 * complaints.c (symfile_complaints): Remove.
3472 (complaint_internal): Remove "complaints" parameter.
3473 (clear_complaints, vcomplaint): Remove "c" parameter.
3474 (get_complaints): Remove.
3475 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3476 (dwarf2_debug_line_missing_file_complaint)
3477 (dwarf2_debug_line_missing_end_sequence_complaint)
3478 (dwarf2_complex_location_expr_complaint)
3479 (dwarf2_const_value_length_mismatch_complaint)
3480 (dwarf2_section_buffer_overflow_complaint)
3481 (dwarf2_macro_malformed_definition_complaint)
3482 (dwarf2_invalid_attrib_class_complaint)
3483 (create_addrmap_from_index, dw2_symtab_iter_next)
3484 (dw2_expand_marked_cus)
3485 (dw2_debug_names_iterator::find_vec_in_debug_names)
3486 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3487 (create_debug_type_hash_table, init_cutu_and_read_dies)
3488 (partial_die_parent_scope, add_partial_enumeration)
3489 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3490 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3491 (read_import_statement, read_file_scope, create_dwo_cu_reader)
3492 (create_cus_hash_table, create_dwp_hash_table)
3493 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3494 (dwarf2_rnglists_process, dwarf2_ranges_process)
3495 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3496 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3497 (handle_struct_member_die, process_structure_scope)
3498 (read_array_type, read_common_block, read_module_type)
3499 (read_tag_pointer_type, read_typedef, read_base_type)
3500 (read_subrange_type, load_partial_dies, partial_die_info::read)
3501 (partial_die_info::read, partial_die_info::read)
3502 (partial_die_info::read, read_checked_initial_length_and_offset)
3503 (dwarf2_string_attr, read_formatted_entries)
3504 (dwarf_decode_line_header)
3505 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3506 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3507 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3508 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3509 (get_signatured_type, get_DW_AT_signature_type)
3510 (decode_locdesc, file_file_name, consume_improper_spaces)
3511 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3512 (dwarf_decode_macro_bytes, dwarf_decode_macros)
3513 (dwarf2_symbol_mark_computed, set_die_type)
3514 (read_attribute_value): Update.
3515 * stap-probe.c (handle_stap_probe, get_stap_base_address):
3517 * dbxread.c (unknown_symtype_complaint)
3518 (lbrac_mismatch_complaint, repeated_header_complaint)
3519 (set_namestring, function_outside_compilation_unit_complaint)
3520 (read_dbx_symtab, process_one_symbol): Update.
3521 * gdbtypes.c (stub_noname_complaint): Update.
3522 * windows-nat.c (handle_unload_dll): Update.
3523 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3524 (decode_base_type): Update.
3525 * xcoffread.c (bf_notfound_complaint, ef_complaint)
3526 (eb_complaint, record_include_begin, record_include_end)
3527 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3528 (process_xcoff_symbol, read_symbol)
3529 (function_outside_compilation_unit_complaint)
3530 (scan_xcoff_symtab): Update.
3531 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3532 * buildsym.c (finish_block_internal, make_blockvector)
3533 (end_symtab_get_static_block, augment_type_symtab): Update.
3534 * dtrace-probe.c (dtrace_process_dof)
3535 (dtrace_static_probe_ops::get_probes): Update.
3536 * complaints.h (struct complaint): Don't declare.
3537 (symfile_complaints): Remove.
3538 (complaint_internal): Remove "complaints" parameter.
3539 (complaint): Likewise.
3540 (clear_complaints): Likewise.
3541 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3542 (reread_symbols): Update.
3543 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3544 (dwarf2_frame_cache, decode_frame_entry): Update.
3545 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3546 * objc-lang.c (lookup_objc_class, lookup_child_selector)
3547 (info_selectors_command): Update.
3548 * macrotab.c (macro_include, check_for_redefinition)
3549 (macro_undef): Update.
3550 * objfiles.c (filter_overlapping_sections): Update.
3551 * stabsread.c (invalid_cpp_abbrev_complaint)
3552 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3553 (define_symbol, error_type, read_type, rs6000_builtin_type)
3554 (stabs_method_name_from_physname, read_member_functions)
3555 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3556 (attach_fields_to_type, complain_about_struct_wipeout)
3557 (read_range_type, read_args, common_block_start)
3558 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
3560 * mdebugread.c (index_complaint, unknown_ext_complaint)
3561 (basic_type_complaint, bad_tag_guess_complaint)
3562 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
3563 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
3564 (parse_procedure, parse_lines)
3565 (function_outside_compilation_unit_complaint)
3566 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
3567 (bad_tag_guess_complaint, reg_value_complaint): Update.
3568 * cp-support.c (demangled_name_complaint): Update.
3569 * macroscope.c (sal_macro_scope): Update.
3570 * dwarf-index-write.c (class debug_names): Update.
3572 2018-05-23 Tom Tromey <tom@tromey.com>
3574 * complaints.c (clear_complaints): Remove "noisy" parameter.
3575 * complaints.h (clear_complaints): Update.
3576 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3577 (reread_symbols): Update.
3579 2018-05-23 Tom Tromey <tom@tromey.com>
3581 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
3583 (vcomplaint, clear_complaints): Update.
3584 (symfile_explanations): Remove some messages.
3586 2018-05-23 Tom Tromey <tom@tromey.com>
3588 * complaints.c (internal_complaint): Remove.
3589 * complaints.h (internal_complaint): Remove.
3591 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3593 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
3595 2018-05-22 Pedro Alves <palves@redhat.com>
3597 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
3598 (remote_fileio_badfd, remote_fileio_return_errno)
3599 (remote_fileio_return_success, remote_fileio_func_open)
3600 (remote_fileio_func_open, remote_fileio_func_close)
3601 (remote_fileio_func_read, remote_fileio_func_write)
3602 (remote_fileio_func_lseek, remote_fileio_func_rename)
3603 (remote_fileio_func_unlink, remote_fileio_func_stat)
3604 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
3605 (remote_fileio_func_isatty, remote_fileio_func_system): Add
3606 remote_target parameter.
3607 (remote_fio_func_map) <func>: Add remote_target parameter.
3608 (do_remote_fileio_request, remote_fileio_request):
3609 * remote-fileio.h (remote_fileio_request):
3610 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
3611 remote_target parameter.
3612 (remote_notif_process, handle_notification): Adjust to pass down
3614 (remote_notif_state_allocate): Add remote_target parameter. Save
3616 * remote-notif.h (struct remote_target): Forward declare.
3617 (struct notif_client) <parse, ack, can_get_pending_events>: Add
3618 remote_target parameter.
3619 (struct remote_notif_state) <remote>: New field.
3620 (remote_notif_ack, remote_notif_parse): Add remote_target
3622 (remote_notif_state_allocate, remote_notif_state_allocate): Add
3623 remote_target parameter.
3624 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
3625 (threads_listing_context, rmt_thread_action, protocol_feature)
3626 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
3627 (packet_result, struct threads_listing_context, remote_state):
3628 Move definitions and declarations higher up.
3629 (remote_target) <~remote_target>: Declare.
3630 (remote_download_command_source, remote_file_put, remote_file_get)
3631 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
3632 (remote_hostio_pread_vFile, remote_hostio_send_command)
3633 (remote_hostio_set_filesystem, remote_hostio_open)
3634 (remote_hostio_close, remote_hostio_unlink, remote_state)
3635 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
3636 (get_memory_write_packet_size, get_memory_read_packet_size)
3637 (append_pending_thread_resumptions, remote_detach_1)
3638 (append_resumption, remote_resume_with_vcont)
3639 (add_current_inferior_and_thread, wait_ns, wait_as)
3640 (process_stop_reply, remote_notice_new_inferior)
3641 (process_initial_stop_replies, remote_add_thread)
3642 (btrace_sync_conf, remote_btrace_maybe_reopen)
3643 (remove_new_fork_children, kill_new_fork_children)
3644 (discard_pending_stop_replies, stop_reply_queue_length)
3645 (check_pending_events_prevent_wildcard_vcont)
3646 (discard_pending_stop_replies_in_queue, stop_reply)
3647 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
3648 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
3649 (remote_interrupt_as, remote_interrupt_ns)
3650 (remote_get_noisy_reply, remote_query_attached)
3651 (remote_add_inferior, remote_current_thread, get_current_thread)
3652 (set_thread, set_general_thread, set_continue_thread)
3653 (set_general_process, write_ptid)
3654 (remote_unpack_thread_info_response, remote_get_threadinfo)
3655 (parse_threadlist_response, remote_get_threadlist)
3656 (remote_threadlist_iterator, remote_get_threads_with_ql)
3657 (remote_get_threads_with_qxfer)
3658 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
3659 (get_offsets, remote_check_symbols, remote_supported_packet)
3660 (remote_query_supported, remote_packet_size)
3661 (remote_serial_quit_handler, remote_detach_pid)
3662 (remote_vcont_probe, remote_resume_with_hc)
3663 (send_interrupt_sequence, interrupt_query)
3664 (remote_notif_get_pending_events, fetch_register_using_p)
3665 (send_g_packet, process_g_packet, fetch_registers_using_g)
3666 (store_register_using_P, store_registers_using_G)
3667 (set_remote_traceframe, check_binary_download)
3668 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
3669 (remote_xfer_live_readonly_partial, remote_read_bytes)
3670 (remote_send_printf, remote_flash_write, readchar)
3671 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
3672 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
3673 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
3674 (extended_remote_disable_randomization, extended_remote_run)
3675 (send_environment_packet, extended_remote_environment_support)
3676 (extended_remote_set_inferior_cwd, remote_write_qxfer)
3677 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
3678 (packet_command): Now methods of ...
3679 (remote_target): ... this class.
3680 (m_remote_state) <remote_target>: New field.
3681 (struct remote_state) <stop_reply_queue,
3682 remote_async_inferior_event_token, wait_forever_enabled_p>: New
3684 (remote_state::remote_state): Allocate stop_reply_queue.
3685 (remote_state): Delete global.
3686 (get_remote_state_raw): Delete.
3687 (remote_target::get_remote_state): Allocate m_remote_state on
3689 (get_current_remote_target): New.
3690 (remote_ops, extended_remote_ops): Delete.
3691 (wait_forever_enabled_p, remote_async_inferior_event_token):
3692 Delete, moved to struct remote_state.
3693 (remote_target::close): Delete self. Destruction bits split to
3695 (remote_target::~remote_target): ... this.
3696 (show_memory_packet_size): Adjust to use
3697 get_current_remote_target.
3698 (struct protocol_feature) <func>: Add remote_target parameter.
3699 All callers adjusted.
3700 (curr_quit_handler_target): New.
3701 (remote_serial_quit_handler): Reimplement.
3702 (remote_target::open_1): Adjust to use get_current_remote_target.
3703 Heap-allocate remote_target/extended_remote_target instances.
3704 (vcont_builder::vcont_builder): Add remote_target parameter, and
3705 save it in m_remote. All callers adjusted.
3706 (vcont_builder::m_remote): New field.
3707 (vcont_builder::restart, vcont_builder::flush)
3708 (vcont_builder::push_action): Use it.
3709 (remote_target::commit_resume): Use it.
3710 (struct queue_iter_param) <remote>: New field.
3711 (remote_target::remove_new_fork_children): Fill in 'remote' field.
3712 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
3713 (check_pending_event_prevents_wildcard_vcont_callback)
3714 (remote_target::check_pending_events_prevent_wildcard_vcont)
3715 (remote_target::discard_pending_stop_replies)
3716 (remote_target::discard_pending_stop_replies_in_queue)
3717 (remote_target::remote_notif_remove_queued_reply): Fill in
3719 (remote_notif_get_pending_events): New.
3720 (remote_target::readchar, remote_target::remote_serial_write):
3721 Save/restore curr_quit_handler_target.
3723 (kill_new_fork_children): Fill in 'remote' field.
3724 (packet_command): Use get_current_remote_target, defer to
3725 remote_target method of same name.
3726 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
3727 parameter, and save it in m_remote. All callers adjusted.
3728 (scoped_remote_fd::release): Use m_remote.
3729 (scoped_remote_fd::m_remote): New field.
3730 (remote_file_put, remote_file_get, remote_file_delete): Use
3731 get_current_remote_target, defer to remote_target method of same
3733 (remote_btrace_reset): Add remote_state paremeter. Update all
3735 (remote_async_inferior_event_handler). Pass down 'data'.
3736 (remote_new_objfile): Use get_current_remote_target.
3737 (remote_target::vcont_r_supported): New.
3738 (set_range_stepping): Use get_current_remote_target and
3739 remote_target::vcont_r_supported.
3740 (_initialize_remote): Don't allocate 'remote_state' and
3741 'stop_reply_queue' globals.
3742 * remote.h (struct remote_target): Forward declare.
3743 (getpkt, putpkt, remote_notif_get_pending_events): Add
3744 'remote_target' parameter.
3746 2018-05-22 Pedro Alves <palves@redhat.com>
3748 * remote.c (vcont_builder): Now a class. Make all data members
3750 (vcont_builder) <vcont_builder, restart, flush, push_action>:
3752 (vcont_builder_restart): Rename to ...
3753 (vcont_builder::restart): ... this.
3754 (vcont_builder_flush): Rename to ...
3755 (vcont_builder::flush): ... this.
3756 (vcont_builder_push_action): Rename to ...
3757 (vcont_builder::push_action): ... this.
3758 (remote_target::commit_resume): Adjust.
3760 2018-05-22 Pedro Alves <palves@redhat.com>
3762 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
3763 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
3764 (get_fixed_memory_packet_size): New.
3765 (get_memory_packet_size): Use it.
3766 (set_memory_packet_size): Don't override the config size with
3767 DEFAULT_MAX_MEMORY_PACKET_SIZE.
3768 (show_memory_packet_size): Use get_fixed_memory_packet_size.
3769 Don't refer to get_memory_packet_size if not connected to a remote
3770 target. Show "(default)" if configured size is 0.
3772 2018-05-22 Pedro Alves <palves@redhat.com>
3774 * remote.c (remote_target::mourn_inferior): Move
3775 discard_pending_stop_replies call here from ...
3776 (_initialize_remote): ... here.
3778 2018-05-22 Pedro Alves <palves@redhat.com>
3780 * remote.c (compare_section_command): Remove set_general_process
3783 2018-05-22 Pedro Alves <palves@redhat.com>
3785 * remote.c (struct packet_reg, struct remote_arch_state):
3786 Move higher up in the file.
3787 (remote_state) <m_arch_states>: Store remote_arch_state values
3788 instead of remote_arch_state pointers.
3789 (remote_state::get_remote_arch_state): Adjust.
3791 2018-05-22 Pedro Alves <palves@redhat.com>
3793 * remote.c: Include <unordered_map>.
3794 (remote_state): Now a class.
3795 (remote_state) <get_remote_arch_state>: Declare method.
3796 <get_remote_arch_state>: New field.
3797 (remote_arch_state) <remote_arch_state>: Declare ctor.
3798 <regs>: Now a unique_ptr.
3799 (remote_gdbarch_data_handle): Delete.
3800 (get_remote_arch_state): Delete.
3801 (remote_state::get_remote_arch_state): New.
3802 (get_remote_state): Adjust to call remote_state's
3803 get_remote_arch_state method.
3804 (init_remote_state): Delete, bits factored out to ...
3805 (remote_arch_state::remote_arch_state): ... this new method.
3806 (get_remote_packet_size, get_memory_packet_size)
3807 (process_g_packet, remote_target::fetch_registers)
3808 (remote_target::prepare_to_store, store_registers_using_G)
3809 (remote_target::store_registers, remote_target::get_trace_status):
3810 Adjust to call remote_state's method.
3811 (_initialize_remote): Remove reference to
3812 remote_gdbarch_data_handle.
3814 2018-05-22 Pedro Alves <palves@redhat.com>
3816 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
3817 pread>: New method declarations.
3818 (remote_target::open_1): Adjust.
3819 (readahead_cache_invalidate): Rename to ...
3820 (readahead_cache::invalidate): ... this, and adjust to be a class
3822 (readahead_cache_invalidate_fd): Rename to ...
3823 (readahead_cache::invalidate_fd): ... this, and adjust to be a
3825 (remote_hostio_pwrite): Adjust.
3826 (remote_hostio_pread_from_cache): Rename to ...
3827 (readahead_cache::pread): ... this, and adjust to be a class
3829 (remote_hostio_close): Adjust.
3831 2018-05-22 Pedro Alves <palves@redhat.com>
3833 * remote.c (remote_hostio_close_cleanup): Delete.
3834 (class scoped_remote_fd): New.
3835 (remote_file_put, remote_file_get): Use it.
3837 2018-05-22 Pedro Alves <palves@redhat.com>
3839 (struct vCont_action_support): Use bool and initialize all fields.
3840 (struct readahead_cache): Initialize all fields.
3841 (remote_state): Use bool and initialize all fields.
3842 (remote_state::remote_state, remote_state::~remote_state): New.
3843 (new_remote_state): Delete.
3844 (_initialize_remote): Use new to allocate remote_state.
3846 2018-05-22 Pedro Alves <palves@redhat.com>
3850 * c-exp.y: Include "c-support.h".
3851 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
3852 of tolower. Use c_ident_is_alpha to scan names.
3853 * c-lang.c: Include "c-support.h".
3854 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
3855 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
3856 * c-support.h: New file, with bits factored out from ...
3857 * cp-name-parser.y: ... this file.
3858 Include "c-support.h".
3859 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
3860 c-support.h and renamed.
3861 (symbol_end, yylex): Adjust.
3863 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3865 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
3866 parameter type to CORE_ADDR.
3867 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
3868 parameter type in declaration to CORE_ADDR.
3869 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
3870 target_auxv_search to get AT_HWCAP and use the result to get the
3872 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
3873 to CORE_ADDR. Remove the cast of the return value to unsigned
3874 long. Fix error predicate of target_auxv_search.
3875 (ppc_linux_nat_target::read_description): Change the type of the
3876 hwcap variable to CORE_ADDR.
3878 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3880 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
3881 if the size of fpscr is larger than 32 bits.
3883 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3885 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
3886 (ppc32_linux_vsxregmap): New global.
3887 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
3888 regcache_supply_regset, and regcache_collect_regset.
3889 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
3890 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
3891 (fetch_vsx_register, store_vsx_register): Remove.
3892 (fetch_vsx_registers): Add regno parameter. Get regset using
3893 ppc_linux_vsxregset. Use regset to supply registers.
3894 (store_vsx_registers): Add regno parameter. Get regset using
3895 ppc_linux_vsxregset. Use regset to collect registers.
3896 (fetch_register): Call fetch_vsx_registers instead of
3898 (store_register): Call store_vsx_registers instead of
3900 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
3901 new regno parameter.
3902 (store_ppc_registers): Call store_vsx_registers with -1 for the
3903 new regno parameter.
3904 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
3905 (ppc_collect_vsxregset): Remove.
3907 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3909 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
3911 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
3912 for vector register offset fields.
3913 (ppc64_fbsd_reg_offsets): Likewise.
3914 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3915 to vector register offset fields.
3916 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3917 to vector register offset fields.
3918 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
3919 vector register offset fields.
3920 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
3921 initializers for vector register offset fields.
3922 (rs6000_aix64_reg_offsets): Likewise.
3923 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
3924 (ppc_supply_vrregset): Remove.
3925 (ppc_collect_vrregset): Remove.
3926 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
3927 (ppc_linux_vrregset) : New function.
3928 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
3929 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
3930 (ppc32_linux_vrregset): Remove.
3931 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
3932 and use result instead of ppc32_linux_vrregset.
3933 (ppc32_linux_reg_offsets): Remove initializers for vector register
3935 (ppc64_linux_reg_offsets): Likewise.
3936 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
3937 * ppc-linux-nat.c: Include regset.h.
3938 (gdb_vrregset_t): Adjust comment to account for little-endian
3940 (supply_vrregset, fill_vrregset): Remove.
3941 (fetch_altivec_register, store_altivec_register): Remove.
3942 (fetch_altivec_registers): Add regno parameter. Get regset using
3943 ppc_linux_vrregset. Use regset to supply registers.
3944 (store_altivec_registers): Add regno parameter. Get regset using
3945 ppc_linux_vrregset. Use regset to collect registers.
3946 (fetch_register): Call fetch_altivec_registers instead of
3947 fetch_altivec_register.
3948 (store_register): Call store_altivec_registers instead of
3949 store_altivec_register.
3950 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
3951 the new regno parameter.
3952 (store_ppc_registers): Call store_altivec_registers with -1 for
3953 the new regno parameter.
3955 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3957 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
3958 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
3959 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3960 (gdb_vrregset_t): Change array type size to
3961 PPC_LINUX_SIZEOF_VRREGSET.
3962 (gdb_vsxregset_t): Change array type size to
3963 PPC_LINUX_SIZEOF_VSXREGSET.
3964 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
3965 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
3966 PPC_LINUX_SIZEOF_VSXREGSET.
3968 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3970 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
3971 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
3973 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
3974 ppc_linux_target_wordsize with tid.
3975 (ppc_linux_nat_target::read_description): Call ppc_linux_target
3977 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
3978 (ppc64_64bit_inferior_p): Add static and inline specifiers.
3979 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
3980 tid parameter. Remove static specifier.
3981 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
3982 (ppc_linux_target_wordsize): New declaration.
3984 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3986 * arch/ppc-linux-common.c: New file.
3987 * arch/ppc-linux-common.h: New file.
3988 * arch/ppc-linux-tdesc.h: New file.
3989 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
3990 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
3991 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
3992 arch/ppc-linux-tdesc.h.
3993 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
3994 arch/ppc-linux-tdesc.h.
3995 (ppc_linux_nat_target::read_description): Remove target
3996 description matching code. Fill a ppc_linux_features struct and
3997 call ppc_linux_match_description with it. Move comment about ISA
3998 2.05 to ppc-linux-common.c.
3999 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4000 arch/ppc-linux-tdesc.h.
4001 (ppc_linux_core_read_description): Remove target description
4002 matching code. Fill a ppc_linux_features struct and call
4003 ppc_linux_match_description with it.
4004 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4005 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4006 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4007 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4008 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4009 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4010 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4011 (tdesc_powerpc_e500l): Remove.
4013 2018-05-22 Joel Brobecker <brobecker@adacore.com>
4015 * ada-lang.c (catch_assert_command): Pass empty string instead
4016 of NULL for excep_string argument.
4018 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4020 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4021 the width of the requested register exceeds the width of the
4024 2018-05-21 Tom Tromey <tom@tromey.com>
4026 * printcmd.c (output_command): Remove.
4027 (output_command_const): Rename to output_command.
4028 * valprint.h (output_command): Rename from output_command_const.
4029 * tracepoint.c (trace_dump_actions): Call output_command.
4031 2018-05-21 Tom Tromey <tom@tromey.com>
4033 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4034 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4035 * ada-lang.h (create_ada_exception_catchpoint): Update.
4036 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4038 (create_excep_cond_exprs, ~ada_catchpoint)
4039 (should_stop_exception, print_one_exception)
4040 (print_mention_exception, print_recreate_exception): Update.
4041 (ada_get_next_arg): Remove.
4042 (catch_ada_exception_command_split): Use std::string. Change type
4043 of "excep_string", "cond_string".
4044 (catch_ada_exception_command): Update.
4045 (create_ada_exception_catchpoint): Change type of excep_string.
4046 (ada_exception_sal): Remove excep_string parameter.
4047 (~ada_catchpoint): Remove.
4049 2018-05-21 Tom Tromey <tom@tromey.com>
4051 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4054 2018-05-21 Tom Tromey <tom@tromey.com>
4056 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4057 Return unique_xmalloc_ptr.
4058 (print_it_exception): Update.
4060 2018-05-21 Tom Tromey <tom@tromey.com>
4062 * tracepoint.c (trace_dump_actions): Use std::string.
4064 2018-05-21 Tom Tromey <tom@tromey.com>
4066 * symfile.c (reread_symbols): Use std::string for original_name.
4068 2018-05-21 Tom Tromey <tom@tromey.com>
4070 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4071 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4074 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4076 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4078 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4079 * objfiles.c (get_objfile_bfd_data): Allocate
4080 objfile_per_bfd_storage with obstack_new when allocating on
4083 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4085 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4087 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4088 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4089 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4090 (add_pending): Likewise.
4091 (parse_symbol): Likewise.
4092 (parse_partial_symbols): Likewise.
4093 (psymtab_to_symtab_1): Likewise.
4094 (new_psymtab): Likewise.
4095 (elfmdebug_build_psymtabs): Likewise.
4096 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4097 * objfiles.c (get_objfile_bfd_data): Likewise.
4098 (objfile_register_static_link): Likewise.
4099 * psymtab.c (allocate_psymtab): Likewise.
4100 * stabsread.c (read_member_functions): Likewise.
4101 * xcoffread.c (xcoff_end_psymtab): Likewise.
4103 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4105 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4106 compiler supports std::is_trivially_constructible.
4107 * common/poison.h: Include obstack.h.
4108 (IsMallocable): Define to is_trivially_constructible if the
4109 compiler supports it, define to true_type otherwise.
4113 (XOBNEWVEC): Redefine.
4114 * gdb_obstack.h (obstack_zalloc): New.
4115 (OBSTACK_ZALLOC): Redefine.
4116 (obstack_calloc): New.
4117 (OBSTACK_CALLOC): Redefine.
4119 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4120 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4122 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4123 obstack_calloc/obstack_zalloc.
4124 (gdbarch_obstack_zalloc): Remove.
4125 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4127 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4129 * stack.c (backtrace_command_1): Remove useless variable int i.
4131 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4133 * stack.c (print_frame_info): Fix comment.
4135 2018-05-18 Tom Tromey <tom@tromey.com>
4137 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4138 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4139 (~dwarf2_per_objfile): Update
4140 (dwarf2_get_dwz_file): Use new.
4141 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4144 2018-05-18 Tom Tromey <tom@tromey.com>
4146 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4148 * dwarf2read.c (struct dwp_file): Add constructor and
4150 (open_and_init_dwp_file): Return a unique_ptr.
4151 (dwarf2_per_objfile, create_dwp_hash_table)
4152 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4153 (lookup_dwo_unit_in_dwp): Update.
4154 (open_and_init_dwp_file, get_dwp_file): Update.
4156 2018-05-18 Tom Tromey <tom@tromey.com>
4158 * dwarf2read.c (dwarf2_per_objfile): Update.
4159 (struct mapped_index): Add initializers.
4160 (dwarf2_read_index): Use new.
4161 (dw2_symtab_iter_init): Update.
4162 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4165 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4167 * dwarf2read.c (mapped_index) <total_size>: Remove.
4169 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4171 * unittests/format_pieces-selftests.c (test_format_specifier):
4174 2018-05-18 Tom Tromey <tom@tromey.com>
4176 * c-typeprint.c (maybe_print_hole): New function.
4177 (c_print_type_struct_field_offset): Update.
4178 (c_type_print_base_struct_union): Call maybe_print_hole.
4180 2018-05-17 Keith Seitz <keiths@redhat.com>
4182 * breakpoint.c (build_bpstat_chain): New function, moved from
4184 (bpstat_stop_status): Add optional parameter, `stop_chain'.
4185 If no stop chain is passed, call build_bpstat_chain to build it.
4186 * breakpoint.h (build_bpstat_chain): Declare.
4187 (bpstat_stop_status): Move documentation here from breakpoint.c.
4188 * infrun.c (handle_signal_stop): Before eliding inlined frames,
4189 build the stop chain and pass it to skip_inline_frames.
4190 Pass this stop chain to bpstat_stop_status.
4191 * inline-frame.c: Include breakpoint.h.
4192 (stopped_by_user_bp_inline_frame): New function.
4193 (skip_inline_frames): Add parameter `stop_chain'.
4194 Move documention to inline-frame.h.
4195 If non-NULL, use stopped_by_user_bp_inline_frame to determine
4196 whether the frame should be elided.
4197 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4198 Add moved documentation and update for new parameter.
4200 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4203 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4204 unittests/format_pieces-selftests.c.
4205 * common/format.h (format_piece) <operator==>: New.
4206 (format_pieces) <operator[]>: Remove.
4207 * common/format.c (format_pieces::format_pieces): Handle \e.
4208 * unittests/format_pieces-selftests.c: New.
4210 2018-05-17 Tom Tromey <tom@tromey.com>
4213 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4214 (dw2_instantiate_symtab): Add skip_partial parameter.
4215 (dw2_find_last_source_symtab, dw2_map_expand_apply)
4216 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4217 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4218 (dw2_expand_symtabs_matching_one)
4219 (dw2_find_pc_sect_compunit_symtab)
4220 (dw2_debug_names_lookup_symbol)
4221 (dw2_debug_names_expand_symtabs_for_function): Update.
4222 (init_cutu_and_read_dies): Add skip_partial parameter.
4223 (process_psymtab_comp_unit, build_type_psymtabs_1)
4224 (process_skeletonless_type_unit, load_partial_comp_unit)
4225 (psymtab_to_symtab_1): Update.
4226 (load_full_comp_unit): Add skip_partial parameter.
4227 (process_imported_unit_die, dwarf2_read_addr_index)
4228 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4229 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4230 (read_signatured_type): Update.
4232 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4234 * value.c (release_value): Remove unused variable.
4235 (record_latest_value): Likewise.
4236 (access_value_history): Likewise.
4237 (preserve_values): Likewise.
4239 2018-05-17 Tom Tromey <tom@tromey.com>
4241 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4244 2018-05-16 Maciej W. Rozycki <macro@mips.com>
4247 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4248 Also handle registers whose width is not a multiple of
4250 (linux_nat_trad_target::store_register): Likewise.
4252 2018-05-16 Tom Tromey <tom@tromey.com>
4254 * gdbcore.h (core_bfd): Redefine.
4255 * corelow.c (core_target::close): Update.
4256 (core_target_open): Update.
4257 * progspace.h (struct program_space) <cbfd>: Now a
4260 2018-05-16 Tom Tromey <tom@tromey.com>
4263 * symfile-add-flags.h (enum symfile_add_flags)
4264 <SYMFILE_NOT_FILENAME>: New constant.
4265 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
4266 objfile name from BFD.
4267 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4268 * minidebug.c (find_separate_debug_file_in_section): Put
4269 ".gnu_debugdata" into BFD's file name.
4271 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
4273 * regcache.c (regcache_read_ftype, regcache_write_ftype):
4276 2018-05-15 Tamar Christina <tamar.christina@arm.com>
4279 * aarch64-tdep.c (aarch64_analyze_prologue,
4280 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4281 Indicate not interested in errors.
4283 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4285 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4286 Supply the MIPS_ZERO_REGNUM register.
4288 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4290 * mips-tdep.c (mask_address_var): Make variable static.
4292 2018-05-14 Tom Tromey <tom@tromey.com>
4294 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4296 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
4298 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4299 FXSAVE_ADDR for the mxcsr register.
4301 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
4303 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4305 2018-05-11 Pedro Alves <palves@redhat.com>
4307 * corelow.c (core_target) <core_target>: No longer inline.
4308 Initialize m_core_gdbarch, m_core_vec and build the section table
4310 <~core_target>: New.
4311 <core_gdbarch, get_core_register_section>: New methods.
4312 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4313 factored out from ...
4314 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4316 (sniff_core_bfd): Add gdbarch parameter.
4317 (core_close): Delete, merged into ...
4318 (core_target::close): ... here. Delete self.
4319 (core_close_cleanup): Delete.
4320 (core_target_open): Allocate a core_target on the heap. Use a
4321 unique_ptr instead of a cleanup. Bits moved into the core_target
4322 ctor. Adjust to use core_target methods instead of globals.
4323 (get_core_register_section): Rename to ...
4324 (core_target::get_core_register_section): ... this and adjust.
4325 (struct get_core_registers_cb_data): New.
4326 (get_core_registers_cb): Use it. Use bool.
4327 (core_target::fetch_registers, core_target::files_info)
4328 (core_target::xfer_partial, core_target::read_description)
4329 (core_target::pid_to, core_target::thread_name): Adjust to
4330 reference class fields instead of globals.
4331 * target.h (struct target_ops_deleter, target_ops_up): New.
4333 2018-05-11 Pedro Alves <palves@redhat.com>
4335 * corefile.c (core_file_command): Move to corelow.c.
4336 * corelow.c (the_core_target): Delete.
4337 (core_file_command): Moved from corefile.c. Check exec_bfd
4338 instead of the_core_target. Use target_detach instead of calling
4339 into the_core_target directly.
4340 (maybe_say_no_core_file_now): New.
4341 (core_target::detach): Use it.
4342 (_initialize_corelow): Remove references to the_core_target.
4343 * gdbcore.h (the_core_target): Delete.
4345 2018-05-11 Tom Tromey <tromey@redhat.com>
4346 Pedro Alves <palves@redhat.com>
4348 * corefile.c (core_bfd): Remove.
4349 * gdbcore.h (core_bfd): Now a macro.
4350 * progspace.h (struct program_space) <cbfd>: New field.
4352 2018-05-11 Tom Tromey <tom@tromey.com>
4354 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4357 2018-05-10 Tom Tromey <tom@tromey.com>
4359 * configure: Rebuild.
4360 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4362 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4365 * regformats/regdat.sh: Adjust script, following the addition
4366 of the new expedite_regs parameter to init_target_desc.
4368 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
4371 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4372 set_gdbarch_significant_addr_bit.
4373 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4374 set_gdbarch_significant_addr_bit.
4375 * utils.c (address_significant): Update to sign extend addr.
4377 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
4379 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4380 (xtensa_linux_init_abi): Limit tdep->num_regs by
4381 tdep->num_nopriv_regs.
4382 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4383 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4386 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
4388 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4390 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4392 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4393 (I387_MXCSR_INIT_VAL): New constant.
4394 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4395 buffer if it was supplied by the inferior.
4396 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4397 (i387_xsave_get_clear_bv): New function.
4398 (i387_supply_xsave): Only read x87 control registers from the
4399 xsave buffer if the feature is enabled, and the state will have
4400 been written, otherwise, provide a suitable default.
4401 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4402 including x87 control registers. Update control registers if they
4403 have changed from the default value, and mark features as enabled
4405 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4407 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4409 * spu-tdep.c (info_spu_event_command): Fix output formatting.
4411 2018-05-07 Tom Tromey <tom@tromey.com>
4413 * configure: Rebuild.
4414 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4416 2018-05-07 Tom Tromey <tom@tromey.com>
4419 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4420 bit. Use correct value for VDIV.
4422 2018-05-04 Tom Tromey <tom@tromey.com>
4424 * configure: Rebuild.
4425 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4427 2018-05-04 Tom Tromey <tom@tromey.com>
4429 * linux-record.c (record_linux_system_call) <case
4430 RECORD_SYS_RECVFROM>: Add "break".
4432 2018-05-04 Tom Tromey <tom@tromey.com>
4434 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4435 Add missing "break".
4436 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4437 Add missing "break".
4439 2018-05-04 Tom Tromey <tom@tromey.com>
4441 * rs6000-tdep.c (ppc_process_record_op4)
4442 (ppc_process_record_op63): Add fall-through comment.
4444 2018-05-04 Tom Tromey <tom@tromey.com>
4446 * i386-tdep.c (i386_process_record): Add fall-through comment.
4448 2018-05-04 Tom Tromey <tom@tromey.com>
4450 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4453 2018-05-04 Tom Tromey <tom@tromey.com>
4455 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4456 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4457 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4459 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4461 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4464 2018-05-04 Tom Tromey <tom@tromey.com>
4466 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4468 2018-05-04 Tom Tromey <tom@tromey.com>
4470 * s390-tdep.c (s390_process_record): Fix fall-through comments.
4471 * xcoffread.c (scan_xcoff_symtab): Move comment later.
4472 * symfile.c (section_is_mapped): Fix fall-through comment.
4473 * stabsread.c (define_symbol, read_member_functions): Fix
4474 fall-through comment.
4475 * s390-linux-tdep.c (s390_process_record): Fix fall-through
4477 * remote.c (remote_wait_as): Fix fall-through comment.
4478 * p-exp.y (yylex): Fix fall-through comment.
4479 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4481 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4482 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4483 * jv-exp.y (yylex): Fix fall-through comment.
4484 * go-exp.y (lex_one_token): Fix fall-through comment.
4485 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4486 fall-through comment.
4487 * f-exp.y (yylex): Fix fall-through comment.
4488 * dwarf2read.c (process_die): Fix fall-through comments.
4489 * dbxread.c (process_one_symbol): Fix fall-through comment.
4490 * d-exp.y (lex_one_token): Fix fall-through comment.
4491 * cp-name-parser.y (yylex): Fix fall-through comment.
4492 * coffread.c (coff_symtab_read): Fix fall-through comment.
4493 * c-exp.y (lex_one_token): Fix fall-through comment.
4494 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4496 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4499 2018-05-04 Tom Tromey <tom@tromey.com>
4502 * NEWS: Mention gdb.execute change.
4503 * gdbcmd.h (execute_control_command): Don't declare.
4504 * python/python.c (execute_gdb_command): Use read_command_lines_1,
4505 execute_control_commands, execute_control_commands_to_string.
4506 * cli/cli-script.h (execute_control_commands)
4507 (execute_control_commands_to_string): Declare.
4508 (execute_control_command): Add from_tty parameter.
4509 * cli/cli-script.c (execute_control_commands)
4510 (execute_control_commands_to_string): New functions.
4511 (execute_user_command): Use execute_control_commands.
4512 (execute_control_command_1): Add "from_tty" parameter. Update.
4513 (execute_control_command): Likewise.
4515 2018-05-04 Tom Tromey <tom@tromey.com>
4518 * NEWS: Mention that breakpoint commands are writable.
4519 * python/py-breakpoint.c (bppy_set_commands): New function.
4520 (breakpoint_object_getset) <"commands">: Use it.
4522 2018-05-04 Tom Tromey <tom@tromey.com>
4524 * tracepoint.c (actions_command): Update.
4525 * mi/mi-cmd-break.c (mi_command_line_array)
4526 (mi_command_line_array_cnt, mi_command_line_array_ptr)
4527 (mi_read_next_line): Remove.
4528 (mi_cmd_break_commands): Update.
4529 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4531 * cli/cli-script.c (get_command_line): Update.
4532 (process_next_line): Use function_view. Constify.
4533 (recurse_read_control_structure, read_command_lines)
4534 (read_command_lines_1): Change argument types to function_view.
4535 (do_define_command, document_command): Update.
4536 * breakpoint.h (check_tracepoint_command): Don't declare.
4537 * breakpoint.c (check_tracepoint_command): Remove.
4538 (commands_command_1, create_tracepoint_from_upload): Update.
4540 2018-05-04 Tom Tromey <tom@tromey.com>
4543 * cli/cli-script.h (enum command_control_type) <define_control>:
4545 * cli/cli-script.c (multi_line_command_p): Handle define_control.
4546 (build_command_line, execute_control_command_1)
4547 (process_next_line): Likewise.
4548 (do_define_command): New function, extracted from define_command.
4549 (define_command): Use it.
4551 2018-05-04 Tom Tromey <tom@tromey.com>
4553 * tracepoint.c (actions_command): Update.
4554 * cli/cli-script.h (read_command_lines): Update.
4555 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4556 (MAX_TMPBUF): Remove define.
4557 (define_command): Use string_printf.
4558 (document_command): Likewise.
4559 * breakpoint.c (commands_command_1): Update.
4561 2018-05-04 Tom Tromey <tom@tromey.com>
4563 * top.c (execute_command): Update.
4564 * cli/cli-script.h (print_command_lines): Now varargs.
4565 * cli/cli-script.c (print_command_lines): Now varargs.
4566 (execute_control_command_1) <case while_control, case if_control>:
4569 2018-05-04 Tom Tromey <tom@tromey.com>
4571 * tracepoint.c (all_tracepoint_actions): Rename from
4572 all_tracepoint_actions_and_cleanup. Change return type.
4573 (actions_command, encode_actions_1, encode_actions)
4574 (trace_dump_actions, tdump_command): Update.
4575 * remote.c (remote_download_command_source): Update.
4576 * python/python.c (gdbpy_eval_from_control_command)
4577 (python_command, python_interactive_command): Update.
4578 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
4579 * guile/guile.c (guile_command)
4580 (gdbscm_eval_from_control_command, guile_command): Update.
4581 * compile/compile.c (compile_code_command)
4582 (compile_print_command, compile_to_object): Update.
4583 * cli/cli-script.h (struct command_lines_deleter): New.
4584 (counted_command_line): New typedef.
4585 (struct command_line): Add constructor, destructor.
4586 <body_list>: Remove.
4587 <body_list_0, body_list_1>: New members.
4588 (command_line_up): Remove typedef.
4589 (read_command_lines, read_command_lines_1, get_command_line):
4591 (copy_command_lines): Don't declare.
4592 * cli/cli-script.c (build_command_line): Use "new".
4593 (get_command_line): Return counted_command_line.
4594 (print_command_lines, execute_user_command)
4595 (execute_control_command_1, while_command, if_command): Update.
4596 (realloc_body_list): Remove.
4597 (process_next_line, recurse_read_control_structure): Update.
4598 (read_command_lines, read_command_lines_1): Return counted_command_line.
4599 (free_command_lines): Use "delete".
4600 (copy_command_lines): Remove.
4601 (define_command, document_command, show_user_1): Update.
4602 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
4603 a counted_command_line.
4604 * breakpoint.h (counted_command_line): Remove typedef.
4605 (breakpoint_set_commands): Update.
4606 * breakpoint.c (check_no_tracepoint_commands)
4607 (validate_commands_for_breakpoint): Update.
4608 (breakpoint_set_commands): Change commands to be a
4609 counted_command_line.
4610 (commands_command_1, update_dprintf_command_list)
4611 (create_tracepoint_from_upload): Update.
4613 2018-05-04 Tom Tromey <tom@tromey.com>
4615 * cli/cli-decode.h (cmd_list_element): New constructor.
4616 (~cmd_list_element): New destructor.
4617 (struct cmd_list_element): Add initializers.
4618 * cli/cli-decode.c (do_add_cmd): Use "new".
4619 (delete_cmd): Use "delete".
4621 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4622 Pedro Alves <palves@redhat.com>
4624 PR breakpoints/19806 and support for PR external/20207.
4625 * NEWS: Mention Aarch64 watchpoint improvements.
4626 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
4627 watchpoints and PR external/20207 watchpoints.
4628 * nat/aarch64-linux-hw-point.c
4629 (kernel_supports_any_contiguous_range): New.
4630 (aarch64_watchpoint_offset): New.
4631 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
4632 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
4633 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
4634 (aarch64_align_watchpoint): New parameters aligned_offset_p and
4635 next_addr_orig_p. Support PR external/20207 watchpoints.
4636 (aarch64_downgrade_regs): New.
4637 (aarch64_dr_state_insert_one_point): New parameters offset and
4639 (aarch64_dr_state_remove_one_point): Likewise.
4640 (aarch64_handle_breakpoint): Update caller.
4641 (aarch64_handle_aligned_watchpoint): Likewise.
4642 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
4644 (aarch64_linux_set_debug_regs): Remove const from state. Call
4645 aarch64_downgrade_regs.
4646 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
4647 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
4648 (DR_CONTROL_MASK): ... this.
4649 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
4650 (unsigned int aarch64_watchpoint_offset): New prototype.
4651 (aarch64_linux_set_debug_regs): Remove const from state.
4652 * utils.c (align_up, align_down): Move to ...
4653 * common/common-utils.c (align_up, align_down): ... here.
4654 * utils.h (align_up, align_down): Move to ...
4655 * common/common-utils.h (align_up, align_down): ... here.
4657 2018-05-04 Joel Brobecker <brobecker@adacore.com>
4659 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
4660 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
4661 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
4662 Re-implement to match the ABI as summarized in GCC's
4663 gcc/config/sparc/sparc.c. All callers updated.
4664 (sparc32_store_arguments): Remove assertion.
4666 2018-05-04 Tom Tromey <tom@tromey.com>
4668 * printcmd.c: Don't include tui.h.
4669 (decode_format): Use skip_spaces.
4671 2018-05-04 Tom Tromey <tom@tromey.com>
4674 * printcmd.c (last_count): New global.
4675 (x_command): Use saved count when repeating.
4677 2018-05-04 Tom Tromey <tom@tromey.com>
4679 * nto-procfs.c (do_closedir_cleanup): Remove.
4680 (procfs_pidlist): Use gdb_dir_up.
4681 * procfs.c (do_closedir_cleanup): Remove.
4682 (proc_update_threads): Use gdb_dir_up.
4683 * common/filestuff.h (struct gdb_dir_deleter): New.
4684 (gdb_dir_up): New typedef.
4686 2018-05-04 Tom Tromey <tom@tromey.com>
4688 * ada-lang.c (print_mention_exception): Use std::string.
4690 2018-05-04 Tom Tromey <tom@tromey.com>
4692 * ada-lang.c (create_excep_cond_exprs): Update.
4693 (ada_exception_catchpoint_cond_string): Use std::string.
4695 2018-05-04 Tom Tromey <tom@tromey.com>
4697 * ada-lang.c (xget_renaming_scope): Return std::string.
4698 (old_renaming_is_invisible): Update.
4700 2018-05-04 Tom Tromey <tom@tromey.com>
4702 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
4703 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
4705 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
4707 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
4709 2018-05-04 Tom Tromey <tom@tromey.com>
4711 * remote.c (remote_query_supported_append): Change type.
4712 (remote_check_symbols): Update.
4714 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
4717 * configure.ac: Prepend libpython.
4718 * python/python-config.py: Likewise.
4719 * configure: Regenerate.
4721 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
4723 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
4725 2018-05-03 Pedro Alves <palves@redhat.com>
4728 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
4729 override. Write 'true' instead of '1'.
4730 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
4733 2018-05-02 Pedro Alves <palves@redhat.com>
4735 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
4736 add_inf_child_target.
4737 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
4738 add_inf_child_target.
4739 * aix-thread.c (aix_thread_target_info): New.
4740 (aix_thread_target) <shortname, longname, doc>: Delete.
4742 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
4743 add_inf_child_target.
4744 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
4745 add_inf_child_target.
4746 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
4747 add_inf_child_target.
4748 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
4749 add_inf_child_target.
4750 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
4751 add_inf_child_target.
4752 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
4753 add_inf_child_target.
4754 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
4755 add_inf_child_target.
4756 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
4757 add_inf_child_target.
4758 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
4759 add_inf_child_target.
4760 * bfd-target.c (target_bfd_target_info): New.
4761 (target_bfd) <shortname, longname, doc>: Delete.
4763 * bsd-kvm.c (bsd_kvm_target_info): New.
4764 (bsd_kvm_target) <shortname, longname, doc>: Delete.
4766 (bsd_kvm_target::open): Rename to ...
4767 (bsd_kvm_target_open): ... this. Adjust.
4768 * bsd-uthread.c (bsd_uthread_target_info): New.
4769 (bsd_uthread_target) <shortname, longname, doc>: Delete.
4771 * corefile.c (core_file_command): Adjust.
4772 * corelow.c (core_target_info): New.
4773 (core_target) <shortname, longname, doc>: Delete.
4775 (core_target::open): Rename to ...
4776 (core_target_open): ... this. Adjust.
4777 * ctf.c (ctf_target_info): New.
4778 (ctf_target) <shortname, longname, doc>: Delete.
4780 (ctf_target::open): Rename to ...
4781 (ctf_target_open): ... this.
4782 (_initialize_ctf): Adjust.
4783 * exec.c (exec_target_info): New.
4784 (exec_target) <shortname, longname, doc>: Delete.
4786 (exec_target::open): Rename to ...
4787 (exec_target_open): ... this.
4788 * gdbcore.h (core_target_open): Declare.
4789 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
4790 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
4791 add_inf_child_target.
4792 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
4793 add_inf_child_target.
4794 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
4795 add_inf_child_target.
4796 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
4797 add_inf_child_target.
4798 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
4799 add_inf_child_target.
4800 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
4801 add_inf_child_target.
4802 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
4803 add_inf_child_target.
4804 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
4805 add_inf_child_target.
4806 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
4807 add_inf_child_target.
4808 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
4809 add_inf_child_target.
4810 * inf-child.c (inf_child_target_info): New.
4811 (inf_child_target::info): New.
4812 (inf_child_open_target): Remove 'target' parameter. Use
4813 get_native_target instead.
4814 (inf_child_target::open): Delete.
4815 (add_inf_child_target): New.
4816 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
4819 (add_inf_child_target): Declare.
4820 (inf_child_open_target): Declare.
4821 * linux-thread-db.c (thread_db_target_info): New.
4822 (thread_db_target) <shortname, longname, doc>: Delete.
4824 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
4825 add_inf_child_target.
4826 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
4827 add_inf_child_target.
4828 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
4829 add_inf_child_target.
4830 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
4831 add_inf_child_target.
4832 * make-target-delegates (print_class): Adjust.
4833 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
4834 add_inf_child_target.
4835 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
4836 add_inf_child_target.
4837 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
4838 add_inf_child_target.
4839 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
4840 add_inf_child_target.
4841 * nto-procfs.c (nto_native_target_info): New.
4842 (nto_procfs_target_native) <shortname, longname, doc>:
4845 (nto_procfs_target_info): New.
4846 (nto_procfs_target_procfs) <shortname, longname, doc>:
4849 (init_procfs_targets): Adjust.
4850 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
4851 add_inf_child_target.
4852 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
4853 add_inf_child_target.
4854 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
4855 add_inf_child_target.
4856 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
4857 add_inf_child_target.
4858 * ravenscar-thread.c (ravenscar_target_info): New.
4859 (ravenscar_thread_target) <shortname, longname, doc>:
4862 * record-btrace.c (record_btrace_target_info):
4863 (record_btrace_target) <shortname, longname, doc>: Delete.
4865 (record_btrace_target::open): Rename to ...
4866 (record_btrace_target_open): ... this. Adjust.
4867 * record-full.c (record_longname, record_doc): New.
4868 (record_full_base_target) <shortname, longname, doc>: Delete.
4870 (record_full_target_info): New.
4871 (record_full_target): <shortname>: Delete.
4873 (record_full_core_open_1, record_full_open_1): Update comments.
4874 (record_full_base_target::open): Rename to ...
4875 (record_full_open): ... this.
4876 (cmd_record_full_restore): Update.
4877 (_initialize_record_full): Update.
4878 * remote-sim.c (remote_sim_target_info): New.
4879 (gdbsim_target) <shortname, longname, doc>: Delete.
4881 (gdbsim_target::open): Rename to ...
4882 (gdbsim_target_open): ... this.
4883 (_initialize_remote_sim): Adjust.
4884 * remote.c (remote_doc): New.
4885 (remote_target_info): New.
4886 (remote_target) <shortname, longname, doc>: Delete.
4888 (extended_remote_target_info): New.
4889 (extended_remote_target) <shortname, longname, doc>: Delete.
4891 (remote_target::open_1): Make static. Adjust.
4892 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
4893 * s390-linux-nat.c (_initialize_s390_nat): Use
4894 add_inf_child_target.
4895 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
4896 add_inf_child_target.
4897 * sol-thread.c (thread_db_target_info): New.
4898 (sol_thread_target) <shortname, longname, doc>: Delete.
4900 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
4901 add_inf_child_target.
4902 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
4903 add_inf_child_target.
4904 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
4905 add_inf_child_target.
4906 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
4907 add_inf_child_target.
4908 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
4909 add_inf_child_target.
4910 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
4911 add_inf_child_target.
4912 * spu-linux-nat.c (_initialize_spu_nat): Use
4913 add_inf_child_target.
4914 * spu-multiarch.c (spu_multiarch_target_info): New.
4915 (spu_multiarch_target) <shortname, longname, doc>: Delete.
4917 * target-delegates.c: Regenerate.
4918 * target.c: Include <unordered_map>.
4919 (target_ops_p): Delete.
4920 (DEF_VEC_P(target_ops_p)): Delete.
4921 (target_factories): New.
4922 (test_target_info): New.
4923 (test_target_ops::info): New.
4924 (open_target): Adjust to use target_factories.
4925 (add_target_with_completer): Rename to ...
4926 (add_target): ... this. Change prototype. Register target_info
4927 and open callback in target_factories. Register target_info in
4928 command context instead of target_ops.
4929 (add_target): Delete old implementation.
4930 (add_deprecated_target_alias): Change prototype. Adjust.
4931 (the_native_target): New.
4932 (set_native_target, get_native_target): New.
4933 (find_default_run_target): Use the_native_target.
4934 (find_attach_target, find_run_target): Simplify.
4935 (target_ops::open): Delete.
4936 (dummy_target_info): New.
4937 (dummy_target::shortname, dummy_target::longname)
4938 (dummy_target::doc): Delete.
4939 (dummy_target::info): New.
4940 (debug_target::shortname, debug_target::longname)
4941 (debug_target::doc): Delete.
4942 (debug_target::info): New.
4943 * target.h (struct target_info): New.
4944 (target_ops::~target_ops): Add comment.
4945 (target_ops::info): New.
4946 (target_ops::shortname, target_ops::longname, target_ops::doc): No
4947 longer virtual. Implement in terms of target_info.
4948 (set_native_target, get_native_target): Declare.
4949 (target_open_ftype): New.
4950 (add_target, add_target_with_completer)
4951 (add_deprecated_target_alias): Change prototype.
4952 (test_target) <shortname, longname, doc>: Delete.
4954 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
4955 add_inf_child_target.
4956 * tracefile-tfile.c (tfile_target_info): New.
4957 (tfile_target) <shortname, longname, doc>: Delete.
4959 (tfile_target::open): Rename to ...
4960 (tfile_target_open): ... this.
4961 (_initialize_tracefile_tfile): Adjust.
4962 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
4963 add_inf_child_target.
4964 * windows-nat.c (_initialize_windows_nat): Use
4965 add_inf_child_target.
4966 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
4967 add_inf_child_target.
4969 2018-05-02 Pedro Alves <palves@redhat.com>
4971 * linux-nat.h (linux_nat_target) <low_new_thread,
4972 low_delete_thread, low_new_fork, low_forget_process,
4973 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
4974 New virtual methods.
4975 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4976 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
4977 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
4978 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4979 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
4981 * linux-fork.c (delete_fork): Adjust to call low method.
4982 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
4983 (linux_nat_new_fork, linux_nat_forget_process_hook)
4984 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
4985 (linux_nat_status_is_event):
4986 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
4987 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
4989 (sigtrap_is_event): Rename to ...
4990 (linux_nat_target::low_status_is_event): ... this.
4991 (linux_nat_set_status_is_event): Delete.
4992 (save_stop_reason, linux_nat_wait_1)
4993 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
4995 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4996 (linux_nat_set_new_fork, linux_nat_set_forget_process)
4997 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4998 (linux_nat_set_prepare_to_resume): Delete.
4999 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5000 low virtual methods.
5001 * amd64-linux-nat.c: Likewise.
5002 * arm-linux-nat.c: Likewise.
5003 * i386-linux-nat.c: Likewise.
5004 * ia64-linux-nat.c: Likewise.
5005 * mips-linux-nat.c: Likewise.
5006 * ppc-linux-nat.c: Likewise.
5007 * s390-linux-nat.c: Likewise.
5008 * sparc64-linux-nat.c: Likewise.
5009 * x86-linux-nat.c: Likewise.
5010 * x86-linux-nat.h: Include "nat/x86-linux.h".
5011 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5012 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5015 2018-05-02 Pedro Alves <palves@redhat.com>
5017 * target.h (target_ops)
5018 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5019 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5020 stopped_by_watchpoint, have_continuable_watchpoint,
5021 stopped_data_address, watchpoint_addr_within_range,
5022 can_accel_watchpoint_condition, can_run, thread_alive,
5023 has_all_memory, has_memory, has_stack, has_registers,
5024 has_execution, can_async_p, is_async_p, supports_non_stop,
5025 always_non_stop_p, can_execute_reverse, supports_multi_process,
5026 supports_enable_disable_tracepoint,
5027 supports_disable_randomization, supports_string_tracing,
5028 supports_evaluation_of_breakpoint_conditions,
5029 can_run_breakpoint_commands, filesystem_is_local,
5030 can_download_tracepoint, get_trace_state_variable_value,
5031 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5032 record_is_replaying, record_will_replay,
5033 augmented_libraries_svr4_read>: Adjust to return bool.
5034 * aarch64-linux-nat.c: All implementations adjusted.
5035 * aix-thread.c: All implementations adjusted.
5036 * arm-linux-nat.c: All implementations adjusted.
5037 * breakpoint.c: All implementations adjusted.
5038 * bsd-kvm.c: All implementations adjusted.
5039 * bsd-uthread.c: All implementations adjusted.
5040 * corelow.c: All implementations adjusted.
5041 * ctf.c: All implementations adjusted.
5042 * darwin-nat.c: All implementations adjusted.
5043 * darwin-nat.h: All implementations adjusted.
5044 * exec.c: All implementations adjusted.
5045 * fbsd-nat.c: All implementations adjusted.
5046 * fbsd-nat.h: All implementations adjusted.
5047 * gnu-nat.c: All implementations adjusted.
5048 * gnu-nat.h: All implementations adjusted.
5049 * go32-nat.c: All implementations adjusted.
5050 * ia64-linux-nat.c: All implementations adjusted.
5051 * inf-child.c: All implementations adjusted.
5052 * inf-child.h: All implementations adjusted.
5053 * inf-ptrace.c: All implementations adjusted.
5054 * inf-ptrace.h: All implementations adjusted.
5055 * linux-nat.c: All implementations adjusted.
5056 * linux-nat.h: All implementations adjusted.
5057 * mips-linux-nat.c: All implementations adjusted.
5058 * nto-procfs.c: All implementations adjusted.
5059 * ppc-linux-nat.c: All implementations adjusted.
5060 * procfs.c: All implementations adjusted.
5061 * ravenscar-thread.c: All implementations adjusted.
5062 * record-btrace.c: All implementations adjusted.
5063 * record-full.c: All implementations adjusted.
5064 * remote-sim.c: All implementations adjusted.
5065 * remote.c: All implementations adjusted.
5066 * s390-linux-nat.c: All implementations adjusted.
5067 * sol-thread.c: All implementations adjusted.
5068 * spu-multiarch.c: All implementations adjusted.
5069 * target-delegates.c: All implementations adjusted.
5070 * target.c: All implementations adjusted.
5071 * target.h: All implementations adjusted.
5072 * tracefile-tfile.c: All implementations adjusted.
5073 * tracefile.c: All implementations adjusted.
5074 * tracefile.h: All implementations adjusted.
5075 * windows-nat.c: All implementations adjusted.
5076 * x86-linux-nat.h: All implementations adjusted.
5077 * x86-nat.h: All implementations adjusted.
5079 2018-05-02 Pedro Alves <palves@redhat.com>
5081 * make-target-delegates (scan_target_h): Don't trim lines here.
5082 Replace sequences of tabs and/or whitespace with a single
5084 (top level, parsing methods): Trim each line before processing it
5087 2018-05-02 Pedro Alves <palves@redhat.com>
5088 John Baldwin <jhb@freebsd.org>
5090 * target.h (enum strata) <debug_stratum>: New.
5091 (struct target_ops) <all delegation methods>: Replace by C++
5092 virtual methods, and drop "to_" prefix. All references updated
5094 <to_shortname, to_longname, to_doc, to_data,
5095 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5096 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5097 virtual methods. All references updated throughout.
5098 <can_attach, supports_terminal_ours, can_create_inferior,
5099 get_thread_control_capabilities, attach_no_wait>: New
5101 <insert_breakpoint, remove_breakpoint>: Now
5102 TARGET_DEFAULT_NORETURN methods.
5103 <info_proc>: Now returns bool.
5105 (OPS_MAGIC): Delete.
5106 (current_target): Delete. All references replaced by references
5108 (target_stack): ... this. New.
5109 (target_shortname, target_longname): Adjust.
5110 (target_can_run): Now a function declaration.
5111 (default_child_has_all_memory, default_child_has_memory)
5112 (default_child_has_stack, default_child_has_registers)
5113 (default_child_has_execution): Remove target_ops parameter.
5114 (complete_target_initialization): Delete.
5115 (memory_breakpoint_target): New template class.
5116 (test_target_ops): Refactor as a C++ class with virtual methods.
5117 * make-target-delegates (NAME_PART): Tighten.
5118 (POINTER_PART, CP_SYMBOL): New.
5119 (SIMPLE_RETURN_PART): Reimplement.
5120 (VEC_RETURN_PART): Expect less.
5121 (RETURN_PART, VIRTUAL_PART): New.
5122 (METHOD): Adjust to C++ virtual methods.
5123 (scan_target_h): Remove reference to C99.
5124 (dname): Output "target_ops::" prefix.
5125 (write_function_header): Adjust to output a C++ class method.
5126 (write_declaration): New.
5127 (write_delegator): Adjust to output a C++ class method.
5128 (tdname): Output "dummy_target::" prefix.
5129 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5131 (tdefault_names, debug_names): Delete.
5132 (return_types, tdefaults, styles, argtypes_array): New.
5133 (top level): All methods are delegators.
5135 (top level): Print dummy_target and debug_target classes.
5136 * target-delegates.c: Regenerate.
5137 * target-debug.h (target_debug_print_enum_info_proc_what)
5138 (target_debug_print_thread_control_capabilities)
5139 (target_debug_print_thread_info_p): New.
5140 * target.c (dummy_target): Delete.
5141 (the_dummy_target, the_debug_target): New.
5142 (target_stack): Now extern.
5143 (set_targetdebug): Push/unpush debug target.
5144 (default_child_has_all_memory, default_child_has_memory)
5145 (default_child_has_stack, default_child_has_registers)
5146 (default_child_has_execution): Remove target_ops parameter.
5147 (complete_target_initialization): Delete.
5148 (add_target_with_completer): No longer call
5149 complete_target_initialization.
5150 (target_supports_terminal_ours): Use regular delegation.
5151 (update_current_target): Delete.
5152 (push_target): No longer check magic number. Don't call
5153 update_current_target.
5154 (unpush_target): Don't call update_current_target.
5155 (target_is_pushed): No longer check magic number.
5156 (target_require_runnable): Skip for all stratums over
5158 (target_ops::info_proc): New.
5159 (target_info_proc): Use find_target_at and
5160 find_default_run_target.
5161 (target_supports_disable_randomization): Use regular delegation.
5162 (target_get_osdata): Use find_target_at.
5163 (target_ops::open, target_ops::close, target_ops::can_attach)
5164 (target_ops::attach, target_ops::can_create_inferior)
5165 (target_ops::create_inferior, target_ops::can_run)
5166 (target_can_run): New.
5167 (default_fileio_target): Use regular delegation.
5168 (target_ops::fileio_open, target_ops::fileio_pwrite)
5169 (target_ops::fileio_pread, target_ops::fileio_fstat)
5170 (target_ops::fileio_close, target_ops::fileio_unlink)
5171 (target_ops::fileio_readlink): New.
5172 (target_fileio_open_1, target_fileio_unlink)
5173 (target_fileio_readlink): Always call the target method. Handle
5175 (return_zero, return_zero_has_execution): Delete.
5176 (init_dummy_target): Delete.
5177 (dummy_target::dummy_target, dummy_target::shortname)
5178 (dummy_target::longname, dummy_target::doc)
5179 (debug_target::debug_target, debug_target::shortname)
5180 (debug_target::longname, debug_target::doc): New.
5181 (target_supports_delete_record): Use regular delegation.
5182 (setup_target_debug): Delete.
5183 (maintenance_print_target_stack): Skip debug_stratum.
5184 (initialize_targets): Instantiate the_dummy_target and
5186 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
5188 (target_auxv_search, fprint_target_auxv): Adjust.
5189 (info_auxv_command): Adjust to use target_stack.
5190 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5191 * exceptions.c (print_flush): Handle a NULL target_stack.
5192 * regcache.c (target_ops_no_register): Refactor as class with
5195 * exec.c (exec_target): New class.
5196 (exec_ops): Now an exec_target.
5197 (exec_open, exec_close_1, exec_get_section_table)
5198 (exec_xfer_partial, exec_files_info, exec_has_memory)
5199 (exec_make_note_section): Refactor as exec_target methods.
5200 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5202 (exec_target::find_memory_regions): New.
5203 (_initialize_exec): Don't call init_exec_ops.
5204 * gdbcore.h (exec_file_clear): Delete.
5206 * corefile.c (core_target): Delete.
5207 (core_file_command): Adjust.
5208 * corelow.c (core_target): New class.
5209 (the_core_target): New.
5210 (core_close): Remove target_ops parameter.
5211 (core_close_cleanup): Adjust.
5212 (core_target::close): New.
5213 (core_open, core_detach, get_core_registers, core_files_info)
5214 (core_xfer_partial, core_thread_alive, core_read_description)
5215 (core_pid_to_str, core_thread_name, core_has_memory)
5216 (core_has_stack, core_has_registers, core_info_proc): Rework as
5217 core_target methods.
5218 (ignore, core_remove_breakpoint, init_core_ops): Delete.
5219 (_initialize_corelow): Initialize the_core_target.
5220 * gdbcore.h (core_target): Delete.
5221 (the_core_target): New.
5223 * ctf.c: (ctf_target): New class.
5224 (ctf_ops): Now a ctf_target.
5225 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5226 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5227 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5229 (init_ctf_ops): Delete.
5230 (_initialize_ctf): Don't call it.
5231 * tracefile-tfile.c (tfile_target): New class.
5232 (tfile_ops): Now a tfile_target.
5233 (tfile_open, tfile_close, tfile_files_info)
5234 (tfile_get_tracepoint_status, tfile_trace_find)
5235 (tfile_fetch_registers, tfile_xfer_partial)
5236 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5237 Refactor as tfile_target methods.
5238 (tfile_xfer_partial_features): Remove target_ops parameter.
5239 (init_tfile_ops): Delete.
5240 (_initialize_tracefile_tfile): Don't call it.
5241 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5242 (tracefile_has_stack, tracefile_has_registers)
5243 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5244 tracefile_target methods.
5245 (init_tracefile_ops): Delete.
5246 (tracefile_target::tracefile_target): New.
5247 * tracefile.h: Include "target.h".
5248 (tracefile_target): New class.
5249 (init_tracefile_ops): Delete.
5251 * spu-multiarch.c (spu_multiarch_target): New class.
5252 (spu_ops): Now a spu_multiarch_target.
5253 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5254 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5255 (spu_search_memory, spu_mourn_inferior): Refactor as
5256 spu_multiarch_target methods.
5257 (init_spu_ops): Delete.
5258 (_initialize_spu_multiarch): Remove references to init_spu_ops,
5259 complete_target_initialization.
5261 * ravenscar-thread.c (ravenscar_thread_target): New class.
5262 (ravenscar_ops): Now a ravenscar_thread_target.
5263 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5264 (ravenscar_thread_alive, ravenscar_pid_to_str)
5265 (ravenscar_fetch_registers, ravenscar_store_registers)
5266 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5267 (ravenscar_stopped_by_hw_breakpoint)
5268 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5269 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5270 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5272 (init_ravenscar_thread_ops): Delete.
5273 (_initialize_ravenscar): Remove references to
5274 init_ravenscar_thread_ops and complete_target_initialization.
5276 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5277 (bsd_uthread_target): New class.
5278 (bsd_uthread_ops): Now a bsd_uthread_target.
5279 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5280 (bsd_uthread_close, bsd_uthread_mourn_inferior)
5281 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5282 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5283 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5284 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5285 (bsd_uthread_target): Delete function.
5286 (_initialize_bsd_uthread): Remove reference to
5287 complete_target_initialization.
5289 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
5290 (target_bfd): ... this new class.
5291 (target_bfd_xfer_partial, target_bfd_get_section_table)
5292 (target_bfd_close): Refactor as target_bfd methods.
5293 (target_bfd::~target_bfd): New.
5294 (target_bfd_reopen): Adjust.
5295 (target_bfd::close): New.
5297 * record-btrace.c (record_btrace_target): New class.
5298 (record_btrace_ops): Now a record_btrace_target.
5299 (record_btrace_open, record_btrace_stop_recording)
5300 (record_btrace_disconnect, record_btrace_close)
5301 (record_btrace_async, record_btrace_info)
5302 (record_btrace_insn_history, record_btrace_insn_history_range)
5303 (record_btrace_insn_history_from, record_btrace_call_history)
5304 (record_btrace_call_history_range)
5305 (record_btrace_call_history_from, record_btrace_record_method)
5306 (record_btrace_is_replaying, record_btrace_will_replay)
5307 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5308 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5309 (record_btrace_store_registers, record_btrace_prepare_to_store)
5310 (record_btrace_to_get_unwinder)
5311 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5312 (record_btrace_commit_resume, record_btrace_wait)
5313 (record_btrace_stop, record_btrace_can_execute_reverse)
5314 (record_btrace_stopped_by_sw_breakpoint)
5315 (record_btrace_supports_stopped_by_sw_breakpoint)
5316 (record_btrace_stopped_by_hw_breakpoint)
5317 (record_btrace_supports_stopped_by_hw_breakpoint)
5318 (record_btrace_update_thread_list, record_btrace_thread_alive)
5319 (record_btrace_goto_begin, record_btrace_goto_end)
5320 (record_btrace_goto, record_btrace_stop_replaying_all)
5321 (record_btrace_execution_direction)
5322 (record_btrace_prepare_to_generate_core)
5323 (record_btrace_done_generating_core): Refactor as
5324 record_btrace_target methods.
5325 (init_record_btrace_ops): Delete.
5326 (_initialize_record_btrace): Remove reference to
5327 init_record_btrace_ops.
5328 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5329 the execution_direction global.
5330 (record_full_base_target, record_full_target)
5331 (record_full_core_target): New classes.
5332 (record_full_ops): Now a record_full_target.
5333 (record_full_core_ops): Now a record_full_core_target.
5334 (record_full_target::detach, record_full_target::disconnect)
5335 (record_full_core_target::disconnect)
5336 (record_full_target::mourn_inferior, record_full_target::kill):
5338 (record_full_open, record_full_close, record_full_async): Refactor
5339 as methods of the record_full_base_target class.
5340 (record_full_resume, record_full_commit_resume): Refactor
5341 as methods of the record_full_target class.
5342 (record_full_wait, record_full_stopped_by_watchpoint)
5343 (record_full_stopped_data_address)
5344 (record_full_stopped_by_sw_breakpoint)
5345 (record_full_supports_stopped_by_sw_breakpoint)
5346 (record_full_stopped_by_hw_breakpoint)
5347 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5348 methods of the record_full_base_target class.
5349 (record_full_store_registers, record_full_xfer_partial)
5350 (record_full_insert_breakpoint, record_full_remove_breakpoint):
5351 Refactor as methods of the record_full_target class.
5352 (record_full_can_execute_reverse, record_full_get_bookmark)
5353 (record_full_goto_bookmark, record_full_execution_direction)
5354 (record_full_record_method, record_full_info, record_full_delete)
5355 (record_full_is_replaying, record_full_will_replay)
5356 (record_full_goto_begin, record_full_goto_end, record_full_goto)
5357 (record_full_stop_replaying): Refactor as methods of the
5358 record_full_base_target class.
5359 (record_full_core_resume, record_full_core_kill)
5360 (record_full_core_fetch_registers)
5361 (record_full_core_prepare_to_store)
5362 (record_full_core_store_registers, record_full_core_xfer_partial)
5363 (record_full_core_insert_breakpoint)
5364 (record_full_core_remove_breakpoint)
5365 (record_full_core_has_execution): Refactor
5366 as methods of the record_full_core_target class.
5367 (record_full_base_target::supports_delete_record): New.
5368 (init_record_full_ops): Delete.
5369 (init_record_full_core_ops): Delete.
5370 (record_full_save): Refactor as method of the
5371 record_full_base_target class.
5372 (_initialize_record_full): Remove references to
5373 init_record_full_ops and init_record_full_core_ops.
5375 * remote.c (remote_target, extended_remote_target): New classes.
5376 (remote_ops): Now a remote_target.
5377 (extended_remote_ops): Now an extended_remote_target.
5378 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5379 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5380 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5381 (remote_pass_signals, remote_set_syscall_catchpoint)
5382 (remote_program_signals, )
5383 (remote_thread_always_alive): Remove target_ops parameter.
5384 (remote_thread_alive, remote_thread_name)
5385 (remote_update_thread_list, remote_threads_extra_info)
5386 (remote_static_tracepoint_marker_at)
5387 (remote_static_tracepoint_markers_by_strid)
5388 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5389 (remote_open): Refactor as methods of remote_target.
5390 (extended_remote_open, extended_remote_detach)
5391 (extended_remote_attach, extended_remote_post_attach):
5392 (extended_remote_supports_disable_randomization)
5393 (extended_remote_create_inferior): : Refactor as method of
5394 extended_remote_target.
5395 (remote_set_permissions, remote_open_1, remote_detach)
5396 (remote_follow_fork, remote_follow_exec, remote_disconnect)
5397 (remote_resume, remote_commit_resume, remote_stop)
5398 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5399 (remote_terminal_ours, remote_wait, remote_fetch_registers)
5400 (remote_prepare_to_store, remote_store_registers)
5401 (remote_flash_erase, remote_flash_done, remote_files_info)
5402 (remote_kill, remote_mourn, remote_insert_breakpoint)
5403 (remote_remove_breakpoint, remote_insert_watchpoint)
5404 (remote_watchpoint_addr_within_range)
5405 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5406 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5407 (remote_supports_stopped_by_sw_breakpoint)
5408 (remote_stopped_by_hw_breakpoint)
5409 (remote_supports_stopped_by_hw_breakpoint)
5410 (remote_stopped_by_watchpoint, remote_stopped_data_address)
5411 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5412 (remote_verify_memory): Refactor as methods of remote_target.
5413 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5415 (remote_xfer_partial, remote_get_memory_xfer_limit)
5416 (remote_search_memory, remote_rcmd, remote_memory_map)
5417 (remote_pid_to_str, remote_get_thread_local_address)
5418 (remote_get_tib_address, remote_read_description): Refactor as
5419 methods of remote_target.
5420 (remote_target::fileio_open, remote_target::fileio_pwrite)
5421 (remote_target::fileio_pread, remote_target::fileio_close): New.
5422 (remote_hostio_readlink, remote_hostio_fstat)
5423 (remote_filesystem_is_local, remote_can_execute_reverse)
5424 (remote_supports_non_stop, remote_supports_disable_randomization)
5425 (remote_supports_multi_process, remote_supports_cond_breakpoints)
5426 (remote_supports_enable_disable_tracepoint)
5427 (remote_supports_string_tracing)
5428 (remote_can_run_breakpoint_commands, remote_trace_init)
5429 (remote_download_tracepoint, remote_can_download_tracepoint)
5430 (remote_download_trace_state_variable, remote_enable_tracepoint)
5431 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5432 (remote_trace_start, remote_get_trace_status)
5433 (remote_get_tracepoint_status, remote_trace_stop)
5434 (remote_trace_find, remote_get_trace_state_variable_value)
5435 (remote_save_trace_data, remote_get_raw_trace_data)
5436 (remote_set_disconnected_tracing, remote_core_of_thread)
5437 (remote_set_circular_trace_buffer, remote_traceframe_info)
5438 (remote_get_min_fast_tracepoint_insn_len)
5439 (remote_set_trace_buffer_size, remote_set_trace_notes)
5440 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5441 (remote_disable_btrace, remote_teardown_btrace)
5442 (remote_read_btrace, remote_btrace_conf)
5443 (remote_augmented_libraries_svr4_read, remote_load)
5444 (remote_pid_to_exec_file, remote_can_do_single_step)
5445 (remote_execution_direction, remote_thread_handle_to_thread_info):
5446 Refactor as methods of remote_target.
5447 (init_remote_ops, init_extended_remote_ops): Delete.
5448 (remote_can_async_p, remote_is_async_p, remote_async)
5449 (remote_thread_events, remote_upload_tracepoints)
5450 (remote_upload_trace_state_variables): Refactor as methods of
5452 (_initialize_remote): Remove references to init_remote_ops and
5453 init_extended_remote_ops.
5455 * remote-sim.c (gdbsim_target): New class.
5456 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5457 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5458 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5459 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5460 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5461 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5462 Refactor as methods of gdbsim_target.
5463 (gdbsim_ops): Now a gdbsim_target.
5464 (init_gdbsim_ops): Delete.
5465 (gdbsim_cntrl_c): Adjust.
5466 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5468 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5469 (the_amd64_linux_nat_target): New.
5470 (amd64_linux_fetch_inferior_registers)
5471 (amd64_linux_store_inferior_registers): Refactor as methods of
5472 amd64_linux_nat_target.
5473 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
5474 * i386-linux-nat.c: Don't include "linux-nat.h".
5475 (i386_linux_nat_target): New class.
5476 (the_i386_linux_nat_target): New.
5477 (i386_linux_fetch_inferior_registers)
5478 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5479 as methods of i386_linux_nat_target.
5480 (_initialize_i386_linux_nat): Adjust. Set linux_target.
5481 * inf-child.c (inf_child_ops): Delete.
5482 (inf_child_fetch_inferior_registers)
5483 (inf_child_store_inferior_registers): Delete.
5484 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5485 methods of inf_child_target.
5486 (inf_child_target::supports_terminal_ours)
5487 (inf_child_target::terminal_init)
5488 (inf_child_target::terminal_inferior)
5489 (inf_child_target::terminal_ours_for_output)
5490 (inf_child_target::terminal_ours, inf_child_target::interrupt)
5491 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5493 (inf_child_open, inf_child_disconnect, inf_child_close)
5494 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5495 (inf_child_post_startup_inferior, inf_child_can_run)
5496 (inf_child_pid_to_exec_file): Refactor as methods of
5498 (inf_child_follow_fork): Delete.
5499 (inf_child_target::can_create_inferior)
5500 (inf_child_target::can_attach): New.
5501 (inf_child_target::has_all_memory, inf_child_target::has_memory)
5502 (inf_child_target::has_stack, inf_child_target::has_registers)
5503 (inf_child_target::has_execution): New.
5504 (inf_child_fileio_open, inf_child_fileio_pwrite)
5505 (inf_child_fileio_pread, inf_child_fileio_fstat)
5506 (inf_child_fileio_close, inf_child_fileio_unlink)
5507 (inf_child_fileio_readlink, inf_child_use_agent)
5508 (inf_child_can_use_agent): Refactor as methods of
5510 (return_zero, inf_child_target): Delete.
5511 (inf_child_target::inf_child_target): New.
5512 * inf-child.h: Include "target.h".
5513 (inf_child_target): Delete function prototype.
5514 (inf_child_target): New class.
5515 (inf_child_open_target, inf_child_mourn_inferior)
5516 (inf_child_maybe_unpush_target): Delete.
5517 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5518 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5519 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5520 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5521 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5522 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5523 (inf_ptrace_wait, inf_ptrace_xfer_partial)
5524 (inf_ptrace_thread_alive, inf_ptrace_files_info)
5525 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5526 methods of inf_ptrace_target.
5527 (inf_ptrace_target): Delete function.
5528 * inf-ptrace.h: Include "inf-child.h".
5529 (inf_ptrace_target): Delete function declaration.
5530 (inf_ptrace_target): New class.
5531 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5532 * linux-nat.c (linux_target): New.
5533 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5534 (linux_nat_target::~linux_nat_target): New.
5535 (linux_child_post_attach, linux_child_post_startup_inferior)
5536 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5537 (linux_child_remove_fork_catchpoint)
5538 (linux_child_insert_vfork_catchpoint)
5539 (linux_child_remove_vfork_catchpoint)
5540 (linux_child_insert_exec_catchpoint)
5541 (linux_child_remove_exec_catchpoint)
5542 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5543 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5544 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5545 (linux_nat_stopped_data_address)
5546 (linux_nat_stopped_by_sw_breakpoint)
5547 (linux_nat_supports_stopped_by_sw_breakpoint)
5548 (linux_nat_stopped_by_hw_breakpoint)
5549 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5550 (linux_nat_kill, linux_nat_mourn_inferior)
5551 (linux_nat_xfer_partial, linux_nat_thread_alive)
5552 (linux_nat_update_thread_list, linux_nat_pid_to_str)
5553 (linux_nat_thread_name, linux_child_pid_to_exec_file)
5554 (linux_child_static_tracepoint_markers_by_strid)
5555 (linux_nat_is_async_p, linux_nat_can_async_p)
5556 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5557 (linux_nat_supports_multi_process)
5558 (linux_nat_supports_disable_randomization, linux_nat_async)
5559 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
5560 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
5561 (linux_nat_fileio_open, linux_nat_fileio_readlink)
5562 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
5563 methods of linux_nat_target.
5564 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
5565 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
5567 (check_stopped_by_watchpoint): Adjust.
5568 (linux_xfer_partial): Delete.
5569 (linux_target_install_ops, linux_target, linux_nat_add_target):
5571 (linux_nat_target::linux_nat_target): New.
5572 * linux-nat.h: Include "inf-ptrace.h".
5573 (linux_nat_target): New.
5574 (linux_target, linux_target_install_ops, linux_nat_add_target):
5575 Delete function declarations.
5576 (linux_target): Declare global.
5577 * linux-thread-db.c (thread_db_target): New.
5578 (thread_db_target::thread_db_target): New.
5579 (thread_db_ops): Delete.
5580 (the_thread_db_target): New.
5581 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
5582 (thread_db_update_thread_list, thread_db_pid_to_str)
5583 (thread_db_extra_thread_info)
5584 (thread_db_thread_handle_to_thread_info)
5585 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
5586 (thread_db_resume): Refactor as methods of thread_db_target.
5587 (init_thread_db_ops): Delete.
5588 (_initialize_thread_db): Remove reference to init_thread_db_ops.
5589 * x86-linux-nat.c: Don't include "linux-nat.h".
5590 (super_post_startup_inferior): Delete.
5591 (x86_linux_nat_target::~x86_linux_nat_target): New.
5592 (x86_linux_child_post_startup_inferior)
5593 (x86_linux_read_description, x86_linux_enable_btrace)
5594 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
5595 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
5596 methods of x86_linux_nat_target.
5597 (x86_linux_create_target): Delete. Bits folded ...
5598 (x86_linux_add_target): ... here. Now takes a linux_nat_target
5600 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
5601 (x86_linux_nat_target): New class.
5602 (x86_linux_create_target): Delete.
5603 (x86_linux_add_target): Now takes a linux_nat_target pointer.
5604 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
5605 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
5606 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
5607 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
5608 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
5610 (x86_use_watchpoints): Delete.
5611 * x86-nat.h: Include "breakpoint.h" and "target.h".
5612 (x86_use_watchpoints): Delete.
5613 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
5614 (x86_stopped_by_watchpoint, x86_stopped_data_address)
5615 (x86_insert_watchpoint, x86_remove_watchpoint)
5616 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
5617 (x86_stopped_by_hw_breakpoint): New declarations.
5618 (x86_nat_target): New template class.
5620 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
5621 (the_ppc_linux_nat_target): New.
5622 (ppc_linux_fetch_inferior_registers)
5623 (ppc_linux_can_use_hw_breakpoint)
5624 (ppc_linux_region_ok_for_hw_watchpoint)
5625 (ppc_linux_ranged_break_num_registers)
5626 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
5627 (ppc_linux_insert_mask_watchpoint)
5628 (ppc_linux_remove_mask_watchpoint)
5629 (ppc_linux_can_accel_watchpoint_condition)
5630 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
5631 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
5632 (ppc_linux_watchpoint_addr_within_range)
5633 (ppc_linux_masked_watch_num_registers)
5634 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
5635 (ppc_linux_read_description): Refactor as methods of
5636 ppc_linux_nat_target.
5637 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
5639 * procfs.c (procfs_xfer_partial): Delete forward declaration.
5640 (procfs_target): New class.
5641 (the_procfs_target): New.
5642 (procfs_target): Delete function.
5643 (procfs_auxv_parse, procfs_attach, procfs_detach)
5644 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
5645 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
5646 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
5647 (procfs_create_inferior, procfs_update_thread_list)
5648 (procfs_thread_alive, procfs_pid_to_str)
5649 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
5650 (procfs_stopped_data_address, procfs_insert_watchpoint)
5651 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
5652 (proc_find_memory_regions, procfs_info_proc)
5653 (procfs_make_note_section): Refactor as methods of procfs_target.
5654 (_initialize_procfs): Adjust.
5655 * sol-thread.c (sol_thread_target): New class.
5656 (sol_thread_ops): Now a sol_thread_target.
5657 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
5658 (sol_thread_fetch_registers, sol_thread_store_registers)
5659 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
5660 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
5661 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
5662 (init_sol_thread_ops): Delete.
5663 (_initialize_sol_thread): Adjust. Remove references to
5664 init_sol_thread_ops and complete_target_initialization.
5666 * windows-nat.c (windows_nat_target): New class.
5667 (windows_fetch_inferior_registers)
5668 (windows_store_inferior_registers, windows_resume, windows_wait)
5669 (windows_attach, windows_detach, windows_pid_to_exec_file)
5670 (windows_files_info, windows_create_inferior)
5671 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
5672 (windows_close, windows_pid_to_str, windows_xfer_partial)
5673 (windows_get_tib_address, windows_get_ada_task_ptid)
5674 (windows_thread_name, windows_thread_alive): Refactor as
5675 windows_nat_target methods.
5676 (do_initial_windows_stuff): Adjust.
5677 (windows_target): Delete function.
5678 (_initialize_windows_nat): Adjust.
5680 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
5681 (darwin_mourn_inferior, darwin_kill_inferior)
5682 (darwin_create_inferior, darwin_attach, darwin_detach)
5683 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
5684 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
5685 (darwin_supports_multi_process): Refactor as darwin_nat_target
5687 (darwin_resume_to, darwin_files_info): Delete.
5688 (_initialize_darwin_inferior): Rename to ...
5689 (_initialize_darwin_nat): ... this. Adjust to C++ification.
5690 * darwin-nat.h: Include "inf-child.h".
5691 (darwin_nat_target): New class.
5692 (darwin_complete_target): Delete.
5693 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
5694 (darwin_target): New.
5695 (i386_darwin_fetch_inferior_registers)
5696 (i386_darwin_store_inferior_registers): Refactor as methods of
5698 (darwin_complete_target): Delete, with ...
5699 (_initialize_i386_darwin_nat): ... bits factored out here.
5701 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
5702 (the_alpha_linux_nat_target): New.
5703 (alpha_linux_register_u_offset): Refactor as
5704 alpha_linux_nat_target method.
5705 (_initialize_alpha_linux_nat): Adjust.
5706 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
5707 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5708 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
5709 methods of linux_nat_trad_target.
5710 (linux_trad_target): Delete.
5711 * linux-nat-trad.h (linux_trad_target): Delete function.
5712 (linux_nat_trad_target): New class.
5713 * mips-linux-nat.c (mips_linux_nat_target): New class.
5714 (super_fetch_registers, super_store_registers, super_close):
5716 (the_mips_linux_nat_target): New.
5717 (mips64_linux_regsets_fetch_registers)
5718 (mips64_linux_regsets_store_registers)
5719 (mips64_linux_fetch_registers, mips64_linux_store_registers)
5720 (mips_linux_register_u_offset, mips_linux_read_description)
5721 (mips_linux_can_use_hw_breakpoint)
5722 (mips_linux_stopped_by_watchpoint)
5723 (mips_linux_stopped_data_address)
5724 (mips_linux_region_ok_for_hw_watchpoint)
5725 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5726 (mips_linux_close): Refactor as methods of mips_linux_nat.
5727 (_initialize_mips_linux_nat): Adjust to C++ification.
5729 * aix-thread.c (aix_thread_target): New class.
5730 (aix_thread_ops): Now an aix_thread_target.
5731 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
5732 (aix_thread_fetch_registers, aix_thread_store_registers)
5733 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
5734 (aix_thread_thread_alive, aix_thread_pid_to_str)
5735 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
5736 Refactor as methods of aix_thread_target.
5737 (init_aix_thread_ops): Delete.
5738 (_initialize_aix_thread): Remove references to init_aix_thread_ops
5739 and complete_target_initialization.
5740 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
5741 (rs6000_nat_target): New class.
5742 (the_rs6000_nat_target): New.
5743 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
5744 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
5745 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
5746 (super_create_inferior): Delete.
5747 (_initialize_rs6000_nat): Adjust to C++ification.
5749 * arm-linux-nat.c (arm_linux_nat_target): New class.
5750 (the_arm_linux_nat_target): New.
5751 (arm_linux_fetch_inferior_registers)
5752 (arm_linux_store_inferior_registers, arm_linux_read_description)
5753 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
5754 (arm_linux_remove_hw_breakpoint)
5755 (arm_linux_region_ok_for_hw_watchpoint)
5756 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
5757 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
5758 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
5759 arm_linux_nat_target.
5760 (_initialize_arm_linux_nat): Adjust to C++ification.
5762 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
5763 (the_aarch64_linux_nat_target): New.
5764 (aarch64_linux_fetch_inferior_registers)
5765 (aarch64_linux_store_inferior_registers)
5766 (aarch64_linux_child_post_startup_inferior)
5767 (aarch64_linux_read_description)
5768 (aarch64_linux_can_use_hw_breakpoint)
5769 (aarch64_linux_insert_hw_breakpoint)
5770 (aarch64_linux_remove_hw_breakpoint)
5771 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
5772 (aarch64_linux_region_ok_for_hw_watchpoint)
5773 (aarch64_linux_stopped_data_address)
5774 (aarch64_linux_stopped_by_watchpoint)
5775 (aarch64_linux_watchpoint_addr_within_range)
5776 (aarch64_linux_can_do_single_step): Refactor as methods of
5777 aarch64_linux_nat_target.
5778 (super_post_startup_inferior): Delete.
5779 (_initialize_aarch64_linux_nat): Adjust to C++ification.
5781 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
5782 (the_hppa_linux_nat_target): New.
5783 (hppa_linux_fetch_inferior_registers)
5784 (hppa_linux_store_inferior_registers): Refactor as methods of
5785 hppa_linux_nat_target.
5786 (_initialize_hppa_linux_nat): Adjust to C++ification.
5788 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
5789 (the_ia64_linux_nat_target): New.
5790 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
5791 (ia64_linux_stopped_data_address)
5792 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
5793 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
5794 ia64_linux_nat_target methods.
5795 (super_xfer_partial): Delete.
5796 (_initialize_ia64_linux_nat): Adjust to C++ification.
5798 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
5799 (the_m32r_linux_nat_target): New.
5800 (m32r_linux_fetch_inferior_registers)
5801 (m32r_linux_store_inferior_registers): Refactor as
5802 m32r_linux_nat_target methods.
5803 (_initialize_m32r_linux_nat): Adjust to C++ification.
5805 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
5806 (the_m68k_linux_nat_target): New.
5807 (m68k_linux_fetch_inferior_registers)
5808 (m68k_linux_store_inferior_registers): Refactor as
5809 m68k_linux_nat_target methods.
5810 (_initialize_m68k_linux_nat): Adjust to C++ification.
5812 * s390-linux-nat.c (s390_linux_nat_target): New class.
5813 (the_s390_linux_nat_target): New.
5814 (s390_linux_fetch_inferior_registers)
5815 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
5816 (s390_insert_watchpoint, s390_remove_watchpoint)
5817 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
5818 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
5819 (s390_auxv_parse, s390_read_description): Refactor as methods of
5820 s390_linux_nat_target.
5821 (_initialize_s390_nat): Adjust to C++ification.
5823 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
5824 (the_sparc_linux_nat_target): New.
5825 (_initialize_sparc_linux_nat): Adjust to C++ification.
5826 * sparc-nat.c (sparc_fetch_inferior_registers)
5827 (sparc_store_inferior_registers): Remove target_ops parameter.
5828 * sparc-nat.h (sparc_fetch_inferior_registers)
5829 (sparc_store_inferior_registers): Remove target_ops parameter.
5830 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
5831 (the_sparc64_linux_nat_target): New.
5832 (_initialize_sparc64_linux_nat): Adjust to C++ification.
5834 * spu-linux-nat.c (spu_linux_nat_target): New class.
5835 (the_spu_linux_nat_target): New.
5836 (spu_child_post_startup_inferior, spu_child_post_attach)
5837 (spu_child_wait, spu_fetch_inferior_registers)
5838 (spu_store_inferior_registers, spu_xfer_partial)
5839 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
5841 (_initialize_spu_nat): Adjust to C++ification.
5843 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
5844 (the_tilegx_linux_nat_target): New.
5845 (fetch_inferior_registers, store_inferior_registers):
5846 Refactor as methods.
5847 (_initialize_tile_linux_nat): Adjust to C++ification.
5849 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
5850 (the_xtensa_linux_nat_target): New.
5851 (xtensa_linux_fetch_inferior_registers)
5852 (xtensa_linux_store_inferior_registers): Refactor as
5853 xtensa_linux_nat_target methods.
5854 (_initialize_xtensa_linux_nat): Adjust to C++ification.
5856 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
5857 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
5858 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
5859 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
5860 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
5861 (fbsd_stopped_by_sw_breakpoint)
5862 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
5863 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
5864 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
5865 (fbsd_post_startup_inferior, fbsd_post_attach)
5866 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
5867 (fbsd_set_syscall_catchpoint)
5868 (super_xfer_partial, super_resume, super_wait)
5869 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
5870 (fbsd_handle_debug_trap): Remove target_ops parameter.
5871 (fbsd_nat_add_target): Delete.
5872 * fbsd-nat.h: Include "inf-ptrace.h".
5873 (fbsd_nat_add_target): Delete.
5874 (USE_SIGTRAP_SIGINFO): Define.
5875 (fbsd_nat_target): New class.
5877 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
5878 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
5879 (amd64bsd_target): Delete.
5880 * amd64-bsd-nat.h: New file.
5881 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
5883 (amd64_fbsd_nat_target): New class.
5884 (the_amd64_fbsd_nat_target): New.
5885 (amd64fbsd_read_description): Refactor as method of
5886 amd64_fbsd_nat_target.
5887 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5888 (_initialize_amd64fbsd_nat): Adjust to C++ification.
5889 * amd64-nat.h (amd64bsd_target): Delete function declaration.
5890 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
5891 (i386bsd_store_inferior_registers): Remove target_ops parameter.
5892 (i386bsd_target): Delete.
5893 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
5894 (i386bsd_fetch_inferior_registers)
5895 (i386bsd_store_inferior_registers): Declare.
5896 (i386_bsd_nat_target): New class.
5897 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
5898 (the_i386_fbsd_nat_target): New.
5899 (i386fbsd_resume, i386fbsd_read_description): Refactor as
5900 i386_fbsd_nat_target methods.
5901 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5902 (_initialize_i386fbsd_nat): Adjust to C++ification.
5903 * x86-bsd-nat.c (super_mourn_inferior): Delete.
5904 (x86bsd_mourn_inferior, x86bsd_target): Delete.
5905 (_initialize_x86_bsd_nat): Adjust to C++ification.
5906 * x86-bsd-nat.h: Include "x86-nat.h".
5907 (x86bsd_target): Delete declaration.
5908 (x86bsd_nat_target): New class.
5910 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
5911 (the_aarch64_fbsd_nat_target): New.
5912 (aarch64_fbsd_fetch_inferior_registers)
5913 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
5914 aarch64_fbsd_nat_target.
5915 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
5916 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
5917 (the_alpha_bsd_nat_target): New.
5918 (alphabsd_fetch_inferior_registers)
5919 (alphabsd_store_inferior_registers): Refactor as
5920 alpha_bsd_nat_target methods.
5921 (_initialize_alphabsd_nat): Refactor as methods of
5922 alpha_bsd_nat_target.
5923 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
5924 (the_amd64_nbsd_nat_target): New.
5925 (_initialize_amd64nbsd_nat): Adjust to C++ification.
5926 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
5927 (the_amd64_obsd_nat_target): New.
5928 (_initialize_amd64obsd_nat): Adjust to C++ification.
5929 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
5930 (the_arm_fbsd_nat_target): New.
5931 (arm_fbsd_fetch_inferior_registers)
5932 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
5933 (_initialize_arm_fbsd_nat): Refactor as methods of
5934 arm_fbsd_nat_target.
5935 (_initialize_arm_fbsd_nat): Adjust to C++ification.
5936 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
5937 (the_arm_netbsd_nat_target): New.
5938 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
5939 arm_netbsd_nat_target.
5940 (_initialize_arm_netbsd_nat): Adjust to C++ification.
5941 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
5942 (the_hppa_nbsd_nat_target): New.
5943 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
5944 hppa_nbsd_nat_target methods.
5945 (_initialize_hppanbsd_nat): Adjust to C++ification.
5946 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
5947 (the_hppa_obsd_nat_target): New.
5948 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
5949 methods of hppa_obsd_nat_target.
5950 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
5952 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
5953 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
5955 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
5956 (_initialize_i386obsd_nat): Use add_target.
5957 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
5958 (the_m68k_bsd_nat_target): New.
5959 (m68kbsd_fetch_inferior_registers)
5960 (m68kbsd_store_inferior_registers): Refactor as methods of
5961 m68k_bsd_nat_target.
5962 (_initialize_m68kbsd_nat): Adjust to C++ification.
5963 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
5964 (the_mips_fbsd_nat_target): New.
5965 (mips_fbsd_fetch_inferior_registers)
5966 (mips_fbsd_store_inferior_registers): Refactor as methods of
5967 mips_fbsd_nat_target.
5968 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
5970 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
5971 (the_mips_nbsd_nat_target): New.
5972 (mipsnbsd_fetch_inferior_registers)
5973 (mipsnbsd_store_inferior_registers): Refactor as methods of
5974 mips_nbsd_nat_target.
5975 (_initialize_mipsnbsd_nat): Adjust to C++ification.
5976 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
5977 (the_mips64_obsd_nat_target): New.
5978 (mips64obsd_fetch_inferior_registers)
5979 (mips64obsd_store_inferior_registers): Refactor as methods of
5980 mips64_obsd_nat_target.
5981 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
5983 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
5985 * nbsd-nat.h: Include "inf-ptrace.h".
5986 (nbsd_nat_target): New class.
5987 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
5988 (obsd_wait): Refactor as methods of obsd_nat_target.
5989 (obsd_add_target): Delete.
5990 * obsd-nat.h: Include "inf-ptrace.h".
5991 (obsd_nat_target): New class.
5992 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
5993 (the_ppc_fbsd_nat_target): New.
5994 (ppcfbsd_fetch_inferior_registers)
5995 (ppcfbsd_store_inferior_registers): Refactor as methods of
5996 ppc_fbsd_nat_target.
5997 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
5999 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6000 (the_ppc_nbsd_nat_target): New.
6001 (ppcnbsd_fetch_inferior_registers)
6002 (ppcnbsd_store_inferior_registers): Refactor as methods of
6003 ppc_nbsd_nat_target.
6004 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6005 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6006 (the_ppc_obsd_nat_target): New.
6007 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6008 methods of ppc_obsd_nat_target.
6009 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6011 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6012 (the_sh_nbsd_nat_target): New.
6013 (shnbsd_fetch_inferior_registers)
6014 (shnbsd_store_inferior_registers): Refactor as methods of
6016 (_initialize_shnbsd_nat): Adjust to C++ification.
6017 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6018 (inf_ptrace_xfer_partial): Delete.
6019 (sparc_xfer_partial, sparc_target): Delete.
6020 * sparc-nat.h (sparc_fetch_inferior_registers)
6021 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6022 (sparc_target): Delete function declaration.
6023 (sparc_target): New template class.
6024 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6025 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6026 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6027 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6029 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6030 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6031 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6032 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6034 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6035 (the_vax_bsd_nat_target): New.
6036 (vaxbsd_fetch_inferior_registers)
6037 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6039 (_initialize_vaxbsd_nat): Adjust to C++ification.
6041 * bsd-kvm.c (bsd_kvm_target): New class.
6042 (bsd_kvm_ops): Now a bsd_kvm_target.
6043 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6044 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6045 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6047 (bsd_kvm_return_one): Delete.
6048 (bsd_kvm_add_target): Adjust to C++ification.
6050 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6051 (nto_procfs_target_procfs): New classes.
6052 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6053 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6054 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6055 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6056 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6057 (procfs_remove_hw_breakpoint, procfs_resume)
6058 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6059 (procfs_kill_inferior, procfs_store_registers)
6060 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6061 as methods of nto_procfs_target.
6062 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6063 (nto_native_ops): Delete.
6064 (procfs_open, procfs_native_open): Delete.
6065 (nto_native_ops): Now an nto_procfs_target_native.
6066 (init_procfs_targets): Adjust to C++ification.
6067 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6068 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6069 Refactor as methods of nto_procfs_target.
6071 * go32-nat.c (go32_nat_target): New class.
6072 (the_go32_nat_target): New.
6073 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6074 (go32_store_registers, go32_xfer_partial, go32_files_info)
6075 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6076 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6077 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6078 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6079 (go32_target): Delete.
6080 (_initialize_go32_nat): Adjust to C++ification.
6082 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6083 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6084 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6085 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6087 (gnu_target): Delete.
6088 * gnu-nat.h (gnu_target): Delete.
6089 (gnu_nat_target): New class.
6090 * i386-gnu-nat.c (gnu_base_target): New.
6091 (i386_gnu_nat_target): New class.
6092 (the_i386_gnu_nat_target): New.
6093 (_initialize_i386gnu_nat): Adjust to C++ification.
6095 2018-05-02 Pedro Alves <palves@redhat.com>
6097 * bfd-target.c (target_bfd_xclose): Rename to ...
6098 (target_bfd_close): ... this.
6099 (target_bfd_reopen): Adjust.
6100 * target.c (target_close): Remove references to to_xclose.
6101 * target.h (target_ops::to_xclose): Delete.
6102 (target_ops::to_close): Update comments.
6104 2018-05-02 Pedro Alves <palves@redhat.com>
6106 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6108 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6109 * inf-ptrace.c (inf_ptrace_register_u_offset)
6110 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6111 (inf_ptrace_store_register, inf_ptrace_store_registers)
6112 (inf_ptrace_trad_target): Move to ...
6113 * linux-nat-trad.c: ... this new file.
6114 * linux-nat-trad.h: New file.
6115 * linux-nat.c (linux_target_install_ops): Make extern.
6116 (linux_trad_target): Delete.
6117 * linux-nat.h (linux_trad_target): Delete declaration.
6118 (linux_target_install_ops): Declare.
6119 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6122 2018-05-02 Pedro Alves <palves@redhat.com>
6124 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6125 procfs_target/add_target here.
6126 * procfs.c (procfs_target): Make static.
6127 (_initialize_procfs): Call add_target here.
6128 * procfs.h (struct target_ops): Remove forward declaration.
6129 (procfs_target): Remove declaration.
6130 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6132 2018-05-02 Pedro Alves <palves@redhat.com>
6134 * procfs.c (procfs_stopped_by_watchpoint)
6135 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6136 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6138 (procfs_use_watchpoints): Delete, move contents...
6139 (procfs_target): ... here.
6140 * procfs.h (procfs_use_watchpoints): Delete declaration.
6141 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6142 procfs_use_watchpoints.
6143 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6144 procfs_use_watchpoints.
6146 2018-05-02 Tom Tromey <tom@tromey.com>
6149 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6150 and var_zuinteger_unlimited.
6151 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6152 and PARAM_ZUINTEGER_UNLIMITED.
6153 (set_parameter_value): Handle var_zuinteger and
6154 var_zuinteger_unlimited.
6155 (add_setshow_generic): Likewise.
6156 (parmpy_init): Likewise.
6158 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6161 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6162 pointer is not null before dereferencing it.
6164 2018-04-30 Tom Tromey <tom@tromey.com>
6166 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6169 2018-04-30 Tom Tromey <tom@tromey.com>
6171 * breakpoint.c (mention): Remove use of is_mi_like_p.
6172 (print_mention_ranged_breakpoint): Likewise.
6173 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6176 2018-04-30 Tom Tromey <tom@tromey.com>
6178 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6180 2018-04-30 Tom Tromey <tom@tromey.com>
6182 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6183 (info_spu_event_command): Remove some uses of is_mi_like_p.
6185 2018-04-30 Tom Tromey <tom@tromey.com>
6187 * python/py-framefilter.c (py_print_single_arg)
6188 (enumerate_locals, py_print_args, py_print_frame): Remove some
6189 uses of is_mi_like_p.
6191 2018-04-30 Tom Tromey <tom@tromey.com>
6194 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6195 * ui-out.h (ui_out::is_mi_like_p): Now const.
6196 (ui_out::do_is_mi_like_p): Now const.
6197 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6199 2018-04-30 Tom Tromey <tom@tromey.com>
6201 * varobj.c (varobj_set_visualizer): Use new_reference.
6202 * python/python.c (gdbpy_decode_line): Use new_reference.
6203 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6206 2018-04-30 Tom Tromey <tom@tromey.com>
6208 * varobj.c (install_new_value): Use new_reference.
6209 * value.h (value_incref): Return void. Swap intro comment with
6211 * value.c (set_value_parent): Use new_reference.
6212 (value_incref): Return void. Update intro comment.
6213 (release_value): Use new_reference.
6214 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6216 2018-04-30 Tom Tromey <tom@tromey.com>
6218 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6219 * gdb_bfd.h (new_bfd_ref): Remove.
6220 (gdb_bfd_open): Update comment.
6221 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6222 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6223 (gdb_bfd_fdopenr): Use new_reference.
6224 * exec.c (exec_file_attach): Use new_reference.
6226 2018-04-30 Tom Tromey <tom@tromey.com>
6228 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6231 2018-04-30 Tom Tromey <tom@tromey.com>
6233 * jit.c (jit_read_code_entry): Use type_align.
6234 * i386-tdep.c (i386_gdbarch_init): Don't call
6235 set_gdbarch_long_long_align_bit.
6236 * gdbarch.sh: Remove long_long_align_bit.
6237 * gdbarch.c, gdbarch.h: Rebuild.
6238 * arc-tdep.c (arc_type_align): New function.
6239 (arc_gdbarch_init): Use arc_type_align. Don't call
6240 set_gdbarch_long_long_align_bit.
6242 2018-04-30 Tom Tromey <tom@tromey.com>
6244 * rust-lang.c (rust_type_alignment): Remove.
6245 (rust_composite_type): Use type_align.
6247 2018-04-30 Tom Tromey <tom@tromey.com>
6249 * NEWS: Mention Type.align.
6250 * python/py-type.c (typy_get_alignof): New function.
6251 (type_object_getset): Add "alignof".
6253 2018-04-30 Tom Tromey <tom@tromey.com>
6257 * std-operator.def (UNOP_ALIGNOF): New operator.
6258 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6260 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6261 * c-lang.c (c_op_print_tab): Add alignof.
6262 * c-exp.y (ALIGNOF): New token.
6263 (exp): Add "ALIGNOF" production.
6264 (ident_tokens): Add _Alignof and alignof.
6266 2018-04-30 Tom Tromey <tom@tromey.com>
6268 * i386-tdep.c (i386_type_align): New function.
6269 (i386_gdbarch_init): Update.
6270 * gdbarch.sh (type_align): New method.
6271 * gdbarch.c, gdbarch.h: Rebuild.
6272 * arch-utils.h (default_type_align): Declare.
6273 * arch-utils.c (default_type_align): New function.
6274 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6275 (struct type) <align_log2>: New field.
6276 <instance_flags>: Now a bitfield.
6277 (TYPE_RAW_ALIGN): New macro.
6278 (type_align, type_raw_align, set_type_align): Declare.
6279 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6281 * dwarf2read.c (quirk_rust_enum): Set type alignment.
6282 (get_alignment, maybe_set_alignment): New functions.
6283 (read_structure_type, read_enumeration_type, read_array_type)
6284 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6285 (read_subrange_type, read_base_type): Set type alignment.
6287 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
6289 * dwarf2read.c (read_index_from_section): Use bool.
6291 2018-04-29 Fabian Groffen <grobian@gentoo.org>
6294 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6297 2018-04-29 John Reiser <jreiser@BitWagon.com>
6300 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6301 last step, and do it atomically.
6303 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
6305 * compile/compile-c-types.c (convert_int, convert_float):
6308 2018-04-27 Tom Tromey <tom@tromey.com>
6311 * rust-lang.c (rust_inclusive_range_type_p): New function.
6312 (rust_range): Handle inclusive ranges.
6313 (rust_compute_range): Likewise.
6314 * rust-exp.y (struct rust_op) <inclusive>: New field.
6315 (DOTDOTEQ): New constant.
6316 (range_expr): Add "..=" productions.
6317 (operator_tokens): Add "..=" token.
6318 (ast_range): Add "inclusive" parameter.
6319 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6321 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6323 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6324 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6326 * expprint.c (print_subexp_standard): Handle new bounds values.
6327 (dump_subexp_body_standard): Likewise.
6329 2018-04-27 Tom Tromey <tom@tromey.com>
6331 * configure: Rebuild.
6332 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6333 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6335 (class symbol_needs_eval_context): Likewise.
6336 * dwarf2read.c (mock_mapped_index::symbol_name_count)
6337 (mock_mapped_index::symbol_name_at): Use "override". Remove
6339 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6341 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6342 * aarch64-tdep.c (instruction_reader::read): Use "override".
6343 (instruction_reader_test::read): Likewise.
6344 * arm-tdep.c (instruction_reader::read): Use "override".
6345 (instruction_reader_thumb::read): Likewise.
6347 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
6350 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6351 instead of remote_send.
6352 (remote_send): Remove.
6354 2018-04-26 Pedro Alves <palves@redhat.com>
6356 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6357 find_function_start_sal instead of find_pc_line.
6359 2018-04-26 Pedro Alves <palves@redhat.com>
6361 * breakpoint.c (set_breakpoint_location_function): Handle
6363 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6364 * elfread.c (elf_symtab_read): Give data symbols with
6365 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6366 (elf_rel_plt_read): Update comment.
6367 * linespec.c (convert_linespec_to_sals): Handle
6369 (minsym_found): Handle mst_data_gnu_ifunc.
6370 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6371 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6372 * parse.c (find_minsym_type_and_address): Handle
6374 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6375 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6376 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6378 <mst_data_gnu_ifunc>: New enumerator.
6380 2018-04-26 Pedro Alves <palves@redhat.com>
6382 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6383 (lookup_minimal_symbol_by_pc_section): ... this. Replace
6384 'want_trampoline' parameter by a lookup_msym_prefer parameter.
6386 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6387 (lookup_minimal_symbol_by_pc): Adjust.
6388 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6389 (lookup_solib_trampoline_symbol_by_pc): Adjust.
6390 * minsyms.h (lookup_msym_prefer): New enum.
6391 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6392 parameter by a lookup_msym_prefer parameter.
6394 2018-04-26 Pedro Alves <palves@redhat.com>
6396 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6397 ends in "@plt" instead of looking at the symbol's section.
6399 2018-04-26 Pedro Alves <palves@redhat.com>
6401 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
6403 (find_pc_partial_function_gnu_ifunc): Rename to ...
6404 (find_pc_partial_function): ... this, and remove references to
6406 (find_pc_partial_function): Delete old implementation.
6407 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6409 2018-04-26 Pedro Alves <palves@redhat.com>
6411 * linespec.c (struct bound_minimal_symbol_search_key): New.
6412 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
6413 skip first line if we found a GNU ifunc minimal symbol by name.
6414 (compare_msymbols): Change parameters to work with a destructured
6416 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6419 2018-04-26 Pedro Alves <palves@redhat.com>
6421 * breakpoint.c (set_breakpoint_location_function): Don't resolve
6422 ifunc targets here. Instead, if we have an ifunc minsym, use its
6424 (add_location_to_breakpoint): Store the minsym and the objfile in
6425 the breakpoint location.
6426 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6427 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6428 Record the minsym in the sal.
6429 * symtab.h (symtab_and_line) <msymbol>: New field.
6431 2018-04-26 Pedro Alves <palves@redhat.com>
6433 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6434 unless we actually resolved the ifunc.
6436 2018-04-26 Pedro Alves <palves@redhat.com>
6438 * c-exp.y (variable production): Prefer ifunc minsyms over
6439 regular function symbols.
6440 * symtab.c (find_gnu_ifunc): New function.
6441 * minsyms.h (lookup_msym_prefer): New enum.
6442 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6443 parameter by a lookup_msym_prefer parameter.
6444 * symtab.h (find_gnu_ifunc): New declaration.
6446 2018-04-26 Pedro Alves <palves@redhat.com>
6448 * blockframe.c (find_gnu_ifunc_target_type): New function.
6449 (find_function_type): New.
6450 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6451 return a value with a memory address.
6452 (eval_call): For calls to GNU ifunc functions, try to find the
6453 type of the target function from the type that the resolver
6455 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6457 * infcall.c (find_function_return_type): Delete.
6458 (find_function_addr): Add 'function_type' parameter. For calls to
6459 GNU ifunc functions, try to find the type of the target function
6460 from the type that the resolver returns, and return it via
6462 (call_function_by_hand_dummy): Adjust to use the function type
6463 returned by find_function_addr.
6464 (find_function_addr): Add 'function_type' parameter and move
6466 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6469 2018-04-26 Pedro Alves <palves@redhat.com>
6471 * c-exp.y (variable production): Skip finding an alias for ifunc
6474 2018-04-26 Pedro Alves <palves@redhat.com>
6476 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6478 2018-04-25 Pedro Alves <palves@redhat.com>
6480 * infcmd.c (kill_command): Print the pid as string, not the whole
6481 thread's ptid. Add comment. s/has been killed/killed/ in output
6483 * remote.c (remote_detach_1): Print the pid as string, not the
6484 whole thread's ptid.
6486 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6487 Sergio Durigan Junior <sergiodj@redhat.com>
6488 Pedro Alves <palves@redhat.com>
6490 * infcmd.c (kill_command): Print message when inferior has
6492 * inferior.c (print_inferior_events): Remove 'static'. Set as
6494 (add_inferior): Improve message printed when
6495 'print_inferior_events' is on.
6496 (exit_inferior): Remove message printed when
6497 'print_inferior_events' is on.
6498 (detach_inferior): Improve message printed when
6499 'print_inferior_events' is on.
6500 (initialize_inferiors): Use 'add_inferior_silent' to set
6501 'current_inferior_'.
6502 * inferior.h (print_inferior_events): Declare here as
6504 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6505 '[Detaching...]' messages when 'print_inferior_events' is on.
6506 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
6507 as prefix/suffix for messages. Remove periods. Fix erroneous
6508 'Detaching after fork from child...', replace it by '... from
6510 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6511 prefix/suffix when printing 'Detaching...' messages. Print
6512 them when 'print_inferior_events' is on.
6513 * remote.c (remote_detach_1): Print message when detaching
6514 from inferior and '!is_fork_parent'.
6516 2018-04-24 Tom Tromey <tom@tromey.com>
6518 * cli-out.h: Reindent.
6520 2018-04-24 Tom Tromey <tom@tromey.com>
6522 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6523 (cli_ui_out::do_field_string): Use fputs_filtered.
6524 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6526 2018-04-23 Tom Tromey <tom@tromey.com>
6528 * guile/scm-frame.c (gdbscm_frame_read_var): Use
6529 gdb::unique_xmalloc_ptr.
6531 2018-04-23 Tom Tromey <tom@tromey.com>
6533 * configure: Rebuild.
6535 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
6538 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6539 prepare_for_testing. Set normal_bp to r_debug_state if target
6542 2018-04-21 Pedro Alves <palves@redhat.com>
6543 Rajendra SY <rajendra.sy@gmail.com>
6545 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6546 * remote.c (extended_remote_attach): In all-stop mode, mark the
6547 thread as executing.
6549 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6551 * thread.c (thread_apply_all_command): Fix comment.
6552 (thread_command): Fix comment.
6554 2018-04-10 Alan Hayward <alan.hayward@arm.com>
6556 * common/tdesc.h (tdesc_create_feature): Remove xml filename
6558 * features/aarch64-core.c (create_feature_aarch64_core):
6560 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
6562 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
6564 * features/i386/32bit-avx512.c
6565 (create_feature_i386_32bit_avx512): Likewise.
6566 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
6568 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
6570 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
6572 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
6574 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
6576 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
6578 * features/i386/64bit-avx512.c
6579 (create_feature_i386_64bit_avx512): Likewise.
6580 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
6582 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
6584 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
6586 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
6588 * features/i386/64bit-segments.c
6589 (create_feature_i386_64bit_segments): Likewise.
6590 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
6592 * features/i386/x32-core.c
6593 (create_feature_i386_x32_core): Likewise.
6594 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
6595 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
6596 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
6597 * target-descriptions.c: In generated code, don't pass xml
6600 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6602 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
6603 (print_xml_feature::visit_post): Likewise.
6604 (print_xml_feature::visit): Likewise.
6605 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
6606 (print_xml_feature): Add new class.
6607 * regformats/regdat.sh: Null xmltarget on feature targets.
6608 * target-descriptions.c (struct target_desc): Add xmltarget.
6609 (maintenance_check_tdesc_xml_convert): Add unittest function.
6610 (tdesc_get_features_xml): Add function to get xml.
6611 (maintenance_check_xml_descriptions): Test xml generation.
6612 * xml-tdesc.c (string_read_description_xml): Add function.
6613 * xml-tdesc.h (string_read_description_xml): Add declaration.
6615 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6617 * features/Makefile: Add feature marker to targets with new style
6618 target descriptions.
6619 * regformats/aarch64.dat: Regenerate.
6620 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
6621 * regformats/i386/amd64-avx-linux.dat: Likewise.
6622 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
6623 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
6624 * regformats/i386/amd64-linux.dat: Likewise.
6625 * regformats/i386/amd64-mpx-linux.dat: Likewise.
6626 * regformats/i386/amd64.dat: Likewise.
6627 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
6628 * regformats/i386/i386-avx-linux.dat: Likewise.
6629 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
6630 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
6631 * regformats/i386/i386-linux.dat: Likewise.
6632 * regformats/i386/i386-mmx-linux.dat: Likewise.
6633 * regformats/i386/i386-mpx-linux.dat: Likewise.
6634 * regformats/i386/i386.dat: Likewise.
6635 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
6636 * regformats/i386/x32-avx-linux.dat: Likewise.
6637 * regformats/i386/x32-linux.dat: Likewise.
6638 * regformats/tic6x-c62x-linux.dat: Likewise.
6639 * regformats/tic6x-c64x-linux.dat: Likewise.
6640 * regformats/tic6x-c64xp-linux.dat: Likewise.
6641 * regformats/regdat.sh: Parse feature marker.
6643 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6645 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
6646 (tdesc_osabi_name): Likewise.
6647 * target-descriptions.c (tdesc_architecture_name): Add new
6649 (tdesc_osabi_name): Likewise.
6651 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6653 * common/tdesc.c (tdesc_predefined_type): Move to here.
6654 (tdesc_named_type): Likewise.
6655 (tdesc_create_vector): Likewise.
6656 (tdesc_create_struct): Likewise.
6657 (tdesc_set_struct_size): Likewise.
6658 (tdesc_create_union): Likewise.
6659 (tdesc_create_flags): Likewise.
6660 (tdesc_create_enum): Likewise.
6661 (tdesc_add_field): Likewise.
6662 (tdesc_add_typed_bitfield): Likewise.
6663 (tdesc_add_bitfield): Likewise.
6664 (tdesc_add_flag): Likewise.
6665 (tdesc_add_enum_value): Likewise.
6666 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
6667 (struct tdesc_type_vector): Likewise.
6668 (struct tdesc_type_field): Likewise.
6669 (struct tdesc_type_with_fields): Likewise.
6670 (tdesc_create_enum): Add declaration.
6671 (tdesc_add_typed_bitfield): Likewise.
6672 (tdesc_add_enum_value): Likewise.
6673 * target-descriptions.c (tdesc_type_field): Move from here.
6674 (tdesc_type_builtin): Likewise.
6675 (tdesc_type_vector): Likewise.
6676 (tdesc_type_with_fields): Likewise.
6677 (tdesc_predefined_types): Likewise.
6678 (tdesc_named_type): Likewise.
6679 (tdesc_create_vector): Likewise.
6680 (tdesc_create_struct): Likewise.
6681 (tdesc_set_struct_size): Likewise.
6682 (tdesc_create_union): Likewise.
6683 (tdesc_create_flags): Likewise.
6684 (tdesc_create_enum): Likewise.
6685 (tdesc_add_field): Likewise.
6686 (tdesc_add_typed_bitfield): Likewise.
6687 (tdesc_add_bitfield): Likewise.
6688 (tdesc_add_flag): Likewise.
6689 (tdesc_add_enum_value): Likewise.
6690 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
6691 (tdesc_add_typed_bitfield): Likewise.
6692 (tdesc_add_enum_value): Likewise.
6694 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6696 * common/tdesc.c (tdesc_feature::accept): Move to here.
6697 (tdesc_feature::operator==): Likewise.
6698 (tdesc_create_reg): Likewise.
6699 * common/tdesc.h (tdesc_type_kind): Likewise.
6700 (struct tdesc_type): Likewise.
6701 (struct tdesc_feature): Likewise.
6702 * regformats/regdat.sh: Create a feature.
6703 * target-descriptions.c (tdesc_type_kind): Move from here.
6704 (tdesc_type): Likewise.
6705 (tdesc_type_up): Likewise.
6706 (tdesc_feature): Likewise.
6707 (tdesc_create_reg): Likewise.
6709 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6711 * Makefile.in: Add arch/tdesc.c
6712 * common/tdesc.c: New file.
6713 * common/tdesc.h (tdesc_element_visitor): Move to here.
6714 (tdesc_element): Likewise.
6715 (tdesc_reg): Likewise.
6716 (tdesc_reg_up): Likewise.
6717 * regformats/regdef.h (reg): Add offset to constructors.
6718 * target-descriptions.c (tdesc_element_visitor): Move from here.
6719 (tdesc_element): Likewise.
6720 (tdesc_reg): Likewise.
6721 (tdesc_reg_up): Likewise.
6723 2018-04-17 Tom Tromey <tom@tromey.com>
6725 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
6728 2018-04-17 Tom Tromey <tom@tromey.com>
6730 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
6732 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
6734 * symtab.c (print_symbol_info): Skip printing filename and line
6735 number when `last' is NULL.
6736 (symtab_symbol_info): Use empty string instead of NULL for first
6737 invocation of print_symbol_info.
6738 (rbreak_command): Pass NULL to `last' parameter of
6741 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
6743 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
6746 2018-04-16 Pedro Alves <palves@redhat.com>
6748 * MAINTAINERS (sh): Remove.
6749 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
6750 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
6751 (ALLDEPFILES): Remove sh64-tdep.c.
6752 * NEWS: Mentions that support for SH-5/SH64 is removed.
6753 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
6754 (sh*-*-openbsd*): Ditto.
6755 (sh64-*-elf*): Remove.
6757 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
6758 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
6759 * sh-tdep.c: No longer include "sh64-tdep.h".
6760 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
6761 * sh64-tdep.c, sh64-tdep.h: Remove files.
6763 2018-04-16 Pedro Alves <palves@redhat.com>
6765 * MAINTAINERS: Remove m88k.
6766 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
6767 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
6768 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
6769 * NEWS: Mention that support for m88k was removed.
6770 * configure.host (m88*-*-*): Remove support.
6771 * configure.nat (m88k-*-*): Remove support.
6772 * configure.tgt (m88*-*-openbsd*): Remove.
6773 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
6775 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
6777 * configure.tgt (x86_tobjs): New variable.
6778 (amd64_tobjs, i386_tobjs): Use it.
6780 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6782 * symtab.c (print_symbol_info): Precede the symbol definition by
6783 the line number when available.
6784 * NEWS: Advertise this enhancement.
6786 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6788 * NEWS (New options): announce set/show record btrace cpu.
6789 * btrace.c: Include record-btrace.h.
6790 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
6791 the vendor is unknown.
6792 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
6793 Maybe overwrite the btrace configuration's cpu.
6794 (btrace_compute_ftrace): Add cpu parameter. Update callers.
6795 (btrace_fetch): Add cpu parameter. Update callers.
6796 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
6797 Maybe overwrite the btrace configuration's cpu. Skip enabling
6798 errata workarounds if the vendor is unknown.
6799 * python/py-record-btrace.c: Include record-btrace.h.
6800 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
6801 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
6802 * record-btrace.c (record_btrace_cpu_state_kind): New.
6803 (record_btrace_cpu): New.
6804 (set_record_btrace_cpu_cmdlist): New.
6805 (record_btrace_get_cpu): New.
6806 (require_btrace_thread, record_btrace_info)
6807 (record_btrace_resume_thread): Call record_btrace_get_cpu.
6808 (cmd_set_record_btrace_cpu_none): New.
6809 (cmd_set_record_btrace_cpu_auto): New.
6810 (cmd_set_record_btrace_cpu): New.
6811 (cmd_show_record_btrace_cpu): New.
6812 (_initialize_record_btrace): Initialize set/show record btrace cpu
6814 * record-btrace.h (record_btrace_get_cpu): New.
6816 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6818 * record.c (set_record_command): Fix typo in message.
6820 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6822 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
6824 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6826 * infrun.c (process_event_stop_test): Call
6827 gdbarch_in_indirect_branch_thunk.
6828 * gdbarch.sh (in_indirect_branch_thunk): New.
6829 * gdbarch.c: Regenerated.
6830 * gdbarch.h: Regenerated.
6833 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
6834 (HFILES_NO_SRCDIR): Add x86-tdep.h.
6835 (ALLDEPFILES): Add x86-tdep.c.
6836 * arch-utils.h (default_in_indirect_branch_thunk): New.
6837 * arch-utils.c (default_in_indirect_branch_thunk): New.
6838 * i386-tdep: Include x86-tdep.h.
6839 (i386_in_indirect_branch_thunk): New.
6840 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
6842 * amd64-tdep: Include x86-tdep.h.
6843 (amd64_in_indirect_branch_thunk): New.
6844 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
6846 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
6849 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
6850 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
6851 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
6854 2018-04-12 Tom Tromey <tom@tromey.com>
6856 * rust-lang.c (rust_print_struct_def): Remove univariant code.
6857 (rust_evaluate_subexp): Likewise.
6859 2018-04-12 Pedro Alves <palves@redhat.com>
6861 * procfs.c (procfs_detach): Make forward declaration's prototype
6862 match definition's protototype.
6863 (proc_get_LDT_entry): Remove stale do_cleanups call.
6865 2018-04-12 Pedro Alves <palves@redhat.com>
6867 * target.h (target_ops::to_has_exited): Delete.
6868 (target_has_exited): Delete.
6869 * target-delegates.c: Regenerate.
6871 2018-04-11 Pedro Alves <palves@redhat.com>
6873 * target.c (fileio_fh_t::t): Add comment.
6874 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6875 (target_fileio_close): Handle a NULL target.
6876 (invalidate_fileio_fh): New.
6877 (target_close): Call it.
6878 * remote.c (remote_hostio_send_command): No longer check whether
6879 remote_desc is open.
6881 2018-04-11 Pedro Alves <palves@redhat.com>
6883 * target.c (fileio_fh_t): Make it a named struct instead of a
6885 (fileio_fh_t::is_closed): New method.
6886 (DEF_VEC_O (fileio_fh_t)): Remove.
6887 (fileio_fhandles): Now a std::vector.
6888 (is_closed_fileio_fh): Delete.
6889 (acquire_fileio_fd): Adjust. Rename parameters.
6890 (release_fileio_fd): Adjust.
6891 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
6892 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6893 (target_fileio_close): Adjust.
6895 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
6897 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
6900 2018-04-10 Pedro Alves <palves@redhat.com>
6902 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
6903 (scoped_finish_thread_state): New class.
6904 * infcmd.c (run_command_1): Use it instead of finish_thread_state
6906 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
6907 (fetch_inferior_event, normal_stop): Likewise.
6908 * thread.c (finish_thread_state_cleanup): Delete.
6910 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6911 Pedro Alves <palves@redhat.com>
6913 * value.c: Include "selftest.h" and "common/array-view.h".
6914 (struct range) <operator ==>: New.
6915 (test_ranges_contain): New.
6916 (check_ranges_vector): New.
6917 (test_insert_into_bit_range_vector): New.
6918 (_initialize_values): Register selftests.
6919 * common/array-view.h (operator==, operator!=): New.
6921 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6923 * common/gdb_vecs.h (unordered_remove): Add overload that takes
6925 * inline-frame.c: Include <algorithm>.
6926 (struct inline_state): Add constructor.
6927 (inline_state_s): Remove.
6928 (DEF_VEC_O(inline_state_s)): Remove.
6929 (inline_states): Change type to std::vector.
6930 (find_inline_frame_state): Adjust to std::vector.
6931 (allocate_inline_frame_state): Remove.
6932 (clear_inline_frame_state): Adjust to std::vector.
6933 (skip_inline_frames): Adjust to std::vector.
6935 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6937 * tracepoint.h (struct trace_state_variable): Add constructor.
6938 <name>: Change type to std::string.
6939 * tracepoint.c (tsv_s): Remove.
6940 (DEF_VEC_O(tsv_s)): Remove.
6941 (tvariables): Change to std::vector.
6942 (create_trace_state_variable): Adjust to std::vector.
6943 (find_trace_state_variable): Likewise.
6944 (find_trace_state_variable_by_number): Likewise.
6945 (delete_trace_state_variable): Likewise.
6946 (trace_variable_command): Adjust to std::string.
6947 (delete_trace_variable_command): Likewise.
6948 (tvariables_info_1): Adjust to std::vector.
6949 (save_trace_state_variables): Likewise.
6950 (start_tracing): Likewise.
6951 (merge_uploaded_trace_state_variables): Adjust to std::vector
6953 * target.h (struct target_ops)
6954 <to_download_trace_state_variable>: Pass reference to
6955 trace_state_variable.
6956 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
6957 * target-delegates.c: Re-generate.
6958 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
6959 (mi_tsv_deleted): Likewise.
6960 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
6961 * remote.c (remote_download_trace_state_variable): Change
6962 pointer to reference and adjust.
6963 * make-target-delegates (parse_argtypes): Handle references.
6964 (write_function_header): Likewise.
6965 (munge_type): Likewise.
6967 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6969 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6970 string_view-selftests.c.
6971 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
6973 * unittests/basic_string_view/cons/char/1.cc: Likewise.
6974 * unittests/basic_string_view/cons/char/2.cc: Likewise.
6975 * unittests/basic_string_view/cons/char/3.cc: Likewise.
6976 * unittests/basic_string_view/element_access/char/1.cc:
6978 * unittests/basic_string_view/element_access/char/empty.cc:
6980 * unittests/basic_string_view/element_access/char/front_back.cc:
6982 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
6983 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
6985 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
6987 * unittests/basic_string_view/modifiers/swap/char/1.cc:
6989 * unittests/basic_string_view/operations/compare/char/1.cc:
6991 * unittests/basic_string_view/operations/compare/char/13650.cc:
6993 * unittests/basic_string_view/operations/copy/char/1.cc:
6995 * unittests/basic_string_view/operations/data/char/1.cc:
6997 * unittests/basic_string_view/operations/find/char/1.cc:
6999 * unittests/basic_string_view/operations/find/char/2.cc:
7001 * unittests/basic_string_view/operations/find/char/3.cc:
7003 * unittests/basic_string_view/operations/find/char/4.cc:
7005 * unittests/basic_string_view/operations/rfind/char/1.cc:
7007 * unittests/basic_string_view/operations/rfind/char/2.cc:
7009 * unittests/basic_string_view/operations/rfind/char/3.cc:
7011 * unittests/basic_string_view/operations/substr/char/1.cc:
7013 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7014 * unittests/string_view-selftests.c: New file.
7016 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7018 * unittests/basic_string_view/capacity/1.cc: New file.
7019 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7020 * unittests/basic_string_view/cons/char/1.cc: New file.
7021 * unittests/basic_string_view/cons/char/2.cc: New file.
7022 * unittests/basic_string_view/cons/char/3.cc: New file.
7023 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7024 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7025 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7026 * unittests/basic_string_view/element_access/char/1.cc: New file.
7027 * unittests/basic_string_view/element_access/char/2.cc: New file.
7028 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7029 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7030 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7031 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7032 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7033 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7034 * unittests/basic_string_view/include.cc: New file.
7035 * unittests/basic_string_view/inserters/char/1.cc: New file.
7036 * unittests/basic_string_view/inserters/char/2.cc: New file.
7037 * unittests/basic_string_view/inserters/char/3.cc: New file.
7038 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7039 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7040 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7041 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7042 * unittests/basic_string_view/literals/types.cc: New file.
7043 * unittests/basic_string_view/literals/values.cc: New file.
7044 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7045 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7046 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7047 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7048 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7049 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7050 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7051 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7052 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7053 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7054 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7055 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7056 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7057 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7058 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7059 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7060 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7061 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7062 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7063 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7064 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7065 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7066 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7067 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7068 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7069 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7070 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7071 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7072 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7073 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7074 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7075 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7076 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7077 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7078 * unittests/basic_string_view/operators/char/2.cc: New file.
7079 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7080 * unittests/basic_string_view/range_access/char/1.cc: New file.
7081 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7082 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7083 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7084 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7085 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7086 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7087 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7088 * unittests/basic_string_view/typedefs.cc: New file.
7089 * unittests/basic_string_view/types/1.cc: New file.
7091 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7093 * common/gdb_string_view.h: Remove libstdc++ implementation
7094 details, adjust to gdb reality.
7095 * common/gdb_string_view.tcc: Likewise.
7096 * cli/cli-script.c (struct string_view): Remove.
7097 (user_args) <m_args>: Change element type to gdb::string_view.
7098 (user_args::insert_args): Adjust.
7100 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7102 * common/gdb_string_view.h: New file.
7103 * common/gdb_string_view.tcc: New file.
7105 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7107 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7108 * configure: Re-generate.
7110 2018-04-09 Pedro Alves <palves@redhat.com>
7112 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7113 (set_target_gdbarch): Call
7114 gdb::observers::architecture_changed.notify instead of
7115 observer_notify_architecture_changed.
7117 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7119 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7120 (do_restore_current_traceframe_cleanup): Remove.
7121 (restore_current_traceframe_cleanup_dtor): Remove.
7122 (make_cleanup_restore_current_traceframe): Remove.
7123 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7125 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7126 * infrun.c (fetch_inferior_event): Use
7127 scoped_restore_current_traceframe.
7129 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7131 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7133 <n_allocated_type_units>: Remove.
7134 <all_type_units>: Change to std::vector.
7135 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7136 to std::vector change.
7137 (dwarf2_per_objfile::get_cutu): Likewise.
7138 (dwarf2_per_objfile::get_tu): Likewise.
7139 (create_signatured_type_table_from_index): Likewise.
7140 (create_signatured_type_table_from_debug_names): Likewise.
7141 (dw2_symtab_iter_next): Likewise.
7142 (dw2_print_stats): Likewise.
7143 (dw2_expand_all_symtabs): Likewise.
7144 (dw2_expand_marked_cus): Likewise.
7145 (dw2_debug_names_iterator::next): Likewise.
7146 (dwarf2_initialize_objfile): Likewise.
7147 (add_signatured_type_cu_to_table): Likewise.
7148 (create_all_type_units): Likewise.
7149 (add_type_unit): Likewise.
7150 (struct tu_abbrev_offset): Add constructor.
7151 (build_type_psymtabs_1): Adjust to std::vector change.
7152 (print_tu_stats): Likewise.
7153 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7154 (write_debug_names): Likewise.
7156 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7158 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7159 Make an std::vector.
7160 <n_comp_units>: Remove.
7161 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7162 to std::vector change.
7163 (dwarf2_per_objfile::get_cutu): Likewise.
7164 (dwarf2_per_objfile::get_cu): Likewise.
7165 (create_cus_from_index): Likewise.
7166 (create_addrmap_from_index): Likewise.
7167 (create_addrmap_from_aranges): Likewise.
7168 (dwarf2_read_index): Likewise.
7169 (dw2_find_last_source_symtab): Likewise.
7170 (dw2_map_symtabs_matching_filename): Likewise.
7171 (dw2_symtab_iter_next): Likewise.
7172 (dw2_print_stats): Likewise.
7173 (dw2_expand_all_symtabs): Likewise.
7174 (dw2_expand_symtabs_with_fullname): Likewise.
7175 (dw2_expand_marked_cus): Likewise.
7176 (dw2_map_symbol_filenames): Likewise.
7177 (create_cus_from_debug_names): Likewise.
7178 (dwarf2_read_debug_names): Likewise.
7179 (dw2_debug_names_iterator::next): Likewise.
7180 (dwarf2_initialize_objfile): Likewise.
7181 (set_partial_user): Likewise.
7182 (dwarf2_build_psymtabs_hard): Likewise.
7183 (read_comp_units_from_section): Remove arguments, adjust to
7185 (create_all_comp_units): Adjust to std::vector and
7186 read_comp_units_from_section changes.
7187 (dwarf2_find_containing_comp_unit): Adjust to std::vector
7189 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7190 (psyms_seen_size): Likewise.
7191 (write_gdbindex): Likewise.
7192 (write_debug_names): Likewise.
7194 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7196 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7197 with dwarf2_per_objfile.
7198 (create_cus_from_index): Likewise.
7199 (create_signatured_type_table_from_index): Likewise.
7200 (dwarf2_read_index): Likewise.
7201 (dwarf2_initialize_objfile): Likewise.
7202 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
7203 per_cu rather than get_dwarf2_per_objfile.
7205 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7207 * dwarf2read.h (struct signatured_type): Forward declare.
7208 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7210 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7211 (dw2_get_cutu): ...this.
7212 (dwarf2_per_objfile::get_cu): Rename from...
7213 (dw2_get_cu): ...this.
7214 (dwarf2_per_objfile::get_tu): New.
7215 (create_addrmap_from_index): Adjust.
7216 (create_addrmap_from_aranges): Adjust.
7217 (dw2_find_last_source_symtab): Adjust.
7218 (dw2_map_symtabs_matching_filename): Adjust.
7219 (dw2_symtab_iter_next): Adjust.
7220 (dw2_print_stats): Adjust.
7221 (dw2_expand_all_symtabs): Adjust.
7222 (dw2_expand_symtabs_with_fullname): Adjust.
7223 (dw2_expand_marked_cus): Adjust.
7224 (dw_expand_symtabs_matching_file_matcher): Adjust.
7225 (dw2_map_symbol_filenames): Adjust.
7226 (dw2_debug_names_iterator::next): Adjust.
7227 (dwarf2_initialize_objfile): Adjust.
7228 (set_partial_user): Adjust.
7229 (dwarf2_build_psymtabs_hard): Adjust.
7231 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7233 * dwarf2read.c (create_signatured_type_table_from_debug_names):
7234 Remove unused variables.
7235 (dw2_map_symtabs_matching_filename): Likewise.
7236 (dwarf2_record_block_ranges): Likewise.
7237 (dwarf2_read_addr_index): Likewise.
7238 (follow_die_offset): Likewise.
7240 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7242 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7243 to symbol_file_add_main.
7245 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7248 * mi/mi-console.c (do_fputc_async_safe): New.
7249 (mi_console_file::write_async_safe): New.
7250 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7251 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7253 * ui-file.c (ui_file::putstrn): Adjust call to
7254 fputstrn_unfiltered.
7255 * utils.c (printchar): Replace do_fputs and do_fprintf
7256 parameters by do_fputc.
7257 (fputstr_filtered): Adjust call to printchar.
7258 (fputstr_unfiltered): Likewise.
7259 (fputstrn_filtered): Likewise.
7260 (fputstrn_unfiltered): Add do_fputc parameter, pass to
7262 * utils.h (do_fputc_ftype): New typedef.
7263 (fputstrn_unfiltered): Add do_fputc parameter.
7265 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7267 * regformats/i386/i386-avx.dat: Remove.
7269 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7272 * amd64-tdep.c (amd64_none_init_abi): New function.
7273 (amd64_x32_none_init_abi): New function.
7274 (_initialize_amd64_tdep): Register handlers for x86-64 and
7275 x64_32 with GDB_OSABI_NONE.
7276 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7277 GDB_OSABI_NONE osabi.
7279 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7282 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7284 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7285 * osabi.c (gdb_osabi_names): Add "unknown" entry.
7287 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7289 * common/byte-vector.h (char_vector): New type.
7290 * target.h (target_read_alloc): Return
7291 gdb::optional<byte_vector>.
7292 (target_read_stralloc): Return gdb::optional<char_vector>.
7293 (target_get_osdata): Return gdb::optional<char_vector>.
7294 * target.c (target_read_alloc_1): Templatize. Replacement
7295 manual memory management with vector.
7296 (target_read_alloc): Change return type, adjust.
7297 (target_read_stralloc): Change return type, adjust.
7298 (target_get_osdata): Change return type, adjust.
7299 * auxv.c (struct auxv_info) <length>: Remove.
7300 <data>: Change type to gdb::optional<byte_vector>.
7301 (auxv_inferior_data_cleanup): Free auxv_info with delete.
7302 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7303 (target_auxv_search): Adjust.
7304 (fprint_target_auxv): Adjust.
7305 * avr-tdep.c (avr_io_reg_read_command): Adjust.
7306 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7307 (linux_make_corefile_notes): Adjust.
7308 * osdata.c (get_osdata): Adjust.
7309 * remote.c (remote_get_threads_with_qxfer): Adjust.
7310 (remote_memory_map): Adjust.
7311 (remote_traceframe_info): Adjust.
7312 (btrace_read_config): Adjust.
7313 (remote_read_btrace): Adjust.
7314 (remote_pid_to_exec_file): Adjust.
7315 * solib-aix.c (solib_aix_get_library_list): Adjust.
7316 * solib-dsbt.c (decode_loadmap): Don't free buf.
7317 (dsbt_get_initial_loadmaps): Adjust.
7318 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7319 * solib-target.c (solib_target_current_sos): Adjust.
7320 * tracepoint.c (sdata_make_value): Adjust.
7321 * xml-support.c (xinclude_start_include): Adjust.
7322 (xml_fetch_content_from_file): Adjust.
7323 * xml-support.h (xml_fetch_another): Change return type.
7324 (xml_fetch_content_from_file): Change return type.
7325 * xml-syscall.c (xml_init_syscalls_info): Adjust.
7326 * xml-tdesc.c (file_read_description_xml): Adjust.
7327 (fetch_available_features_from_target): Change return type.
7328 (target_fetch_description_xml): Adjust.
7329 (target_read_description_xml): Adjust.
7331 2018-04-06 Tom Tromey <tom@tromey.com>
7333 * value.c (~value): Update.
7334 (struct value) <contents>: Now unique_xmalloc_ptr.
7335 (value_contents_bits_eq, allocate_value_contents)
7336 (value_contents_raw, value_contents_all_raw)
7337 (value_contents_for_printing, value_contents_for_printing_const)
7338 (set_value_enclosing_type): Update.
7340 2018-04-06 Tom Tromey <tom@tromey.com>
7342 * value.c (range_s): Remove typedef, VEC.
7343 (struct range): Add operator<.
7344 (range_lessthan): Remove.
7345 (ranges_contain): Change type.
7347 (struct value) <unavailable, optimized_out>: Now std::vector.
7348 (value_entirely_available)
7349 (value_entirely_covered_by_range_vector)
7350 (value_entirely_unavailable, value_entirely_optimized_out):
7352 (insert_into_bit_range_vector): Change argument type.
7353 (find_first_range_overlap): Likewise.
7354 (struct ranges_and_idx, value_contents_bits_eq)
7355 (require_not_optimized_out, require_available): Update.
7356 (ranges_copy_adjusted): Change argument types.
7357 (value_optimized_out, value_copy, value_fetch_lazy): Update.
7359 2018-04-06 Tom Tromey <tom@tromey.com>
7361 * value.c (~value): Update.
7362 (struct value) <parent>: Now a value_ref_ptr.
7363 (value_parent, set_value_parent, value_address, value_copy):
7366 2018-04-06 Tom Tromey <tom@tromey.com>
7368 * value.c (struct value): Add constructor, destructor, and member
7370 (allocate_value_lazy, value_decref): Update.
7372 2018-04-06 Tom Tromey <tom@tromey.com>
7374 * value.c (struct value) <released, next>: Remove.
7375 (all_values): Now a std::vector.
7376 (allocate_value_lazy): Update.
7377 (value_next): Remove.
7378 (value_mark, value_free_to_mark, release_value)
7379 (value_release_to_mark): Update.
7381 2018-04-06 Tom Tromey <tom@tromey.com>
7383 * value.h (fetch_subexp_value, value_release_to_mark): Update.
7384 (free_value_chain): Remove.
7385 * value.c (free_value_chain): Remove.
7386 (value_release_to_mark): Return a std::vector.
7387 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7389 (check_condition): Update.
7390 * eval.c (fetch_subexp_value): Change "val_chain" to a
7392 * breakpoint.c (update_watchpoint): Update.
7393 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7395 2018-04-06 Tom Tromey <tom@tromey.com>
7397 * value.h (free_all_values): Remove.
7398 * value.c (free_all_values): Remove.
7400 2018-04-06 Tom Tromey <tom@tromey.com>
7402 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7403 (value_history_chain, value_history_count): Remove.
7404 (value_history): New global.
7405 (record_latest_value, access_value_history, show_values)
7406 (preserve_values): Update.
7408 2018-04-06 Tom Tromey <tom@tromey.com>
7410 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7411 * varobj.c (varobj_set_display_format, varobj_set_value)
7412 (install_default_visualizer, construct_visualizer)
7413 (install_new_value, ~varobj, varobj_get_value_type)
7414 (my_value_of_variable, varobj_editable_p): Update.
7415 * c-varobj.c (c_describe_child, c_value_of_variable)
7416 (cplus_number_of_children, cplus_describe_child): Update.
7417 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7418 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7419 (ada_value_of_variable, ada_value_is_changeable_p): Update.
7421 2018-04-06 Tom Tromey <tom@tromey.com>
7423 * printcmd.c (last_examine_address): Change type to
7425 (do_examine, x_command): Update.
7427 2018-04-06 Tom Tromey <tom@tromey.com>
7429 * value.c (release_value): Update.
7430 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7431 (struct bpstats) <val>: Now a value_ref_ptr.
7432 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7433 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7434 (~watchpoint, print_it_watchpoint, watch_command_1)
7435 (invalidate_bp_value_on_memory_change): Update.
7437 2018-04-06 Tom Tromey <tom@tromey.com>
7439 * varobj.c (varobj_clear_saved_item)
7440 (update_dynamic_varobj_children, install_new_value, ~varobj):
7442 * value.h (value_incref): Move declaration earlier.
7443 (value_decref): Rename from value_free.
7444 (struct value_ref_policy): New.
7445 (value_ref_ptr): New typedef.
7446 (struct value_deleter): Remove.
7447 (gdb_value_up): Remove typedef.
7448 (release_value): Change return type.
7449 (release_value_or_incref): Remove.
7450 * value.c (set_value_parent): Update.
7451 (value_incref): Change return type.
7452 (value_decref): Rename from value_free.
7453 (value_free_to_mark, free_all_values, free_value_chain): Update.
7454 (release_value): Return value_ref_ptr.
7455 (release_value_or_incref): Remove.
7456 (record_latest_value, set_internalvar, clear_internalvar):
7458 * stack.c (info_frame_command): Don't call value_free.
7459 * python/py-value.c (valpy_dealloc, valpy_new)
7460 (value_to_value_object): Update.
7461 * printcmd.c (do_examine): Update.
7462 * opencl-lang.c (lval_func_free_closure): Update.
7463 * mi/mi-main.c (register_changed_p): Don't call value_free.
7464 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7465 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7466 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7468 * guile/scm-value.c (vlscm_free_value_smob)
7469 (vlscm_scm_from_value): Update.
7470 * frame.c (frame_register_unwind, frame_unwind_register_signed)
7471 (frame_unwind_register_unsigned, get_frame_register_bytes)
7472 (put_frame_register_bytes): Don't call value_free.
7473 * findvar.c (address_from_register): Don't call value_free.
7474 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7475 * dwarf2loc.c (entry_data_value_free_closure)
7476 (value_of_dwarf_reg_entry, free_pieced_value_closure)
7477 (dwarf2_evaluate_loc_desc_full): Update.
7478 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7479 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7480 (~watchpoint, watch_command_1)
7481 (invalidate_bp_value_on_memory_change): Update.
7482 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7484 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
7487 * warning.m4: Add -Wno-error=deprecated-register.
7488 * configure: Re-generate.
7490 2018-04-05 Tom Tromey <tom@tromey.com>
7492 * linespec.h: Remove include of "vec.h".
7494 2018-04-05 Tom Tromey <tom@tromey.com>
7496 * linespec.c (typep): Remove typedef.
7497 (find_methods, find_superclass_methods): Take a std::vector.
7498 (find_method): Use std::vector.
7500 2018-04-05 Tom Tromey <tom@tromey.com>
7502 * utils.c (compare_strings): Remove.
7503 * utils.h (compare_strings): Remove.
7504 * objc-lang.h (find_imps): Update.
7505 * objc-lang.c (find_methods): Take a std::vector.
7506 (uniquify_strings, find_imps): Likewise.
7507 * linespec.c (find_methods): Take a std::vector.
7508 (decode_objc): Use std::vector.
7509 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7511 (find_method, find_function_symbols): Use std::vector.
7513 2018-04-05 Tom Tromey <tom@tromey.com>
7515 * completer.c (completion_tracker::completion_tracker): Remove
7517 (completion_tracker::discard_completions): Likewise.
7518 * breakpoint.c (ambiguous_names_p): Remove cast.
7519 * ada-lang.c (_initialize_ada_language): Remove cast.
7520 * utils.h (streq): Update.
7521 (streq_hash): Add new declaration.
7522 * utils.c (streq): Return bool.
7523 (streq_hash): New function.
7525 2018-04-05 Tom Tromey <tom@tromey.com>
7527 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7528 Remove a string copy.
7530 2018-04-05 Tom Tromey <tom@tromey.com>
7532 * linespec.c (filter_results): Use std::vector.
7533 (decode_line_2, decode_line_full): Update.
7535 2018-04-05 Tom Tromey <tom@tromey.com>
7537 * linespec.c (canonical_to_fullform): Return std::string.
7538 (filter_results): Update.
7539 (struct decode_line_2_item): Add constructor.
7540 <fullform, displayform>: Now std::string.
7541 (decode_line_2_compare_items): Now a std::sort comparator.
7542 (decode_line_2): Update.
7544 2018-04-05 Tom Tromey <tom@tromey.com>
7546 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7547 (unexpected_linespec_error): Update.
7548 (linespec_parse_basic, parse_linespec): Update.
7550 2018-04-05 Tom Tromey <tom@tromey.com>
7552 * linespec.c (linespec_parse_basic): Reindent.
7554 2018-04-05 Tom Tromey <tom@tromey.com>
7556 * minsyms.h (iterate_over_minimal_symbols): Update.
7557 * minsyms.c (iterate_over_minimal_symbols): Take a
7559 * linespec.c (struct collect_minsyms): Remove.
7560 (compare_msyms): Now a std::sort comparator.
7561 (add_minsym): Add parameters.
7562 (search_minsyms_for_name): Update. Use std::vector.
7564 2018-04-03 Tom Tromey <tom@tromey.com>
7566 * mipsread.c (read_alphacoff_dynamic_symtab): Use
7569 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7571 * MAINTAINERS (Write After Approval): Add Weimin Pan.
7573 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7576 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
7577 printing static type.
7579 2018-04-01 Tom Tromey <tom@tromey.com>
7581 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
7582 (rs6000_xfer_shared_libraries): Update.
7584 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
7586 * common/gdb_vecs.h (char_ptr): Remove.
7587 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
7589 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7591 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
7593 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
7595 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7597 * tracepoint.h (struct uploaded_tp): Initialize fields.
7598 <actions, step_actions, cmd_strings>: Change type to
7599 std::vector<char *>.
7600 * tracepoint.c (get_uploaded_tp): Allocate with new.
7601 (free_uploaded_tps): Free with delete.
7602 (parse_tracepoint_definition): Adjust to std::vector change.
7603 * breakpoint.c (read_uploaded_action): Likewise.
7604 (create_tracepoint_from_upload): Likewise.
7605 * ctf.c (ctf_write_uploaded_tp): Likewise.
7606 (SET_ARRAY_FIELD): Likewise.
7607 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
7609 2018-03-30 Tom Tromey <tom@tromey.com>
7611 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
7613 (svr4_keep_data_in_core): Update.
7614 (svr4_read_so_list): Update.
7616 2018-03-30 Tom Tromey <tom@tromey.com>
7618 * windows-nat.c (handle_output_debug_string, handle_exception):
7620 * target.h (target_read_string): Update.
7621 * target.c (target_read_string): Change "string" to
7623 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
7625 * solib-frv.c (frv_current_sos): Update.
7626 * solib-dsbt.c (dsbt_current_sos): Update.
7627 * solib-darwin.c (darwin_current_sos): Update.
7628 * linux-thread-db.c (inferior_has_bug): Update.
7629 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
7630 Update. Remove alloca.
7631 * ada-lang.c (ada_main_name): Update.
7633 2018-03-30 Tom Tromey <tom@tromey.com>
7635 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
7636 (struct dwo_file_deleter): New.
7637 (dwo_file_up): New typedef.
7638 (open_and_init_dwo_file): Use dwo_file_up.
7639 (free_dwo_file_cleanup): Remove.
7641 2018-03-30 Tom Tromey <tom@tromey.com>
7643 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
7644 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
7646 2018-03-30 Tom Tromey <tom@tromey.com>
7648 * dwarf2read.c (class free_cached_comp_units): New class.
7649 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
7650 (free_cached_comp_units): Remove function.
7652 2018-03-30 Tom Tromey <tom@tromey.com>
7654 * utils.h (make_cleanup_unpush_target): Remove.
7655 * inf-ptrace.c (struct target_unpusher): New.
7656 (target_unpush_up) New typedef.
7657 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
7659 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
7661 2018-03-27 Tom Tromey <tom@tromey.com>
7663 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
7665 2018-03-27 Pedro Alves <palves@redhat.com>
7666 Tom Tromey <tom@tromey.com>
7668 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
7669 destructor. Now a class.
7670 (gdb_readline_wrapper_cleanup): Remove function.
7671 (gdb_readline_wrapper): Remove cleanups.
7673 2018-03-27 Tom Tromey <tom@tromey.com>
7675 * typeprint.h (struct type_print_options) <local_typedefs,
7676 global_typedefs>: Remove "struct" keyword.
7677 (class typedef_hash_table): New class.
7678 (recursively_update_typedef_hash, add_template_parameters)
7679 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
7680 (find_typedef_in_hash): Don't declare.
7681 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
7682 (typedef_hash_table::recursively_update): Rename from
7683 recursively_update_typedef_hash. Now a member.
7684 (typedef_hash_table::add_template_parameters): Rename from
7685 add_template_parameters. Now a member.
7686 (typedef_hash_table::typedef_hash_table): Now a constructor;
7687 rename from create_typedef_hash.
7688 (typedef_hash_table::~typedef_hash_table): Now a destructor;
7689 rename from free_typedef_hash.
7690 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
7691 (do_free_global_table): Remove.
7692 (typedef_hash_table::typedef_hash_table): New constructor; renamed
7693 from copy_type_recursive.
7694 (create_global_typedef_table): Remove.
7695 (typedef_hash_table::find_global_typedef): Now a member of
7697 (typedef_hash_table::find_typedef): Rename from
7698 find_typedef_in_hash; now a member.
7699 (whatis_exp): Update.
7700 * extension.h (struct ext_lang_type_printers): Add constructor and
7702 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
7704 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
7705 Now a constructor; rename from start_ext_lang_type_printers.
7706 (ext_lang_type_printers): Now a destructor; rename from
7707 free_ext_lang_type_printers.
7708 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
7710 (c_type_print_base_struct_union): Update. Remove cleanups.
7712 2018-03-27 Tom Tromey <tom@tromey.com>
7714 * dwarf-index-write.c: Include <cmath>.
7716 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7718 * NEWS: Add entry describing new "set|show varsize-limit" command.
7719 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
7721 * printcmd.c (_initialize_printcmd): Add "set var" alias of
7724 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
7726 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
7728 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
7729 * dwarf-index-common.c: New file.
7730 * dwarf-index-common.h: New file.
7731 * dwarf-index-write.c: New file.
7732 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
7733 (struct dwarf2_section_info): Move from here.
7734 (dwarf2_section_info_def): Likewise.
7735 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
7736 (offset_type): Likewise.
7737 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
7738 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
7739 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
7740 (byte_swap): Likewise.
7741 (MAYBE_SWAP): Likewise.
7742 (dwarf2_per_cu_ptr): Likewise.
7743 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
7744 (struct tu_stats): Likewise.
7745 (struct dwarf2_per_objfile): Likewise.
7746 (struct dwarf2_per_cu_data): Likewise.
7747 (struct signatured_type): Likewise.
7748 (sig_type_ptr): Likewise.
7749 (DEF_VEC_P (sig_type_ptr)): Likewise.
7750 (INDEX4_SUFFIX): Likewise.
7751 (INDEX5_SUFFIX): Likewise.
7752 (DEBUG_STR_SUFFIX): Likewise.
7753 (dwarf2_read_section): Make non-static.
7754 (mapped_index_string_hash): Move from here.
7755 (dwarf5_djb_hash): Likewise.
7756 (file_write): Likewise.
7757 (class data_buf): Likewise.
7758 (struct symtab_index_entry): Likewise.
7759 (struct mapped_symtab): Likewise.
7760 (find_slot): Likewise.
7761 (hash_expand): Likewise.
7762 (add_index_entry): Likewise.
7763 (uniquify_cu_indices): Likewise.
7764 (class c_str_view): Likewise.
7765 (class c_str_view_hasher): Likewise.
7766 (class vector_hasher): Likewise.
7767 (write_hash_table): Likewise.
7768 (psym_index_map): Likewise.
7769 (struct addrmap_index_data): Likewise.
7770 (add_address_entry): Likewise.
7771 (add_address_entry_worker): Likewise.
7772 (write_address_map): Likewise.
7773 (symbol_kind): Likewise.
7774 (write_psymbols): Likewise.
7775 (struct signatured_type_index_data): Likewise.
7776 (write_one_signatured_type): Likewise.
7777 (recursively_count_psymbols): Likewise.
7778 (recursively_write_psymbols): Likewise.
7779 (class debug_names): Likewise.
7780 (check_dwarf64_offsets): Likewise.
7781 (psyms_seen_size): Likewise.
7782 (write_gdbindex): Likewise.
7783 (write_debug_names): Likewise.
7784 (assert_file_size): Likewise.
7785 (write_psymtabs_to_index): Likewise.
7786 (save_gdb_index_command): Likewise.
7787 (_initialize_dwarf2_read): Don't register the "save gdb-index"
7789 * dwarf2read.h: New file.
7791 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7794 * dwarf2read.c (dwarf2_physname): Do not return the demangled
7795 symbol name if the CU's language stores symbol names in linkage
7797 * language.h (struct language_defn)
7798 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
7799 all instances of this struct.
7801 2018-03-26 Tom Tromey <tom@tromey.com>
7803 * stack.c (backtrace_command_1): Remove verbose code.
7805 2018-03-26 Tom Tromey <tom@tromey.com>
7807 * python/py-framefilter.c (py_print_type): Don't catch
7808 exceptions. Return void.
7809 (py_print_value): Likewise.
7810 (py_print_single_arg): Likewise.
7811 (enumerate_args): Don't catch exceptions.
7812 (py_print_args): Likewise.
7813 (py_print_frame): Likewise.
7814 (gdbpy_apply_frame_filter): Catch exceptions here.
7816 2018-03-26 Tom Tromey <tom@tromey.com>
7818 * stack.c (_initialize_stack): Remove trailing newlines from help
7819 text. Add "Usage" line to "backtrace" help.
7821 2018-03-26 Tom Tromey <tom@tromey.com>
7824 * python/py-framefilter.c (py_print_args): Call wrap_hint.
7826 2018-03-26 Tom Tromey <tom@tromey.com>
7828 * python/py-framefilter.c (py_print_single_arg): Return
7829 EXT_LANG_BT_ERROR from catch.
7831 2018-03-26 Tom Tromey <tom@tromey.com>
7834 * stack.c (backtrace_command_1): Move some code into no-filters
7837 2018-03-26 Tom Tromey <tom@tromey.com>
7839 * python/py-framefilter.c (throw_quit_or_print_exception): New
7841 (gdbpy_apply_frame_filter): Use it.
7843 2018-03-26 Tom Tromey <tom@tromey.com>
7846 * python/py-framefilter.c (py_print_type, py_print_value)
7847 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
7850 2018-03-26 Tom Tromey <tom@tromey.com>
7852 * python/py-framefilter.c (enumerate_args): Use
7853 gdb::unique_xmalloc_ptr.
7855 2018-03-26 Tom Tromey <tom@tromey.com>
7857 * python/py-framefilter.c (py_print_frame): Return
7859 (gdbpy_apply_frame_filter): Update comment.
7860 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
7862 <EXT_LANG_BT_NO_FILTERS>: Change value.
7864 2018-03-26 Tom Tromey <tom@tromey.com>
7867 * stack.c (backtrace_command): Parse "hide" argument.
7868 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
7869 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
7872 2018-03-26 Tom Tromey <tom@tromey.com>
7874 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
7876 (backtrace_command): Remove "fulltrace", add "flags".
7878 2018-03-26 Tom Tromey <tom@tromey.com>
7880 * stack.c (backtrace_command): Rewrite command line parsing.
7882 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7884 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
7886 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7888 * filename-seen-cache.h: Add include guard.
7890 2018-03-26 Keith Seitz <keiths@redhat.com>
7892 * symfile.c (place_section): Remove "struct" from section_addr_info
7894 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
7895 "struct" keyword from section_addr_info.
7897 2018-03-26 Alan Hayward <alan.hayward@arm.com>
7899 * regformats/regdef.h (reg): Add constructors.
7901 2018-03-25 Pedro Alves <palves@redhat.com>
7903 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
7904 if then/else bodies in var_func_name extraction.
7906 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
7908 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
7909 lookup_minimal_symbol() to find symbol entry.
7910 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
7912 2018-03-23 Keith Seitz <keiths@redhat.com>
7915 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
7916 nested type definitions for C++, too.
7918 2018-03-23 Tom Tromey <tom@tromey.com>
7920 * machoread.c (struct oso_el): Add a constructor. Don't define as
7922 (macho_register_oso): Remove.
7923 (macho_symtab_read): Take a std::vector.
7924 (oso_el_compare_name): Now a std::sort comparator.
7925 (macho_symfile_read_all_oso): Take a std::vector.
7926 (macho_symfile_read): Use std::vector. Remove cleanups.
7928 2018-03-22 Tom Tromey <tom@tromey.com>
7930 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
7931 (record_full_goto_bookmark): Use std::string.
7933 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7936 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
7939 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7941 * rs6000-tdep.c (store_insn_p): New function.
7942 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
7943 and cr_reg to their unshifted values. Use store_insn_p to
7944 match LR saves using either R1 or fdata->alloca_reg. Use
7945 store_insn_p to match CR saves. Set alloca_reg_offset
7946 when alloca_reg and framep are set. Remove lr_reg shift
7947 when assigning to fdata->lr_register.
7949 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
7951 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
7952 command line args instead of emitting a warning.
7954 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7956 * tracepoint.h (struct static_tracepoint_marker): Initialize
7957 fields, define default constructor, move constructor and move
7958 assignment, disable the rest.
7959 <str_id, extra>: Make std::string.
7960 (release_static_tracepoint_marker): Remove.
7961 (free_current_marker): Remove.
7962 * tracepoint.c (free_current_marker): Remove.
7963 (parse_static_tracepoint_marker_definition): Adjust to
7964 std::string, use new hex2str overload.
7965 (release_static_tracepoint_marker): Remove.
7966 (print_one_static_tracepoint_marker): Get marker by reference
7967 and adjust to std::string.
7968 (info_static_tracepoint_markers_command): Adjust to std::vector
7970 * target.h (static_tracepoint_marker_p): Remove typedef.
7971 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
7972 (struct target_ops) <to_static_tracepoint_marker_at>: Return
7974 <to_static_tracepoint_markers_by_strid>: Return std::vector.
7976 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
7977 (target_debug_print_std_vector_static_tracepoint_marker): New.
7978 (target_debug_print_struct_static_tracepoint_marker_p): Rename
7980 (target_debug_print_static_tracepoint_marker_p): ... this.
7981 * target-delegates.c: Re-generate.
7982 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
7984 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
7985 (decode_static_tracepoint_spec): Adjust to std::vector.
7986 (tracepoint_print_one_detail): Adjust to std::string.
7987 (strace_marker_decode_location): Adjust to std::string.
7988 (update_static_tracepoint): Adjust to std::string, remove call
7989 to release_static_tracepoint_marker.
7990 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
7991 Adjust to std::vector.
7992 * remote.c (remote_static_tracepoint_marker_at): Return bool.
7993 (remote_static_tracepoint_markers_by_strid): Adjust to
7995 * common/rsp-low.h (hex2str): New overload with explicit count
7997 * common/rsp-low.c (hex2str): New overload with explicit count
7999 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8000 (_initialize_rsp_low_selftests): Add test_hex2str test.
8001 * unittests/tracepoint-selftests.c
8002 (test_parse_static_tracepoint_marker_definition): Adjust to
8005 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8007 * tracepoint.c (parse_static_tracepoint_marker_definition):
8008 Consider case where the definition is followed by more
8010 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8011 tracepoint-selftests.c.
8012 * unittests/tracepoint-selftests.c: New.
8014 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8016 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8019 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8021 * symtab.c (find_pc_sect_line): fixed indentation.
8023 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8025 * symtab.c (find_pc_sect_line): now uses binary search.
8027 2018-03-19 Tom Tromey <tom@tromey.com>
8029 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8032 2018-03-19 Pedro Alves <palves@redhat.com>
8033 Tom Tromey <tom@tromey.com>
8035 * unittests/observable-selftests.c: New file.
8036 * common/observable.h: New file.
8037 * observable.h: New file.
8038 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8039 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8040 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8041 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8042 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8043 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8044 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8045 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8046 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8047 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8048 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8049 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8050 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8051 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8052 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8053 tui/tui-interp.c, valops.c: Update all users.
8054 * tui/tui-hooks.c (tui_bp_created_observer)
8055 (tui_bp_deleted_observer, tui_bp_modified_observer)
8056 (tui_inferior_exit_observer, tui_before_prompt_observer)
8057 (tui_normal_stop_observer, tui_register_changed_observer):
8059 (tui_observers_token): New global.
8060 (attach_or_detach, tui_attach_detach_observers): New functions.
8061 (tui_install_hooks, tui_remove_hooks): Use
8062 tui_attach_detach_observers.
8063 * record-btrace.c (record_btrace_thread_observer): Remove.
8064 (record_btrace_thread_observer_token): New global.
8065 * observer.sh: Remove.
8066 * observer.c: Rename to observable.c.
8067 * observable.c (namespace gdb_observers): Define new objects.
8068 (observer_debug): Move into gdb_observers namespace.
8069 (struct observer, struct observer_list, xalloc_observer_list_node)
8070 (xfree_observer_list_node, generic_observer_attach)
8071 (generic_observer_detach, generic_observer_notify): Remove.
8072 (_initialize_observer): Update.
8073 Don't include observer.inc.
8074 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8075 (clean mostlyclean): Likewise.
8076 (observer.h, observer.inc): Remove targets.
8077 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8078 (COMMON_SFILES): Use observable.c, not observer.c.
8079 * .gitignore: Remove observer.h.
8081 2018-03-18 Tom Tromey <tom@tromey.com>
8083 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8085 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8087 2018-03-17 Tom Tromey <tom@tromey.com>
8089 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8091 2018-03-17 Tom Tromey <tom@tromey.com>
8093 * target.c (class scoped_target_fd): New.
8094 (target_fileio_close_cleanup): Remove.
8095 (target_fileio_read_alloc_1): Use scoped_target_fd.
8097 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8099 * silent-rules.mk: New.
8100 * Makefile.in: Include silent-rules.mk
8101 (srcdir, VPATH, top_srcdir): Move up.
8102 (COMPILE): Add ECHO_CXX.
8103 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8104 (init.c): Add ECHO_INIT_C.
8105 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8106 (version.c): Add ECHO_GEN.
8107 (printcmd.o): Add ECHO_CXX.
8108 (target-float.o): Add ECHO_CXX.
8109 (ada-exp.o): Add ECHO_CXX.
8110 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8111 (insight$(EXEEXT)): Add ECHO_CXXLD.
8112 * gnulib/configure.ac: Add AM_SILENT_RULES.
8113 * gnulib/aclocal.m4: Re-generate.
8114 * gnulib/configure: Re-generate.
8115 * gnulib/import/Makefile.in: Re-generate.
8117 2018-03-16 Tom Tromey <tom@tromey.com>
8119 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8120 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8121 * utils.c (do_free_section_addr_info)
8122 (make_cleanup_free_section_addr_info): Remove.
8123 * symfile.h (struct other_sections): Add constructor.
8124 (struct section_addr_info): Remove.
8125 (section_addr_info): New typedef.
8126 (struct sym_fns) <sym_offsets>: Change type of parameter.
8127 (build_section_addr_info_from_objfile)
8128 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8129 (default_symfile_offsets, symbol_file_add)
8130 (symbol_file_add_from_bfd)
8131 (build_section_addr_info_from_section_table): Update.
8132 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8133 * symfile.c (alloc_section_addr_info): Remove.
8134 (build_section_addr_info_from_section_table): Change return type.
8136 (build_section_addr_info_from_bfd)
8137 (build_section_addr_info_from_objfile): Likewise.
8138 (free_section_addr_info): Remove.
8139 (relative_addr_info_to_section_offsets): Change type of "addrs".
8140 (addrs_section_compar): Now a std::sort comparator.
8141 (addrs_section_sort): Change return type.
8142 (addr_info_make_relative): Change type of "addrs". Update.
8143 (default_symfile_offsets, syms_from_objfile_1)
8144 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8145 (symbol_file_add_separate): Update.
8146 (symbol_file_add): Change type of "addrs". Update.
8147 (add_symbol_file_command): Update. Remove cleanups.
8148 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8150 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8151 * solib.c (solib_read_symbols): Update.
8152 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8153 * machoread.c (macho_symfile_offsets): Update.
8154 * jit.c (jit_bfd_try_read_symtab): Update.
8156 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8158 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8159 unittests/utils-selftests.c.
8160 * unittests/utils-selftests.c: New file.
8162 2018-03-14 Tom Tromey <tom@tromey.com>
8165 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8168 2018-03-14 Tom Tromey <tom@tromey.com>
8171 * printcmd.c (printf_pointer): Allow "-" in format.
8173 2018-03-14 Tom Tromey <tom@tromey.com>
8175 * printcmd.c (_initialize_printcmd): Add usage to printf.
8177 2018-03-14 Yao Qi <qiyao@sourceware.org>
8179 * MAINTAINERS: Update my email address.
8181 2018-03-13 Tom Tromey <tom@tromey.com>
8183 * machoread.c (macho_check_dsym): Change filenamep to a
8185 (macho_symfile_read): Update.
8186 * symfile.c (load_command): Use std::string.
8188 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
8190 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8191 to error message string.
8192 (riscv_register_name): Use xsnprintf instead of sprintf.
8193 (riscv_insn::fetch_instruction): Use gdb_assert instead of
8195 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8197 (riscv_push_dummy_call): Likewise.
8199 2018-03-12 Tom Tromey <tom@tromey.com>
8201 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8202 Use gdb::byte_vector.
8203 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8205 2018-03-12 Yao Qi <yao.qi@linaro.org>
8207 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8208 parameter type to readable_regcache.
8209 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8212 2018-03-11 Tom Tromey <tom@tromey.com>
8214 * dwarf2read.c (struct nextfield): Add initializers.
8215 (struct nextfnfield): Remove.
8216 (struct fnfieldlist): Add initializers. Remove "length" and
8217 "head", use std::vector.
8218 (struct decl_field_list): Remove.
8219 (struct field_info): Add initializers.
8220 <fields, baseclasses>: Now std::vector.
8221 <nbaseclasses, nfnfields, typedef_field_list_count,
8222 nested_types_list_count>: Remove.
8223 (dwarf2_add_field, dwarf2_add_type_defn)
8224 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8225 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8226 (process_structure_scope): Update.
8228 2018-03-11 Tom Tromey <tom@tromey.com>
8230 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8231 for use by std::sort.
8232 (build_type_psymtabs_1): Use std::vector.
8234 2018-03-09 Eli Zaretskii <eliz@gnu.org>
8236 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8237 and LIBMPFR in the printed configuration.
8239 2018-03-08 Tom Tromey <tom@tromey.com>
8241 * source.c (get_filename_and_charpos): Use scoped_fd.
8242 * nto-procfs.c (procfs_open_1): Use scoped_fd.
8243 (procfs_pidlist): Likewise.
8244 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8245 (iterate_over_mappings): Likewise.
8247 2018-03-08 Tom Tromey <tom@tromey.com>
8249 * infcall.c (struct call_return_meta_info)
8250 <stack_temporaries_enabled>: Remove.
8251 (get_call_return_value, call_function_by_hand_dummy): Update.
8252 * thread.c (disable_thread_stack_temporaries): Remove.
8253 (enable_thread_stack_temporaries): Remove.
8254 (thread_stack_temporaries_enabled_p): Return bool.
8255 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8256 (get_last_thread_stack_temporary): Update.
8257 * eval.c (evaluate_subexp): Update.
8258 * gdbthread.h (class enable_thread_stack_temporaries): Now a
8259 class, not a function.
8260 (value_ptr, value_vec): Remove typedefs.
8261 (class thread_info) <stack_temporaries_enabled>: Now bool.
8262 <stack_temporaries>: Now a std::vector.
8263 (thread_stack_temporaries_enabled_p)
8264 (value_in_thread_stack_temporaries): Return bool.
8266 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
8268 * remote.c (putpkt_binary): Fix omitted bytes reporting.
8269 (getpkt_or_notif_sane_1): Likewise.
8271 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8273 * build-id.c (build_id_to_debug_bfd): Use std::string.
8275 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8277 * build-id.c (find_separate_debug_file_by_buildid): Return
8279 * build-id.h (find_separate_debug_file_by_buildid): Return
8281 * coffread.c (coff_symfile_read): Adjust to std::string.
8282 * elfread.c (elf_symfile_read): Adjust to std::string.
8283 * symfile.c (separate_debug_file_exists): Change parameter to
8285 (find_separate_debug_file): Return std::string.
8286 (find_separate_debug_file_by_debuglink): Return std::string.
8287 * symfile.h (find_separate_debug_file_by_debuglink): Return
8290 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8292 * common/xml-utils.c (xml_escape_text): Move code to...
8293 (xml_escape_text_append): ... this new function.
8294 * common/xml-utils.h (xml_escape_text_append): New declaration.
8295 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8297 (_initialize_xml_utils): register test_xml_escape_text_append as
8300 2018-03-07 Alan Hayward <alan.hayward@arm.com>
8302 * defs.h: Remove MAX_REGISTER_SIZE.
8303 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8305 * python/py-unwind.c (pyuw_sniffer): Likewise.
8307 2018-03-07 Tom Tromey <tom@tromey.com>
8309 * linux-tdep.c (linux_info_proc): Update.
8310 * target.h (struct target_ops) <to_fileio_readlink>: Return
8312 (target_fileio_readlink): Return optional<string>.
8313 * remote.c (remote_hostio_readlink): Return optional<string>.
8314 * inf-child.c (inf_child_fileio_readlink): Return
8316 * target.c (target_fileio_readlink): Return optional<string>.
8318 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
8320 * regcache.c (cooked_read_test): Add riscv to the list of
8321 architectures that have a save_reggroup.
8323 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
8325 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8326 value is not a dynamic class object.
8328 2018-03-06 Tom Tromey <tom@tromey.com>
8330 * rust-exp.y: Formatting fixes.
8332 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8334 * riscv-tdep.c (riscv_register_name): Remove target description
8336 (riscv_gdbarch_init): Remove target description check.
8338 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8340 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8342 * riscv-tdep.h: Likewise.
8344 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8346 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8347 (riscv_pseudo_register_write): Delete.
8348 (riscv_gdbarch_init): Remove all use of pseudo registers.
8350 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8352 * record-btrace.c (btrace_print_lines): Replace cleanup
8353 parameter with RAII equivalents.
8354 (btrace_insn_history): Replace cleanup with RAII equivalents.
8355 * ui-out.h (make_cleanup_ui_out_list_begin_end,
8356 make_cleanup_ui_out_tuple_begin_end): Remove.
8357 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8358 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8359 make_cleanup_ui_out_list_begin_end): Remove.
8361 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8363 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8364 parameter types to std::vector. Use bool.
8365 (record_btrace_wait): Replace VEC(tp_t) with
8366 std::vector<thread_info *>.
8367 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8369 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8371 * record-btrace.c (record_btrace_disable_callback): Remove.
8372 (struct scoped_btrace_disable): New.
8373 (record_btrace_open): Use scoped_btrace_disable.
8375 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8377 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8378 reading values from registers.
8380 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8382 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8385 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8387 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8388 change parameter type. Use GDB's print functions, and use
8389 core_addr_to_string where appropriate.
8390 (riscv_push_dummy_call): Use core_addr_to_string where
8391 appropriate, update call to riscv_print_arg_location, and reindent
8393 (riscv_return_value): Update call to riscv_print_arg_location.
8395 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8396 Tim Newsome <tim@sifive.com>
8397 Albert Ou <a0u@eecs.berkeley.edu>
8398 Darius Rad <darius@bluespec.com>
8400 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8401 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8402 (ALLDEPFILES): Add riscv-tdep.c
8403 * configure.tgt: Add riscv support.
8404 * riscv-tdep.c: New file.
8405 * riscv-tdep.h: New file.
8406 * NEWS: Mention new target.
8407 * MAINTAINERS: Add entry for riscv.
8409 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8411 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8412 fields within aggregates.
8414 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
8416 * record-btrace.c (btrace_print_lines): Change type of flags to
8417 gdb_disassembly_flags.
8419 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8421 * fbsd-nat.c: Include "inf-ptrace.h".
8422 (USE_SIGTRAP_SIGINFO): Conditionally define.
8423 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8424 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8425 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8427 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8429 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8431 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8432 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8433 "supports_stopped_by_hw_breakpoint" target methods.
8435 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8437 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8438 * fbsd-nat.c (debug_fbsd_nat): New variable.
8439 (show_fbsd_nat_debug): New function.
8440 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8441 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8443 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8445 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8446 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8448 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8449 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8452 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8454 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8455 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8457 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8459 * charset.c (struct charset_vector): New.
8460 (charsets): Change type to charset_vector.
8461 (find_charset_names): Adjust.
8463 (_initialize_charset): Adjust.
8465 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8467 * progspace.h (struct program_space) <deleted_solibs>: Change
8468 type to std::vector<std::string>.
8469 * progspace.c (clear_program_space_solib_cache): Adjust.
8470 * breakpoint.c (print_solib_event): Adjust.
8471 (check_status_catch_solib): Adjust.
8472 * solib.c (update_solib_list): Adjust.
8473 * ui-out.h (class ui_out) <field_string>: New overload.
8474 * ui-out.c (ui_out::field_string): New overload.
8476 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8478 * progspace.h (struct program_space): Add constructor and
8479 destructor, initialize fields.
8480 (add_program_space): Remove.
8481 * progspace.c (add_program_space): Rename to...
8482 (program_space::program_space): ... this.
8483 (release_program_space): Rename to...
8484 (program_space::~program_space): ... this.
8485 (delete_program_space): Use delete to delete program_space.
8486 (initialize_progspace): Use new to allocate program_space.
8487 * inferior.c (add_inferior_with_spaces): Likewise.
8488 (clone_inferior_command): Likewise.
8489 * infrun.c (follow_fork_inferior): Likewise.
8490 (handle_vfork_child_exec_or_exit): Likewise.
8492 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8494 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8495 (delim_string_to_char_ptr_vec): Return std::vector of
8496 gdb::unique_xmalloc_ptr.
8497 (dirnames_to_char_ptr_vec_append): Take std::vector of
8498 gdb::unique_xmalloc_ptr.
8499 (dirnames_to_char_ptr_vec): Return std::vector of
8500 gdb::unique_xmalloc_ptr.
8501 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8502 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8503 (delim_string_to_char_ptr_vec): Return an std::vector of
8504 gdb::unique_xmalloc_ptr, adjust the code.
8505 (dirnames_to_char_ptr_vec_append): Take an std::vector of
8506 gdb::unique_xmalloc_ptr, adjust the code.
8507 (dirnames_to_char_ptr_vec): Return an std::vector of
8508 gdb::unique_xmalloc_ptr, adjust the code.
8509 * auto-load.c (auto_load_safe_path_vec): Change type to
8510 std::vector of gdb::unique_xmalloc_ptr.
8511 (auto_load_expand_dir_vars): Return an std::vector of
8512 gdb::unique_xmalloc_ptr, adjust the code.
8513 (auto_load_safe_path_vec_update): Adjust.
8514 (filename_is_in_auto_load_safe_path_vec): Adjust.
8515 (auto_load_objfile_script_1): Adjust.
8516 * build-id.c (build_id_to_debug_bfd): Adjust.
8517 * linux-thread-db.c (thread_db_load_search): Adjust.
8518 * source.c (add_path): Adjust.
8520 * symfile.c (find_separate_debug_file): Adjust.
8521 * utils.c (do_free_char_ptr_vec): Remove.
8522 (make_cleanup_free_char_ptr_vec): Remove.
8524 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
8527 * common/pathstuff.c: Conditionally include "<windows.h>".
8529 2018-03-01 Georg Sauthoff <mail@georg.so>
8532 * gcore.in: Quote variables and switch interpreter to bash.
8534 2018-03-01 Tom Tromey <tom@tromey.com>
8536 * dwarf2read.c (alloc_discriminant_info): Fix default_index
8537 assertion. Add assertion for discriminant_index.
8538 (quirk_rust_enum): Use correct base type name in univariant case.
8540 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
8542 * record.c (get_call_history_modifiers): Return a
8544 (cmd_record_call_history): Adjust.
8545 * record-btrace.c (record_btrace_call_history): Adjust.
8546 (record_btrace_call_history_range): Adjust.
8547 (record_btrace_call_history_from): Adjust.
8548 * target-debug.h (target_debug_print_record_print_flags): New.
8549 * target-delegates.c: Re-generate.
8550 * target.c (target_call_history): Change flags type.
8551 (target_call_history_from): Likewise.
8552 (target_call_history_range): Likewise.
8553 * target.h (struct target_ops) <target_call_history>: Likewise.
8554 (target_call_history_from): Likewise.
8555 (target_call_history_range): Likewise.
8557 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8558 Simon Marchi <simon.marchi@polymtl.ca>
8560 * common/common-utils.c: Include "sys/stat.h".
8561 (is_regular_file): Move here from "source.c"; change return
8563 * common/common-utils.h (is_regular_file): New prototype.
8564 * common/pathstuff.c (contains_dir_separator): New function.
8565 * common/pathstuff.h (contains_dir_separator): New prototype.
8566 * source.c: Don't include "sys/stat.h".
8567 (is_regular_file): Move to "common/common-utils.c".
8569 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8571 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
8572 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
8573 * auto-load.c: Include "common/pathstuff.h".
8574 * common/common-def.h (current_directory): Move here.
8575 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
8577 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
8579 * common/pathstuff.c: New file.
8580 * common/pathstuff.h: New file.
8581 * compile/compile.c: Include "common/pathstuff.h".
8582 * defs.h (current_directory): Move to "common/common-defs.h".
8583 * dwarf2read.c: Include "common/pathstuff.h".
8585 * guile/scm-safe-call.c: Likewise.
8586 * linux-thread-db.c: Likewise.
8588 * nto-tdep.c: Likewise.
8589 * objfiles.c: Likewise.
8590 * source.c: Likewise.
8591 * symtab.c: Likewise.
8592 * utils.c: Include "common/pathstuff.h".
8593 (gdb_realpath): Move to "common/pathstuff.c".
8594 (gdb_realpath_keepfile): Likewise.
8595 (gdb_abspath): Likewise.
8596 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
8597 (gdb_realpath_keepfile): Likewise.
8598 (gdb_abspath): Likewise.
8600 2018-02-28 John Baldwin <jhb@FreeBSD.org>
8602 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
8603 wildcard process pid for super_resume for kernels with a
8606 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
8608 * compile/compile.c (get_args): Add additional comments
8609 explaining function.
8611 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
8612 Tom Tromey <tom@tromey.com>
8614 * target.h (memory_write_request_s): Remove typedef. Don't define
8616 (target_write_memory_blocks): Change argument to std::vector.
8617 (struct memory_write_request): Add constructor.
8618 * target-memory.c (compare_block_starting_address): Return bool.
8619 Change argument types.
8620 (claim_memory): Change arguments to use std::vector.
8621 (split_regular_and_flash_blocks, blocks_to_erase)
8622 (compute_garbled_blocks): Likewise.
8623 (cleanup_request_data, cleanup_write_requests_vector): Remove.
8624 (target_write_memory_blocks): Change argument to std::vector.
8625 * symfile.c (struct load_section_data): Add constructor and
8626 destructor. Use std::vector for "requests".
8627 (struct load_progress_data): Add initializers.
8628 (load_section_callback): Update. Use "new".
8629 (clear_memory_write_data): Remove.
8630 (generic_load): Update.
8632 2018-02-27 Alan Hayward <alan.hayward@arm.com>
8634 * arch/aarch64.h: Use common/tdesc.h.
8636 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8638 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
8639 architecture with a 64-bit ABI.
8641 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8643 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
8644 ahead of target description loading.
8646 2018-02-26 Tom Tromey <tom@tromey.com>
8648 * stack.c (backtrace_command_1): Update.
8649 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
8651 * python/py-framefilter.c (py_print_frame)
8652 (gdbpy_apply_frame_filter): Change type of "flags".
8653 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
8655 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
8656 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
8657 * extension.h (enum frame_filter_flag): Rename from
8659 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
8660 (apply_ext_lang_frame_filter): Change type of "flags".
8661 * extension.c (apply_ext_lang_frame_filter): Change type of
8663 * extension-priv.h (struct extension_language_ops)
8664 <apply_frame_filter>: Change type of "flags".
8666 2018-02-26 Tom Tromey <tom@tromey.com>
8669 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
8670 off-by-one in py_end computation.
8671 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
8673 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
8676 2018-02-26 Tom Tromey <tom@tromey.com>
8678 * dwarf2read.c (struct variant_field): New.
8679 (struct nextfield) <variant>: New field.
8680 (dwarf2_add_field): Handle DW_TAG_variant_part.
8681 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
8682 discriminated union.
8683 (read_structure_type): Handle DW_TAG_variant_part.
8684 (handle_struct_member_die): New function, extracted from
8685 process_structure_scope. Handle DW_TAG_variant.
8686 (process_structure_scope): Handle discriminated unions. Call
8687 handle_struct_member_die.
8689 2018-02-26 Tom Tromey <tom@tromey.com>
8691 * rust-lang.h (rust_last_path_segment): Declare.
8692 * rust-lang.c (rust_last_path_segment): Now public. Change
8694 (struct disr_info): Remove.
8695 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
8696 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
8697 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
8698 (rust_enum_p, rust_enum_variant): New function.
8699 (rust_underscore_fields): Remove "offset" parameter.
8700 (rust_print_enum): New function.
8701 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
8702 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
8703 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
8705 (rust_internal_print_type): New function, from rust_print_type.
8707 (rust_print_type): Call rust_internal_print_type.
8708 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
8709 Update enum handling.
8710 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
8711 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
8712 (rust_union_quirks): New functions.
8713 (process_full_comp_unit, process_full_type_unit): Call
8715 (process_structure_scope): Update rust_unions if necessary.
8717 2018-02-26 Tom Tromey <tom@tromey.com>
8719 * value.h (value_union_variant): Declare.
8720 * valops.c (value_union_variant): New function.
8721 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
8722 (struct discriminant_info): New.
8723 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
8725 (struct main_type) <flag_discriminated_union>: New field.
8727 2018-02-26 Tom Tromey <tom@tromey.com>
8729 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8730 unittests/unpack-selftests.c.
8731 * unittests/unpack-selftests.c: New file.
8732 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
8734 2018-02-26 Yao Qi <yao.qi@linaro.org>
8736 * dwarf2read.c (struct partial_die_info) <read>: New method.
8737 (read_partial_die): Remove the declaration.
8738 (load_partial_dies): Update.
8739 (partial_die_info::partial_die_info):
8740 (read_partial_die): Change it to partial_die_info::read.
8742 2018-02-26 Yao Qi <yao.qi@linaro.org>
8744 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
8745 (fixup_partial_die): Remove declaration.
8746 (scan_partial_symbols): Update.
8747 (partial_die_parent_scope): Likewise.
8748 (partial_die_full_name): Likewise.
8749 (fixup_partial_die): Change it to partial_die_info::fixup.
8751 2018-02-26 Yao Qi <yao.qi@linaro.org>
8753 * dwarf2read.c (read_partial_die): Update the declaration.
8754 (load_partial_dies): Caller update.
8755 (read_partial_die): Remove one argument abbrev_len.
8757 2018-02-26 Yao Qi <yao.qi@linaro.org>
8759 * dwarf2read.c (struct partial_die_info): Add ctor, delete
8760 assignment operator.
8761 (load_partial_dies): Use ctor and copy ctor.
8762 (read_partial_die): Update.
8763 (dwarf2_cu::find_partial_die): Use ctor.
8765 2018-02-26 Yao Qi <yao.qi@linaro.org>
8767 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
8768 (find_partial_die_in_comp_unit): Change it to
8769 dwarf2_cu::find_partial_die.
8770 (find_partial_die): Update.
8772 2018-02-26 Yao Qi <yao.qi@linaro.org>
8774 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
8777 2018-02-26 Yao Qi <yao.qi@linaro.org>
8779 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
8781 2018-02-26 Alan Hayward <alan.hayward@arm.com>
8783 * arch/amd64.h: Use common/tdesc.h.
8784 * arch/i386.c: Likewise.
8785 * arch/i386.h: Likewise.
8786 * arch/tic6x.c: Likewise.
8787 * arch/tdesc.h: Move file from here...
8788 * common/tdesc.h: ...to here.
8789 * features/aarch64-core.c: Regenerate.
8790 * features/aarch64-fpu.c: Regenerate.
8791 * features/i386/32bit-avx.c: Regenerate.
8792 * features/i386/32bit-avx512.c: Regenerate.
8793 * features/i386/32bit-core.c: Regenerate.
8794 * features/i386/32bit-linux.c: Regenerate.
8795 * features/i386/32bit-mpx.c: Regenerate.
8796 * features/i386/32bit-pkeys.c: Regenerate.
8797 * features/i386/32bit-sse.c: Regenerate.
8798 * features/i386/64bit-avx.c: Regenerate.
8799 * features/i386/64bit-avx512.c: Regenerate.
8800 * features/i386/64bit-core.c: Regenerate.
8801 * features/i386/64bit-linux.c: Regenerate.
8802 * features/i386/64bit-mpx.c: Regenerate.
8803 * features/i386/64bit-pkeys.c: Regenerate.
8804 * features/i386/64bit-segments.c: Regenerate.
8805 * features/i386/64bit-sse.c: Regenerate.
8806 * features/i386/x32-core.c: Regenerate.
8807 * features/tic6x-c6xp.c: Regenerate.
8808 * features/tic6x-core.c: Regenerate.
8809 * features/tic6x-gp.c: Regenerate.
8810 * target-descriptions.c: Use common/tdesc.h.
8811 * target-descriptions.h: Likewise.
8813 2018-02-24 Tom Tromey <tom@tromey.com>
8815 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
8816 (try_thread_db_load_from_dir, thread_db_load_search): Use
8818 (info_auto_load_libthread_db_compare): Return bool. Change
8820 (info_auto_load_libthread_db): Use std::vector, std::string.
8823 2018-02-24 Tom Tromey <tom@tromey.com>
8825 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
8827 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
8829 * gdbarch.c: Rebuild.
8830 * gdbarch.h: Rebuild.
8831 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
8832 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
8833 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
8836 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
8838 * gdbtypes.h (sect_offset): Change type to uint64_t.
8839 (sect_offset_str): New function.
8840 * dwarf2read.c (create_addrmap_from_aranges): Use
8842 (error_check_comp_unit_head): Likewise.
8843 (create_debug_type_hash_table): Likewise.
8844 (read_cutu_die_from_dwo): Likewise.
8845 (init_cutu_and_read_dies): Likewise.
8846 (init_cutu_and_read_dies_no_follow): Likewise.
8847 (process_psymtab_comp_unit_reader): Likewise.
8848 (partial_die_parent_scope): Likewise.
8849 (peek_die_abbrev): Likewise.
8850 (process_queue): Likewise.
8851 (dwarf2_physname): Likewise.
8852 (read_namespace_alias): Likewise.
8853 (read_import_statement): Likewise.
8854 (create_dwo_cu_reader): Likewise.
8855 (create_cus_hash_table): Likewise.
8856 (lookup_dwo_cutu): Likewise.
8857 (inherit_abstract_dies): Likewise.
8858 (read_func_scope): Likewise.
8859 (read_call_site_scope): Likewise.
8860 (dwarf2_add_member_fn): Likewise.
8861 (read_common_block): Likewise.
8862 (read_module_type): Likewise.
8863 (read_typedef): Likewise.
8864 (read_subrange_type): Likewise.
8865 (load_partial_dies): Likewise.
8866 (read_partial_die): Likewise.
8867 (find_partial_die): Likewise.
8868 (read_str_index): Likewise.
8869 (dwarf2_string_attr): Likewise.
8870 (build_error_marker_type): Likewise.
8871 (lookup_die_type): Likewise.
8872 (dump_die_shallow): Likewise.
8873 (follow_die_ref): Likewise.
8874 (dwarf2_fetch_die_loc_sect_off): Likewise.
8875 (dwarf2_fetch_constant_bytes): Likewise.
8876 (follow_die_sig): Likewise.
8877 (get_signatured_type): Likewise.
8878 (get_DW_AT_signature_type): Likewise.
8879 (dwarf2_find_containing_comp_unit): Likewise.
8880 (set_die_type): Likewise.
8882 2018-02-21 John Baldwin <jhb@FreeBSD.org>
8884 * arch/aarch64.c: Include "common-defs.h".
8885 * arch/amd64.c: Likewise.
8886 * arch/i386.c: Likewise.
8888 2018-02-21 Tom Tromey <tom@tromey.com>
8890 * value.h: (extract_field_op): Update.
8891 * eval.c (extract_field_op): Return a const char *.
8892 * expression.h (parse_expression_for_completion): Update.
8893 * completer.c (complete_expression): Update.
8894 (add_struct_fields): Make fieldname const.
8895 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
8896 (mark_completion_tag, parse_exp_in_context_1): Update.
8897 (parse_expression_for_completion): Change "name" to
8898 unique_xmalloc_ptr*.
8900 2018-02-21 Tom Tromey <tom@tromey.com>
8902 * infcall.c (call_function_by_hand_dummy): Use std::vector.
8904 2018-02-21 Yao Qi <yao.qi@linaro.org>
8906 * avr-tdep.c (avr_read_pc): Change parameter type to
8908 * gdbarch.sh (read_pc): Likewise.
8909 * gdbarch.c: Re-generated.
8910 * gdbarch.h: Re-generated.
8911 * hppa-tdep.c (hppa_read_pc): Change parameter type to
8913 * ia64-tdep.c (ia64_read_pc): Likewise.
8914 * mips-tdep.c (mips_read_pc): Likewise.
8915 * spu-tdep.c (spu_read_pc): Likewise.
8917 2018-02-21 Yao Qi <yao.qi@linaro.org>
8919 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
8920 * regcache-dump.c: New file.
8921 * regcache.c: Move register_dump to regcache-dump.c.
8922 (maintenance_print_registers): Likewise.
8923 (maintenance_print_raw_registers): Likewise.
8924 (maintenance_print_cooked_registers): Likewise.
8925 (maintenance_print_register_groups): Likewise.
8926 (maintenance_print_remote_registers): Likewise.
8927 (_initialize_regcache): Likewise.
8928 * regcache.h (register_dump): Moved from regcache.c.
8930 2018-02-21 Yao Qi <yao.qi@linaro.org>
8932 * regcache.c (regcache::regcache): Update.
8933 (regcache::invalidate): Move it to detached_regcache::invalidate.
8934 (get_thread_arch_aspace_regcache): Update.
8935 (regcache::raw_update): Update.
8936 (regcache::cooked_read): Remove some code.
8937 (regcache::cooked_read_value): Likewise.
8938 (regcache::raw_write): Remove assert on m_readonly_p.
8939 (regcache::raw_supply_integer): Move it to
8940 detached_regcache::raw_supply_integer.
8941 (regcache::raw_supply_zeroed): Likewise.
8942 * regcache.h (detached_regcache) <raw_supply_integer>: New
8944 <raw_supply_zeroed, invalidate>: Likewise.
8945 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
8946 <invalidate>: Likewise.
8947 <m_readonly_p>: Removed.
8949 2018-02-21 Yao Qi <yao.qi@linaro.org>
8951 * infcmd.c (get_return_value): Let stop_regs point to
8952 get_current_regcache.
8953 * regcache.c (regcache::regcache): Remove.
8954 (register_dump_reg_buffer): New class.
8955 (regcache_print): Adjust.
8956 * regcache.h (regcache): Remove constructors.
8958 2018-02-21 Yao Qi <yao.qi@linaro.org>
8960 * regcache.c (class register_dump): New class.
8961 (register_dump_regcache, register_dump_none): New class.
8962 (register_dump_remote, register_dump_groups): New class.
8963 (regcache_print): Update.
8964 * regcache.h (regcache_dump_what): Move it to regcache.c.
8965 (regcache) <dump>: Remove.
8967 2018-02-21 Yao Qi <yao.qi@linaro.org>
8969 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
8971 (jit_unwind_reg_set_impl): Call raw_supply.
8972 (jit_frame_sniffer): Use reg_buffer_rw.
8973 * record-full.c (record_full_core_regbuf): Change its type.
8974 (record_full_core_open_1): Use reg_buffer_rw.
8975 (record_full_close): Likewise.
8976 (record_full_core_fetch_registers): Use regcache->raw_supply.
8977 (record_full_core_store_registers): Likewise.
8978 * regcache.c (regcache::get_register_status): Move it to
8980 (regcache_raw_set_cached_value): Remove.
8981 (regcache::raw_set_cached_value): Remove.
8982 (regcache::raw_write): Call raw_supply.
8983 (regcache::raw_supply): Move it to reg_buffer_rw.
8984 * regcache.h (regcache_raw_set_cached_value): Remove.
8985 (reg_buffer_rw): New class.
8987 2018-02-21 Yao Qi <yao.qi@linaro.org>
8989 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
8990 readonly_detached_regcache.
8991 (dummy_frame_prev_register): Use regcache->cooked_read.
8992 * frame.c (frame_save_as_regcache): Change return type.
8993 (frame_pop): Update.
8994 * frame.h (frame_save_as_regcache): Update declaration.
8995 * inferior.h (get_infcall_suspend_state_regcache): Update
8997 * infrun.c (infcall_suspend_state) <registers>: use
8998 readonly_detached_regcache.
8999 (save_infcall_suspend_state): Don't use regcache_dup.
9000 (get_infcall_suspend_state_regcache): Change return type.
9001 * linux-fork.c (struct fork_info) <savedregs>: Change to
9002 readonly_detached_regcache.
9004 (fork_save_infrun_state): Don't use regcache_dup.
9005 (info_checkpoints_command): Adjust.
9006 * mi/mi-main.c (register_changed_p): Update declaration.
9007 (mi_cmd_data_list_changed_registers): Use
9008 readonly_detached_regcache.
9009 (register_changed_p): Change parameter type to
9010 readonly_detached_regcache.
9011 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9012 readonly_detached_regcache.
9013 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9014 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9016 (regcache::save): Move it to reg_buffer.
9017 (regcache::restore): Change parameter type.
9018 (regcache_dup): Remove.
9019 * regcache.h (reg_buffer) <save>: New method.
9020 (readonly_detached_regcache): New class.
9021 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9022 readonly_detached_regcache.
9023 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9025 2018-02-21 Yao Qi <yao.qi@linaro.org>
9027 * frame.c (frame_save_as_regcache): Use regcache method save.
9028 (frame_pop): Use regcache method restore.
9029 * infrun.c (restore_infcall_suspend_state): Likewise.
9030 * linux-fork.c (fork_load_infrun_state): Likewise.
9031 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9033 * regcache.c (regcache_save): Remove.
9034 (regcache::restore): More asserts.
9035 (regcache_cpy): Remove.
9036 * regcache.h (regcache_save): Remove the declaration.
9037 (regcache::restore): Move from private to public.
9038 Remove the friend declaration of regcache_cpy.
9039 (regcache_cpy): Remove declaration.
9041 2018-02-21 Yao Qi <yao.qi@linaro.org>
9043 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9044 parameter type to 'readable_regcache *'.
9045 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9046 * arm-tdep.c (arm_neon_quad_read): Likewise.
9047 (arm_pseudo_read): Likewise.
9048 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9049 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9050 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9051 * gdbarch.c: Re-generated.
9052 * gdbarch.h: Re-generated.
9053 * gdbarch.sh (pseudo_register_read): Change parameter type to
9054 'readable_regcache *'.
9055 (pseudo_register_read_value): Likewise.
9056 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9057 (h8300_pseudo_register_read): Likewise.
9058 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9059 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9060 (i386_pseudo_register_read_into_value): Likewise.
9061 (i386_pseudo_register_read_value): Likewise.
9062 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9064 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9065 * m32c-tdep.c (m32c_raw_read): Likewise.
9066 (m32c_read_flg): Likewise.
9067 (m32c_banked_register): Likewise.
9068 (m32c_banked_read): Likewise.
9069 (m32c_sb_read): Likewise.
9070 (m32c_part_read): Likewise.
9071 (m32c_cat_read): Likewise.
9072 (m32c_r3r2r1r0_read): Likewise.
9073 (m32c_pseudo_register_read): Likewise.
9074 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9075 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9076 (mep_pseudo_cr64_read): Likewise.
9077 (mep_pseudo_register_read): Likewise.
9078 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9079 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9080 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9081 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9082 (regcache::cooked_read): Likewise.
9083 (regcache::cooked_read_value): Likewise.
9084 (regcache_cooked_read_signed):
9085 (regcache::cooked_read): Likewise.
9086 * regcache.h (readable_regcache): New class.
9087 (regcache): Inherit readable_regcache. Move some methods to
9089 * rl78-tdep.c (rl78_pseudo_register_read): Change
9090 parameter type to 'readable_regcache *'.
9091 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9092 (e500_pseudo_register_read): Change parameter type to
9093 'readable_regcache *'.
9094 (dfp_pseudo_register_read): Likewise.
9095 (vsx_pseudo_register_read): Likewise.
9096 (efpr_pseudo_register_read): Likewise.
9097 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9098 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9099 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9100 (sh64_pseudo_register_read): Likewise.
9101 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9102 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9103 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9104 (spu_pseudo_register_read): Likewise.
9105 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9106 (xtensa_pseudo_register_read): Likewise.
9108 2018-02-21 Yao Qi <yao.qi@linaro.org>
9110 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9111 (regcache::arch): Move it to reg_buffer::arch.
9112 (regcache::register_buffer): Likewise.
9113 (regcache::assert_regnum): Likewise.
9114 (regcache::num_raw_registers): Likewise.
9115 * regcache.h (reg_buffer): New class.
9116 (regcache): Inherit reg_buffer.
9118 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9120 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9121 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9123 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9125 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9127 2018-02-19 Alan Hayward <alan.hayward@arm.com>
9129 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9130 (SFILES): Remove common/*.c files.
9131 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9132 * common/common.host: Add common reference.
9133 * configure.ac: Likewise.
9134 * configure: Regenerate.
9136 2018-02-16 Yao Qi <yao.qi@linaro.org>
9138 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9139 (block_initialize_namespace): Use new.
9140 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9141 (dwarf2_free_objfile): Use delete.
9142 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9143 (copy_type_recursive): Use new.
9144 * gdb_obstack.h (allocate_on_obstack): New.
9146 2018-02-15 Yao Qi <yao.qi@linaro.org>
9149 * inferior.c (exit_inferior_1): Reset inf->control.
9151 2018-02-15 Joel Brobecker <brobecker@adacore.com>
9153 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9156 2018-02-14 Pedro Alves <palves@redhat.com>
9158 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9159 frame_cleanup_after_sniffer on exception.
9161 2018-02-14 Tom Tromey <tom@tromey.com>
9163 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9165 (solib_bfd_open): Make pathname const.
9166 * solib.c (solib_bfd_open): Make pathname const.
9167 * solib-spu.c (spu_bfd_fopen): Make name const.
9168 (spu_bfd_open): Make pathname const.
9169 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9170 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9172 2018-02-14 Tom Tromey <tom@tromey.com>
9174 * symfile.c (symfile_bfd_open): Update.
9175 * source.h (openp, source_full_path_of, find_and_open_source):
9176 Change argument type to unique_xmalloc_ptr.
9177 * source.c (openp): Take a unique_xmalloc_ptr.
9178 (source_full_path_of, find_and_open_source): Likewise.
9179 (open_source_file, symtab_to_fullname): Update.
9180 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9182 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9183 (exec_file_find): Update.
9184 * psymtab.c (psymtab_to_fullname): Update.
9185 * nto-tdep.h (nto_find_and_open_solib): Update.
9186 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9188 * exec.c (exec_file_attach): Update.
9189 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9190 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9192 2018-02-14 Tom Tromey <tom@tromey.com>
9194 * solib.c: Include source.h.
9195 * nto-tdep.c: Include source.h.
9196 * mi/mi-cmd-env.c: Include source.h.
9197 * infcmd.c: Include source.h.
9198 * exec.c: Include source.h.
9199 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9200 (add_path, directory_switch, source_path, init_source_path): Move
9202 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9203 (add_path, directory_switch, source_path, init_source_path):
9206 2018-02-14 Tom Tromey <tom@tromey.com>
9208 * solist.h (exec_file_find, solib_find): Return
9210 (solib_bfd_fopen): Take a const char *.
9211 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9212 (exec_file_find, solib_find): Likewise.
9213 (solib_bfd_fopen): Do not take ownership of "pathname".
9214 (solib_bfd_open): Use unique_xmalloc_ptr.
9215 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9216 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9217 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9218 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9220 2018-02-14 Joel Brobecker <brobecker@adacore.com>
9222 * ada-lang.c (name_match_type_from_name): Remove reference to
9223 ada_name_for_lookup in function's documentation.
9224 * ada-lang.h (ada_name_for_lookup): Delete declaration.
9226 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9228 * defs.h (enum openp_flags): New enum.
9229 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9230 Move to enum openp_flags.
9231 (openp_flags): New enum flags.
9232 (openp): Change parameter type to openp_flags.
9233 * source.c (openp): Change parameter type to openp_flags.
9234 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9235 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9237 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9239 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9242 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
9244 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9246 (class dwarf2_queue_guard): ...the destructor of this new class.
9247 (dw2_do_instantiate_symtab): Create instance of the new class
9248 dwarf2_queue_guard, remove cleanup.
9250 2018-02-09 Tom Tromey <tom@tromey.com>
9252 * source.c (find_source_lines): Don't reference past the end of
9255 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9257 * remote.c (remote_btrace_maybe_reopen): Change error message.
9258 * btrace.c (btrace_enable): Likewise.
9259 (parse_xml_btrace): Likewise.
9260 (parse_xml_btrace_conf): Likewise.
9262 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9264 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9265 (linux_enable_pt, linux_enable_bts): Call
9266 diagnose_perf_event_open_fail.
9268 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9270 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9271 Remove parameter and change return type. Update callers. Move it.
9272 (linux_enable_bts, linux_enable_pt): Improve error message.
9273 (linux_enable_pt): Remove zero buffer size check.
9274 (linux_enable_btrace): Improve error messages. Remove NULL return
9277 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9279 * btrace.c (btrace_enable): Remove target_supports_btrace call.
9280 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9281 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9282 (linux_supports_pt, linux_supports_btrace): Remove.
9283 (linux_enable_bts): Call cpu_supports_bts.
9284 * nat/linux-btrace.h (linux_supports_btrace): Remove.
9285 * remote.c (remote_supports_btrace): Remove.
9286 (init_remote_ops): Remove remote_supports_btrace.
9287 * target-delegates.c: Regenerated.
9288 * target.c (target_supports_btrace): Remove.
9289 * target.h (target_ops) <to_supports_btrace>: Remove
9290 (target_supports_btrace): Remove.
9291 * x86-linux-nat.c (x86_linux_create_target): Remove
9292 linux_supports_btrace.
9294 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9296 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9298 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9299 exception and use message in own exception.
9301 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9303 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9304 (perf_event_pt_event_type): Use gdb_file_up.
9305 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9306 scoped_fd, and scoped_mmap.
9308 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9310 * common/scoped_mmap.h: New.
9311 * unittests/scoped_mmap-selftest.c: New.
9312 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9313 unittests/scoped_mmap-selftest.c.
9315 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9317 * common/scoped_fd.h: New.
9318 * unittests/scoped_fd-selftest.c: New.
9319 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9320 unittests/scoped_fd-selftest.c.
9322 2018-02-09 Tom Tromey <tom@tromey.com>
9324 * auto-load.c (auto_load_section_scripts): Use
9325 gdb::unique_xmalloc_ptr.
9327 2018-02-09 Tom Tromey <tom@tromey.com>
9329 * auto-load.c (execute_script_contents): Use std::string.
9331 2018-02-09 Joel Brobecker <brobecker@adacore.com>
9333 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9334 Python function, rather than a new command.
9336 2018-02-08 Tom Tromey <tom@tromey.com>
9338 * solib.c (solib_find_1): Use std::string.
9339 (solib_bfd_fopen): Use unique_xmalloc_ptr.
9341 2018-02-08 Tom Tromey <tom@tromey.com>
9343 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9345 2018-02-08 Tom Tromey <tom@tromey.com>
9347 * source.c (find_source_lines): Use gdb::def_vector.
9349 2018-02-08 Tom Tromey <tom@tromey.com>
9351 * macrocmd.c (struct temporary_macro_definition): New.
9352 (macro_define_command): Use temporary_macro_definition. Remove
9354 (free_macro_definition_ptr): Remove.
9356 2018-02-08 Tom Tromey <tom@tromey.com>
9358 * macroexp.c (maybe_expand): Use std::string.
9360 2018-02-08 Tom Tromey <tom@tromey.com>
9362 * macroexp.c (struct macro_buffer): Add initializers for some
9364 (init_buffer, init_shared_buffer, free_buffer)
9365 (free_buffer_return_text): Remove.
9366 (macro_buffer): New constructors.
9367 (~macro_buffer): New destructor.
9368 (macro_buffer::set_shared): New method.
9369 (macro_buffer::resize_buffer, macro_buffer::appendc)
9370 (macro_buffer::appendmem): Now methods, not free functions.
9371 (set_token, append_tokens_without_splicing, stringify)
9372 (macro_stringify): Update.
9373 (gather_arguments): Change return type. Remove argc_p argument,
9374 add args_ptr argument. Use std::vector.
9375 (substitute_args): Remove argc argument. Accept std::vector.
9376 (expand): Update. Use std::vector.
9377 (scan, macro_expand, macro_expand_next): Update.
9379 2018-02-08 Tom Tromey <tom@tromey.com>
9381 * symtab.c (default_collect_symbol_completion_matches_break_on):
9382 Use unique_xmalloc_ptr.
9383 * macroscope.h: (sal_macro_scope, user_macro_scope)
9384 (default_macro_scope): Return unique_xmalloc_ptr.
9385 * macroscope.c (sal_macro_scope, user_macro_scope)
9386 (default_macro_scope): Return unique_xmalloc_ptr.
9387 * macroexp.h (macro_expand, macro_expand_once): Return
9389 * macroexp.c (macro_expand, macro_expand_once): Return
9391 * macrocmd.c (macro_expand_command, macro_expand_once_command)
9392 (info_macro_command, info_macros_command): Use
9394 * compile/compile-c-support.c (write_macro_definitions): Use
9396 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9398 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
9400 * value.c (value_static_field): Assign field type instead of
9401 containing type when returning an optimized out value.
9403 2018-02-06 Yao Qi <yao.qi@linaro.org>
9405 * ft32-tdep.c (ft32_read_pc): Remove.
9406 (ft32_write_pc): Remove.
9407 (ft32_gdbarch_init): Update.
9408 * m32r-tdep.c (m32r_read_pc): Remove.
9409 (m32r_gdbarch_init): Update.
9410 * mep-tdep.c (mep_read_pc): Remove.
9411 (mep_gdbarch_init): Update.
9412 * microblaze-tdep.c (microblaze_write_pc): Remove.
9413 (microblaze_gdbarch_init): Update.
9414 * mn10300-tdep.c (mn10300_read_pc): Remove.
9415 (mn10300_write_pc): Remove.
9416 (mn10300_gdbarch_init): Update.
9417 * moxie-tdep.c (moxie_read_pc): Remove.
9418 (moxie_write_pc): Remove.
9419 (moxie_gdbarch_init): Update.
9421 2018-02-06 Yao Qi <yao.qi@linaro.org>
9423 * expprint.c (print_subexp_standard): Handle
9424 OP_F77_UNDETERMINED_ARGLIST.
9425 (dump_subexp_body_standard): Likewise.
9427 2018-02-05 Alan Hayward <alan.hayward@arm.com>
9429 * target-descriptions.c (tdesc_element_visitor) Add empty
9431 (tdesc_type): Move make_gdb_type from here.
9432 (tdesc_type_builtin): Likewise.
9433 (tdesc_type_vector): Likewise.
9434 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9435 (make_gdb_type_struct): Move from tdesc_type_with_fields.
9436 (make_gdb_type_union): Likewise.
9437 (make_gdb_type_flags): Likewise.
9438 (make_gdb_type_enum): Likewise.
9439 (make_gdb_type): New function.
9440 (tdesc_register_type): Use static make_gdb_type.
9442 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
9444 * infcmd.c (default_print_one_register_info): Align natural-format
9445 column values consistently one under another.
9446 (pad_to_column): New function.
9448 2018-02-05 Joel Brobecker <brobecker@adacore.com>
9450 * dwarf2read.c (dwarf2_physname): Move commment.
9452 2018-02-01 Leszek Swirski <leszeks@google.com>
9454 * varobj.c (varobj_formatted_print_options): Allow recursive
9455 pretty printing if pretty printing is enabled.
9457 2018-02-01 Leszek Swirski <leszeks@google.com>
9459 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9460 names after a structop as a filename.
9462 2018-02-01 Yao Qi <yao.qi@linaro.org>
9464 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9465 (arm_record_coproc_data_proc): Likewise.
9467 2018-02-01 Yao Qi <yao.qi@linaro.org>
9469 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9471 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
9473 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9474 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9476 2018-01-31 Pedro Alves <palves@redhat.com>
9478 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9479 * inflow.c (child_terminal_save_inferior): Wrap reference to
9480 tcgetpgrp in HAVE_TERMIOS_H.
9481 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9483 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9484 always iterate over all inferiors.
9485 (gdbsim_cntrl_c): Adjust.
9486 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9488 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9490 * gdbtypes.c (lookup_array_range_type): Make sure the array's
9491 index type is objfile-owned if the element type is as well.
9493 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9497 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
9499 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9500 "features/s390x-linux64.c".
9501 (_initialize_s390_linux_tdep): Remove initialization of tdescs
9502 s390_linux32 and s390x_linux64.
9503 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9505 * s390-tdep.c: Include "features/s390-linux32.c" and
9506 "features/s390x-linux64.c".
9507 (s390_tdesc_valid): Add check for tdesc_has_registers.
9508 (s390_gdbarch_init): Make sure there is always a valid tdesc.
9509 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9510 tdesc_s390x_linux64.
9511 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9512 tdesc_s390x_linux64 to...
9513 * s390-tdep.h: ...here.
9515 2018-01-30 Pedro Alves <palves@redhat.com>
9518 * config.in, configure: Regenerate.
9519 * configure.ac: Check for getpgid.
9520 * go32-nat.c (go32_pass_ctrlc): New.
9521 (go32_target): Install it.
9522 * inf-child.c (inf_child_target): Install
9523 child_terminal_save_inferior, child_pass_ctrlc and
9525 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9526 (inf_ptrace_target): No longer install it.
9527 * infcmd.c (interrupt_target_1): Adjust.
9528 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9529 (child_interrupt): Declare.
9530 (inferior::terminal_state): New.
9531 * inflow.c (struct terminal_info): Update comments.
9532 (inferior_process_group): Delete.
9533 (terminal_is_ours): Delete.
9534 (gdb_tty_state): New.
9535 (child_terminal_init): Adjust.
9536 (is_gdb_terminal, sharing_input_terminal_1)
9537 (sharing_input_terminal): New functions.
9538 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
9539 Set the process's actual process group in the foreground if
9540 possible. Handle is_ours_for_output/is_ours distinction. Don't
9541 mark terminal as the inferior's if not sharing GDB's terminal.
9542 Don't check attach_flag.
9543 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9544 pass down a target_terminal_state.
9545 (child_terminal_save_inferior): New, factored out from ...
9546 (child_terminal_ours_1): ... this. Handle
9547 target_terminal_state::is_ours_for_output.
9548 (child_interrupt, child_pass_ctrlc): New.
9549 (inflow_inferior_exit): Clear the inferior's terminal_state.
9550 (copy_terminal_info): Copy the inferior's terminal state.
9551 (_initialize_inflow): Remove reference to terminal_is_ours.
9552 * inflow.h (inferior_process_group): Delete.
9553 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9554 * procfs.c (procfs_target): Don't install procfs_interrupt.
9555 (procfs_interrupt): Delete.
9556 * remote.c (remote_serial_quit_handler): Adjust.
9557 (remote_interrupt): Remove ptid parameter. Adjust.
9558 * target-delegates.c: Regenerate.
9559 * target.c: Include "terminal.h".
9560 (target_terminal::terminal_state): Rename to ...
9561 (target_terminal::m_terminal_state): ... this.
9562 (target_terminal::init): Adjust.
9563 (target_terminal::inferior): Adjust to per-inferior
9565 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
9566 (target_terminal::ours, target_terminal::ours_for_output): Use
9567 target_terminal_is_ours_kind.
9568 (target_interrupt): Remove ptid parameter. Adjust.
9569 (default_target_pass_ctrlc): Adjust.
9570 * target.h (target_ops::to_terminal_save_inferior): New field.
9571 (target_ops::to_interrupt): Remove ptid_t parameter.
9572 (target_interrupt): Remove ptid_t parameter. Update comment.
9573 (target_pass_ctrlc): Update comment.
9574 * target/target.h (target_terminal_state): New scoped enum,
9576 (target_terminal::terminal_state): ... here.
9577 (target_terminal::inferior): Update comments.
9578 (target_terminal::restore_inferior): New.
9579 (target_terminal::is_inferior, target_terminal::is_ours)
9580 (target_terminal::is_ours_for_output): Adjust.
9581 (target_terminal::scoped_restore_terminal_state): Adjust to
9582 rename, and call restore_inferior() instead of inferior().
9583 (target_terminal::scoped_restore_terminal_state::m_state): Change
9585 (target_terminal::terminal_state): Rename to ...
9586 (target_terminal::m_terminal_state): ... this and change type.
9588 2018-01-30 Pedro Alves <palves@redhat.com>
9590 * linux-nat.c (wait_for_signal): New function.
9591 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
9593 (async_terminal_is_ours)
9594 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
9595 (linux_nat_add_target): Don't override
9596 to_terminal_inferior/to_terminal_ours.
9598 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
9600 * remote.c (remote_follow_fork): Don't call "detach_inferior".
9602 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
9604 * dwarf2read.c (free_dwo_files): Add forward-declaration.
9605 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
9606 dwarf2_per_objfile_free here.
9607 (dwarf2_per_objfile_free): Remove.
9608 (_initialize_dwarf2_read): Don't register
9609 dwarf2_per_objfile_free as a registry cleanup.
9611 2018-01-27 Eli Zaretskii <eliz@gnu.org>
9613 Avoid compilation errors in MinGW native builds
9615 The error is triggered by including python-internal.h, and the
9618 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
9619 from build-gnulib/import/math.h:27,
9620 from d:/usr/Python26/include/pyport.h:235,
9621 from d:/usr/Python26/include/Python.h:58,
9622 from python/python-internal.h:94,
9623 from python/py-arch.c:24:
9624 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
9628 This happens because Python headers define 'hypot' to expand t
9629 '_hypot' in the Windows builds.
9630 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
9631 'hypoth'. This avoids a compilation error.
9633 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9635 * MAINTAINERS (Write After Approval): Fix ordering.
9637 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9639 * MAINTAINERS (Write After Approval): Add Alan Hayward.
9641 2018-01-26 Alan Modra <amodra@gmail.com>
9643 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
9644 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
9645 Remove nop. Make const. Comment.
9646 (powerpc32_plt_stub_so_2): New.
9647 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
9648 Correct count. Update uses.
9649 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
9650 Move common code reading PLT entry word. Correct
9651 powerpc32_plt_stub PLT address calculation.
9652 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
9653 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
9654 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
9655 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
9656 (ppc64_standard_linkage8): Likewise.
9657 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
9658 Correct insns description.
9659 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
9661 2018-01-24 Pedro Alves <palves@redhat.com>
9663 GCC PR libstdc++/83906
9664 * gdbtypes.c (operator==(const dynamic_prop &,
9665 const dynamic_prop &)): New.
9666 (operator==(const range_bounds &, const range_bounds &)): New.
9667 (check_types_equal): Use them instead of memcmp.
9668 * gdbtypes.h (operator==(const dynamic_prop &,
9669 const dynamic_prop &)): Declare.
9670 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
9671 (operator==(const range_bounds &, const range_bounds &)): Declare.
9672 (operator!=(const range_bounds &, const range_bounds &)): Declare.
9674 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9676 * s390-linux-tdep.c (s390_record_address_mask)
9677 (s390_record_calc_disp_common, s390_record_calc_disp)
9678 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9679 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9680 (s390_process_record): Move to s390-tdep.c.
9681 (s390_linux_init_abi_any): Adjust.
9682 * s390-tdep.c (s390_record_address_mask)
9683 (s390_record_calc_disp_common, s390_record_calc_disp)
9684 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9685 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9686 (s390_process_record): Moved from s390-linux-tdep.c
9687 (s390_gdbarch_init): Adjust.
9689 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9691 * s390-linux-nat.c (s390-tdep.h): New include.
9692 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
9693 (HFILES_NO_SRCDIR): Add s390-tdep.h.
9694 (ALLDEPFILES): Add s390-tdep.c.
9695 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
9696 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
9697 * s390-tdep.h: ...this. New file.
9698 * s390-linux-tdep.c (s390-tdep.h): New include.
9699 (_initialize_s390_tdep): Rename to...
9700 (_initialize_s390_linux_tdep): ...this and adjust.
9701 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
9702 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
9704 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
9705 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
9706 (s390_is_partial_instruction, s390_software_single_step)
9707 (is_non_branch_ril, s390_displaced_step_copy_insn)
9708 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
9709 (s390_prologue_data, s390_addr, s390_store, s390_load)
9710 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
9711 (s390_register_call_saved, s390_guess_tracepoint_registers)
9712 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
9713 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
9714 (s390_pseudo_register_name, s390_pseudo_register_type)
9715 (s390_pseudo_register_read, s390_pseudo_register_write)
9716 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
9717 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
9718 (s390_addr_bits_remove, s390_address_class_type_flags)
9719 (s390_address_class_type_flags_to_name)
9720 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
9721 (s390_function_arg_float, s390_function_arg_vector)
9722 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
9723 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
9724 (s390_frame_align, s390_register_return_value, s390_return_value)
9725 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
9726 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
9727 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
9728 (s390_trad_frame_prev_register, s390_unwind_cache)
9729 (s390_prologue_frame_unwind_cache)
9730 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
9731 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
9732 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
9733 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
9734 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
9735 (s390_frame_base_address, s390_local_base_address)
9736 (s390_frame_base, s390_gcc_target_options)
9737 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
9738 (s390_validate_reg_range, s390_tdesc_valid)
9739 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
9740 * s390-tdep.c: ...this. New file.
9742 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9744 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
9745 (s390_process_record, s390_gdbarch_tdep_alloc)
9746 (s390_linux_init_abi_any): Use/set new hook.
9748 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9750 * s390-linux-tdep.c (osabi.h): New include.
9751 (s390_linux_init_abi_31, s390_linux_init_abi_64)
9752 (s390_linux_init_abi_any): New functions.
9753 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
9755 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9757 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
9758 tdesc_has_registers check
9760 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9762 * s390-linux-tdep.c (s390_tdesc_valid): New function.
9763 (s390_validate_reg_range): New macro.
9764 (s390_gdbarch_init): Adjust.
9766 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9768 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
9769 (s390_gdbarch_tdep_alloc): Adjust.
9770 (s390_gdbarch_init): Adjust.
9772 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9774 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
9775 <have_tdb>: Change type to bool.
9776 (s390_gdbarch_tdep_alloc): Adjust.
9777 (s390_gdbarch_init): Adjust.
9779 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9781 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
9782 (gdbarch_tdep) <have_upper, have_vx>: New fields.
9783 (s390_gdbarch_tdep_alloc): New function.
9784 (s390_gdbarch_init): Allocate tdep at start and use its fields
9785 instead of separate variables.
9787 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9789 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
9790 when looking for cached gdbarch and add comment for remaining.
9792 2018-01-22 Pedro Alves <palves@redhat.com>
9793 Sergio Durigan Junior <sergiodj@redhat.com>
9795 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
9798 2018-01-22 Maciej W. Rozycki <macro@mips.com>
9800 * MAINTAINERS: Update my company e-mail address.
9802 2018-01-22 Yao Qi <yao.qi@linaro.org>
9804 * regcache.c (cooked_write_test): New function.
9805 (_initialize_regcache): Register the test.
9807 2018-01-22 Yao Qi <yao.qi@linaro.org>
9809 * ia64-tdep.c (ia64_pseudo_register_read): Call
9810 regcache->cooked_read instead of regcache_cooked_read_unsigned.
9811 * m32c-tdep.c (m32c_cat_read): Likewise.
9812 (m32c_r3r2r1r0_read): Likewise.
9813 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9814 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9816 2018-01-22 Yao Qi <yao.qi@linaro.org>
9818 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
9819 method raw_read instead of regcache_raw_read.
9820 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9821 * arm-tdep.c (arm_neon_quad_read): Likewise.
9822 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9823 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9824 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9825 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
9826 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9827 (i386_pseudo_register_read_into_value): Likewise.
9828 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9829 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9830 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9831 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
9832 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
9833 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9834 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9835 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9836 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
9838 2018-01-22 Yao Qi <yao.qi@linaro.org>
9840 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
9841 * configure.tgt: Remove target mt.
9842 * mt-tdep.c: Remove.
9843 * regcache.c (cooked_read_test): Remove the check for mt.
9845 2018-01-22 Yao Qi <yao.qi@linaro.org>
9847 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
9848 instead of gdbarch_pseudo_register_read_value.
9850 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9852 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
9855 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9857 * linespec.c (create_sals_line_offset): Remove code that preserved
9858 the symtab_and_line's line number.
9860 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9862 * varobj.c (varobj_create): Don't set valid_block when creating a
9865 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9867 * varobj.c (varobj_create): Remove out of date comment.
9869 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9872 * ada-exp.y (write_var_from_sym): Pass extra parameter when
9873 updating innermost block.
9874 * parse.c (innermost_block_tracker::update): Take extra type
9875 parameter, and check types match before updating innermost block.
9876 (write_dollar_variable): Update innermost block for registers.
9877 * parser-defs.h (enum innermost_block_tracker_type): New enum.
9878 (innermost_block_tracker::innermost_block_tracker): Initialise
9880 (innermost_block_tracker::reset): Take type parameter.
9881 (innermost_block_tracker::update): Take type parameter, and pass
9882 type through as needed.
9883 (innermost_block_tracker::m_types): New member.
9884 * varobj.c (varobj_create): Pass type when reseting innermost
9887 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9889 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
9890 * ada-lang.c (resolve_subexp): Likewise.
9891 * breakpoint.c (set_breakpoint_condition) Likewise.
9892 (watch_command_1) Likewise.
9893 * c-exp.y (variable): Likewise.
9894 * d-exp.y (PrimaryExpression): Likewise.
9895 * f-exp.y (variable): Likewise.
9896 * go-exp.y (variable): Likewise.
9897 * m2-exp.y (variable): Likewise.
9898 * objfiles.c (objfile::~objfile): Likewise.
9899 * p-exp.y (variable): Likewise.
9900 * parse.c (innermost_block): Change type.
9901 * parser-defs.h (class innermost_block_tracker): New.
9902 (innermost_block): Change to innermost_block_tracker.
9903 * printcmd.c (display_command): Switch to innermost_block API.
9904 (do_one_display): Likewise.
9905 * rust-exp.y (do_one_display): Likewise.
9906 * symfile.c (clear_symtab_users): Likewise.
9907 * varobj.c (varobj_create): Switch to innermost_block API, replace
9908 use of innermost_block with block stored on varobj object.
9910 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9912 * expression.h (innermost_block): Remove declaration.
9913 * varobj.c: Add 'parser-defs.h' include.
9915 2018-01-19 Tom Tromey <tom@tromey.com>
9917 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
9918 symbols in the static and global blocks.
9920 2018-01-19 James Clarke <jrtc27@jrtc27.com>
9922 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
9923 gdb_ptrace.h, and move including gdb_wait.h ...
9924 * nat/linux-ptrace.h: ... to here.
9926 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9928 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
9929 inf_ptrace_detach_success.
9930 (inf_ptrace_detach_success): Add inferior parameter, use it
9931 instead of inferior_ptid, pass it to detach_inferior.
9932 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
9934 * inferior.c (detach_inferior): Add overload that takes an
9936 * inferior.h (detach_inferior): Likewise.
9937 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
9938 use inferior_ptid, adjust call to inf_ptrace_detach_success.
9939 * linux-thread-db.c (thread_db_detach): Use inf parameter.
9941 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9943 * target.h (struct target_ops) <to_detach>: Add inferior
9945 (target_detach): Likewise.
9946 * target.c (dispose_inferior): Pass inferior down.
9947 (target_detach): Pass inferior down. Assert that it is equal to
9948 the current inferior.
9949 * aix-thread.c (aix_thread_detach): Pass inferior down.
9950 * corefile.c (core_file_command): Pass current_inferior() down.
9951 * corelow.c (core_detach): Add inferior parameter.
9952 * darwin-nat.c (darwin_detach): Likewise.
9953 * gnu-nat.c (gnu_detach): Likewise.
9954 * inf-ptrace.c (inf_ptrace_detach): Likewise.
9955 * infcmd.c (detach_command): Pass current_inferior() down to
9957 * infrun.c (follow_fork_inferior): Pass parent_inf to
9959 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
9961 * linux-nat.c (linux_nat_detach): Add inferior parameter.
9962 * linux-thread-db.c (thread_db_detach): Likewise.
9963 * nto-procfs.c (procfs_detach): Likewise.
9964 * procfs.c (procfs_detach): Likewise.
9965 * record.c (record_detach): Likewise.
9966 * record.h (struct inferior): Forward-declare.
9967 (record_detach): Add inferior parameter.
9968 * remote-sim.c (gdbsim_detach): Likewise.
9969 * remote.c (remote_detach_1): Likewise.
9970 (remote_detach): Likewise.
9971 (extended_remote_detach): Likewise.
9972 * sol-thread.c (sol_thread_detach): Likewise.
9973 * target-debug.h (target_debug_print_inferior_p): New macro.
9974 * target-delegates.c: Re-generate.
9975 * top.c (kill_or_detach): Pass inferior down to target_detach.
9976 * windows-nat.c (windows_detach): Add inferior parameter.
9978 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9980 * target.h (struct target_ops) <to_detach>: Remove args
9982 (target_detach): Likewise.
9983 * target.c (dispose_inferior): Adjust.
9984 (target_detach): Remove args parameter, adjust.
9985 * aix-thread.c (aix_thread_detach): Adjust.
9986 * corefile.c (core_file_command): Adjust.
9987 * corelow.c (core_detach): Adjust.
9988 * darwin-nat.c (darwin_detach): Adjust.
9989 * gnu-nat.c (gnu_detach): Adjust.
9990 * inf-ptrace.c (inf_ptrace_detach): Adjust.
9991 * infcmd.c (detach_command): Adjust
9992 * infrun.c (follow_fork_inferior): Adjust.
9993 (handle_vfork_child_exec_or_exit): Adjust.
9994 * linux-fork.c (linux_fork_detach): Remove args parameter.
9995 * linux-fork.h (linux_fork_detach): Likewise.
9996 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
9997 * linux-thread-db.c (thread_db_detach): Likewise.
9998 * nto-procfs.c (procfs_detach): Likewise.
9999 * procfs.c (procfs_detach): Likewise.
10000 (do_detach): Remove signo parameter.
10001 * record.c (record_detach): Remove args parameter.
10002 * record.h (record_detach): Likewise.
10003 * remote-sim.c (gdbsim_detach): Likewise.
10004 * remote.c (remote_detach_1): Likewise.
10005 (remote_detach): Likewise.
10006 (extended_remote_detach): Likewise.
10007 * sol-thread.c (sol_thread_detach): Likewise.
10008 * target-delegates.c: Re-generate.
10009 * top.c (struct qt_args) <args>: Remove field.
10010 (kill_or_detach): Don't pass args.
10011 (quit_force): Don't set args.
10012 * windows-nat.c (windows_detach): Remove args parameter.
10014 2018-01-19 Yao Qi <yao.qi@linaro.org>
10016 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10017 (arm_linux_init_abi): Install it.
10019 2018-01-19 Yao Qi <yao.qi@linaro.org>
10021 * osabi.c (gdb_osabi_names): Extend the regexp for
10022 arm-linux-gnueabihf.
10024 2018-01-18 Yao Qi <yao.qi@linaro.org>
10026 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10028 (abbrev_table::add_abbrev): Update.
10029 (abbrev_table::lookup_abbrev): Update.
10031 2018-01-18 Yao Qi <yao.qi@linaro.org>
10033 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10035 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10037 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10040 2018-01-17 Tom Tromey <tom@tromey.com>
10042 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10044 2018-01-17 Tom Tromey <tom@tromey.com>
10046 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10047 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10048 (create_array_type_with_stride): Update.
10049 * dwarf2read.c (set_die_type): Update.
10051 2018-01-17 Tom Tromey <tom@tromey.com>
10053 * dwarf2read.c (delayed_method_info): Remove typedef.
10054 (dwarf2_cu::method_info): Now a std::vector.
10055 (add_to_method_list): Update.
10056 (free_delayed_list): Remove.
10057 (compute_delayed_physnames): Update.
10058 (process_full_comp_unit, process_full_type_unit): Clear the method
10059 list. Remove cleanups.
10060 (psymtab_include_file_name): Add name_holder parameter. Use
10061 unique_xmalloc_ptr.
10062 (dwarf_decode_lines): Update.
10064 2018-01-17 Tom Tromey <tom@tromey.com>
10065 Simon Marchi <simon.marchi@ericsson.com>
10067 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10068 (dwarf2_per_objfile::free_cached_comp_units)
10069 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10070 (init_cutu_and_read_dies_no_follow): Update.
10071 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10072 (dwarf2_cu::~dwarf2_cu): New.
10073 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10074 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10076 2018-01-17 Tom Tromey <tom@tromey.com>
10077 Simon Marchi <simon.marchi@ericsson.com>
10079 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10080 (struct die_reader_specs) <abbrev_table>: New member.
10081 (struct abbrev_table): Add constructor.
10082 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10083 <abbrev_obstack>: Now an auto_obstack.
10084 (abbrev_table_up): New typedef.
10085 (init_cu_die_reader): Add abbrev_table parameter.
10086 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10087 Add result_dwo_abbrev_table.
10088 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10089 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10091 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10093 (skip_children): Update.
10094 (abbrev_table::alloc_abbrev): Rename from
10095 abbrev_table_alloc_abbrev.
10096 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10097 (abbrev_table::lookup_abbrev): Rename from
10098 abbrev_table_lookup_abbrev.
10099 (abbrev_table_read_table): Return abbrev_table_up.
10100 (abbrev_table_free, abbrev_table_free_cleanup)
10101 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10102 (load_partial_dies): Update.
10104 2018-01-17 Tom Tromey <tom@tromey.com>
10106 * dwarf2read.c (dwarf2_compute_name): Update comment.
10107 (read_func_scope, read_variable): Update.
10108 (new_symbol): Remove.
10109 (new_symbol_full): Rename to new_symbol.
10111 2018-01-17 Mike Gulick <mgulick@mathworks.com>
10114 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10115 a warning instead of throwing an error, set section size to 0 and return
10117 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10119 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10121 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10123 (linux_ptrace_attach_fail_reason_string): Likewise.
10124 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10126 (linux_ptrace_attach_fail_reason_string): Likewise.
10127 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10129 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10131 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10133 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10136 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10137 checking for fs_base/gs_base fields in struct user_regs_struct.
10138 * configure: Regenerate.
10140 2018-01-17 Yao Qi <yao.qi@linaro.org>
10142 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10144 (aarch64_linux_init_abi): Install it to gdbarch hook
10145 gcc_target_options.
10147 2018-01-15 Pedro Alves <palves@redhat.com>
10149 * common/signals-state-save-restore.c
10150 (save_original_signals_state): Fix typos.
10152 2017-01-12 Tom Tromey <tom@tromey.com>
10153 Sergio Durigan Junior <sergiodj@redhat.com>
10155 * Makefile.in (install-only): Install gdb-add-index.
10157 2018-01-12 John Baldwin <jhb@FreeBSD.org>
10159 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10161 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10163 * infrun.c (keep_going_pass_signal): Clear step-over info when
10164 insert_breakpoints fails.
10166 2018-01-11 Pedro Alves <palves@redhat.com>
10169 * infrun.c (resume): Rename to ...
10170 (resume_1): ... this.
10171 (resume): Reimplement as wrapper around resume_1.
10173 2018-01-11 Pedro Alves <palves@redhat.com>
10176 * remote.c (remote_parse_stop_reply): Default to the last-set
10177 general thread instead of to 'magic_null_ptid'.
10179 2018-01-10 Pedro Alves <palves@redhat.com>
10181 * language.h (language_get_symbol_name_matcher): Rename ...
10182 (get_symbol_name_matcher): ... this.
10183 * language.c (language_get_symbol_name_matcher): Ditto.
10184 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10187 2018-01-10 Pedro Alves <palves@redhat.com>
10191 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10192 Adjust to use language_get_symbol_name_matcher instead of
10193 language_defn::la_get_symbol_name_matcher.
10194 * language.c (language_get_symbol_name_matcher): If in Ada mode
10195 and the lookup name is a verbatim match, return Ada's matcher.
10196 * language.h (language_get_symbol_name_matcher): Adjust comment.
10197 (ada_lookup_name_info::verbatim_p):: New method.
10199 2018-01-10 Pedro Alves <palves@redhat.com>
10202 * ada-lang.c (ada_collect_symbol_completion_matches): If the
10203 minsym's language is language_auto or language_cplus, pass down
10204 language_ada instead.
10205 * symtab.c (compare_symbol_name): Don't frob symbol language here.
10207 2018-01-10 Pedro Alves <palves@redhat.com>
10210 * minsyms.c (linkage_name_str): New function.
10211 (iterate_over_minimal_symbols): Use it.
10213 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10215 * NEWS: Document that 'info proc' now works on FreeBSD.
10217 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10219 * configure.ac: Check for kinfo_getfile in libutil.
10220 * configure: Regenerate.
10221 * config.in: Regenerate.
10222 * fbsd-nat.c: Include "fbsd-tdep.h".
10223 (fbsd_fetch_cmdline): New.
10224 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10225 rather than calling error.
10226 (fbsd_info_proc): New.
10227 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10228 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10229 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10231 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10233 * fbsd-nat.c (struct free_deleter): Remove.
10234 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10236 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10238 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10239 NULL for an empty pathname.
10241 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10243 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10244 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10245 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10246 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10247 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10248 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10249 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10250 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10251 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10252 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10253 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10254 (fbsd_core_fetch_timeval, fbsd_print_sigset)
10255 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10256 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
10257 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10259 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
10261 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10262 (gnu_xfer_auxv): New function.
10263 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10264 TARGET_OBJECT_AUXV.
10266 2018-01-08 Yao Qi <yao.qi@linaro.org>
10267 Simon Marchi <simon.marchi@ericsson.com>
10269 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10271 (COMMON_OBS): Remove selftest.o.
10272 * configure.ac: Append selftest-arch.c and common/selftest.c to
10273 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
10274 * configure: Re-generated.
10275 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10277 (maintenance_info_selftests): Likewise.
10279 2018-01-08 Xavier Roirand <roirand@adacore.com>
10281 * ada-valprint.c (val_print_packed_array_elements): Use
10282 proper number of elements when printing an array indexed
10283 by an enumeration type.
10285 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10287 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10288 (dw2_get_file_names_reader): Adjust.
10289 (lookup_dwo_signatured_type): Adjust.
10290 (lookup_dwp_signatured_type): Adjust.
10291 (lookup_signatured_type): Adjust.
10292 (create_type_unit_group): Adjust.
10293 (get_type_unit_group): Adjust.
10294 (process_psymtab_comp_unit_reader): Adjust.
10295 (build_type_psymtabs_reader): Adjust.
10296 (scan_partial_symbols): Adjust.
10297 (add_partial_symbol): Adjust.
10298 (add_partial_subprogram): Adjust.
10299 (peek_die_abbrev): Adjust.
10300 (fixup_go_packaging): Adjust.
10301 (process_imported_unit_die): Adjust.
10302 (dwarf2_compute_name): Adjust.
10303 (dwarf2_physname): Adjust.
10304 (read_import_statement): Adjust.
10305 (handle_DW_AT_stmt_list): Adjust.
10306 (read_file_scope): Adjust.
10307 (read_func_scope): Adjust.
10308 (read_lexical_block_scope): Adjust.
10309 (read_call_site_scope): Adjust.
10310 (read_variable): Adjust.
10311 (dwarf2_rnglists_process): Adjust.
10312 (dwarf2_ranges_process): Adjust.
10313 (dwarf2_ranges_read): Adjust.
10314 (dwarf2_get_pc_bounds): Adjust.
10315 (dwarf2_record_block_ranges): Adjust.
10316 (dwarf2_add_field): Adjust.
10317 (dwarf2_add_member_fn): Adjust.
10318 (read_structure_type): Adjust.
10319 (process_structure_scope): Adjust.
10320 (read_enumeration_type): Adjust.
10321 (read_array_type): Adjust.
10322 (mark_common_block_symbol_computed): Adjust.
10323 (read_common_block): Adjust.
10324 (read_namespace_type): Adjust.
10325 (read_namespace): Adjust.
10326 (read_module_type): Adjust.
10327 (read_tag_pointer_type): Adjust.
10328 (read_tag_ptr_to_member_type): Adjust.
10329 (read_tag_string_type): Adjust.
10330 (read_subroutine_type): Adjust.
10331 (read_typedef): Adjust.
10332 (read_base_type): Adjust.
10333 (attr_to_dynamic_prop): Adjust.
10334 (read_subrange_type): Adjust.
10335 (read_unspecified_type): Adjust.
10336 (dwarf2_read_abbrevs): Adjust.
10337 (load_partial_dies): Adjust.
10338 (read_partial_die): Adjust.
10339 (find_partial_die): Adjust.
10340 (guess_partial_die_structure_name): Adjust.
10341 (fixup_partial_die): Adjust.
10342 (read_attribute_value): Adjust.
10343 (read_addr_index): Adjust.
10344 (read_addr_index_from_leb128): Adjust.
10345 (read_str_index): Adjust.
10346 (dwarf2_string_attr): Adjust.
10347 (get_debug_line_section): Adjust.
10348 (dwarf_decode_line_header): Adjust.
10349 (lnp_state_machine::check_line_address): Adjust.
10350 (dwarf_decode_lines_1): Adjust.
10351 (dwarf_decode_lines): Adjust.
10352 (dwarf2_start_symtab): Adjust.
10353 (var_decode_location): Adjust.
10354 (new_symbol_full): Adjust.
10355 (dwarf2_const_value_data): Adjust.
10356 (dwarf2_const_value_attr): Adjust.
10357 (dwarf2_const_value): Adjust.
10358 (die_type): Adjust.
10359 (die_containing_type): Adjust.
10360 (build_error_marker_type): Adjust.
10361 (lookup_die_type): Adjust.
10362 (guess_full_die_structure_name): Adjust.
10363 (anonymous_struct_prefix): Adjust.
10364 (determine_prefix): Adjust.
10365 (dwarf2_name): Adjust.
10366 (follow_die_ref_or_sig): Adjust.
10367 (follow_die_offset): Adjust.
10368 (follow_die_ref): Adjust.
10369 (follow_die_sig_1): Adjust.
10370 (follow_die_sig): Adjust.
10371 (get_signatured_type): Adjust.
10372 (get_DW_AT_signature_type): Adjust.
10373 (decode_locdesc): Adjust.
10374 (dwarf_decode_macros): Adjust.
10375 (cu_debug_loc_section): Adjust.
10376 (fill_in_loclist_baton): Adjust.
10377 (dwarf2_symbol_mark_computed): Adjust.
10378 (init_one_comp_unit): Don't assign
10379 dwarf2_cu::dwarf2_per_objfile.
10380 (set_die_type): Adjust.
10382 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10384 * dwarf2read.c (struct mapped_debug_names): Add constructor.
10385 <dwarf2_per_objfile>: New field.
10386 (dwarf2_per_objfile): Remove global.
10387 (get_dwarf2_per_objfile): New function.
10388 (set_dwarf2_per_objfile): New function.
10389 (dwarf2_build_psymtabs_hard): Change objfile parameter to
10390 dwarf2_per_objfile.
10391 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10392 (read_abbrev_offset): Likewise.
10393 (read_indirect_string): Likewise.
10394 (read_indirect_line_string): Likewise.
10395 (read_indirect_string_at_offset): Likewise.
10396 (read_indirect_string_from_dwz): Likewise.
10397 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10398 dwarf2_per_objfile.
10399 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10400 (create_all_comp_units): Change objfile parameter to
10401 dwarf2_per_objfile.
10402 (create_all_type_units): Likewise.
10403 (process_queue): Add dwarf2_per_objfile parameter.
10404 (read_and_check_comp_unit_head): Likewise.
10405 (lookup_dwo_unit_in_dwp): Likewise.
10406 (get_dwp_file): Likewise.
10407 (process_cu_includes): Likewise.
10408 (struct free_dwo_file_cleanup_data): New struct.
10409 (dwarf2_has_info): Use get_dwarf2_per_objfile and
10410 set_dwarf2_per_objfile.
10411 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10412 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10413 context, adjust calls.
10414 (dw2_instantiate_symtab): Likewise.
10415 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10416 (dw2_get_cu): Likewise.
10417 (create_cu_from_index_list): Change objfile parameter to
10418 dwarf2_per_objfile.
10419 (create_cus_from_index_list): Get dwarf2_per_objfile from
10420 context, adjust calls.
10421 (create_cus_from_index): Likewise.
10422 (create_signatured_type_table_from_index): Change objfile
10423 parameter to dwarf2_per_objfile.
10424 (create_signatured_type_table_from_debug_names): Change objfile
10425 parameter to dwarf2_per_objfile.
10426 (create_addrmap_from_index): Likewise.
10427 (create_addrmap_from_aranges): Likewise.
10428 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10429 (dw2_setup): Remove.
10430 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10432 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10433 get_dwarf2_per_objfile.
10434 (dw2_forget_cached_source_info): Likewise.
10435 (dw2_map_symtabs_matching_filename): Likewise.
10436 (struct dw2_symtab_iterator) <index>: Remove.
10437 <dwarf2_per_objfile>: New field.
10438 (dw2_symtab_iter_init): Replace index parameter with
10439 dwarf2_per_objfile.
10440 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10441 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10442 (dw2_print_stats): Likewise.
10443 (dw2_dump): Likewise.
10444 (dw2_expand_symtabs_for_function): Likewise.
10445 (dw2_expand_all_symtabs): Likewise.
10446 (dw2_expand_symtabs_with_fullname): Likewise.
10447 (dw2_expand_marked_cus): Replace index and objfile parameters
10448 with dwarf2_per_objfile.
10449 (dw_expand_symtabs_matching_file_matcher): Add
10450 dwarf2_per_objfile parameter and adjust calls.
10451 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10453 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10454 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10456 (create_cus_from_debug_names_list): Replace objfile parameter
10457 with dwarf2_per_objfile and adjust calls.
10458 (create_cus_from_debug_names): Likewise.
10459 (dwarf2_read_debug_names): Likewise.
10460 (mapped_debug_names::namei_to_name): Adjust call.
10461 (dw2_debug_names_iterator::next): Likewise.
10462 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10463 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10464 (dw2_debug_names_dump): Likewise.
10465 (dw2_debug_names_expand_symtabs_for_function): Likewise.
10466 (dw2_debug_names_expand_symtabs_matching): Likewise.
10467 (dwarf2_initialize_objfile): Likewise.
10468 (dwarf2_build_psymtabs): Likewise.
10469 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10471 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10472 (read_and_check_comp_unit_head): Likewise.
10473 (read_abbrev_offset): Likewise.
10474 (create_debug_type_hash_table): Likewise.
10475 (create_debug_types_hash_table): Likewise.
10476 (create_all_type_units): Replace objfile parameter with
10477 dwarf2_per_objfile.
10478 (add_type_unit): Add dwarf2_per_objfile parameter.
10479 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10480 with dwarf2_per_objfile.
10481 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10482 (lookup_dwp_signatured_type): Likewise.
10483 (lookup_signatured_type): Likewise.
10484 (read_cutu_die_from_dwo): Likewise.
10485 (init_tu_and_read_dwo_dies): Likewise.
10486 (init_cutu_and_read_dies): Likewise.
10487 (init_cutu_and_read_dies_no_follow): Likewise.
10488 (allocate_type_unit_groups_table): Add objfile parameter.
10489 (create_type_unit_group): Use dwarf2_per_objfile from cu.
10490 (get_type_unit_group): Likewise.
10491 (process_psymtab_comp_unit): Update call.
10492 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10493 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10494 (print_tu_stats): Likewise.
10495 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10496 in void* parameter.
10497 (build_type_psymtabs): Change objfile parameter to
10498 dwarf2_per_objfile.
10499 (process_skeletonless_type_unit): Use dwarf2_per_objfile
10500 passed in void* parameter.
10501 (process_skeletonless_type_units): Change objfile parameter to
10502 dwarf2_per_objfile.
10503 (set_partial_user): Likewise.
10504 (dwarf2_build_psymtabs_hard): Likewise.
10505 (read_comp_units_from_section): Likewise.
10506 (create_all_comp_units): Likewise.
10507 (scan_partial_symbols): Update calls.
10508 (add_partial_symbol): Likewise.
10509 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10510 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10511 (process_queue): Add dwarf2_per_objfile parameter.
10512 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10513 (compute_compunit_symtab_includes): Likewise.
10514 (process_cu_includes): Add dwarf2_per_objfile parameter.
10515 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10516 (process_full_type_unit): Likewise.
10517 (process_imported_unit_die): Update call.
10518 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10519 (read_file_scope): Likewise.
10520 (allocate_dwo_file_hash_table): Add objfile parameter.
10521 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10522 (create_cus_hash_table): Likewise.
10523 (create_dwp_hash_table): Likewise.
10524 (create_dwo_unit_in_dwp_v1): Likewise.
10525 (create_dwp_v2_section): Likewise.
10526 (create_dwo_unit_in_dwp_v2): Likewise.
10527 (lookup_dwo_unit_in_dwp): Likewise.
10528 (try_open_dwop_file): Likewise.
10529 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10530 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10531 cleanup to include a reference to dwarf2_per_objfile.
10532 (open_dwp_file): Add dwarf2_per_objfile parameter.
10533 (open_and_init_dwp_file): Likewise.
10534 (get_dwp_file): Likewise.
10535 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10536 (queue_and_load_all_dwo_tus): Update call.
10537 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10539 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10540 (dwarf2_ranges_process): Likewise.
10541 (dwarf2_get_pc_bounds): Likewise.
10542 (mark_common_block_symbol_computed): Likewise.
10543 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10544 (dwarf2_read_abbrevs): Update call.
10545 (read_partial_die): Use dwarf2_per_objfile from cu.
10546 (find_partial_die): Likewise.
10547 (fixup_partial_die): Likewise.
10548 (read_attribute_value): Likewise.
10549 (read_indirect_string_at_offset_from): Add objfile parameter.
10550 (read_indirect_string_at_offset): Add dwarf2_per_objfile
10552 (read_indirect_string_from_dwz): Add objfile parameter.
10553 (read_indirect_string): Add objfile parameter.
10554 (read_addr_index_1): Add dwarf2_per_objfile parameter.
10555 (read_addr_index): Use dwarf2_per_objfile from cu.
10556 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10558 (read_str_index): Use dwarf2_per_objfile from cu.
10559 (get_debug_line_section): Likewise.
10560 (read_formatted_entries): Add dwarf2_per_objfile parameter.
10561 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
10562 (new_symbol_full): Use dwarf2_per_objfile from cu.
10563 (build_error_marker_type): Likewise.
10564 (lookup_die_type): Likewise.
10565 (determine_prefix): Likewise.
10566 (follow_die_offset): Likewise.
10567 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
10568 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
10569 (dwarf2_fetch_die_type_sect_off): Likewise.
10570 (dwarf2_get_die_type): Likewise.
10571 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
10572 (get_signatured_type): Likewise.
10573 (get_DW_AT_signature_type): Likewise.
10574 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
10575 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
10576 (cu_debug_loc_section): Likewise.
10577 (fill_in_loclist_baton): Likewise.
10578 (dwarf2_symbol_mark_computed): Likewise.
10579 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10580 dwarf2_per_objfile.
10581 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
10583 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10584 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
10585 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
10586 (set_die_type): Use dwarf2_free_objfile from cu.
10587 (get_die_type_at_offset): Likewise.
10588 (dwarf2_per_objfile_free): Don't assign global variable.
10589 (debug_names) <constructor>: Add dwarf2_per_objfile
10590 parameter, update m_debugstrlookup construction.
10591 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
10593 <m_dwarf2_per_objfile>: New field.
10594 <lookup>: Use m_dwarf2_per_objfile.
10595 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
10596 (psyms_seen_size): Likewise.
10597 (write_gdbindex): Replace objfile parameter with
10598 dwarf2_per_objfile.
10599 (write_debug_names): Likewise.
10600 (write_psymtabs_to_index): Likewise.
10601 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
10604 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10606 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
10607 <dwarf2_per_objfile>: New field.
10608 (struct dwarf2_per_cu_data) <objfile>: Remove.
10609 <dwarf2_per_objfile>: New field.
10610 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
10612 (create_signatured_type_table_from_index): Likewise.
10613 (create_debug_type_hash_table): Likewise.
10614 (fill_in_sig_entry_from_dwo_entry): Likewise.
10615 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
10616 (create_type_unit_group): Assign dwarf2_per_objfile instead of
10618 (create_partial_symtab): Access objfile through
10619 dwarf2_per_objfile.
10620 (process_psymtab_comp_unit_reader): Likewise.
10621 (read_comp_units_from_section): Likewise.
10622 (scan_partial_symbols): Likewise.
10623 (add_partial_symbol): Likewise.
10624 (add_partial_subprogram): Likewise.
10625 (peek_die_abbrev): Likewise.
10626 (fixup_go_packaging): Likewise.
10627 (process_full_comp_unit): Likewise.
10628 (process_full_type_unit): Likewise.
10629 (process_imported_unit_die): Likewise.
10630 (dwarf2_compute_name): Likewise.
10631 (dwarf2_physname): Likewise.
10632 (read_import_statement): Likewise.
10633 (create_cus_hash_table): Assign dwarf2_physname instead of
10635 (read_func_scope): Access objfile through dwarf2_per_objfile.
10636 (read_lexical_block_scope): Likewise.
10637 (read_call_site_scope): Likewise.
10638 (read_variable): Likewise.
10639 (dwarf2_rnglists_process): Likewise.
10640 (dwarf2_ranges_process): Likewise.
10641 (dwarf2_ranges_read): Likewise.
10642 (dwarf2_record_block_ranges): Likewise.
10643 (dwarf2_add_field): Likewise.
10644 (dwarf2_add_member_fn): Likewise.
10645 (read_structure_type): Likewise.
10646 (process_structure_scope): Likewise.
10647 (read_enumeration_type): Likewise.
10648 (read_array_type): Likewise.
10649 (read_common_block): Likewise.
10650 (read_namespace_type): Likewise.
10651 (read_namespace): Likewise.
10652 (read_module_type): Likewise.
10653 (read_tag_pointer_type): Likewise.
10654 (read_tag_ptr_to_member_type): Likewise.
10655 (read_tag_string_type): Likewise.
10656 (read_subroutine_type): Likewise.
10657 (read_typedef): Likewise.
10658 (read_base_type): Likewise.
10659 (attr_to_dynamic_prop): Likewise.
10660 (read_subrange_type): Likewise.
10661 (read_unspecified_type): Likewise.
10662 (load_partial_dies): Likewise.
10663 (read_partial_die): Likewise.
10664 (find_partial_die): Likewise.
10665 (guess_partial_die_structure_name): Likewise.
10666 (fixup_partial_die): Likewise.
10667 (read_attribute_value): Likewise.
10668 (read_addr_index_from_leb128): Likewise.
10669 (dwarf2_read_addr_index): Likewise.
10670 (dwarf2_string_attr): Likewise.
10671 (lnp_state_machine::check_line_address): Likewise.
10672 (dwarf_decode_lines_1): Likewise.
10673 (dwarf_decode_lines): Likewise.
10674 (dwarf2_start_symtab): Likewise.
10675 (var_decode_location): Likewise.
10676 (new_symbol_full): Likewise.
10677 (dwarf2_const_value_data): Likewise.
10678 (dwarf2_const_value_attr): Likewise.
10679 (dwarf2_const_value): Likewise.
10680 (die_type): Likewise.
10681 (die_containing_type): Likewise.
10682 (lookup_die_type): Likewise.
10683 (guess_full_die_structure_name): Likewise.
10684 (anonymous_struct_prefix): Likewise.
10685 (dwarf2_name): Likewise.
10686 (follow_die_ref_or_sig): Likewise.
10687 (follow_die_offset): Likewise.
10688 (follow_die_ref): Likewise.
10689 (dwarf2_fetch_die_loc_sect_off): Likewise.
10690 (dwarf2_fetch_constant_bytes): Likewise.
10691 (dwarf2_fetch_die_type_sect_off): Likewise.
10692 (dwarf2_get_die_type): Likewise.
10693 (follow_die_sig): Likewise.
10694 (decode_locdesc): Likewise.
10695 (dwarf2_per_cu_objfile): Likewise.
10696 (dwarf2_per_cu_text_offset): Likewise.
10697 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
10699 (set_die_type): Access objfile through
10700 dwarf2_per_objfile.
10702 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10704 * valprint.c (converted_character_d): Remove typedef.
10705 (DEF_VEC_O (converted_character_d)): Remove.
10706 (count_next_character): Use std::vector.
10707 (print_converted_chars_to_obstack): Likewise.
10708 (generic_printstr): Likewise.
10710 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10712 * xml-support.h (struct gdb_xml_value): Add constructor.
10713 <value>: Change type to unique_xmalloc_ptr.
10714 (gdb_xml_value_s): Remove typedef.
10715 (DEF_VEC_O (gdb_xml_value_s)): Remove.
10716 (gdb_xml_element_start_handler): Change parameter type to
10718 (xml_find_attribute): Likewise.
10719 * xml-support.c (xml_find_attribute): Change parameter type to
10720 std::vector and adjust.
10721 (gdb_xml_values_cleanup): Remove.
10722 (gdb_xml_parser::start_element): Adjust to std::vector.
10723 (xinclude_start_include): Change paraeter type to std::vector
10725 * btrace.c (check_xml_btrace_version): Likewise.
10726 (parse_xml_btrace_block): Likewise.
10727 (parse_xml_btrace_pt_config_cpu): Likewise.
10728 (parse_xml_btrace_pt): Likewise.
10729 (parse_xml_btrace_conf_bts): Likewise.
10730 (parse_xml_btrace_conf_pt): Likewise.
10731 * memory-map.c (memory_map_start_memory): Likewise.
10732 (memory_map_start_property): Likewise.
10733 * osdata.c (osdata_start_osdata): Likewise.
10734 (osdata_start_item): Likewise.
10735 (osdata_start_column): Likewise.
10736 * remote.c (start_thread): Likewise.
10737 * solib-aix.c (library_list_start_library): Likewise.
10738 (library_list_start_list): Likewise.
10739 * solib-svr4.c (library_list_start_library): Likewise.
10740 (svr4_library_list_start_list): Likewise.
10741 * solib-target.c (library_list_start_segment): Likewise.
10742 (library_list_start_section): Likewise.
10743 (library_list_start_library): Likewise.
10744 (library_list_start_list): Likewise.
10745 * tracepoint.c (traceframe_info_start_memory): Likewise.
10746 (traceframe_info_start_tvar): Likewise.
10747 * xml-syscall.c (syscall_start_syscall): Likewise.
10748 * xml-tdesc.c (tdesc_start_target): Likewise.
10749 (tdesc_start_feature): Likewise.
10750 (tdesc_start_reg): Likewise.
10751 (tdesc_start_union): Likewise.
10752 (tdesc_start_struct): Likewise.
10753 (tdesc_start_flags): Likewise.
10754 (tdesc_start_enum): Likewise.
10755 (tdesc_start_field): Likewise.
10756 (tdesc_start_enum_value): Likewise.
10757 (tdesc_start_vector): Likewise.
10759 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10761 * extension.h (struct xmethod_worker) <clone>: Remove.
10762 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
10764 (python_xmethod_worker::clone): Remove.
10765 * valops.c (find_overload_match): Use std::move instead of
10768 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10770 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
10771 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
10772 <free_xmethod_worker_data>: Remove.
10773 <get_matching_xmethod_workers>: Chance VEC to std::vector.
10774 <get_xmethod_arg_types>: Remove.
10775 <get_xmethod_result_type>: Remove.
10776 <invoke_xmethod>: Remove.
10777 * extension.c (new_xmethod_worker): Remove.
10778 (clone_xmethod_worker): Remove.
10779 (get_matching_xmethod_workers): Return void, pass std::vector by
10781 (get_xmethod_arg_types): Rename to...
10782 (xmethod_worker::get_arg_types): ... this, and adjust.
10783 (get_xmethod_result_type): Rename to...
10784 (xmethod_worker::get_result_type): ... this, and adjust.
10785 (invoke_xmethod): Remove.
10786 (free_xmethod_worker): Remove.
10787 (free_xmethod_worker_vec): Remove.
10788 * extension.h (enum ext_lang_rc): Move here from
10790 (struct xmethod_worker): Add constructor and destructor.
10793 <invoke, clone, do_get_result_type, do_get_arg_types>: New
10794 virtual pure methods.
10795 <get_arg_types, get_result_type>: New methods.
10796 (xmethod_worker_ptr): Remove typedef.
10797 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
10798 (xmethod_worker_vec): Remove typedef.
10799 (xmethod_worker_up): New typedef.
10800 (invoke_xmethod): Remove.
10801 (clone_xmethod_worker): Remove.
10802 (free_xmethod_worker): Remove.
10803 (free_xmethod_worker_vec): Remove.
10804 (get_xmethod_arg_types): Remove.
10805 (get_xmethod_result_type): Remove.
10806 * valops.c (find_method_list): Use std::vector, don't use
10807 intermediate vector.
10808 (value_find_oload_method_list): Use std::vector.
10809 (find_overload_match): Use std::vector.
10810 (find_oload_champ): Use std::vector.
10811 * value.c (value_free): Use operator delete.
10812 (value_of_xmethod): Rename to...
10813 (value_from_xmethod): ... this. Don't assign
10814 xmethod_worker::value, take rvalue-reference.
10815 (result_type_of_xmethod): Adjust.
10816 (call_xmethod): Adjust.
10817 * value.h: Include extension.h.
10818 (struct xmethod_worker): Don't forward-declare.
10819 (value_of_xmethod): Rename to...
10820 (value_from_xmethod): ... this, take rvalue-reference.
10821 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
10822 (struct python_xmethod_worker): ... this, add constructor and
10824 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
10825 (gdbpy_free_xmethod_worker_data): Rename to...
10826 (python_xmethod_worker::~python_xmethod_worker): ... this and
10828 (gdbpy_clone_xmethod_worker_data): Rename to...
10829 (python_xmethod_worker::clone): ... this and adjust.
10830 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
10832 (gdbpy_get_xmethod_arg_types): Rename to...
10833 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
10834 (gdbpy_get_xmethod_result_type): Rename to...
10835 (python_xmethod_worker::do_get_result_type): ... this and
10837 (gdbpy_invoke_xmethod): Rename to...
10838 (python_xmethod_worker::invoke): ... this and adjust.
10839 (new_python_xmethod_worker): Rename to...
10840 (python_xmethod_worker::python_xmethod_worker): ... this and
10842 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
10844 (gdbpy_free_xmethod_worker_data): Remove.
10845 (gdbpy_get_matching_xmethod_workers): Use std::vector.
10846 (gdbpy_get_xmethod_arg_types): Remove.
10847 (gdbpy_get_xmethod_result_type): Remove.
10848 (gdbpy_invoke_xmethod): Remove.
10849 * python/python.c (python_extension_ops): Remove obsolete
10852 2018-01-05 Pedro Alves <palves@redhat.com>
10855 * common/signals-state-save-restore.c
10856 (save_original_signals_state): New parameter 'quiet'. Warn if we
10857 find a custom handler preinstalled, instead of internal erroring.
10858 But only warn if !quiet.
10859 * common/signals-state-save-restore.h
10860 (save_original_signals_state): New parameter 'quiet'.
10861 * main.c (captured_main_1): Move save_original_signals_state call
10862 after option handling, and pass QUIET.
10864 2018-01-05 Pedro Alves <palves@redhat.com>
10866 * spu-tdep.c (spu_catch_start): Pass
10867 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
10869 2018-01-05 Pedro Alves <palves@redhat.com>
10872 * ada-lang.c (literal_symbol_name_matcher): New function.
10873 (ada_get_symbol_name_matcher): Use it for
10874 symbol_name_match_type::SEARCH_NAME.
10875 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
10876 it down instead of assuming symbol_name_match_type::FULL.
10877 * block.h (block_lookup_symbol): New parameter 'match_type'.
10878 * c-valprint.c (print_unpacked_pointer): Use
10879 lookup_symbol_search_name instead of lookup_symbol.
10880 * compile/compile-object-load.c (get_out_value_type): Pass down
10881 symbol_name_match_type::SEARCH_NAME.
10882 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
10883 symbol_name_match_type::FULL.
10884 * cp-support.c (cp_get_symbol_name_matcher): Handle
10885 symbol_name_match_type::SEARCH_NAME.
10886 * infrun.c (insert_exception_resume_breakpoint): Use
10887 lookup_symbol_search_name.
10888 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
10889 * psymtab.c (maintenance_check_psymtabs): Use
10890 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
10891 * stack.c (print_frame_args): Use lookup_symbol_search_name and
10892 SYMBOL_SEARCH_NAME.
10893 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
10894 if symbol_name_match_type::SEARCH_NAME.
10895 (lookup_symbol_in_language): Pass down
10896 symbol_name_match_type::FULL.
10897 (lookup_symbol_search_name): New.
10898 (lookup_language_this): Pass down
10899 symbol_name_match_type::SEARCH_NAME.
10900 (lookup_symbol_aux, lookup_local_symbol): New parameter
10901 'match_type'. Pass it down.
10902 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
10903 (lookup_symbol_search_name): New declaration.
10904 (lookup_symbol_in_block): New 'match_type' parameter.
10906 2018-01-05 Pedro Alves <palves@redhat.com>
10909 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
10911 (ada_lookup_symbol): Reimplement in terms of
10912 ada_lookup_symbol_list, bits factored out from
10913 ada_lookup_encoded_symbol.
10915 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10917 * ada-exp.y (write_object_renaming): When subscripting an array
10918 using a symbol as the index, pass the block in call to
10919 ada_lookup_encoded_symbol when looking that symbol up.
10921 2018-01-05 Jerome Guitton <guitton@adacore.com>
10923 * ada-lang.c (ada_array_length): Use ada_index_type instead of
10926 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10928 * ada-lang.c (ada_to_fixed_value_create): Add handling of
10929 the case where VALUE_LVAL (val0) is not lval_memory.
10931 2018-01-05 Xavier Roirand <roirand@adacore.com>
10933 * ada-valprint.c (print_optional_low_bound): Handle
10934 character-indexed array printing like boolean-indexed array
10937 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10939 * NEWS: Create a new section for the next release branch.
10940 Rename the section of the current branch, now that it has
10943 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10945 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
10946 * version.in: Bump version to 8.1.50.DATE-git.
10948 2018-01-03 Xavier Roirand <roirand@adacore.com>
10950 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
10952 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
10954 (default_exception_support_info) <catch_handlers_sym>: Add field.
10955 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
10956 (ada_exception_name_addr_1): Add "catch handlers" handling.
10957 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
10958 Update all callers.
10959 (create_excep_cond_exprs) <ex>: Add parameter.
10960 (re_set_exception): Update create_excep_cond_exprs call.
10961 (print_it_exception, print_one_exception, print_mention_exception)
10962 (print_recreate_exception): Add "catch handler" handling.
10963 (allocate_location_catch_handlers, re_set_catch_handlers)
10964 (check_status_catch_handlers, print_it_catch_handlers)
10965 (print_one_catch_handlers, print_mention_catch_handlers)
10966 (print_recreate_catch_handlers): New function.
10967 (catch_handlers_breakpoint_ops): New variable.
10968 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
10969 Add parameter. Add "catch handler" handling.
10970 (ada_exception_sym_name, ada_exception_breakpoint_ops):
10971 Add "catch handler" handling.
10972 (ada_exception_catchpoint_cond_string): Add "catch handler"
10974 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
10976 (catch_ada_handlers_command): New function.
10977 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
10978 operations structure.
10979 (_initialize_ada_language): Add "catch handlers" command entry.
10980 * NEWS: Document "catch handlers" feature.
10982 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10984 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
10985 account when creating the array type of the slice.
10986 (ada_value_slice): Likewise.
10988 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10990 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
10992 (create_array_type_with_stride): Add byte_stride_prop parameter.
10993 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
10994 New parameter. Update all callers in this file.
10995 (array_type_has_dynamic_stride): New function.
10996 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
10997 of arrays with dynamic byte strides.
10998 * dwarf2read.c (read_array_type): Add support for dynamic
10999 DW_AT_byte_stride attributes.
11001 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11003 * dwarf2read.c (read_unspecified_type): Treat
11004 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11006 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11008 Update copyright year range in all GDB files.
11010 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11012 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11013 and gdb/testsuite/gdb.base/step-line.c.
11015 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11017 * copyright.py (main): Dump the contents of
11018 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11019 even if BY_HAND is empty.
11021 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11023 * top.c (print_gdb_version): Update Copyright year in version
11026 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11028 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11030 For older changes see ChangeLog-2017.
11036 version-control: never