1 2018-07-25 Joel Brobecker <brobecker@adacore.com>
3 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
5 2018-07-24 Keith Seitz <keiths@redhat.comt
8 * dwarf2read.c (dw2_add_symbol_to_list): New function.
9 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
10 instead of add_symbol_to_list.
11 (read_file_scope): Call prepare_one_comp_unit before reading
14 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
16 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
18 2018-07-24 Tom Tromey <tom@tromey.com>
20 * utils.c (malloc, realloc, free): Don't declare.
21 * configure, config.in: Rebuild.
22 * configure.ac: Don't check for declarations of free, malloc, or
25 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
28 (aarch64_linux_nat_target::stopped_data_address): Remove unused
30 * arm-linux-nat.c (fetch_regs): Likewise.
31 (store_regs): Likewise.
32 (fetch_vfp_regs): Likewise.
33 (store_vfp_regs): Likewise.
34 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
35 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
36 (arm_linux_nat_target::insert_watchpoint): Likewise.
37 (arm_linux_nat_target::remove_watchpoint): Likewise.
38 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
40 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
42 * ppc-linux-nat.c (fetch_register): Likewise.
43 (fetch_all_gp_regs): Likewise.
44 (fetch_ppc_registers): Likewise.
45 (store_all_gp_regs): Likewise.
46 (store_ppc_registers): Likewise.
47 (hwdebug_insert_point): Likewise.
48 (can_use_watchpoint_cond_accel): Likewise.
49 * remote-sim.c (gdb_os_write_stdout): Likewise.
51 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
52 Tom Tromey <tom@tromey.com>
54 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
58 2018-07-22 Tom Tromey <tom@tromey.com>
60 * regformats/regdat.sh: Define xmltarget_${name} inside
61 #ifndef IN_PROCESS_AGENT.
63 2018-07-22 Tom Tromey <tom@tromey.com>
65 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
67 2018-07-22 Tom Tromey <tom@tromey.com>
69 * symfile.c (reread_symbols): Notify iter, not objfile.
71 2018-07-22 Tom Tromey <tom@tromey.com>
73 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
75 (ravenscar_thread_target::prepare_to_store): Likewise.
77 2018-07-22 Tom Tromey <tom@tromey.com>
79 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
80 unused variable. Call value_fetch_lazy when needed.
81 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
82 Remove unused variable. Call value_fetch_lazy when needed.
84 2018-07-22 Tom Tromey <tom@tromey.com>
86 * m32c-tdep.c (mark_dma): Return void.
87 (make_regs): Remove unused declarations.
89 2018-07-22 Tom Tromey <tom@tromey.com>
91 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
92 cmdscm_get_valid_command_smob_arg_unsafe for effect.
93 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
94 bkscm_get_valid_block_smob_arg_unsafe for effect.
96 2018-07-22 Tom Tromey <tom@tromey.com>
98 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
101 2018-07-22 Tom Tromey <tom@tromey.com>
103 * windows-nat.c (saved_context): Conditionally define.
104 * remote.c (remote_target::remote_btrace_maybe_reopen):
105 Conditionally declare "warned".
106 * inflow.c (sigquit_ours): Conditionally define.
107 (new_tty): Move "tty" declaration inside #if.
108 * guile/guile.c (guile_datadir): Conditionally define.
109 * charset.c (set_be_le_names): Move some declarations inside #if.
110 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
112 (parse_xml_btrace_conf): Likewise.
114 2018-07-22 Tom Tromey <tom@tromey.com>
116 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
118 2018-07-22 Tom Tromey <tom@tromey.com>
120 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
121 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
122 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
123 * buildsym-legacy.c (get_macro_table): Remove unused variable.
124 * stack.c (frame_apply_level_command): Remove unused variable.
125 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
126 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
127 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
129 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
130 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
131 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
133 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
134 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
136 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
137 Remove unused variable.
138 * cli/cli-script.c (recurse_read_control_structure): Remove unused
140 * common/tdesc.c (print_xml_feature::visit): Remove unused
142 * compile/compile-object-load.c (store_regs): Remove unused
144 * complaints.c (clear_complaints): Remove unused variable.
145 * corelow.c (core_target_open): Remove unused variable.
146 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
148 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
150 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
152 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
154 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
156 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
158 * ia64-tdep.c (examine_prologue): Remove unused variable.
159 * infcall.c (run_inferior_call): Remove unused variable.
160 * inferior.c (exit_inferior): Remove unused variable.
161 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
162 * linespec.c (decode_line_2): Remove unused variable.
163 * linux-nat.c (super_close): Remove.
164 * linux-tdep.c (linux_info_proc): Remove unused variable.
165 * mi/mi-main.c (mi_execute_command): Remove unused variable.
166 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
167 Remove unused variable.
168 * parse.c (find_minsym_type_and_address): Remove unused variable.
169 * printcmd.c (info_symbol_command, printf_floating): Remove unused
171 * python/py-breakpoint.c (bppy_set_commands): Remove unused
173 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
175 * record-btrace.c (record_btrace_target::store_registers): Remove
177 (cmd_show_record_btrace_cpu): Remove unused variable.
178 * riscv-tdep.c (riscv_register_reggroup_p)
179 (riscv_push_dummy_call, riscv_return_value): Remove unused
181 * rust-exp.y (literal): Remove unused variable.
182 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
184 <STRUCTOP_ANONYMOUS>: Likewise.
185 * s390-linux-tdep.c (s390_linux_init_abi_31)
186 (s390_linux_init_abi_64): Remove unused variable.
187 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
188 (file_select_thread, net_windows_open, _initialize_ser_windows):
189 Remove unused variables.
190 * symtab.c (find_pc_sect_line): Remove unused variable.
191 * target-memory.c (compute_garbled_blocks): Remove unused
193 (target_write_memory_blocks): Remove unused variable.
194 * target.c (target_stack::unpush): Remove unused variables.
195 * tracepoint.c (start_tracing, all_tracepoint_actions)
196 (merge_uploaded_trace_state_variables)
197 (print_one_static_tracepoint_marker): Remove unused variable.
198 * unittests/basic_string_view/element_access/char/1.cc (test01):
199 Remove unused variable.
200 * windows-nat.c (windows_continue, windows_add_all_dlls)
201 (do_initial_windows_stuff, windows_nat_target::create_inferior):
202 Remove unused variables.
204 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
206 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
207 attr_profile in HAVE_ELF.
208 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
211 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
213 * frame.c (frame_register_unwind): Change parameter name.
214 (frame_unwind_register): Likewise.
215 (frame_unwind_register_value): Likewise.
216 (frame_unwind_register_signed): Likewise.
217 (frame_unwind_register_unsigned): Likewise.
218 * frame.h (frame_register_unwind): Likewise.
219 (frame_unwind_register): Likewise.
220 (frame_unwind_register_value): Likewise.
221 (frame_unwind_register_signed): Likewise.
222 (frame_unwind_register_unsigned): Likewise.
223 (frame_unwind_arch): Likewise.
225 2018-07-20 Maciej W. Rozycki <macro@mips.com>
227 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
230 2018-07-20 Maciej W. Rozycki <macro@mips.com>
232 * mips-linux-nat.c (mips_linux_nat_target::read_description):
233 Call `get_ptrace_pid' rather than extracting the ptrace PID by
236 2018-07-20 Keith Seitz <keiths@redhat.com>
238 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
239 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
240 m_compunit_symtab, m_language>: Add "m_" prefix.
242 * buildsym.c: Update all uses.
244 2018-07-20 Tom Tromey <tom@tromey.com>
246 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
247 * buildsym.h (record_line_ftype): Remove typedef.
249 2018-07-20 Tom Tromey <tom@tromey.com>
251 * buildsym-legacy.h (augment_type_symtab): Don't declare.
252 (end_expandable_symtab): Likewise.
253 (end_symtab_get_static_block): Likewise.
254 (end_symtab_from_static_block): Likewise.
255 * buildsym-legacy.c (augment_type_symtab): Remove.
256 (end_expandable_symtab): Remove.
257 (end_symtab_get_static_block): Remove.
258 (end_symtab_from_static_block): Remove.
260 2018-07-20 Tom Tromey <tom@tromey.com>
262 * dwarf2read.c: Include buildsym.h.
263 (struct dwarf2_cu) <builder>: New method.
264 (fixup_go_packaging): Update.
265 (process_full_comp_unit, process_full_type_unit): Update. Don't
266 use scoped_free_pendings.
267 (using_directives): Add "cu" parameter, remove "language".
268 (read_import_statement, setup_type_unit_groups, )
269 (read_func_scope, read_lexical_block_scope)
270 (dwarf2_record_block_ranges, read_namespace): Update.
271 (lnp_state_machine::lnp_state_machine): Add cu parameter.
272 (lnp_state_machine::handle_end_sequence): Update.
273 (class lnp_state_machine) <m_cu>: New member.
274 <m_record_line_callback>: Remove.
275 <m_currently_recording_lines>: New member.
276 (lnp_state_machine::handle_set_file): Update.
277 (noop_record_line): Remove.
278 (dwarf_record_line_p): Add cu parameter.
279 (dwarf_record_line_1, dwarf_finish_line): Likewise.
280 (lnp_state_machine::record_line)
281 (lnp_state_machine::lnp_state_machine)
282 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
283 (dwarf_decode_lines): Update.
284 (dwarf2_start_subfile): Add cu parameter.
285 (dwarf2_start_symtab, new_symbol): Update.
286 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
287 Remove dwarf2_per_objfile parameter.
288 (dwarf_decode_macros): Update.
290 2018-07-20 Tom Tromey <tom@tromey.com>
292 * stabsread.c (define_symbol): Update.
293 * buildsym-legacy.h (get_buildsym_compunit): Declare.
294 * dwarf2read.c (new_symbol): Update.
295 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
296 * cp-namespace.c: Include buildsym.h.
297 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
298 * buildsym-legacy.c (get_buildsym_compunit): New function.
300 2018-07-20 Tom Tromey <tom@tromey.com>
302 * xcoffread.c: Include buildsym-legacy.h.
303 * windows-nat.c: Include buildsym-legacy.h.
304 * stabsread.c: Include buildsym-legacy.h.
305 * mdebugread.c: Include buildsym-legacy.h.
306 * buildsym-legacy.h: New file.
307 * buildsym-legacy.c: New file, from buildsym.c.
308 * go32-nat.c: Include buildsym-legacy.h.
309 * dwarf2read.c: Include buildsym-legacy.h.
310 * dbxread.c: Include buildsym-legacy.h.
311 * cp-namespace.c: Include buildsym-legacy.h.
312 * coffread.c: Include buildsym-legacy.h.
313 * buildsym.h: Move some contents to buildsym-legacy.h.
314 * buildsym.c: Include buildsym-legacy.h. Move many functions to
316 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
318 2018-07-20 Tom Tromey <tom@tromey.com>
320 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
321 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
322 (buildsym_compunit::buildsym_compunit)
323 (buildsym_compunit::~buildsym_compunit)
324 (buildsym_compunit::get_macro_table): Define.
326 2018-07-20 Tom Tromey <tom@tromey.com>
328 * buildsym.c (reset_symtab_globals): Remove.
329 (buildsym_compunit::end_symtab_from_static_block): Update.
330 (buildsym_compunit::augment_type_symtab): Update.
331 (end_symtab_from_static_block): Call free_buildsym_compunit.
332 (augment_type_symtab, end_symtab, end_expandable_symtab):
335 2018-07-20 Tom Tromey <tom@tromey.com>
337 * arch-utils.c: Do not include buildsym.h.
338 * mipsread.c: Do not include buildsym.h.
339 * machoread.c: Do not include buildsym.h.
340 * elfread.c: Do not include buildsym.h.
342 2018-07-20 Tom Tromey <tom@tromey.com>
344 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
346 (buildsym_compunit): Add new constructor.
347 (struct buildsym_compunit) <get_last_source_file, finish_block,
348 record_block_range, start_subfile, patch_subfile_names,
349 push_subfile, pop_subfile, record_line, get_compunit_symtab,
350 set_last_source_start_addr, get_last_source_start_addr,
351 get_local_using_directives, set_local_using_directives,
352 get_global_using_directives, outermost_context_p,
353 get_current_context_stack, get_context_stack_depth,
354 get_current_subfile, get_local_symbols, get_file_symbols,
355 get_global_symbols, record_debugformat, record_producer,
356 push_context, pop_context, end_symtab_get_static_block,
357 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
359 <record_pending_block, finish_block_internal, make_blockvector,
360 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
364 2018-05-22 Tom Tromey <tom@tromey.com>
366 * buildsym.c (record_pending_block): Move earlier. Remove objfile
368 (finish_block_internal): Update.
370 2018-07-20 Tom Tromey <tom@tromey.com>
372 * buildsym.c (record_pending_block): Move earlier. Remove objfile
374 (finish_block_internal): Update.
376 2018-07-20 Tom Tromey <tom@tromey.com>
378 * buildsym.h (EXTERN): Don't define or undef.
379 * buildsym.c (EXTERN): Don't define.
381 2018-07-20 Tom Tromey <tom@tromey.com>
383 * buildsym.c: Remove TODO comment.
385 2018-07-20 Tom Tromey <tom@tromey.com>
387 * coffread.c (coff_symtab_read): Update.
388 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
389 (xcoff_new_init): Update.
390 * mipsread.c (mipscoff_new_init): Update.
391 * mdebugread.c (mdebug_build_psymtabs): Update.
392 * elfread.c (elf_new_init): Update.
393 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
395 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
396 (coffstab_build_psymtabs, elfstab_build_psymtabs)
397 (stabsect_build_psymtabs): Update.
398 * buildsym.h (buildsym_init): Don't declare.
399 * buildsym.c: Update comment.
400 (prepare_for_building): Remove.
401 (start_symtab, restart_symtab): Update.
402 (reset_symtab_globals): Update comment.
403 (buildsym_init): Remove.
405 2018-07-20 Tom Tromey <tom@tromey.com>
407 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
408 * stabsread.c (patch_block_stabs, define_symbol, read_type)
409 (read_enum_type, common_block_start, common_block_end)
410 (cleanup_undefined_types_1, finish_global_stabs): Update.
411 * mdebugread.c (psymtab_to_symtab_1): Update.
412 * dwarf2read.c (fixup_go_packaging, read_func_scope)
413 (read_lexical_block_scope, new_symbol): Update.
414 * dbxread.c (process_one_symbol): Update.
415 * coffread.c (coff_symtab_read, process_coff_symbol)
416 (coff_read_enum_type): Update.
417 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
419 (get_local_symbols, get_file_symbols, get_global_symbols): New
421 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
423 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
424 (~scoped_free_pendings): Update.
425 (finish_block, prepare_for_building, reset_symtab_globals)
426 (end_symtab_get_static_block, end_symtab_with_blockvector)
427 (augment_type_symtab, push_context): Update.
428 (get_local_symbols, get_file_symbols, get_global_symbols): New
430 (buildsym_init): Update.
432 2018-07-20 Tom Tromey <tom@tromey.com>
434 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
435 (process_full_type_unit): Likewise.
436 (dwarf2_start_symtab): Set list_in_scope.
438 2018-07-20 Tom Tromey <tom@tromey.com>
440 * dwarf2read.c (process_psymtab_comp_unit_reader)
441 (build_type_psymtabs_reader): Do not set list_in_scope.
443 2018-07-20 Tom Tromey <tom@tromey.com>
445 * buildsym.c (free_pendings): Remove.
446 (add_symbol_to_list, scoped_free_pendings)
447 (finish_block_internal, buildsym_init): Update.
449 2018-07-20 Tom Tromey <tom@tromey.com>
451 * xcoffread.c (read_xcoff_symtab): Update.
452 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
454 * dbxread.c (process_one_symbol): Update.
455 * coffread.c (coff_symtab_read): Update.
456 * buildsym.h (finish_block): Update.
457 * buildsym.c (finish_block): Remove "listhead" argument.
458 (end_symtab_get_static_block): Update.
460 2018-07-20 Tom Tromey <tom@tromey.com>
462 * buildsym.h (class scoped_free_pendings): Remove constructor.
463 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
465 <m_pending_block_obstack, m_pending_blocks>: New members.
466 (pending_block_obstack, pending_blocks): Remove.
467 (scoped_free_pendings::scoped_free_pendings): Default.
468 (~scoped_free_pendings): Update.
469 (free_pending_blocks): Remove.
470 (finish_block_internal, record_pending_block, make_blockvector)
471 (end_symtab_get_static_block, augment_type_symtab, push_context)
472 (buildsym_init): Update.
474 2018-07-20 Tom Tromey <tom@tromey.com>
476 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
477 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
479 (pending_addrmap, pending_addrmap_obstack)
480 (pending_addrmap_interesting): Remove.
481 (scoped_free_pendings, record_block_range, make_blockvector)
482 (prepare_for_building, reset_symtab_globals, buildsym_init):
485 2018-07-20 Tom Tromey <tom@tromey.com>
487 * xcoffread.c (process_linenos): Update.
488 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
489 * mdebugread.c (psymtab_to_symtab_1): Update.
490 * dwarf2read.c (setup_type_unit_groups)
491 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
492 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
493 * dbxread.c (process_one_symbol): Update.
494 * coffread.c (coff_symtab_read, enter_linenos)
495 (process_coff_symbol): Update.
496 * buildsym.h (current_subfile): Don't declare.
497 (get_current_subfile): Declare.
498 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
500 (start_subfile, free_buildsym_compunit, push_subfile)
501 (prepare_for_building, start_symtab): Update.
502 (get_current_subfile): New function.
504 2018-07-20 Tom Tromey <tom@tromey.com>
506 * coffread.c (coff_symtab_read): Update.
507 * xcoffread.c (read_xcoff_symtab): Update.
508 * dwarf2read.c (new_symbol): Update.
509 (read_func_scope, read_lexical_block_scope): Update.
510 * dbxread.c (process_one_symbol): Update.
511 * buildsym.h (context_stack, context_stack_depth): Don't declare.
512 (outermost_context_p): Remove macro.
513 (outermost_context_p, get_current_context_stack)
514 (get_context_stack_depth): Declare.
515 (pop_context): Return struct context_stack.
516 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
518 (context_stack_size): Remove.
519 (INITIAL_CONTEXT_STACK_SIZE): Remove.
520 (prepare_for_building, end_symtab_get_static_block)
521 (augment_type_symtab, push_context): Update.
522 (pop_context): Return struct context_stack.
523 (outermost_context_p, get_current_context_stack)
524 (get_context_stack_depth): New functions.
525 (buildsym_init): Update.
527 2018-07-20 Tom Tromey <tom@tromey.com>
529 * rust-exp.y: Now a pure parser. Update all rules.
530 (%union): Move earlier.
531 (current_parser, work_obstack): Remove globals.
532 (rust_parser, ~rust_parser): Update.
533 (class rust_parser) <copy_name, concat3, crate_name, super_name,
534 lex_character, lex_number, lex_string, lex_identifier,
535 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
536 convert_name, convert_params_to_expression,
537 convert_ast_to_expression, ast_basic_type, ast_operation,
538 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
539 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
540 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
541 ast_array_type, ast_slice_type, ast_reference_type,
542 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
543 (rust_parse): Update.
544 (rustyyerror, rustyylex): Add parser parameter.
545 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
546 (rust_lex_stringish_test, rust_lex_test_sequence)
547 (rust_lex_test_trailing_dot, rust_lex_test_completion)
548 (rust_lex_test_push_back, rust_lex_tests): Update.
550 2018-07-19 Pedro Alves <palves@redhat.com>
552 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
553 gdb::unique_xmalloc_ptr.
554 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
555 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
556 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
558 * guile/scm-pretty-print.c (ppscm_print_children): Use
559 gdb::unique_xmalloc_ptr instead of cleanups.
560 (gdbscm_apply_val_pretty_printer): Remove cleanups.
561 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
562 gdb::unique_xmalloc_ptr.
563 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
564 Adjust to use gdb::unique_xmalloc_ptr.
565 * guile/scm-utils.c (extract_arg): Adjust.
566 * guile/scm-value.c (gdbscm_value_field): Adjust to use
567 gdb::unique_xmalloc_ptr instead of a cleanup.
569 2018-07-19 Tom Tromey <tom@tromey.com>
571 * utils.c (do_value_free_to_mark)
572 (make_cleanup_value_free_to_mark): Remove.
573 * utils.h (make_cleanup_value_free_to_mark): Remove.
575 2018-07-19 Pedro Alves <palves@redhat.com>
577 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
578 forwarding reference.
580 2018-07-18 Pedro Alves <palves@redhat.com>
582 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
583 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
586 2018-07-18 Pedro Alves <palves@redhat.com>
588 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
590 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
592 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
593 directly instead of a cleanup.
594 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
595 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
596 (vlscm_binop_gdbthrow): New, factored out from ...
597 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
598 (vlscm_rich_compare): Use gdbscm_wrap.
599 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
600 instead of a cleanup.
601 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
603 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
604 Use xfree directly instead of a cleanup.
605 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
606 Adjust to use gdbscm_wrap and scoped_value_mark.
607 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
608 (gdbscm_value_address, gdbscm_value_dereference)
609 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
611 (gdbscm_value_dynamic_type): Use scoped_value_mark.
612 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
614 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
615 gdbscm_wrap and scoped_value_mark.
616 (gdbscm_value_to_string): Use xfree directly instead of a
617 cleanup. Move 'buffer' unique_ptr to TRY scope.
618 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
619 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
621 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
622 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
624 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
627 2018-07-18 Tom de Vries <tdevries@suse.de>
629 * findvar.c (default_read_var_value): Also resolve dynamic type for
630 LOC_OPTIMIZED_OUT vars.
632 2018-07-18 Maciej W. Rozycki <macro@mips.com>
634 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
637 2018-07-17 Tom Tromey <tom@tromey.com>
639 * guile/scm-param.c (pascm_set_func, pascm_show_func)
640 (compute_enum_list, pascm_set_param_value_x)
641 (gdbscm_parameter_value): Update.
642 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
643 (gdbscm_scm_to_host_string): Update.
644 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
646 * guile/scm-cmd.c (cmdscm_add_completion): Update.
647 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
648 * guile/scm-string.c (gdbscm_scm_to_string): Return
650 (gdbscm_scm_to_host_string): Likewise.
652 2018-07-17 Tom Tromey <tom@tromey.com>
654 * guile/guile.c (gdbscm_eval_from_control_command): Update.
655 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
656 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
657 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
660 2018-07-17 Tom Tromey <tom@tromey.com>
662 * guile/scm-param.c (pascm_signal_setshow_error): Update.
663 * guile/guile-internal.h (gdbscm_exception_message_to_string):
665 * guile/scm-cmd.c (cmdscm_function): Update.
666 * guile/scm-pretty-print.c
667 (ppscm_print_exception_unless_memory_error): Update.
668 * guile/scm-exception.c (gdbscm_exception_message_to_string):
669 Return unique_xmalloc_ptr.
671 2018-07-17 Tom Tromey <tom@tromey.com>
673 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
676 2018-07-17 Jim Wilson <jimw@sifive.com>
678 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
679 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
680 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
681 unecessary braces after EF_RISCV_RVC test. Delete call to
682 set_gdbarch_decr_pc_after_break.
684 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
685 RISCV_LAST_FP_REGNUM + 1.
686 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
688 2018-07-17 Tom Tromey <tom@tromey.com>
690 * configure.ac: Remove --disable-gdbcli.
691 * configure: Rebuild.
692 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
693 (SUBDIR_CLI_CFLAGS): Remove.
694 (SFILES): Use SUBDIR_CLI_SRCS.
695 (COMMON_OBS): Use SUBDIR_CLI_OBS.
697 2018-07-17 Tom Tromey <tom@tromey.com>
700 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
702 2018-07-16 Jim Wilson <jimw@sifive.com>
704 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
706 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
708 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
710 (libunwind_frame_sniffer): Likewise.
711 (libunwind_frame_prev_register): Likewise.
712 (libunwind_sigtramp_frame_sniffer): Likewise.
713 * ia64-tdep.c (ia64_access_reg): Likewise.
714 (ia64_access_rse_reg): Likewise.
715 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
716 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
718 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
720 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
722 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
724 * remote-sim.c (gdbsim_target::close,
725 gdbsim_target::mourn_inferior): Remove unused variables.
727 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
729 * ia64-tdep.c (ktab_buf): New global.
730 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
731 (get_kernel_table): Adjust.
733 2018-07-16 Tom Tromey <tom@tromey.com>
735 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
736 * dwarf2read.c (using_directives, new_symbol): Use
738 * dbxread.c (process_one_symbol): Use outermost_context_p.
739 * coffread.c (coff_symtab_read): Use outermost_context_p.
741 2018-07-16 Tom Tromey <tom@tromey.com>
743 * dwarf2read.c (using_directives, read_func_scope)
744 (read_lexical_block_scope): Update.
745 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
746 * buildsym.h (local_using_directives, global_using_directives):
748 (get_local_using_directives, set_local_using_directives)
749 (get_global_using_directives): Declare.
750 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
751 m_global_using_directives>: New members.
752 (finish_block_internal, prepare_for_building)
753 (reset_symtab_globals, end_symtab_get_static_block)
754 (push_context): Update.
755 (get_local_using_directives, set_local_using_directives)
756 (get_global_using_directives): New functions.
757 (buildsym_init): Update.
759 2018-07-16 Tom Tromey <tom@tromey.com>
761 * xcoffread.c (xcoff_initial_scan): Don't call
763 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
764 * buildsym.h (class scoped_free_pendings): Add constructor.
765 (free_pending_blocks): Don't declare.
766 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
767 (free_pending_blocks): Now static.
769 2018-07-16 Tom Tromey <tom@tromey.com>
771 * buildsym.h (push_subfile, pop_subfile): Update declarations.
772 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
774 (struct subfile_stack): Remove.
775 (subfile_stack): Remove.
776 (push_subfile, pop_subfile, buildsym_init): Update.
778 2018-07-16 Tom Tromey <tom@tromey.com>
780 * buildsym.c (push_subfile): Use gdb_assert.
781 (pop_subfile): Use gdb_assert.
783 2018-07-16 Tom Tromey <tom@tromey.com>
785 * buildsym.h (merge_symbol_lists): Remove.
786 * buildsym.c (merge_symbol_lists): Remove.
788 2018-07-16 Tom Tromey <tom@tromey.com>
790 * stabsread.c (scan_file_globals): Update comment.
791 * stabsread.h (scan_file_globals): Move from buildsym.h.
792 * buildsym.h (scan_file_globals): Move to stabsread.h.
794 2018-07-16 Tom Tromey <tom@tromey.com>
796 * xcoffread.c (xcoff_new_init): Update.
797 * mipsread.c (mipscoff_new_init): Update.
798 * mdebugread.c (mdebug_build_psymtabs): Update.
799 * elfread.c (elf_new_init): Update.
800 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
801 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
802 * buildsym.h (buildsym_new_init): Don't declare.
803 * buildsym.c (buildsym_new_init): Remove.
805 2018-07-16 Tom Tromey <tom@tromey.com>
807 * stabsread.h (within_function): Move from buildsym.h.
808 * stabsread.c (start_stabs): Clear within_function.
809 * coffread.c (coff_start_symtab): Clear within_function.
810 * buildsym.h (within_function): Move to stabsread.h.
811 * buildsym.c (prepare_for_building): Update.
813 2018-07-16 Tom Tromey <tom@tromey.com>
815 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
816 * dwarf2read.c (dwarf2_start_symtab): Don't set
817 processing_gcc_compilation.
818 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
820 2018-07-16 Tom Tromey <tom@tromey.com>
822 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
823 (next_symbol_text_func): Move from buildsym.h.
824 * stabsread.c (hashname): Move from buildsym.c.
825 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
826 (next_symbol_text_func, hashname): Move to stabsread.h.
827 * buildsym.c: Don't include bcache.h
828 (hashname): Move to stasbread.c.
830 2018-07-16 Tom Tromey <tom@tromey.com>
832 * buildsym.h (context_stack_size): Don't declare.
833 * buildsym.c (context_stack_size): New global.
835 2018-07-16 Tom Tromey <tom@tromey.com>
837 * dbxread.c (processing_acc_compilation): New global.
838 * buildsym.h (processing_acc_compilation): Don't declare.
840 2018-07-16 Tom Tromey <tom@tromey.com>
842 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
843 * dbxread.c (read_ofile_symtab): Update.
844 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
845 * buildsym.h (last_source_start_addr): Remove.
846 (set_last_source_start_addr, get_last_source_start_addr):
848 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
850 (struct buildsym_compunit) <m_last_source_start_addr>: New
852 (prepare_for_building): Remove start_addr parameter.
853 (start_symtab, restart_symtab, end_symtab_get_static_block)
854 (end_symtab_with_blockvector): Update.
855 (set_last_source_start_addr, get_last_source_start_addr): New
858 2018-07-16 Tom Tromey <tom@tromey.com>
860 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
862 (have_line_numbers): Remove.
863 (record_line, prepare_for_building, end_symtab_get_static_block)
864 (augment_type_symtab): Update.
866 2018-07-16 Tom Tromey <tom@tromey.com>
868 * buildsym.c (~buildsym_compunit): Free the macro table.
869 (struct buildsym_compunit) <get_macro_table, release_macros>: New
871 <m_pending_macros>: New member.
872 (pending_macros): Remove.
873 (~scoped_free_pendings, get_macro_table, prepare_for_building)
874 (reset_symtab_globals, end_symtab_get_static_block)
875 (end_symtab_with_blockvector, augment_type_symtab)
876 (buildsym_init): Update.
878 2018-07-16 Tom Tromey <tom@tromey.com>
880 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
882 (buildsym_compunit::set_last_source_file): New method.
883 <m_last_source_file>: New member.
884 (prepare_for_building): Remove "name" parameter.
885 (start_symtab, restart_symtab, reset_symtab_globals): Update.
886 (last_source_file): Remove.
887 (set_last_source_file, get_last_source_file): Update.
889 2018-07-16 Tom Tromey <tom@tromey.com>
891 * buildsym.c (prepare_for_building): Add assert.
893 2018-07-16 Tom Tromey <tom@tromey.com>
895 * buildsym.c (~buildsym_compunit): Update.
896 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
897 (start_subfile, patch_subfile_names)
898 (end_symtab_with_blockvector): Update.
900 2018-07-16 Tom Tromey <tom@tromey.com>
902 * buildsym.c (struct buildsym_compunit): Add constructor,
903 destructor, initializers.
904 (start_buildsym_compunit): Remove.
905 (free_buildsym_compunit): Use "delete".
906 (start_symtab, restart_symtab): Use "new".
908 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
910 * symfile.c (set_objfile_default_section_offset): Remove struct
913 2018-07-14 Stafford Horne <shorne@gmail.com>
915 * (Responsible Maintainers): Add myself as or1k maintainer.
917 2018-07-13 Tom Tromey <tom@tromey.com>
919 * symfile.c (set_objfile_default_section_offset): Use extra braces
922 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
924 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
927 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
929 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
930 unittests/cli-utils-selftests.c
931 * unittests/cli-utils-selftests.c: New file.
933 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
935 * NEWS: Mention new commands. Mention change to 'thread apply'.
937 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
939 * thread.c (thr_try_catch_cmd): New function.
940 (thread_apply_all_command): Handle qcs flags.
941 (thread_apply_command): Handle qcs flags.
942 (taas_command): New function.
943 (tfaas_command): New function.
944 (_initialize_thread): Update to setup the new commands 'taas
945 and 'tfaas'. Change doc string for 'thread apply'.
947 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
949 * stack.c: (trailing_outermost_frame): New function, mostly
950 extracted from backtrace_command_1.
951 (leading_innermost_frame): New function.
952 (backtrace_command_1): Update to call trailing_outermost_frame.
953 (frame_apply_command_count): New function.
954 (frame_apply_level_command): New function.
955 (frame_apply_all_command): New function.
956 (frame_apply_command): New function.
957 (faas_command): New function.
958 (frame_cmd_list): New variable.
959 (_initialize_stack): Update to setup the new commands 'frame apply'
962 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
964 * cli-utils.c (number_or_range_parser::get_number): Only handle
965 numbers or convenience var as numbers.
966 (parse_flags): New function.
967 (parse_flags_qcs): New function.
968 (number_or_range_parser::finished): Ensure parsing end is detected
969 before end of string.
970 * cli-utils.h (parse_flags): New function.
971 (parse_flags_qcs): New function.
972 (number_or_range_parser): Remove m_finished bool.
973 (number_or_range_parser::skip_range): Set m_in_range to false.
975 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
977 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
980 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
981 Jan Kratochvil <jan.kratochvil@redhat.com>
982 Paul Fertser <fercerpav@gmail.com>
983 Tsutomu Seki <sekiriki@gmail.com>
984 Pedro Alves <palves@redhat.com>
986 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
987 'unittests/parse-connection-spec-selftests.c'.
988 (COMMON_SFILES): Add 'common/netstuff.c'.
989 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
990 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
991 * common/netstuff.c: New file.
992 * common/netstuff.h: New file.
993 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
994 (wait_for_connect): Update comment. New parameter
995 'gdb::optional<int> sock' instead of 'struct serial *scb'.
996 Use 'sock' directly instead of 'scb->fd'.
997 (try_connect): New function, with code from 'net_open'.
998 (net_open): Rewrite main loop to deal with multiple
999 sockets/addresses. Handle IPv6-style hostnames; implement
1000 support for IPv6 connections.
1001 * unittests/parse-connection-spec-selftests.c: New file.
1003 2018-07-11 Pedro Alves <palves@redhat.com>
1006 * remote.c (remote_target::remote_detach_pid): Call
1007 set_current_process.
1009 2018-07-11 Pedro Alves <palves@redhat.com>
1011 * h8300-tdep.c (h8300_gdbarch_init): Remove
1012 set_gdbarch_ecoff_reg_to_regnum calls.
1014 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1017 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1018 offsets/sizes for static members of a class/struct.
1020 2018-07-11 Alan Hayward <alan.hayward@arm.com>
1022 * target-descriptions.c (tdesc_register_bitsize): Rename.
1023 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1024 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1025 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1027 2018-07-10 Tom Tromey <tom@tromey.com>
1029 * breakpoint.c (moribund_locations): Now static and a
1031 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1032 (build_bpstat_chain, update_global_location_list)
1033 (breakpoint_retire_moribund): Update.
1034 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1037 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1039 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1040 (riscv_register_reggroup_p): Use new function, remove unneeded
1042 (riscv_push_dummy_call): Extend assert to compare against xlen or
1043 flen based on register type.
1045 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1047 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1049 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1051 * remote.c (show_hardware_watchpoint_limit): New function.
1052 (show_hardware_watchpoint_length_limit): New function.
1053 (show_hardware_breakpoint_limit): New function.
1054 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1055 where appropriate, update help text.
1057 2018-07-09 Tom Tromey <tom@tromey.com>
1059 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1060 (CLIBS): Don't mention NAT_CLIBS.
1062 2018-07-09 Tom Tromey <tom@tromey.com>
1064 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1065 (LIBGDB_OBS, clean mostlyclean): Update.
1066 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1068 2018-07-09 Tom Tromey <tom@tromey.com>
1070 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1071 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1072 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1074 2018-07-09 Tom Tromey <tom@tromey.com>
1076 * Makefile.in (ALLDEPFILES): Remove exec.c.
1077 (COMMON_OBS): Remove exec.o.
1078 (COMMON_SFILES): Add exec.c.
1080 2018-07-09 Tom Tromey <tom@tromey.com>
1082 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1084 2018-07-09 Tom Tromey <tom@tromey.com>
1086 * Makefile.in (clean mostlyclean): Remove stamp-version.
1087 (version.c): Depend on stamp-version.
1088 (stamp-version): New rule, from version.c rule.
1090 2018-07-09 Tom Tromey <tom@tromey.com>
1092 * Makefile.in (init.c): Depend on stamp-init.
1093 (stamp-init): New rule, from init.c rule.
1094 (clean mostlyclean): Remove stamp-init.
1096 2018-07-09 Tom Tromey <tom@tromey.com>
1098 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1099 SUBDIR_GCC_COMPILE_SRCS.
1101 2018-07-09 Tom Tromey <tom@tromey.com>
1103 * Makefile.in (init.c): Remove some unused sed rules.
1105 2018-07-09 Tom Tromey <tom@tromey.com>
1107 * Makefile.in (TSOBS): Remove.
1108 (INIT_FILES): Update.
1109 (LIBGDB_OBS): Update.
1110 (COMMON_SFILES): Add inflow.c.
1111 (SFILES): Remove inflow.c.
1113 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1115 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1117 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1119 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1120 get_saveloc_name, is_signal_frame_name, step_name,
1121 init_remote_name, create_addr_space_name,
1122 destroy_addr_space_name, search_unwind_table_name,
1123 find_dyn_list_name): Constify.
1125 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1127 * darwin-nat.c (darwin_pthread_kill): New function.
1128 (darwin_resume_thread): Use darwin_pthread_kill.
1130 2018-07-05 Tom de Vries <tdevries@suse.de>
1132 * macroexp.c (macro_buffer) <operator=>: New member function.
1134 2018-07-04 Tom Tromey <tom@tromey.com>
1136 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1138 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
1140 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1141 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1142 * maint.c: Likewise.
1145 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1147 * NEWS: Create a new section for the next release branch.
1148 Rename the section of the current branch, now that it has
1151 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1153 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1154 * version.in: Bump version to 8.2.50.DATE-git.
1156 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1157 Pedro Alves <palves@redhat.com>
1159 * linux-nat.c (linux_init_ptrace): Rename to ...
1160 (linux_init_ptrace_procfs): ... this. Call
1161 linux_proc_init_warnings.
1162 (linux_nat_target::post_attach)
1163 (linux_nat_target::post_startup_inferior): Adjust.
1164 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1165 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1167 2018-07-04 Tom de Vries <tdevries@suse.de>
1169 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1171 (read_comp_unit_head): ... here.
1173 2018-07-03 Tom Tromey <tom@tromey.com>
1175 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1176 (stop_tracing, tstatus_command)
1177 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1178 (print_one_static_tracepoint_marker): Update.
1179 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1181 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
1183 (all_tracepoints, static_tracepoints_here): Return std::vector.
1185 2018-07-03 Tom Tromey <tom@tromey.com>
1187 * common/ptid.c (ptid_equal): Remove.
1188 * common/ptid.h (ptid_equal): Don't declare.
1189 * ada-tasks.c: Update.
1190 * breakpoint.c: Update.
1191 * common/agent.c: Update.
1192 * corelow.c: Update.
1193 * darwin-nat-info.c: Update.
1194 * darwin-nat.c: Update.
1196 * dtrace-probe.c: Update.
1197 * dummy-frame.c: Update.
1198 * fbsd-nat.c: Update.
1200 * gdbthread.h: Update.
1201 * gnu-nat.c: Update.
1202 * go32-nat.c: Update.
1203 * inf-loop.c: Update.
1204 * inf-ptrace.c: Update.
1205 * infcall.c: Update.
1209 * linux-fork.c: Update.
1210 * linux-nat.c: Update.
1211 * linux-thread-db.c: Update.
1212 * mi/mi-cmd-var.c: Update.
1213 * mi/mi-interp.c: Update.
1214 * mi/mi-main.c: Update.
1215 * nto-procfs.c: Update.
1216 * ppc-linux-tdep.c: Update.
1218 * python/py-inferior.c: Update.
1219 * python/py-record-btrace.c: Update.
1220 * python/py-record.c: Update.
1221 * ravenscar-thread.c: Update.
1222 * regcache.c: Update.
1223 * remote-sim.c: Update.
1225 * sol-thread.c: Update.
1228 * tui/tui-stack.c: Update.
1230 * windows-nat.c: Update.
1231 * windows-tdep.c: Update.
1233 2018-07-03 Tom Tromey <tom@tromey.com>
1235 * common/ptid.c (ptid_match): Remove.
1236 * common/ptid.h (ptid_match): Don't declare.
1237 * fbsd-nat.c: Update.
1240 * linux-nat.c: Update.
1241 * record-btrace.c: Update.
1242 * regcache.c: Update.
1245 2018-07-03 Tom Tromey <tom@tromey.com>
1247 * common/ptid.c (ptid_tid_p): Remove.
1248 * common/ptid.h (ptid_tid_p): Don't declare.
1249 * sol-thread.c: Update.
1251 2018-07-03 Tom Tromey <tom@tromey.com>
1253 * common/ptid.c (ptid_lwp_p): Remove.
1254 * common/ptid.h (ptid_lwp_p): Don't declare.
1255 * fbsd-nat.c: Update.
1256 * linux-nat.c: Update.
1257 * nat/linux-procfs.c: Update.
1258 * nat/x86-linux-dregs.c: Update.
1259 * sol-thread.c: Update.
1261 2018-07-03 Tom Tromey <tom@tromey.com>
1263 * common/ptid.c (ptid_is_pid): Remove.
1264 * common/ptid.h (ptid_is_pid): Don't declare.
1266 * linux-nat.c: Update.
1267 * mi/mi-interp.c: Update.
1271 2018-07-03 Tom Tromey <tom@tromey.com>
1273 * common/ptid.c (ptid_get_tid): Remove.
1274 * common/ptid.h (ptid_get_tid): Don't declare.
1275 * ada-tasks.c: Update.
1276 * aix-thread.c: Update.
1277 * bsd-uthread.c: Update.
1278 * darwin-nat.c: Update.
1279 * fbsd-nat.c: Update.
1280 * i386-darwin-nat.c: Update.
1282 * linux-tdep.c: Update.
1283 * nto-procfs.c: Update.
1284 * ppc-ravenscar-thread.c: Update.
1285 * python/py-infthread.c: Update.
1286 * ravenscar-thread.c: Update.
1287 * sol-thread.c: Update.
1288 * sparc-ravenscar-thread.c: Update.
1289 * windows-nat.c: Update.
1291 2018-07-03 Tom Tromey <tom@tromey.com>
1293 * common/ptid.c (ptid_get_lwp): Remove.
1294 * common/ptid.h (ptid_get_lwp): Don't declare.
1295 * aarch64-linux-nat.c: Update.
1296 * ada-tasks.c: Update.
1297 * aix-thread.c: Update.
1298 * amd64-linux-nat.c: Update.
1299 * arm-linux-nat.c: Update.
1300 * corelow.c: Update.
1301 * fbsd-nat.c: Update.
1302 * fbsd-tdep.c: Update.
1303 * gnu-nat.c: Update.
1304 * i386-cygwin-tdep.c: Update.
1305 * i386-gnu-nat.c: Update.
1306 * i386-linux-nat.c: Update.
1307 * ia64-linux-nat.c: Update.
1308 * inf-ptrace.c: Update.
1310 * linux-fork.c: Update.
1311 * linux-nat.c: Update.
1312 * linux-tdep.c: Update.
1313 * linux-thread-db.c: Update.
1314 * mips-linux-nat.c: Update.
1315 * nat/aarch64-linux-hw-point.c: Update.
1316 * nat/aarch64-linux.c: Update.
1317 * nat/linux-btrace.c: Update.
1318 * nat/linux-osdata.c: Update.
1319 * nat/linux-procfs.c: Update.
1320 * nat/x86-linux-dregs.c: Update.
1321 * obsd-nat.c: Update.
1322 * ppc-fbsd-nat.c: Update.
1323 * ppc-linux-nat.c: Update.
1325 * python/py-infthread.c: Update.
1326 * ravenscar-thread.c: Update.
1328 * s390-linux-nat.c: Update.
1329 * sol-thread.c: Update.
1330 * sol2-tdep.c: Update.
1331 * spu-linux-nat.c: Update.
1332 * x86-linux-nat.c: Update.
1333 * xtensa-linux-nat.c: Update.
1335 2018-07-03 Tom Tromey <tom@tromey.com>
1337 * common/ptid.c (ptid_get_pid): Remove.
1338 * common/ptid.h (ptid_get_pid): Don't declare.
1339 * aarch64-linux-nat.c: Update.
1340 * ada-lang.c: Update.
1341 * aix-thread.c: Update.
1342 * alpha-bsd-nat.c: Update.
1343 * amd64-fbsd-nat.c: Update.
1344 * amd64-linux-nat.c: Update.
1345 * arm-linux-nat.c: Update.
1346 * arm-nbsd-nat.c: Update.
1348 * break-catch-syscall.c: Update.
1349 * breakpoint.c: Update.
1350 * bsd-uthread.c: Update.
1351 * corelow.c: Update.
1353 * darwin-nat.c: Update.
1354 * fbsd-nat.c: Update.
1355 * fbsd-tdep.c: Update.
1357 * gnu-nat.c: Update.
1358 * hppa-nbsd-nat.c: Update.
1359 * hppa-obsd-nat.c: Update.
1360 * i386-fbsd-nat.c: Update.
1361 * ia64-linux-nat.c: Update.
1362 * inf-ptrace.c: Update.
1364 * inferior.c: Update.
1365 * inferior.h: Update.
1368 * linux-fork.c: Update.
1369 * linux-nat.c: Update.
1370 * linux-tdep.c: Update.
1371 * linux-thread-db.c: Update.
1372 * m68k-bsd-nat.c: Update.
1373 * mi/mi-interp.c: Update.
1374 * mi/mi-main.c: Update.
1375 * mips-linux-nat.c: Update.
1376 * mips-nbsd-nat.c: Update.
1377 * mips64-obsd-nat.c: Update.
1378 * nat/aarch64-linux-hw-point.c: Update.
1379 * nat/aarch64-linux.c: Update.
1380 * nat/linux-btrace.c: Update.
1381 * nat/linux-osdata.c: Update.
1382 * nat/linux-procfs.c: Update.
1383 * nat/x86-linux-dregs.c: Update.
1384 * nto-procfs.c: Update.
1385 * obsd-nat.c: Update.
1386 * ppc-linux-nat.c: Update.
1387 * ppc-nbsd-nat.c: Update.
1388 * ppc-obsd-nat.c: Update.
1389 * proc-service.c: Update.
1391 * python/py-inferior.c: Update.
1392 * python/py-infthread.c: Update.
1393 * ravenscar-thread.c: Update.
1395 * remote-sim.c: Update.
1397 * rs6000-nat.c: Update.
1398 * s390-linux-nat.c: Update.
1399 * sh-nbsd-nat.c: Update.
1400 * sol-thread.c: Update.
1401 * sparc-nat.c: Update.
1402 * sparc64-tdep.c: Update.
1403 * spu-linux-nat.c: Update.
1404 * spu-tdep.c: Update.
1405 * target-debug.h: Update.
1408 * tid-parse.c: Update.
1409 * tracefile-tfile.c: Update.
1410 * vax-bsd-nat.c: Update.
1411 * windows-nat.c: Update.
1412 * x86-linux-nat.c: Update.
1413 * x86-nat.c: Update.
1415 2018-07-03 Tom Tromey <tom@tromey.com>
1417 * common/ptid.c (pid_to_ptid): Remove.
1418 * common/ptid.h (pid_to_ptid): Don't declare.
1419 * aix-thread.c: Update.
1420 * arm-linux-nat.c: Update.
1421 * common/ptid.c: Update.
1422 * common/ptid.h: Update.
1423 * corelow.c: Update.
1425 * darwin-nat.c: Update.
1426 * fbsd-nat.c: Update.
1427 * fork-child.c: Update.
1428 * gnu-nat.c: Update.
1429 * go32-nat.c: Update.
1430 * inf-ptrace.c: Update.
1432 * inferior.c: Update.
1434 * linux-fork.c: Update.
1435 * linux-nat.c: Update.
1436 * nat/aarch64-linux-hw-point.c: Update.
1437 * nat/fork-inferior.c: Update.
1438 * nat/x86-linux-dregs.c: Update.
1439 * nto-procfs.c: Update.
1440 * obsd-nat.c: Update.
1442 * progspace.c: Update.
1444 * rs6000-nat.c: Update.
1445 * s390-linux-nat.c: Update.
1446 * sol-thread.c: Update.
1447 * spu-linux-nat.c: Update.
1450 * tracefile-tfile.c: Update.
1451 * windows-nat.c: Update.
1453 2018-07-03 Tom Tromey <tom@tromey.com>
1455 * common/ptid.h (ptid_build): Don't declare.
1456 * common/ptid.c (ptid_build): Remove.
1457 * aix-thread.c: Update.
1458 * bsd-kvm.c: Update.
1459 * bsd-uthread.c: Update.
1460 * common/agent.c: Update.
1461 * common/ptid.c: Update.
1462 * common/ptid.h: Update.
1463 * corelow.c: Update.
1464 * darwin-nat.c: Update.
1465 * fbsd-nat.c: Update.
1466 * gnu-nat.c: Update.
1467 * linux-fork.c: Update.
1468 * linux-nat.c: Update.
1469 * linux-thread-db.c: Update.
1470 * nat/linux-osdata.c: Update.
1471 * nat/linux-procfs.c: Update.
1472 * nto-procfs.c: Update.
1473 * obsd-nat.c: Update.
1474 * proc-service.c: Update.
1476 * ravenscar-thread.c: Update.
1477 * remote-sim.c: Update.
1479 * sol-thread.c: Update.
1481 * windows-nat.c: Update.
1483 2018-07-03 Tom Tromey <tom@tromey.com>
1485 * infrun.c (follow_exec): Use exit_inferior_silent.
1486 * inferior.c (exit_inferior_num_silent): Remove.
1487 * inferior.h (exit_inferior_num_silent): Don't declare.
1489 2018-07-03 Tom Tromey <tom@tromey.com>
1492 * darwin-nat.c (darwin_attach_pid): Reset inferior and
1493 inferior_ptid on error.
1495 2018-07-02 Maciej W. Rozycki <macro@mips.com>
1496 Simon Marchi <simon.marchi@polymtl.ca>
1499 * disasm.h (gdb_disassembler): Add
1500 `m_disassembler_options_holder'. member
1501 * disasm.c (get_all_disassembler_options): New function.
1502 (gdb_disassembler::gdb_disassembler): Use it.
1503 (gdb_buffered_insn_length_init_dis): Likewise.
1504 (gdb_buffered_insn_length): Adjust accordingly.
1505 (set_disassembler_options): Handle options with arguments.
1506 (show_disassembler_options_sfunc): Likewise. Add a leading new
1507 line if showing options with descriptions.
1508 (disassembler_options_completer): Adapt to using the
1509 `disasm_options_and_args_t' structure.
1510 * mips-tdep.c (mips_disassembler_options): New variable.
1511 (mips_disassembler_options_o32): Likewise.
1512 (mips_disassembler_options_n32): Likewise.
1513 (mips_disassembler_options_n64): Likewise.
1514 (gdb_print_insn_mips): Don't set `disassembler_options'.
1515 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1517 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
1518 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
1519 `gdbarch_disassembler_options_implicit' and
1520 `gdbarch_valid_disassembler_options'.
1521 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
1522 `disasm_options_and_args_t' structure.
1523 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
1525 (valid_disassembler_options): Switch from `disasm_options_t' to
1526 the `disasm_options_and_args_t' structure.
1527 * NEWS: Document `set disassembler-options' support for the MIPS
1529 * gdbarch.h: Regenerate.
1530 * gdbarch.c: Regenerate.
1532 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
1534 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
1536 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1538 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
1539 parameter in call to amd64_target_description.
1540 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
1541 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
1542 (amd64fbsd_init_abi): Likewise.
1543 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
1544 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
1545 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
1546 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
1548 2018-06-29 Pedro Alves <palves@redhat.com>
1550 * gdb/amd64-tdep.h (amd64_create_target_description): Add
1551 "segments" parameter.
1552 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
1553 (_initialize_amd64_tdep): Update call to
1554 amd64_create_target_description.
1555 (amd64_target_description): Add "segments" parameter. Adjust
1556 the implementation to use it.
1557 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
1558 call to amd64_create_target_description.
1559 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
1560 * gdb/arch/amd64.h (amd64_create_target_description): Add
1561 "segments" register.
1562 * gdb/arch/amd64.c (amd64_create_target_description): Add
1563 "segments" parameter. Call create_feature_i386_64bit_segments
1564 only if SEGMENTS is true.
1565 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
1566 call to amd64_create_target_description.
1568 2018-06-29 Pedro Alves <palves@redhat.com>
1570 * thread.c (thread_target_id_str): New, factored out from ...
1571 (print_thread_info_1): ... here. Use it to compute the max
1572 "Target Id" column width.
1574 2018-06-29 Pedro Alves <palves@redhat.com>
1576 * remote.c (remote_target::extra_thread_info): Delete
1577 'display_buf' and 'n' locals. from the cache, regardless of
1578 packet mechanims is in use. Use cache for qThreadExtra and qP
1581 2018-06-29 Pedro Alves <palves@redhat.com>
1583 * blockframe.c (find_pc_sect_containing_function): New function.
1584 * breakpoint.c (print_breakpoint_location): Don't call
1585 find_pc_sect_function.
1586 * linespec.c (create_sals_line_offset): Record the location's
1588 * linespec.c (convert_address_location_to_sals): Fill in sal's
1589 symbol with find_pc_sect_containing_function.
1590 * symtab.c (find_function_start_sal): Rename to ...
1591 (find_function_start_sal_1): ... this.
1592 (find_function_start_sal): Reimplement as wrapper around
1593 find_function_start_sal_1, and use
1594 find_pc_sect_containing_function to fill in the sal's symbol.
1595 (find_function_start_sal(symbol*, bool)): Adjust.
1596 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
1598 (find_pc_sect_containing_function): Declare.
1600 2018-06-29 Pedro Alves <palves@redhat.com>
1602 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
1603 true if the the location has no symbol.
1605 2018-06-28 Tom Tromey <tom@tromey.com>
1607 * NEWS: Mention --enable-codesign.
1608 * silent-rules.mk (ECHO_SIGN): New variable.
1609 * configure.ac: Add --enable-codesign.
1610 * configure: Rebuild.
1611 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
1612 (gdb$(EXEEXT)): Optionally invoke codesign.
1614 2018-06-28 Pedro Alves <palves@redhat.com>
1616 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
1618 (switch_to_thread_no_regs): Adjust comment.
1619 * infcmd.c (stop_pc): Delete.
1620 (post_create_inferior, info_program_command): Replace references
1621 to stop_pc with references to thread_info->suspend.stop_pc.
1622 * inferior.h (stop_pc): Delete declaration.
1623 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
1624 (handle_inferior_event_1, handle_signal_stop)
1625 (process_event_stop_test, keep_going_stepped_thread)
1626 (handle_step_into_function, handle_step_into_function_backward)
1627 (print_stop_location): Replace references to stop_pc with
1628 references to thread_info->suspend.stop_pc.
1629 (struct infcall_suspend_state) <stop_pc>: Delete field.
1630 (save_infcall_suspend_state, restore_infcall_suspend_state):
1631 Remove references to inf_stat->stop_pc.
1632 * linux-fork.c (fork_load_infrun_state): Likewise.
1633 * record-btrace.c (record_btrace_set_replay): Likewise.
1634 * record-full.c (record_full_goto_entry): Likewise.
1635 * remote.c (print_one_stopped_thread): Likewise.
1636 * target.c (target_resume): Extend comment.
1637 * thread.c (set_executing_thread): New.
1638 (set_executing): Use it.
1639 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
1640 Remove references to stop_pc.
1642 2018-06-28 Pedro Alves <palves@redhat.com>
1644 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
1645 Moving fetching stop_pc until after ecs->event_thread is refreshed.
1647 2018-06-28 Tom Tromey <tom@tromey.com>
1649 * coffread.c (coff_symfile_finish): Update.
1650 * xcoffread.c (xcoff_symfile_finish): Update.
1651 * elfread.c (elf_symfile_finish): Update.
1652 * symfile.h (dwarf2_free_objfile): Don't declare.
1653 * dwarf2read.c (_initialize_dwarf2_read): Use
1654 register_objfile_data_with_cleanup.
1655 (dwarf2_free_objfile): Now static. Change signature.
1657 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1659 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
1660 option "-o" to add-symbol-file-load to add an offset to each
1661 section's load address.
1662 * symfile.c (set_objfile_default_section_offset): New function.
1664 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1666 * symfile.c (add_symbol_file_command): Make sure that sections
1667 with the same name are sorted in the same order.
1669 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1671 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
1672 require the second argument. If omitted, load sections at the
1673 addresses specified in the file.
1675 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1677 * symfile.c (symbol_file_command, symbol_file_add_main_1)
1678 (_initialize_symfile): Add option "-o" to symbol-file to add an
1679 offset to each section of the symbol file.
1681 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1683 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
1685 2018-06-27 Tom Tromey <tom@tromey.com>
1687 * stack.c (_initialize_stack): Update "func" help text.
1689 2018-06-27 Tom Tromey <tom@tromey.com>
1691 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
1693 (unwind_infopy_str, pyuw_create_unwind_info)
1694 (unwind_infopy_add_saved_register, pyuw_sniffer)
1695 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
1697 (struct saved_reg): Add constructor.
1698 <value>: Now a gdbpy_ref<>.
1700 2018-06-27 Tom Tromey <tom@tromey.com>
1702 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
1704 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1706 * gdb-gdb.py.in: Format using autopep8.
1708 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1710 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
1711 (type_lookup_function): Recognize CORE_ADDR values.
1713 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1715 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
1718 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1720 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
1723 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1725 * gdb-gdb.py: Move to...
1726 * gdb-gdb.py.in: ... here.
1727 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
1728 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
1730 (distclean): Remove gdb-gdb.py when cleaning.
1731 (gdb-gdb.py, gdb-gdb.gdb): New rules.
1732 * configure: Re-generate.
1734 2018-06-27 Pedro Alves <palves@redhat.com>
1736 * proc-service.c (get_ps_regcache): New.
1737 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1738 (ps_lsetfpregs): Use it.
1740 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
1743 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
1744 (dwarf_decode_lines_1): Adjust.
1746 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1748 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
1750 <info_proc>: Likewise.
1752 2018-06-26 Joel Brobecker <brobecker@adacore.com>
1754 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
1755 to windows_fetch_one_register, and only handle the case of
1756 fetching one register. Move the code that reloads the context
1757 and iterates over all registers if R is negative to...
1758 (windows_nat_target::fetch_registers): ... here.
1759 (do_windows_store_inferior_registers): Rename to
1760 windows_store_one_register, and only handle the case of storing
1761 one register. Move the code that handles the case where r is
1763 (windows_nat_target::store_registers) ... here.
1765 2018-06-26 Tom Tromey <tom@tromey.com>
1768 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
1769 * rust-lang.c (rust_print_struct_def): Add podata parameter.
1771 (rust_internal_print_type): Add podata parameter.
1772 (rust_print_type): Update.
1774 2018-06-26 Tom Tromey <tom@tromey.com>
1776 * typeprint.h (struct print_offset_data) <update, finish,
1777 maybe_print_hole>: New methods.
1778 <indentation>: New constant.
1779 * typeprint.c (print_offset_data::indentation): Define.
1780 (print_offset_data::maybe_print_hole, print_offset_data::update)
1781 (print_offset_data::finish): Move from c-typeprint.c and rename.
1782 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
1783 (print_spaces_filtered_with_print_options): Update.
1784 (c_print_type_union_field_offset, maybe_print_hole)
1785 (c_print_type_struct_field_offset): Move to typeprint.c and
1787 (c_type_print_base_struct_union): Update.
1789 2018-06-25 Pedro Alves <palves@redhat.com>
1791 * gdbthread.h (thread_info_ref, delete_thread)
1792 (delete_thread_silent, first_thread_of_inferior)
1793 (any_thread_of_inferior, switch_to_thread)
1794 (enable_thread_stack_temporaries)
1795 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1796 (get_last_thread_stack_temporary)
1797 (value_in_thread_stack_temporaries, can_access_registers_thread):
1798 Spell out "struct thread_info" instead of just "thread_info".
1799 * inferior.h (notice_new_inferior): Likewise.
1801 2018-06-25 Pedro Alves <palves@redhat.com>
1803 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1804 pass thread_info pointer to delete_thread.
1805 (windows_nat_target::detach): Pass inferior pointer to
1807 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
1809 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
1810 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
1811 and pass a thread_info pointer to delete_thread.
1812 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
1813 pass thread_info pointer to delete_thread.
1814 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
1815 delete_thread_silent call.
1816 * procfs.c (procfs_target::detach): Pass inferior pointer to
1818 (procfs_target::wait): Pass thread_info pointer to delete_thread.
1819 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
1820 delete_thread_silent call.
1821 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1822 pass thread_info pointer to delete_thread.
1823 (windows_nat_target::detach): Pass inferior pointer to
1826 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1828 * regcache.c (readable_regcache::read_part): Fix asserts.
1829 (reg_buffer::raw_collect_part): New function.
1830 (regcache::write_part): Fix asserts.
1831 (reg_buffer::raw_supply_part): New function.
1832 (regcache::transfer_regset_register): New helper function.
1833 (regcache::transfer_regset): Call new functions.
1834 (regcache_supply_regset): Use gdb_byte*.
1835 (regcache::supply_regset): Likewise.
1836 (regcache_collect_regset): Likewise.
1837 (regcache::collect_regset): Likewise.
1838 * regcache.h (reg_buffer::raw_collect_part): New declaration.
1839 (reg_buffer::raw_supply_part): Likewise.
1840 (regcache::transfer_regset_register): Likewise.
1841 (regcache::transfer_regset): Use gdb_byte*.
1843 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1845 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
1847 2018-06-21 Pedro Alves <palves@redhat.com>
1849 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
1850 instead of a ptid_t. All callers adjusted.
1851 * ada-tasks.c (ada_get_task_number): Likewise. All callers
1853 (print_ada_task_info, display_current_task_id, task_command_1):
1855 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
1857 (breakpoint_kind): Adjust.
1858 (remove_breakpoints_pid): Rename to ...
1859 (remove_breakpoints_inf): ... this. Adjust to take an inferior
1860 pointer. All callers adjusted.
1861 (bpstat_clear_actions): Use inferior_thread.
1862 (get_bpstat_thread): New.
1863 (bpstat_do_actions): Use it.
1864 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
1865 to take a thread_info pointer. All callers adjusted.
1866 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
1867 (breakpoint_re_set_thread): Use inferior_thread.
1868 * breakpoint.h (struct inferior): Forward declare.
1869 (bpstat_stop_status): Update.
1870 (remove_breakpoints_pid): Delete.
1871 (remove_breakpoints_inf): New.
1872 * bsd-uthread.c (bsd_uthread_target::wait)
1873 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
1874 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
1875 (maint_btrace_packet_history_cmd)
1876 (maint_btrace_clear_packet_history_cmd): Adjust.
1877 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
1879 * cli/cli-interp.c: Include "inferior.h".
1880 * common/refcounted-object.h (struct
1881 refcounted_object_ref_policy): New.
1882 * compile/compile-object-load.c: Include gdbthread.h.
1883 (store_regs): Use inferior_thread.
1884 * corelow.c (core_target::close): Use current_inferior.
1885 (core_target_open): Adjust to use first_thread_of_inferior and use
1886 the current inferior.
1887 * ctf.c (ctf_target::close): Adjust to use current_inferior.
1888 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
1889 <thread>: ... this new field. All references adjusted.
1890 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
1891 Take a thread_info pointer instead of a ptid_t.
1892 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
1893 (dummy_frame_discard, register_dummy_frame_dtor): Take a
1894 thread_info pointer instead of a ptid_t.
1895 * elfread.c: Include "inferior.h".
1896 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
1897 Use inferior_thread.
1898 * eval.c (evaluate_subexp): Likewise.
1899 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
1901 * gdb_proc_service.h (struct thread_info): Forward declare.
1902 (struct ps_prochandle) <ptid>: Delete, replaced by ...
1903 <thread>: ... this new field. All references adjusted.
1904 * gdbarch.h, gdbarch.c: Regenerate.
1905 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
1906 'thread' parameter. All implementations and callers adjusted.
1907 * gdbthread.h (thread_info) <set_running>: New method.
1908 (delete_thread, delete_thread_silent): Take a thread_info pointer
1910 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
1911 (first_thread_of_process): Delete, replaced by ...
1912 (first_thread_of_inferior): ... this new function. All callers
1914 (any_live_thread_of_process): Delete, replaced by ...
1915 (any_live_thread_of_inferior): ... this new function. All callers
1917 (switch_to_thread, switch_to_no_thread): Declare.
1918 (is_executing): Delete.
1919 (enable_thread_stack_temporaries): Update comment.
1920 <enable_thread_stack_temporaries>: Take a thread_info pointer
1921 instead of a ptid_t. Incref the thread.
1922 <~enable_thread_stack_temporaries>: Decref the thread.
1925 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1926 (get_last_thread_stack_temporary)
1927 (value_in_thread_stack_temporaries, can_access_registers_thread):
1928 Take a thread_info pointer instead of a ptid_t. All callers
1930 * infcall.c (get_call_return_value): Use inferior_thread.
1931 (run_inferior_call): Work with thread pointers instead of ptid_t.
1932 (call_function_by_hand_dummy): Work with thread pointers instead
1933 of ptid_t. Use thread_info_ref.
1934 * infcmd.c (proceed_thread_callback): Access thread's state
1936 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
1937 access thread's state directly.
1938 (continue_command): Use inferior_thread.
1939 (info_program_command): Use find_thread_ptid and access thread
1941 (proceed_after_attach_callback): Use thread state directly.
1942 (notice_new_inferior): Take a thread_info pointer instead of a
1943 ptid_t. All callers adjusted.
1944 (exit_inferior): Take an inferior pointer instead of a pid. All
1946 (exit_inferior_silent): New.
1947 (detach_inferior): Delete.
1948 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
1949 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
1950 (detach_inferior_command, kill_inferior_command): Use
1951 find_inferior_id instead of valid_gdb_inferior_id and
1952 gdb_inferior_id_to_pid.
1953 (inferior_command): Use inferior and thread pointers.
1954 * inferior.h (struct thread_info): Forward declare.
1955 (notice_new_inferior): Take a thread_info pointer instead of a
1956 ptid_t. All callers adjusted.
1957 (detach_inferior): Delete declaration.
1958 (exit_inferior, exit_inferior_silent): Take an inferior pointer
1959 instead of a pid. All callers adjusted.
1960 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
1961 (valid_gdb_inferior_id): Delete.
1962 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
1963 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
1964 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
1966 <inf>: ... this new field.
1967 <step_ptid>: Delete, replaced by ...
1968 <step_thread>: ... this new field.
1969 (get_displaced_stepping_state): Take an inferior pointer instead
1970 of a pid. All callers adjusted.
1971 (displaced_step_in_progress_any_inferior): Adjust.
1972 (displaced_step_in_progress_thread): Take a thread pointer instead
1973 of a ptid_t. All callers adjusted.
1974 (displaced_step_in_progress, add_displaced_stepping_state): Take
1975 an inferior pointer instead of a pid. All callers adjusted.
1976 (get_displaced_step_closure_by_addr): Adjust.
1977 (remove_displaced_stepping_state): Take an inferior pointer
1978 instead of a pid. All callers adjusted.
1979 (displaced_step_prepare_throw, displaced_step_prepare)
1980 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
1981 All callers adjusted.
1982 (start_step_over): Adjust.
1983 (infrun_thread_ptid_changed): Remove bit updating ptids in the
1984 displaced step queue.
1985 (do_target_resume): Adjust.
1986 (fetch_inferior_event): Use inferior_thread.
1987 (context_switch, get_inferior_stop_soon): Take an
1988 execution_control_state pointer instead of a ptid_t. All callers
1990 (switch_to_thread_cleanup): Delete.
1991 (stop_all_threads): Use scoped_restore_current_thread.
1992 * inline-frame.c: Include "gdbthread.h".
1993 (inline_state) <inline_state>: Take a thread pointer instead of a
1994 ptid_t. All callers adjusted.
1995 <ptid>: Delete, replaced by ...
1996 <thread>: ... this new field.
1997 (find_inline_frame_state): Take a thread pointer instead of a
1998 ptid_t. All callers adjusted.
1999 (skip_inline_frames, step_into_inline_frame)
2000 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2001 pointer instead of a ptid_t. All callers adjusted.
2002 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2003 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2004 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2006 * linux-nat.c (get_detach_signal): Likewise.
2007 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2008 (thread_db_notice_clone): Adjust.
2009 (thread_db_find_new_threads_silently)
2010 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2011 a thread pointer instead of a ptid_t. All callers adjusted.
2012 * mi/mi-cmd-var.c: Include "inferior.h".
2013 (mi_cmd_var_update_iter): Update to use thread pointers.
2014 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2016 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2018 (mi_output_running): ... this new function.
2019 (mi_on_resume_1): Adjust to use it.
2020 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2021 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2023 (interrupt_thread_callback): : Adjust to use thread and inferior
2025 * proc-service.c: Include "gdbthread.h".
2026 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2027 * progspace-and-thread.c: Include "inferior.h".
2028 * progspace.c: Include "inferior.h".
2029 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2030 hold a reference to an inferior_object.
2031 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2033 * python/py-inferior.c (struct inferior_object): Give the type a
2034 tag name instead of a typedef.
2035 (python_on_normal_stop): No need to check if the current thread is
2037 (inferior_to_inferior_object): Change return type to
2038 inferior_object. All callers adjusted.
2039 (find_thread_object): Delete, bits factored out to ...
2040 (thread_to_thread_object): ... this new function.
2041 * python/py-infthread.c (create_thread_object): Use
2042 inferior_to_inferior_object.
2043 (thpy_is_stopped): Use thread pointer directly.
2044 (gdbpy_selected_thread): Use inferior_thread.
2045 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2046 field, replaced with ...
2047 <thread>: ... this new field. All users adjusted.
2048 (btpy_insn_or_gap_new): Drop const.
2049 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2051 * python/py-record.c: Include "gdbthread.h".
2052 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2053 a ptid_t. All callers adjusted.
2054 (gdbpy_current_recording): Use inferior_thread.
2055 * python/py-record.h (recpy_record_object) <ptid>: Delete
2056 field, replaced with ...
2057 <thread>: ... this new field. All users adjusted.
2058 (recpy_element_object) <ptid>: Delete
2059 field, replaced with ...
2060 <thread>: ... this new field. All users adjusted.
2061 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2062 a ptid_t. All callers adjusted.
2063 * python/py-threadevent.c: Include "gdbthread.h".
2064 (get_event_thread): Use thread_to_thread_object.
2065 * python/python-internal.h (struct inferior_object): Forward
2067 (find_thread_object, find_inferior_object): Delete declarations.
2068 (thread_to_thread_object, inferior_to_inferior_object): New
2070 * record-btrace.c: Include "inferior.h".
2071 (require_btrace_thread): Use inferior_thread.
2072 (record_btrace_frame_sniffer)
2073 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2074 (get_thread_current_frame): Use scoped_restore_current_thread and
2076 (get_thread_current_frame): Use thread pointer directly.
2077 (record_btrace_replay_at_breakpoint): Use thread's inferior
2079 * record-full.c: Include "inferior.h".
2080 * regcache.c: Include "gdbthread.h".
2081 (get_thread_arch_regcache): Use the inferior's address space
2083 (get_thread_regcache, registers_changed_thread): New.
2084 * regcache.h (get_thread_regcache(thread_info *thread)): New
2086 (registers_changed_thread): New.
2087 (remote_target) <remote_detach_1>: Swap order of parameters.
2088 (remote_add_thread): <remote_add_thread>: Return the new thread.
2089 (get_remote_thread_info(ptid_t)): New overload.
2090 (remote_target::remote_notice_new_inferior): Use thread pointers
2092 (remote_target::process_initial_stop_replies): Use
2093 thread_info::set_running.
2094 (remote_target::remote_detach_1, remote_target::detach)
2095 (extended_remote_target::detach): Adjust.
2096 * stack.c (frame_show_address): Use inferior_thread.
2097 * target-debug.h (target_debug_print_thread_info_pp): New.
2098 * target-delegates.c: Regenerate.
2099 * target.c (default_thread_address_space): Delete.
2100 (memory_xfer_partial_1): Use current_inferior.
2101 (target_detach): Use current_inferior.
2102 (target_thread_address_space): Delete.
2103 (generic_mourn_inferior): Use current_inferior.
2104 * target.h (struct target_ops) <thread_address_space>: Delete.
2105 (target_thread_address_space): Delete.
2106 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2108 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2109 thread pointer instead of a ptid_t. Adjust all callers.
2110 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2111 (first_thread_of_process): Delete, replaced by ...
2112 (first_thread_of_inferior): ... this new function. All callers
2114 (any_thread_of_process): Rename to ...
2115 (any_thread_of_inferior): ... this, and take an inferior pointer.
2116 (any_live_thread_of_process): Rename to ...
2117 (any_live_thread_of_inferior): ... this, and take an inferior
2119 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2120 (value_in_thread_stack_temporaries)
2121 (get_last_thread_stack_temporary): Take a thread pointer instead
2122 of a ptid_t. Adjust all callers.
2123 (thread_info::set_running): New.
2124 (validate_registers_access): Use inferior_thread.
2125 (can_access_registers_ptid): Rename to ...
2126 (can_access_registers_thread): ... this, and take a thread
2128 (print_thread_info_1): Adjust to compare thread pointers instead
2130 (switch_to_no_thread, switch_to_thread): Make extern.
2131 (scoped_restore_current_thread::~scoped_restore_current_thread):
2132 Use m_thread pointer directly.
2133 (scoped_restore_current_thread::scoped_restore_current_thread):
2134 Use inferior_thread.
2135 (thread_command): Use thread pointer directly.
2136 (thread_num_make_value_helper): Use inferior_thread.
2137 * top.c (execute_command): Use inferior_thread.
2138 * tui/tui-interp.c: Include "inferior.h".
2139 * varobj.c (varobj_create): Use inferior_thread.
2140 (value_of_root_1): Use find_thread_global_id instead of
2141 global_thread_id_to_ptid.
2143 2018-06-21 Alan Hayward <alan.hayward@arm.com>
2145 * regcache.c (readable_regcache::read_part): Avoid memcpy when
2147 (regcache::write_part): Likewise.
2148 (readable_regcache::cooked_read_part): Update comment.
2149 (readable_regcache::cooked_write_part): Likewise.
2150 * regcache.h: (readable_regcache::read_part): Likewise.
2151 (regcache::write_part): Likewise.
2153 2018-06-21 Richard Bunt <richard.bunt@arm.com>
2154 Dirk Schubert <dirk.schubert@arm.com>
2156 * aarch64-linux-nat.c (post_attach): New.
2157 (aarch64_linux_nat_target::post_attach): Override post_attach to
2158 record the number of hardware debug registers.
2160 2018-06-20 Tom Tromey <tom@tromey.com>
2162 * python/py-param.c (add_setshow_generic): Make parameters const.
2163 (parmpy_init): Update.
2165 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2167 * regcache.h (regcache_cooked_read_ftype): Rename to...
2168 (register_read_ftype): ...this, change type to function_view.
2169 (class reg_buffer) <save>: Remove src parameter.
2170 (readonly_detached_regcache) <readonly_detached_regcache>: Make
2171 parameter non-const in first overload. Remove src parameter in
2173 * regcache.c (do_cooked_read): Remove.
2174 (readonly_detached_regcache::readonly_detached_regcache): Make
2175 parameter non-const, adjust call to other constructor.
2176 (reg_buffer::save): Remove src parameter.
2177 * frame.c (do_frame_register_read): Remove.
2178 (frame_save_as_regcache): Use lambda function.
2179 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2180 parameter to ppu2spu_data *.
2181 (ppu2spu_sniffer): Use lambda function.
2183 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2185 * record-full.c (record_full_target::insert_breakpoint): Remove
2186 "struct" keyword, add const.
2188 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2190 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2191 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2192 * configure.ac: Remove AC_PREREQ, add missing quoting.
2193 * gnulib/configure.ac: Modernize usage of
2194 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
2195 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2196 (AUTOMAKE_VERSION): Bump to 1.15.1.
2197 * configure: Re-generate.
2198 * config.in: Re-generate.
2199 * aclocal.m4: Re-generate.
2200 * gnulib/aclocal.m4: Re-generate.
2201 * gnulib/config.in: Re-generate.
2202 * gnulib/configure: Re-generate.
2203 * gnulib/import/Makefile.in: Re-generate.
2205 2018-06-19 Pedro Alves <palves@redhat.com>
2207 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2208 (lookup_minimal_symbol_by_pc_section): ... here with
2209 gdb_assert_not_reached added.
2211 2018-06-19 Pedro Alves <palves@redhat.com>
2213 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2214 parameter with a block parameter. Compare location's block symbol
2215 with the frame's block instead of addresses.
2216 (skip_inline_frames): Pass the current block instead of the
2217 frame's address. Break out as soon as we determine the frame
2218 should not be skipped.
2220 2018-06-18 Tom Tromey <tom@tromey.com>
2222 * solib-aix.c (solib_aix_get_section_offsets): Return
2224 (solib_aix_solib_create_inferior_hook): Update.
2226 2018-06-18 Tom Tromey <tom@tromey.com>
2228 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2230 2018-06-18 Tom Tromey <tom@tromey.com>
2232 * solib-frv.c (frv_relocate_main_executable): Use
2234 * solib-dsbt.c (dsbt_relocate_main_executable): Use
2237 2018-06-18 Tom Tromey <tom@tromey.com>
2239 * objfiles.h (inhibit_section_map_updates): Update.
2240 (resume_section_map_updates, resume_section_map_updates_cleanup):
2242 * solib-svr4.c (svr4_handle_solib_event): Update.
2243 * objfiles.c (inhibit_section_map_updates): Return
2244 scoped_restore_tmpl<int>.
2245 (resume_section_map_updates, resume_section_map_updates_cleanup):
2248 2018-06-18 Tom Tromey <tom@tromey.com>
2250 * valprint.h (read_string): Update.
2251 * valprint.c (read_string): Change type of "buffer".
2252 (val_print_string): Update.
2253 * python/py-value.c (valpy_string): Update.
2254 * language.h (struct language_defn) <la_get_string>: Change
2256 (default_get_string, c_get_string): Update.
2257 * language.c (default_get_string): Change type of "buffer".
2258 * guile/scm-value.c (gdbscm_value_to_string): Update.
2259 * c-lang.c (c_get_string): Change type of "buffer".
2261 2018-06-18 Tom Tromey <tom@tromey.com>
2263 * ser-mingw.c (struct pipe_state_destroyer): New.
2264 (pipe_state_up): New typedef.
2265 (cleanup_pipe_state): Remove.
2266 (pipe_windows_open): Use pipe_state_up. Don't release argv.
2268 2018-06-18 Tom Tromey <tom@tromey.com>
2270 * rust-lang.h (rust_yyerror): Don't declare.
2271 * rust-lang.c (rust_language_defn): Update.
2272 * rust-exp.y (yyerror): Now static.
2273 * parse.c (parse_exp_in_context_1): Update.
2274 * p-lang.h (p_yyerror): Don't declare.
2275 * p-lang.c (p_language_defn): Update.
2276 * p-exp.y (yyerror): Now static.
2277 * opencl-lang.c (opencl_language_defn): Update.
2278 * objc-lang.c (objc_language_defn): Update.
2279 * m2-lang.h (m2_yyerror): Don't declare.
2280 * m2-lang.c (m2_language_defn): Update.
2281 * m2-exp.y (yyerror): Now static.
2282 * language.h (struct language_defn) <la_error>: Remove.
2283 * language.c (unk_lang_error): Remove.
2284 (unknown_language_defn, auto_language_defn): Remove.
2285 * go-lang.h (go_yyerror): Don't declare.
2286 * go-lang.c (go_language_defn): Update.
2287 * go-exp.y (yyerror): Now static.
2288 * f-lang.h (f_yyerror): Don't declare.
2289 * f-lang.c (f_language_defn): Update.
2290 * f-exp.y (yyerror): Now static.
2291 * d-lang.h (d_yyerror): Don't declare.
2292 * d-lang.c (d_language_defn): Update.
2293 * d-exp.y (yyerror): Now static.
2294 * c-lang.h (c_yyerror): Don't declare.
2295 * c-lang.c (c_language_defn, cplus_language_defn)
2296 (asm_language_defn, minimal_language_defn): Update.
2297 * c-exp.y (yyerror): Now static.
2298 * ada-lang.h (ada_yyerror): Don't declare.
2299 * ada-lang.c (ada_language_defn): Update.
2300 * ada-exp.y (yyerror): Now static.
2302 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2304 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2305 (store_sveregs_to_thread): Likewise.
2306 (aarch64_linux_fetch_inferior_registers): Check for SVE.
2307 (aarch64_linux_store_inferior_registers): Likewise.
2308 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2310 (aarch64_sve_regs_copy_to_regcache): Likewise.
2311 (aarch64_sve_regs_copy_from_regcache): Likewise.
2312 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2314 (aarch64_sve_regs_copy_to_regcache): Likewise.
2315 (aarch64_sve_regs_copy_from_regcache): Likewise.
2316 (sve_context): Structure from Linux headers.
2317 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2318 (SVE_SIG_ZREG_SIZE): Likewise.
2319 (SVE_SIG_PREG_SIZE): Likewise.
2320 (SVE_SIG_FFR_SIZE): Likewise.
2321 (SVE_SIG_REGS_OFFSET): Likewise.
2322 (SVE_SIG_ZREGS_OFFSET): Likewise.
2323 (SVE_SIG_ZREG_OFFSET): Likewise.
2324 (SVE_SIG_ZREGS_SIZE): Likewise.
2325 (SVE_SIG_PREGS_OFFSET): Likewise.
2326 (SVE_SIG_PREG_OFFSET): Likewise.
2327 (SVE_SIG_PREGS_SIZE): Likewise.
2328 (SVE_SIG_FFR_OFFSET): Likewise.
2329 (SVE_SIG_REGS_SIZE): Likewise.
2330 (SVE_SIG_CONTEXT_SIZE): Likewise.
2331 (SVE_PT_REGS_MASK): Likewise.
2332 (SVE_PT_REGS_FPSIMD): Likewise.
2333 (SVE_PT_REGS_SVE): Likewise.
2334 (SVE_PT_VL_INHERIT): Likewise.
2335 (SVE_PT_VL_ONEXEC): Likewise.
2336 (SVE_PT_REGS_OFFSET): Likewise.
2337 (SVE_PT_FPSIMD_OFFSET): Likewise.
2338 (SVE_PT_FPSIMD_SIZE): Likewise.
2339 (SVE_PT_SVE_ZREG_SIZE): Likewise.
2340 (SVE_PT_SVE_PREG_SIZE): Likewise.
2341 (SVE_PT_SVE_FFR_SIZE): Likewise.
2342 (SVE_PT_SVE_FPSR_SIZE): Likewise.
2343 (SVE_PT_SVE_FPCR_SIZE): Likewise.
2344 (__SVE_SIG_TO_PT): Likewise.
2345 (SVE_PT_SVE_OFFSET): Likewise.
2346 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2347 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2348 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2349 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2350 (SVE_PT_SVE_PREG_OFFSET): Likewise.
2351 (SVE_PT_SVE_PREGS_SIZE): Likewise.
2352 (SVE_PT_SVE_FFR_OFFSET): Likewise.
2353 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2354 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2355 (SVE_PT_SVE_SIZE): Likewise.
2356 (SVE_PT_SIZE): Likewise.
2357 (HAS_SVE_STATE): New define.
2359 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2361 * nat/aarch64-sve-linux-sigcontext.h: New file.
2362 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2364 (SVE_VQ_MIN): Likewise.
2365 (SVE_VQ_MAX): Likewise.
2366 (SVE_VL_MIN): Likewise.
2367 (SVE_VL_MAX): Likewise.
2368 (SVE_NUM_ZREGS): Likewise.
2369 (SVE_NUM_PREGS): Likewise.
2370 (sve_vl_valid): Likewise.
2371 (struct user_sve_header): Likewise.
2373 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
2374 Richard Bunt <Richard.Bunt@arm.com>
2376 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2377 was requested by GDB.
2379 2018-06-15 Tom de Vries <tdevries@suse.de>
2381 * MAINTAINERS (Write After Approval): Add Tom de Vries.
2383 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
2385 * gnulib/update-gnulib.sh: Print expected versions of
2388 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
2390 * arch-utils.c (default_type_align): Use type_length_units.
2391 * gdbtypes.c (type_align): Use type_length_units.
2393 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2395 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2396 of 'define' command.
2398 2018-06-14 Tom de Vries <tdevries@suse.de>
2401 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2402 get_no_prettyformat_print_options.
2404 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
2406 * sparc-nat.h: Include target.h.
2407 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2408 <fetch_registers>: Remove this argument in function call.
2409 <store_registers>: Remove this argument in function call, remove
2411 <low_forget_process>: Call sparc64_forget_process instead of
2412 sparc_forget_process.
2414 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2416 * procfs.c (_initialize_procfs): Use add_inf_child_target.
2417 (procfs_target::make_corefile_notes): Adjust to new
2418 target_read_alloc return type.
2420 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2421 Stephen Roberts <stephen.roberts@arm.com>
2424 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2425 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2426 Move should_notify_stop local into more inner scope.
2428 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2429 Stephen Roberts <stephen.roberts@arm.com>
2432 * infrun.c (resume_1): Add call to mark_async_event_handler.
2434 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2436 * infrun.c (do_target_wait): Change old version of $pc printed.
2438 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
2440 * dwarf2read.c (read_index_from_section): Rename to...
2441 (read_gdb_index_from_section): ... this, update all callers.
2442 (dwarf2_read_index): Rename to...
2443 (dwarf2_read_gdb_index): ... this, update all callers.
2445 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
2447 * gdb/hppa-linux-nat.c
2448 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2449 hppa_linux_nat_target::fetch_registers.
2451 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2453 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2454 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2455 (AARCH64_DWARF_SVE_FFR): Likewise.
2456 (AARCH64_DWARF_SVE_P0): Likewise.
2457 (AARCH64_DWARF_SVE_Z0): Likewise.
2459 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2461 * common/common-regcache.h (raw_compare): New function.
2462 * regcache.c (regcache::raw_compare): Likewise.
2463 * regcache.h (regcache::raw_compare): New declaration.
2465 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2467 * common/common-regcache.h (reg_buffer_common): New structure.
2468 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2469 (reg_buffer::raw_supply): Likewise.
2470 (reg_buffer::raw_supply_integer): Likewise.
2471 (reg_buffer::raw_supply_zeroed): Likewise.
2472 (reg_buffer::raw_collect): Likewise.
2473 (reg_buffer::raw_collect_integer): Likewise.
2474 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2475 (reg_buffer::raw_supply): Likewise.
2476 (reg_buffer::raw_supply_integer): Likewise.
2477 (reg_buffer::raw_supply_zeroed): Likewise.
2478 (reg_buffer::raw_collect): Likewise.
2479 (reg_buffer::raw_collect_integer): Likewise.
2481 2018-06-10 Tom Tromey <tom@tromey.com>
2483 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
2484 (class remote_state) <stop_reply_queue>: Now std::vector.
2485 (remote_state::~remote_state)
2486 (remote_target::stop_reply_queue_length): Update.
2487 (struct queue_iter_param, remove_child_of_pending_fork)
2488 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2489 (check_pending_event_prevents_wildcard_vcont_callback)
2490 (remove_stop_reply_for_inferior)
2491 (remove_stop_reply_of_remote_state)
2492 (remote_notif_remove_once_on_match)
2493 (stop_reply_match_ptid_and_ws)
2494 (remote_kill_child_of_pending_fork): Remove.
2495 (remote_target::remove_new_fork_children)
2496 (remote_target::check_pending_events_prevent_wildcard_vcont)
2497 (remote_target::discard_pending_stop_replies)
2498 (remote_target::discard_pending_stop_replies_in_queue)
2499 (remote_target::remote_notif_remove_queued_reply)
2500 (remote_target::queued_stop_reply)
2501 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2502 (remote_target::wait, remote_target::kill_new_fork_children)
2503 (remote_target::async): Update.
2505 2018-06-10 Tom Tromey <tom@tromey.com>
2507 * record-full.c (record_full_arch_list_cleanups): Remove.
2508 (record_full_message): Use try/catch.
2509 (record_full_wait_cleanups): Remove.
2510 (record_full_wait_1): Use try/catch.
2511 (record_full_restore): Likewise.
2513 2018-06-10 Tom Tromey <tom@tromey.com>
2515 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
2516 declare VEC. Add constructor.
2517 <in_target_beneath>: Now bool.
2518 (record_full_breakpoints): Now a std::vector, static.
2519 (record_full_sync_record_breakpoints)
2520 (record_full_init_record_breakpoints)
2521 (record_full_target::insert_breakpoint)
2522 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
2524 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
2526 * dwarf2read.c (process_cu_includes): Remove struct keyword.
2527 * serial.c (serial_interface_lookup): Remove struct keyword.
2529 2018-06-10 Tom Tromey <tom@tromey.com>
2531 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
2533 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
2535 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
2537 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
2538 "beneath" as a method.
2539 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
2540 Use "beneath" as a method.
2542 2018-06-10 Tom Tromey <tom@tromey.com>
2544 * tracefile.c (struct trace_file_writer_deleter): New.
2545 <operator()>: Rename from trace_file_writer_xfree.
2546 (trace_file_writer_up): New typedef.
2547 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
2549 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2551 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
2552 <m_registers, m_register_status>: Change type to
2554 * regcache.c (reg_buffer::reg_buffer): Use new instead of
2557 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2559 * common/common-regcache.h (enum register_status): Add
2560 underlying type "signed char".
2561 * regcache.h (reg_buffer) <m_register_status>: Change type to
2563 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
2564 register_status instead of signed char.
2565 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
2566 (reg_buffer::get_register_status): Remove cast.
2567 (readable_regcache::raw_read): Remove cast.
2568 (readable_regcache::cooked_read): Remove cast.
2570 2018-06-09 Tom Tromey <tom@tromey.com>
2572 * source.c (reverse_search_command, forward_search_command): Use
2575 2018-06-09 Tom Tromey <tom@tromey.com>
2577 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
2578 (serial_ops_list): Now static, std::vector.
2579 (serial_interface_lookup, serial_add_interface): Update.
2581 2018-06-09 Tom Tromey <tom@tromey.com>
2583 * dwarf2read.c (process_cu_includes): Update.
2584 (process_full_comp_unit): Update.
2585 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
2588 2018-06-08 Paul Koning <paul_koning@dell.com>
2592 * python/python.c (do_start_initialization):
2593 Avoid call to internal Python API.
2594 (init__gdb_module): New function.
2596 2018-06-08 Gary Benson <gbenson@redhat.com>
2598 * linux-thread-db.c (valprint.h): New include.
2599 (struct check_thread_db_info): New structure.
2600 (check_thread_db_on_load, tdb_testinfo): New static globals.
2601 (check_thread_db, check_thread_db_callback): New functions.
2602 (try_thread_db_load_1): Run integrity checks if requested.
2603 (maintenance_check_libthread_db): New function.
2604 (_initialize_thread_db): Register "maint check libthread-db"
2605 and "maint set/show check-libthread-db".
2606 * NEWS: Mention the above new commands.
2608 2018-06-08 Tom Tromey <tom@tromey.com>
2610 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
2613 2018-06-08 Tom Tromey <tom@tromey.com>
2615 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
2617 2018-06-08 Tom Tromey <tom@tromey.com>
2619 * common/btrace-common.h (struct btrace_data): Add constructor,
2620 destructor, move assignment operator.
2621 <empty, clear, fini>: New methods.
2622 <format>: Initialize.
2623 (btrace_data_init, btrace_data_fini, btrace_data_clear)
2624 (btrace_data_empty): Don't declare.
2625 * common/btrace-common.c (btrace_data_init): Remove.
2626 (btrace_data::fini): Rename from btrace_data_fini.
2627 (btrace_data::empty): Rename from btrace_data_empty.
2628 (btrace_data::clear): Rename from btrace_data_clear. Return
2630 * btrace.h (make_cleanup_btrace_data): Don't declare.
2631 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
2632 (parse_xml_btrace): Update.
2633 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
2634 (maint_btrace_clear_packet_history_cmd): Update.
2636 2018-06-07 Pedro Alves <palves@redhat.com>
2638 * target.h (target_ops) <beneath>: Now a method. All references
2640 (class target_stack): New.
2641 * target.c (g_target_stack): New.
2642 (g_current_top_target): Delete.
2643 (current_top_target): Get the top target out of g_target_stack.
2644 (target_stack::push, target_stack::unpush): New.
2645 (push_target, unpush_target): Reimplement.
2646 (target_is_pushed): Reimplement in terms of g_target_stack.
2647 (target_ops::beneath, target_stack::find_beneath): New.
2649 2018-06-07 Pedro Alves <palves@redhat.com>
2651 * target.h (find_target_beneath): Delete declaration.
2652 * target.c (find_target_beneath): Delete definition.
2653 * aix-thread.c: All callers of find_target_beneath adjusted to
2654 call target_ops::beneath instead.
2655 * bsd-uthread.c: Likewise.
2656 * linux-thread-db.c: Likewise.
2657 * ravenscar-thread.c: Likewise.
2658 * sol-thread.c: Likewise.
2659 * spu-multiarch.c: Likewise.
2661 2018-06-07 Pedro Alves <palves@redhat.com>
2663 * target.h (target_ops) <beneath>: Now a method. All references
2665 (target_ops) <m_beneath>: New.
2666 * target.c (target_ops::beneath): New.
2667 * corelow.c: Adjust all references to target_ops::beneath.
2668 * linux-thread-db.c: Likewise.
2669 * make-target-delegates: Likewise.
2670 * record-btrace.c: Likewise.
2671 * record-full.c: Likewise.
2672 * remote.c: Likewise.
2673 * target.c: Likewise.
2674 * target-delegates.c: Regenerate.
2676 2018-06-07 Pedro Alves <palves@redhat.com>
2678 * target.h (target_stack): Delete.
2679 (current_top_target): Declare function.
2680 * target.c (target_stack): Delete.
2681 (g_current_top_target): New.
2682 (current_top_target): New function.
2683 * auxv.c: Use current_top_target instead of target_stack
2685 * avr-tdep.c: Likewise.
2686 * breakpoint.c: Likewise.
2687 * corefile.c: Likewise.
2688 * elfread.c: Likewise.
2690 * exceptions.c: Likewise.
2691 * frame.c: Likewise.
2692 * gdbarch-selftests.c: Likewise.
2693 * gnu-v3-abi.c: Likewise.
2694 * ia64-tdep.c: Likewise.
2695 * ia64-vms-tdep.c: Likewise.
2696 * infcall.c: Likewise.
2697 * infcmd.c: Likewise.
2698 * infrun.c: Likewise.
2699 * linespec.c: Likewise.
2700 * linux-tdep.c: Likewise.
2701 * minsyms.c: Likewise.
2702 * ppc-linux-nat.c: Likewise.
2703 * ppc-linux-tdep.c: Likewise.
2704 * procfs.c: Likewise.
2705 * regcache.c: Likewise.
2706 * remote.c: Likewise.
2707 * rs6000-tdep.c: Likewise.
2708 * s390-linux-nat.c: Likewise.
2709 * s390-tdep.c: Likewise.
2710 * solib-aix.c: Likewise.
2711 * solib-darwin.c: Likewise.
2712 * solib-dsbt.c: Likewise.
2713 * solib-spu.c: Likewise.
2714 * solib-svr4.c: Likewise.
2715 * solib-target.c: Likewise.
2716 * sparc-tdep.c: Likewise.
2717 * sparc64-tdep.c: Likewise.
2718 * spu-tdep.c: Likewise.
2719 * symfile.c: Likewise.
2720 * symtab.c: Likewise.
2721 * target-descriptions.c: Likewise.
2722 * target-memory.c: Likewise.
2723 * target.c: Likewise.
2724 * target.h: Likewise.
2725 * tracefile-tfile.c: Likewise.
2726 * tracepoint.c: Likewise.
2727 * valops.c: Likewise.
2728 * valprint.c: Likewise.
2729 * value.c: Likewise.
2730 * windows-tdep.c: Likewise.
2731 * mi/mi-main.c: Likewise.
2733 2018-06-07 Tom Tromey <tom@tromey.com>
2735 * valprint.h (build_address_symbolic): Declare.
2736 * printcmd.c (print_address_symbolic): Update.
2737 (build_address_symbolic): Change "name" and "filename" to
2739 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
2741 * defs.h (build_address_symbolic): Remove declaration.
2743 2018-06-07 Alan Hayward <alan.hayward@arm.com>
2745 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
2746 (aarch64_vnv_type): Add function.
2747 (aarch64_pseudo_register_name): Add V regs for SVE.
2748 (aarch64_pseudo_register_type): Likewise.
2749 (aarch64_pseudo_register_reggroup_p): Likewise.
2750 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
2751 (aarch64_pseudo_read_value): Add V regs for SVE.
2752 (aarch64_pseudo_write_2): Use V0 offset for SVE
2753 (aarch64_pseudo_write): Add V regs for SVE.
2754 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
2756 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
2758 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
2759 (sve_vl_from_vq): Likewise.
2761 2018-06-05 Tom Tromey <tom@tromey.com>
2763 * cli/cli-cmds.c (show_version): Update.
2764 * top.c (print_gdb_version): Add "interactive" parameter.
2766 * main.c (captured_main_1): Update.
2767 * top.h (print_gdb_version): Add "interactive" parameter and a
2770 2018-06-05 David Malcolm <dmalcolm@redhat.com>
2772 * common/enum-flags.h: Add trailing semicolon to example in
2775 2018-06-05 Tom Tromey <tom@tromey.com>
2778 * NEWS: Add entry about pager.
2779 * utils.c (pagination_disabled_for_command): New global.
2780 (prompt_for_continue): Allow "c" response to prompt.
2781 (reinitialize_more_filter): Clear
2782 pagination_disabled_for_command.
2783 (fputs_maybe_filtered): Check pagination_disabled_for_command.
2785 2018-06-04 Tom Tromey <tom@tromey.com>
2787 * ada-lang.h (ada_lookup_symbol_list): Update.
2788 * ada-lang.c (resolve_subexp): Update.
2789 (symbols_are_identical_enums): Change type of syms. Remove nsyms
2791 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
2792 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
2793 results parameter to std::vector.
2794 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
2796 * ada-exp.y (block_lookup): Update.
2797 (select_possible_type_sym): Change type of syms. Remove nsyms
2799 (write_var_or_type, write_name_assoc): Update.
2801 2018-06-04 Joel Brobecker <brobecker@adacore.com>
2803 * windows-nat.c (windows_nat_target::xfer_partial): Return
2804 TARGET_XFER_E_IO if we need to delegate to the target beneath
2805 but BENEATH is NULL.
2807 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
2809 * Makefile.in (config.status): Add configure.nat as a
2812 2018-06-04 Tom Tromey <tom@tromey.com>
2814 * cp-name-parser.y (cpname_state): Add method declarations.
2815 (HANDLE_QUAL): Update.
2816 (cpname_state::d_grab, cpname_state::fill_comp)
2817 (cpname_state::make_operator, cpname_state::make_dtor)
2818 (cpname_state::make_builtin_type, cpname_state::make_name)
2819 (cpname_state::d_qualify, cpname_state::d_int_type)
2820 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
2821 (%union): Move earlier.
2823 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2825 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
2827 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2829 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
2830 (aarch64_pseudo_write_1): Likewise.
2831 (aarch64_pseudo_read_value): Use helper.
2832 (aarch64_pseudo_write): Likewise.
2834 2018-06-04 Pedro Alves <palves@redhat.com>
2836 * darwin-nat.c (darwin_ops): Delete.
2837 (darwin_attach_pid): Use get_native_target.
2839 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2841 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
2842 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
2844 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2846 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
2847 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
2848 (aarch64_gdbarch_init): Check for SVE.
2849 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
2851 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2853 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
2854 * aarch64-tdep.h (aarch64_read_description): Likewise.
2855 * arch/aarch64.c (aarch64_create_target_description): Likewise.
2856 * arch/aarch64.h (aarch64_create_target_description): Likewise.
2857 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
2858 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
2859 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
2861 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
2863 * value.c (value_fetch_lazy_bitfield): New.
2864 (value_fetch_lazy_memory): New.
2865 (value_fetch_lazy_register): New.
2866 (value_fetch_lazy): Factor out to smaller functions.
2868 2018-06-01 Tom Tromey <tom@tromey.com>
2870 * cp-name-parser.y (backslashable, represented): Now const.
2872 2018-06-01 Tom Tromey <tom@tromey.com>
2874 * cp-name-parser.y: Include parser-defs.h.
2875 (parser_fprintf): Remove declaration.
2877 2018-06-01 Tom Tromey <tom@tromey.com>
2879 * cp-name-parser.y: Use %pure-parser, %lex-param, and
2881 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
2882 (global_result): Remove globals.
2883 (struct cpname_state): New.
2884 (yyparse): Don't declare.
2885 (yylex, yyerror): Move declarations after %union.
2886 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
2887 (make_name): Add state parameter.
2889 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
2891 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
2893 (yylex): Add lvalp, state parameters.
2894 (yyerror): Add state parameter.
2895 (cp_demangled_name_to_comp): Update.
2897 2018-06-01 Tom Tromey <tom@tromey.com>
2899 * cp-name-parser.y (parser_fprintf): Declare.
2900 (GDB_YY_REMAP_PREFIX): Define.
2901 Include yy-remap.h. Don't redefine yy* identifiers.
2903 2018-06-01 Tom Tromey <tom@tromey.com>
2905 * python/py-type.c (typy_legacy_template_argument): Update.
2906 * cp-support.h (cp_demangled_name_to_comp): Update.
2907 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
2908 parameter to be a "std::string *".
2911 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
2913 * ada-lex.l: Include "diagnostics.h" instead of
2914 "common/diagnostics.h".
2915 * unittests/environ-selftests.c: Likewise.
2916 * common/diagnostics.h: Moved to ../include.
2918 2018-06-01 Joel Brobecker <brobecker@adacore.com>
2920 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
2921 to language_mode_manual while calling breakpoint_re_set_one.
2923 2018-06-01 Tom Tromey <tom@tromey.com>
2925 * valops.c (value_cast_structs, destructor_name_p): Update.
2926 * symtab.c (gdb_mangle_name): Update.
2927 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
2929 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
2930 (pascal_object_print_value_fields, pascal_object_print_value):
2932 * p-typeprint.c (pascal_type_print_derivation_info): Update.
2933 * linespec.c (find_methods): Update.
2934 * gdbtypes.h (type_name_no_tag): Remove.
2935 (type_name_or_error): Rename from type_name_no_tag_or_error.
2936 * gdbtypes.c (type_name_no_tag): Remove.
2937 (type_name_or_error): Rename from type_name_no_tag_or_error.
2938 (lookup_struct_elt_type, check_typedef): Update.
2939 * expprint.c (print_subexp_standard): Update.
2940 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
2941 * d-namespace.c (d_lookup_nested_symbol): Update.
2942 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
2943 (cp_print_class_member): Update.
2944 * cp-namespace.c (cp_lookup_nested_symbol): Update.
2945 * completer.c (add_struct_fields): Update.
2946 * c-typeprint.c (cp_type_print_derivation_info)
2947 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
2949 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
2950 (ada_prefer_type, ada_is_exception_sym): Update.
2952 2018-06-01 Tom Tromey <tom@tromey.com>
2954 * valops.c (enum_constant_from_type, value_namespace_elt)
2955 (value_maybe_namespace_elt): Update.
2956 * valarith.c (find_size_for_pointer_math): Update.
2957 * target-descriptions.c (make_gdb_type): Update.
2958 * symmisc.c (print_symbol): Update.
2959 * stabsread.c (define_symbol, read_type)
2960 (complain_about_struct_wipeout, add_undefined_type)
2961 (cleanup_undefined_types_1): Update.
2962 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
2963 (rust_range_type_p, val_print_struct, rust_print_struct_def)
2964 (rust_internal_print_type, rust_composite_type)
2965 (rust_evaluate_funcall, rust_evaluate_subexp)
2966 (rust_inclusive_range_type_p): Update.
2967 * python/py-type.c (typy_get_tag): Update.
2968 * p-typeprint.c (pascal_type_print_base): Update.
2969 * mdebugread.c (parse_symbol, parse_type): Update.
2970 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
2972 * guile/scm-type.c (gdbscm_type_tag): Update.
2973 * go-lang.c (sixg_string_p): Update.
2974 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
2976 * gdbtypes.h (struct main_type) <tag_name>: Remove.
2977 (TYPE_TAG_NAME): Remove.
2978 * gdbtypes.c (type_name_no_tag): Simplify.
2979 (check_typedef, check_types_equal, recursive_dump_type)
2980 (copy_type_recursive, arch_composite_type): Update.
2981 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
2982 in summary mode when needed.
2983 * eval.c (evaluate_funcall): Update.
2984 * dwarf2read.c (fixup_go_packaging, read_structure_type)
2985 (process_structure_scope, read_enumeration_type)
2986 (read_namespace_type, read_module_type, determine_prefix): Update.
2987 * cp-support.c (inspect_type): Update.
2988 * coffread.c (process_coff_symbol, decode_base_type): Update.
2989 * c-varobj.c (c_is_path_expr_parent): Update.
2990 * c-typeprint.c (c_type_print_base_struct_union): Update.
2991 (c_type_print_base_1): Update. Print struct/class/union/enum in
2992 summary when using C language.
2993 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
2994 (gen_maybe_namespace_elt): Update.
2995 * ada-lang.c (ada_type_name): Simplify.
2996 (empty_record, ada_template_to_fixed_record_type_1)
2997 (template_to_static_fixed_type)
2998 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3000 2018-06-01 Tom Tromey <tom@tromey.com>
3002 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3004 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3005 (c_print_type): Update.
3006 (c_print_type): New overload.
3007 (c_type_print_varspec_prefix, c_type_print_args)
3008 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3009 (c_type_print_base_struct_union, c_type_print_base_1)
3010 (cp_type_print_method_args): Add "language" parameter.
3011 (c_type_print_base): Update.
3012 * c-lang.h (c_print_type): Add new overload.
3014 2018-06-01 Tom Tromey <tom@tromey.com>
3016 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3017 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3019 2018-06-01 Alan Hayward <alan.hayward@arm.com>
3021 * aarch64-tdep.c (aarch64_sve_register_names): New const
3023 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3024 (AARCH64_SVE_Z_REGS_NUM): New define.
3025 (AARCH64_SVE_P_REGS_NUM): Likewise.
3026 (AARCH64_SVE_NUM_REGS): Likewise.
3028 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
3030 * nat/linux-ptrace.h [__alpha__]
3031 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3034 2018-05-31 Maciej W. Rozycki <macro@mips.com>
3036 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3037 the endianness selected.
3038 * NEWS: Document `set endian auto' mode operation update.
3040 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3042 * Makefile.in: Add new header.
3043 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3044 (sve_vl_from_vg): Likewise.
3045 (sve_vq_from_vl): Likewise.
3046 (sve_vl_from_vq): Likewise.
3047 (sve_vq_from_vg): Likewise.
3048 (sve_vg_from_vq): Likewise.
3049 * configure.nat: Add new c file.
3050 * nat/aarch64-sve-linux-ptrace.c: New file.
3051 * nat/aarch64-sve-linux-ptrace.h: New file.
3053 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3055 * aarch64-linux-nat.c (aarch64_linux_read_description):
3057 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3059 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3060 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3061 (aarch64_gdbarch_init): Add parmeter zero.
3062 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3063 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3064 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3066 * doc/gdb.texinfo: Describe SVE feature
3067 * features/aarch64-sve.c: New file.
3069 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
3072 * gdbarch.sh (significant_addr_bit): Default to zero when
3073 not set by target architecture.
3074 * gdbarch.c: Re-generated.
3075 * utils.c (address_significant): Update.
3077 2018-05-30 Joel Brobecker <brobecker@adacore.com>
3079 * stack.c (func_command): Remove trailing newline in call to error.
3081 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3083 * regcache.h (regcache_raw_collect): Remove, update callers to
3084 use regcache::raw_collect.
3085 * regcache.c (regcache_raw_collect): Remove.
3087 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3089 * regcache.h (regcache_raw_supply): Remove, update callers to
3090 use detached_regcache::raw_supply.
3091 * regcache.c (regcache_raw_supply): Remove.
3093 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3095 * regcache.h (regcache_cooked_write_part): Remove, update
3096 callers to use regcache::cooked_write_part.
3097 * regcache.c (regcache_cooked_write_part): Remove.
3099 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3101 * regcache.h (regcache_cooked_read_part): Remove, update callers
3102 to use readable_regcache::cooked_read_part.
3103 * regcache.c (regcache_cooked_read_part): Remove.
3105 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3107 * regcache.h (regcache_cooked_read_value): Remove, update
3108 callers to use readable_regcache::cooked_read_value.
3109 * regcache.c (regcache_cooked_read_value): Remove.
3111 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3113 * regcache.h (regcache_cooked_write): Remove, update callers to
3114 use regcache::cooked_write.
3115 * regcache.c (regcache_cooked_write): Remove.
3117 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3119 * regcache.h (regcache_invalidate): Remove, update callers to
3120 use detached_regcache::invalidate instead.
3121 * regcache.c (regcache_invalidate): Remove.
3123 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3125 * regcache.h (regcache_raw_write_part): Remove, update callers
3126 to use regcache::raw_write_part instead.
3127 * regcache.c (regcache_raw_write_part): Remove.
3129 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3131 * regcache.h (regcache_raw_read_part): Remove, update callers to
3132 use readable_regcache::raw_read_part instead.
3133 * regcache.c (regcache_raw_read_part): Remove.
3135 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3137 * regcache.h (regcache_cooked_read): Remove, update callers to
3138 use readable_regcache::cooked_read instead.
3139 * regcache.c (regcache_cooked_read): Remove.
3141 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3143 * regcache.h (regcache_raw_write): Remove, update callers to use
3144 regcache::raw_write instead.
3145 * regcache.c (regcache_raw_write): Remove.
3147 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3149 * regcache.h (regcache_raw_read): Remove, update callers to use
3150 readable_regcache::raw_read instead.
3151 * regcache.c (regcache_raw_read): Remove.
3153 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3155 * regcache.h (regcache_raw_update): Remove, update callers to
3156 use readable_regcache::raw_update instead.
3157 * regcache.c (regcache_raw_update): Remove.
3159 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3161 * regcache.h (regcache_register_status): Remove, update callers
3162 to use reg_buffer::get_register_status directly instead.
3163 * regcache.c (regcache_register_status): Remove.
3165 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3167 * regcache.h (regcache_get_ptid): Remove, update all callers to
3168 call regcache::ptid instead.
3169 * regcache.c (regcache_get_ptid): Remove.
3171 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3173 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3175 2018-05-30 Pedro Alves <palves@redhat.com>
3177 * common/common-exceptions.h (exception_rethrow): Use
3180 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
3182 * breakpoint.c (print_solib_event, check_status_catch_solib):
3183 Remove struct keyword in range-based for loops.
3184 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3185 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3187 * linespec.c (find_superclass_methods, search_minsyms_for_name):
3189 * symfile.c (addr_info_make_relative): Likewise.
3190 * thread.c (value_in_thread_stack_temporaries): Likewise.
3192 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
3195 * valops.c (value_struct_elt_for_reference): Call check_typedef on
3196 aggregate type to get its real type before accessing it.
3198 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
3200 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3201 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3202 * coff-pe-read.c (add_pe_forwarded_sym): Replace
3203 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3204 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3205 * jit.c (jit_breakpoint_re_set_internal): Likewise.
3206 * printcmd.c (info_address_command): Likewise.
3208 2018-05-29 Tom Tromey <tom@tromey.com>
3210 * windows-nat.c (handle_exception): Update fall-through comment.
3212 2018-05-29 Tom Tromey <tom@tromey.com>
3214 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
3215 (struct program_space) <added_solibs>: Now a std::vector.
3216 * breakpoint.c (print_solib_event): Update.
3217 (check_status_catch_solib): Update.
3218 * progspace.c (clear_program_space_solib_cache): Update.
3219 * solib.c (update_solib_list): Update.
3221 2018-05-29 Tom Tromey <tom@tromey.com>
3223 * python/py-type.c (typy_richcompare): Update.
3224 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3225 * gdbtypes.h (types_deeply_equal): Return bool.
3226 (types_equal): Likewise.
3227 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
3229 (check_types_equal): Change worklist to std::vector. Return
3231 (struct type_equality_entry): Add constructor.
3232 (compare_maybe_null_strings): Return bool.
3233 (check_types_worklist): Return bool. Change worklist to
3235 (types_deeply_equal): Use std::vector.
3236 (types_equal): Return bool.
3237 (compare_maybe_null_strings): Simplify.
3239 2018-05-29 Tom Tromey <tom@tromey.com>
3241 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
3243 2018-05-29 Tom Tromey <tom@tromey.com>
3245 * objc-lang.h: Don't include cp-support.h.
3246 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
3249 2018-05-27 Tom Tromey <tom@tromey.com>
3251 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3253 2018-05-25 Tom Tromey <tom@tromey.com>
3255 * value.c (value::location): Initialize.
3257 2018-05-25 Tom Tromey <tom@tromey.com>
3259 * dbxread.c (init_bincl_list): Remove.
3260 (bincl_list): Now a std::vector.
3261 (bincls_allocated, next_bincl): Remove.
3262 (free_bincl_list, do_free_bincl_list_cleanup)
3263 (make_cleanup_free_bincl_list): Remove.
3264 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3266 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3267 (struct header_file_location): Add constructor.
3268 (add_bincl_to_list): Remove.
3270 2018-05-25 Tom Tromey <tom@tromey.com>
3272 * tui/tui.c (tui_enable): Update.
3273 * mi/mi-interp.c (mi_interp::init): Update.
3274 * interps.h (class interp) <name>: New method.
3275 <m_name>: Rename from name.
3276 (~scoped_restore_interp): Update.
3277 * interps.c (interp::interp): Update.
3278 (interp_add, interp_set, interp_lookup_existing)
3279 (current_interp_named_p): Update.
3281 2018-05-25 Tom Tromey <tom@tromey.com>
3283 * interps.c (interp_name): Remove.
3284 * mi/mi-interp.c (mi_interp::init): Update.
3285 * interps.h (interp_name): Remove.
3286 (~scoped_restore_interp): Update.
3287 * tui/tui.c (tui_enable): Update.
3289 2018-05-25 Tom Tromey <tom@tromey.com>
3291 * utils.c (fputs_maybe_filtered): Update.
3292 * linespec.c (decode_line_full): Update.
3293 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3294 (mi_print_breakpoint_for_event, mi_solib_loaded)
3295 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3296 (mi_user_selected_context_changed): Update.
3297 * mi/mi-main.c (mi_execute_command): Update.
3298 * cli/cli-script.c (execute_control_command): Update.
3299 * python/python.c (execute_gdb_command): Update.
3300 * solib.c (info_sharedlibrary_command): Update.
3301 * interps.c (interp_ui_out): Remove.
3302 * interps.h (interp_ui_out): Remove.
3304 2018-05-25 Tom Tromey <tom@tromey.com>
3306 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3307 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3308 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3310 2018-05-25 Tom Tromey <tom@tromey.com>
3312 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3313 * interps.c (interp_exec): Use scoped_restore.
3315 2018-05-25 Tom Tromey <tom@tromey.com>
3317 * remote.c (remote_target::remote_file_get): Use
3319 (remote_target::remote_file_put): Likewise.
3321 2018-05-25 Tom Tromey <tom@tromey.com>
3323 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3325 (get_pe_section_index, add_pe_exported_sym): Update.
3326 (read_pe_exported_syms): Use gdb::def_vector.
3328 2018-05-25 Tom Tromey <tom@tromey.com>
3330 * frame.c (remove_prev_frame): Remove.
3331 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3333 2018-05-25 Maciej W. Rozycki <macro@mips.com>
3335 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3337 * mips-linux-nat.c (supply_fpregset): Always call
3338 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3339 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3340 `mips_fill_fpregset'.
3341 * mips-linux-tdep.c (mips_supply_fpregset)
3342 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3343 (mips_fill_fpregset_wrapper): Remove functions.
3344 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3345 (mips_linux_fpregset): Remove variable.
3346 (mips_linux_iterate_over_regset_sections): Use
3347 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3348 (mips_linux_o32_sigframe_init): Remove comment.
3350 2018-05-25 Pedro Alves <palves@redhat.com>
3352 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3353 (struct readahead_cache, struct packet_reg, struct
3354 remote_arch_state, class remote_state): Move higher up in the
3356 (remote_target::m_remote_state): Now an object instead of a pointer.
3357 (remote_target::get_remote_state): Adjust.
3359 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3361 * stack.c (select_and_print_frame): Delete.
3362 (struct function_bounds): Move struct within function.
3363 (func_command): Most content moved into new function
3364 find_frame_for_function, use new function, print result, add
3366 (find_frame_for_function): New function, now returns a result.
3368 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3370 * stack.c (iterate_over_block_arg_vars): Fix comment.
3371 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3373 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3377 (scoped_restore_selected_frame::scoped_restore_selected_frame):
3379 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3381 * frame.h (class scoped_restore_selected_frame): New class.
3382 * stack.c (print_frame_local_vars): Remove catching and rethrowing
3383 of any exception, use scoped_restore_selected_frame to restore the
3386 2018-05-24 Pedro Alves <palves@redhat.com>
3388 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3391 2018-05-23 Tom Tromey <tom@tromey.com>
3393 * complaints.c (struct complaints): Remove.
3394 (symfile_complaint_book): Remove.
3395 (series): New global.
3396 (complaint_internal): Update.
3397 (clear_complaints): Update.
3399 2018-05-23 Tom Tromey <tom@tromey.com>
3401 * complaints.c (counters): New global.
3402 (struct complain): Remove.
3403 (struct complaints) <root>: Remove.
3404 (complaint_sentinel): Remove.
3405 (symfile_complaint_book): Update.
3406 (find_complaint) Remove.
3407 (complaint_internal, clear_complaints): Update.
3409 2018-05-23 Tom Tromey <tom@tromey.com>
3411 * complaints.c (struct complain) <file, line>: Remove.
3412 (find_complaint): Remove file, line parameters.
3413 (complaint_internal): Update.
3415 2018-05-23 Tom Tromey <tom@tromey.com>
3417 * complaints.c (vcomplaint): Remove.
3418 (complaint_internal) Merge in contents of vcomplaint.
3420 2018-05-23 Tom Tromey <tom@tromey.com>
3422 * complaints.c (struct complaints) <explanation>: Remove.
3423 (symfile_explanations): Remove.
3424 (symfile_complaint_book): Update.
3425 (vcomplaint): Update.
3426 (struct explanation): Remove.
3428 2018-05-23 Tom Tromey <tom@tromey.com>
3430 * complaints.c (symfile_complaints): Remove.
3431 (complaint_internal): Remove "complaints" parameter.
3432 (clear_complaints, vcomplaint): Remove "c" parameter.
3433 (get_complaints): Remove.
3434 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3435 (dwarf2_debug_line_missing_file_complaint)
3436 (dwarf2_debug_line_missing_end_sequence_complaint)
3437 (dwarf2_complex_location_expr_complaint)
3438 (dwarf2_const_value_length_mismatch_complaint)
3439 (dwarf2_section_buffer_overflow_complaint)
3440 (dwarf2_macro_malformed_definition_complaint)
3441 (dwarf2_invalid_attrib_class_complaint)
3442 (create_addrmap_from_index, dw2_symtab_iter_next)
3443 (dw2_expand_marked_cus)
3444 (dw2_debug_names_iterator::find_vec_in_debug_names)
3445 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3446 (create_debug_type_hash_table, init_cutu_and_read_dies)
3447 (partial_die_parent_scope, add_partial_enumeration)
3448 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3449 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3450 (read_import_statement, read_file_scope, create_dwo_cu_reader)
3451 (create_cus_hash_table, create_dwp_hash_table)
3452 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3453 (dwarf2_rnglists_process, dwarf2_ranges_process)
3454 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3455 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3456 (handle_struct_member_die, process_structure_scope)
3457 (read_array_type, read_common_block, read_module_type)
3458 (read_tag_pointer_type, read_typedef, read_base_type)
3459 (read_subrange_type, load_partial_dies, partial_die_info::read)
3460 (partial_die_info::read, partial_die_info::read)
3461 (partial_die_info::read, read_checked_initial_length_and_offset)
3462 (dwarf2_string_attr, read_formatted_entries)
3463 (dwarf_decode_line_header)
3464 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3465 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3466 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3467 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3468 (get_signatured_type, get_DW_AT_signature_type)
3469 (decode_locdesc, file_file_name, consume_improper_spaces)
3470 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3471 (dwarf_decode_macro_bytes, dwarf_decode_macros)
3472 (dwarf2_symbol_mark_computed, set_die_type)
3473 (read_attribute_value): Update.
3474 * stap-probe.c (handle_stap_probe, get_stap_base_address):
3476 * dbxread.c (unknown_symtype_complaint)
3477 (lbrac_mismatch_complaint, repeated_header_complaint)
3478 (set_namestring, function_outside_compilation_unit_complaint)
3479 (read_dbx_symtab, process_one_symbol): Update.
3480 * gdbtypes.c (stub_noname_complaint): Update.
3481 * windows-nat.c (handle_unload_dll): Update.
3482 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3483 (decode_base_type): Update.
3484 * xcoffread.c (bf_notfound_complaint, ef_complaint)
3485 (eb_complaint, record_include_begin, record_include_end)
3486 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3487 (process_xcoff_symbol, read_symbol)
3488 (function_outside_compilation_unit_complaint)
3489 (scan_xcoff_symtab): Update.
3490 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3491 * buildsym.c (finish_block_internal, make_blockvector)
3492 (end_symtab_get_static_block, augment_type_symtab): Update.
3493 * dtrace-probe.c (dtrace_process_dof)
3494 (dtrace_static_probe_ops::get_probes): Update.
3495 * complaints.h (struct complaint): Don't declare.
3496 (symfile_complaints): Remove.
3497 (complaint_internal): Remove "complaints" parameter.
3498 (complaint): Likewise.
3499 (clear_complaints): Likewise.
3500 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3501 (reread_symbols): Update.
3502 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3503 (dwarf2_frame_cache, decode_frame_entry): Update.
3504 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3505 * objc-lang.c (lookup_objc_class, lookup_child_selector)
3506 (info_selectors_command): Update.
3507 * macrotab.c (macro_include, check_for_redefinition)
3508 (macro_undef): Update.
3509 * objfiles.c (filter_overlapping_sections): Update.
3510 * stabsread.c (invalid_cpp_abbrev_complaint)
3511 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3512 (define_symbol, error_type, read_type, rs6000_builtin_type)
3513 (stabs_method_name_from_physname, read_member_functions)
3514 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3515 (attach_fields_to_type, complain_about_struct_wipeout)
3516 (read_range_type, read_args, common_block_start)
3517 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
3519 * mdebugread.c (index_complaint, unknown_ext_complaint)
3520 (basic_type_complaint, bad_tag_guess_complaint)
3521 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
3522 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
3523 (parse_procedure, parse_lines)
3524 (function_outside_compilation_unit_complaint)
3525 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
3526 (bad_tag_guess_complaint, reg_value_complaint): Update.
3527 * cp-support.c (demangled_name_complaint): Update.
3528 * macroscope.c (sal_macro_scope): Update.
3529 * dwarf-index-write.c (class debug_names): Update.
3531 2018-05-23 Tom Tromey <tom@tromey.com>
3533 * complaints.c (clear_complaints): Remove "noisy" parameter.
3534 * complaints.h (clear_complaints): Update.
3535 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3536 (reread_symbols): Update.
3538 2018-05-23 Tom Tromey <tom@tromey.com>
3540 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
3542 (vcomplaint, clear_complaints): Update.
3543 (symfile_explanations): Remove some messages.
3545 2018-05-23 Tom Tromey <tom@tromey.com>
3547 * complaints.c (internal_complaint): Remove.
3548 * complaints.h (internal_complaint): Remove.
3550 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3552 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
3554 2018-05-22 Pedro Alves <palves@redhat.com>
3556 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
3557 (remote_fileio_badfd, remote_fileio_return_errno)
3558 (remote_fileio_return_success, remote_fileio_func_open)
3559 (remote_fileio_func_open, remote_fileio_func_close)
3560 (remote_fileio_func_read, remote_fileio_func_write)
3561 (remote_fileio_func_lseek, remote_fileio_func_rename)
3562 (remote_fileio_func_unlink, remote_fileio_func_stat)
3563 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
3564 (remote_fileio_func_isatty, remote_fileio_func_system): Add
3565 remote_target parameter.
3566 (remote_fio_func_map) <func>: Add remote_target parameter.
3567 (do_remote_fileio_request, remote_fileio_request):
3568 * remote-fileio.h (remote_fileio_request):
3569 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
3570 remote_target parameter.
3571 (remote_notif_process, handle_notification): Adjust to pass down
3573 (remote_notif_state_allocate): Add remote_target parameter. Save
3575 * remote-notif.h (struct remote_target): Forward declare.
3576 (struct notif_client) <parse, ack, can_get_pending_events>: Add
3577 remote_target parameter.
3578 (struct remote_notif_state) <remote>: New field.
3579 (remote_notif_ack, remote_notif_parse): Add remote_target
3581 (remote_notif_state_allocate, remote_notif_state_allocate): Add
3582 remote_target parameter.
3583 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
3584 (threads_listing_context, rmt_thread_action, protocol_feature)
3585 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
3586 (packet_result, struct threads_listing_context, remote_state):
3587 Move definitions and declarations higher up.
3588 (remote_target) <~remote_target>: Declare.
3589 (remote_download_command_source, remote_file_put, remote_file_get)
3590 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
3591 (remote_hostio_pread_vFile, remote_hostio_send_command)
3592 (remote_hostio_set_filesystem, remote_hostio_open)
3593 (remote_hostio_close, remote_hostio_unlink, remote_state)
3594 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
3595 (get_memory_write_packet_size, get_memory_read_packet_size)
3596 (append_pending_thread_resumptions, remote_detach_1)
3597 (append_resumption, remote_resume_with_vcont)
3598 (add_current_inferior_and_thread, wait_ns, wait_as)
3599 (process_stop_reply, remote_notice_new_inferior)
3600 (process_initial_stop_replies, remote_add_thread)
3601 (btrace_sync_conf, remote_btrace_maybe_reopen)
3602 (remove_new_fork_children, kill_new_fork_children)
3603 (discard_pending_stop_replies, stop_reply_queue_length)
3604 (check_pending_events_prevent_wildcard_vcont)
3605 (discard_pending_stop_replies_in_queue, stop_reply)
3606 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
3607 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
3608 (remote_interrupt_as, remote_interrupt_ns)
3609 (remote_get_noisy_reply, remote_query_attached)
3610 (remote_add_inferior, remote_current_thread, get_current_thread)
3611 (set_thread, set_general_thread, set_continue_thread)
3612 (set_general_process, write_ptid)
3613 (remote_unpack_thread_info_response, remote_get_threadinfo)
3614 (parse_threadlist_response, remote_get_threadlist)
3615 (remote_threadlist_iterator, remote_get_threads_with_ql)
3616 (remote_get_threads_with_qxfer)
3617 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
3618 (get_offsets, remote_check_symbols, remote_supported_packet)
3619 (remote_query_supported, remote_packet_size)
3620 (remote_serial_quit_handler, remote_detach_pid)
3621 (remote_vcont_probe, remote_resume_with_hc)
3622 (send_interrupt_sequence, interrupt_query)
3623 (remote_notif_get_pending_events, fetch_register_using_p)
3624 (send_g_packet, process_g_packet, fetch_registers_using_g)
3625 (store_register_using_P, store_registers_using_G)
3626 (set_remote_traceframe, check_binary_download)
3627 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
3628 (remote_xfer_live_readonly_partial, remote_read_bytes)
3629 (remote_send_printf, remote_flash_write, readchar)
3630 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
3631 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
3632 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
3633 (extended_remote_disable_randomization, extended_remote_run)
3634 (send_environment_packet, extended_remote_environment_support)
3635 (extended_remote_set_inferior_cwd, remote_write_qxfer)
3636 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
3637 (packet_command): Now methods of ...
3638 (remote_target): ... this class.
3639 (m_remote_state) <remote_target>: New field.
3640 (struct remote_state) <stop_reply_queue,
3641 remote_async_inferior_event_token, wait_forever_enabled_p>: New
3643 (remote_state::remote_state): Allocate stop_reply_queue.
3644 (remote_state): Delete global.
3645 (get_remote_state_raw): Delete.
3646 (remote_target::get_remote_state): Allocate m_remote_state on
3648 (get_current_remote_target): New.
3649 (remote_ops, extended_remote_ops): Delete.
3650 (wait_forever_enabled_p, remote_async_inferior_event_token):
3651 Delete, moved to struct remote_state.
3652 (remote_target::close): Delete self. Destruction bits split to
3654 (remote_target::~remote_target): ... this.
3655 (show_memory_packet_size): Adjust to use
3656 get_current_remote_target.
3657 (struct protocol_feature) <func>: Add remote_target parameter.
3658 All callers adjusted.
3659 (curr_quit_handler_target): New.
3660 (remote_serial_quit_handler): Reimplement.
3661 (remote_target::open_1): Adjust to use get_current_remote_target.
3662 Heap-allocate remote_target/extended_remote_target instances.
3663 (vcont_builder::vcont_builder): Add remote_target parameter, and
3664 save it in m_remote. All callers adjusted.
3665 (vcont_builder::m_remote): New field.
3666 (vcont_builder::restart, vcont_builder::flush)
3667 (vcont_builder::push_action): Use it.
3668 (remote_target::commit_resume): Use it.
3669 (struct queue_iter_param) <remote>: New field.
3670 (remote_target::remove_new_fork_children): Fill in 'remote' field.
3671 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
3672 (check_pending_event_prevents_wildcard_vcont_callback)
3673 (remote_target::check_pending_events_prevent_wildcard_vcont)
3674 (remote_target::discard_pending_stop_replies)
3675 (remote_target::discard_pending_stop_replies_in_queue)
3676 (remote_target::remote_notif_remove_queued_reply): Fill in
3678 (remote_notif_get_pending_events): New.
3679 (remote_target::readchar, remote_target::remote_serial_write):
3680 Save/restore curr_quit_handler_target.
3682 (kill_new_fork_children): Fill in 'remote' field.
3683 (packet_command): Use get_current_remote_target, defer to
3684 remote_target method of same name.
3685 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
3686 parameter, and save it in m_remote. All callers adjusted.
3687 (scoped_remote_fd::release): Use m_remote.
3688 (scoped_remote_fd::m_remote): New field.
3689 (remote_file_put, remote_file_get, remote_file_delete): Use
3690 get_current_remote_target, defer to remote_target method of same
3692 (remote_btrace_reset): Add remote_state paremeter. Update all
3694 (remote_async_inferior_event_handler). Pass down 'data'.
3695 (remote_new_objfile): Use get_current_remote_target.
3696 (remote_target::vcont_r_supported): New.
3697 (set_range_stepping): Use get_current_remote_target and
3698 remote_target::vcont_r_supported.
3699 (_initialize_remote): Don't allocate 'remote_state' and
3700 'stop_reply_queue' globals.
3701 * remote.h (struct remote_target): Forward declare.
3702 (getpkt, putpkt, remote_notif_get_pending_events): Add
3703 'remote_target' parameter.
3705 2018-05-22 Pedro Alves <palves@redhat.com>
3707 * remote.c (vcont_builder): Now a class. Make all data members
3709 (vcont_builder) <vcont_builder, restart, flush, push_action>:
3711 (vcont_builder_restart): Rename to ...
3712 (vcont_builder::restart): ... this.
3713 (vcont_builder_flush): Rename to ...
3714 (vcont_builder::flush): ... this.
3715 (vcont_builder_push_action): Rename to ...
3716 (vcont_builder::push_action): ... this.
3717 (remote_target::commit_resume): Adjust.
3719 2018-05-22 Pedro Alves <palves@redhat.com>
3721 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
3722 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
3723 (get_fixed_memory_packet_size): New.
3724 (get_memory_packet_size): Use it.
3725 (set_memory_packet_size): Don't override the config size with
3726 DEFAULT_MAX_MEMORY_PACKET_SIZE.
3727 (show_memory_packet_size): Use get_fixed_memory_packet_size.
3728 Don't refer to get_memory_packet_size if not connected to a remote
3729 target. Show "(default)" if configured size is 0.
3731 2018-05-22 Pedro Alves <palves@redhat.com>
3733 * remote.c (remote_target::mourn_inferior): Move
3734 discard_pending_stop_replies call here from ...
3735 (_initialize_remote): ... here.
3737 2018-05-22 Pedro Alves <palves@redhat.com>
3739 * remote.c (compare_section_command): Remove set_general_process
3742 2018-05-22 Pedro Alves <palves@redhat.com>
3744 * remote.c (struct packet_reg, struct remote_arch_state):
3745 Move higher up in the file.
3746 (remote_state) <m_arch_states>: Store remote_arch_state values
3747 instead of remote_arch_state pointers.
3748 (remote_state::get_remote_arch_state): Adjust.
3750 2018-05-22 Pedro Alves <palves@redhat.com>
3752 * remote.c: Include <unordered_map>.
3753 (remote_state): Now a class.
3754 (remote_state) <get_remote_arch_state>: Declare method.
3755 <get_remote_arch_state>: New field.
3756 (remote_arch_state) <remote_arch_state>: Declare ctor.
3757 <regs>: Now a unique_ptr.
3758 (remote_gdbarch_data_handle): Delete.
3759 (get_remote_arch_state): Delete.
3760 (remote_state::get_remote_arch_state): New.
3761 (get_remote_state): Adjust to call remote_state's
3762 get_remote_arch_state method.
3763 (init_remote_state): Delete, bits factored out to ...
3764 (remote_arch_state::remote_arch_state): ... this new method.
3765 (get_remote_packet_size, get_memory_packet_size)
3766 (process_g_packet, remote_target::fetch_registers)
3767 (remote_target::prepare_to_store, store_registers_using_G)
3768 (remote_target::store_registers, remote_target::get_trace_status):
3769 Adjust to call remote_state's method.
3770 (_initialize_remote): Remove reference to
3771 remote_gdbarch_data_handle.
3773 2018-05-22 Pedro Alves <palves@redhat.com>
3775 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
3776 pread>: New method declarations.
3777 (remote_target::open_1): Adjust.
3778 (readahead_cache_invalidate): Rename to ...
3779 (readahead_cache::invalidate): ... this, and adjust to be a class
3781 (readahead_cache_invalidate_fd): Rename to ...
3782 (readahead_cache::invalidate_fd): ... this, and adjust to be a
3784 (remote_hostio_pwrite): Adjust.
3785 (remote_hostio_pread_from_cache): Rename to ...
3786 (readahead_cache::pread): ... this, and adjust to be a class
3788 (remote_hostio_close): Adjust.
3790 2018-05-22 Pedro Alves <palves@redhat.com>
3792 * remote.c (remote_hostio_close_cleanup): Delete.
3793 (class scoped_remote_fd): New.
3794 (remote_file_put, remote_file_get): Use it.
3796 2018-05-22 Pedro Alves <palves@redhat.com>
3798 (struct vCont_action_support): Use bool and initialize all fields.
3799 (struct readahead_cache): Initialize all fields.
3800 (remote_state): Use bool and initialize all fields.
3801 (remote_state::remote_state, remote_state::~remote_state): New.
3802 (new_remote_state): Delete.
3803 (_initialize_remote): Use new to allocate remote_state.
3805 2018-05-22 Pedro Alves <palves@redhat.com>
3809 * c-exp.y: Include "c-support.h".
3810 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
3811 of tolower. Use c_ident_is_alpha to scan names.
3812 * c-lang.c: Include "c-support.h".
3813 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
3814 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
3815 * c-support.h: New file, with bits factored out from ...
3816 * cp-name-parser.y: ... this file.
3817 Include "c-support.h".
3818 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
3819 c-support.h and renamed.
3820 (symbol_end, yylex): Adjust.
3822 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3824 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
3825 parameter type to CORE_ADDR.
3826 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
3827 parameter type in declaration to CORE_ADDR.
3828 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
3829 target_auxv_search to get AT_HWCAP and use the result to get the
3831 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
3832 to CORE_ADDR. Remove the cast of the return value to unsigned
3833 long. Fix error predicate of target_auxv_search.
3834 (ppc_linux_nat_target::read_description): Change the type of the
3835 hwcap variable to CORE_ADDR.
3837 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3839 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
3840 if the size of fpscr is larger than 32 bits.
3842 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3844 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
3845 (ppc32_linux_vsxregmap): New global.
3846 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
3847 regcache_supply_regset, and regcache_collect_regset.
3848 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
3849 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
3850 (fetch_vsx_register, store_vsx_register): Remove.
3851 (fetch_vsx_registers): Add regno parameter. Get regset using
3852 ppc_linux_vsxregset. Use regset to supply registers.
3853 (store_vsx_registers): Add regno parameter. Get regset using
3854 ppc_linux_vsxregset. Use regset to collect registers.
3855 (fetch_register): Call fetch_vsx_registers instead of
3857 (store_register): Call store_vsx_registers instead of
3859 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
3860 new regno parameter.
3861 (store_ppc_registers): Call store_vsx_registers with -1 for the
3862 new regno parameter.
3863 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
3864 (ppc_collect_vsxregset): Remove.
3866 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3868 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
3870 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
3871 for vector register offset fields.
3872 (ppc64_fbsd_reg_offsets): Likewise.
3873 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3874 to vector register offset fields.
3875 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3876 to vector register offset fields.
3877 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
3878 vector register offset fields.
3879 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
3880 initializers for vector register offset fields.
3881 (rs6000_aix64_reg_offsets): Likewise.
3882 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
3883 (ppc_supply_vrregset): Remove.
3884 (ppc_collect_vrregset): Remove.
3885 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
3886 (ppc_linux_vrregset) : New function.
3887 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
3888 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
3889 (ppc32_linux_vrregset): Remove.
3890 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
3891 and use result instead of ppc32_linux_vrregset.
3892 (ppc32_linux_reg_offsets): Remove initializers for vector register
3894 (ppc64_linux_reg_offsets): Likewise.
3895 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
3896 * ppc-linux-nat.c: Include regset.h.
3897 (gdb_vrregset_t): Adjust comment to account for little-endian
3899 (supply_vrregset, fill_vrregset): Remove.
3900 (fetch_altivec_register, store_altivec_register): Remove.
3901 (fetch_altivec_registers): Add regno parameter. Get regset using
3902 ppc_linux_vrregset. Use regset to supply registers.
3903 (store_altivec_registers): Add regno parameter. Get regset using
3904 ppc_linux_vrregset. Use regset to collect registers.
3905 (fetch_register): Call fetch_altivec_registers instead of
3906 fetch_altivec_register.
3907 (store_register): Call store_altivec_registers instead of
3908 store_altivec_register.
3909 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
3910 the new regno parameter.
3911 (store_ppc_registers): Call store_altivec_registers with -1 for
3912 the new regno parameter.
3914 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3916 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
3917 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
3918 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3919 (gdb_vrregset_t): Change array type size to
3920 PPC_LINUX_SIZEOF_VRREGSET.
3921 (gdb_vsxregset_t): Change array type size to
3922 PPC_LINUX_SIZEOF_VSXREGSET.
3923 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
3924 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
3925 PPC_LINUX_SIZEOF_VSXREGSET.
3927 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3929 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
3930 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
3932 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
3933 ppc_linux_target_wordsize with tid.
3934 (ppc_linux_nat_target::read_description): Call ppc_linux_target
3936 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
3937 (ppc64_64bit_inferior_p): Add static and inline specifiers.
3938 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
3939 tid parameter. Remove static specifier.
3940 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
3941 (ppc_linux_target_wordsize): New declaration.
3943 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3945 * arch/ppc-linux-common.c: New file.
3946 * arch/ppc-linux-common.h: New file.
3947 * arch/ppc-linux-tdesc.h: New file.
3948 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
3949 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
3950 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
3951 arch/ppc-linux-tdesc.h.
3952 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
3953 arch/ppc-linux-tdesc.h.
3954 (ppc_linux_nat_target::read_description): Remove target
3955 description matching code. Fill a ppc_linux_features struct and
3956 call ppc_linux_match_description with it. Move comment about ISA
3957 2.05 to ppc-linux-common.c.
3958 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
3959 arch/ppc-linux-tdesc.h.
3960 (ppc_linux_core_read_description): Remove target description
3961 matching code. Fill a ppc_linux_features struct and call
3962 ppc_linux_match_description with it.
3963 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3964 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3965 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3966 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3967 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3968 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3969 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3970 (tdesc_powerpc_e500l): Remove.
3972 2018-05-22 Joel Brobecker <brobecker@adacore.com>
3974 * ada-lang.c (catch_assert_command): Pass empty string instead
3975 of NULL for excep_string argument.
3977 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3979 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
3980 the width of the requested register exceeds the width of the
3983 2018-05-21 Tom Tromey <tom@tromey.com>
3985 * printcmd.c (output_command): Remove.
3986 (output_command_const): Rename to output_command.
3987 * valprint.h (output_command): Rename from output_command_const.
3988 * tracepoint.c (trace_dump_actions): Call output_command.
3990 2018-05-21 Tom Tromey <tom@tromey.com>
3992 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3993 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
3994 * ada-lang.h (create_ada_exception_catchpoint): Update.
3995 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
3997 (create_excep_cond_exprs, ~ada_catchpoint)
3998 (should_stop_exception, print_one_exception)
3999 (print_mention_exception, print_recreate_exception): Update.
4000 (ada_get_next_arg): Remove.
4001 (catch_ada_exception_command_split): Use std::string. Change type
4002 of "excep_string", "cond_string".
4003 (catch_ada_exception_command): Update.
4004 (create_ada_exception_catchpoint): Change type of excep_string.
4005 (ada_exception_sal): Remove excep_string parameter.
4006 (~ada_catchpoint): Remove.
4008 2018-05-21 Tom Tromey <tom@tromey.com>
4010 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4013 2018-05-21 Tom Tromey <tom@tromey.com>
4015 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4016 Return unique_xmalloc_ptr.
4017 (print_it_exception): Update.
4019 2018-05-21 Tom Tromey <tom@tromey.com>
4021 * tracepoint.c (trace_dump_actions): Use std::string.
4023 2018-05-21 Tom Tromey <tom@tromey.com>
4025 * symfile.c (reread_symbols): Use std::string for original_name.
4027 2018-05-21 Tom Tromey <tom@tromey.com>
4029 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4030 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4033 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4035 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4037 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4038 * objfiles.c (get_objfile_bfd_data): Allocate
4039 objfile_per_bfd_storage with obstack_new when allocating on
4042 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4044 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4046 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4047 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4048 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4049 (add_pending): Likewise.
4050 (parse_symbol): Likewise.
4051 (parse_partial_symbols): Likewise.
4052 (psymtab_to_symtab_1): Likewise.
4053 (new_psymtab): Likewise.
4054 (elfmdebug_build_psymtabs): Likewise.
4055 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4056 * objfiles.c (get_objfile_bfd_data): Likewise.
4057 (objfile_register_static_link): Likewise.
4058 * psymtab.c (allocate_psymtab): Likewise.
4059 * stabsread.c (read_member_functions): Likewise.
4060 * xcoffread.c (xcoff_end_psymtab): Likewise.
4062 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4064 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4065 compiler supports std::is_trivially_constructible.
4066 * common/poison.h: Include obstack.h.
4067 (IsMallocable): Define to is_trivially_constructible if the
4068 compiler supports it, define to true_type otherwise.
4072 (XOBNEWVEC): Redefine.
4073 * gdb_obstack.h (obstack_zalloc): New.
4074 (OBSTACK_ZALLOC): Redefine.
4075 (obstack_calloc): New.
4076 (OBSTACK_CALLOC): Redefine.
4078 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4079 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4081 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4082 obstack_calloc/obstack_zalloc.
4083 (gdbarch_obstack_zalloc): Remove.
4084 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4086 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4088 * stack.c (backtrace_command_1): Remove useless variable int i.
4090 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4092 * stack.c (print_frame_info): Fix comment.
4094 2018-05-18 Tom Tromey <tom@tromey.com>
4096 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4097 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4098 (~dwarf2_per_objfile): Update
4099 (dwarf2_get_dwz_file): Use new.
4100 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4103 2018-05-18 Tom Tromey <tom@tromey.com>
4105 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4107 * dwarf2read.c (struct dwp_file): Add constructor and
4109 (open_and_init_dwp_file): Return a unique_ptr.
4110 (dwarf2_per_objfile, create_dwp_hash_table)
4111 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4112 (lookup_dwo_unit_in_dwp): Update.
4113 (open_and_init_dwp_file, get_dwp_file): Update.
4115 2018-05-18 Tom Tromey <tom@tromey.com>
4117 * dwarf2read.c (dwarf2_per_objfile): Update.
4118 (struct mapped_index): Add initializers.
4119 (dwarf2_read_index): Use new.
4120 (dw2_symtab_iter_init): Update.
4121 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4124 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4126 * dwarf2read.c (mapped_index) <total_size>: Remove.
4128 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4130 * unittests/format_pieces-selftests.c (test_format_specifier):
4133 2018-05-18 Tom Tromey <tom@tromey.com>
4135 * c-typeprint.c (maybe_print_hole): New function.
4136 (c_print_type_struct_field_offset): Update.
4137 (c_type_print_base_struct_union): Call maybe_print_hole.
4139 2018-05-17 Keith Seitz <keiths@redhat.com>
4141 * breakpoint.c (build_bpstat_chain): New function, moved from
4143 (bpstat_stop_status): Add optional parameter, `stop_chain'.
4144 If no stop chain is passed, call build_bpstat_chain to build it.
4145 * breakpoint.h (build_bpstat_chain): Declare.
4146 (bpstat_stop_status): Move documentation here from breakpoint.c.
4147 * infrun.c (handle_signal_stop): Before eliding inlined frames,
4148 build the stop chain and pass it to skip_inline_frames.
4149 Pass this stop chain to bpstat_stop_status.
4150 * inline-frame.c: Include breakpoint.h.
4151 (stopped_by_user_bp_inline_frame): New function.
4152 (skip_inline_frames): Add parameter `stop_chain'.
4153 Move documention to inline-frame.h.
4154 If non-NULL, use stopped_by_user_bp_inline_frame to determine
4155 whether the frame should be elided.
4156 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4157 Add moved documentation and update for new parameter.
4159 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4162 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4163 unittests/format_pieces-selftests.c.
4164 * common/format.h (format_piece) <operator==>: New.
4165 (format_pieces) <operator[]>: Remove.
4166 * common/format.c (format_pieces::format_pieces): Handle \e.
4167 * unittests/format_pieces-selftests.c: New.
4169 2018-05-17 Tom Tromey <tom@tromey.com>
4172 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4173 (dw2_instantiate_symtab): Add skip_partial parameter.
4174 (dw2_find_last_source_symtab, dw2_map_expand_apply)
4175 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4176 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4177 (dw2_expand_symtabs_matching_one)
4178 (dw2_find_pc_sect_compunit_symtab)
4179 (dw2_debug_names_lookup_symbol)
4180 (dw2_debug_names_expand_symtabs_for_function): Update.
4181 (init_cutu_and_read_dies): Add skip_partial parameter.
4182 (process_psymtab_comp_unit, build_type_psymtabs_1)
4183 (process_skeletonless_type_unit, load_partial_comp_unit)
4184 (psymtab_to_symtab_1): Update.
4185 (load_full_comp_unit): Add skip_partial parameter.
4186 (process_imported_unit_die, dwarf2_read_addr_index)
4187 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4188 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4189 (read_signatured_type): Update.
4191 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4193 * value.c (release_value): Remove unused variable.
4194 (record_latest_value): Likewise.
4195 (access_value_history): Likewise.
4196 (preserve_values): Likewise.
4198 2018-05-17 Tom Tromey <tom@tromey.com>
4200 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4203 2018-05-16 Maciej W. Rozycki <macro@mips.com>
4206 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4207 Also handle registers whose width is not a multiple of
4209 (linux_nat_trad_target::store_register): Likewise.
4211 2018-05-16 Tom Tromey <tom@tromey.com>
4213 * gdbcore.h (core_bfd): Redefine.
4214 * corelow.c (core_target::close): Update.
4215 (core_target_open): Update.
4216 * progspace.h (struct program_space) <cbfd>: Now a
4219 2018-05-16 Tom Tromey <tom@tromey.com>
4222 * symfile-add-flags.h (enum symfile_add_flags)
4223 <SYMFILE_NOT_FILENAME>: New constant.
4224 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
4225 objfile name from BFD.
4226 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4227 * minidebug.c (find_separate_debug_file_in_section): Put
4228 ".gnu_debugdata" into BFD's file name.
4230 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
4232 * regcache.c (regcache_read_ftype, regcache_write_ftype):
4235 2018-05-15 Tamar Christina <tamar.christina@arm.com>
4238 * aarch64-tdep.c (aarch64_analyze_prologue,
4239 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4240 Indicate not interested in errors.
4242 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4244 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4245 Supply the MIPS_ZERO_REGNUM register.
4247 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4249 * mips-tdep.c (mask_address_var): Make variable static.
4251 2018-05-14 Tom Tromey <tom@tromey.com>
4253 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4255 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
4257 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4258 FXSAVE_ADDR for the mxcsr register.
4260 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
4262 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4264 2018-05-11 Pedro Alves <palves@redhat.com>
4266 * corelow.c (core_target) <core_target>: No longer inline.
4267 Initialize m_core_gdbarch, m_core_vec and build the section table
4269 <~core_target>: New.
4270 <core_gdbarch, get_core_register_section>: New methods.
4271 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4272 factored out from ...
4273 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4275 (sniff_core_bfd): Add gdbarch parameter.
4276 (core_close): Delete, merged into ...
4277 (core_target::close): ... here. Delete self.
4278 (core_close_cleanup): Delete.
4279 (core_target_open): Allocate a core_target on the heap. Use a
4280 unique_ptr instead of a cleanup. Bits moved into the core_target
4281 ctor. Adjust to use core_target methods instead of globals.
4282 (get_core_register_section): Rename to ...
4283 (core_target::get_core_register_section): ... this and adjust.
4284 (struct get_core_registers_cb_data): New.
4285 (get_core_registers_cb): Use it. Use bool.
4286 (core_target::fetch_registers, core_target::files_info)
4287 (core_target::xfer_partial, core_target::read_description)
4288 (core_target::pid_to, core_target::thread_name): Adjust to
4289 reference class fields instead of globals.
4290 * target.h (struct target_ops_deleter, target_ops_up): New.
4292 2018-05-11 Pedro Alves <palves@redhat.com>
4294 * corefile.c (core_file_command): Move to corelow.c.
4295 * corelow.c (the_core_target): Delete.
4296 (core_file_command): Moved from corefile.c. Check exec_bfd
4297 instead of the_core_target. Use target_detach instead of calling
4298 into the_core_target directly.
4299 (maybe_say_no_core_file_now): New.
4300 (core_target::detach): Use it.
4301 (_initialize_corelow): Remove references to the_core_target.
4302 * gdbcore.h (the_core_target): Delete.
4304 2018-05-11 Tom Tromey <tromey@redhat.com>
4305 Pedro Alves <palves@redhat.com>
4307 * corefile.c (core_bfd): Remove.
4308 * gdbcore.h (core_bfd): Now a macro.
4309 * progspace.h (struct program_space) <cbfd>: New field.
4311 2018-05-11 Tom Tromey <tom@tromey.com>
4313 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4316 2018-05-10 Tom Tromey <tom@tromey.com>
4318 * configure: Rebuild.
4319 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4321 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4324 * regformats/regdat.sh: Adjust script, following the addition
4325 of the new expedite_regs parameter to init_target_desc.
4327 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
4330 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4331 set_gdbarch_significant_addr_bit.
4332 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4333 set_gdbarch_significant_addr_bit.
4334 * utils.c (address_significant): Update to sign extend addr.
4336 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
4338 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4339 (xtensa_linux_init_abi): Limit tdep->num_regs by
4340 tdep->num_nopriv_regs.
4341 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4342 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4345 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
4347 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4349 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4351 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4352 (I387_MXCSR_INIT_VAL): New constant.
4353 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4354 buffer if it was supplied by the inferior.
4355 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4356 (i387_xsave_get_clear_bv): New function.
4357 (i387_supply_xsave): Only read x87 control registers from the
4358 xsave buffer if the feature is enabled, and the state will have
4359 been written, otherwise, provide a suitable default.
4360 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4361 including x87 control registers. Update control registers if they
4362 have changed from the default value, and mark features as enabled
4364 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4366 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4368 * spu-tdep.c (info_spu_event_command): Fix output formatting.
4370 2018-05-07 Tom Tromey <tom@tromey.com>
4372 * configure: Rebuild.
4373 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4375 2018-05-07 Tom Tromey <tom@tromey.com>
4378 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4379 bit. Use correct value for VDIV.
4381 2018-05-04 Tom Tromey <tom@tromey.com>
4383 * configure: Rebuild.
4384 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4386 2018-05-04 Tom Tromey <tom@tromey.com>
4388 * linux-record.c (record_linux_system_call) <case
4389 RECORD_SYS_RECVFROM>: Add "break".
4391 2018-05-04 Tom Tromey <tom@tromey.com>
4393 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4394 Add missing "break".
4395 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4396 Add missing "break".
4398 2018-05-04 Tom Tromey <tom@tromey.com>
4400 * rs6000-tdep.c (ppc_process_record_op4)
4401 (ppc_process_record_op63): Add fall-through comment.
4403 2018-05-04 Tom Tromey <tom@tromey.com>
4405 * i386-tdep.c (i386_process_record): Add fall-through comment.
4407 2018-05-04 Tom Tromey <tom@tromey.com>
4409 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4412 2018-05-04 Tom Tromey <tom@tromey.com>
4414 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4415 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4416 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4418 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4420 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4423 2018-05-04 Tom Tromey <tom@tromey.com>
4425 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4427 2018-05-04 Tom Tromey <tom@tromey.com>
4429 * s390-tdep.c (s390_process_record): Fix fall-through comments.
4430 * xcoffread.c (scan_xcoff_symtab): Move comment later.
4431 * symfile.c (section_is_mapped): Fix fall-through comment.
4432 * stabsread.c (define_symbol, read_member_functions): Fix
4433 fall-through comment.
4434 * s390-linux-tdep.c (s390_process_record): Fix fall-through
4436 * remote.c (remote_wait_as): Fix fall-through comment.
4437 * p-exp.y (yylex): Fix fall-through comment.
4438 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4440 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4441 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4442 * jv-exp.y (yylex): Fix fall-through comment.
4443 * go-exp.y (lex_one_token): Fix fall-through comment.
4444 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4445 fall-through comment.
4446 * f-exp.y (yylex): Fix fall-through comment.
4447 * dwarf2read.c (process_die): Fix fall-through comments.
4448 * dbxread.c (process_one_symbol): Fix fall-through comment.
4449 * d-exp.y (lex_one_token): Fix fall-through comment.
4450 * cp-name-parser.y (yylex): Fix fall-through comment.
4451 * coffread.c (coff_symtab_read): Fix fall-through comment.
4452 * c-exp.y (lex_one_token): Fix fall-through comment.
4453 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4455 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4458 2018-05-04 Tom Tromey <tom@tromey.com>
4461 * NEWS: Mention gdb.execute change.
4462 * gdbcmd.h (execute_control_command): Don't declare.
4463 * python/python.c (execute_gdb_command): Use read_command_lines_1,
4464 execute_control_commands, execute_control_commands_to_string.
4465 * cli/cli-script.h (execute_control_commands)
4466 (execute_control_commands_to_string): Declare.
4467 (execute_control_command): Add from_tty parameter.
4468 * cli/cli-script.c (execute_control_commands)
4469 (execute_control_commands_to_string): New functions.
4470 (execute_user_command): Use execute_control_commands.
4471 (execute_control_command_1): Add "from_tty" parameter. Update.
4472 (execute_control_command): Likewise.
4474 2018-05-04 Tom Tromey <tom@tromey.com>
4477 * NEWS: Mention that breakpoint commands are writable.
4478 * python/py-breakpoint.c (bppy_set_commands): New function.
4479 (breakpoint_object_getset) <"commands">: Use it.
4481 2018-05-04 Tom Tromey <tom@tromey.com>
4483 * tracepoint.c (actions_command): Update.
4484 * mi/mi-cmd-break.c (mi_command_line_array)
4485 (mi_command_line_array_cnt, mi_command_line_array_ptr)
4486 (mi_read_next_line): Remove.
4487 (mi_cmd_break_commands): Update.
4488 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4490 * cli/cli-script.c (get_command_line): Update.
4491 (process_next_line): Use function_view. Constify.
4492 (recurse_read_control_structure, read_command_lines)
4493 (read_command_lines_1): Change argument types to function_view.
4494 (do_define_command, document_command): Update.
4495 * breakpoint.h (check_tracepoint_command): Don't declare.
4496 * breakpoint.c (check_tracepoint_command): Remove.
4497 (commands_command_1, create_tracepoint_from_upload): Update.
4499 2018-05-04 Tom Tromey <tom@tromey.com>
4502 * cli/cli-script.h (enum command_control_type) <define_control>:
4504 * cli/cli-script.c (multi_line_command_p): Handle define_control.
4505 (build_command_line, execute_control_command_1)
4506 (process_next_line): Likewise.
4507 (do_define_command): New function, extracted from define_command.
4508 (define_command): Use it.
4510 2018-05-04 Tom Tromey <tom@tromey.com>
4512 * tracepoint.c (actions_command): Update.
4513 * cli/cli-script.h (read_command_lines): Update.
4514 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4515 (MAX_TMPBUF): Remove define.
4516 (define_command): Use string_printf.
4517 (document_command): Likewise.
4518 * breakpoint.c (commands_command_1): Update.
4520 2018-05-04 Tom Tromey <tom@tromey.com>
4522 * top.c (execute_command): Update.
4523 * cli/cli-script.h (print_command_lines): Now varargs.
4524 * cli/cli-script.c (print_command_lines): Now varargs.
4525 (execute_control_command_1) <case while_control, case if_control>:
4528 2018-05-04 Tom Tromey <tom@tromey.com>
4530 * tracepoint.c (all_tracepoint_actions): Rename from
4531 all_tracepoint_actions_and_cleanup. Change return type.
4532 (actions_command, encode_actions_1, encode_actions)
4533 (trace_dump_actions, tdump_command): Update.
4534 * remote.c (remote_download_command_source): Update.
4535 * python/python.c (gdbpy_eval_from_control_command)
4536 (python_command, python_interactive_command): Update.
4537 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
4538 * guile/guile.c (guile_command)
4539 (gdbscm_eval_from_control_command, guile_command): Update.
4540 * compile/compile.c (compile_code_command)
4541 (compile_print_command, compile_to_object): Update.
4542 * cli/cli-script.h (struct command_lines_deleter): New.
4543 (counted_command_line): New typedef.
4544 (struct command_line): Add constructor, destructor.
4545 <body_list>: Remove.
4546 <body_list_0, body_list_1>: New members.
4547 (command_line_up): Remove typedef.
4548 (read_command_lines, read_command_lines_1, get_command_line):
4550 (copy_command_lines): Don't declare.
4551 * cli/cli-script.c (build_command_line): Use "new".
4552 (get_command_line): Return counted_command_line.
4553 (print_command_lines, execute_user_command)
4554 (execute_control_command_1, while_command, if_command): Update.
4555 (realloc_body_list): Remove.
4556 (process_next_line, recurse_read_control_structure): Update.
4557 (read_command_lines, read_command_lines_1): Return counted_command_line.
4558 (free_command_lines): Use "delete".
4559 (copy_command_lines): Remove.
4560 (define_command, document_command, show_user_1): Update.
4561 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
4562 a counted_command_line.
4563 * breakpoint.h (counted_command_line): Remove typedef.
4564 (breakpoint_set_commands): Update.
4565 * breakpoint.c (check_no_tracepoint_commands)
4566 (validate_commands_for_breakpoint): Update.
4567 (breakpoint_set_commands): Change commands to be a
4568 counted_command_line.
4569 (commands_command_1, update_dprintf_command_list)
4570 (create_tracepoint_from_upload): Update.
4572 2018-05-04 Tom Tromey <tom@tromey.com>
4574 * cli/cli-decode.h (cmd_list_element): New constructor.
4575 (~cmd_list_element): New destructor.
4576 (struct cmd_list_element): Add initializers.
4577 * cli/cli-decode.c (do_add_cmd): Use "new".
4578 (delete_cmd): Use "delete".
4580 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4581 Pedro Alves <palves@redhat.com>
4583 PR breakpoints/19806 and support for PR external/20207.
4584 * NEWS: Mention Aarch64 watchpoint improvements.
4585 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
4586 watchpoints and PR external/20207 watchpoints.
4587 * nat/aarch64-linux-hw-point.c
4588 (kernel_supports_any_contiguous_range): New.
4589 (aarch64_watchpoint_offset): New.
4590 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
4591 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
4592 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
4593 (aarch64_align_watchpoint): New parameters aligned_offset_p and
4594 next_addr_orig_p. Support PR external/20207 watchpoints.
4595 (aarch64_downgrade_regs): New.
4596 (aarch64_dr_state_insert_one_point): New parameters offset and
4598 (aarch64_dr_state_remove_one_point): Likewise.
4599 (aarch64_handle_breakpoint): Update caller.
4600 (aarch64_handle_aligned_watchpoint): Likewise.
4601 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
4603 (aarch64_linux_set_debug_regs): Remove const from state. Call
4604 aarch64_downgrade_regs.
4605 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
4606 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
4607 (DR_CONTROL_MASK): ... this.
4608 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
4609 (unsigned int aarch64_watchpoint_offset): New prototype.
4610 (aarch64_linux_set_debug_regs): Remove const from state.
4611 * utils.c (align_up, align_down): Move to ...
4612 * common/common-utils.c (align_up, align_down): ... here.
4613 * utils.h (align_up, align_down): Move to ...
4614 * common/common-utils.h (align_up, align_down): ... here.
4616 2018-05-04 Joel Brobecker <brobecker@adacore.com>
4618 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
4619 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
4620 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
4621 Re-implement to match the ABI as summarized in GCC's
4622 gcc/config/sparc/sparc.c. All callers updated.
4623 (sparc32_store_arguments): Remove assertion.
4625 2018-05-04 Tom Tromey <tom@tromey.com>
4627 * printcmd.c: Don't include tui.h.
4628 (decode_format): Use skip_spaces.
4630 2018-05-04 Tom Tromey <tom@tromey.com>
4633 * printcmd.c (last_count): New global.
4634 (x_command): Use saved count when repeating.
4636 2018-05-04 Tom Tromey <tom@tromey.com>
4638 * nto-procfs.c (do_closedir_cleanup): Remove.
4639 (procfs_pidlist): Use gdb_dir_up.
4640 * procfs.c (do_closedir_cleanup): Remove.
4641 (proc_update_threads): Use gdb_dir_up.
4642 * common/filestuff.h (struct gdb_dir_deleter): New.
4643 (gdb_dir_up): New typedef.
4645 2018-05-04 Tom Tromey <tom@tromey.com>
4647 * ada-lang.c (print_mention_exception): Use std::string.
4649 2018-05-04 Tom Tromey <tom@tromey.com>
4651 * ada-lang.c (create_excep_cond_exprs): Update.
4652 (ada_exception_catchpoint_cond_string): Use std::string.
4654 2018-05-04 Tom Tromey <tom@tromey.com>
4656 * ada-lang.c (xget_renaming_scope): Return std::string.
4657 (old_renaming_is_invisible): Update.
4659 2018-05-04 Tom Tromey <tom@tromey.com>
4661 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
4662 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
4664 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
4666 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
4668 2018-05-04 Tom Tromey <tom@tromey.com>
4670 * remote.c (remote_query_supported_append): Change type.
4671 (remote_check_symbols): Update.
4673 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
4676 * configure.ac: Prepend libpython.
4677 * python/python-config.py: Likewise.
4678 * configure: Regenerate.
4680 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
4682 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
4684 2018-05-03 Pedro Alves <palves@redhat.com>
4687 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
4688 override. Write 'true' instead of '1'.
4689 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
4692 2018-05-02 Pedro Alves <palves@redhat.com>
4694 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
4695 add_inf_child_target.
4696 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
4697 add_inf_child_target.
4698 * aix-thread.c (aix_thread_target_info): New.
4699 (aix_thread_target) <shortname, longname, doc>: Delete.
4701 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
4702 add_inf_child_target.
4703 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
4704 add_inf_child_target.
4705 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
4706 add_inf_child_target.
4707 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
4708 add_inf_child_target.
4709 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
4710 add_inf_child_target.
4711 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
4712 add_inf_child_target.
4713 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
4714 add_inf_child_target.
4715 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
4716 add_inf_child_target.
4717 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
4718 add_inf_child_target.
4719 * bfd-target.c (target_bfd_target_info): New.
4720 (target_bfd) <shortname, longname, doc>: Delete.
4722 * bsd-kvm.c (bsd_kvm_target_info): New.
4723 (bsd_kvm_target) <shortname, longname, doc>: Delete.
4725 (bsd_kvm_target::open): Rename to ...
4726 (bsd_kvm_target_open): ... this. Adjust.
4727 * bsd-uthread.c (bsd_uthread_target_info): New.
4728 (bsd_uthread_target) <shortname, longname, doc>: Delete.
4730 * corefile.c (core_file_command): Adjust.
4731 * corelow.c (core_target_info): New.
4732 (core_target) <shortname, longname, doc>: Delete.
4734 (core_target::open): Rename to ...
4735 (core_target_open): ... this. Adjust.
4736 * ctf.c (ctf_target_info): New.
4737 (ctf_target) <shortname, longname, doc>: Delete.
4739 (ctf_target::open): Rename to ...
4740 (ctf_target_open): ... this.
4741 (_initialize_ctf): Adjust.
4742 * exec.c (exec_target_info): New.
4743 (exec_target) <shortname, longname, doc>: Delete.
4745 (exec_target::open): Rename to ...
4746 (exec_target_open): ... this.
4747 * gdbcore.h (core_target_open): Declare.
4748 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
4749 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
4750 add_inf_child_target.
4751 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
4752 add_inf_child_target.
4753 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
4754 add_inf_child_target.
4755 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
4756 add_inf_child_target.
4757 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
4758 add_inf_child_target.
4759 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
4760 add_inf_child_target.
4761 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
4762 add_inf_child_target.
4763 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
4764 add_inf_child_target.
4765 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
4766 add_inf_child_target.
4767 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
4768 add_inf_child_target.
4769 * inf-child.c (inf_child_target_info): New.
4770 (inf_child_target::info): New.
4771 (inf_child_open_target): Remove 'target' parameter. Use
4772 get_native_target instead.
4773 (inf_child_target::open): Delete.
4774 (add_inf_child_target): New.
4775 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
4778 (add_inf_child_target): Declare.
4779 (inf_child_open_target): Declare.
4780 * linux-thread-db.c (thread_db_target_info): New.
4781 (thread_db_target) <shortname, longname, doc>: Delete.
4783 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
4784 add_inf_child_target.
4785 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
4786 add_inf_child_target.
4787 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
4788 add_inf_child_target.
4789 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
4790 add_inf_child_target.
4791 * make-target-delegates (print_class): Adjust.
4792 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
4793 add_inf_child_target.
4794 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
4795 add_inf_child_target.
4796 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
4797 add_inf_child_target.
4798 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
4799 add_inf_child_target.
4800 * nto-procfs.c (nto_native_target_info): New.
4801 (nto_procfs_target_native) <shortname, longname, doc>:
4804 (nto_procfs_target_info): New.
4805 (nto_procfs_target_procfs) <shortname, longname, doc>:
4808 (init_procfs_targets): Adjust.
4809 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
4810 add_inf_child_target.
4811 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
4812 add_inf_child_target.
4813 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
4814 add_inf_child_target.
4815 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
4816 add_inf_child_target.
4817 * ravenscar-thread.c (ravenscar_target_info): New.
4818 (ravenscar_thread_target) <shortname, longname, doc>:
4821 * record-btrace.c (record_btrace_target_info):
4822 (record_btrace_target) <shortname, longname, doc>: Delete.
4824 (record_btrace_target::open): Rename to ...
4825 (record_btrace_target_open): ... this. Adjust.
4826 * record-full.c (record_longname, record_doc): New.
4827 (record_full_base_target) <shortname, longname, doc>: Delete.
4829 (record_full_target_info): New.
4830 (record_full_target): <shortname>: Delete.
4832 (record_full_core_open_1, record_full_open_1): Update comments.
4833 (record_full_base_target::open): Rename to ...
4834 (record_full_open): ... this.
4835 (cmd_record_full_restore): Update.
4836 (_initialize_record_full): Update.
4837 * remote-sim.c (remote_sim_target_info): New.
4838 (gdbsim_target) <shortname, longname, doc>: Delete.
4840 (gdbsim_target::open): Rename to ...
4841 (gdbsim_target_open): ... this.
4842 (_initialize_remote_sim): Adjust.
4843 * remote.c (remote_doc): New.
4844 (remote_target_info): New.
4845 (remote_target) <shortname, longname, doc>: Delete.
4847 (extended_remote_target_info): New.
4848 (extended_remote_target) <shortname, longname, doc>: Delete.
4850 (remote_target::open_1): Make static. Adjust.
4851 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
4852 * s390-linux-nat.c (_initialize_s390_nat): Use
4853 add_inf_child_target.
4854 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
4855 add_inf_child_target.
4856 * sol-thread.c (thread_db_target_info): New.
4857 (sol_thread_target) <shortname, longname, doc>: Delete.
4859 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
4860 add_inf_child_target.
4861 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
4862 add_inf_child_target.
4863 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
4864 add_inf_child_target.
4865 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
4866 add_inf_child_target.
4867 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
4868 add_inf_child_target.
4869 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
4870 add_inf_child_target.
4871 * spu-linux-nat.c (_initialize_spu_nat): Use
4872 add_inf_child_target.
4873 * spu-multiarch.c (spu_multiarch_target_info): New.
4874 (spu_multiarch_target) <shortname, longname, doc>: Delete.
4876 * target-delegates.c: Regenerate.
4877 * target.c: Include <unordered_map>.
4878 (target_ops_p): Delete.
4879 (DEF_VEC_P(target_ops_p)): Delete.
4880 (target_factories): New.
4881 (test_target_info): New.
4882 (test_target_ops::info): New.
4883 (open_target): Adjust to use target_factories.
4884 (add_target_with_completer): Rename to ...
4885 (add_target): ... this. Change prototype. Register target_info
4886 and open callback in target_factories. Register target_info in
4887 command context instead of target_ops.
4888 (add_target): Delete old implementation.
4889 (add_deprecated_target_alias): Change prototype. Adjust.
4890 (the_native_target): New.
4891 (set_native_target, get_native_target): New.
4892 (find_default_run_target): Use the_native_target.
4893 (find_attach_target, find_run_target): Simplify.
4894 (target_ops::open): Delete.
4895 (dummy_target_info): New.
4896 (dummy_target::shortname, dummy_target::longname)
4897 (dummy_target::doc): Delete.
4898 (dummy_target::info): New.
4899 (debug_target::shortname, debug_target::longname)
4900 (debug_target::doc): Delete.
4901 (debug_target::info): New.
4902 * target.h (struct target_info): New.
4903 (target_ops::~target_ops): Add comment.
4904 (target_ops::info): New.
4905 (target_ops::shortname, target_ops::longname, target_ops::doc): No
4906 longer virtual. Implement in terms of target_info.
4907 (set_native_target, get_native_target): Declare.
4908 (target_open_ftype): New.
4909 (add_target, add_target_with_completer)
4910 (add_deprecated_target_alias): Change prototype.
4911 (test_target) <shortname, longname, doc>: Delete.
4913 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
4914 add_inf_child_target.
4915 * tracefile-tfile.c (tfile_target_info): New.
4916 (tfile_target) <shortname, longname, doc>: Delete.
4918 (tfile_target::open): Rename to ...
4919 (tfile_target_open): ... this.
4920 (_initialize_tracefile_tfile): Adjust.
4921 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
4922 add_inf_child_target.
4923 * windows-nat.c (_initialize_windows_nat): Use
4924 add_inf_child_target.
4925 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
4926 add_inf_child_target.
4928 2018-05-02 Pedro Alves <palves@redhat.com>
4930 * linux-nat.h (linux_nat_target) <low_new_thread,
4931 low_delete_thread, low_new_fork, low_forget_process,
4932 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
4933 New virtual methods.
4934 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4935 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
4936 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
4937 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4938 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
4940 * linux-fork.c (delete_fork): Adjust to call low method.
4941 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
4942 (linux_nat_new_fork, linux_nat_forget_process_hook)
4943 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
4944 (linux_nat_status_is_event):
4945 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
4946 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
4948 (sigtrap_is_event): Rename to ...
4949 (linux_nat_target::low_status_is_event): ... this.
4950 (linux_nat_set_status_is_event): Delete.
4951 (save_stop_reason, linux_nat_wait_1)
4952 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
4954 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4955 (linux_nat_set_new_fork, linux_nat_set_forget_process)
4956 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4957 (linux_nat_set_prepare_to_resume): Delete.
4958 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
4959 low virtual methods.
4960 * amd64-linux-nat.c: Likewise.
4961 * arm-linux-nat.c: Likewise.
4962 * i386-linux-nat.c: Likewise.
4963 * ia64-linux-nat.c: Likewise.
4964 * mips-linux-nat.c: Likewise.
4965 * ppc-linux-nat.c: Likewise.
4966 * s390-linux-nat.c: Likewise.
4967 * sparc64-linux-nat.c: Likewise.
4968 * x86-linux-nat.c: Likewise.
4969 * x86-linux-nat.h: Include "nat/x86-linux.h".
4970 (x86_linux_nat_target) <low_new_fork, low_forget_process,
4971 low_prepare_to_resume, low_new_thread, low_delete_thread>:
4974 2018-05-02 Pedro Alves <palves@redhat.com>
4976 * target.h (target_ops)
4977 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4978 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
4979 stopped_by_watchpoint, have_continuable_watchpoint,
4980 stopped_data_address, watchpoint_addr_within_range,
4981 can_accel_watchpoint_condition, can_run, thread_alive,
4982 has_all_memory, has_memory, has_stack, has_registers,
4983 has_execution, can_async_p, is_async_p, supports_non_stop,
4984 always_non_stop_p, can_execute_reverse, supports_multi_process,
4985 supports_enable_disable_tracepoint,
4986 supports_disable_randomization, supports_string_tracing,
4987 supports_evaluation_of_breakpoint_conditions,
4988 can_run_breakpoint_commands, filesystem_is_local,
4989 can_download_tracepoint, get_trace_state_variable_value,
4990 set_trace_notes, get_tib_address, use_agent, can_use_agent,
4991 record_is_replaying, record_will_replay,
4992 augmented_libraries_svr4_read>: Adjust to return bool.
4993 * aarch64-linux-nat.c: All implementations adjusted.
4994 * aix-thread.c: All implementations adjusted.
4995 * arm-linux-nat.c: All implementations adjusted.
4996 * breakpoint.c: All implementations adjusted.
4997 * bsd-kvm.c: All implementations adjusted.
4998 * bsd-uthread.c: All implementations adjusted.
4999 * corelow.c: All implementations adjusted.
5000 * ctf.c: All implementations adjusted.
5001 * darwin-nat.c: All implementations adjusted.
5002 * darwin-nat.h: All implementations adjusted.
5003 * exec.c: All implementations adjusted.
5004 * fbsd-nat.c: All implementations adjusted.
5005 * fbsd-nat.h: All implementations adjusted.
5006 * gnu-nat.c: All implementations adjusted.
5007 * gnu-nat.h: All implementations adjusted.
5008 * go32-nat.c: All implementations adjusted.
5009 * ia64-linux-nat.c: All implementations adjusted.
5010 * inf-child.c: All implementations adjusted.
5011 * inf-child.h: All implementations adjusted.
5012 * inf-ptrace.c: All implementations adjusted.
5013 * inf-ptrace.h: All implementations adjusted.
5014 * linux-nat.c: All implementations adjusted.
5015 * linux-nat.h: All implementations adjusted.
5016 * mips-linux-nat.c: All implementations adjusted.
5017 * nto-procfs.c: All implementations adjusted.
5018 * ppc-linux-nat.c: All implementations adjusted.
5019 * procfs.c: All implementations adjusted.
5020 * ravenscar-thread.c: All implementations adjusted.
5021 * record-btrace.c: All implementations adjusted.
5022 * record-full.c: All implementations adjusted.
5023 * remote-sim.c: All implementations adjusted.
5024 * remote.c: All implementations adjusted.
5025 * s390-linux-nat.c: All implementations adjusted.
5026 * sol-thread.c: All implementations adjusted.
5027 * spu-multiarch.c: All implementations adjusted.
5028 * target-delegates.c: All implementations adjusted.
5029 * target.c: All implementations adjusted.
5030 * target.h: All implementations adjusted.
5031 * tracefile-tfile.c: All implementations adjusted.
5032 * tracefile.c: All implementations adjusted.
5033 * tracefile.h: All implementations adjusted.
5034 * windows-nat.c: All implementations adjusted.
5035 * x86-linux-nat.h: All implementations adjusted.
5036 * x86-nat.h: All implementations adjusted.
5038 2018-05-02 Pedro Alves <palves@redhat.com>
5040 * make-target-delegates (scan_target_h): Don't trim lines here.
5041 Replace sequences of tabs and/or whitespace with a single
5043 (top level, parsing methods): Trim each line before processing it
5046 2018-05-02 Pedro Alves <palves@redhat.com>
5047 John Baldwin <jhb@freebsd.org>
5049 * target.h (enum strata) <debug_stratum>: New.
5050 (struct target_ops) <all delegation methods>: Replace by C++
5051 virtual methods, and drop "to_" prefix. All references updated
5053 <to_shortname, to_longname, to_doc, to_data,
5054 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5055 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5056 virtual methods. All references updated throughout.
5057 <can_attach, supports_terminal_ours, can_create_inferior,
5058 get_thread_control_capabilities, attach_no_wait>: New
5060 <insert_breakpoint, remove_breakpoint>: Now
5061 TARGET_DEFAULT_NORETURN methods.
5062 <info_proc>: Now returns bool.
5064 (OPS_MAGIC): Delete.
5065 (current_target): Delete. All references replaced by references
5067 (target_stack): ... this. New.
5068 (target_shortname, target_longname): Adjust.
5069 (target_can_run): Now a function declaration.
5070 (default_child_has_all_memory, default_child_has_memory)
5071 (default_child_has_stack, default_child_has_registers)
5072 (default_child_has_execution): Remove target_ops parameter.
5073 (complete_target_initialization): Delete.
5074 (memory_breakpoint_target): New template class.
5075 (test_target_ops): Refactor as a C++ class with virtual methods.
5076 * make-target-delegates (NAME_PART): Tighten.
5077 (POINTER_PART, CP_SYMBOL): New.
5078 (SIMPLE_RETURN_PART): Reimplement.
5079 (VEC_RETURN_PART): Expect less.
5080 (RETURN_PART, VIRTUAL_PART): New.
5081 (METHOD): Adjust to C++ virtual methods.
5082 (scan_target_h): Remove reference to C99.
5083 (dname): Output "target_ops::" prefix.
5084 (write_function_header): Adjust to output a C++ class method.
5085 (write_declaration): New.
5086 (write_delegator): Adjust to output a C++ class method.
5087 (tdname): Output "dummy_target::" prefix.
5088 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5090 (tdefault_names, debug_names): Delete.
5091 (return_types, tdefaults, styles, argtypes_array): New.
5092 (top level): All methods are delegators.
5094 (top level): Print dummy_target and debug_target classes.
5095 * target-delegates.c: Regenerate.
5096 * target-debug.h (target_debug_print_enum_info_proc_what)
5097 (target_debug_print_thread_control_capabilities)
5098 (target_debug_print_thread_info_p): New.
5099 * target.c (dummy_target): Delete.
5100 (the_dummy_target, the_debug_target): New.
5101 (target_stack): Now extern.
5102 (set_targetdebug): Push/unpush debug target.
5103 (default_child_has_all_memory, default_child_has_memory)
5104 (default_child_has_stack, default_child_has_registers)
5105 (default_child_has_execution): Remove target_ops parameter.
5106 (complete_target_initialization): Delete.
5107 (add_target_with_completer): No longer call
5108 complete_target_initialization.
5109 (target_supports_terminal_ours): Use regular delegation.
5110 (update_current_target): Delete.
5111 (push_target): No longer check magic number. Don't call
5112 update_current_target.
5113 (unpush_target): Don't call update_current_target.
5114 (target_is_pushed): No longer check magic number.
5115 (target_require_runnable): Skip for all stratums over
5117 (target_ops::info_proc): New.
5118 (target_info_proc): Use find_target_at and
5119 find_default_run_target.
5120 (target_supports_disable_randomization): Use regular delegation.
5121 (target_get_osdata): Use find_target_at.
5122 (target_ops::open, target_ops::close, target_ops::can_attach)
5123 (target_ops::attach, target_ops::can_create_inferior)
5124 (target_ops::create_inferior, target_ops::can_run)
5125 (target_can_run): New.
5126 (default_fileio_target): Use regular delegation.
5127 (target_ops::fileio_open, target_ops::fileio_pwrite)
5128 (target_ops::fileio_pread, target_ops::fileio_fstat)
5129 (target_ops::fileio_close, target_ops::fileio_unlink)
5130 (target_ops::fileio_readlink): New.
5131 (target_fileio_open_1, target_fileio_unlink)
5132 (target_fileio_readlink): Always call the target method. Handle
5134 (return_zero, return_zero_has_execution): Delete.
5135 (init_dummy_target): Delete.
5136 (dummy_target::dummy_target, dummy_target::shortname)
5137 (dummy_target::longname, dummy_target::doc)
5138 (debug_target::debug_target, debug_target::shortname)
5139 (debug_target::longname, debug_target::doc): New.
5140 (target_supports_delete_record): Use regular delegation.
5141 (setup_target_debug): Delete.
5142 (maintenance_print_target_stack): Skip debug_stratum.
5143 (initialize_targets): Instantiate the_dummy_target and
5145 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
5147 (target_auxv_search, fprint_target_auxv): Adjust.
5148 (info_auxv_command): Adjust to use target_stack.
5149 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5150 * exceptions.c (print_flush): Handle a NULL target_stack.
5151 * regcache.c (target_ops_no_register): Refactor as class with
5154 * exec.c (exec_target): New class.
5155 (exec_ops): Now an exec_target.
5156 (exec_open, exec_close_1, exec_get_section_table)
5157 (exec_xfer_partial, exec_files_info, exec_has_memory)
5158 (exec_make_note_section): Refactor as exec_target methods.
5159 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5161 (exec_target::find_memory_regions): New.
5162 (_initialize_exec): Don't call init_exec_ops.
5163 * gdbcore.h (exec_file_clear): Delete.
5165 * corefile.c (core_target): Delete.
5166 (core_file_command): Adjust.
5167 * corelow.c (core_target): New class.
5168 (the_core_target): New.
5169 (core_close): Remove target_ops parameter.
5170 (core_close_cleanup): Adjust.
5171 (core_target::close): New.
5172 (core_open, core_detach, get_core_registers, core_files_info)
5173 (core_xfer_partial, core_thread_alive, core_read_description)
5174 (core_pid_to_str, core_thread_name, core_has_memory)
5175 (core_has_stack, core_has_registers, core_info_proc): Rework as
5176 core_target methods.
5177 (ignore, core_remove_breakpoint, init_core_ops): Delete.
5178 (_initialize_corelow): Initialize the_core_target.
5179 * gdbcore.h (core_target): Delete.
5180 (the_core_target): New.
5182 * ctf.c: (ctf_target): New class.
5183 (ctf_ops): Now a ctf_target.
5184 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5185 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5186 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5188 (init_ctf_ops): Delete.
5189 (_initialize_ctf): Don't call it.
5190 * tracefile-tfile.c (tfile_target): New class.
5191 (tfile_ops): Now a tfile_target.
5192 (tfile_open, tfile_close, tfile_files_info)
5193 (tfile_get_tracepoint_status, tfile_trace_find)
5194 (tfile_fetch_registers, tfile_xfer_partial)
5195 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5196 Refactor as tfile_target methods.
5197 (tfile_xfer_partial_features): Remove target_ops parameter.
5198 (init_tfile_ops): Delete.
5199 (_initialize_tracefile_tfile): Don't call it.
5200 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5201 (tracefile_has_stack, tracefile_has_registers)
5202 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5203 tracefile_target methods.
5204 (init_tracefile_ops): Delete.
5205 (tracefile_target::tracefile_target): New.
5206 * tracefile.h: Include "target.h".
5207 (tracefile_target): New class.
5208 (init_tracefile_ops): Delete.
5210 * spu-multiarch.c (spu_multiarch_target): New class.
5211 (spu_ops): Now a spu_multiarch_target.
5212 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5213 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5214 (spu_search_memory, spu_mourn_inferior): Refactor as
5215 spu_multiarch_target methods.
5216 (init_spu_ops): Delete.
5217 (_initialize_spu_multiarch): Remove references to init_spu_ops,
5218 complete_target_initialization.
5220 * ravenscar-thread.c (ravenscar_thread_target): New class.
5221 (ravenscar_ops): Now a ravenscar_thread_target.
5222 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5223 (ravenscar_thread_alive, ravenscar_pid_to_str)
5224 (ravenscar_fetch_registers, ravenscar_store_registers)
5225 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5226 (ravenscar_stopped_by_hw_breakpoint)
5227 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5228 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5229 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5231 (init_ravenscar_thread_ops): Delete.
5232 (_initialize_ravenscar): Remove references to
5233 init_ravenscar_thread_ops and complete_target_initialization.
5235 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5236 (bsd_uthread_target): New class.
5237 (bsd_uthread_ops): Now a bsd_uthread_target.
5238 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5239 (bsd_uthread_close, bsd_uthread_mourn_inferior)
5240 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5241 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5242 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5243 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5244 (bsd_uthread_target): Delete function.
5245 (_initialize_bsd_uthread): Remove reference to
5246 complete_target_initialization.
5248 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
5249 (target_bfd): ... this new class.
5250 (target_bfd_xfer_partial, target_bfd_get_section_table)
5251 (target_bfd_close): Refactor as target_bfd methods.
5252 (target_bfd::~target_bfd): New.
5253 (target_bfd_reopen): Adjust.
5254 (target_bfd::close): New.
5256 * record-btrace.c (record_btrace_target): New class.
5257 (record_btrace_ops): Now a record_btrace_target.
5258 (record_btrace_open, record_btrace_stop_recording)
5259 (record_btrace_disconnect, record_btrace_close)
5260 (record_btrace_async, record_btrace_info)
5261 (record_btrace_insn_history, record_btrace_insn_history_range)
5262 (record_btrace_insn_history_from, record_btrace_call_history)
5263 (record_btrace_call_history_range)
5264 (record_btrace_call_history_from, record_btrace_record_method)
5265 (record_btrace_is_replaying, record_btrace_will_replay)
5266 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5267 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5268 (record_btrace_store_registers, record_btrace_prepare_to_store)
5269 (record_btrace_to_get_unwinder)
5270 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5271 (record_btrace_commit_resume, record_btrace_wait)
5272 (record_btrace_stop, record_btrace_can_execute_reverse)
5273 (record_btrace_stopped_by_sw_breakpoint)
5274 (record_btrace_supports_stopped_by_sw_breakpoint)
5275 (record_btrace_stopped_by_hw_breakpoint)
5276 (record_btrace_supports_stopped_by_hw_breakpoint)
5277 (record_btrace_update_thread_list, record_btrace_thread_alive)
5278 (record_btrace_goto_begin, record_btrace_goto_end)
5279 (record_btrace_goto, record_btrace_stop_replaying_all)
5280 (record_btrace_execution_direction)
5281 (record_btrace_prepare_to_generate_core)
5282 (record_btrace_done_generating_core): Refactor as
5283 record_btrace_target methods.
5284 (init_record_btrace_ops): Delete.
5285 (_initialize_record_btrace): Remove reference to
5286 init_record_btrace_ops.
5287 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5288 the execution_direction global.
5289 (record_full_base_target, record_full_target)
5290 (record_full_core_target): New classes.
5291 (record_full_ops): Now a record_full_target.
5292 (record_full_core_ops): Now a record_full_core_target.
5293 (record_full_target::detach, record_full_target::disconnect)
5294 (record_full_core_target::disconnect)
5295 (record_full_target::mourn_inferior, record_full_target::kill):
5297 (record_full_open, record_full_close, record_full_async): Refactor
5298 as methods of the record_full_base_target class.
5299 (record_full_resume, record_full_commit_resume): Refactor
5300 as methods of the record_full_target class.
5301 (record_full_wait, record_full_stopped_by_watchpoint)
5302 (record_full_stopped_data_address)
5303 (record_full_stopped_by_sw_breakpoint)
5304 (record_full_supports_stopped_by_sw_breakpoint)
5305 (record_full_stopped_by_hw_breakpoint)
5306 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5307 methods of the record_full_base_target class.
5308 (record_full_store_registers, record_full_xfer_partial)
5309 (record_full_insert_breakpoint, record_full_remove_breakpoint):
5310 Refactor as methods of the record_full_target class.
5311 (record_full_can_execute_reverse, record_full_get_bookmark)
5312 (record_full_goto_bookmark, record_full_execution_direction)
5313 (record_full_record_method, record_full_info, record_full_delete)
5314 (record_full_is_replaying, record_full_will_replay)
5315 (record_full_goto_begin, record_full_goto_end, record_full_goto)
5316 (record_full_stop_replaying): Refactor as methods of the
5317 record_full_base_target class.
5318 (record_full_core_resume, record_full_core_kill)
5319 (record_full_core_fetch_registers)
5320 (record_full_core_prepare_to_store)
5321 (record_full_core_store_registers, record_full_core_xfer_partial)
5322 (record_full_core_insert_breakpoint)
5323 (record_full_core_remove_breakpoint)
5324 (record_full_core_has_execution): Refactor
5325 as methods of the record_full_core_target class.
5326 (record_full_base_target::supports_delete_record): New.
5327 (init_record_full_ops): Delete.
5328 (init_record_full_core_ops): Delete.
5329 (record_full_save): Refactor as method of the
5330 record_full_base_target class.
5331 (_initialize_record_full): Remove references to
5332 init_record_full_ops and init_record_full_core_ops.
5334 * remote.c (remote_target, extended_remote_target): New classes.
5335 (remote_ops): Now a remote_target.
5336 (extended_remote_ops): Now an extended_remote_target.
5337 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5338 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5339 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5340 (remote_pass_signals, remote_set_syscall_catchpoint)
5341 (remote_program_signals, )
5342 (remote_thread_always_alive): Remove target_ops parameter.
5343 (remote_thread_alive, remote_thread_name)
5344 (remote_update_thread_list, remote_threads_extra_info)
5345 (remote_static_tracepoint_marker_at)
5346 (remote_static_tracepoint_markers_by_strid)
5347 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5348 (remote_open): Refactor as methods of remote_target.
5349 (extended_remote_open, extended_remote_detach)
5350 (extended_remote_attach, extended_remote_post_attach):
5351 (extended_remote_supports_disable_randomization)
5352 (extended_remote_create_inferior): : Refactor as method of
5353 extended_remote_target.
5354 (remote_set_permissions, remote_open_1, remote_detach)
5355 (remote_follow_fork, remote_follow_exec, remote_disconnect)
5356 (remote_resume, remote_commit_resume, remote_stop)
5357 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5358 (remote_terminal_ours, remote_wait, remote_fetch_registers)
5359 (remote_prepare_to_store, remote_store_registers)
5360 (remote_flash_erase, remote_flash_done, remote_files_info)
5361 (remote_kill, remote_mourn, remote_insert_breakpoint)
5362 (remote_remove_breakpoint, remote_insert_watchpoint)
5363 (remote_watchpoint_addr_within_range)
5364 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5365 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5366 (remote_supports_stopped_by_sw_breakpoint)
5367 (remote_stopped_by_hw_breakpoint)
5368 (remote_supports_stopped_by_hw_breakpoint)
5369 (remote_stopped_by_watchpoint, remote_stopped_data_address)
5370 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5371 (remote_verify_memory): Refactor as methods of remote_target.
5372 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5374 (remote_xfer_partial, remote_get_memory_xfer_limit)
5375 (remote_search_memory, remote_rcmd, remote_memory_map)
5376 (remote_pid_to_str, remote_get_thread_local_address)
5377 (remote_get_tib_address, remote_read_description): Refactor as
5378 methods of remote_target.
5379 (remote_target::fileio_open, remote_target::fileio_pwrite)
5380 (remote_target::fileio_pread, remote_target::fileio_close): New.
5381 (remote_hostio_readlink, remote_hostio_fstat)
5382 (remote_filesystem_is_local, remote_can_execute_reverse)
5383 (remote_supports_non_stop, remote_supports_disable_randomization)
5384 (remote_supports_multi_process, remote_supports_cond_breakpoints)
5385 (remote_supports_enable_disable_tracepoint)
5386 (remote_supports_string_tracing)
5387 (remote_can_run_breakpoint_commands, remote_trace_init)
5388 (remote_download_tracepoint, remote_can_download_tracepoint)
5389 (remote_download_trace_state_variable, remote_enable_tracepoint)
5390 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5391 (remote_trace_start, remote_get_trace_status)
5392 (remote_get_tracepoint_status, remote_trace_stop)
5393 (remote_trace_find, remote_get_trace_state_variable_value)
5394 (remote_save_trace_data, remote_get_raw_trace_data)
5395 (remote_set_disconnected_tracing, remote_core_of_thread)
5396 (remote_set_circular_trace_buffer, remote_traceframe_info)
5397 (remote_get_min_fast_tracepoint_insn_len)
5398 (remote_set_trace_buffer_size, remote_set_trace_notes)
5399 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5400 (remote_disable_btrace, remote_teardown_btrace)
5401 (remote_read_btrace, remote_btrace_conf)
5402 (remote_augmented_libraries_svr4_read, remote_load)
5403 (remote_pid_to_exec_file, remote_can_do_single_step)
5404 (remote_execution_direction, remote_thread_handle_to_thread_info):
5405 Refactor as methods of remote_target.
5406 (init_remote_ops, init_extended_remote_ops): Delete.
5407 (remote_can_async_p, remote_is_async_p, remote_async)
5408 (remote_thread_events, remote_upload_tracepoints)
5409 (remote_upload_trace_state_variables): Refactor as methods of
5411 (_initialize_remote): Remove references to init_remote_ops and
5412 init_extended_remote_ops.
5414 * remote-sim.c (gdbsim_target): New class.
5415 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5416 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5417 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5418 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5419 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5420 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5421 Refactor as methods of gdbsim_target.
5422 (gdbsim_ops): Now a gdbsim_target.
5423 (init_gdbsim_ops): Delete.
5424 (gdbsim_cntrl_c): Adjust.
5425 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5427 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5428 (the_amd64_linux_nat_target): New.
5429 (amd64_linux_fetch_inferior_registers)
5430 (amd64_linux_store_inferior_registers): Refactor as methods of
5431 amd64_linux_nat_target.
5432 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
5433 * i386-linux-nat.c: Don't include "linux-nat.h".
5434 (i386_linux_nat_target): New class.
5435 (the_i386_linux_nat_target): New.
5436 (i386_linux_fetch_inferior_registers)
5437 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5438 as methods of i386_linux_nat_target.
5439 (_initialize_i386_linux_nat): Adjust. Set linux_target.
5440 * inf-child.c (inf_child_ops): Delete.
5441 (inf_child_fetch_inferior_registers)
5442 (inf_child_store_inferior_registers): Delete.
5443 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5444 methods of inf_child_target.
5445 (inf_child_target::supports_terminal_ours)
5446 (inf_child_target::terminal_init)
5447 (inf_child_target::terminal_inferior)
5448 (inf_child_target::terminal_ours_for_output)
5449 (inf_child_target::terminal_ours, inf_child_target::interrupt)
5450 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5452 (inf_child_open, inf_child_disconnect, inf_child_close)
5453 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5454 (inf_child_post_startup_inferior, inf_child_can_run)
5455 (inf_child_pid_to_exec_file): Refactor as methods of
5457 (inf_child_follow_fork): Delete.
5458 (inf_child_target::can_create_inferior)
5459 (inf_child_target::can_attach): New.
5460 (inf_child_target::has_all_memory, inf_child_target::has_memory)
5461 (inf_child_target::has_stack, inf_child_target::has_registers)
5462 (inf_child_target::has_execution): New.
5463 (inf_child_fileio_open, inf_child_fileio_pwrite)
5464 (inf_child_fileio_pread, inf_child_fileio_fstat)
5465 (inf_child_fileio_close, inf_child_fileio_unlink)
5466 (inf_child_fileio_readlink, inf_child_use_agent)
5467 (inf_child_can_use_agent): Refactor as methods of
5469 (return_zero, inf_child_target): Delete.
5470 (inf_child_target::inf_child_target): New.
5471 * inf-child.h: Include "target.h".
5472 (inf_child_target): Delete function prototype.
5473 (inf_child_target): New class.
5474 (inf_child_open_target, inf_child_mourn_inferior)
5475 (inf_child_maybe_unpush_target): Delete.
5476 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5477 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5478 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5479 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5480 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5481 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5482 (inf_ptrace_wait, inf_ptrace_xfer_partial)
5483 (inf_ptrace_thread_alive, inf_ptrace_files_info)
5484 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5485 methods of inf_ptrace_target.
5486 (inf_ptrace_target): Delete function.
5487 * inf-ptrace.h: Include "inf-child.h".
5488 (inf_ptrace_target): Delete function declaration.
5489 (inf_ptrace_target): New class.
5490 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5491 * linux-nat.c (linux_target): New.
5492 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5493 (linux_nat_target::~linux_nat_target): New.
5494 (linux_child_post_attach, linux_child_post_startup_inferior)
5495 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5496 (linux_child_remove_fork_catchpoint)
5497 (linux_child_insert_vfork_catchpoint)
5498 (linux_child_remove_vfork_catchpoint)
5499 (linux_child_insert_exec_catchpoint)
5500 (linux_child_remove_exec_catchpoint)
5501 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5502 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5503 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5504 (linux_nat_stopped_data_address)
5505 (linux_nat_stopped_by_sw_breakpoint)
5506 (linux_nat_supports_stopped_by_sw_breakpoint)
5507 (linux_nat_stopped_by_hw_breakpoint)
5508 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5509 (linux_nat_kill, linux_nat_mourn_inferior)
5510 (linux_nat_xfer_partial, linux_nat_thread_alive)
5511 (linux_nat_update_thread_list, linux_nat_pid_to_str)
5512 (linux_nat_thread_name, linux_child_pid_to_exec_file)
5513 (linux_child_static_tracepoint_markers_by_strid)
5514 (linux_nat_is_async_p, linux_nat_can_async_p)
5515 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5516 (linux_nat_supports_multi_process)
5517 (linux_nat_supports_disable_randomization, linux_nat_async)
5518 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
5519 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
5520 (linux_nat_fileio_open, linux_nat_fileio_readlink)
5521 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
5522 methods of linux_nat_target.
5523 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
5524 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
5526 (check_stopped_by_watchpoint): Adjust.
5527 (linux_xfer_partial): Delete.
5528 (linux_target_install_ops, linux_target, linux_nat_add_target):
5530 (linux_nat_target::linux_nat_target): New.
5531 * linux-nat.h: Include "inf-ptrace.h".
5532 (linux_nat_target): New.
5533 (linux_target, linux_target_install_ops, linux_nat_add_target):
5534 Delete function declarations.
5535 (linux_target): Declare global.
5536 * linux-thread-db.c (thread_db_target): New.
5537 (thread_db_target::thread_db_target): New.
5538 (thread_db_ops): Delete.
5539 (the_thread_db_target): New.
5540 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
5541 (thread_db_update_thread_list, thread_db_pid_to_str)
5542 (thread_db_extra_thread_info)
5543 (thread_db_thread_handle_to_thread_info)
5544 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
5545 (thread_db_resume): Refactor as methods of thread_db_target.
5546 (init_thread_db_ops): Delete.
5547 (_initialize_thread_db): Remove reference to init_thread_db_ops.
5548 * x86-linux-nat.c: Don't include "linux-nat.h".
5549 (super_post_startup_inferior): Delete.
5550 (x86_linux_nat_target::~x86_linux_nat_target): New.
5551 (x86_linux_child_post_startup_inferior)
5552 (x86_linux_read_description, x86_linux_enable_btrace)
5553 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
5554 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
5555 methods of x86_linux_nat_target.
5556 (x86_linux_create_target): Delete. Bits folded ...
5557 (x86_linux_add_target): ... here. Now takes a linux_nat_target
5559 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
5560 (x86_linux_nat_target): New class.
5561 (x86_linux_create_target): Delete.
5562 (x86_linux_add_target): Now takes a linux_nat_target pointer.
5563 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
5564 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
5565 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
5566 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
5567 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
5569 (x86_use_watchpoints): Delete.
5570 * x86-nat.h: Include "breakpoint.h" and "target.h".
5571 (x86_use_watchpoints): Delete.
5572 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
5573 (x86_stopped_by_watchpoint, x86_stopped_data_address)
5574 (x86_insert_watchpoint, x86_remove_watchpoint)
5575 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
5576 (x86_stopped_by_hw_breakpoint): New declarations.
5577 (x86_nat_target): New template class.
5579 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
5580 (the_ppc_linux_nat_target): New.
5581 (ppc_linux_fetch_inferior_registers)
5582 (ppc_linux_can_use_hw_breakpoint)
5583 (ppc_linux_region_ok_for_hw_watchpoint)
5584 (ppc_linux_ranged_break_num_registers)
5585 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
5586 (ppc_linux_insert_mask_watchpoint)
5587 (ppc_linux_remove_mask_watchpoint)
5588 (ppc_linux_can_accel_watchpoint_condition)
5589 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
5590 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
5591 (ppc_linux_watchpoint_addr_within_range)
5592 (ppc_linux_masked_watch_num_registers)
5593 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
5594 (ppc_linux_read_description): Refactor as methods of
5595 ppc_linux_nat_target.
5596 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
5598 * procfs.c (procfs_xfer_partial): Delete forward declaration.
5599 (procfs_target): New class.
5600 (the_procfs_target): New.
5601 (procfs_target): Delete function.
5602 (procfs_auxv_parse, procfs_attach, procfs_detach)
5603 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
5604 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
5605 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
5606 (procfs_create_inferior, procfs_update_thread_list)
5607 (procfs_thread_alive, procfs_pid_to_str)
5608 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
5609 (procfs_stopped_data_address, procfs_insert_watchpoint)
5610 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
5611 (proc_find_memory_regions, procfs_info_proc)
5612 (procfs_make_note_section): Refactor as methods of procfs_target.
5613 (_initialize_procfs): Adjust.
5614 * sol-thread.c (sol_thread_target): New class.
5615 (sol_thread_ops): Now a sol_thread_target.
5616 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
5617 (sol_thread_fetch_registers, sol_thread_store_registers)
5618 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
5619 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
5620 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
5621 (init_sol_thread_ops): Delete.
5622 (_initialize_sol_thread): Adjust. Remove references to
5623 init_sol_thread_ops and complete_target_initialization.
5625 * windows-nat.c (windows_nat_target): New class.
5626 (windows_fetch_inferior_registers)
5627 (windows_store_inferior_registers, windows_resume, windows_wait)
5628 (windows_attach, windows_detach, windows_pid_to_exec_file)
5629 (windows_files_info, windows_create_inferior)
5630 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
5631 (windows_close, windows_pid_to_str, windows_xfer_partial)
5632 (windows_get_tib_address, windows_get_ada_task_ptid)
5633 (windows_thread_name, windows_thread_alive): Refactor as
5634 windows_nat_target methods.
5635 (do_initial_windows_stuff): Adjust.
5636 (windows_target): Delete function.
5637 (_initialize_windows_nat): Adjust.
5639 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
5640 (darwin_mourn_inferior, darwin_kill_inferior)
5641 (darwin_create_inferior, darwin_attach, darwin_detach)
5642 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
5643 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
5644 (darwin_supports_multi_process): Refactor as darwin_nat_target
5646 (darwin_resume_to, darwin_files_info): Delete.
5647 (_initialize_darwin_inferior): Rename to ...
5648 (_initialize_darwin_nat): ... this. Adjust to C++ification.
5649 * darwin-nat.h: Include "inf-child.h".
5650 (darwin_nat_target): New class.
5651 (darwin_complete_target): Delete.
5652 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
5653 (darwin_target): New.
5654 (i386_darwin_fetch_inferior_registers)
5655 (i386_darwin_store_inferior_registers): Refactor as methods of
5657 (darwin_complete_target): Delete, with ...
5658 (_initialize_i386_darwin_nat): ... bits factored out here.
5660 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
5661 (the_alpha_linux_nat_target): New.
5662 (alpha_linux_register_u_offset): Refactor as
5663 alpha_linux_nat_target method.
5664 (_initialize_alpha_linux_nat): Adjust.
5665 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
5666 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5667 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
5668 methods of linux_nat_trad_target.
5669 (linux_trad_target): Delete.
5670 * linux-nat-trad.h (linux_trad_target): Delete function.
5671 (linux_nat_trad_target): New class.
5672 * mips-linux-nat.c (mips_linux_nat_target): New class.
5673 (super_fetch_registers, super_store_registers, super_close):
5675 (the_mips_linux_nat_target): New.
5676 (mips64_linux_regsets_fetch_registers)
5677 (mips64_linux_regsets_store_registers)
5678 (mips64_linux_fetch_registers, mips64_linux_store_registers)
5679 (mips_linux_register_u_offset, mips_linux_read_description)
5680 (mips_linux_can_use_hw_breakpoint)
5681 (mips_linux_stopped_by_watchpoint)
5682 (mips_linux_stopped_data_address)
5683 (mips_linux_region_ok_for_hw_watchpoint)
5684 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5685 (mips_linux_close): Refactor as methods of mips_linux_nat.
5686 (_initialize_mips_linux_nat): Adjust to C++ification.
5688 * aix-thread.c (aix_thread_target): New class.
5689 (aix_thread_ops): Now an aix_thread_target.
5690 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
5691 (aix_thread_fetch_registers, aix_thread_store_registers)
5692 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
5693 (aix_thread_thread_alive, aix_thread_pid_to_str)
5694 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
5695 Refactor as methods of aix_thread_target.
5696 (init_aix_thread_ops): Delete.
5697 (_initialize_aix_thread): Remove references to init_aix_thread_ops
5698 and complete_target_initialization.
5699 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
5700 (rs6000_nat_target): New class.
5701 (the_rs6000_nat_target): New.
5702 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
5703 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
5704 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
5705 (super_create_inferior): Delete.
5706 (_initialize_rs6000_nat): Adjust to C++ification.
5708 * arm-linux-nat.c (arm_linux_nat_target): New class.
5709 (the_arm_linux_nat_target): New.
5710 (arm_linux_fetch_inferior_registers)
5711 (arm_linux_store_inferior_registers, arm_linux_read_description)
5712 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
5713 (arm_linux_remove_hw_breakpoint)
5714 (arm_linux_region_ok_for_hw_watchpoint)
5715 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
5716 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
5717 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
5718 arm_linux_nat_target.
5719 (_initialize_arm_linux_nat): Adjust to C++ification.
5721 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
5722 (the_aarch64_linux_nat_target): New.
5723 (aarch64_linux_fetch_inferior_registers)
5724 (aarch64_linux_store_inferior_registers)
5725 (aarch64_linux_child_post_startup_inferior)
5726 (aarch64_linux_read_description)
5727 (aarch64_linux_can_use_hw_breakpoint)
5728 (aarch64_linux_insert_hw_breakpoint)
5729 (aarch64_linux_remove_hw_breakpoint)
5730 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
5731 (aarch64_linux_region_ok_for_hw_watchpoint)
5732 (aarch64_linux_stopped_data_address)
5733 (aarch64_linux_stopped_by_watchpoint)
5734 (aarch64_linux_watchpoint_addr_within_range)
5735 (aarch64_linux_can_do_single_step): Refactor as methods of
5736 aarch64_linux_nat_target.
5737 (super_post_startup_inferior): Delete.
5738 (_initialize_aarch64_linux_nat): Adjust to C++ification.
5740 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
5741 (the_hppa_linux_nat_target): New.
5742 (hppa_linux_fetch_inferior_registers)
5743 (hppa_linux_store_inferior_registers): Refactor as methods of
5744 hppa_linux_nat_target.
5745 (_initialize_hppa_linux_nat): Adjust to C++ification.
5747 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
5748 (the_ia64_linux_nat_target): New.
5749 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
5750 (ia64_linux_stopped_data_address)
5751 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
5752 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
5753 ia64_linux_nat_target methods.
5754 (super_xfer_partial): Delete.
5755 (_initialize_ia64_linux_nat): Adjust to C++ification.
5757 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
5758 (the_m32r_linux_nat_target): New.
5759 (m32r_linux_fetch_inferior_registers)
5760 (m32r_linux_store_inferior_registers): Refactor as
5761 m32r_linux_nat_target methods.
5762 (_initialize_m32r_linux_nat): Adjust to C++ification.
5764 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
5765 (the_m68k_linux_nat_target): New.
5766 (m68k_linux_fetch_inferior_registers)
5767 (m68k_linux_store_inferior_registers): Refactor as
5768 m68k_linux_nat_target methods.
5769 (_initialize_m68k_linux_nat): Adjust to C++ification.
5771 * s390-linux-nat.c (s390_linux_nat_target): New class.
5772 (the_s390_linux_nat_target): New.
5773 (s390_linux_fetch_inferior_registers)
5774 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
5775 (s390_insert_watchpoint, s390_remove_watchpoint)
5776 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
5777 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
5778 (s390_auxv_parse, s390_read_description): Refactor as methods of
5779 s390_linux_nat_target.
5780 (_initialize_s390_nat): Adjust to C++ification.
5782 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
5783 (the_sparc_linux_nat_target): New.
5784 (_initialize_sparc_linux_nat): Adjust to C++ification.
5785 * sparc-nat.c (sparc_fetch_inferior_registers)
5786 (sparc_store_inferior_registers): Remove target_ops parameter.
5787 * sparc-nat.h (sparc_fetch_inferior_registers)
5788 (sparc_store_inferior_registers): Remove target_ops parameter.
5789 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
5790 (the_sparc64_linux_nat_target): New.
5791 (_initialize_sparc64_linux_nat): Adjust to C++ification.
5793 * spu-linux-nat.c (spu_linux_nat_target): New class.
5794 (the_spu_linux_nat_target): New.
5795 (spu_child_post_startup_inferior, spu_child_post_attach)
5796 (spu_child_wait, spu_fetch_inferior_registers)
5797 (spu_store_inferior_registers, spu_xfer_partial)
5798 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
5800 (_initialize_spu_nat): Adjust to C++ification.
5802 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
5803 (the_tilegx_linux_nat_target): New.
5804 (fetch_inferior_registers, store_inferior_registers):
5805 Refactor as methods.
5806 (_initialize_tile_linux_nat): Adjust to C++ification.
5808 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
5809 (the_xtensa_linux_nat_target): New.
5810 (xtensa_linux_fetch_inferior_registers)
5811 (xtensa_linux_store_inferior_registers): Refactor as
5812 xtensa_linux_nat_target methods.
5813 (_initialize_xtensa_linux_nat): Adjust to C++ification.
5815 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
5816 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
5817 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
5818 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
5819 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
5820 (fbsd_stopped_by_sw_breakpoint)
5821 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
5822 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
5823 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
5824 (fbsd_post_startup_inferior, fbsd_post_attach)
5825 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
5826 (fbsd_set_syscall_catchpoint)
5827 (super_xfer_partial, super_resume, super_wait)
5828 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
5829 (fbsd_handle_debug_trap): Remove target_ops parameter.
5830 (fbsd_nat_add_target): Delete.
5831 * fbsd-nat.h: Include "inf-ptrace.h".
5832 (fbsd_nat_add_target): Delete.
5833 (USE_SIGTRAP_SIGINFO): Define.
5834 (fbsd_nat_target): New class.
5836 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
5837 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
5838 (amd64bsd_target): Delete.
5839 * amd64-bsd-nat.h: New file.
5840 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
5842 (amd64_fbsd_nat_target): New class.
5843 (the_amd64_fbsd_nat_target): New.
5844 (amd64fbsd_read_description): Refactor as method of
5845 amd64_fbsd_nat_target.
5846 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5847 (_initialize_amd64fbsd_nat): Adjust to C++ification.
5848 * amd64-nat.h (amd64bsd_target): Delete function declaration.
5849 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
5850 (i386bsd_store_inferior_registers): Remove target_ops parameter.
5851 (i386bsd_target): Delete.
5852 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
5853 (i386bsd_fetch_inferior_registers)
5854 (i386bsd_store_inferior_registers): Declare.
5855 (i386_bsd_nat_target): New class.
5856 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
5857 (the_i386_fbsd_nat_target): New.
5858 (i386fbsd_resume, i386fbsd_read_description): Refactor as
5859 i386_fbsd_nat_target methods.
5860 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5861 (_initialize_i386fbsd_nat): Adjust to C++ification.
5862 * x86-bsd-nat.c (super_mourn_inferior): Delete.
5863 (x86bsd_mourn_inferior, x86bsd_target): Delete.
5864 (_initialize_x86_bsd_nat): Adjust to C++ification.
5865 * x86-bsd-nat.h: Include "x86-nat.h".
5866 (x86bsd_target): Delete declaration.
5867 (x86bsd_nat_target): New class.
5869 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
5870 (the_aarch64_fbsd_nat_target): New.
5871 (aarch64_fbsd_fetch_inferior_registers)
5872 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
5873 aarch64_fbsd_nat_target.
5874 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
5875 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
5876 (the_alpha_bsd_nat_target): New.
5877 (alphabsd_fetch_inferior_registers)
5878 (alphabsd_store_inferior_registers): Refactor as
5879 alpha_bsd_nat_target methods.
5880 (_initialize_alphabsd_nat): Refactor as methods of
5881 alpha_bsd_nat_target.
5882 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
5883 (the_amd64_nbsd_nat_target): New.
5884 (_initialize_amd64nbsd_nat): Adjust to C++ification.
5885 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
5886 (the_amd64_obsd_nat_target): New.
5887 (_initialize_amd64obsd_nat): Adjust to C++ification.
5888 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
5889 (the_arm_fbsd_nat_target): New.
5890 (arm_fbsd_fetch_inferior_registers)
5891 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
5892 (_initialize_arm_fbsd_nat): Refactor as methods of
5893 arm_fbsd_nat_target.
5894 (_initialize_arm_fbsd_nat): Adjust to C++ification.
5895 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
5896 (the_arm_netbsd_nat_target): New.
5897 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
5898 arm_netbsd_nat_target.
5899 (_initialize_arm_netbsd_nat): Adjust to C++ification.
5900 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
5901 (the_hppa_nbsd_nat_target): New.
5902 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
5903 hppa_nbsd_nat_target methods.
5904 (_initialize_hppanbsd_nat): Adjust to C++ification.
5905 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
5906 (the_hppa_obsd_nat_target): New.
5907 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
5908 methods of hppa_obsd_nat_target.
5909 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
5911 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
5912 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
5914 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
5915 (_initialize_i386obsd_nat): Use add_target.
5916 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
5917 (the_m68k_bsd_nat_target): New.
5918 (m68kbsd_fetch_inferior_registers)
5919 (m68kbsd_store_inferior_registers): Refactor as methods of
5920 m68k_bsd_nat_target.
5921 (_initialize_m68kbsd_nat): Adjust to C++ification.
5922 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
5923 (the_mips_fbsd_nat_target): New.
5924 (mips_fbsd_fetch_inferior_registers)
5925 (mips_fbsd_store_inferior_registers): Refactor as methods of
5926 mips_fbsd_nat_target.
5927 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
5929 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
5930 (the_mips_nbsd_nat_target): New.
5931 (mipsnbsd_fetch_inferior_registers)
5932 (mipsnbsd_store_inferior_registers): Refactor as methods of
5933 mips_nbsd_nat_target.
5934 (_initialize_mipsnbsd_nat): Adjust to C++ification.
5935 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
5936 (the_mips64_obsd_nat_target): New.
5937 (mips64obsd_fetch_inferior_registers)
5938 (mips64obsd_store_inferior_registers): Refactor as methods of
5939 mips64_obsd_nat_target.
5940 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
5942 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
5944 * nbsd-nat.h: Include "inf-ptrace.h".
5945 (nbsd_nat_target): New class.
5946 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
5947 (obsd_wait): Refactor as methods of obsd_nat_target.
5948 (obsd_add_target): Delete.
5949 * obsd-nat.h: Include "inf-ptrace.h".
5950 (obsd_nat_target): New class.
5951 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
5952 (the_ppc_fbsd_nat_target): New.
5953 (ppcfbsd_fetch_inferior_registers)
5954 (ppcfbsd_store_inferior_registers): Refactor as methods of
5955 ppc_fbsd_nat_target.
5956 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
5958 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
5959 (the_ppc_nbsd_nat_target): New.
5960 (ppcnbsd_fetch_inferior_registers)
5961 (ppcnbsd_store_inferior_registers): Refactor as methods of
5962 ppc_nbsd_nat_target.
5963 (_initialize_ppcnbsd_nat): Adjust to C++ification.
5964 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
5965 (the_ppc_obsd_nat_target): New.
5966 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
5967 methods of ppc_obsd_nat_target.
5968 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
5970 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
5971 (the_sh_nbsd_nat_target): New.
5972 (shnbsd_fetch_inferior_registers)
5973 (shnbsd_store_inferior_registers): Refactor as methods of
5975 (_initialize_shnbsd_nat): Adjust to C++ification.
5976 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
5977 (inf_ptrace_xfer_partial): Delete.
5978 (sparc_xfer_partial, sparc_target): Delete.
5979 * sparc-nat.h (sparc_fetch_inferior_registers)
5980 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
5981 (sparc_target): Delete function declaration.
5982 (sparc_target): New template class.
5983 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
5984 (_initialize_sparcnbsd_nat): Adjust to C++ification.
5985 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
5986 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
5988 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
5989 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
5990 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
5991 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
5993 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
5994 (the_vax_bsd_nat_target): New.
5995 (vaxbsd_fetch_inferior_registers)
5996 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
5998 (_initialize_vaxbsd_nat): Adjust to C++ification.
6000 * bsd-kvm.c (bsd_kvm_target): New class.
6001 (bsd_kvm_ops): Now a bsd_kvm_target.
6002 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6003 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6004 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6006 (bsd_kvm_return_one): Delete.
6007 (bsd_kvm_add_target): Adjust to C++ification.
6009 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6010 (nto_procfs_target_procfs): New classes.
6011 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6012 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6013 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6014 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6015 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6016 (procfs_remove_hw_breakpoint, procfs_resume)
6017 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6018 (procfs_kill_inferior, procfs_store_registers)
6019 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6020 as methods of nto_procfs_target.
6021 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6022 (nto_native_ops): Delete.
6023 (procfs_open, procfs_native_open): Delete.
6024 (nto_native_ops): Now an nto_procfs_target_native.
6025 (init_procfs_targets): Adjust to C++ification.
6026 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6027 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6028 Refactor as methods of nto_procfs_target.
6030 * go32-nat.c (go32_nat_target): New class.
6031 (the_go32_nat_target): New.
6032 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6033 (go32_store_registers, go32_xfer_partial, go32_files_info)
6034 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6035 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6036 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6037 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6038 (go32_target): Delete.
6039 (_initialize_go32_nat): Adjust to C++ification.
6041 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6042 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6043 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6044 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6046 (gnu_target): Delete.
6047 * gnu-nat.h (gnu_target): Delete.
6048 (gnu_nat_target): New class.
6049 * i386-gnu-nat.c (gnu_base_target): New.
6050 (i386_gnu_nat_target): New class.
6051 (the_i386_gnu_nat_target): New.
6052 (_initialize_i386gnu_nat): Adjust to C++ification.
6054 2018-05-02 Pedro Alves <palves@redhat.com>
6056 * bfd-target.c (target_bfd_xclose): Rename to ...
6057 (target_bfd_close): ... this.
6058 (target_bfd_reopen): Adjust.
6059 * target.c (target_close): Remove references to to_xclose.
6060 * target.h (target_ops::to_xclose): Delete.
6061 (target_ops::to_close): Update comments.
6063 2018-05-02 Pedro Alves <palves@redhat.com>
6065 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6067 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6068 * inf-ptrace.c (inf_ptrace_register_u_offset)
6069 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6070 (inf_ptrace_store_register, inf_ptrace_store_registers)
6071 (inf_ptrace_trad_target): Move to ...
6072 * linux-nat-trad.c: ... this new file.
6073 * linux-nat-trad.h: New file.
6074 * linux-nat.c (linux_target_install_ops): Make extern.
6075 (linux_trad_target): Delete.
6076 * linux-nat.h (linux_trad_target): Delete declaration.
6077 (linux_target_install_ops): Declare.
6078 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6081 2018-05-02 Pedro Alves <palves@redhat.com>
6083 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6084 procfs_target/add_target here.
6085 * procfs.c (procfs_target): Make static.
6086 (_initialize_procfs): Call add_target here.
6087 * procfs.h (struct target_ops): Remove forward declaration.
6088 (procfs_target): Remove declaration.
6089 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6091 2018-05-02 Pedro Alves <palves@redhat.com>
6093 * procfs.c (procfs_stopped_by_watchpoint)
6094 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6095 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6097 (procfs_use_watchpoints): Delete, move contents...
6098 (procfs_target): ... here.
6099 * procfs.h (procfs_use_watchpoints): Delete declaration.
6100 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6101 procfs_use_watchpoints.
6102 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6103 procfs_use_watchpoints.
6105 2018-05-02 Tom Tromey <tom@tromey.com>
6108 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6109 and var_zuinteger_unlimited.
6110 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6111 and PARAM_ZUINTEGER_UNLIMITED.
6112 (set_parameter_value): Handle var_zuinteger and
6113 var_zuinteger_unlimited.
6114 (add_setshow_generic): Likewise.
6115 (parmpy_init): Likewise.
6117 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6120 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6121 pointer is not null before dereferencing it.
6123 2018-04-30 Tom Tromey <tom@tromey.com>
6125 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6128 2018-04-30 Tom Tromey <tom@tromey.com>
6130 * breakpoint.c (mention): Remove use of is_mi_like_p.
6131 (print_mention_ranged_breakpoint): Likewise.
6132 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6135 2018-04-30 Tom Tromey <tom@tromey.com>
6137 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6139 2018-04-30 Tom Tromey <tom@tromey.com>
6141 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6142 (info_spu_event_command): Remove some uses of is_mi_like_p.
6144 2018-04-30 Tom Tromey <tom@tromey.com>
6146 * python/py-framefilter.c (py_print_single_arg)
6147 (enumerate_locals, py_print_args, py_print_frame): Remove some
6148 uses of is_mi_like_p.
6150 2018-04-30 Tom Tromey <tom@tromey.com>
6153 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6154 * ui-out.h (ui_out::is_mi_like_p): Now const.
6155 (ui_out::do_is_mi_like_p): Now const.
6156 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6158 2018-04-30 Tom Tromey <tom@tromey.com>
6160 * varobj.c (varobj_set_visualizer): Use new_reference.
6161 * python/python.c (gdbpy_decode_line): Use new_reference.
6162 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6165 2018-04-30 Tom Tromey <tom@tromey.com>
6167 * varobj.c (install_new_value): Use new_reference.
6168 * value.h (value_incref): Return void. Swap intro comment with
6170 * value.c (set_value_parent): Use new_reference.
6171 (value_incref): Return void. Update intro comment.
6172 (release_value): Use new_reference.
6173 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6175 2018-04-30 Tom Tromey <tom@tromey.com>
6177 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6178 * gdb_bfd.h (new_bfd_ref): Remove.
6179 (gdb_bfd_open): Update comment.
6180 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6181 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6182 (gdb_bfd_fdopenr): Use new_reference.
6183 * exec.c (exec_file_attach): Use new_reference.
6185 2018-04-30 Tom Tromey <tom@tromey.com>
6187 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6190 2018-04-30 Tom Tromey <tom@tromey.com>
6192 * jit.c (jit_read_code_entry): Use type_align.
6193 * i386-tdep.c (i386_gdbarch_init): Don't call
6194 set_gdbarch_long_long_align_bit.
6195 * gdbarch.sh: Remove long_long_align_bit.
6196 * gdbarch.c, gdbarch.h: Rebuild.
6197 * arc-tdep.c (arc_type_align): New function.
6198 (arc_gdbarch_init): Use arc_type_align. Don't call
6199 set_gdbarch_long_long_align_bit.
6201 2018-04-30 Tom Tromey <tom@tromey.com>
6203 * rust-lang.c (rust_type_alignment): Remove.
6204 (rust_composite_type): Use type_align.
6206 2018-04-30 Tom Tromey <tom@tromey.com>
6208 * NEWS: Mention Type.align.
6209 * python/py-type.c (typy_get_alignof): New function.
6210 (type_object_getset): Add "alignof".
6212 2018-04-30 Tom Tromey <tom@tromey.com>
6216 * std-operator.def (UNOP_ALIGNOF): New operator.
6217 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6219 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6220 * c-lang.c (c_op_print_tab): Add alignof.
6221 * c-exp.y (ALIGNOF): New token.
6222 (exp): Add "ALIGNOF" production.
6223 (ident_tokens): Add _Alignof and alignof.
6225 2018-04-30 Tom Tromey <tom@tromey.com>
6227 * i386-tdep.c (i386_type_align): New function.
6228 (i386_gdbarch_init): Update.
6229 * gdbarch.sh (type_align): New method.
6230 * gdbarch.c, gdbarch.h: Rebuild.
6231 * arch-utils.h (default_type_align): Declare.
6232 * arch-utils.c (default_type_align): New function.
6233 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6234 (struct type) <align_log2>: New field.
6235 <instance_flags>: Now a bitfield.
6236 (TYPE_RAW_ALIGN): New macro.
6237 (type_align, type_raw_align, set_type_align): Declare.
6238 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6240 * dwarf2read.c (quirk_rust_enum): Set type alignment.
6241 (get_alignment, maybe_set_alignment): New functions.
6242 (read_structure_type, read_enumeration_type, read_array_type)
6243 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6244 (read_subrange_type, read_base_type): Set type alignment.
6246 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
6248 * dwarf2read.c (read_index_from_section): Use bool.
6250 2018-04-29 Fabian Groffen <grobian@gentoo.org>
6253 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6256 2018-04-29 John Reiser <jreiser@BitWagon.com>
6259 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6260 last step, and do it atomically.
6262 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
6264 * compile/compile-c-types.c (convert_int, convert_float):
6267 2018-04-27 Tom Tromey <tom@tromey.com>
6270 * rust-lang.c (rust_inclusive_range_type_p): New function.
6271 (rust_range): Handle inclusive ranges.
6272 (rust_compute_range): Likewise.
6273 * rust-exp.y (struct rust_op) <inclusive>: New field.
6274 (DOTDOTEQ): New constant.
6275 (range_expr): Add "..=" productions.
6276 (operator_tokens): Add "..=" token.
6277 (ast_range): Add "inclusive" parameter.
6278 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6280 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6282 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6283 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6285 * expprint.c (print_subexp_standard): Handle new bounds values.
6286 (dump_subexp_body_standard): Likewise.
6288 2018-04-27 Tom Tromey <tom@tromey.com>
6290 * configure: Rebuild.
6291 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6292 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6294 (class symbol_needs_eval_context): Likewise.
6295 * dwarf2read.c (mock_mapped_index::symbol_name_count)
6296 (mock_mapped_index::symbol_name_at): Use "override". Remove
6298 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6300 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6301 * aarch64-tdep.c (instruction_reader::read): Use "override".
6302 (instruction_reader_test::read): Likewise.
6303 * arm-tdep.c (instruction_reader::read): Use "override".
6304 (instruction_reader_thumb::read): Likewise.
6306 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
6309 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6310 instead of remote_send.
6311 (remote_send): Remove.
6313 2018-04-26 Pedro Alves <palves@redhat.com>
6315 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6316 find_function_start_sal instead of find_pc_line.
6318 2018-04-26 Pedro Alves <palves@redhat.com>
6320 * breakpoint.c (set_breakpoint_location_function): Handle
6322 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6323 * elfread.c (elf_symtab_read): Give data symbols with
6324 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6325 (elf_rel_plt_read): Update comment.
6326 * linespec.c (convert_linespec_to_sals): Handle
6328 (minsym_found): Handle mst_data_gnu_ifunc.
6329 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6330 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6331 * parse.c (find_minsym_type_and_address): Handle
6333 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6334 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6335 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6337 <mst_data_gnu_ifunc>: New enumerator.
6339 2018-04-26 Pedro Alves <palves@redhat.com>
6341 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6342 (lookup_minimal_symbol_by_pc_section): ... this. Replace
6343 'want_trampoline' parameter by a lookup_msym_prefer parameter.
6345 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6346 (lookup_minimal_symbol_by_pc): Adjust.
6347 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6348 (lookup_solib_trampoline_symbol_by_pc): Adjust.
6349 * minsyms.h (lookup_msym_prefer): New enum.
6350 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6351 parameter by a lookup_msym_prefer parameter.
6353 2018-04-26 Pedro Alves <palves@redhat.com>
6355 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6356 ends in "@plt" instead of looking at the symbol's section.
6358 2018-04-26 Pedro Alves <palves@redhat.com>
6360 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
6362 (find_pc_partial_function_gnu_ifunc): Rename to ...
6363 (find_pc_partial_function): ... this, and remove references to
6365 (find_pc_partial_function): Delete old implementation.
6366 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6368 2018-04-26 Pedro Alves <palves@redhat.com>
6370 * linespec.c (struct bound_minimal_symbol_search_key): New.
6371 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
6372 skip first line if we found a GNU ifunc minimal symbol by name.
6373 (compare_msymbols): Change parameters to work with a destructured
6375 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6378 2018-04-26 Pedro Alves <palves@redhat.com>
6380 * breakpoint.c (set_breakpoint_location_function): Don't resolve
6381 ifunc targets here. Instead, if we have an ifunc minsym, use its
6383 (add_location_to_breakpoint): Store the minsym and the objfile in
6384 the breakpoint location.
6385 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6386 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6387 Record the minsym in the sal.
6388 * symtab.h (symtab_and_line) <msymbol>: New field.
6390 2018-04-26 Pedro Alves <palves@redhat.com>
6392 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6393 unless we actually resolved the ifunc.
6395 2018-04-26 Pedro Alves <palves@redhat.com>
6397 * c-exp.y (variable production): Prefer ifunc minsyms over
6398 regular function symbols.
6399 * symtab.c (find_gnu_ifunc): New function.
6400 * minsyms.h (lookup_msym_prefer): New enum.
6401 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6402 parameter by a lookup_msym_prefer parameter.
6403 * symtab.h (find_gnu_ifunc): New declaration.
6405 2018-04-26 Pedro Alves <palves@redhat.com>
6407 * blockframe.c (find_gnu_ifunc_target_type): New function.
6408 (find_function_type): New.
6409 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6410 return a value with a memory address.
6411 (eval_call): For calls to GNU ifunc functions, try to find the
6412 type of the target function from the type that the resolver
6414 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6416 * infcall.c (find_function_return_type): Delete.
6417 (find_function_addr): Add 'function_type' parameter. For calls to
6418 GNU ifunc functions, try to find the type of the target function
6419 from the type that the resolver returns, and return it via
6421 (call_function_by_hand_dummy): Adjust to use the function type
6422 returned by find_function_addr.
6423 (find_function_addr): Add 'function_type' parameter and move
6425 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6428 2018-04-26 Pedro Alves <palves@redhat.com>
6430 * c-exp.y (variable production): Skip finding an alias for ifunc
6433 2018-04-26 Pedro Alves <palves@redhat.com>
6435 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6437 2018-04-25 Pedro Alves <palves@redhat.com>
6439 * infcmd.c (kill_command): Print the pid as string, not the whole
6440 thread's ptid. Add comment. s/has been killed/killed/ in output
6442 * remote.c (remote_detach_1): Print the pid as string, not the
6443 whole thread's ptid.
6445 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6446 Sergio Durigan Junior <sergiodj@redhat.com>
6447 Pedro Alves <palves@redhat.com>
6449 * infcmd.c (kill_command): Print message when inferior has
6451 * inferior.c (print_inferior_events): Remove 'static'. Set as
6453 (add_inferior): Improve message printed when
6454 'print_inferior_events' is on.
6455 (exit_inferior): Remove message printed when
6456 'print_inferior_events' is on.
6457 (detach_inferior): Improve message printed when
6458 'print_inferior_events' is on.
6459 (initialize_inferiors): Use 'add_inferior_silent' to set
6460 'current_inferior_'.
6461 * inferior.h (print_inferior_events): Declare here as
6463 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6464 '[Detaching...]' messages when 'print_inferior_events' is on.
6465 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
6466 as prefix/suffix for messages. Remove periods. Fix erroneous
6467 'Detaching after fork from child...', replace it by '... from
6469 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6470 prefix/suffix when printing 'Detaching...' messages. Print
6471 them when 'print_inferior_events' is on.
6472 * remote.c (remote_detach_1): Print message when detaching
6473 from inferior and '!is_fork_parent'.
6475 2018-04-24 Tom Tromey <tom@tromey.com>
6477 * cli-out.h: Reindent.
6479 2018-04-24 Tom Tromey <tom@tromey.com>
6481 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6482 (cli_ui_out::do_field_string): Use fputs_filtered.
6483 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6485 2018-04-23 Tom Tromey <tom@tromey.com>
6487 * guile/scm-frame.c (gdbscm_frame_read_var): Use
6488 gdb::unique_xmalloc_ptr.
6490 2018-04-23 Tom Tromey <tom@tromey.com>
6492 * configure: Rebuild.
6494 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
6497 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6498 prepare_for_testing. Set normal_bp to r_debug_state if target
6501 2018-04-21 Pedro Alves <palves@redhat.com>
6502 Rajendra SY <rajendra.sy@gmail.com>
6504 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6505 * remote.c (extended_remote_attach): In all-stop mode, mark the
6506 thread as executing.
6508 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6510 * thread.c (thread_apply_all_command): Fix comment.
6511 (thread_command): Fix comment.
6513 2018-04-10 Alan Hayward <alan.hayward@arm.com>
6515 * common/tdesc.h (tdesc_create_feature): Remove xml filename
6517 * features/aarch64-core.c (create_feature_aarch64_core):
6519 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
6521 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
6523 * features/i386/32bit-avx512.c
6524 (create_feature_i386_32bit_avx512): Likewise.
6525 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
6527 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
6529 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
6531 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
6533 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
6535 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
6537 * features/i386/64bit-avx512.c
6538 (create_feature_i386_64bit_avx512): Likewise.
6539 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
6541 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
6543 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
6545 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
6547 * features/i386/64bit-segments.c
6548 (create_feature_i386_64bit_segments): Likewise.
6549 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
6551 * features/i386/x32-core.c
6552 (create_feature_i386_x32_core): Likewise.
6553 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
6554 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
6555 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
6556 * target-descriptions.c: In generated code, don't pass xml
6559 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6561 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
6562 (print_xml_feature::visit_post): Likewise.
6563 (print_xml_feature::visit): Likewise.
6564 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
6565 (print_xml_feature): Add new class.
6566 * regformats/regdat.sh: Null xmltarget on feature targets.
6567 * target-descriptions.c (struct target_desc): Add xmltarget.
6568 (maintenance_check_tdesc_xml_convert): Add unittest function.
6569 (tdesc_get_features_xml): Add function to get xml.
6570 (maintenance_check_xml_descriptions): Test xml generation.
6571 * xml-tdesc.c (string_read_description_xml): Add function.
6572 * xml-tdesc.h (string_read_description_xml): Add declaration.
6574 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6576 * features/Makefile: Add feature marker to targets with new style
6577 target descriptions.
6578 * regformats/aarch64.dat: Regenerate.
6579 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
6580 * regformats/i386/amd64-avx-linux.dat: Likewise.
6581 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
6582 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
6583 * regformats/i386/amd64-linux.dat: Likewise.
6584 * regformats/i386/amd64-mpx-linux.dat: Likewise.
6585 * regformats/i386/amd64.dat: Likewise.
6586 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
6587 * regformats/i386/i386-avx-linux.dat: Likewise.
6588 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
6589 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
6590 * regformats/i386/i386-linux.dat: Likewise.
6591 * regformats/i386/i386-mmx-linux.dat: Likewise.
6592 * regformats/i386/i386-mpx-linux.dat: Likewise.
6593 * regformats/i386/i386.dat: Likewise.
6594 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
6595 * regformats/i386/x32-avx-linux.dat: Likewise.
6596 * regformats/i386/x32-linux.dat: Likewise.
6597 * regformats/tic6x-c62x-linux.dat: Likewise.
6598 * regformats/tic6x-c64x-linux.dat: Likewise.
6599 * regformats/tic6x-c64xp-linux.dat: Likewise.
6600 * regformats/regdat.sh: Parse feature marker.
6602 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6604 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
6605 (tdesc_osabi_name): Likewise.
6606 * target-descriptions.c (tdesc_architecture_name): Add new
6608 (tdesc_osabi_name): Likewise.
6610 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6612 * common/tdesc.c (tdesc_predefined_type): Move to here.
6613 (tdesc_named_type): Likewise.
6614 (tdesc_create_vector): Likewise.
6615 (tdesc_create_struct): Likewise.
6616 (tdesc_set_struct_size): Likewise.
6617 (tdesc_create_union): Likewise.
6618 (tdesc_create_flags): Likewise.
6619 (tdesc_create_enum): Likewise.
6620 (tdesc_add_field): Likewise.
6621 (tdesc_add_typed_bitfield): Likewise.
6622 (tdesc_add_bitfield): Likewise.
6623 (tdesc_add_flag): Likewise.
6624 (tdesc_add_enum_value): Likewise.
6625 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
6626 (struct tdesc_type_vector): Likewise.
6627 (struct tdesc_type_field): Likewise.
6628 (struct tdesc_type_with_fields): Likewise.
6629 (tdesc_create_enum): Add declaration.
6630 (tdesc_add_typed_bitfield): Likewise.
6631 (tdesc_add_enum_value): Likewise.
6632 * target-descriptions.c (tdesc_type_field): Move from here.
6633 (tdesc_type_builtin): Likewise.
6634 (tdesc_type_vector): Likewise.
6635 (tdesc_type_with_fields): Likewise.
6636 (tdesc_predefined_types): Likewise.
6637 (tdesc_named_type): Likewise.
6638 (tdesc_create_vector): Likewise.
6639 (tdesc_create_struct): Likewise.
6640 (tdesc_set_struct_size): Likewise.
6641 (tdesc_create_union): Likewise.
6642 (tdesc_create_flags): Likewise.
6643 (tdesc_create_enum): Likewise.
6644 (tdesc_add_field): Likewise.
6645 (tdesc_add_typed_bitfield): Likewise.
6646 (tdesc_add_bitfield): Likewise.
6647 (tdesc_add_flag): Likewise.
6648 (tdesc_add_enum_value): Likewise.
6649 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
6650 (tdesc_add_typed_bitfield): Likewise.
6651 (tdesc_add_enum_value): Likewise.
6653 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6655 * common/tdesc.c (tdesc_feature::accept): Move to here.
6656 (tdesc_feature::operator==): Likewise.
6657 (tdesc_create_reg): Likewise.
6658 * common/tdesc.h (tdesc_type_kind): Likewise.
6659 (struct tdesc_type): Likewise.
6660 (struct tdesc_feature): Likewise.
6661 * regformats/regdat.sh: Create a feature.
6662 * target-descriptions.c (tdesc_type_kind): Move from here.
6663 (tdesc_type): Likewise.
6664 (tdesc_type_up): Likewise.
6665 (tdesc_feature): Likewise.
6666 (tdesc_create_reg): Likewise.
6668 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6670 * Makefile.in: Add arch/tdesc.c
6671 * common/tdesc.c: New file.
6672 * common/tdesc.h (tdesc_element_visitor): Move to here.
6673 (tdesc_element): Likewise.
6674 (tdesc_reg): Likewise.
6675 (tdesc_reg_up): Likewise.
6676 * regformats/regdef.h (reg): Add offset to constructors.
6677 * target-descriptions.c (tdesc_element_visitor): Move from here.
6678 (tdesc_element): Likewise.
6679 (tdesc_reg): Likewise.
6680 (tdesc_reg_up): Likewise.
6682 2018-04-17 Tom Tromey <tom@tromey.com>
6684 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
6687 2018-04-17 Tom Tromey <tom@tromey.com>
6689 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
6691 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
6693 * symtab.c (print_symbol_info): Skip printing filename and line
6694 number when `last' is NULL.
6695 (symtab_symbol_info): Use empty string instead of NULL for first
6696 invocation of print_symbol_info.
6697 (rbreak_command): Pass NULL to `last' parameter of
6700 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
6702 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
6705 2018-04-16 Pedro Alves <palves@redhat.com>
6707 * MAINTAINERS (sh): Remove.
6708 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
6709 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
6710 (ALLDEPFILES): Remove sh64-tdep.c.
6711 * NEWS: Mentions that support for SH-5/SH64 is removed.
6712 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
6713 (sh*-*-openbsd*): Ditto.
6714 (sh64-*-elf*): Remove.
6716 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
6717 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
6718 * sh-tdep.c: No longer include "sh64-tdep.h".
6719 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
6720 * sh64-tdep.c, sh64-tdep.h: Remove files.
6722 2018-04-16 Pedro Alves <palves@redhat.com>
6724 * MAINTAINERS: Remove m88k.
6725 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
6726 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
6727 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
6728 * NEWS: Mention that support for m88k was removed.
6729 * configure.host (m88*-*-*): Remove support.
6730 * configure.nat (m88k-*-*): Remove support.
6731 * configure.tgt (m88*-*-openbsd*): Remove.
6732 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
6734 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
6736 * configure.tgt (x86_tobjs): New variable.
6737 (amd64_tobjs, i386_tobjs): Use it.
6739 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6741 * symtab.c (print_symbol_info): Precede the symbol definition by
6742 the line number when available.
6743 * NEWS: Advertise this enhancement.
6745 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6747 * NEWS (New options): announce set/show record btrace cpu.
6748 * btrace.c: Include record-btrace.h.
6749 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
6750 the vendor is unknown.
6751 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
6752 Maybe overwrite the btrace configuration's cpu.
6753 (btrace_compute_ftrace): Add cpu parameter. Update callers.
6754 (btrace_fetch): Add cpu parameter. Update callers.
6755 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
6756 Maybe overwrite the btrace configuration's cpu. Skip enabling
6757 errata workarounds if the vendor is unknown.
6758 * python/py-record-btrace.c: Include record-btrace.h.
6759 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
6760 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
6761 * record-btrace.c (record_btrace_cpu_state_kind): New.
6762 (record_btrace_cpu): New.
6763 (set_record_btrace_cpu_cmdlist): New.
6764 (record_btrace_get_cpu): New.
6765 (require_btrace_thread, record_btrace_info)
6766 (record_btrace_resume_thread): Call record_btrace_get_cpu.
6767 (cmd_set_record_btrace_cpu_none): New.
6768 (cmd_set_record_btrace_cpu_auto): New.
6769 (cmd_set_record_btrace_cpu): New.
6770 (cmd_show_record_btrace_cpu): New.
6771 (_initialize_record_btrace): Initialize set/show record btrace cpu
6773 * record-btrace.h (record_btrace_get_cpu): New.
6775 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6777 * record.c (set_record_command): Fix typo in message.
6779 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6781 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
6783 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6785 * infrun.c (process_event_stop_test): Call
6786 gdbarch_in_indirect_branch_thunk.
6787 * gdbarch.sh (in_indirect_branch_thunk): New.
6788 * gdbarch.c: Regenerated.
6789 * gdbarch.h: Regenerated.
6792 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
6793 (HFILES_NO_SRCDIR): Add x86-tdep.h.
6794 (ALLDEPFILES): Add x86-tdep.c.
6795 * arch-utils.h (default_in_indirect_branch_thunk): New.
6796 * arch-utils.c (default_in_indirect_branch_thunk): New.
6797 * i386-tdep: Include x86-tdep.h.
6798 (i386_in_indirect_branch_thunk): New.
6799 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
6801 * amd64-tdep: Include x86-tdep.h.
6802 (amd64_in_indirect_branch_thunk): New.
6803 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
6805 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
6808 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
6809 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
6810 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
6813 2018-04-12 Tom Tromey <tom@tromey.com>
6815 * rust-lang.c (rust_print_struct_def): Remove univariant code.
6816 (rust_evaluate_subexp): Likewise.
6818 2018-04-12 Pedro Alves <palves@redhat.com>
6820 * procfs.c (procfs_detach): Make forward declaration's prototype
6821 match definition's protototype.
6822 (proc_get_LDT_entry): Remove stale do_cleanups call.
6824 2018-04-12 Pedro Alves <palves@redhat.com>
6826 * target.h (target_ops::to_has_exited): Delete.
6827 (target_has_exited): Delete.
6828 * target-delegates.c: Regenerate.
6830 2018-04-11 Pedro Alves <palves@redhat.com>
6832 * target.c (fileio_fh_t::t): Add comment.
6833 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6834 (target_fileio_close): Handle a NULL target.
6835 (invalidate_fileio_fh): New.
6836 (target_close): Call it.
6837 * remote.c (remote_hostio_send_command): No longer check whether
6838 remote_desc is open.
6840 2018-04-11 Pedro Alves <palves@redhat.com>
6842 * target.c (fileio_fh_t): Make it a named struct instead of a
6844 (fileio_fh_t::is_closed): New method.
6845 (DEF_VEC_O (fileio_fh_t)): Remove.
6846 (fileio_fhandles): Now a std::vector.
6847 (is_closed_fileio_fh): Delete.
6848 (acquire_fileio_fd): Adjust. Rename parameters.
6849 (release_fileio_fd): Adjust.
6850 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
6851 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6852 (target_fileio_close): Adjust.
6854 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
6856 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
6859 2018-04-10 Pedro Alves <palves@redhat.com>
6861 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
6862 (scoped_finish_thread_state): New class.
6863 * infcmd.c (run_command_1): Use it instead of finish_thread_state
6865 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
6866 (fetch_inferior_event, normal_stop): Likewise.
6867 * thread.c (finish_thread_state_cleanup): Delete.
6869 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6870 Pedro Alves <palves@redhat.com>
6872 * value.c: Include "selftest.h" and "common/array-view.h".
6873 (struct range) <operator ==>: New.
6874 (test_ranges_contain): New.
6875 (check_ranges_vector): New.
6876 (test_insert_into_bit_range_vector): New.
6877 (_initialize_values): Register selftests.
6878 * common/array-view.h (operator==, operator!=): New.
6880 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6882 * common/gdb_vecs.h (unordered_remove): Add overload that takes
6884 * inline-frame.c: Include <algorithm>.
6885 (struct inline_state): Add constructor.
6886 (inline_state_s): Remove.
6887 (DEF_VEC_O(inline_state_s)): Remove.
6888 (inline_states): Change type to std::vector.
6889 (find_inline_frame_state): Adjust to std::vector.
6890 (allocate_inline_frame_state): Remove.
6891 (clear_inline_frame_state): Adjust to std::vector.
6892 (skip_inline_frames): Adjust to std::vector.
6894 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6896 * tracepoint.h (struct trace_state_variable): Add constructor.
6897 <name>: Change type to std::string.
6898 * tracepoint.c (tsv_s): Remove.
6899 (DEF_VEC_O(tsv_s)): Remove.
6900 (tvariables): Change to std::vector.
6901 (create_trace_state_variable): Adjust to std::vector.
6902 (find_trace_state_variable): Likewise.
6903 (find_trace_state_variable_by_number): Likewise.
6904 (delete_trace_state_variable): Likewise.
6905 (trace_variable_command): Adjust to std::string.
6906 (delete_trace_variable_command): Likewise.
6907 (tvariables_info_1): Adjust to std::vector.
6908 (save_trace_state_variables): Likewise.
6909 (start_tracing): Likewise.
6910 (merge_uploaded_trace_state_variables): Adjust to std::vector
6912 * target.h (struct target_ops)
6913 <to_download_trace_state_variable>: Pass reference to
6914 trace_state_variable.
6915 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
6916 * target-delegates.c: Re-generate.
6917 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
6918 (mi_tsv_deleted): Likewise.
6919 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
6920 * remote.c (remote_download_trace_state_variable): Change
6921 pointer to reference and adjust.
6922 * make-target-delegates (parse_argtypes): Handle references.
6923 (write_function_header): Likewise.
6924 (munge_type): Likewise.
6926 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6928 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6929 string_view-selftests.c.
6930 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
6932 * unittests/basic_string_view/cons/char/1.cc: Likewise.
6933 * unittests/basic_string_view/cons/char/2.cc: Likewise.
6934 * unittests/basic_string_view/cons/char/3.cc: Likewise.
6935 * unittests/basic_string_view/element_access/char/1.cc:
6937 * unittests/basic_string_view/element_access/char/empty.cc:
6939 * unittests/basic_string_view/element_access/char/front_back.cc:
6941 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
6942 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
6944 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
6946 * unittests/basic_string_view/modifiers/swap/char/1.cc:
6948 * unittests/basic_string_view/operations/compare/char/1.cc:
6950 * unittests/basic_string_view/operations/compare/char/13650.cc:
6952 * unittests/basic_string_view/operations/copy/char/1.cc:
6954 * unittests/basic_string_view/operations/data/char/1.cc:
6956 * unittests/basic_string_view/operations/find/char/1.cc:
6958 * unittests/basic_string_view/operations/find/char/2.cc:
6960 * unittests/basic_string_view/operations/find/char/3.cc:
6962 * unittests/basic_string_view/operations/find/char/4.cc:
6964 * unittests/basic_string_view/operations/rfind/char/1.cc:
6966 * unittests/basic_string_view/operations/rfind/char/2.cc:
6968 * unittests/basic_string_view/operations/rfind/char/3.cc:
6970 * unittests/basic_string_view/operations/substr/char/1.cc:
6972 * unittests/basic_string_view/operators/char/2.cc: Likewise.
6973 * unittests/string_view-selftests.c: New file.
6975 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6977 * unittests/basic_string_view/capacity/1.cc: New file.
6978 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
6979 * unittests/basic_string_view/cons/char/1.cc: New file.
6980 * unittests/basic_string_view/cons/char/2.cc: New file.
6981 * unittests/basic_string_view/cons/char/3.cc: New file.
6982 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
6983 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
6984 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
6985 * unittests/basic_string_view/element_access/char/1.cc: New file.
6986 * unittests/basic_string_view/element_access/char/2.cc: New file.
6987 * unittests/basic_string_view/element_access/char/empty.cc: New file.
6988 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
6989 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
6990 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
6991 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
6992 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
6993 * unittests/basic_string_view/include.cc: New file.
6994 * unittests/basic_string_view/inserters/char/1.cc: New file.
6995 * unittests/basic_string_view/inserters/char/2.cc: New file.
6996 * unittests/basic_string_view/inserters/char/3.cc: New file.
6997 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
6998 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
6999 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7000 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7001 * unittests/basic_string_view/literals/types.cc: New file.
7002 * unittests/basic_string_view/literals/values.cc: New file.
7003 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7004 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7005 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7006 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7007 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7008 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7009 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7010 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7011 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7012 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7013 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7014 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7015 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7016 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7017 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7018 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7019 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7020 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7021 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7022 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7023 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7024 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7025 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7026 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7027 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7028 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7029 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7030 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7031 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7032 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7033 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7034 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7035 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7036 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7037 * unittests/basic_string_view/operators/char/2.cc: New file.
7038 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7039 * unittests/basic_string_view/range_access/char/1.cc: New file.
7040 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7041 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7042 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7043 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7044 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7045 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7046 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7047 * unittests/basic_string_view/typedefs.cc: New file.
7048 * unittests/basic_string_view/types/1.cc: New file.
7050 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7052 * common/gdb_string_view.h: Remove libstdc++ implementation
7053 details, adjust to gdb reality.
7054 * common/gdb_string_view.tcc: Likewise.
7055 * cli/cli-script.c (struct string_view): Remove.
7056 (user_args) <m_args>: Change element type to gdb::string_view.
7057 (user_args::insert_args): Adjust.
7059 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7061 * common/gdb_string_view.h: New file.
7062 * common/gdb_string_view.tcc: New file.
7064 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7066 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7067 * configure: Re-generate.
7069 2018-04-09 Pedro Alves <palves@redhat.com>
7071 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7072 (set_target_gdbarch): Call
7073 gdb::observers::architecture_changed.notify instead of
7074 observer_notify_architecture_changed.
7076 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7078 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7079 (do_restore_current_traceframe_cleanup): Remove.
7080 (restore_current_traceframe_cleanup_dtor): Remove.
7081 (make_cleanup_restore_current_traceframe): Remove.
7082 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7084 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7085 * infrun.c (fetch_inferior_event): Use
7086 scoped_restore_current_traceframe.
7088 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7090 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7092 <n_allocated_type_units>: Remove.
7093 <all_type_units>: Change to std::vector.
7094 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7095 to std::vector change.
7096 (dwarf2_per_objfile::get_cutu): Likewise.
7097 (dwarf2_per_objfile::get_tu): Likewise.
7098 (create_signatured_type_table_from_index): Likewise.
7099 (create_signatured_type_table_from_debug_names): Likewise.
7100 (dw2_symtab_iter_next): Likewise.
7101 (dw2_print_stats): Likewise.
7102 (dw2_expand_all_symtabs): Likewise.
7103 (dw2_expand_marked_cus): Likewise.
7104 (dw2_debug_names_iterator::next): Likewise.
7105 (dwarf2_initialize_objfile): Likewise.
7106 (add_signatured_type_cu_to_table): Likewise.
7107 (create_all_type_units): Likewise.
7108 (add_type_unit): Likewise.
7109 (struct tu_abbrev_offset): Add constructor.
7110 (build_type_psymtabs_1): Adjust to std::vector change.
7111 (print_tu_stats): Likewise.
7112 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7113 (write_debug_names): Likewise.
7115 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7117 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7118 Make an std::vector.
7119 <n_comp_units>: Remove.
7120 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7121 to std::vector change.
7122 (dwarf2_per_objfile::get_cutu): Likewise.
7123 (dwarf2_per_objfile::get_cu): Likewise.
7124 (create_cus_from_index): Likewise.
7125 (create_addrmap_from_index): Likewise.
7126 (create_addrmap_from_aranges): Likewise.
7127 (dwarf2_read_index): Likewise.
7128 (dw2_find_last_source_symtab): Likewise.
7129 (dw2_map_symtabs_matching_filename): Likewise.
7130 (dw2_symtab_iter_next): Likewise.
7131 (dw2_print_stats): Likewise.
7132 (dw2_expand_all_symtabs): Likewise.
7133 (dw2_expand_symtabs_with_fullname): Likewise.
7134 (dw2_expand_marked_cus): Likewise.
7135 (dw2_map_symbol_filenames): Likewise.
7136 (create_cus_from_debug_names): Likewise.
7137 (dwarf2_read_debug_names): Likewise.
7138 (dw2_debug_names_iterator::next): Likewise.
7139 (dwarf2_initialize_objfile): Likewise.
7140 (set_partial_user): Likewise.
7141 (dwarf2_build_psymtabs_hard): Likewise.
7142 (read_comp_units_from_section): Remove arguments, adjust to
7144 (create_all_comp_units): Adjust to std::vector and
7145 read_comp_units_from_section changes.
7146 (dwarf2_find_containing_comp_unit): Adjust to std::vector
7148 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7149 (psyms_seen_size): Likewise.
7150 (write_gdbindex): Likewise.
7151 (write_debug_names): Likewise.
7153 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7155 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7156 with dwarf2_per_objfile.
7157 (create_cus_from_index): Likewise.
7158 (create_signatured_type_table_from_index): Likewise.
7159 (dwarf2_read_index): Likewise.
7160 (dwarf2_initialize_objfile): Likewise.
7161 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
7162 per_cu rather than get_dwarf2_per_objfile.
7164 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7166 * dwarf2read.h (struct signatured_type): Forward declare.
7167 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7169 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7170 (dw2_get_cutu): ...this.
7171 (dwarf2_per_objfile::get_cu): Rename from...
7172 (dw2_get_cu): ...this.
7173 (dwarf2_per_objfile::get_tu): New.
7174 (create_addrmap_from_index): Adjust.
7175 (create_addrmap_from_aranges): Adjust.
7176 (dw2_find_last_source_symtab): Adjust.
7177 (dw2_map_symtabs_matching_filename): Adjust.
7178 (dw2_symtab_iter_next): Adjust.
7179 (dw2_print_stats): Adjust.
7180 (dw2_expand_all_symtabs): Adjust.
7181 (dw2_expand_symtabs_with_fullname): Adjust.
7182 (dw2_expand_marked_cus): Adjust.
7183 (dw_expand_symtabs_matching_file_matcher): Adjust.
7184 (dw2_map_symbol_filenames): Adjust.
7185 (dw2_debug_names_iterator::next): Adjust.
7186 (dwarf2_initialize_objfile): Adjust.
7187 (set_partial_user): Adjust.
7188 (dwarf2_build_psymtabs_hard): Adjust.
7190 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7192 * dwarf2read.c (create_signatured_type_table_from_debug_names):
7193 Remove unused variables.
7194 (dw2_map_symtabs_matching_filename): Likewise.
7195 (dwarf2_record_block_ranges): Likewise.
7196 (dwarf2_read_addr_index): Likewise.
7197 (follow_die_offset): Likewise.
7199 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7201 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7202 to symbol_file_add_main.
7204 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7207 * mi/mi-console.c (do_fputc_async_safe): New.
7208 (mi_console_file::write_async_safe): New.
7209 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7210 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7212 * ui-file.c (ui_file::putstrn): Adjust call to
7213 fputstrn_unfiltered.
7214 * utils.c (printchar): Replace do_fputs and do_fprintf
7215 parameters by do_fputc.
7216 (fputstr_filtered): Adjust call to printchar.
7217 (fputstr_unfiltered): Likewise.
7218 (fputstrn_filtered): Likewise.
7219 (fputstrn_unfiltered): Add do_fputc parameter, pass to
7221 * utils.h (do_fputc_ftype): New typedef.
7222 (fputstrn_unfiltered): Add do_fputc parameter.
7224 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7226 * regformats/i386/i386-avx.dat: Remove.
7228 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7231 * amd64-tdep.c (amd64_none_init_abi): New function.
7232 (amd64_x32_none_init_abi): New function.
7233 (_initialize_amd64_tdep): Register handlers for x86-64 and
7234 x64_32 with GDB_OSABI_NONE.
7235 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7236 GDB_OSABI_NONE osabi.
7238 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7241 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7243 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7244 * osabi.c (gdb_osabi_names): Add "unknown" entry.
7246 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7248 * common/byte-vector.h (char_vector): New type.
7249 * target.h (target_read_alloc): Return
7250 gdb::optional<byte_vector>.
7251 (target_read_stralloc): Return gdb::optional<char_vector>.
7252 (target_get_osdata): Return gdb::optional<char_vector>.
7253 * target.c (target_read_alloc_1): Templatize. Replacement
7254 manual memory management with vector.
7255 (target_read_alloc): Change return type, adjust.
7256 (target_read_stralloc): Change return type, adjust.
7257 (target_get_osdata): Change return type, adjust.
7258 * auxv.c (struct auxv_info) <length>: Remove.
7259 <data>: Change type to gdb::optional<byte_vector>.
7260 (auxv_inferior_data_cleanup): Free auxv_info with delete.
7261 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7262 (target_auxv_search): Adjust.
7263 (fprint_target_auxv): Adjust.
7264 * avr-tdep.c (avr_io_reg_read_command): Adjust.
7265 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7266 (linux_make_corefile_notes): Adjust.
7267 * osdata.c (get_osdata): Adjust.
7268 * remote.c (remote_get_threads_with_qxfer): Adjust.
7269 (remote_memory_map): Adjust.
7270 (remote_traceframe_info): Adjust.
7271 (btrace_read_config): Adjust.
7272 (remote_read_btrace): Adjust.
7273 (remote_pid_to_exec_file): Adjust.
7274 * solib-aix.c (solib_aix_get_library_list): Adjust.
7275 * solib-dsbt.c (decode_loadmap): Don't free buf.
7276 (dsbt_get_initial_loadmaps): Adjust.
7277 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7278 * solib-target.c (solib_target_current_sos): Adjust.
7279 * tracepoint.c (sdata_make_value): Adjust.
7280 * xml-support.c (xinclude_start_include): Adjust.
7281 (xml_fetch_content_from_file): Adjust.
7282 * xml-support.h (xml_fetch_another): Change return type.
7283 (xml_fetch_content_from_file): Change return type.
7284 * xml-syscall.c (xml_init_syscalls_info): Adjust.
7285 * xml-tdesc.c (file_read_description_xml): Adjust.
7286 (fetch_available_features_from_target): Change return type.
7287 (target_fetch_description_xml): Adjust.
7288 (target_read_description_xml): Adjust.
7290 2018-04-06 Tom Tromey <tom@tromey.com>
7292 * value.c (~value): Update.
7293 (struct value) <contents>: Now unique_xmalloc_ptr.
7294 (value_contents_bits_eq, allocate_value_contents)
7295 (value_contents_raw, value_contents_all_raw)
7296 (value_contents_for_printing, value_contents_for_printing_const)
7297 (set_value_enclosing_type): Update.
7299 2018-04-06 Tom Tromey <tom@tromey.com>
7301 * value.c (range_s): Remove typedef, VEC.
7302 (struct range): Add operator<.
7303 (range_lessthan): Remove.
7304 (ranges_contain): Change type.
7306 (struct value) <unavailable, optimized_out>: Now std::vector.
7307 (value_entirely_available)
7308 (value_entirely_covered_by_range_vector)
7309 (value_entirely_unavailable, value_entirely_optimized_out):
7311 (insert_into_bit_range_vector): Change argument type.
7312 (find_first_range_overlap): Likewise.
7313 (struct ranges_and_idx, value_contents_bits_eq)
7314 (require_not_optimized_out, require_available): Update.
7315 (ranges_copy_adjusted): Change argument types.
7316 (value_optimized_out, value_copy, value_fetch_lazy): Update.
7318 2018-04-06 Tom Tromey <tom@tromey.com>
7320 * value.c (~value): Update.
7321 (struct value) <parent>: Now a value_ref_ptr.
7322 (value_parent, set_value_parent, value_address, value_copy):
7325 2018-04-06 Tom Tromey <tom@tromey.com>
7327 * value.c (struct value): Add constructor, destructor, and member
7329 (allocate_value_lazy, value_decref): Update.
7331 2018-04-06 Tom Tromey <tom@tromey.com>
7333 * value.c (struct value) <released, next>: Remove.
7334 (all_values): Now a std::vector.
7335 (allocate_value_lazy): Update.
7336 (value_next): Remove.
7337 (value_mark, value_free_to_mark, release_value)
7338 (value_release_to_mark): Update.
7340 2018-04-06 Tom Tromey <tom@tromey.com>
7342 * value.h (fetch_subexp_value, value_release_to_mark): Update.
7343 (free_value_chain): Remove.
7344 * value.c (free_value_chain): Remove.
7345 (value_release_to_mark): Return a std::vector.
7346 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7348 (check_condition): Update.
7349 * eval.c (fetch_subexp_value): Change "val_chain" to a
7351 * breakpoint.c (update_watchpoint): Update.
7352 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7354 2018-04-06 Tom Tromey <tom@tromey.com>
7356 * value.h (free_all_values): Remove.
7357 * value.c (free_all_values): Remove.
7359 2018-04-06 Tom Tromey <tom@tromey.com>
7361 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7362 (value_history_chain, value_history_count): Remove.
7363 (value_history): New global.
7364 (record_latest_value, access_value_history, show_values)
7365 (preserve_values): Update.
7367 2018-04-06 Tom Tromey <tom@tromey.com>
7369 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7370 * varobj.c (varobj_set_display_format, varobj_set_value)
7371 (install_default_visualizer, construct_visualizer)
7372 (install_new_value, ~varobj, varobj_get_value_type)
7373 (my_value_of_variable, varobj_editable_p): Update.
7374 * c-varobj.c (c_describe_child, c_value_of_variable)
7375 (cplus_number_of_children, cplus_describe_child): Update.
7376 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7377 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7378 (ada_value_of_variable, ada_value_is_changeable_p): Update.
7380 2018-04-06 Tom Tromey <tom@tromey.com>
7382 * printcmd.c (last_examine_address): Change type to
7384 (do_examine, x_command): Update.
7386 2018-04-06 Tom Tromey <tom@tromey.com>
7388 * value.c (release_value): Update.
7389 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7390 (struct bpstats) <val>: Now a value_ref_ptr.
7391 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7392 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7393 (~watchpoint, print_it_watchpoint, watch_command_1)
7394 (invalidate_bp_value_on_memory_change): Update.
7396 2018-04-06 Tom Tromey <tom@tromey.com>
7398 * varobj.c (varobj_clear_saved_item)
7399 (update_dynamic_varobj_children, install_new_value, ~varobj):
7401 * value.h (value_incref): Move declaration earlier.
7402 (value_decref): Rename from value_free.
7403 (struct value_ref_policy): New.
7404 (value_ref_ptr): New typedef.
7405 (struct value_deleter): Remove.
7406 (gdb_value_up): Remove typedef.
7407 (release_value): Change return type.
7408 (release_value_or_incref): Remove.
7409 * value.c (set_value_parent): Update.
7410 (value_incref): Change return type.
7411 (value_decref): Rename from value_free.
7412 (value_free_to_mark, free_all_values, free_value_chain): Update.
7413 (release_value): Return value_ref_ptr.
7414 (release_value_or_incref): Remove.
7415 (record_latest_value, set_internalvar, clear_internalvar):
7417 * stack.c (info_frame_command): Don't call value_free.
7418 * python/py-value.c (valpy_dealloc, valpy_new)
7419 (value_to_value_object): Update.
7420 * printcmd.c (do_examine): Update.
7421 * opencl-lang.c (lval_func_free_closure): Update.
7422 * mi/mi-main.c (register_changed_p): Don't call value_free.
7423 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7424 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7425 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7427 * guile/scm-value.c (vlscm_free_value_smob)
7428 (vlscm_scm_from_value): Update.
7429 * frame.c (frame_register_unwind, frame_unwind_register_signed)
7430 (frame_unwind_register_unsigned, get_frame_register_bytes)
7431 (put_frame_register_bytes): Don't call value_free.
7432 * findvar.c (address_from_register): Don't call value_free.
7433 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7434 * dwarf2loc.c (entry_data_value_free_closure)
7435 (value_of_dwarf_reg_entry, free_pieced_value_closure)
7436 (dwarf2_evaluate_loc_desc_full): Update.
7437 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7438 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7439 (~watchpoint, watch_command_1)
7440 (invalidate_bp_value_on_memory_change): Update.
7441 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7443 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
7446 * warning.m4: Add -Wno-error=deprecated-register.
7447 * configure: Re-generate.
7449 2018-04-05 Tom Tromey <tom@tromey.com>
7451 * linespec.h: Remove include of "vec.h".
7453 2018-04-05 Tom Tromey <tom@tromey.com>
7455 * linespec.c (typep): Remove typedef.
7456 (find_methods, find_superclass_methods): Take a std::vector.
7457 (find_method): Use std::vector.
7459 2018-04-05 Tom Tromey <tom@tromey.com>
7461 * utils.c (compare_strings): Remove.
7462 * utils.h (compare_strings): Remove.
7463 * objc-lang.h (find_imps): Update.
7464 * objc-lang.c (find_methods): Take a std::vector.
7465 (uniquify_strings, find_imps): Likewise.
7466 * linespec.c (find_methods): Take a std::vector.
7467 (decode_objc): Use std::vector.
7468 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7470 (find_method, find_function_symbols): Use std::vector.
7472 2018-04-05 Tom Tromey <tom@tromey.com>
7474 * completer.c (completion_tracker::completion_tracker): Remove
7476 (completion_tracker::discard_completions): Likewise.
7477 * breakpoint.c (ambiguous_names_p): Remove cast.
7478 * ada-lang.c (_initialize_ada_language): Remove cast.
7479 * utils.h (streq): Update.
7480 (streq_hash): Add new declaration.
7481 * utils.c (streq): Return bool.
7482 (streq_hash): New function.
7484 2018-04-05 Tom Tromey <tom@tromey.com>
7486 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7487 Remove a string copy.
7489 2018-04-05 Tom Tromey <tom@tromey.com>
7491 * linespec.c (filter_results): Use std::vector.
7492 (decode_line_2, decode_line_full): Update.
7494 2018-04-05 Tom Tromey <tom@tromey.com>
7496 * linespec.c (canonical_to_fullform): Return std::string.
7497 (filter_results): Update.
7498 (struct decode_line_2_item): Add constructor.
7499 <fullform, displayform>: Now std::string.
7500 (decode_line_2_compare_items): Now a std::sort comparator.
7501 (decode_line_2): Update.
7503 2018-04-05 Tom Tromey <tom@tromey.com>
7505 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7506 (unexpected_linespec_error): Update.
7507 (linespec_parse_basic, parse_linespec): Update.
7509 2018-04-05 Tom Tromey <tom@tromey.com>
7511 * linespec.c (linespec_parse_basic): Reindent.
7513 2018-04-05 Tom Tromey <tom@tromey.com>
7515 * minsyms.h (iterate_over_minimal_symbols): Update.
7516 * minsyms.c (iterate_over_minimal_symbols): Take a
7518 * linespec.c (struct collect_minsyms): Remove.
7519 (compare_msyms): Now a std::sort comparator.
7520 (add_minsym): Add parameters.
7521 (search_minsyms_for_name): Update. Use std::vector.
7523 2018-04-03 Tom Tromey <tom@tromey.com>
7525 * mipsread.c (read_alphacoff_dynamic_symtab): Use
7528 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7530 * MAINTAINERS (Write After Approval): Add Weimin Pan.
7532 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7535 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
7536 printing static type.
7538 2018-04-01 Tom Tromey <tom@tromey.com>
7540 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
7541 (rs6000_xfer_shared_libraries): Update.
7543 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
7545 * common/gdb_vecs.h (char_ptr): Remove.
7546 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
7548 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7550 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
7552 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
7554 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7556 * tracepoint.h (struct uploaded_tp): Initialize fields.
7557 <actions, step_actions, cmd_strings>: Change type to
7558 std::vector<char *>.
7559 * tracepoint.c (get_uploaded_tp): Allocate with new.
7560 (free_uploaded_tps): Free with delete.
7561 (parse_tracepoint_definition): Adjust to std::vector change.
7562 * breakpoint.c (read_uploaded_action): Likewise.
7563 (create_tracepoint_from_upload): Likewise.
7564 * ctf.c (ctf_write_uploaded_tp): Likewise.
7565 (SET_ARRAY_FIELD): Likewise.
7566 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
7568 2018-03-30 Tom Tromey <tom@tromey.com>
7570 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
7572 (svr4_keep_data_in_core): Update.
7573 (svr4_read_so_list): Update.
7575 2018-03-30 Tom Tromey <tom@tromey.com>
7577 * windows-nat.c (handle_output_debug_string, handle_exception):
7579 * target.h (target_read_string): Update.
7580 * target.c (target_read_string): Change "string" to
7582 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
7584 * solib-frv.c (frv_current_sos): Update.
7585 * solib-dsbt.c (dsbt_current_sos): Update.
7586 * solib-darwin.c (darwin_current_sos): Update.
7587 * linux-thread-db.c (inferior_has_bug): Update.
7588 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
7589 Update. Remove alloca.
7590 * ada-lang.c (ada_main_name): Update.
7592 2018-03-30 Tom Tromey <tom@tromey.com>
7594 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
7595 (struct dwo_file_deleter): New.
7596 (dwo_file_up): New typedef.
7597 (open_and_init_dwo_file): Use dwo_file_up.
7598 (free_dwo_file_cleanup): Remove.
7600 2018-03-30 Tom Tromey <tom@tromey.com>
7602 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
7603 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
7605 2018-03-30 Tom Tromey <tom@tromey.com>
7607 * dwarf2read.c (class free_cached_comp_units): New class.
7608 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
7609 (free_cached_comp_units): Remove function.
7611 2018-03-30 Tom Tromey <tom@tromey.com>
7613 * utils.h (make_cleanup_unpush_target): Remove.
7614 * inf-ptrace.c (struct target_unpusher): New.
7615 (target_unpush_up) New typedef.
7616 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
7618 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
7620 2018-03-27 Tom Tromey <tom@tromey.com>
7622 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
7624 2018-03-27 Pedro Alves <palves@redhat.com>
7625 Tom Tromey <tom@tromey.com>
7627 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
7628 destructor. Now a class.
7629 (gdb_readline_wrapper_cleanup): Remove function.
7630 (gdb_readline_wrapper): Remove cleanups.
7632 2018-03-27 Tom Tromey <tom@tromey.com>
7634 * typeprint.h (struct type_print_options) <local_typedefs,
7635 global_typedefs>: Remove "struct" keyword.
7636 (class typedef_hash_table): New class.
7637 (recursively_update_typedef_hash, add_template_parameters)
7638 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
7639 (find_typedef_in_hash): Don't declare.
7640 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
7641 (typedef_hash_table::recursively_update): Rename from
7642 recursively_update_typedef_hash. Now a member.
7643 (typedef_hash_table::add_template_parameters): Rename from
7644 add_template_parameters. Now a member.
7645 (typedef_hash_table::typedef_hash_table): Now a constructor;
7646 rename from create_typedef_hash.
7647 (typedef_hash_table::~typedef_hash_table): Now a destructor;
7648 rename from free_typedef_hash.
7649 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
7650 (do_free_global_table): Remove.
7651 (typedef_hash_table::typedef_hash_table): New constructor; renamed
7652 from copy_type_recursive.
7653 (create_global_typedef_table): Remove.
7654 (typedef_hash_table::find_global_typedef): Now a member of
7656 (typedef_hash_table::find_typedef): Rename from
7657 find_typedef_in_hash; now a member.
7658 (whatis_exp): Update.
7659 * extension.h (struct ext_lang_type_printers): Add constructor and
7661 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
7663 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
7664 Now a constructor; rename from start_ext_lang_type_printers.
7665 (ext_lang_type_printers): Now a destructor; rename from
7666 free_ext_lang_type_printers.
7667 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
7669 (c_type_print_base_struct_union): Update. Remove cleanups.
7671 2018-03-27 Tom Tromey <tom@tromey.com>
7673 * dwarf-index-write.c: Include <cmath>.
7675 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7677 * NEWS: Add entry describing new "set|show varsize-limit" command.
7678 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
7680 * printcmd.c (_initialize_printcmd): Add "set var" alias of
7683 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
7685 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
7687 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
7688 * dwarf-index-common.c: New file.
7689 * dwarf-index-common.h: New file.
7690 * dwarf-index-write.c: New file.
7691 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
7692 (struct dwarf2_section_info): Move from here.
7693 (dwarf2_section_info_def): Likewise.
7694 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
7695 (offset_type): Likewise.
7696 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
7697 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
7698 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
7699 (byte_swap): Likewise.
7700 (MAYBE_SWAP): Likewise.
7701 (dwarf2_per_cu_ptr): Likewise.
7702 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
7703 (struct tu_stats): Likewise.
7704 (struct dwarf2_per_objfile): Likewise.
7705 (struct dwarf2_per_cu_data): Likewise.
7706 (struct signatured_type): Likewise.
7707 (sig_type_ptr): Likewise.
7708 (DEF_VEC_P (sig_type_ptr)): Likewise.
7709 (INDEX4_SUFFIX): Likewise.
7710 (INDEX5_SUFFIX): Likewise.
7711 (DEBUG_STR_SUFFIX): Likewise.
7712 (dwarf2_read_section): Make non-static.
7713 (mapped_index_string_hash): Move from here.
7714 (dwarf5_djb_hash): Likewise.
7715 (file_write): Likewise.
7716 (class data_buf): Likewise.
7717 (struct symtab_index_entry): Likewise.
7718 (struct mapped_symtab): Likewise.
7719 (find_slot): Likewise.
7720 (hash_expand): Likewise.
7721 (add_index_entry): Likewise.
7722 (uniquify_cu_indices): Likewise.
7723 (class c_str_view): Likewise.
7724 (class c_str_view_hasher): Likewise.
7725 (class vector_hasher): Likewise.
7726 (write_hash_table): Likewise.
7727 (psym_index_map): Likewise.
7728 (struct addrmap_index_data): Likewise.
7729 (add_address_entry): Likewise.
7730 (add_address_entry_worker): Likewise.
7731 (write_address_map): Likewise.
7732 (symbol_kind): Likewise.
7733 (write_psymbols): Likewise.
7734 (struct signatured_type_index_data): Likewise.
7735 (write_one_signatured_type): Likewise.
7736 (recursively_count_psymbols): Likewise.
7737 (recursively_write_psymbols): Likewise.
7738 (class debug_names): Likewise.
7739 (check_dwarf64_offsets): Likewise.
7740 (psyms_seen_size): Likewise.
7741 (write_gdbindex): Likewise.
7742 (write_debug_names): Likewise.
7743 (assert_file_size): Likewise.
7744 (write_psymtabs_to_index): Likewise.
7745 (save_gdb_index_command): Likewise.
7746 (_initialize_dwarf2_read): Don't register the "save gdb-index"
7748 * dwarf2read.h: New file.
7750 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7753 * dwarf2read.c (dwarf2_physname): Do not return the demangled
7754 symbol name if the CU's language stores symbol names in linkage
7756 * language.h (struct language_defn)
7757 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
7758 all instances of this struct.
7760 2018-03-26 Tom Tromey <tom@tromey.com>
7762 * stack.c (backtrace_command_1): Remove verbose code.
7764 2018-03-26 Tom Tromey <tom@tromey.com>
7766 * python/py-framefilter.c (py_print_type): Don't catch
7767 exceptions. Return void.
7768 (py_print_value): Likewise.
7769 (py_print_single_arg): Likewise.
7770 (enumerate_args): Don't catch exceptions.
7771 (py_print_args): Likewise.
7772 (py_print_frame): Likewise.
7773 (gdbpy_apply_frame_filter): Catch exceptions here.
7775 2018-03-26 Tom Tromey <tom@tromey.com>
7777 * stack.c (_initialize_stack): Remove trailing newlines from help
7778 text. Add "Usage" line to "backtrace" help.
7780 2018-03-26 Tom Tromey <tom@tromey.com>
7783 * python/py-framefilter.c (py_print_args): Call wrap_hint.
7785 2018-03-26 Tom Tromey <tom@tromey.com>
7787 * python/py-framefilter.c (py_print_single_arg): Return
7788 EXT_LANG_BT_ERROR from catch.
7790 2018-03-26 Tom Tromey <tom@tromey.com>
7793 * stack.c (backtrace_command_1): Move some code into no-filters
7796 2018-03-26 Tom Tromey <tom@tromey.com>
7798 * python/py-framefilter.c (throw_quit_or_print_exception): New
7800 (gdbpy_apply_frame_filter): Use it.
7802 2018-03-26 Tom Tromey <tom@tromey.com>
7805 * python/py-framefilter.c (py_print_type, py_print_value)
7806 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
7809 2018-03-26 Tom Tromey <tom@tromey.com>
7811 * python/py-framefilter.c (enumerate_args): Use
7812 gdb::unique_xmalloc_ptr.
7814 2018-03-26 Tom Tromey <tom@tromey.com>
7816 * python/py-framefilter.c (py_print_frame): Return
7818 (gdbpy_apply_frame_filter): Update comment.
7819 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
7821 <EXT_LANG_BT_NO_FILTERS>: Change value.
7823 2018-03-26 Tom Tromey <tom@tromey.com>
7826 * stack.c (backtrace_command): Parse "hide" argument.
7827 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
7828 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
7831 2018-03-26 Tom Tromey <tom@tromey.com>
7833 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
7835 (backtrace_command): Remove "fulltrace", add "flags".
7837 2018-03-26 Tom Tromey <tom@tromey.com>
7839 * stack.c (backtrace_command): Rewrite command line parsing.
7841 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7843 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
7845 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7847 * filename-seen-cache.h: Add include guard.
7849 2018-03-26 Keith Seitz <keiths@redhat.com>
7851 * symfile.c (place_section): Remove "struct" from section_addr_info
7853 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
7854 "struct" keyword from section_addr_info.
7856 2018-03-26 Alan Hayward <alan.hayward@arm.com>
7858 * regformats/regdef.h (reg): Add constructors.
7860 2018-03-25 Pedro Alves <palves@redhat.com>
7862 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
7863 if then/else bodies in var_func_name extraction.
7865 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
7867 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
7868 lookup_minimal_symbol() to find symbol entry.
7869 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
7871 2018-03-23 Keith Seitz <keiths@redhat.com>
7874 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
7875 nested type definitions for C++, too.
7877 2018-03-23 Tom Tromey <tom@tromey.com>
7879 * machoread.c (struct oso_el): Add a constructor. Don't define as
7881 (macho_register_oso): Remove.
7882 (macho_symtab_read): Take a std::vector.
7883 (oso_el_compare_name): Now a std::sort comparator.
7884 (macho_symfile_read_all_oso): Take a std::vector.
7885 (macho_symfile_read): Use std::vector. Remove cleanups.
7887 2018-03-22 Tom Tromey <tom@tromey.com>
7889 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
7890 (record_full_goto_bookmark): Use std::string.
7892 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7895 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
7898 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7900 * rs6000-tdep.c (store_insn_p): New function.
7901 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
7902 and cr_reg to their unshifted values. Use store_insn_p to
7903 match LR saves using either R1 or fdata->alloca_reg. Use
7904 store_insn_p to match CR saves. Set alloca_reg_offset
7905 when alloca_reg and framep are set. Remove lr_reg shift
7906 when assigning to fdata->lr_register.
7908 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
7910 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
7911 command line args instead of emitting a warning.
7913 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7915 * tracepoint.h (struct static_tracepoint_marker): Initialize
7916 fields, define default constructor, move constructor and move
7917 assignment, disable the rest.
7918 <str_id, extra>: Make std::string.
7919 (release_static_tracepoint_marker): Remove.
7920 (free_current_marker): Remove.
7921 * tracepoint.c (free_current_marker): Remove.
7922 (parse_static_tracepoint_marker_definition): Adjust to
7923 std::string, use new hex2str overload.
7924 (release_static_tracepoint_marker): Remove.
7925 (print_one_static_tracepoint_marker): Get marker by reference
7926 and adjust to std::string.
7927 (info_static_tracepoint_markers_command): Adjust to std::vector
7929 * target.h (static_tracepoint_marker_p): Remove typedef.
7930 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
7931 (struct target_ops) <to_static_tracepoint_marker_at>: Return
7933 <to_static_tracepoint_markers_by_strid>: Return std::vector.
7935 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
7936 (target_debug_print_std_vector_static_tracepoint_marker): New.
7937 (target_debug_print_struct_static_tracepoint_marker_p): Rename
7939 (target_debug_print_static_tracepoint_marker_p): ... this.
7940 * target-delegates.c: Re-generate.
7941 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
7943 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
7944 (decode_static_tracepoint_spec): Adjust to std::vector.
7945 (tracepoint_print_one_detail): Adjust to std::string.
7946 (strace_marker_decode_location): Adjust to std::string.
7947 (update_static_tracepoint): Adjust to std::string, remove call
7948 to release_static_tracepoint_marker.
7949 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
7950 Adjust to std::vector.
7951 * remote.c (remote_static_tracepoint_marker_at): Return bool.
7952 (remote_static_tracepoint_markers_by_strid): Adjust to
7954 * common/rsp-low.h (hex2str): New overload with explicit count
7956 * common/rsp-low.c (hex2str): New overload with explicit count
7958 * unittests/rsp-low-selftests.c (test_hex2str): New function.
7959 (_initialize_rsp_low_selftests): Add test_hex2str test.
7960 * unittests/tracepoint-selftests.c
7961 (test_parse_static_tracepoint_marker_definition): Adjust to
7964 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7966 * tracepoint.c (parse_static_tracepoint_marker_definition):
7967 Consider case where the definition is followed by more
7969 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7970 tracepoint-selftests.c.
7971 * unittests/tracepoint-selftests.c: New.
7973 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7975 * MAINTAINERS (Write After Approval): Add Pedro Franco de
7978 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7980 * symtab.c (find_pc_sect_line): fixed indentation.
7982 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7984 * symtab.c (find_pc_sect_line): now uses binary search.
7986 2018-03-19 Tom Tromey <tom@tromey.com>
7988 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
7991 2018-03-19 Pedro Alves <palves@redhat.com>
7992 Tom Tromey <tom@tromey.com>
7994 * unittests/observable-selftests.c: New file.
7995 * common/observable.h: New file.
7996 * observable.h: New file.
7997 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
7998 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
7999 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8000 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8001 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8002 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8003 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8004 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8005 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8006 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8007 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8008 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8009 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8010 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8011 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8012 tui/tui-interp.c, valops.c: Update all users.
8013 * tui/tui-hooks.c (tui_bp_created_observer)
8014 (tui_bp_deleted_observer, tui_bp_modified_observer)
8015 (tui_inferior_exit_observer, tui_before_prompt_observer)
8016 (tui_normal_stop_observer, tui_register_changed_observer):
8018 (tui_observers_token): New global.
8019 (attach_or_detach, tui_attach_detach_observers): New functions.
8020 (tui_install_hooks, tui_remove_hooks): Use
8021 tui_attach_detach_observers.
8022 * record-btrace.c (record_btrace_thread_observer): Remove.
8023 (record_btrace_thread_observer_token): New global.
8024 * observer.sh: Remove.
8025 * observer.c: Rename to observable.c.
8026 * observable.c (namespace gdb_observers): Define new objects.
8027 (observer_debug): Move into gdb_observers namespace.
8028 (struct observer, struct observer_list, xalloc_observer_list_node)
8029 (xfree_observer_list_node, generic_observer_attach)
8030 (generic_observer_detach, generic_observer_notify): Remove.
8031 (_initialize_observer): Update.
8032 Don't include observer.inc.
8033 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8034 (clean mostlyclean): Likewise.
8035 (observer.h, observer.inc): Remove targets.
8036 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8037 (COMMON_SFILES): Use observable.c, not observer.c.
8038 * .gitignore: Remove observer.h.
8040 2018-03-18 Tom Tromey <tom@tromey.com>
8042 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8044 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8046 2018-03-17 Tom Tromey <tom@tromey.com>
8048 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8050 2018-03-17 Tom Tromey <tom@tromey.com>
8052 * target.c (class scoped_target_fd): New.
8053 (target_fileio_close_cleanup): Remove.
8054 (target_fileio_read_alloc_1): Use scoped_target_fd.
8056 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8058 * silent-rules.mk: New.
8059 * Makefile.in: Include silent-rules.mk
8060 (srcdir, VPATH, top_srcdir): Move up.
8061 (COMPILE): Add ECHO_CXX.
8062 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8063 (init.c): Add ECHO_INIT_C.
8064 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8065 (version.c): Add ECHO_GEN.
8066 (printcmd.o): Add ECHO_CXX.
8067 (target-float.o): Add ECHO_CXX.
8068 (ada-exp.o): Add ECHO_CXX.
8069 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8070 (insight$(EXEEXT)): Add ECHO_CXXLD.
8071 * gnulib/configure.ac: Add AM_SILENT_RULES.
8072 * gnulib/aclocal.m4: Re-generate.
8073 * gnulib/configure: Re-generate.
8074 * gnulib/import/Makefile.in: Re-generate.
8076 2018-03-16 Tom Tromey <tom@tromey.com>
8078 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8079 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8080 * utils.c (do_free_section_addr_info)
8081 (make_cleanup_free_section_addr_info): Remove.
8082 * symfile.h (struct other_sections): Add constructor.
8083 (struct section_addr_info): Remove.
8084 (section_addr_info): New typedef.
8085 (struct sym_fns) <sym_offsets>: Change type of parameter.
8086 (build_section_addr_info_from_objfile)
8087 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8088 (default_symfile_offsets, symbol_file_add)
8089 (symbol_file_add_from_bfd)
8090 (build_section_addr_info_from_section_table): Update.
8091 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8092 * symfile.c (alloc_section_addr_info): Remove.
8093 (build_section_addr_info_from_section_table): Change return type.
8095 (build_section_addr_info_from_bfd)
8096 (build_section_addr_info_from_objfile): Likewise.
8097 (free_section_addr_info): Remove.
8098 (relative_addr_info_to_section_offsets): Change type of "addrs".
8099 (addrs_section_compar): Now a std::sort comparator.
8100 (addrs_section_sort): Change return type.
8101 (addr_info_make_relative): Change type of "addrs". Update.
8102 (default_symfile_offsets, syms_from_objfile_1)
8103 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8104 (symbol_file_add_separate): Update.
8105 (symbol_file_add): Change type of "addrs". Update.
8106 (add_symbol_file_command): Update. Remove cleanups.
8107 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8109 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8110 * solib.c (solib_read_symbols): Update.
8111 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8112 * machoread.c (macho_symfile_offsets): Update.
8113 * jit.c (jit_bfd_try_read_symtab): Update.
8115 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8117 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8118 unittests/utils-selftests.c.
8119 * unittests/utils-selftests.c: New file.
8121 2018-03-14 Tom Tromey <tom@tromey.com>
8124 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8127 2018-03-14 Tom Tromey <tom@tromey.com>
8130 * printcmd.c (printf_pointer): Allow "-" in format.
8132 2018-03-14 Tom Tromey <tom@tromey.com>
8134 * printcmd.c (_initialize_printcmd): Add usage to printf.
8136 2018-03-14 Yao Qi <qiyao@sourceware.org>
8138 * MAINTAINERS: Update my email address.
8140 2018-03-13 Tom Tromey <tom@tromey.com>
8142 * machoread.c (macho_check_dsym): Change filenamep to a
8144 (macho_symfile_read): Update.
8145 * symfile.c (load_command): Use std::string.
8147 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
8149 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8150 to error message string.
8151 (riscv_register_name): Use xsnprintf instead of sprintf.
8152 (riscv_insn::fetch_instruction): Use gdb_assert instead of
8154 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8156 (riscv_push_dummy_call): Likewise.
8158 2018-03-12 Tom Tromey <tom@tromey.com>
8160 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8161 Use gdb::byte_vector.
8162 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8164 2018-03-12 Yao Qi <yao.qi@linaro.org>
8166 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8167 parameter type to readable_regcache.
8168 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8171 2018-03-11 Tom Tromey <tom@tromey.com>
8173 * dwarf2read.c (struct nextfield): Add initializers.
8174 (struct nextfnfield): Remove.
8175 (struct fnfieldlist): Add initializers. Remove "length" and
8176 "head", use std::vector.
8177 (struct decl_field_list): Remove.
8178 (struct field_info): Add initializers.
8179 <fields, baseclasses>: Now std::vector.
8180 <nbaseclasses, nfnfields, typedef_field_list_count,
8181 nested_types_list_count>: Remove.
8182 (dwarf2_add_field, dwarf2_add_type_defn)
8183 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8184 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8185 (process_structure_scope): Update.
8187 2018-03-11 Tom Tromey <tom@tromey.com>
8189 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8190 for use by std::sort.
8191 (build_type_psymtabs_1): Use std::vector.
8193 2018-03-09 Eli Zaretskii <eliz@gnu.org>
8195 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8196 and LIBMPFR in the printed configuration.
8198 2018-03-08 Tom Tromey <tom@tromey.com>
8200 * source.c (get_filename_and_charpos): Use scoped_fd.
8201 * nto-procfs.c (procfs_open_1): Use scoped_fd.
8202 (procfs_pidlist): Likewise.
8203 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8204 (iterate_over_mappings): Likewise.
8206 2018-03-08 Tom Tromey <tom@tromey.com>
8208 * infcall.c (struct call_return_meta_info)
8209 <stack_temporaries_enabled>: Remove.
8210 (get_call_return_value, call_function_by_hand_dummy): Update.
8211 * thread.c (disable_thread_stack_temporaries): Remove.
8212 (enable_thread_stack_temporaries): Remove.
8213 (thread_stack_temporaries_enabled_p): Return bool.
8214 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8215 (get_last_thread_stack_temporary): Update.
8216 * eval.c (evaluate_subexp): Update.
8217 * gdbthread.h (class enable_thread_stack_temporaries): Now a
8218 class, not a function.
8219 (value_ptr, value_vec): Remove typedefs.
8220 (class thread_info) <stack_temporaries_enabled>: Now bool.
8221 <stack_temporaries>: Now a std::vector.
8222 (thread_stack_temporaries_enabled_p)
8223 (value_in_thread_stack_temporaries): Return bool.
8225 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
8227 * remote.c (putpkt_binary): Fix omitted bytes reporting.
8228 (getpkt_or_notif_sane_1): Likewise.
8230 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8232 * build-id.c (build_id_to_debug_bfd): Use std::string.
8234 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8236 * build-id.c (find_separate_debug_file_by_buildid): Return
8238 * build-id.h (find_separate_debug_file_by_buildid): Return
8240 * coffread.c (coff_symfile_read): Adjust to std::string.
8241 * elfread.c (elf_symfile_read): Adjust to std::string.
8242 * symfile.c (separate_debug_file_exists): Change parameter to
8244 (find_separate_debug_file): Return std::string.
8245 (find_separate_debug_file_by_debuglink): Return std::string.
8246 * symfile.h (find_separate_debug_file_by_debuglink): Return
8249 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8251 * common/xml-utils.c (xml_escape_text): Move code to...
8252 (xml_escape_text_append): ... this new function.
8253 * common/xml-utils.h (xml_escape_text_append): New declaration.
8254 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8256 (_initialize_xml_utils): register test_xml_escape_text_append as
8259 2018-03-07 Alan Hayward <alan.hayward@arm.com>
8261 * defs.h: Remove MAX_REGISTER_SIZE.
8262 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8264 * python/py-unwind.c (pyuw_sniffer): Likewise.
8266 2018-03-07 Tom Tromey <tom@tromey.com>
8268 * linux-tdep.c (linux_info_proc): Update.
8269 * target.h (struct target_ops) <to_fileio_readlink>: Return
8271 (target_fileio_readlink): Return optional<string>.
8272 * remote.c (remote_hostio_readlink): Return optional<string>.
8273 * inf-child.c (inf_child_fileio_readlink): Return
8275 * target.c (target_fileio_readlink): Return optional<string>.
8277 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
8279 * regcache.c (cooked_read_test): Add riscv to the list of
8280 architectures that have a save_reggroup.
8282 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
8284 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8285 value is not a dynamic class object.
8287 2018-03-06 Tom Tromey <tom@tromey.com>
8289 * rust-exp.y: Formatting fixes.
8291 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8293 * riscv-tdep.c (riscv_register_name): Remove target description
8295 (riscv_gdbarch_init): Remove target description check.
8297 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8299 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8301 * riscv-tdep.h: Likewise.
8303 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8305 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8306 (riscv_pseudo_register_write): Delete.
8307 (riscv_gdbarch_init): Remove all use of pseudo registers.
8309 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8311 * record-btrace.c (btrace_print_lines): Replace cleanup
8312 parameter with RAII equivalents.
8313 (btrace_insn_history): Replace cleanup with RAII equivalents.
8314 * ui-out.h (make_cleanup_ui_out_list_begin_end,
8315 make_cleanup_ui_out_tuple_begin_end): Remove.
8316 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8317 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8318 make_cleanup_ui_out_list_begin_end): Remove.
8320 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8322 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8323 parameter types to std::vector. Use bool.
8324 (record_btrace_wait): Replace VEC(tp_t) with
8325 std::vector<thread_info *>.
8326 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8328 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8330 * record-btrace.c (record_btrace_disable_callback): Remove.
8331 (struct scoped_btrace_disable): New.
8332 (record_btrace_open): Use scoped_btrace_disable.
8334 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8336 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8337 reading values from registers.
8339 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8341 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8344 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8346 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8347 change parameter type. Use GDB's print functions, and use
8348 core_addr_to_string where appropriate.
8349 (riscv_push_dummy_call): Use core_addr_to_string where
8350 appropriate, update call to riscv_print_arg_location, and reindent
8352 (riscv_return_value): Update call to riscv_print_arg_location.
8354 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8355 Tim Newsome <tim@sifive.com>
8356 Albert Ou <a0u@eecs.berkeley.edu>
8357 Darius Rad <darius@bluespec.com>
8359 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8360 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8361 (ALLDEPFILES): Add riscv-tdep.c
8362 * configure.tgt: Add riscv support.
8363 * riscv-tdep.c: New file.
8364 * riscv-tdep.h: New file.
8365 * NEWS: Mention new target.
8366 * MAINTAINERS: Add entry for riscv.
8368 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8370 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8371 fields within aggregates.
8373 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
8375 * record-btrace.c (btrace_print_lines): Change type of flags to
8376 gdb_disassembly_flags.
8378 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8380 * fbsd-nat.c: Include "inf-ptrace.h".
8381 (USE_SIGTRAP_SIGINFO): Conditionally define.
8382 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8383 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8384 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8386 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8388 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8390 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8391 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8392 "supports_stopped_by_hw_breakpoint" target methods.
8394 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8396 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8397 * fbsd-nat.c (debug_fbsd_nat): New variable.
8398 (show_fbsd_nat_debug): New function.
8399 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8400 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8402 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8404 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8405 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8407 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8408 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8411 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8413 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8414 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8416 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8418 * charset.c (struct charset_vector): New.
8419 (charsets): Change type to charset_vector.
8420 (find_charset_names): Adjust.
8422 (_initialize_charset): Adjust.
8424 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8426 * progspace.h (struct program_space) <deleted_solibs>: Change
8427 type to std::vector<std::string>.
8428 * progspace.c (clear_program_space_solib_cache): Adjust.
8429 * breakpoint.c (print_solib_event): Adjust.
8430 (check_status_catch_solib): Adjust.
8431 * solib.c (update_solib_list): Adjust.
8432 * ui-out.h (class ui_out) <field_string>: New overload.
8433 * ui-out.c (ui_out::field_string): New overload.
8435 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8437 * progspace.h (struct program_space): Add constructor and
8438 destructor, initialize fields.
8439 (add_program_space): Remove.
8440 * progspace.c (add_program_space): Rename to...
8441 (program_space::program_space): ... this.
8442 (release_program_space): Rename to...
8443 (program_space::~program_space): ... this.
8444 (delete_program_space): Use delete to delete program_space.
8445 (initialize_progspace): Use new to allocate program_space.
8446 * inferior.c (add_inferior_with_spaces): Likewise.
8447 (clone_inferior_command): Likewise.
8448 * infrun.c (follow_fork_inferior): Likewise.
8449 (handle_vfork_child_exec_or_exit): Likewise.
8451 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8453 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8454 (delim_string_to_char_ptr_vec): Return std::vector of
8455 gdb::unique_xmalloc_ptr.
8456 (dirnames_to_char_ptr_vec_append): Take std::vector of
8457 gdb::unique_xmalloc_ptr.
8458 (dirnames_to_char_ptr_vec): Return std::vector of
8459 gdb::unique_xmalloc_ptr.
8460 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8461 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8462 (delim_string_to_char_ptr_vec): Return an std::vector of
8463 gdb::unique_xmalloc_ptr, adjust the code.
8464 (dirnames_to_char_ptr_vec_append): Take an std::vector of
8465 gdb::unique_xmalloc_ptr, adjust the code.
8466 (dirnames_to_char_ptr_vec): Return an std::vector of
8467 gdb::unique_xmalloc_ptr, adjust the code.
8468 * auto-load.c (auto_load_safe_path_vec): Change type to
8469 std::vector of gdb::unique_xmalloc_ptr.
8470 (auto_load_expand_dir_vars): Return an std::vector of
8471 gdb::unique_xmalloc_ptr, adjust the code.
8472 (auto_load_safe_path_vec_update): Adjust.
8473 (filename_is_in_auto_load_safe_path_vec): Adjust.
8474 (auto_load_objfile_script_1): Adjust.
8475 * build-id.c (build_id_to_debug_bfd): Adjust.
8476 * linux-thread-db.c (thread_db_load_search): Adjust.
8477 * source.c (add_path): Adjust.
8479 * symfile.c (find_separate_debug_file): Adjust.
8480 * utils.c (do_free_char_ptr_vec): Remove.
8481 (make_cleanup_free_char_ptr_vec): Remove.
8483 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
8486 * common/pathstuff.c: Conditionally include "<windows.h>".
8488 2018-03-01 Georg Sauthoff <mail@georg.so>
8491 * gcore.in: Quote variables and switch interpreter to bash.
8493 2018-03-01 Tom Tromey <tom@tromey.com>
8495 * dwarf2read.c (alloc_discriminant_info): Fix default_index
8496 assertion. Add assertion for discriminant_index.
8497 (quirk_rust_enum): Use correct base type name in univariant case.
8499 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
8501 * record.c (get_call_history_modifiers): Return a
8503 (cmd_record_call_history): Adjust.
8504 * record-btrace.c (record_btrace_call_history): Adjust.
8505 (record_btrace_call_history_range): Adjust.
8506 (record_btrace_call_history_from): Adjust.
8507 * target-debug.h (target_debug_print_record_print_flags): New.
8508 * target-delegates.c: Re-generate.
8509 * target.c (target_call_history): Change flags type.
8510 (target_call_history_from): Likewise.
8511 (target_call_history_range): Likewise.
8512 * target.h (struct target_ops) <target_call_history>: Likewise.
8513 (target_call_history_from): Likewise.
8514 (target_call_history_range): Likewise.
8516 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8517 Simon Marchi <simon.marchi@polymtl.ca>
8519 * common/common-utils.c: Include "sys/stat.h".
8520 (is_regular_file): Move here from "source.c"; change return
8522 * common/common-utils.h (is_regular_file): New prototype.
8523 * common/pathstuff.c (contains_dir_separator): New function.
8524 * common/pathstuff.h (contains_dir_separator): New prototype.
8525 * source.c: Don't include "sys/stat.h".
8526 (is_regular_file): Move to "common/common-utils.c".
8528 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8530 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
8531 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
8532 * auto-load.c: Include "common/pathstuff.h".
8533 * common/common-def.h (current_directory): Move here.
8534 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
8536 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
8538 * common/pathstuff.c: New file.
8539 * common/pathstuff.h: New file.
8540 * compile/compile.c: Include "common/pathstuff.h".
8541 * defs.h (current_directory): Move to "common/common-defs.h".
8542 * dwarf2read.c: Include "common/pathstuff.h".
8544 * guile/scm-safe-call.c: Likewise.
8545 * linux-thread-db.c: Likewise.
8547 * nto-tdep.c: Likewise.
8548 * objfiles.c: Likewise.
8549 * source.c: Likewise.
8550 * symtab.c: Likewise.
8551 * utils.c: Include "common/pathstuff.h".
8552 (gdb_realpath): Move to "common/pathstuff.c".
8553 (gdb_realpath_keepfile): Likewise.
8554 (gdb_abspath): Likewise.
8555 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
8556 (gdb_realpath_keepfile): Likewise.
8557 (gdb_abspath): Likewise.
8559 2018-02-28 John Baldwin <jhb@FreeBSD.org>
8561 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
8562 wildcard process pid for super_resume for kernels with a
8565 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
8567 * compile/compile.c (get_args): Add additional comments
8568 explaining function.
8570 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
8571 Tom Tromey <tom@tromey.com>
8573 * target.h (memory_write_request_s): Remove typedef. Don't define
8575 (target_write_memory_blocks): Change argument to std::vector.
8576 (struct memory_write_request): Add constructor.
8577 * target-memory.c (compare_block_starting_address): Return bool.
8578 Change argument types.
8579 (claim_memory): Change arguments to use std::vector.
8580 (split_regular_and_flash_blocks, blocks_to_erase)
8581 (compute_garbled_blocks): Likewise.
8582 (cleanup_request_data, cleanup_write_requests_vector): Remove.
8583 (target_write_memory_blocks): Change argument to std::vector.
8584 * symfile.c (struct load_section_data): Add constructor and
8585 destructor. Use std::vector for "requests".
8586 (struct load_progress_data): Add initializers.
8587 (load_section_callback): Update. Use "new".
8588 (clear_memory_write_data): Remove.
8589 (generic_load): Update.
8591 2018-02-27 Alan Hayward <alan.hayward@arm.com>
8593 * arch/aarch64.h: Use common/tdesc.h.
8595 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8597 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
8598 architecture with a 64-bit ABI.
8600 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8602 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
8603 ahead of target description loading.
8605 2018-02-26 Tom Tromey <tom@tromey.com>
8607 * stack.c (backtrace_command_1): Update.
8608 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
8610 * python/py-framefilter.c (py_print_frame)
8611 (gdbpy_apply_frame_filter): Change type of "flags".
8612 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
8614 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
8615 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
8616 * extension.h (enum frame_filter_flag): Rename from
8618 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
8619 (apply_ext_lang_frame_filter): Change type of "flags".
8620 * extension.c (apply_ext_lang_frame_filter): Change type of
8622 * extension-priv.h (struct extension_language_ops)
8623 <apply_frame_filter>: Change type of "flags".
8625 2018-02-26 Tom Tromey <tom@tromey.com>
8628 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
8629 off-by-one in py_end computation.
8630 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
8632 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
8635 2018-02-26 Tom Tromey <tom@tromey.com>
8637 * dwarf2read.c (struct variant_field): New.
8638 (struct nextfield) <variant>: New field.
8639 (dwarf2_add_field): Handle DW_TAG_variant_part.
8640 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
8641 discriminated union.
8642 (read_structure_type): Handle DW_TAG_variant_part.
8643 (handle_struct_member_die): New function, extracted from
8644 process_structure_scope. Handle DW_TAG_variant.
8645 (process_structure_scope): Handle discriminated unions. Call
8646 handle_struct_member_die.
8648 2018-02-26 Tom Tromey <tom@tromey.com>
8650 * rust-lang.h (rust_last_path_segment): Declare.
8651 * rust-lang.c (rust_last_path_segment): Now public. Change
8653 (struct disr_info): Remove.
8654 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
8655 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
8656 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
8657 (rust_enum_p, rust_enum_variant): New function.
8658 (rust_underscore_fields): Remove "offset" parameter.
8659 (rust_print_enum): New function.
8660 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
8661 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
8662 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
8664 (rust_internal_print_type): New function, from rust_print_type.
8666 (rust_print_type): Call rust_internal_print_type.
8667 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
8668 Update enum handling.
8669 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
8670 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
8671 (rust_union_quirks): New functions.
8672 (process_full_comp_unit, process_full_type_unit): Call
8674 (process_structure_scope): Update rust_unions if necessary.
8676 2018-02-26 Tom Tromey <tom@tromey.com>
8678 * value.h (value_union_variant): Declare.
8679 * valops.c (value_union_variant): New function.
8680 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
8681 (struct discriminant_info): New.
8682 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
8684 (struct main_type) <flag_discriminated_union>: New field.
8686 2018-02-26 Tom Tromey <tom@tromey.com>
8688 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8689 unittests/unpack-selftests.c.
8690 * unittests/unpack-selftests.c: New file.
8691 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
8693 2018-02-26 Yao Qi <yao.qi@linaro.org>
8695 * dwarf2read.c (struct partial_die_info) <read>: New method.
8696 (read_partial_die): Remove the declaration.
8697 (load_partial_dies): Update.
8698 (partial_die_info::partial_die_info):
8699 (read_partial_die): Change it to partial_die_info::read.
8701 2018-02-26 Yao Qi <yao.qi@linaro.org>
8703 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
8704 (fixup_partial_die): Remove declaration.
8705 (scan_partial_symbols): Update.
8706 (partial_die_parent_scope): Likewise.
8707 (partial_die_full_name): Likewise.
8708 (fixup_partial_die): Change it to partial_die_info::fixup.
8710 2018-02-26 Yao Qi <yao.qi@linaro.org>
8712 * dwarf2read.c (read_partial_die): Update the declaration.
8713 (load_partial_dies): Caller update.
8714 (read_partial_die): Remove one argument abbrev_len.
8716 2018-02-26 Yao Qi <yao.qi@linaro.org>
8718 * dwarf2read.c (struct partial_die_info): Add ctor, delete
8719 assignment operator.
8720 (load_partial_dies): Use ctor and copy ctor.
8721 (read_partial_die): Update.
8722 (dwarf2_cu::find_partial_die): Use ctor.
8724 2018-02-26 Yao Qi <yao.qi@linaro.org>
8726 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
8727 (find_partial_die_in_comp_unit): Change it to
8728 dwarf2_cu::find_partial_die.
8729 (find_partial_die): Update.
8731 2018-02-26 Yao Qi <yao.qi@linaro.org>
8733 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
8736 2018-02-26 Yao Qi <yao.qi@linaro.org>
8738 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
8740 2018-02-26 Alan Hayward <alan.hayward@arm.com>
8742 * arch/amd64.h: Use common/tdesc.h.
8743 * arch/i386.c: Likewise.
8744 * arch/i386.h: Likewise.
8745 * arch/tic6x.c: Likewise.
8746 * arch/tdesc.h: Move file from here...
8747 * common/tdesc.h: ...to here.
8748 * features/aarch64-core.c: Regenerate.
8749 * features/aarch64-fpu.c: Regenerate.
8750 * features/i386/32bit-avx.c: Regenerate.
8751 * features/i386/32bit-avx512.c: Regenerate.
8752 * features/i386/32bit-core.c: Regenerate.
8753 * features/i386/32bit-linux.c: Regenerate.
8754 * features/i386/32bit-mpx.c: Regenerate.
8755 * features/i386/32bit-pkeys.c: Regenerate.
8756 * features/i386/32bit-sse.c: Regenerate.
8757 * features/i386/64bit-avx.c: Regenerate.
8758 * features/i386/64bit-avx512.c: Regenerate.
8759 * features/i386/64bit-core.c: Regenerate.
8760 * features/i386/64bit-linux.c: Regenerate.
8761 * features/i386/64bit-mpx.c: Regenerate.
8762 * features/i386/64bit-pkeys.c: Regenerate.
8763 * features/i386/64bit-segments.c: Regenerate.
8764 * features/i386/64bit-sse.c: Regenerate.
8765 * features/i386/x32-core.c: Regenerate.
8766 * features/tic6x-c6xp.c: Regenerate.
8767 * features/tic6x-core.c: Regenerate.
8768 * features/tic6x-gp.c: Regenerate.
8769 * target-descriptions.c: Use common/tdesc.h.
8770 * target-descriptions.h: Likewise.
8772 2018-02-24 Tom Tromey <tom@tromey.com>
8774 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
8775 (try_thread_db_load_from_dir, thread_db_load_search): Use
8777 (info_auto_load_libthread_db_compare): Return bool. Change
8779 (info_auto_load_libthread_db): Use std::vector, std::string.
8782 2018-02-24 Tom Tromey <tom@tromey.com>
8784 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
8786 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
8788 * gdbarch.c: Rebuild.
8789 * gdbarch.h: Rebuild.
8790 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
8791 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
8792 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
8795 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
8797 * gdbtypes.h (sect_offset): Change type to uint64_t.
8798 (sect_offset_str): New function.
8799 * dwarf2read.c (create_addrmap_from_aranges): Use
8801 (error_check_comp_unit_head): Likewise.
8802 (create_debug_type_hash_table): Likewise.
8803 (read_cutu_die_from_dwo): Likewise.
8804 (init_cutu_and_read_dies): Likewise.
8805 (init_cutu_and_read_dies_no_follow): Likewise.
8806 (process_psymtab_comp_unit_reader): Likewise.
8807 (partial_die_parent_scope): Likewise.
8808 (peek_die_abbrev): Likewise.
8809 (process_queue): Likewise.
8810 (dwarf2_physname): Likewise.
8811 (read_namespace_alias): Likewise.
8812 (read_import_statement): Likewise.
8813 (create_dwo_cu_reader): Likewise.
8814 (create_cus_hash_table): Likewise.
8815 (lookup_dwo_cutu): Likewise.
8816 (inherit_abstract_dies): Likewise.
8817 (read_func_scope): Likewise.
8818 (read_call_site_scope): Likewise.
8819 (dwarf2_add_member_fn): Likewise.
8820 (read_common_block): Likewise.
8821 (read_module_type): Likewise.
8822 (read_typedef): Likewise.
8823 (read_subrange_type): Likewise.
8824 (load_partial_dies): Likewise.
8825 (read_partial_die): Likewise.
8826 (find_partial_die): Likewise.
8827 (read_str_index): Likewise.
8828 (dwarf2_string_attr): Likewise.
8829 (build_error_marker_type): Likewise.
8830 (lookup_die_type): Likewise.
8831 (dump_die_shallow): Likewise.
8832 (follow_die_ref): Likewise.
8833 (dwarf2_fetch_die_loc_sect_off): Likewise.
8834 (dwarf2_fetch_constant_bytes): Likewise.
8835 (follow_die_sig): Likewise.
8836 (get_signatured_type): Likewise.
8837 (get_DW_AT_signature_type): Likewise.
8838 (dwarf2_find_containing_comp_unit): Likewise.
8839 (set_die_type): Likewise.
8841 2018-02-21 John Baldwin <jhb@FreeBSD.org>
8843 * arch/aarch64.c: Include "common-defs.h".
8844 * arch/amd64.c: Likewise.
8845 * arch/i386.c: Likewise.
8847 2018-02-21 Tom Tromey <tom@tromey.com>
8849 * value.h: (extract_field_op): Update.
8850 * eval.c (extract_field_op): Return a const char *.
8851 * expression.h (parse_expression_for_completion): Update.
8852 * completer.c (complete_expression): Update.
8853 (add_struct_fields): Make fieldname const.
8854 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
8855 (mark_completion_tag, parse_exp_in_context_1): Update.
8856 (parse_expression_for_completion): Change "name" to
8857 unique_xmalloc_ptr*.
8859 2018-02-21 Tom Tromey <tom@tromey.com>
8861 * infcall.c (call_function_by_hand_dummy): Use std::vector.
8863 2018-02-21 Yao Qi <yao.qi@linaro.org>
8865 * avr-tdep.c (avr_read_pc): Change parameter type to
8867 * gdbarch.sh (read_pc): Likewise.
8868 * gdbarch.c: Re-generated.
8869 * gdbarch.h: Re-generated.
8870 * hppa-tdep.c (hppa_read_pc): Change parameter type to
8872 * ia64-tdep.c (ia64_read_pc): Likewise.
8873 * mips-tdep.c (mips_read_pc): Likewise.
8874 * spu-tdep.c (spu_read_pc): Likewise.
8876 2018-02-21 Yao Qi <yao.qi@linaro.org>
8878 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
8879 * regcache-dump.c: New file.
8880 * regcache.c: Move register_dump to regcache-dump.c.
8881 (maintenance_print_registers): Likewise.
8882 (maintenance_print_raw_registers): Likewise.
8883 (maintenance_print_cooked_registers): Likewise.
8884 (maintenance_print_register_groups): Likewise.
8885 (maintenance_print_remote_registers): Likewise.
8886 (_initialize_regcache): Likewise.
8887 * regcache.h (register_dump): Moved from regcache.c.
8889 2018-02-21 Yao Qi <yao.qi@linaro.org>
8891 * regcache.c (regcache::regcache): Update.
8892 (regcache::invalidate): Move it to detached_regcache::invalidate.
8893 (get_thread_arch_aspace_regcache): Update.
8894 (regcache::raw_update): Update.
8895 (regcache::cooked_read): Remove some code.
8896 (regcache::cooked_read_value): Likewise.
8897 (regcache::raw_write): Remove assert on m_readonly_p.
8898 (regcache::raw_supply_integer): Move it to
8899 detached_regcache::raw_supply_integer.
8900 (regcache::raw_supply_zeroed): Likewise.
8901 * regcache.h (detached_regcache) <raw_supply_integer>: New
8903 <raw_supply_zeroed, invalidate>: Likewise.
8904 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
8905 <invalidate>: Likewise.
8906 <m_readonly_p>: Removed.
8908 2018-02-21 Yao Qi <yao.qi@linaro.org>
8910 * infcmd.c (get_return_value): Let stop_regs point to
8911 get_current_regcache.
8912 * regcache.c (regcache::regcache): Remove.
8913 (register_dump_reg_buffer): New class.
8914 (regcache_print): Adjust.
8915 * regcache.h (regcache): Remove constructors.
8917 2018-02-21 Yao Qi <yao.qi@linaro.org>
8919 * regcache.c (class register_dump): New class.
8920 (register_dump_regcache, register_dump_none): New class.
8921 (register_dump_remote, register_dump_groups): New class.
8922 (regcache_print): Update.
8923 * regcache.h (regcache_dump_what): Move it to regcache.c.
8924 (regcache) <dump>: Remove.
8926 2018-02-21 Yao Qi <yao.qi@linaro.org>
8928 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
8930 (jit_unwind_reg_set_impl): Call raw_supply.
8931 (jit_frame_sniffer): Use reg_buffer_rw.
8932 * record-full.c (record_full_core_regbuf): Change its type.
8933 (record_full_core_open_1): Use reg_buffer_rw.
8934 (record_full_close): Likewise.
8935 (record_full_core_fetch_registers): Use regcache->raw_supply.
8936 (record_full_core_store_registers): Likewise.
8937 * regcache.c (regcache::get_register_status): Move it to
8939 (regcache_raw_set_cached_value): Remove.
8940 (regcache::raw_set_cached_value): Remove.
8941 (regcache::raw_write): Call raw_supply.
8942 (regcache::raw_supply): Move it to reg_buffer_rw.
8943 * regcache.h (regcache_raw_set_cached_value): Remove.
8944 (reg_buffer_rw): New class.
8946 2018-02-21 Yao Qi <yao.qi@linaro.org>
8948 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
8949 readonly_detached_regcache.
8950 (dummy_frame_prev_register): Use regcache->cooked_read.
8951 * frame.c (frame_save_as_regcache): Change return type.
8952 (frame_pop): Update.
8953 * frame.h (frame_save_as_regcache): Update declaration.
8954 * inferior.h (get_infcall_suspend_state_regcache): Update
8956 * infrun.c (infcall_suspend_state) <registers>: use
8957 readonly_detached_regcache.
8958 (save_infcall_suspend_state): Don't use regcache_dup.
8959 (get_infcall_suspend_state_regcache): Change return type.
8960 * linux-fork.c (struct fork_info) <savedregs>: Change to
8961 readonly_detached_regcache.
8963 (fork_save_infrun_state): Don't use regcache_dup.
8964 (info_checkpoints_command): Adjust.
8965 * mi/mi-main.c (register_changed_p): Update declaration.
8966 (mi_cmd_data_list_changed_registers): Use
8967 readonly_detached_regcache.
8968 (register_changed_p): Change parameter type to
8969 readonly_detached_regcache.
8970 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
8971 readonly_detached_regcache.
8972 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
8973 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
8975 (regcache::save): Move it to reg_buffer.
8976 (regcache::restore): Change parameter type.
8977 (regcache_dup): Remove.
8978 * regcache.h (reg_buffer) <save>: New method.
8979 (readonly_detached_regcache): New class.
8980 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
8981 readonly_detached_regcache.
8982 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
8984 2018-02-21 Yao Qi <yao.qi@linaro.org>
8986 * frame.c (frame_save_as_regcache): Use regcache method save.
8987 (frame_pop): Use regcache method restore.
8988 * infrun.c (restore_infcall_suspend_state): Likewise.
8989 * linux-fork.c (fork_load_infrun_state): Likewise.
8990 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
8992 * regcache.c (regcache_save): Remove.
8993 (regcache::restore): More asserts.
8994 (regcache_cpy): Remove.
8995 * regcache.h (regcache_save): Remove the declaration.
8996 (regcache::restore): Move from private to public.
8997 Remove the friend declaration of regcache_cpy.
8998 (regcache_cpy): Remove declaration.
9000 2018-02-21 Yao Qi <yao.qi@linaro.org>
9002 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9003 parameter type to 'readable_regcache *'.
9004 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9005 * arm-tdep.c (arm_neon_quad_read): Likewise.
9006 (arm_pseudo_read): Likewise.
9007 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9008 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9009 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9010 * gdbarch.c: Re-generated.
9011 * gdbarch.h: Re-generated.
9012 * gdbarch.sh (pseudo_register_read): Change parameter type to
9013 'readable_regcache *'.
9014 (pseudo_register_read_value): Likewise.
9015 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9016 (h8300_pseudo_register_read): Likewise.
9017 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9018 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9019 (i386_pseudo_register_read_into_value): Likewise.
9020 (i386_pseudo_register_read_value): Likewise.
9021 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9023 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9024 * m32c-tdep.c (m32c_raw_read): Likewise.
9025 (m32c_read_flg): Likewise.
9026 (m32c_banked_register): Likewise.
9027 (m32c_banked_read): Likewise.
9028 (m32c_sb_read): Likewise.
9029 (m32c_part_read): Likewise.
9030 (m32c_cat_read): Likewise.
9031 (m32c_r3r2r1r0_read): Likewise.
9032 (m32c_pseudo_register_read): Likewise.
9033 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9034 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9035 (mep_pseudo_cr64_read): Likewise.
9036 (mep_pseudo_register_read): Likewise.
9037 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9038 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9039 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9040 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9041 (regcache::cooked_read): Likewise.
9042 (regcache::cooked_read_value): Likewise.
9043 (regcache_cooked_read_signed):
9044 (regcache::cooked_read): Likewise.
9045 * regcache.h (readable_regcache): New class.
9046 (regcache): Inherit readable_regcache. Move some methods to
9048 * rl78-tdep.c (rl78_pseudo_register_read): Change
9049 parameter type to 'readable_regcache *'.
9050 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9051 (e500_pseudo_register_read): Change parameter type to
9052 'readable_regcache *'.
9053 (dfp_pseudo_register_read): Likewise.
9054 (vsx_pseudo_register_read): Likewise.
9055 (efpr_pseudo_register_read): Likewise.
9056 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9057 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9058 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9059 (sh64_pseudo_register_read): Likewise.
9060 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9061 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9062 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9063 (spu_pseudo_register_read): Likewise.
9064 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9065 (xtensa_pseudo_register_read): Likewise.
9067 2018-02-21 Yao Qi <yao.qi@linaro.org>
9069 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9070 (regcache::arch): Move it to reg_buffer::arch.
9071 (regcache::register_buffer): Likewise.
9072 (regcache::assert_regnum): Likewise.
9073 (regcache::num_raw_registers): Likewise.
9074 * regcache.h (reg_buffer): New class.
9075 (regcache): Inherit reg_buffer.
9077 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9079 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9080 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9082 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9084 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9086 2018-02-19 Alan Hayward <alan.hayward@arm.com>
9088 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9089 (SFILES): Remove common/*.c files.
9090 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9091 * common/common.host: Add common reference.
9092 * configure.ac: Likewise.
9093 * configure: Regenerate.
9095 2018-02-16 Yao Qi <yao.qi@linaro.org>
9097 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9098 (block_initialize_namespace): Use new.
9099 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9100 (dwarf2_free_objfile): Use delete.
9101 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9102 (copy_type_recursive): Use new.
9103 * gdb_obstack.h (allocate_on_obstack): New.
9105 2018-02-15 Yao Qi <yao.qi@linaro.org>
9108 * inferior.c (exit_inferior_1): Reset inf->control.
9110 2018-02-15 Joel Brobecker <brobecker@adacore.com>
9112 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9115 2018-02-14 Pedro Alves <palves@redhat.com>
9117 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9118 frame_cleanup_after_sniffer on exception.
9120 2018-02-14 Tom Tromey <tom@tromey.com>
9122 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9124 (solib_bfd_open): Make pathname const.
9125 * solib.c (solib_bfd_open): Make pathname const.
9126 * solib-spu.c (spu_bfd_fopen): Make name const.
9127 (spu_bfd_open): Make pathname const.
9128 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9129 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9131 2018-02-14 Tom Tromey <tom@tromey.com>
9133 * symfile.c (symfile_bfd_open): Update.
9134 * source.h (openp, source_full_path_of, find_and_open_source):
9135 Change argument type to unique_xmalloc_ptr.
9136 * source.c (openp): Take a unique_xmalloc_ptr.
9137 (source_full_path_of, find_and_open_source): Likewise.
9138 (open_source_file, symtab_to_fullname): Update.
9139 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9141 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9142 (exec_file_find): Update.
9143 * psymtab.c (psymtab_to_fullname): Update.
9144 * nto-tdep.h (nto_find_and_open_solib): Update.
9145 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9147 * exec.c (exec_file_attach): Update.
9148 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9149 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9151 2018-02-14 Tom Tromey <tom@tromey.com>
9153 * solib.c: Include source.h.
9154 * nto-tdep.c: Include source.h.
9155 * mi/mi-cmd-env.c: Include source.h.
9156 * infcmd.c: Include source.h.
9157 * exec.c: Include source.h.
9158 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9159 (add_path, directory_switch, source_path, init_source_path): Move
9161 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9162 (add_path, directory_switch, source_path, init_source_path):
9165 2018-02-14 Tom Tromey <tom@tromey.com>
9167 * solist.h (exec_file_find, solib_find): Return
9169 (solib_bfd_fopen): Take a const char *.
9170 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9171 (exec_file_find, solib_find): Likewise.
9172 (solib_bfd_fopen): Do not take ownership of "pathname".
9173 (solib_bfd_open): Use unique_xmalloc_ptr.
9174 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9175 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9176 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9177 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9179 2018-02-14 Joel Brobecker <brobecker@adacore.com>
9181 * ada-lang.c (name_match_type_from_name): Remove reference to
9182 ada_name_for_lookup in function's documentation.
9183 * ada-lang.h (ada_name_for_lookup): Delete declaration.
9185 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9187 * defs.h (enum openp_flags): New enum.
9188 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9189 Move to enum openp_flags.
9190 (openp_flags): New enum flags.
9191 (openp): Change parameter type to openp_flags.
9192 * source.c (openp): Change parameter type to openp_flags.
9193 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9194 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9196 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9198 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9201 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
9203 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9205 (class dwarf2_queue_guard): ...the destructor of this new class.
9206 (dw2_do_instantiate_symtab): Create instance of the new class
9207 dwarf2_queue_guard, remove cleanup.
9209 2018-02-09 Tom Tromey <tom@tromey.com>
9211 * source.c (find_source_lines): Don't reference past the end of
9214 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9216 * remote.c (remote_btrace_maybe_reopen): Change error message.
9217 * btrace.c (btrace_enable): Likewise.
9218 (parse_xml_btrace): Likewise.
9219 (parse_xml_btrace_conf): Likewise.
9221 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9223 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9224 (linux_enable_pt, linux_enable_bts): Call
9225 diagnose_perf_event_open_fail.
9227 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9229 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9230 Remove parameter and change return type. Update callers. Move it.
9231 (linux_enable_bts, linux_enable_pt): Improve error message.
9232 (linux_enable_pt): Remove zero buffer size check.
9233 (linux_enable_btrace): Improve error messages. Remove NULL return
9236 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9238 * btrace.c (btrace_enable): Remove target_supports_btrace call.
9239 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9240 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9241 (linux_supports_pt, linux_supports_btrace): Remove.
9242 (linux_enable_bts): Call cpu_supports_bts.
9243 * nat/linux-btrace.h (linux_supports_btrace): Remove.
9244 * remote.c (remote_supports_btrace): Remove.
9245 (init_remote_ops): Remove remote_supports_btrace.
9246 * target-delegates.c: Regenerated.
9247 * target.c (target_supports_btrace): Remove.
9248 * target.h (target_ops) <to_supports_btrace>: Remove
9249 (target_supports_btrace): Remove.
9250 * x86-linux-nat.c (x86_linux_create_target): Remove
9251 linux_supports_btrace.
9253 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9255 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9257 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9258 exception and use message in own exception.
9260 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9262 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9263 (perf_event_pt_event_type): Use gdb_file_up.
9264 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9265 scoped_fd, and scoped_mmap.
9267 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9269 * common/scoped_mmap.h: New.
9270 * unittests/scoped_mmap-selftest.c: New.
9271 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9272 unittests/scoped_mmap-selftest.c.
9274 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9276 * common/scoped_fd.h: New.
9277 * unittests/scoped_fd-selftest.c: New.
9278 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9279 unittests/scoped_fd-selftest.c.
9281 2018-02-09 Tom Tromey <tom@tromey.com>
9283 * auto-load.c (auto_load_section_scripts): Use
9284 gdb::unique_xmalloc_ptr.
9286 2018-02-09 Tom Tromey <tom@tromey.com>
9288 * auto-load.c (execute_script_contents): Use std::string.
9290 2018-02-09 Joel Brobecker <brobecker@adacore.com>
9292 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9293 Python function, rather than a new command.
9295 2018-02-08 Tom Tromey <tom@tromey.com>
9297 * solib.c (solib_find_1): Use std::string.
9298 (solib_bfd_fopen): Use unique_xmalloc_ptr.
9300 2018-02-08 Tom Tromey <tom@tromey.com>
9302 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9304 2018-02-08 Tom Tromey <tom@tromey.com>
9306 * source.c (find_source_lines): Use gdb::def_vector.
9308 2018-02-08 Tom Tromey <tom@tromey.com>
9310 * macrocmd.c (struct temporary_macro_definition): New.
9311 (macro_define_command): Use temporary_macro_definition. Remove
9313 (free_macro_definition_ptr): Remove.
9315 2018-02-08 Tom Tromey <tom@tromey.com>
9317 * macroexp.c (maybe_expand): Use std::string.
9319 2018-02-08 Tom Tromey <tom@tromey.com>
9321 * macroexp.c (struct macro_buffer): Add initializers for some
9323 (init_buffer, init_shared_buffer, free_buffer)
9324 (free_buffer_return_text): Remove.
9325 (macro_buffer): New constructors.
9326 (~macro_buffer): New destructor.
9327 (macro_buffer::set_shared): New method.
9328 (macro_buffer::resize_buffer, macro_buffer::appendc)
9329 (macro_buffer::appendmem): Now methods, not free functions.
9330 (set_token, append_tokens_without_splicing, stringify)
9331 (macro_stringify): Update.
9332 (gather_arguments): Change return type. Remove argc_p argument,
9333 add args_ptr argument. Use std::vector.
9334 (substitute_args): Remove argc argument. Accept std::vector.
9335 (expand): Update. Use std::vector.
9336 (scan, macro_expand, macro_expand_next): Update.
9338 2018-02-08 Tom Tromey <tom@tromey.com>
9340 * symtab.c (default_collect_symbol_completion_matches_break_on):
9341 Use unique_xmalloc_ptr.
9342 * macroscope.h: (sal_macro_scope, user_macro_scope)
9343 (default_macro_scope): Return unique_xmalloc_ptr.
9344 * macroscope.c (sal_macro_scope, user_macro_scope)
9345 (default_macro_scope): Return unique_xmalloc_ptr.
9346 * macroexp.h (macro_expand, macro_expand_once): Return
9348 * macroexp.c (macro_expand, macro_expand_once): Return
9350 * macrocmd.c (macro_expand_command, macro_expand_once_command)
9351 (info_macro_command, info_macros_command): Use
9353 * compile/compile-c-support.c (write_macro_definitions): Use
9355 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9357 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
9359 * value.c (value_static_field): Assign field type instead of
9360 containing type when returning an optimized out value.
9362 2018-02-06 Yao Qi <yao.qi@linaro.org>
9364 * ft32-tdep.c (ft32_read_pc): Remove.
9365 (ft32_write_pc): Remove.
9366 (ft32_gdbarch_init): Update.
9367 * m32r-tdep.c (m32r_read_pc): Remove.
9368 (m32r_gdbarch_init): Update.
9369 * mep-tdep.c (mep_read_pc): Remove.
9370 (mep_gdbarch_init): Update.
9371 * microblaze-tdep.c (microblaze_write_pc): Remove.
9372 (microblaze_gdbarch_init): Update.
9373 * mn10300-tdep.c (mn10300_read_pc): Remove.
9374 (mn10300_write_pc): Remove.
9375 (mn10300_gdbarch_init): Update.
9376 * moxie-tdep.c (moxie_read_pc): Remove.
9377 (moxie_write_pc): Remove.
9378 (moxie_gdbarch_init): Update.
9380 2018-02-06 Yao Qi <yao.qi@linaro.org>
9382 * expprint.c (print_subexp_standard): Handle
9383 OP_F77_UNDETERMINED_ARGLIST.
9384 (dump_subexp_body_standard): Likewise.
9386 2018-02-05 Alan Hayward <alan.hayward@arm.com>
9388 * target-descriptions.c (tdesc_element_visitor) Add empty
9390 (tdesc_type): Move make_gdb_type from here.
9391 (tdesc_type_builtin): Likewise.
9392 (tdesc_type_vector): Likewise.
9393 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9394 (make_gdb_type_struct): Move from tdesc_type_with_fields.
9395 (make_gdb_type_union): Likewise.
9396 (make_gdb_type_flags): Likewise.
9397 (make_gdb_type_enum): Likewise.
9398 (make_gdb_type): New function.
9399 (tdesc_register_type): Use static make_gdb_type.
9401 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
9403 * infcmd.c (default_print_one_register_info): Align natural-format
9404 column values consistently one under another.
9405 (pad_to_column): New function.
9407 2018-02-05 Joel Brobecker <brobecker@adacore.com>
9409 * dwarf2read.c (dwarf2_physname): Move commment.
9411 2018-02-01 Leszek Swirski <leszeks@google.com>
9413 * varobj.c (varobj_formatted_print_options): Allow recursive
9414 pretty printing if pretty printing is enabled.
9416 2018-02-01 Leszek Swirski <leszeks@google.com>
9418 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9419 names after a structop as a filename.
9421 2018-02-01 Yao Qi <yao.qi@linaro.org>
9423 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9424 (arm_record_coproc_data_proc): Likewise.
9426 2018-02-01 Yao Qi <yao.qi@linaro.org>
9428 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9430 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
9432 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9433 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9435 2018-01-31 Pedro Alves <palves@redhat.com>
9437 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9438 * inflow.c (child_terminal_save_inferior): Wrap reference to
9439 tcgetpgrp in HAVE_TERMIOS_H.
9440 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9442 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9443 always iterate over all inferiors.
9444 (gdbsim_cntrl_c): Adjust.
9445 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9447 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9449 * gdbtypes.c (lookup_array_range_type): Make sure the array's
9450 index type is objfile-owned if the element type is as well.
9452 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9456 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
9458 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9459 "features/s390x-linux64.c".
9460 (_initialize_s390_linux_tdep): Remove initialization of tdescs
9461 s390_linux32 and s390x_linux64.
9462 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9464 * s390-tdep.c: Include "features/s390-linux32.c" and
9465 "features/s390x-linux64.c".
9466 (s390_tdesc_valid): Add check for tdesc_has_registers.
9467 (s390_gdbarch_init): Make sure there is always a valid tdesc.
9468 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9469 tdesc_s390x_linux64.
9470 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9471 tdesc_s390x_linux64 to...
9472 * s390-tdep.h: ...here.
9474 2018-01-30 Pedro Alves <palves@redhat.com>
9477 * config.in, configure: Regenerate.
9478 * configure.ac: Check for getpgid.
9479 * go32-nat.c (go32_pass_ctrlc): New.
9480 (go32_target): Install it.
9481 * inf-child.c (inf_child_target): Install
9482 child_terminal_save_inferior, child_pass_ctrlc and
9484 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9485 (inf_ptrace_target): No longer install it.
9486 * infcmd.c (interrupt_target_1): Adjust.
9487 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9488 (child_interrupt): Declare.
9489 (inferior::terminal_state): New.
9490 * inflow.c (struct terminal_info): Update comments.
9491 (inferior_process_group): Delete.
9492 (terminal_is_ours): Delete.
9493 (gdb_tty_state): New.
9494 (child_terminal_init): Adjust.
9495 (is_gdb_terminal, sharing_input_terminal_1)
9496 (sharing_input_terminal): New functions.
9497 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
9498 Set the process's actual process group in the foreground if
9499 possible. Handle is_ours_for_output/is_ours distinction. Don't
9500 mark terminal as the inferior's if not sharing GDB's terminal.
9501 Don't check attach_flag.
9502 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9503 pass down a target_terminal_state.
9504 (child_terminal_save_inferior): New, factored out from ...
9505 (child_terminal_ours_1): ... this. Handle
9506 target_terminal_state::is_ours_for_output.
9507 (child_interrupt, child_pass_ctrlc): New.
9508 (inflow_inferior_exit): Clear the inferior's terminal_state.
9509 (copy_terminal_info): Copy the inferior's terminal state.
9510 (_initialize_inflow): Remove reference to terminal_is_ours.
9511 * inflow.h (inferior_process_group): Delete.
9512 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9513 * procfs.c (procfs_target): Don't install procfs_interrupt.
9514 (procfs_interrupt): Delete.
9515 * remote.c (remote_serial_quit_handler): Adjust.
9516 (remote_interrupt): Remove ptid parameter. Adjust.
9517 * target-delegates.c: Regenerate.
9518 * target.c: Include "terminal.h".
9519 (target_terminal::terminal_state): Rename to ...
9520 (target_terminal::m_terminal_state): ... this.
9521 (target_terminal::init): Adjust.
9522 (target_terminal::inferior): Adjust to per-inferior
9524 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
9525 (target_terminal::ours, target_terminal::ours_for_output): Use
9526 target_terminal_is_ours_kind.
9527 (target_interrupt): Remove ptid parameter. Adjust.
9528 (default_target_pass_ctrlc): Adjust.
9529 * target.h (target_ops::to_terminal_save_inferior): New field.
9530 (target_ops::to_interrupt): Remove ptid_t parameter.
9531 (target_interrupt): Remove ptid_t parameter. Update comment.
9532 (target_pass_ctrlc): Update comment.
9533 * target/target.h (target_terminal_state): New scoped enum,
9535 (target_terminal::terminal_state): ... here.
9536 (target_terminal::inferior): Update comments.
9537 (target_terminal::restore_inferior): New.
9538 (target_terminal::is_inferior, target_terminal::is_ours)
9539 (target_terminal::is_ours_for_output): Adjust.
9540 (target_terminal::scoped_restore_terminal_state): Adjust to
9541 rename, and call restore_inferior() instead of inferior().
9542 (target_terminal::scoped_restore_terminal_state::m_state): Change
9544 (target_terminal::terminal_state): Rename to ...
9545 (target_terminal::m_terminal_state): ... this and change type.
9547 2018-01-30 Pedro Alves <palves@redhat.com>
9549 * linux-nat.c (wait_for_signal): New function.
9550 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
9552 (async_terminal_is_ours)
9553 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
9554 (linux_nat_add_target): Don't override
9555 to_terminal_inferior/to_terminal_ours.
9557 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
9559 * remote.c (remote_follow_fork): Don't call "detach_inferior".
9561 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
9563 * dwarf2read.c (free_dwo_files): Add forward-declaration.
9564 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
9565 dwarf2_per_objfile_free here.
9566 (dwarf2_per_objfile_free): Remove.
9567 (_initialize_dwarf2_read): Don't register
9568 dwarf2_per_objfile_free as a registry cleanup.
9570 2018-01-27 Eli Zaretskii <eliz@gnu.org>
9572 Avoid compilation errors in MinGW native builds
9574 The error is triggered by including python-internal.h, and the
9577 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
9578 from build-gnulib/import/math.h:27,
9579 from d:/usr/Python26/include/pyport.h:235,
9580 from d:/usr/Python26/include/Python.h:58,
9581 from python/python-internal.h:94,
9582 from python/py-arch.c:24:
9583 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
9587 This happens because Python headers define 'hypot' to expand t
9588 '_hypot' in the Windows builds.
9589 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
9590 'hypoth'. This avoids a compilation error.
9592 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9594 * MAINTAINERS (Write After Approval): Fix ordering.
9596 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9598 * MAINTAINERS (Write After Approval): Add Alan Hayward.
9600 2018-01-26 Alan Modra <amodra@gmail.com>
9602 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
9603 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
9604 Remove nop. Make const. Comment.
9605 (powerpc32_plt_stub_so_2): New.
9606 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
9607 Correct count. Update uses.
9608 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
9609 Move common code reading PLT entry word. Correct
9610 powerpc32_plt_stub PLT address calculation.
9611 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
9612 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
9613 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
9614 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
9615 (ppc64_standard_linkage8): Likewise.
9616 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
9617 Correct insns description.
9618 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
9620 2018-01-24 Pedro Alves <palves@redhat.com>
9622 GCC PR libstdc++/83906
9623 * gdbtypes.c (operator==(const dynamic_prop &,
9624 const dynamic_prop &)): New.
9625 (operator==(const range_bounds &, const range_bounds &)): New.
9626 (check_types_equal): Use them instead of memcmp.
9627 * gdbtypes.h (operator==(const dynamic_prop &,
9628 const dynamic_prop &)): Declare.
9629 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
9630 (operator==(const range_bounds &, const range_bounds &)): Declare.
9631 (operator!=(const range_bounds &, const range_bounds &)): Declare.
9633 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9635 * s390-linux-tdep.c (s390_record_address_mask)
9636 (s390_record_calc_disp_common, s390_record_calc_disp)
9637 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9638 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9639 (s390_process_record): Move to s390-tdep.c.
9640 (s390_linux_init_abi_any): Adjust.
9641 * s390-tdep.c (s390_record_address_mask)
9642 (s390_record_calc_disp_common, s390_record_calc_disp)
9643 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9644 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9645 (s390_process_record): Moved from s390-linux-tdep.c
9646 (s390_gdbarch_init): Adjust.
9648 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9650 * s390-linux-nat.c (s390-tdep.h): New include.
9651 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
9652 (HFILES_NO_SRCDIR): Add s390-tdep.h.
9653 (ALLDEPFILES): Add s390-tdep.c.
9654 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
9655 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
9656 * s390-tdep.h: ...this. New file.
9657 * s390-linux-tdep.c (s390-tdep.h): New include.
9658 (_initialize_s390_tdep): Rename to...
9659 (_initialize_s390_linux_tdep): ...this and adjust.
9660 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
9661 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
9663 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
9664 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
9665 (s390_is_partial_instruction, s390_software_single_step)
9666 (is_non_branch_ril, s390_displaced_step_copy_insn)
9667 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
9668 (s390_prologue_data, s390_addr, s390_store, s390_load)
9669 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
9670 (s390_register_call_saved, s390_guess_tracepoint_registers)
9671 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
9672 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
9673 (s390_pseudo_register_name, s390_pseudo_register_type)
9674 (s390_pseudo_register_read, s390_pseudo_register_write)
9675 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
9676 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
9677 (s390_addr_bits_remove, s390_address_class_type_flags)
9678 (s390_address_class_type_flags_to_name)
9679 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
9680 (s390_function_arg_float, s390_function_arg_vector)
9681 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
9682 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
9683 (s390_frame_align, s390_register_return_value, s390_return_value)
9684 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
9685 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
9686 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
9687 (s390_trad_frame_prev_register, s390_unwind_cache)
9688 (s390_prologue_frame_unwind_cache)
9689 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
9690 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
9691 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
9692 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
9693 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
9694 (s390_frame_base_address, s390_local_base_address)
9695 (s390_frame_base, s390_gcc_target_options)
9696 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
9697 (s390_validate_reg_range, s390_tdesc_valid)
9698 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
9699 * s390-tdep.c: ...this. New file.
9701 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9703 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
9704 (s390_process_record, s390_gdbarch_tdep_alloc)
9705 (s390_linux_init_abi_any): Use/set new hook.
9707 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9709 * s390-linux-tdep.c (osabi.h): New include.
9710 (s390_linux_init_abi_31, s390_linux_init_abi_64)
9711 (s390_linux_init_abi_any): New functions.
9712 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
9714 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9716 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
9717 tdesc_has_registers check
9719 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9721 * s390-linux-tdep.c (s390_tdesc_valid): New function.
9722 (s390_validate_reg_range): New macro.
9723 (s390_gdbarch_init): Adjust.
9725 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9727 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
9728 (s390_gdbarch_tdep_alloc): Adjust.
9729 (s390_gdbarch_init): Adjust.
9731 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9733 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
9734 <have_tdb>: Change type to bool.
9735 (s390_gdbarch_tdep_alloc): Adjust.
9736 (s390_gdbarch_init): Adjust.
9738 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9740 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
9741 (gdbarch_tdep) <have_upper, have_vx>: New fields.
9742 (s390_gdbarch_tdep_alloc): New function.
9743 (s390_gdbarch_init): Allocate tdep at start and use its fields
9744 instead of separate variables.
9746 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9748 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
9749 when looking for cached gdbarch and add comment for remaining.
9751 2018-01-22 Pedro Alves <palves@redhat.com>
9752 Sergio Durigan Junior <sergiodj@redhat.com>
9754 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
9757 2018-01-22 Maciej W. Rozycki <macro@mips.com>
9759 * MAINTAINERS: Update my company e-mail address.
9761 2018-01-22 Yao Qi <yao.qi@linaro.org>
9763 * regcache.c (cooked_write_test): New function.
9764 (_initialize_regcache): Register the test.
9766 2018-01-22 Yao Qi <yao.qi@linaro.org>
9768 * ia64-tdep.c (ia64_pseudo_register_read): Call
9769 regcache->cooked_read instead of regcache_cooked_read_unsigned.
9770 * m32c-tdep.c (m32c_cat_read): Likewise.
9771 (m32c_r3r2r1r0_read): Likewise.
9772 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9773 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9775 2018-01-22 Yao Qi <yao.qi@linaro.org>
9777 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
9778 method raw_read instead of regcache_raw_read.
9779 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9780 * arm-tdep.c (arm_neon_quad_read): Likewise.
9781 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9782 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9783 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9784 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
9785 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9786 (i386_pseudo_register_read_into_value): Likewise.
9787 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9788 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9789 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9790 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
9791 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
9792 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9793 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9794 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9795 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
9797 2018-01-22 Yao Qi <yao.qi@linaro.org>
9799 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
9800 * configure.tgt: Remove target mt.
9801 * mt-tdep.c: Remove.
9802 * regcache.c (cooked_read_test): Remove the check for mt.
9804 2018-01-22 Yao Qi <yao.qi@linaro.org>
9806 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
9807 instead of gdbarch_pseudo_register_read_value.
9809 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9811 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
9814 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9816 * linespec.c (create_sals_line_offset): Remove code that preserved
9817 the symtab_and_line's line number.
9819 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9821 * varobj.c (varobj_create): Don't set valid_block when creating a
9824 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9826 * varobj.c (varobj_create): Remove out of date comment.
9828 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9831 * ada-exp.y (write_var_from_sym): Pass extra parameter when
9832 updating innermost block.
9833 * parse.c (innermost_block_tracker::update): Take extra type
9834 parameter, and check types match before updating innermost block.
9835 (write_dollar_variable): Update innermost block for registers.
9836 * parser-defs.h (enum innermost_block_tracker_type): New enum.
9837 (innermost_block_tracker::innermost_block_tracker): Initialise
9839 (innermost_block_tracker::reset): Take type parameter.
9840 (innermost_block_tracker::update): Take type parameter, and pass
9841 type through as needed.
9842 (innermost_block_tracker::m_types): New member.
9843 * varobj.c (varobj_create): Pass type when reseting innermost
9846 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9848 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
9849 * ada-lang.c (resolve_subexp): Likewise.
9850 * breakpoint.c (set_breakpoint_condition) Likewise.
9851 (watch_command_1) Likewise.
9852 * c-exp.y (variable): Likewise.
9853 * d-exp.y (PrimaryExpression): Likewise.
9854 * f-exp.y (variable): Likewise.
9855 * go-exp.y (variable): Likewise.
9856 * m2-exp.y (variable): Likewise.
9857 * objfiles.c (objfile::~objfile): Likewise.
9858 * p-exp.y (variable): Likewise.
9859 * parse.c (innermost_block): Change type.
9860 * parser-defs.h (class innermost_block_tracker): New.
9861 (innermost_block): Change to innermost_block_tracker.
9862 * printcmd.c (display_command): Switch to innermost_block API.
9863 (do_one_display): Likewise.
9864 * rust-exp.y (do_one_display): Likewise.
9865 * symfile.c (clear_symtab_users): Likewise.
9866 * varobj.c (varobj_create): Switch to innermost_block API, replace
9867 use of innermost_block with block stored on varobj object.
9869 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9871 * expression.h (innermost_block): Remove declaration.
9872 * varobj.c: Add 'parser-defs.h' include.
9874 2018-01-19 Tom Tromey <tom@tromey.com>
9876 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
9877 symbols in the static and global blocks.
9879 2018-01-19 James Clarke <jrtc27@jrtc27.com>
9881 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
9882 gdb_ptrace.h, and move including gdb_wait.h ...
9883 * nat/linux-ptrace.h: ... to here.
9885 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9887 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
9888 inf_ptrace_detach_success.
9889 (inf_ptrace_detach_success): Add inferior parameter, use it
9890 instead of inferior_ptid, pass it to detach_inferior.
9891 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
9893 * inferior.c (detach_inferior): Add overload that takes an
9895 * inferior.h (detach_inferior): Likewise.
9896 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
9897 use inferior_ptid, adjust call to inf_ptrace_detach_success.
9898 * linux-thread-db.c (thread_db_detach): Use inf parameter.
9900 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9902 * target.h (struct target_ops) <to_detach>: Add inferior
9904 (target_detach): Likewise.
9905 * target.c (dispose_inferior): Pass inferior down.
9906 (target_detach): Pass inferior down. Assert that it is equal to
9907 the current inferior.
9908 * aix-thread.c (aix_thread_detach): Pass inferior down.
9909 * corefile.c (core_file_command): Pass current_inferior() down.
9910 * corelow.c (core_detach): Add inferior parameter.
9911 * darwin-nat.c (darwin_detach): Likewise.
9912 * gnu-nat.c (gnu_detach): Likewise.
9913 * inf-ptrace.c (inf_ptrace_detach): Likewise.
9914 * infcmd.c (detach_command): Pass current_inferior() down to
9916 * infrun.c (follow_fork_inferior): Pass parent_inf to
9918 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
9920 * linux-nat.c (linux_nat_detach): Add inferior parameter.
9921 * linux-thread-db.c (thread_db_detach): Likewise.
9922 * nto-procfs.c (procfs_detach): Likewise.
9923 * procfs.c (procfs_detach): Likewise.
9924 * record.c (record_detach): Likewise.
9925 * record.h (struct inferior): Forward-declare.
9926 (record_detach): Add inferior parameter.
9927 * remote-sim.c (gdbsim_detach): Likewise.
9928 * remote.c (remote_detach_1): Likewise.
9929 (remote_detach): Likewise.
9930 (extended_remote_detach): Likewise.
9931 * sol-thread.c (sol_thread_detach): Likewise.
9932 * target-debug.h (target_debug_print_inferior_p): New macro.
9933 * target-delegates.c: Re-generate.
9934 * top.c (kill_or_detach): Pass inferior down to target_detach.
9935 * windows-nat.c (windows_detach): Add inferior parameter.
9937 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9939 * target.h (struct target_ops) <to_detach>: Remove args
9941 (target_detach): Likewise.
9942 * target.c (dispose_inferior): Adjust.
9943 (target_detach): Remove args parameter, adjust.
9944 * aix-thread.c (aix_thread_detach): Adjust.
9945 * corefile.c (core_file_command): Adjust.
9946 * corelow.c (core_detach): Adjust.
9947 * darwin-nat.c (darwin_detach): Adjust.
9948 * gnu-nat.c (gnu_detach): Adjust.
9949 * inf-ptrace.c (inf_ptrace_detach): Adjust.
9950 * infcmd.c (detach_command): Adjust
9951 * infrun.c (follow_fork_inferior): Adjust.
9952 (handle_vfork_child_exec_or_exit): Adjust.
9953 * linux-fork.c (linux_fork_detach): Remove args parameter.
9954 * linux-fork.h (linux_fork_detach): Likewise.
9955 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
9956 * linux-thread-db.c (thread_db_detach): Likewise.
9957 * nto-procfs.c (procfs_detach): Likewise.
9958 * procfs.c (procfs_detach): Likewise.
9959 (do_detach): Remove signo parameter.
9960 * record.c (record_detach): Remove args parameter.
9961 * record.h (record_detach): Likewise.
9962 * remote-sim.c (gdbsim_detach): Likewise.
9963 * remote.c (remote_detach_1): Likewise.
9964 (remote_detach): Likewise.
9965 (extended_remote_detach): Likewise.
9966 * sol-thread.c (sol_thread_detach): Likewise.
9967 * target-delegates.c: Re-generate.
9968 * top.c (struct qt_args) <args>: Remove field.
9969 (kill_or_detach): Don't pass args.
9970 (quit_force): Don't set args.
9971 * windows-nat.c (windows_detach): Remove args parameter.
9973 2018-01-19 Yao Qi <yao.qi@linaro.org>
9975 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
9976 (arm_linux_init_abi): Install it.
9978 2018-01-19 Yao Qi <yao.qi@linaro.org>
9980 * osabi.c (gdb_osabi_names): Extend the regexp for
9981 arm-linux-gnueabihf.
9983 2018-01-18 Yao Qi <yao.qi@linaro.org>
9985 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
9987 (abbrev_table::add_abbrev): Update.
9988 (abbrev_table::lookup_abbrev): Update.
9990 2018-01-18 Yao Qi <yao.qi@linaro.org>
9992 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
9994 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
9996 * compile/compile.c (compile_to_object): Convert "triplet_rx"
9999 2018-01-17 Tom Tromey <tom@tromey.com>
10001 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10003 2018-01-17 Tom Tromey <tom@tromey.com>
10005 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10006 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10007 (create_array_type_with_stride): Update.
10008 * dwarf2read.c (set_die_type): Update.
10010 2018-01-17 Tom Tromey <tom@tromey.com>
10012 * dwarf2read.c (delayed_method_info): Remove typedef.
10013 (dwarf2_cu::method_info): Now a std::vector.
10014 (add_to_method_list): Update.
10015 (free_delayed_list): Remove.
10016 (compute_delayed_physnames): Update.
10017 (process_full_comp_unit, process_full_type_unit): Clear the method
10018 list. Remove cleanups.
10019 (psymtab_include_file_name): Add name_holder parameter. Use
10020 unique_xmalloc_ptr.
10021 (dwarf_decode_lines): Update.
10023 2018-01-17 Tom Tromey <tom@tromey.com>
10024 Simon Marchi <simon.marchi@ericsson.com>
10026 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10027 (dwarf2_per_objfile::free_cached_comp_units)
10028 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10029 (init_cutu_and_read_dies_no_follow): Update.
10030 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10031 (dwarf2_cu::~dwarf2_cu): New.
10032 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10033 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10035 2018-01-17 Tom Tromey <tom@tromey.com>
10036 Simon Marchi <simon.marchi@ericsson.com>
10038 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10039 (struct die_reader_specs) <abbrev_table>: New member.
10040 (struct abbrev_table): Add constructor.
10041 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10042 <abbrev_obstack>: Now an auto_obstack.
10043 (abbrev_table_up): New typedef.
10044 (init_cu_die_reader): Add abbrev_table parameter.
10045 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10046 Add result_dwo_abbrev_table.
10047 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10048 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10050 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10052 (skip_children): Update.
10053 (abbrev_table::alloc_abbrev): Rename from
10054 abbrev_table_alloc_abbrev.
10055 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10056 (abbrev_table::lookup_abbrev): Rename from
10057 abbrev_table_lookup_abbrev.
10058 (abbrev_table_read_table): Return abbrev_table_up.
10059 (abbrev_table_free, abbrev_table_free_cleanup)
10060 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10061 (load_partial_dies): Update.
10063 2018-01-17 Tom Tromey <tom@tromey.com>
10065 * dwarf2read.c (dwarf2_compute_name): Update comment.
10066 (read_func_scope, read_variable): Update.
10067 (new_symbol): Remove.
10068 (new_symbol_full): Rename to new_symbol.
10070 2018-01-17 Mike Gulick <mgulick@mathworks.com>
10073 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10074 a warning instead of throwing an error, set section size to 0 and return
10076 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10078 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10080 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10082 (linux_ptrace_attach_fail_reason_string): Likewise.
10083 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10085 (linux_ptrace_attach_fail_reason_string): Likewise.
10086 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10088 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10090 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10092 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10095 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10096 checking for fs_base/gs_base fields in struct user_regs_struct.
10097 * configure: Regenerate.
10099 2018-01-17 Yao Qi <yao.qi@linaro.org>
10101 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10103 (aarch64_linux_init_abi): Install it to gdbarch hook
10104 gcc_target_options.
10106 2018-01-15 Pedro Alves <palves@redhat.com>
10108 * common/signals-state-save-restore.c
10109 (save_original_signals_state): Fix typos.
10111 2017-01-12 Tom Tromey <tom@tromey.com>
10112 Sergio Durigan Junior <sergiodj@redhat.com>
10114 * Makefile.in (install-only): Install gdb-add-index.
10116 2018-01-12 John Baldwin <jhb@FreeBSD.org>
10118 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10120 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10122 * infrun.c (keep_going_pass_signal): Clear step-over info when
10123 insert_breakpoints fails.
10125 2018-01-11 Pedro Alves <palves@redhat.com>
10128 * infrun.c (resume): Rename to ...
10129 (resume_1): ... this.
10130 (resume): Reimplement as wrapper around resume_1.
10132 2018-01-11 Pedro Alves <palves@redhat.com>
10135 * remote.c (remote_parse_stop_reply): Default to the last-set
10136 general thread instead of to 'magic_null_ptid'.
10138 2018-01-10 Pedro Alves <palves@redhat.com>
10140 * language.h (language_get_symbol_name_matcher): Rename ...
10141 (get_symbol_name_matcher): ... this.
10142 * language.c (language_get_symbol_name_matcher): Ditto.
10143 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10146 2018-01-10 Pedro Alves <palves@redhat.com>
10150 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10151 Adjust to use language_get_symbol_name_matcher instead of
10152 language_defn::la_get_symbol_name_matcher.
10153 * language.c (language_get_symbol_name_matcher): If in Ada mode
10154 and the lookup name is a verbatim match, return Ada's matcher.
10155 * language.h (language_get_symbol_name_matcher): Adjust comment.
10156 (ada_lookup_name_info::verbatim_p):: New method.
10158 2018-01-10 Pedro Alves <palves@redhat.com>
10161 * ada-lang.c (ada_collect_symbol_completion_matches): If the
10162 minsym's language is language_auto or language_cplus, pass down
10163 language_ada instead.
10164 * symtab.c (compare_symbol_name): Don't frob symbol language here.
10166 2018-01-10 Pedro Alves <palves@redhat.com>
10169 * minsyms.c (linkage_name_str): New function.
10170 (iterate_over_minimal_symbols): Use it.
10172 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10174 * NEWS: Document that 'info proc' now works on FreeBSD.
10176 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10178 * configure.ac: Check for kinfo_getfile in libutil.
10179 * configure: Regenerate.
10180 * config.in: Regenerate.
10181 * fbsd-nat.c: Include "fbsd-tdep.h".
10182 (fbsd_fetch_cmdline): New.
10183 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10184 rather than calling error.
10185 (fbsd_info_proc): New.
10186 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10187 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10188 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10190 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10192 * fbsd-nat.c (struct free_deleter): Remove.
10193 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10195 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10197 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10198 NULL for an empty pathname.
10200 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10202 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10203 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10204 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10205 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10206 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10207 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10208 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10209 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10210 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10211 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10212 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10213 (fbsd_core_fetch_timeval, fbsd_print_sigset)
10214 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10215 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
10216 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10218 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
10220 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10221 (gnu_xfer_auxv): New function.
10222 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10223 TARGET_OBJECT_AUXV.
10225 2018-01-08 Yao Qi <yao.qi@linaro.org>
10226 Simon Marchi <simon.marchi@ericsson.com>
10228 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10230 (COMMON_OBS): Remove selftest.o.
10231 * configure.ac: Append selftest-arch.c and common/selftest.c to
10232 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
10233 * configure: Re-generated.
10234 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10236 (maintenance_info_selftests): Likewise.
10238 2018-01-08 Xavier Roirand <roirand@adacore.com>
10240 * ada-valprint.c (val_print_packed_array_elements): Use
10241 proper number of elements when printing an array indexed
10242 by an enumeration type.
10244 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10246 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10247 (dw2_get_file_names_reader): Adjust.
10248 (lookup_dwo_signatured_type): Adjust.
10249 (lookup_dwp_signatured_type): Adjust.
10250 (lookup_signatured_type): Adjust.
10251 (create_type_unit_group): Adjust.
10252 (get_type_unit_group): Adjust.
10253 (process_psymtab_comp_unit_reader): Adjust.
10254 (build_type_psymtabs_reader): Adjust.
10255 (scan_partial_symbols): Adjust.
10256 (add_partial_symbol): Adjust.
10257 (add_partial_subprogram): Adjust.
10258 (peek_die_abbrev): Adjust.
10259 (fixup_go_packaging): Adjust.
10260 (process_imported_unit_die): Adjust.
10261 (dwarf2_compute_name): Adjust.
10262 (dwarf2_physname): Adjust.
10263 (read_import_statement): Adjust.
10264 (handle_DW_AT_stmt_list): Adjust.
10265 (read_file_scope): Adjust.
10266 (read_func_scope): Adjust.
10267 (read_lexical_block_scope): Adjust.
10268 (read_call_site_scope): Adjust.
10269 (read_variable): Adjust.
10270 (dwarf2_rnglists_process): Adjust.
10271 (dwarf2_ranges_process): Adjust.
10272 (dwarf2_ranges_read): Adjust.
10273 (dwarf2_get_pc_bounds): Adjust.
10274 (dwarf2_record_block_ranges): Adjust.
10275 (dwarf2_add_field): Adjust.
10276 (dwarf2_add_member_fn): Adjust.
10277 (read_structure_type): Adjust.
10278 (process_structure_scope): Adjust.
10279 (read_enumeration_type): Adjust.
10280 (read_array_type): Adjust.
10281 (mark_common_block_symbol_computed): Adjust.
10282 (read_common_block): Adjust.
10283 (read_namespace_type): Adjust.
10284 (read_namespace): Adjust.
10285 (read_module_type): Adjust.
10286 (read_tag_pointer_type): Adjust.
10287 (read_tag_ptr_to_member_type): Adjust.
10288 (read_tag_string_type): Adjust.
10289 (read_subroutine_type): Adjust.
10290 (read_typedef): Adjust.
10291 (read_base_type): Adjust.
10292 (attr_to_dynamic_prop): Adjust.
10293 (read_subrange_type): Adjust.
10294 (read_unspecified_type): Adjust.
10295 (dwarf2_read_abbrevs): Adjust.
10296 (load_partial_dies): Adjust.
10297 (read_partial_die): Adjust.
10298 (find_partial_die): Adjust.
10299 (guess_partial_die_structure_name): Adjust.
10300 (fixup_partial_die): Adjust.
10301 (read_attribute_value): Adjust.
10302 (read_addr_index): Adjust.
10303 (read_addr_index_from_leb128): Adjust.
10304 (read_str_index): Adjust.
10305 (dwarf2_string_attr): Adjust.
10306 (get_debug_line_section): Adjust.
10307 (dwarf_decode_line_header): Adjust.
10308 (lnp_state_machine::check_line_address): Adjust.
10309 (dwarf_decode_lines_1): Adjust.
10310 (dwarf_decode_lines): Adjust.
10311 (dwarf2_start_symtab): Adjust.
10312 (var_decode_location): Adjust.
10313 (new_symbol_full): Adjust.
10314 (dwarf2_const_value_data): Adjust.
10315 (dwarf2_const_value_attr): Adjust.
10316 (dwarf2_const_value): Adjust.
10317 (die_type): Adjust.
10318 (die_containing_type): Adjust.
10319 (build_error_marker_type): Adjust.
10320 (lookup_die_type): Adjust.
10321 (guess_full_die_structure_name): Adjust.
10322 (anonymous_struct_prefix): Adjust.
10323 (determine_prefix): Adjust.
10324 (dwarf2_name): Adjust.
10325 (follow_die_ref_or_sig): Adjust.
10326 (follow_die_offset): Adjust.
10327 (follow_die_ref): Adjust.
10328 (follow_die_sig_1): Adjust.
10329 (follow_die_sig): Adjust.
10330 (get_signatured_type): Adjust.
10331 (get_DW_AT_signature_type): Adjust.
10332 (decode_locdesc): Adjust.
10333 (dwarf_decode_macros): Adjust.
10334 (cu_debug_loc_section): Adjust.
10335 (fill_in_loclist_baton): Adjust.
10336 (dwarf2_symbol_mark_computed): Adjust.
10337 (init_one_comp_unit): Don't assign
10338 dwarf2_cu::dwarf2_per_objfile.
10339 (set_die_type): Adjust.
10341 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10343 * dwarf2read.c (struct mapped_debug_names): Add constructor.
10344 <dwarf2_per_objfile>: New field.
10345 (dwarf2_per_objfile): Remove global.
10346 (get_dwarf2_per_objfile): New function.
10347 (set_dwarf2_per_objfile): New function.
10348 (dwarf2_build_psymtabs_hard): Change objfile parameter to
10349 dwarf2_per_objfile.
10350 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10351 (read_abbrev_offset): Likewise.
10352 (read_indirect_string): Likewise.
10353 (read_indirect_line_string): Likewise.
10354 (read_indirect_string_at_offset): Likewise.
10355 (read_indirect_string_from_dwz): Likewise.
10356 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10357 dwarf2_per_objfile.
10358 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10359 (create_all_comp_units): Change objfile parameter to
10360 dwarf2_per_objfile.
10361 (create_all_type_units): Likewise.
10362 (process_queue): Add dwarf2_per_objfile parameter.
10363 (read_and_check_comp_unit_head): Likewise.
10364 (lookup_dwo_unit_in_dwp): Likewise.
10365 (get_dwp_file): Likewise.
10366 (process_cu_includes): Likewise.
10367 (struct free_dwo_file_cleanup_data): New struct.
10368 (dwarf2_has_info): Use get_dwarf2_per_objfile and
10369 set_dwarf2_per_objfile.
10370 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10371 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10372 context, adjust calls.
10373 (dw2_instantiate_symtab): Likewise.
10374 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10375 (dw2_get_cu): Likewise.
10376 (create_cu_from_index_list): Change objfile parameter to
10377 dwarf2_per_objfile.
10378 (create_cus_from_index_list): Get dwarf2_per_objfile from
10379 context, adjust calls.
10380 (create_cus_from_index): Likewise.
10381 (create_signatured_type_table_from_index): Change objfile
10382 parameter to dwarf2_per_objfile.
10383 (create_signatured_type_table_from_debug_names): Change objfile
10384 parameter to dwarf2_per_objfile.
10385 (create_addrmap_from_index): Likewise.
10386 (create_addrmap_from_aranges): Likewise.
10387 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10388 (dw2_setup): Remove.
10389 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10391 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10392 get_dwarf2_per_objfile.
10393 (dw2_forget_cached_source_info): Likewise.
10394 (dw2_map_symtabs_matching_filename): Likewise.
10395 (struct dw2_symtab_iterator) <index>: Remove.
10396 <dwarf2_per_objfile>: New field.
10397 (dw2_symtab_iter_init): Replace index parameter with
10398 dwarf2_per_objfile.
10399 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10400 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10401 (dw2_print_stats): Likewise.
10402 (dw2_dump): Likewise.
10403 (dw2_expand_symtabs_for_function): Likewise.
10404 (dw2_expand_all_symtabs): Likewise.
10405 (dw2_expand_symtabs_with_fullname): Likewise.
10406 (dw2_expand_marked_cus): Replace index and objfile parameters
10407 with dwarf2_per_objfile.
10408 (dw_expand_symtabs_matching_file_matcher): Add
10409 dwarf2_per_objfile parameter and adjust calls.
10410 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10412 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10413 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10415 (create_cus_from_debug_names_list): Replace objfile parameter
10416 with dwarf2_per_objfile and adjust calls.
10417 (create_cus_from_debug_names): Likewise.
10418 (dwarf2_read_debug_names): Likewise.
10419 (mapped_debug_names::namei_to_name): Adjust call.
10420 (dw2_debug_names_iterator::next): Likewise.
10421 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10422 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10423 (dw2_debug_names_dump): Likewise.
10424 (dw2_debug_names_expand_symtabs_for_function): Likewise.
10425 (dw2_debug_names_expand_symtabs_matching): Likewise.
10426 (dwarf2_initialize_objfile): Likewise.
10427 (dwarf2_build_psymtabs): Likewise.
10428 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10430 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10431 (read_and_check_comp_unit_head): Likewise.
10432 (read_abbrev_offset): Likewise.
10433 (create_debug_type_hash_table): Likewise.
10434 (create_debug_types_hash_table): Likewise.
10435 (create_all_type_units): Replace objfile parameter with
10436 dwarf2_per_objfile.
10437 (add_type_unit): Add dwarf2_per_objfile parameter.
10438 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10439 with dwarf2_per_objfile.
10440 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10441 (lookup_dwp_signatured_type): Likewise.
10442 (lookup_signatured_type): Likewise.
10443 (read_cutu_die_from_dwo): Likewise.
10444 (init_tu_and_read_dwo_dies): Likewise.
10445 (init_cutu_and_read_dies): Likewise.
10446 (init_cutu_and_read_dies_no_follow): Likewise.
10447 (allocate_type_unit_groups_table): Add objfile parameter.
10448 (create_type_unit_group): Use dwarf2_per_objfile from cu.
10449 (get_type_unit_group): Likewise.
10450 (process_psymtab_comp_unit): Update call.
10451 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10452 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10453 (print_tu_stats): Likewise.
10454 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10455 in void* parameter.
10456 (build_type_psymtabs): Change objfile parameter to
10457 dwarf2_per_objfile.
10458 (process_skeletonless_type_unit): Use dwarf2_per_objfile
10459 passed in void* parameter.
10460 (process_skeletonless_type_units): Change objfile parameter to
10461 dwarf2_per_objfile.
10462 (set_partial_user): Likewise.
10463 (dwarf2_build_psymtabs_hard): Likewise.
10464 (read_comp_units_from_section): Likewise.
10465 (create_all_comp_units): Likewise.
10466 (scan_partial_symbols): Update calls.
10467 (add_partial_symbol): Likewise.
10468 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10469 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10470 (process_queue): Add dwarf2_per_objfile parameter.
10471 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10472 (compute_compunit_symtab_includes): Likewise.
10473 (process_cu_includes): Add dwarf2_per_objfile parameter.
10474 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10475 (process_full_type_unit): Likewise.
10476 (process_imported_unit_die): Update call.
10477 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10478 (read_file_scope): Likewise.
10479 (allocate_dwo_file_hash_table): Add objfile parameter.
10480 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10481 (create_cus_hash_table): Likewise.
10482 (create_dwp_hash_table): Likewise.
10483 (create_dwo_unit_in_dwp_v1): Likewise.
10484 (create_dwp_v2_section): Likewise.
10485 (create_dwo_unit_in_dwp_v2): Likewise.
10486 (lookup_dwo_unit_in_dwp): Likewise.
10487 (try_open_dwop_file): Likewise.
10488 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10489 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10490 cleanup to include a reference to dwarf2_per_objfile.
10491 (open_dwp_file): Add dwarf2_per_objfile parameter.
10492 (open_and_init_dwp_file): Likewise.
10493 (get_dwp_file): Likewise.
10494 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10495 (queue_and_load_all_dwo_tus): Update call.
10496 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10498 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10499 (dwarf2_ranges_process): Likewise.
10500 (dwarf2_get_pc_bounds): Likewise.
10501 (mark_common_block_symbol_computed): Likewise.
10502 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10503 (dwarf2_read_abbrevs): Update call.
10504 (read_partial_die): Use dwarf2_per_objfile from cu.
10505 (find_partial_die): Likewise.
10506 (fixup_partial_die): Likewise.
10507 (read_attribute_value): Likewise.
10508 (read_indirect_string_at_offset_from): Add objfile parameter.
10509 (read_indirect_string_at_offset): Add dwarf2_per_objfile
10511 (read_indirect_string_from_dwz): Add objfile parameter.
10512 (read_indirect_string): Add objfile parameter.
10513 (read_addr_index_1): Add dwarf2_per_objfile parameter.
10514 (read_addr_index): Use dwarf2_per_objfile from cu.
10515 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10517 (read_str_index): Use dwarf2_per_objfile from cu.
10518 (get_debug_line_section): Likewise.
10519 (read_formatted_entries): Add dwarf2_per_objfile parameter.
10520 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
10521 (new_symbol_full): Use dwarf2_per_objfile from cu.
10522 (build_error_marker_type): Likewise.
10523 (lookup_die_type): Likewise.
10524 (determine_prefix): Likewise.
10525 (follow_die_offset): Likewise.
10526 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
10527 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
10528 (dwarf2_fetch_die_type_sect_off): Likewise.
10529 (dwarf2_get_die_type): Likewise.
10530 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
10531 (get_signatured_type): Likewise.
10532 (get_DW_AT_signature_type): Likewise.
10533 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
10534 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
10535 (cu_debug_loc_section): Likewise.
10536 (fill_in_loclist_baton): Likewise.
10537 (dwarf2_symbol_mark_computed): Likewise.
10538 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10539 dwarf2_per_objfile.
10540 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
10542 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10543 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
10544 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
10545 (set_die_type): Use dwarf2_free_objfile from cu.
10546 (get_die_type_at_offset): Likewise.
10547 (dwarf2_per_objfile_free): Don't assign global variable.
10548 (debug_names) <constructor>: Add dwarf2_per_objfile
10549 parameter, update m_debugstrlookup construction.
10550 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
10552 <m_dwarf2_per_objfile>: New field.
10553 <lookup>: Use m_dwarf2_per_objfile.
10554 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
10555 (psyms_seen_size): Likewise.
10556 (write_gdbindex): Replace objfile parameter with
10557 dwarf2_per_objfile.
10558 (write_debug_names): Likewise.
10559 (write_psymtabs_to_index): Likewise.
10560 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
10563 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10565 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
10566 <dwarf2_per_objfile>: New field.
10567 (struct dwarf2_per_cu_data) <objfile>: Remove.
10568 <dwarf2_per_objfile>: New field.
10569 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
10571 (create_signatured_type_table_from_index): Likewise.
10572 (create_debug_type_hash_table): Likewise.
10573 (fill_in_sig_entry_from_dwo_entry): Likewise.
10574 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
10575 (create_type_unit_group): Assign dwarf2_per_objfile instead of
10577 (create_partial_symtab): Access objfile through
10578 dwarf2_per_objfile.
10579 (process_psymtab_comp_unit_reader): Likewise.
10580 (read_comp_units_from_section): Likewise.
10581 (scan_partial_symbols): Likewise.
10582 (add_partial_symbol): Likewise.
10583 (add_partial_subprogram): Likewise.
10584 (peek_die_abbrev): Likewise.
10585 (fixup_go_packaging): Likewise.
10586 (process_full_comp_unit): Likewise.
10587 (process_full_type_unit): Likewise.
10588 (process_imported_unit_die): Likewise.
10589 (dwarf2_compute_name): Likewise.
10590 (dwarf2_physname): Likewise.
10591 (read_import_statement): Likewise.
10592 (create_cus_hash_table): Assign dwarf2_physname instead of
10594 (read_func_scope): Access objfile through dwarf2_per_objfile.
10595 (read_lexical_block_scope): Likewise.
10596 (read_call_site_scope): Likewise.
10597 (read_variable): Likewise.
10598 (dwarf2_rnglists_process): Likewise.
10599 (dwarf2_ranges_process): Likewise.
10600 (dwarf2_ranges_read): Likewise.
10601 (dwarf2_record_block_ranges): Likewise.
10602 (dwarf2_add_field): Likewise.
10603 (dwarf2_add_member_fn): Likewise.
10604 (read_structure_type): Likewise.
10605 (process_structure_scope): Likewise.
10606 (read_enumeration_type): Likewise.
10607 (read_array_type): Likewise.
10608 (read_common_block): Likewise.
10609 (read_namespace_type): Likewise.
10610 (read_namespace): Likewise.
10611 (read_module_type): Likewise.
10612 (read_tag_pointer_type): Likewise.
10613 (read_tag_ptr_to_member_type): Likewise.
10614 (read_tag_string_type): Likewise.
10615 (read_subroutine_type): Likewise.
10616 (read_typedef): Likewise.
10617 (read_base_type): Likewise.
10618 (attr_to_dynamic_prop): Likewise.
10619 (read_subrange_type): Likewise.
10620 (read_unspecified_type): Likewise.
10621 (load_partial_dies): Likewise.
10622 (read_partial_die): Likewise.
10623 (find_partial_die): Likewise.
10624 (guess_partial_die_structure_name): Likewise.
10625 (fixup_partial_die): Likewise.
10626 (read_attribute_value): Likewise.
10627 (read_addr_index_from_leb128): Likewise.
10628 (dwarf2_read_addr_index): Likewise.
10629 (dwarf2_string_attr): Likewise.
10630 (lnp_state_machine::check_line_address): Likewise.
10631 (dwarf_decode_lines_1): Likewise.
10632 (dwarf_decode_lines): Likewise.
10633 (dwarf2_start_symtab): Likewise.
10634 (var_decode_location): Likewise.
10635 (new_symbol_full): Likewise.
10636 (dwarf2_const_value_data): Likewise.
10637 (dwarf2_const_value_attr): Likewise.
10638 (dwarf2_const_value): Likewise.
10639 (die_type): Likewise.
10640 (die_containing_type): Likewise.
10641 (lookup_die_type): Likewise.
10642 (guess_full_die_structure_name): Likewise.
10643 (anonymous_struct_prefix): Likewise.
10644 (dwarf2_name): Likewise.
10645 (follow_die_ref_or_sig): Likewise.
10646 (follow_die_offset): Likewise.
10647 (follow_die_ref): Likewise.
10648 (dwarf2_fetch_die_loc_sect_off): Likewise.
10649 (dwarf2_fetch_constant_bytes): Likewise.
10650 (dwarf2_fetch_die_type_sect_off): Likewise.
10651 (dwarf2_get_die_type): Likewise.
10652 (follow_die_sig): Likewise.
10653 (decode_locdesc): Likewise.
10654 (dwarf2_per_cu_objfile): Likewise.
10655 (dwarf2_per_cu_text_offset): Likewise.
10656 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
10658 (set_die_type): Access objfile through
10659 dwarf2_per_objfile.
10661 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10663 * valprint.c (converted_character_d): Remove typedef.
10664 (DEF_VEC_O (converted_character_d)): Remove.
10665 (count_next_character): Use std::vector.
10666 (print_converted_chars_to_obstack): Likewise.
10667 (generic_printstr): Likewise.
10669 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10671 * xml-support.h (struct gdb_xml_value): Add constructor.
10672 <value>: Change type to unique_xmalloc_ptr.
10673 (gdb_xml_value_s): Remove typedef.
10674 (DEF_VEC_O (gdb_xml_value_s)): Remove.
10675 (gdb_xml_element_start_handler): Change parameter type to
10677 (xml_find_attribute): Likewise.
10678 * xml-support.c (xml_find_attribute): Change parameter type to
10679 std::vector and adjust.
10680 (gdb_xml_values_cleanup): Remove.
10681 (gdb_xml_parser::start_element): Adjust to std::vector.
10682 (xinclude_start_include): Change paraeter type to std::vector
10684 * btrace.c (check_xml_btrace_version): Likewise.
10685 (parse_xml_btrace_block): Likewise.
10686 (parse_xml_btrace_pt_config_cpu): Likewise.
10687 (parse_xml_btrace_pt): Likewise.
10688 (parse_xml_btrace_conf_bts): Likewise.
10689 (parse_xml_btrace_conf_pt): Likewise.
10690 * memory-map.c (memory_map_start_memory): Likewise.
10691 (memory_map_start_property): Likewise.
10692 * osdata.c (osdata_start_osdata): Likewise.
10693 (osdata_start_item): Likewise.
10694 (osdata_start_column): Likewise.
10695 * remote.c (start_thread): Likewise.
10696 * solib-aix.c (library_list_start_library): Likewise.
10697 (library_list_start_list): Likewise.
10698 * solib-svr4.c (library_list_start_library): Likewise.
10699 (svr4_library_list_start_list): Likewise.
10700 * solib-target.c (library_list_start_segment): Likewise.
10701 (library_list_start_section): Likewise.
10702 (library_list_start_library): Likewise.
10703 (library_list_start_list): Likewise.
10704 * tracepoint.c (traceframe_info_start_memory): Likewise.
10705 (traceframe_info_start_tvar): Likewise.
10706 * xml-syscall.c (syscall_start_syscall): Likewise.
10707 * xml-tdesc.c (tdesc_start_target): Likewise.
10708 (tdesc_start_feature): Likewise.
10709 (tdesc_start_reg): Likewise.
10710 (tdesc_start_union): Likewise.
10711 (tdesc_start_struct): Likewise.
10712 (tdesc_start_flags): Likewise.
10713 (tdesc_start_enum): Likewise.
10714 (tdesc_start_field): Likewise.
10715 (tdesc_start_enum_value): Likewise.
10716 (tdesc_start_vector): Likewise.
10718 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10720 * extension.h (struct xmethod_worker) <clone>: Remove.
10721 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
10723 (python_xmethod_worker::clone): Remove.
10724 * valops.c (find_overload_match): Use std::move instead of
10727 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10729 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
10730 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
10731 <free_xmethod_worker_data>: Remove.
10732 <get_matching_xmethod_workers>: Chance VEC to std::vector.
10733 <get_xmethod_arg_types>: Remove.
10734 <get_xmethod_result_type>: Remove.
10735 <invoke_xmethod>: Remove.
10736 * extension.c (new_xmethod_worker): Remove.
10737 (clone_xmethod_worker): Remove.
10738 (get_matching_xmethod_workers): Return void, pass std::vector by
10740 (get_xmethod_arg_types): Rename to...
10741 (xmethod_worker::get_arg_types): ... this, and adjust.
10742 (get_xmethod_result_type): Rename to...
10743 (xmethod_worker::get_result_type): ... this, and adjust.
10744 (invoke_xmethod): Remove.
10745 (free_xmethod_worker): Remove.
10746 (free_xmethod_worker_vec): Remove.
10747 * extension.h (enum ext_lang_rc): Move here from
10749 (struct xmethod_worker): Add constructor and destructor.
10752 <invoke, clone, do_get_result_type, do_get_arg_types>: New
10753 virtual pure methods.
10754 <get_arg_types, get_result_type>: New methods.
10755 (xmethod_worker_ptr): Remove typedef.
10756 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
10757 (xmethod_worker_vec): Remove typedef.
10758 (xmethod_worker_up): New typedef.
10759 (invoke_xmethod): Remove.
10760 (clone_xmethod_worker): Remove.
10761 (free_xmethod_worker): Remove.
10762 (free_xmethod_worker_vec): Remove.
10763 (get_xmethod_arg_types): Remove.
10764 (get_xmethod_result_type): Remove.
10765 * valops.c (find_method_list): Use std::vector, don't use
10766 intermediate vector.
10767 (value_find_oload_method_list): Use std::vector.
10768 (find_overload_match): Use std::vector.
10769 (find_oload_champ): Use std::vector.
10770 * value.c (value_free): Use operator delete.
10771 (value_of_xmethod): Rename to...
10772 (value_from_xmethod): ... this. Don't assign
10773 xmethod_worker::value, take rvalue-reference.
10774 (result_type_of_xmethod): Adjust.
10775 (call_xmethod): Adjust.
10776 * value.h: Include extension.h.
10777 (struct xmethod_worker): Don't forward-declare.
10778 (value_of_xmethod): Rename to...
10779 (value_from_xmethod): ... this, take rvalue-reference.
10780 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
10781 (struct python_xmethod_worker): ... this, add constructor and
10783 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
10784 (gdbpy_free_xmethod_worker_data): Rename to...
10785 (python_xmethod_worker::~python_xmethod_worker): ... this and
10787 (gdbpy_clone_xmethod_worker_data): Rename to...
10788 (python_xmethod_worker::clone): ... this and adjust.
10789 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
10791 (gdbpy_get_xmethod_arg_types): Rename to...
10792 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
10793 (gdbpy_get_xmethod_result_type): Rename to...
10794 (python_xmethod_worker::do_get_result_type): ... this and
10796 (gdbpy_invoke_xmethod): Rename to...
10797 (python_xmethod_worker::invoke): ... this and adjust.
10798 (new_python_xmethod_worker): Rename to...
10799 (python_xmethod_worker::python_xmethod_worker): ... this and
10801 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
10803 (gdbpy_free_xmethod_worker_data): Remove.
10804 (gdbpy_get_matching_xmethod_workers): Use std::vector.
10805 (gdbpy_get_xmethod_arg_types): Remove.
10806 (gdbpy_get_xmethod_result_type): Remove.
10807 (gdbpy_invoke_xmethod): Remove.
10808 * python/python.c (python_extension_ops): Remove obsolete
10811 2018-01-05 Pedro Alves <palves@redhat.com>
10814 * common/signals-state-save-restore.c
10815 (save_original_signals_state): New parameter 'quiet'. Warn if we
10816 find a custom handler preinstalled, instead of internal erroring.
10817 But only warn if !quiet.
10818 * common/signals-state-save-restore.h
10819 (save_original_signals_state): New parameter 'quiet'.
10820 * main.c (captured_main_1): Move save_original_signals_state call
10821 after option handling, and pass QUIET.
10823 2018-01-05 Pedro Alves <palves@redhat.com>
10825 * spu-tdep.c (spu_catch_start): Pass
10826 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
10828 2018-01-05 Pedro Alves <palves@redhat.com>
10831 * ada-lang.c (literal_symbol_name_matcher): New function.
10832 (ada_get_symbol_name_matcher): Use it for
10833 symbol_name_match_type::SEARCH_NAME.
10834 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
10835 it down instead of assuming symbol_name_match_type::FULL.
10836 * block.h (block_lookup_symbol): New parameter 'match_type'.
10837 * c-valprint.c (print_unpacked_pointer): Use
10838 lookup_symbol_search_name instead of lookup_symbol.
10839 * compile/compile-object-load.c (get_out_value_type): Pass down
10840 symbol_name_match_type::SEARCH_NAME.
10841 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
10842 symbol_name_match_type::FULL.
10843 * cp-support.c (cp_get_symbol_name_matcher): Handle
10844 symbol_name_match_type::SEARCH_NAME.
10845 * infrun.c (insert_exception_resume_breakpoint): Use
10846 lookup_symbol_search_name.
10847 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
10848 * psymtab.c (maintenance_check_psymtabs): Use
10849 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
10850 * stack.c (print_frame_args): Use lookup_symbol_search_name and
10851 SYMBOL_SEARCH_NAME.
10852 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
10853 if symbol_name_match_type::SEARCH_NAME.
10854 (lookup_symbol_in_language): Pass down
10855 symbol_name_match_type::FULL.
10856 (lookup_symbol_search_name): New.
10857 (lookup_language_this): Pass down
10858 symbol_name_match_type::SEARCH_NAME.
10859 (lookup_symbol_aux, lookup_local_symbol): New parameter
10860 'match_type'. Pass it down.
10861 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
10862 (lookup_symbol_search_name): New declaration.
10863 (lookup_symbol_in_block): New 'match_type' parameter.
10865 2018-01-05 Pedro Alves <palves@redhat.com>
10868 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
10870 (ada_lookup_symbol): Reimplement in terms of
10871 ada_lookup_symbol_list, bits factored out from
10872 ada_lookup_encoded_symbol.
10874 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10876 * ada-exp.y (write_object_renaming): When subscripting an array
10877 using a symbol as the index, pass the block in call to
10878 ada_lookup_encoded_symbol when looking that symbol up.
10880 2018-01-05 Jerome Guitton <guitton@adacore.com>
10882 * ada-lang.c (ada_array_length): Use ada_index_type instead of
10885 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10887 * ada-lang.c (ada_to_fixed_value_create): Add handling of
10888 the case where VALUE_LVAL (val0) is not lval_memory.
10890 2018-01-05 Xavier Roirand <roirand@adacore.com>
10892 * ada-valprint.c (print_optional_low_bound): Handle
10893 character-indexed array printing like boolean-indexed array
10896 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10898 * NEWS: Create a new section for the next release branch.
10899 Rename the section of the current branch, now that it has
10902 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10904 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
10905 * version.in: Bump version to 8.1.50.DATE-git.
10907 2018-01-03 Xavier Roirand <roirand@adacore.com>
10909 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
10911 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
10913 (default_exception_support_info) <catch_handlers_sym>: Add field.
10914 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
10915 (ada_exception_name_addr_1): Add "catch handlers" handling.
10916 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
10917 Update all callers.
10918 (create_excep_cond_exprs) <ex>: Add parameter.
10919 (re_set_exception): Update create_excep_cond_exprs call.
10920 (print_it_exception, print_one_exception, print_mention_exception)
10921 (print_recreate_exception): Add "catch handler" handling.
10922 (allocate_location_catch_handlers, re_set_catch_handlers)
10923 (check_status_catch_handlers, print_it_catch_handlers)
10924 (print_one_catch_handlers, print_mention_catch_handlers)
10925 (print_recreate_catch_handlers): New function.
10926 (catch_handlers_breakpoint_ops): New variable.
10927 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
10928 Add parameter. Add "catch handler" handling.
10929 (ada_exception_sym_name, ada_exception_breakpoint_ops):
10930 Add "catch handler" handling.
10931 (ada_exception_catchpoint_cond_string): Add "catch handler"
10933 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
10935 (catch_ada_handlers_command): New function.
10936 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
10937 operations structure.
10938 (_initialize_ada_language): Add "catch handlers" command entry.
10939 * NEWS: Document "catch handlers" feature.
10941 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10943 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
10944 account when creating the array type of the slice.
10945 (ada_value_slice): Likewise.
10947 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10949 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
10951 (create_array_type_with_stride): Add byte_stride_prop parameter.
10952 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
10953 New parameter. Update all callers in this file.
10954 (array_type_has_dynamic_stride): New function.
10955 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
10956 of arrays with dynamic byte strides.
10957 * dwarf2read.c (read_array_type): Add support for dynamic
10958 DW_AT_byte_stride attributes.
10960 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10962 * dwarf2read.c (read_unspecified_type): Treat
10963 DW_TAG_enumeration_type DIEs from Ada units as stubs.
10965 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10967 Update copyright year range in all GDB files.
10969 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10971 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
10972 and gdb/testsuite/gdb.base/step-line.c.
10974 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10976 * copyright.py (main): Dump the contents of
10977 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
10978 even if BY_HAND is empty.
10980 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10982 * top.c (print_gdb_version): Update Copyright year in version
10985 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10987 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
10989 For older changes see ChangeLog-2017.
10995 version-control: never