1 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
3 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
5 2018-07-25 Joel Brobecker <brobecker@adacore.com>
7 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
9 2018-07-24 Keith Seitz <keiths@redhat.comt
12 * dwarf2read.c (dw2_add_symbol_to_list): New function.
13 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
14 instead of add_symbol_to_list.
15 (read_file_scope): Call prepare_one_comp_unit before reading
18 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
20 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
22 2018-07-24 Tom Tromey <tom@tromey.com>
24 * utils.c (malloc, realloc, free): Don't declare.
25 * configure, config.in: Rebuild.
26 * configure.ac: Don't check for declarations of free, malloc, or
29 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
32 (aarch64_linux_nat_target::stopped_data_address): Remove unused
34 * arm-linux-nat.c (fetch_regs): Likewise.
35 (store_regs): Likewise.
36 (fetch_vfp_regs): Likewise.
37 (store_vfp_regs): Likewise.
38 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
39 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
40 (arm_linux_nat_target::insert_watchpoint): Likewise.
41 (arm_linux_nat_target::remove_watchpoint): Likewise.
42 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
44 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
46 * ppc-linux-nat.c (fetch_register): Likewise.
47 (fetch_all_gp_regs): Likewise.
48 (fetch_ppc_registers): Likewise.
49 (store_all_gp_regs): Likewise.
50 (store_ppc_registers): Likewise.
51 (hwdebug_insert_point): Likewise.
52 (can_use_watchpoint_cond_accel): Likewise.
53 * remote-sim.c (gdb_os_write_stdout): Likewise.
55 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
56 Tom Tromey <tom@tromey.com>
58 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
62 2018-07-22 Tom Tromey <tom@tromey.com>
64 * regformats/regdat.sh: Define xmltarget_${name} inside
65 #ifndef IN_PROCESS_AGENT.
67 2018-07-22 Tom Tromey <tom@tromey.com>
69 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
71 2018-07-22 Tom Tromey <tom@tromey.com>
73 * symfile.c (reread_symbols): Notify iter, not objfile.
75 2018-07-22 Tom Tromey <tom@tromey.com>
77 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
79 (ravenscar_thread_target::prepare_to_store): Likewise.
81 2018-07-22 Tom Tromey <tom@tromey.com>
83 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
84 unused variable. Call value_fetch_lazy when needed.
85 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
86 Remove unused variable. Call value_fetch_lazy when needed.
88 2018-07-22 Tom Tromey <tom@tromey.com>
90 * m32c-tdep.c (mark_dma): Return void.
91 (make_regs): Remove unused declarations.
93 2018-07-22 Tom Tromey <tom@tromey.com>
95 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
96 cmdscm_get_valid_command_smob_arg_unsafe for effect.
97 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
98 bkscm_get_valid_block_smob_arg_unsafe for effect.
100 2018-07-22 Tom Tromey <tom@tromey.com>
102 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
105 2018-07-22 Tom Tromey <tom@tromey.com>
107 * windows-nat.c (saved_context): Conditionally define.
108 * remote.c (remote_target::remote_btrace_maybe_reopen):
109 Conditionally declare "warned".
110 * inflow.c (sigquit_ours): Conditionally define.
111 (new_tty): Move "tty" declaration inside #if.
112 * guile/guile.c (guile_datadir): Conditionally define.
113 * charset.c (set_be_le_names): Move some declarations inside #if.
114 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
116 (parse_xml_btrace_conf): Likewise.
118 2018-07-22 Tom Tromey <tom@tromey.com>
120 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
122 2018-07-22 Tom Tromey <tom@tromey.com>
124 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
125 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
126 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
127 * buildsym-legacy.c (get_macro_table): Remove unused variable.
128 * stack.c (frame_apply_level_command): Remove unused variable.
129 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
130 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
131 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
133 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
134 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
135 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
137 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
138 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
140 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
141 Remove unused variable.
142 * cli/cli-script.c (recurse_read_control_structure): Remove unused
144 * common/tdesc.c (print_xml_feature::visit): Remove unused
146 * compile/compile-object-load.c (store_regs): Remove unused
148 * complaints.c (clear_complaints): Remove unused variable.
149 * corelow.c (core_target_open): Remove unused variable.
150 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
152 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
154 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
156 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
158 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
160 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
162 * ia64-tdep.c (examine_prologue): Remove unused variable.
163 * infcall.c (run_inferior_call): Remove unused variable.
164 * inferior.c (exit_inferior): Remove unused variable.
165 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
166 * linespec.c (decode_line_2): Remove unused variable.
167 * linux-nat.c (super_close): Remove.
168 * linux-tdep.c (linux_info_proc): Remove unused variable.
169 * mi/mi-main.c (mi_execute_command): Remove unused variable.
170 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
171 Remove unused variable.
172 * parse.c (find_minsym_type_and_address): Remove unused variable.
173 * printcmd.c (info_symbol_command, printf_floating): Remove unused
175 * python/py-breakpoint.c (bppy_set_commands): Remove unused
177 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
179 * record-btrace.c (record_btrace_target::store_registers): Remove
181 (cmd_show_record_btrace_cpu): Remove unused variable.
182 * riscv-tdep.c (riscv_register_reggroup_p)
183 (riscv_push_dummy_call, riscv_return_value): Remove unused
185 * rust-exp.y (literal): Remove unused variable.
186 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
188 <STRUCTOP_ANONYMOUS>: Likewise.
189 * s390-linux-tdep.c (s390_linux_init_abi_31)
190 (s390_linux_init_abi_64): Remove unused variable.
191 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
192 (file_select_thread, net_windows_open, _initialize_ser_windows):
193 Remove unused variables.
194 * symtab.c (find_pc_sect_line): Remove unused variable.
195 * target-memory.c (compute_garbled_blocks): Remove unused
197 (target_write_memory_blocks): Remove unused variable.
198 * target.c (target_stack::unpush): Remove unused variables.
199 * tracepoint.c (start_tracing, all_tracepoint_actions)
200 (merge_uploaded_trace_state_variables)
201 (print_one_static_tracepoint_marker): Remove unused variable.
202 * unittests/basic_string_view/element_access/char/1.cc (test01):
203 Remove unused variable.
204 * windows-nat.c (windows_continue, windows_add_all_dlls)
205 (do_initial_windows_stuff, windows_nat_target::create_inferior):
206 Remove unused variables.
208 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
210 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
211 attr_profile in HAVE_ELF.
212 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
215 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
217 * frame.c (frame_register_unwind): Change parameter name.
218 (frame_unwind_register): Likewise.
219 (frame_unwind_register_value): Likewise.
220 (frame_unwind_register_signed): Likewise.
221 (frame_unwind_register_unsigned): Likewise.
222 * frame.h (frame_register_unwind): Likewise.
223 (frame_unwind_register): Likewise.
224 (frame_unwind_register_value): Likewise.
225 (frame_unwind_register_signed): Likewise.
226 (frame_unwind_register_unsigned): Likewise.
227 (frame_unwind_arch): Likewise.
229 2018-07-20 Maciej W. Rozycki <macro@mips.com>
231 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
234 2018-07-20 Maciej W. Rozycki <macro@mips.com>
236 * mips-linux-nat.c (mips_linux_nat_target::read_description):
237 Call `get_ptrace_pid' rather than extracting the ptrace PID by
240 2018-07-20 Keith Seitz <keiths@redhat.com>
242 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
243 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
244 m_compunit_symtab, m_language>: Add "m_" prefix.
246 * buildsym.c: Update all uses.
248 2018-07-20 Tom Tromey <tom@tromey.com>
250 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
251 * buildsym.h (record_line_ftype): Remove typedef.
253 2018-07-20 Tom Tromey <tom@tromey.com>
255 * buildsym-legacy.h (augment_type_symtab): Don't declare.
256 (end_expandable_symtab): Likewise.
257 (end_symtab_get_static_block): Likewise.
258 (end_symtab_from_static_block): Likewise.
259 * buildsym-legacy.c (augment_type_symtab): Remove.
260 (end_expandable_symtab): Remove.
261 (end_symtab_get_static_block): Remove.
262 (end_symtab_from_static_block): Remove.
264 2018-07-20 Tom Tromey <tom@tromey.com>
266 * dwarf2read.c: Include buildsym.h.
267 (struct dwarf2_cu) <builder>: New method.
268 (fixup_go_packaging): Update.
269 (process_full_comp_unit, process_full_type_unit): Update. Don't
270 use scoped_free_pendings.
271 (using_directives): Add "cu" parameter, remove "language".
272 (read_import_statement, setup_type_unit_groups, )
273 (read_func_scope, read_lexical_block_scope)
274 (dwarf2_record_block_ranges, read_namespace): Update.
275 (lnp_state_machine::lnp_state_machine): Add cu parameter.
276 (lnp_state_machine::handle_end_sequence): Update.
277 (class lnp_state_machine) <m_cu>: New member.
278 <m_record_line_callback>: Remove.
279 <m_currently_recording_lines>: New member.
280 (lnp_state_machine::handle_set_file): Update.
281 (noop_record_line): Remove.
282 (dwarf_record_line_p): Add cu parameter.
283 (dwarf_record_line_1, dwarf_finish_line): Likewise.
284 (lnp_state_machine::record_line)
285 (lnp_state_machine::lnp_state_machine)
286 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
287 (dwarf_decode_lines): Update.
288 (dwarf2_start_subfile): Add cu parameter.
289 (dwarf2_start_symtab, new_symbol): Update.
290 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
291 Remove dwarf2_per_objfile parameter.
292 (dwarf_decode_macros): Update.
294 2018-07-20 Tom Tromey <tom@tromey.com>
296 * stabsread.c (define_symbol): Update.
297 * buildsym-legacy.h (get_buildsym_compunit): Declare.
298 * dwarf2read.c (new_symbol): Update.
299 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
300 * cp-namespace.c: Include buildsym.h.
301 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
302 * buildsym-legacy.c (get_buildsym_compunit): New function.
304 2018-07-20 Tom Tromey <tom@tromey.com>
306 * xcoffread.c: Include buildsym-legacy.h.
307 * windows-nat.c: Include buildsym-legacy.h.
308 * stabsread.c: Include buildsym-legacy.h.
309 * mdebugread.c: Include buildsym-legacy.h.
310 * buildsym-legacy.h: New file.
311 * buildsym-legacy.c: New file, from buildsym.c.
312 * go32-nat.c: Include buildsym-legacy.h.
313 * dwarf2read.c: Include buildsym-legacy.h.
314 * dbxread.c: Include buildsym-legacy.h.
315 * cp-namespace.c: Include buildsym-legacy.h.
316 * coffread.c: Include buildsym-legacy.h.
317 * buildsym.h: Move some contents to buildsym-legacy.h.
318 * buildsym.c: Include buildsym-legacy.h. Move many functions to
320 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
322 2018-07-20 Tom Tromey <tom@tromey.com>
324 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
325 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
326 (buildsym_compunit::buildsym_compunit)
327 (buildsym_compunit::~buildsym_compunit)
328 (buildsym_compunit::get_macro_table): Define.
330 2018-07-20 Tom Tromey <tom@tromey.com>
332 * buildsym.c (reset_symtab_globals): Remove.
333 (buildsym_compunit::end_symtab_from_static_block): Update.
334 (buildsym_compunit::augment_type_symtab): Update.
335 (end_symtab_from_static_block): Call free_buildsym_compunit.
336 (augment_type_symtab, end_symtab, end_expandable_symtab):
339 2018-07-20 Tom Tromey <tom@tromey.com>
341 * arch-utils.c: Do not include buildsym.h.
342 * mipsread.c: Do not include buildsym.h.
343 * machoread.c: Do not include buildsym.h.
344 * elfread.c: Do not include buildsym.h.
346 2018-07-20 Tom Tromey <tom@tromey.com>
348 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
350 (buildsym_compunit): Add new constructor.
351 (struct buildsym_compunit) <get_last_source_file, finish_block,
352 record_block_range, start_subfile, patch_subfile_names,
353 push_subfile, pop_subfile, record_line, get_compunit_symtab,
354 set_last_source_start_addr, get_last_source_start_addr,
355 get_local_using_directives, set_local_using_directives,
356 get_global_using_directives, outermost_context_p,
357 get_current_context_stack, get_context_stack_depth,
358 get_current_subfile, get_local_symbols, get_file_symbols,
359 get_global_symbols, record_debugformat, record_producer,
360 push_context, pop_context, end_symtab_get_static_block,
361 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
363 <record_pending_block, finish_block_internal, make_blockvector,
364 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
368 2018-05-22 Tom Tromey <tom@tromey.com>
370 * buildsym.c (record_pending_block): Move earlier. Remove objfile
372 (finish_block_internal): Update.
374 2018-07-20 Tom Tromey <tom@tromey.com>
376 * buildsym.c (record_pending_block): Move earlier. Remove objfile
378 (finish_block_internal): Update.
380 2018-07-20 Tom Tromey <tom@tromey.com>
382 * buildsym.h (EXTERN): Don't define or undef.
383 * buildsym.c (EXTERN): Don't define.
385 2018-07-20 Tom Tromey <tom@tromey.com>
387 * buildsym.c: Remove TODO comment.
389 2018-07-20 Tom Tromey <tom@tromey.com>
391 * coffread.c (coff_symtab_read): Update.
392 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
393 (xcoff_new_init): Update.
394 * mipsread.c (mipscoff_new_init): Update.
395 * mdebugread.c (mdebug_build_psymtabs): Update.
396 * elfread.c (elf_new_init): Update.
397 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
399 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
400 (coffstab_build_psymtabs, elfstab_build_psymtabs)
401 (stabsect_build_psymtabs): Update.
402 * buildsym.h (buildsym_init): Don't declare.
403 * buildsym.c: Update comment.
404 (prepare_for_building): Remove.
405 (start_symtab, restart_symtab): Update.
406 (reset_symtab_globals): Update comment.
407 (buildsym_init): Remove.
409 2018-07-20 Tom Tromey <tom@tromey.com>
411 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
412 * stabsread.c (patch_block_stabs, define_symbol, read_type)
413 (read_enum_type, common_block_start, common_block_end)
414 (cleanup_undefined_types_1, finish_global_stabs): Update.
415 * mdebugread.c (psymtab_to_symtab_1): Update.
416 * dwarf2read.c (fixup_go_packaging, read_func_scope)
417 (read_lexical_block_scope, new_symbol): Update.
418 * dbxread.c (process_one_symbol): Update.
419 * coffread.c (coff_symtab_read, process_coff_symbol)
420 (coff_read_enum_type): Update.
421 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
423 (get_local_symbols, get_file_symbols, get_global_symbols): New
425 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
427 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
428 (~scoped_free_pendings): Update.
429 (finish_block, prepare_for_building, reset_symtab_globals)
430 (end_symtab_get_static_block, end_symtab_with_blockvector)
431 (augment_type_symtab, push_context): Update.
432 (get_local_symbols, get_file_symbols, get_global_symbols): New
434 (buildsym_init): Update.
436 2018-07-20 Tom Tromey <tom@tromey.com>
438 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
439 (process_full_type_unit): Likewise.
440 (dwarf2_start_symtab): Set list_in_scope.
442 2018-07-20 Tom Tromey <tom@tromey.com>
444 * dwarf2read.c (process_psymtab_comp_unit_reader)
445 (build_type_psymtabs_reader): Do not set list_in_scope.
447 2018-07-20 Tom Tromey <tom@tromey.com>
449 * buildsym.c (free_pendings): Remove.
450 (add_symbol_to_list, scoped_free_pendings)
451 (finish_block_internal, buildsym_init): Update.
453 2018-07-20 Tom Tromey <tom@tromey.com>
455 * xcoffread.c (read_xcoff_symtab): Update.
456 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
458 * dbxread.c (process_one_symbol): Update.
459 * coffread.c (coff_symtab_read): Update.
460 * buildsym.h (finish_block): Update.
461 * buildsym.c (finish_block): Remove "listhead" argument.
462 (end_symtab_get_static_block): Update.
464 2018-07-20 Tom Tromey <tom@tromey.com>
466 * buildsym.h (class scoped_free_pendings): Remove constructor.
467 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
469 <m_pending_block_obstack, m_pending_blocks>: New members.
470 (pending_block_obstack, pending_blocks): Remove.
471 (scoped_free_pendings::scoped_free_pendings): Default.
472 (~scoped_free_pendings): Update.
473 (free_pending_blocks): Remove.
474 (finish_block_internal, record_pending_block, make_blockvector)
475 (end_symtab_get_static_block, augment_type_symtab, push_context)
476 (buildsym_init): Update.
478 2018-07-20 Tom Tromey <tom@tromey.com>
480 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
481 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
483 (pending_addrmap, pending_addrmap_obstack)
484 (pending_addrmap_interesting): Remove.
485 (scoped_free_pendings, record_block_range, make_blockvector)
486 (prepare_for_building, reset_symtab_globals, buildsym_init):
489 2018-07-20 Tom Tromey <tom@tromey.com>
491 * xcoffread.c (process_linenos): Update.
492 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
493 * mdebugread.c (psymtab_to_symtab_1): Update.
494 * dwarf2read.c (setup_type_unit_groups)
495 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
496 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
497 * dbxread.c (process_one_symbol): Update.
498 * coffread.c (coff_symtab_read, enter_linenos)
499 (process_coff_symbol): Update.
500 * buildsym.h (current_subfile): Don't declare.
501 (get_current_subfile): Declare.
502 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
504 (start_subfile, free_buildsym_compunit, push_subfile)
505 (prepare_for_building, start_symtab): Update.
506 (get_current_subfile): New function.
508 2018-07-20 Tom Tromey <tom@tromey.com>
510 * coffread.c (coff_symtab_read): Update.
511 * xcoffread.c (read_xcoff_symtab): Update.
512 * dwarf2read.c (new_symbol): Update.
513 (read_func_scope, read_lexical_block_scope): Update.
514 * dbxread.c (process_one_symbol): Update.
515 * buildsym.h (context_stack, context_stack_depth): Don't declare.
516 (outermost_context_p): Remove macro.
517 (outermost_context_p, get_current_context_stack)
518 (get_context_stack_depth): Declare.
519 (pop_context): Return struct context_stack.
520 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
522 (context_stack_size): Remove.
523 (INITIAL_CONTEXT_STACK_SIZE): Remove.
524 (prepare_for_building, end_symtab_get_static_block)
525 (augment_type_symtab, push_context): Update.
526 (pop_context): Return struct context_stack.
527 (outermost_context_p, get_current_context_stack)
528 (get_context_stack_depth): New functions.
529 (buildsym_init): Update.
531 2018-07-20 Tom Tromey <tom@tromey.com>
533 * rust-exp.y: Now a pure parser. Update all rules.
534 (%union): Move earlier.
535 (current_parser, work_obstack): Remove globals.
536 (rust_parser, ~rust_parser): Update.
537 (class rust_parser) <copy_name, concat3, crate_name, super_name,
538 lex_character, lex_number, lex_string, lex_identifier,
539 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
540 convert_name, convert_params_to_expression,
541 convert_ast_to_expression, ast_basic_type, ast_operation,
542 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
543 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
544 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
545 ast_array_type, ast_slice_type, ast_reference_type,
546 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
547 (rust_parse): Update.
548 (rustyyerror, rustyylex): Add parser parameter.
549 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
550 (rust_lex_stringish_test, rust_lex_test_sequence)
551 (rust_lex_test_trailing_dot, rust_lex_test_completion)
552 (rust_lex_test_push_back, rust_lex_tests): Update.
554 2018-07-19 Pedro Alves <palves@redhat.com>
556 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
557 gdb::unique_xmalloc_ptr.
558 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
559 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
560 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
562 * guile/scm-pretty-print.c (ppscm_print_children): Use
563 gdb::unique_xmalloc_ptr instead of cleanups.
564 (gdbscm_apply_val_pretty_printer): Remove cleanups.
565 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
566 gdb::unique_xmalloc_ptr.
567 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
568 Adjust to use gdb::unique_xmalloc_ptr.
569 * guile/scm-utils.c (extract_arg): Adjust.
570 * guile/scm-value.c (gdbscm_value_field): Adjust to use
571 gdb::unique_xmalloc_ptr instead of a cleanup.
573 2018-07-19 Tom Tromey <tom@tromey.com>
575 * utils.c (do_value_free_to_mark)
576 (make_cleanup_value_free_to_mark): Remove.
577 * utils.h (make_cleanup_value_free_to_mark): Remove.
579 2018-07-19 Pedro Alves <palves@redhat.com>
581 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
582 forwarding reference.
584 2018-07-18 Pedro Alves <palves@redhat.com>
586 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
587 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
590 2018-07-18 Pedro Alves <palves@redhat.com>
592 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
594 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
596 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
597 directly instead of a cleanup.
598 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
599 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
600 (vlscm_binop_gdbthrow): New, factored out from ...
601 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
602 (vlscm_rich_compare): Use gdbscm_wrap.
603 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
604 instead of a cleanup.
605 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
607 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
608 Use xfree directly instead of a cleanup.
609 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
610 Adjust to use gdbscm_wrap and scoped_value_mark.
611 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
612 (gdbscm_value_address, gdbscm_value_dereference)
613 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
615 (gdbscm_value_dynamic_type): Use scoped_value_mark.
616 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
618 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
619 gdbscm_wrap and scoped_value_mark.
620 (gdbscm_value_to_string): Use xfree directly instead of a
621 cleanup. Move 'buffer' unique_ptr to TRY scope.
622 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
623 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
625 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
626 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
628 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
631 2018-07-18 Tom de Vries <tdevries@suse.de>
633 * findvar.c (default_read_var_value): Also resolve dynamic type for
634 LOC_OPTIMIZED_OUT vars.
636 2018-07-18 Maciej W. Rozycki <macro@mips.com>
638 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
641 2018-07-17 Tom Tromey <tom@tromey.com>
643 * guile/scm-param.c (pascm_set_func, pascm_show_func)
644 (compute_enum_list, pascm_set_param_value_x)
645 (gdbscm_parameter_value): Update.
646 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
647 (gdbscm_scm_to_host_string): Update.
648 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
650 * guile/scm-cmd.c (cmdscm_add_completion): Update.
651 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
652 * guile/scm-string.c (gdbscm_scm_to_string): Return
654 (gdbscm_scm_to_host_string): Likewise.
656 2018-07-17 Tom Tromey <tom@tromey.com>
658 * guile/guile.c (gdbscm_eval_from_control_command): Update.
659 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
660 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
661 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
664 2018-07-17 Tom Tromey <tom@tromey.com>
666 * guile/scm-param.c (pascm_signal_setshow_error): Update.
667 * guile/guile-internal.h (gdbscm_exception_message_to_string):
669 * guile/scm-cmd.c (cmdscm_function): Update.
670 * guile/scm-pretty-print.c
671 (ppscm_print_exception_unless_memory_error): Update.
672 * guile/scm-exception.c (gdbscm_exception_message_to_string):
673 Return unique_xmalloc_ptr.
675 2018-07-17 Tom Tromey <tom@tromey.com>
677 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
680 2018-07-17 Jim Wilson <jimw@sifive.com>
682 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
683 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
684 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
685 unecessary braces after EF_RISCV_RVC test. Delete call to
686 set_gdbarch_decr_pc_after_break.
688 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
689 RISCV_LAST_FP_REGNUM + 1.
690 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
692 2018-07-17 Tom Tromey <tom@tromey.com>
694 * configure.ac: Remove --disable-gdbcli.
695 * configure: Rebuild.
696 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
697 (SUBDIR_CLI_CFLAGS): Remove.
698 (SFILES): Use SUBDIR_CLI_SRCS.
699 (COMMON_OBS): Use SUBDIR_CLI_OBS.
701 2018-07-17 Tom Tromey <tom@tromey.com>
704 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
706 2018-07-16 Jim Wilson <jimw@sifive.com>
708 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
710 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
712 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
714 (libunwind_frame_sniffer): Likewise.
715 (libunwind_frame_prev_register): Likewise.
716 (libunwind_sigtramp_frame_sniffer): Likewise.
717 * ia64-tdep.c (ia64_access_reg): Likewise.
718 (ia64_access_rse_reg): Likewise.
719 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
720 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
722 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
724 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
726 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
728 * remote-sim.c (gdbsim_target::close,
729 gdbsim_target::mourn_inferior): Remove unused variables.
731 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
733 * ia64-tdep.c (ktab_buf): New global.
734 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
735 (get_kernel_table): Adjust.
737 2018-07-16 Tom Tromey <tom@tromey.com>
739 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
740 * dwarf2read.c (using_directives, new_symbol): Use
742 * dbxread.c (process_one_symbol): Use outermost_context_p.
743 * coffread.c (coff_symtab_read): Use outermost_context_p.
745 2018-07-16 Tom Tromey <tom@tromey.com>
747 * dwarf2read.c (using_directives, read_func_scope)
748 (read_lexical_block_scope): Update.
749 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
750 * buildsym.h (local_using_directives, global_using_directives):
752 (get_local_using_directives, set_local_using_directives)
753 (get_global_using_directives): Declare.
754 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
755 m_global_using_directives>: New members.
756 (finish_block_internal, prepare_for_building)
757 (reset_symtab_globals, end_symtab_get_static_block)
758 (push_context): Update.
759 (get_local_using_directives, set_local_using_directives)
760 (get_global_using_directives): New functions.
761 (buildsym_init): Update.
763 2018-07-16 Tom Tromey <tom@tromey.com>
765 * xcoffread.c (xcoff_initial_scan): Don't call
767 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
768 * buildsym.h (class scoped_free_pendings): Add constructor.
769 (free_pending_blocks): Don't declare.
770 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
771 (free_pending_blocks): Now static.
773 2018-07-16 Tom Tromey <tom@tromey.com>
775 * buildsym.h (push_subfile, pop_subfile): Update declarations.
776 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
778 (struct subfile_stack): Remove.
779 (subfile_stack): Remove.
780 (push_subfile, pop_subfile, buildsym_init): Update.
782 2018-07-16 Tom Tromey <tom@tromey.com>
784 * buildsym.c (push_subfile): Use gdb_assert.
785 (pop_subfile): Use gdb_assert.
787 2018-07-16 Tom Tromey <tom@tromey.com>
789 * buildsym.h (merge_symbol_lists): Remove.
790 * buildsym.c (merge_symbol_lists): Remove.
792 2018-07-16 Tom Tromey <tom@tromey.com>
794 * stabsread.c (scan_file_globals): Update comment.
795 * stabsread.h (scan_file_globals): Move from buildsym.h.
796 * buildsym.h (scan_file_globals): Move to stabsread.h.
798 2018-07-16 Tom Tromey <tom@tromey.com>
800 * xcoffread.c (xcoff_new_init): Update.
801 * mipsread.c (mipscoff_new_init): Update.
802 * mdebugread.c (mdebug_build_psymtabs): Update.
803 * elfread.c (elf_new_init): Update.
804 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
805 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
806 * buildsym.h (buildsym_new_init): Don't declare.
807 * buildsym.c (buildsym_new_init): Remove.
809 2018-07-16 Tom Tromey <tom@tromey.com>
811 * stabsread.h (within_function): Move from buildsym.h.
812 * stabsread.c (start_stabs): Clear within_function.
813 * coffread.c (coff_start_symtab): Clear within_function.
814 * buildsym.h (within_function): Move to stabsread.h.
815 * buildsym.c (prepare_for_building): Update.
817 2018-07-16 Tom Tromey <tom@tromey.com>
819 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
820 * dwarf2read.c (dwarf2_start_symtab): Don't set
821 processing_gcc_compilation.
822 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
824 2018-07-16 Tom Tromey <tom@tromey.com>
826 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
827 (next_symbol_text_func): Move from buildsym.h.
828 * stabsread.c (hashname): Move from buildsym.c.
829 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
830 (next_symbol_text_func, hashname): Move to stabsread.h.
831 * buildsym.c: Don't include bcache.h
832 (hashname): Move to stasbread.c.
834 2018-07-16 Tom Tromey <tom@tromey.com>
836 * buildsym.h (context_stack_size): Don't declare.
837 * buildsym.c (context_stack_size): New global.
839 2018-07-16 Tom Tromey <tom@tromey.com>
841 * dbxread.c (processing_acc_compilation): New global.
842 * buildsym.h (processing_acc_compilation): Don't declare.
844 2018-07-16 Tom Tromey <tom@tromey.com>
846 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
847 * dbxread.c (read_ofile_symtab): Update.
848 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
849 * buildsym.h (last_source_start_addr): Remove.
850 (set_last_source_start_addr, get_last_source_start_addr):
852 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
854 (struct buildsym_compunit) <m_last_source_start_addr>: New
856 (prepare_for_building): Remove start_addr parameter.
857 (start_symtab, restart_symtab, end_symtab_get_static_block)
858 (end_symtab_with_blockvector): Update.
859 (set_last_source_start_addr, get_last_source_start_addr): New
862 2018-07-16 Tom Tromey <tom@tromey.com>
864 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
866 (have_line_numbers): Remove.
867 (record_line, prepare_for_building, end_symtab_get_static_block)
868 (augment_type_symtab): Update.
870 2018-07-16 Tom Tromey <tom@tromey.com>
872 * buildsym.c (~buildsym_compunit): Free the macro table.
873 (struct buildsym_compunit) <get_macro_table, release_macros>: New
875 <m_pending_macros>: New member.
876 (pending_macros): Remove.
877 (~scoped_free_pendings, get_macro_table, prepare_for_building)
878 (reset_symtab_globals, end_symtab_get_static_block)
879 (end_symtab_with_blockvector, augment_type_symtab)
880 (buildsym_init): Update.
882 2018-07-16 Tom Tromey <tom@tromey.com>
884 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
886 (buildsym_compunit::set_last_source_file): New method.
887 <m_last_source_file>: New member.
888 (prepare_for_building): Remove "name" parameter.
889 (start_symtab, restart_symtab, reset_symtab_globals): Update.
890 (last_source_file): Remove.
891 (set_last_source_file, get_last_source_file): Update.
893 2018-07-16 Tom Tromey <tom@tromey.com>
895 * buildsym.c (prepare_for_building): Add assert.
897 2018-07-16 Tom Tromey <tom@tromey.com>
899 * buildsym.c (~buildsym_compunit): Update.
900 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
901 (start_subfile, patch_subfile_names)
902 (end_symtab_with_blockvector): Update.
904 2018-07-16 Tom Tromey <tom@tromey.com>
906 * buildsym.c (struct buildsym_compunit): Add constructor,
907 destructor, initializers.
908 (start_buildsym_compunit): Remove.
909 (free_buildsym_compunit): Use "delete".
910 (start_symtab, restart_symtab): Use "new".
912 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
914 * symfile.c (set_objfile_default_section_offset): Remove struct
917 2018-07-14 Stafford Horne <shorne@gmail.com>
919 * (Responsible Maintainers): Add myself as or1k maintainer.
921 2018-07-13 Tom Tromey <tom@tromey.com>
923 * symfile.c (set_objfile_default_section_offset): Use extra braces
926 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
928 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
931 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
933 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
934 unittests/cli-utils-selftests.c
935 * unittests/cli-utils-selftests.c: New file.
937 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
939 * NEWS: Mention new commands. Mention change to 'thread apply'.
941 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
943 * thread.c (thr_try_catch_cmd): New function.
944 (thread_apply_all_command): Handle qcs flags.
945 (thread_apply_command): Handle qcs flags.
946 (taas_command): New function.
947 (tfaas_command): New function.
948 (_initialize_thread): Update to setup the new commands 'taas
949 and 'tfaas'. Change doc string for 'thread apply'.
951 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
953 * stack.c: (trailing_outermost_frame): New function, mostly
954 extracted from backtrace_command_1.
955 (leading_innermost_frame): New function.
956 (backtrace_command_1): Update to call trailing_outermost_frame.
957 (frame_apply_command_count): New function.
958 (frame_apply_level_command): New function.
959 (frame_apply_all_command): New function.
960 (frame_apply_command): New function.
961 (faas_command): New function.
962 (frame_cmd_list): New variable.
963 (_initialize_stack): Update to setup the new commands 'frame apply'
966 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
968 * cli-utils.c (number_or_range_parser::get_number): Only handle
969 numbers or convenience var as numbers.
970 (parse_flags): New function.
971 (parse_flags_qcs): New function.
972 (number_or_range_parser::finished): Ensure parsing end is detected
973 before end of string.
974 * cli-utils.h (parse_flags): New function.
975 (parse_flags_qcs): New function.
976 (number_or_range_parser): Remove m_finished bool.
977 (number_or_range_parser::skip_range): Set m_in_range to false.
979 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
981 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
984 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
985 Jan Kratochvil <jan.kratochvil@redhat.com>
986 Paul Fertser <fercerpav@gmail.com>
987 Tsutomu Seki <sekiriki@gmail.com>
988 Pedro Alves <palves@redhat.com>
990 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
991 'unittests/parse-connection-spec-selftests.c'.
992 (COMMON_SFILES): Add 'common/netstuff.c'.
993 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
994 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
995 * common/netstuff.c: New file.
996 * common/netstuff.h: New file.
997 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
998 (wait_for_connect): Update comment. New parameter
999 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1000 Use 'sock' directly instead of 'scb->fd'.
1001 (try_connect): New function, with code from 'net_open'.
1002 (net_open): Rewrite main loop to deal with multiple
1003 sockets/addresses. Handle IPv6-style hostnames; implement
1004 support for IPv6 connections.
1005 * unittests/parse-connection-spec-selftests.c: New file.
1007 2018-07-11 Pedro Alves <palves@redhat.com>
1010 * remote.c (remote_target::remote_detach_pid): Call
1011 set_current_process.
1013 2018-07-11 Pedro Alves <palves@redhat.com>
1015 * h8300-tdep.c (h8300_gdbarch_init): Remove
1016 set_gdbarch_ecoff_reg_to_regnum calls.
1018 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1021 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1022 offsets/sizes for static members of a class/struct.
1024 2018-07-11 Alan Hayward <alan.hayward@arm.com>
1026 * target-descriptions.c (tdesc_register_bitsize): Rename.
1027 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1028 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1029 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1031 2018-07-10 Tom Tromey <tom@tromey.com>
1033 * breakpoint.c (moribund_locations): Now static and a
1035 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1036 (build_bpstat_chain, update_global_location_list)
1037 (breakpoint_retire_moribund): Update.
1038 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1041 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1043 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1044 (riscv_register_reggroup_p): Use new function, remove unneeded
1046 (riscv_push_dummy_call): Extend assert to compare against xlen or
1047 flen based on register type.
1049 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1051 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1053 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1055 * remote.c (show_hardware_watchpoint_limit): New function.
1056 (show_hardware_watchpoint_length_limit): New function.
1057 (show_hardware_breakpoint_limit): New function.
1058 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1059 where appropriate, update help text.
1061 2018-07-09 Tom Tromey <tom@tromey.com>
1063 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1064 (CLIBS): Don't mention NAT_CLIBS.
1066 2018-07-09 Tom Tromey <tom@tromey.com>
1068 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1069 (LIBGDB_OBS, clean mostlyclean): Update.
1070 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1072 2018-07-09 Tom Tromey <tom@tromey.com>
1074 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1075 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1076 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1078 2018-07-09 Tom Tromey <tom@tromey.com>
1080 * Makefile.in (ALLDEPFILES): Remove exec.c.
1081 (COMMON_OBS): Remove exec.o.
1082 (COMMON_SFILES): Add exec.c.
1084 2018-07-09 Tom Tromey <tom@tromey.com>
1086 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1088 2018-07-09 Tom Tromey <tom@tromey.com>
1090 * Makefile.in (clean mostlyclean): Remove stamp-version.
1091 (version.c): Depend on stamp-version.
1092 (stamp-version): New rule, from version.c rule.
1094 2018-07-09 Tom Tromey <tom@tromey.com>
1096 * Makefile.in (init.c): Depend on stamp-init.
1097 (stamp-init): New rule, from init.c rule.
1098 (clean mostlyclean): Remove stamp-init.
1100 2018-07-09 Tom Tromey <tom@tromey.com>
1102 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1103 SUBDIR_GCC_COMPILE_SRCS.
1105 2018-07-09 Tom Tromey <tom@tromey.com>
1107 * Makefile.in (init.c): Remove some unused sed rules.
1109 2018-07-09 Tom Tromey <tom@tromey.com>
1111 * Makefile.in (TSOBS): Remove.
1112 (INIT_FILES): Update.
1113 (LIBGDB_OBS): Update.
1114 (COMMON_SFILES): Add inflow.c.
1115 (SFILES): Remove inflow.c.
1117 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1119 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1121 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1123 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1124 get_saveloc_name, is_signal_frame_name, step_name,
1125 init_remote_name, create_addr_space_name,
1126 destroy_addr_space_name, search_unwind_table_name,
1127 find_dyn_list_name): Constify.
1129 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1131 * darwin-nat.c (darwin_pthread_kill): New function.
1132 (darwin_resume_thread): Use darwin_pthread_kill.
1134 2018-07-05 Tom de Vries <tdevries@suse.de>
1136 * macroexp.c (macro_buffer) <operator=>: New member function.
1138 2018-07-04 Tom Tromey <tom@tromey.com>
1140 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1142 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
1144 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1145 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1146 * maint.c: Likewise.
1149 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1151 * NEWS: Create a new section for the next release branch.
1152 Rename the section of the current branch, now that it has
1155 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1157 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1158 * version.in: Bump version to 8.2.50.DATE-git.
1160 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1161 Pedro Alves <palves@redhat.com>
1163 * linux-nat.c (linux_init_ptrace): Rename to ...
1164 (linux_init_ptrace_procfs): ... this. Call
1165 linux_proc_init_warnings.
1166 (linux_nat_target::post_attach)
1167 (linux_nat_target::post_startup_inferior): Adjust.
1168 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1169 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1171 2018-07-04 Tom de Vries <tdevries@suse.de>
1173 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1175 (read_comp_unit_head): ... here.
1177 2018-07-03 Tom Tromey <tom@tromey.com>
1179 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1180 (stop_tracing, tstatus_command)
1181 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1182 (print_one_static_tracepoint_marker): Update.
1183 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1185 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
1187 (all_tracepoints, static_tracepoints_here): Return std::vector.
1189 2018-07-03 Tom Tromey <tom@tromey.com>
1191 * common/ptid.c (ptid_equal): Remove.
1192 * common/ptid.h (ptid_equal): Don't declare.
1193 * ada-tasks.c: Update.
1194 * breakpoint.c: Update.
1195 * common/agent.c: Update.
1196 * corelow.c: Update.
1197 * darwin-nat-info.c: Update.
1198 * darwin-nat.c: Update.
1200 * dtrace-probe.c: Update.
1201 * dummy-frame.c: Update.
1202 * fbsd-nat.c: Update.
1204 * gdbthread.h: Update.
1205 * gnu-nat.c: Update.
1206 * go32-nat.c: Update.
1207 * inf-loop.c: Update.
1208 * inf-ptrace.c: Update.
1209 * infcall.c: Update.
1213 * linux-fork.c: Update.
1214 * linux-nat.c: Update.
1215 * linux-thread-db.c: Update.
1216 * mi/mi-cmd-var.c: Update.
1217 * mi/mi-interp.c: Update.
1218 * mi/mi-main.c: Update.
1219 * nto-procfs.c: Update.
1220 * ppc-linux-tdep.c: Update.
1222 * python/py-inferior.c: Update.
1223 * python/py-record-btrace.c: Update.
1224 * python/py-record.c: Update.
1225 * ravenscar-thread.c: Update.
1226 * regcache.c: Update.
1227 * remote-sim.c: Update.
1229 * sol-thread.c: Update.
1232 * tui/tui-stack.c: Update.
1234 * windows-nat.c: Update.
1235 * windows-tdep.c: Update.
1237 2018-07-03 Tom Tromey <tom@tromey.com>
1239 * common/ptid.c (ptid_match): Remove.
1240 * common/ptid.h (ptid_match): Don't declare.
1241 * fbsd-nat.c: Update.
1244 * linux-nat.c: Update.
1245 * record-btrace.c: Update.
1246 * regcache.c: Update.
1249 2018-07-03 Tom Tromey <tom@tromey.com>
1251 * common/ptid.c (ptid_tid_p): Remove.
1252 * common/ptid.h (ptid_tid_p): Don't declare.
1253 * sol-thread.c: Update.
1255 2018-07-03 Tom Tromey <tom@tromey.com>
1257 * common/ptid.c (ptid_lwp_p): Remove.
1258 * common/ptid.h (ptid_lwp_p): Don't declare.
1259 * fbsd-nat.c: Update.
1260 * linux-nat.c: Update.
1261 * nat/linux-procfs.c: Update.
1262 * nat/x86-linux-dregs.c: Update.
1263 * sol-thread.c: Update.
1265 2018-07-03 Tom Tromey <tom@tromey.com>
1267 * common/ptid.c (ptid_is_pid): Remove.
1268 * common/ptid.h (ptid_is_pid): Don't declare.
1270 * linux-nat.c: Update.
1271 * mi/mi-interp.c: Update.
1275 2018-07-03 Tom Tromey <tom@tromey.com>
1277 * common/ptid.c (ptid_get_tid): Remove.
1278 * common/ptid.h (ptid_get_tid): Don't declare.
1279 * ada-tasks.c: Update.
1280 * aix-thread.c: Update.
1281 * bsd-uthread.c: Update.
1282 * darwin-nat.c: Update.
1283 * fbsd-nat.c: Update.
1284 * i386-darwin-nat.c: Update.
1286 * linux-tdep.c: Update.
1287 * nto-procfs.c: Update.
1288 * ppc-ravenscar-thread.c: Update.
1289 * python/py-infthread.c: Update.
1290 * ravenscar-thread.c: Update.
1291 * sol-thread.c: Update.
1292 * sparc-ravenscar-thread.c: Update.
1293 * windows-nat.c: Update.
1295 2018-07-03 Tom Tromey <tom@tromey.com>
1297 * common/ptid.c (ptid_get_lwp): Remove.
1298 * common/ptid.h (ptid_get_lwp): Don't declare.
1299 * aarch64-linux-nat.c: Update.
1300 * ada-tasks.c: Update.
1301 * aix-thread.c: Update.
1302 * amd64-linux-nat.c: Update.
1303 * arm-linux-nat.c: Update.
1304 * corelow.c: Update.
1305 * fbsd-nat.c: Update.
1306 * fbsd-tdep.c: Update.
1307 * gnu-nat.c: Update.
1308 * i386-cygwin-tdep.c: Update.
1309 * i386-gnu-nat.c: Update.
1310 * i386-linux-nat.c: Update.
1311 * ia64-linux-nat.c: Update.
1312 * inf-ptrace.c: Update.
1314 * linux-fork.c: Update.
1315 * linux-nat.c: Update.
1316 * linux-tdep.c: Update.
1317 * linux-thread-db.c: Update.
1318 * mips-linux-nat.c: Update.
1319 * nat/aarch64-linux-hw-point.c: Update.
1320 * nat/aarch64-linux.c: Update.
1321 * nat/linux-btrace.c: Update.
1322 * nat/linux-osdata.c: Update.
1323 * nat/linux-procfs.c: Update.
1324 * nat/x86-linux-dregs.c: Update.
1325 * obsd-nat.c: Update.
1326 * ppc-fbsd-nat.c: Update.
1327 * ppc-linux-nat.c: Update.
1329 * python/py-infthread.c: Update.
1330 * ravenscar-thread.c: Update.
1332 * s390-linux-nat.c: Update.
1333 * sol-thread.c: Update.
1334 * sol2-tdep.c: Update.
1335 * spu-linux-nat.c: Update.
1336 * x86-linux-nat.c: Update.
1337 * xtensa-linux-nat.c: Update.
1339 2018-07-03 Tom Tromey <tom@tromey.com>
1341 * common/ptid.c (ptid_get_pid): Remove.
1342 * common/ptid.h (ptid_get_pid): Don't declare.
1343 * aarch64-linux-nat.c: Update.
1344 * ada-lang.c: Update.
1345 * aix-thread.c: Update.
1346 * alpha-bsd-nat.c: Update.
1347 * amd64-fbsd-nat.c: Update.
1348 * amd64-linux-nat.c: Update.
1349 * arm-linux-nat.c: Update.
1350 * arm-nbsd-nat.c: Update.
1352 * break-catch-syscall.c: Update.
1353 * breakpoint.c: Update.
1354 * bsd-uthread.c: Update.
1355 * corelow.c: Update.
1357 * darwin-nat.c: Update.
1358 * fbsd-nat.c: Update.
1359 * fbsd-tdep.c: Update.
1361 * gnu-nat.c: Update.
1362 * hppa-nbsd-nat.c: Update.
1363 * hppa-obsd-nat.c: Update.
1364 * i386-fbsd-nat.c: Update.
1365 * ia64-linux-nat.c: Update.
1366 * inf-ptrace.c: Update.
1368 * inferior.c: Update.
1369 * inferior.h: Update.
1372 * linux-fork.c: Update.
1373 * linux-nat.c: Update.
1374 * linux-tdep.c: Update.
1375 * linux-thread-db.c: Update.
1376 * m68k-bsd-nat.c: Update.
1377 * mi/mi-interp.c: Update.
1378 * mi/mi-main.c: Update.
1379 * mips-linux-nat.c: Update.
1380 * mips-nbsd-nat.c: Update.
1381 * mips64-obsd-nat.c: Update.
1382 * nat/aarch64-linux-hw-point.c: Update.
1383 * nat/aarch64-linux.c: Update.
1384 * nat/linux-btrace.c: Update.
1385 * nat/linux-osdata.c: Update.
1386 * nat/linux-procfs.c: Update.
1387 * nat/x86-linux-dregs.c: Update.
1388 * nto-procfs.c: Update.
1389 * obsd-nat.c: Update.
1390 * ppc-linux-nat.c: Update.
1391 * ppc-nbsd-nat.c: Update.
1392 * ppc-obsd-nat.c: Update.
1393 * proc-service.c: Update.
1395 * python/py-inferior.c: Update.
1396 * python/py-infthread.c: Update.
1397 * ravenscar-thread.c: Update.
1399 * remote-sim.c: Update.
1401 * rs6000-nat.c: Update.
1402 * s390-linux-nat.c: Update.
1403 * sh-nbsd-nat.c: Update.
1404 * sol-thread.c: Update.
1405 * sparc-nat.c: Update.
1406 * sparc64-tdep.c: Update.
1407 * spu-linux-nat.c: Update.
1408 * spu-tdep.c: Update.
1409 * target-debug.h: Update.
1412 * tid-parse.c: Update.
1413 * tracefile-tfile.c: Update.
1414 * vax-bsd-nat.c: Update.
1415 * windows-nat.c: Update.
1416 * x86-linux-nat.c: Update.
1417 * x86-nat.c: Update.
1419 2018-07-03 Tom Tromey <tom@tromey.com>
1421 * common/ptid.c (pid_to_ptid): Remove.
1422 * common/ptid.h (pid_to_ptid): Don't declare.
1423 * aix-thread.c: Update.
1424 * arm-linux-nat.c: Update.
1425 * common/ptid.c: Update.
1426 * common/ptid.h: Update.
1427 * corelow.c: Update.
1429 * darwin-nat.c: Update.
1430 * fbsd-nat.c: Update.
1431 * fork-child.c: Update.
1432 * gnu-nat.c: Update.
1433 * go32-nat.c: Update.
1434 * inf-ptrace.c: Update.
1436 * inferior.c: Update.
1438 * linux-fork.c: Update.
1439 * linux-nat.c: Update.
1440 * nat/aarch64-linux-hw-point.c: Update.
1441 * nat/fork-inferior.c: Update.
1442 * nat/x86-linux-dregs.c: Update.
1443 * nto-procfs.c: Update.
1444 * obsd-nat.c: Update.
1446 * progspace.c: Update.
1448 * rs6000-nat.c: Update.
1449 * s390-linux-nat.c: Update.
1450 * sol-thread.c: Update.
1451 * spu-linux-nat.c: Update.
1454 * tracefile-tfile.c: Update.
1455 * windows-nat.c: Update.
1457 2018-07-03 Tom Tromey <tom@tromey.com>
1459 * common/ptid.h (ptid_build): Don't declare.
1460 * common/ptid.c (ptid_build): Remove.
1461 * aix-thread.c: Update.
1462 * bsd-kvm.c: Update.
1463 * bsd-uthread.c: Update.
1464 * common/agent.c: Update.
1465 * common/ptid.c: Update.
1466 * common/ptid.h: Update.
1467 * corelow.c: Update.
1468 * darwin-nat.c: Update.
1469 * fbsd-nat.c: Update.
1470 * gnu-nat.c: Update.
1471 * linux-fork.c: Update.
1472 * linux-nat.c: Update.
1473 * linux-thread-db.c: Update.
1474 * nat/linux-osdata.c: Update.
1475 * nat/linux-procfs.c: Update.
1476 * nto-procfs.c: Update.
1477 * obsd-nat.c: Update.
1478 * proc-service.c: Update.
1480 * ravenscar-thread.c: Update.
1481 * remote-sim.c: Update.
1483 * sol-thread.c: Update.
1485 * windows-nat.c: Update.
1487 2018-07-03 Tom Tromey <tom@tromey.com>
1489 * infrun.c (follow_exec): Use exit_inferior_silent.
1490 * inferior.c (exit_inferior_num_silent): Remove.
1491 * inferior.h (exit_inferior_num_silent): Don't declare.
1493 2018-07-03 Tom Tromey <tom@tromey.com>
1496 * darwin-nat.c (darwin_attach_pid): Reset inferior and
1497 inferior_ptid on error.
1499 2018-07-02 Maciej W. Rozycki <macro@mips.com>
1500 Simon Marchi <simon.marchi@polymtl.ca>
1503 * disasm.h (gdb_disassembler): Add
1504 `m_disassembler_options_holder'. member
1505 * disasm.c (get_all_disassembler_options): New function.
1506 (gdb_disassembler::gdb_disassembler): Use it.
1507 (gdb_buffered_insn_length_init_dis): Likewise.
1508 (gdb_buffered_insn_length): Adjust accordingly.
1509 (set_disassembler_options): Handle options with arguments.
1510 (show_disassembler_options_sfunc): Likewise. Add a leading new
1511 line if showing options with descriptions.
1512 (disassembler_options_completer): Adapt to using the
1513 `disasm_options_and_args_t' structure.
1514 * mips-tdep.c (mips_disassembler_options): New variable.
1515 (mips_disassembler_options_o32): Likewise.
1516 (mips_disassembler_options_n32): Likewise.
1517 (mips_disassembler_options_n64): Likewise.
1518 (gdb_print_insn_mips): Don't set `disassembler_options'.
1519 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1521 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
1522 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
1523 `gdbarch_disassembler_options_implicit' and
1524 `gdbarch_valid_disassembler_options'.
1525 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
1526 `disasm_options_and_args_t' structure.
1527 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
1529 (valid_disassembler_options): Switch from `disasm_options_t' to
1530 the `disasm_options_and_args_t' structure.
1531 * NEWS: Document `set disassembler-options' support for the MIPS
1533 * gdbarch.h: Regenerate.
1534 * gdbarch.c: Regenerate.
1536 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
1538 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
1540 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1542 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
1543 parameter in call to amd64_target_description.
1544 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
1545 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
1546 (amd64fbsd_init_abi): Likewise.
1547 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
1548 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
1549 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
1550 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
1552 2018-06-29 Pedro Alves <palves@redhat.com>
1554 * gdb/amd64-tdep.h (amd64_create_target_description): Add
1555 "segments" parameter.
1556 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
1557 (_initialize_amd64_tdep): Update call to
1558 amd64_create_target_description.
1559 (amd64_target_description): Add "segments" parameter. Adjust
1560 the implementation to use it.
1561 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
1562 call to amd64_create_target_description.
1563 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
1564 * gdb/arch/amd64.h (amd64_create_target_description): Add
1565 "segments" register.
1566 * gdb/arch/amd64.c (amd64_create_target_description): Add
1567 "segments" parameter. Call create_feature_i386_64bit_segments
1568 only if SEGMENTS is true.
1569 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
1570 call to amd64_create_target_description.
1572 2018-06-29 Pedro Alves <palves@redhat.com>
1574 * thread.c (thread_target_id_str): New, factored out from ...
1575 (print_thread_info_1): ... here. Use it to compute the max
1576 "Target Id" column width.
1578 2018-06-29 Pedro Alves <palves@redhat.com>
1580 * remote.c (remote_target::extra_thread_info): Delete
1581 'display_buf' and 'n' locals. from the cache, regardless of
1582 packet mechanims is in use. Use cache for qThreadExtra and qP
1585 2018-06-29 Pedro Alves <palves@redhat.com>
1587 * blockframe.c (find_pc_sect_containing_function): New function.
1588 * breakpoint.c (print_breakpoint_location): Don't call
1589 find_pc_sect_function.
1590 * linespec.c (create_sals_line_offset): Record the location's
1592 * linespec.c (convert_address_location_to_sals): Fill in sal's
1593 symbol with find_pc_sect_containing_function.
1594 * symtab.c (find_function_start_sal): Rename to ...
1595 (find_function_start_sal_1): ... this.
1596 (find_function_start_sal): Reimplement as wrapper around
1597 find_function_start_sal_1, and use
1598 find_pc_sect_containing_function to fill in the sal's symbol.
1599 (find_function_start_sal(symbol*, bool)): Adjust.
1600 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
1602 (find_pc_sect_containing_function): Declare.
1604 2018-06-29 Pedro Alves <palves@redhat.com>
1606 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
1607 true if the the location has no symbol.
1609 2018-06-28 Tom Tromey <tom@tromey.com>
1611 * NEWS: Mention --enable-codesign.
1612 * silent-rules.mk (ECHO_SIGN): New variable.
1613 * configure.ac: Add --enable-codesign.
1614 * configure: Rebuild.
1615 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
1616 (gdb$(EXEEXT)): Optionally invoke codesign.
1618 2018-06-28 Pedro Alves <palves@redhat.com>
1620 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
1622 (switch_to_thread_no_regs): Adjust comment.
1623 * infcmd.c (stop_pc): Delete.
1624 (post_create_inferior, info_program_command): Replace references
1625 to stop_pc with references to thread_info->suspend.stop_pc.
1626 * inferior.h (stop_pc): Delete declaration.
1627 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
1628 (handle_inferior_event_1, handle_signal_stop)
1629 (process_event_stop_test, keep_going_stepped_thread)
1630 (handle_step_into_function, handle_step_into_function_backward)
1631 (print_stop_location): Replace references to stop_pc with
1632 references to thread_info->suspend.stop_pc.
1633 (struct infcall_suspend_state) <stop_pc>: Delete field.
1634 (save_infcall_suspend_state, restore_infcall_suspend_state):
1635 Remove references to inf_stat->stop_pc.
1636 * linux-fork.c (fork_load_infrun_state): Likewise.
1637 * record-btrace.c (record_btrace_set_replay): Likewise.
1638 * record-full.c (record_full_goto_entry): Likewise.
1639 * remote.c (print_one_stopped_thread): Likewise.
1640 * target.c (target_resume): Extend comment.
1641 * thread.c (set_executing_thread): New.
1642 (set_executing): Use it.
1643 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
1644 Remove references to stop_pc.
1646 2018-06-28 Pedro Alves <palves@redhat.com>
1648 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
1649 Moving fetching stop_pc until after ecs->event_thread is refreshed.
1651 2018-06-28 Tom Tromey <tom@tromey.com>
1653 * coffread.c (coff_symfile_finish): Update.
1654 * xcoffread.c (xcoff_symfile_finish): Update.
1655 * elfread.c (elf_symfile_finish): Update.
1656 * symfile.h (dwarf2_free_objfile): Don't declare.
1657 * dwarf2read.c (_initialize_dwarf2_read): Use
1658 register_objfile_data_with_cleanup.
1659 (dwarf2_free_objfile): Now static. Change signature.
1661 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1663 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
1664 option "-o" to add-symbol-file-load to add an offset to each
1665 section's load address.
1666 * symfile.c (set_objfile_default_section_offset): New function.
1668 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1670 * symfile.c (add_symbol_file_command): Make sure that sections
1671 with the same name are sorted in the same order.
1673 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1675 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
1676 require the second argument. If omitted, load sections at the
1677 addresses specified in the file.
1679 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1681 * symfile.c (symbol_file_command, symbol_file_add_main_1)
1682 (_initialize_symfile): Add option "-o" to symbol-file to add an
1683 offset to each section of the symbol file.
1685 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1687 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
1689 2018-06-27 Tom Tromey <tom@tromey.com>
1691 * stack.c (_initialize_stack): Update "func" help text.
1693 2018-06-27 Tom Tromey <tom@tromey.com>
1695 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
1697 (unwind_infopy_str, pyuw_create_unwind_info)
1698 (unwind_infopy_add_saved_register, pyuw_sniffer)
1699 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
1701 (struct saved_reg): Add constructor.
1702 <value>: Now a gdbpy_ref<>.
1704 2018-06-27 Tom Tromey <tom@tromey.com>
1706 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
1708 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1710 * gdb-gdb.py.in: Format using autopep8.
1712 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1714 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
1715 (type_lookup_function): Recognize CORE_ADDR values.
1717 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1719 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
1722 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1724 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
1727 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1729 * gdb-gdb.py: Move to...
1730 * gdb-gdb.py.in: ... here.
1731 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
1732 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
1734 (distclean): Remove gdb-gdb.py when cleaning.
1735 (gdb-gdb.py, gdb-gdb.gdb): New rules.
1736 * configure: Re-generate.
1738 2018-06-27 Pedro Alves <palves@redhat.com>
1740 * proc-service.c (get_ps_regcache): New.
1741 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1742 (ps_lsetfpregs): Use it.
1744 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
1747 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
1748 (dwarf_decode_lines_1): Adjust.
1750 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1752 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
1754 <info_proc>: Likewise.
1756 2018-06-26 Joel Brobecker <brobecker@adacore.com>
1758 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
1759 to windows_fetch_one_register, and only handle the case of
1760 fetching one register. Move the code that reloads the context
1761 and iterates over all registers if R is negative to...
1762 (windows_nat_target::fetch_registers): ... here.
1763 (do_windows_store_inferior_registers): Rename to
1764 windows_store_one_register, and only handle the case of storing
1765 one register. Move the code that handles the case where r is
1767 (windows_nat_target::store_registers) ... here.
1769 2018-06-26 Tom Tromey <tom@tromey.com>
1772 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
1773 * rust-lang.c (rust_print_struct_def): Add podata parameter.
1775 (rust_internal_print_type): Add podata parameter.
1776 (rust_print_type): Update.
1778 2018-06-26 Tom Tromey <tom@tromey.com>
1780 * typeprint.h (struct print_offset_data) <update, finish,
1781 maybe_print_hole>: New methods.
1782 <indentation>: New constant.
1783 * typeprint.c (print_offset_data::indentation): Define.
1784 (print_offset_data::maybe_print_hole, print_offset_data::update)
1785 (print_offset_data::finish): Move from c-typeprint.c and rename.
1786 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
1787 (print_spaces_filtered_with_print_options): Update.
1788 (c_print_type_union_field_offset, maybe_print_hole)
1789 (c_print_type_struct_field_offset): Move to typeprint.c and
1791 (c_type_print_base_struct_union): Update.
1793 2018-06-25 Pedro Alves <palves@redhat.com>
1795 * gdbthread.h (thread_info_ref, delete_thread)
1796 (delete_thread_silent, first_thread_of_inferior)
1797 (any_thread_of_inferior, switch_to_thread)
1798 (enable_thread_stack_temporaries)
1799 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1800 (get_last_thread_stack_temporary)
1801 (value_in_thread_stack_temporaries, can_access_registers_thread):
1802 Spell out "struct thread_info" instead of just "thread_info".
1803 * inferior.h (notice_new_inferior): Likewise.
1805 2018-06-25 Pedro Alves <palves@redhat.com>
1807 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1808 pass thread_info pointer to delete_thread.
1809 (windows_nat_target::detach): Pass inferior pointer to
1811 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
1813 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
1814 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
1815 and pass a thread_info pointer to delete_thread.
1816 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
1817 pass thread_info pointer to delete_thread.
1818 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
1819 delete_thread_silent call.
1820 * procfs.c (procfs_target::detach): Pass inferior pointer to
1822 (procfs_target::wait): Pass thread_info pointer to delete_thread.
1823 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
1824 delete_thread_silent call.
1825 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1826 pass thread_info pointer to delete_thread.
1827 (windows_nat_target::detach): Pass inferior pointer to
1830 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1832 * regcache.c (readable_regcache::read_part): Fix asserts.
1833 (reg_buffer::raw_collect_part): New function.
1834 (regcache::write_part): Fix asserts.
1835 (reg_buffer::raw_supply_part): New function.
1836 (regcache::transfer_regset_register): New helper function.
1837 (regcache::transfer_regset): Call new functions.
1838 (regcache_supply_regset): Use gdb_byte*.
1839 (regcache::supply_regset): Likewise.
1840 (regcache_collect_regset): Likewise.
1841 (regcache::collect_regset): Likewise.
1842 * regcache.h (reg_buffer::raw_collect_part): New declaration.
1843 (reg_buffer::raw_supply_part): Likewise.
1844 (regcache::transfer_regset_register): Likewise.
1845 (regcache::transfer_regset): Use gdb_byte*.
1847 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1849 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
1851 2018-06-21 Pedro Alves <palves@redhat.com>
1853 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
1854 instead of a ptid_t. All callers adjusted.
1855 * ada-tasks.c (ada_get_task_number): Likewise. All callers
1857 (print_ada_task_info, display_current_task_id, task_command_1):
1859 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
1861 (breakpoint_kind): Adjust.
1862 (remove_breakpoints_pid): Rename to ...
1863 (remove_breakpoints_inf): ... this. Adjust to take an inferior
1864 pointer. All callers adjusted.
1865 (bpstat_clear_actions): Use inferior_thread.
1866 (get_bpstat_thread): New.
1867 (bpstat_do_actions): Use it.
1868 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
1869 to take a thread_info pointer. All callers adjusted.
1870 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
1871 (breakpoint_re_set_thread): Use inferior_thread.
1872 * breakpoint.h (struct inferior): Forward declare.
1873 (bpstat_stop_status): Update.
1874 (remove_breakpoints_pid): Delete.
1875 (remove_breakpoints_inf): New.
1876 * bsd-uthread.c (bsd_uthread_target::wait)
1877 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
1878 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
1879 (maint_btrace_packet_history_cmd)
1880 (maint_btrace_clear_packet_history_cmd): Adjust.
1881 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
1883 * cli/cli-interp.c: Include "inferior.h".
1884 * common/refcounted-object.h (struct
1885 refcounted_object_ref_policy): New.
1886 * compile/compile-object-load.c: Include gdbthread.h.
1887 (store_regs): Use inferior_thread.
1888 * corelow.c (core_target::close): Use current_inferior.
1889 (core_target_open): Adjust to use first_thread_of_inferior and use
1890 the current inferior.
1891 * ctf.c (ctf_target::close): Adjust to use current_inferior.
1892 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
1893 <thread>: ... this new field. All references adjusted.
1894 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
1895 Take a thread_info pointer instead of a ptid_t.
1896 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
1897 (dummy_frame_discard, register_dummy_frame_dtor): Take a
1898 thread_info pointer instead of a ptid_t.
1899 * elfread.c: Include "inferior.h".
1900 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
1901 Use inferior_thread.
1902 * eval.c (evaluate_subexp): Likewise.
1903 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
1905 * gdb_proc_service.h (struct thread_info): Forward declare.
1906 (struct ps_prochandle) <ptid>: Delete, replaced by ...
1907 <thread>: ... this new field. All references adjusted.
1908 * gdbarch.h, gdbarch.c: Regenerate.
1909 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
1910 'thread' parameter. All implementations and callers adjusted.
1911 * gdbthread.h (thread_info) <set_running>: New method.
1912 (delete_thread, delete_thread_silent): Take a thread_info pointer
1914 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
1915 (first_thread_of_process): Delete, replaced by ...
1916 (first_thread_of_inferior): ... this new function. All callers
1918 (any_live_thread_of_process): Delete, replaced by ...
1919 (any_live_thread_of_inferior): ... this new function. All callers
1921 (switch_to_thread, switch_to_no_thread): Declare.
1922 (is_executing): Delete.
1923 (enable_thread_stack_temporaries): Update comment.
1924 <enable_thread_stack_temporaries>: Take a thread_info pointer
1925 instead of a ptid_t. Incref the thread.
1926 <~enable_thread_stack_temporaries>: Decref the thread.
1929 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1930 (get_last_thread_stack_temporary)
1931 (value_in_thread_stack_temporaries, can_access_registers_thread):
1932 Take a thread_info pointer instead of a ptid_t. All callers
1934 * infcall.c (get_call_return_value): Use inferior_thread.
1935 (run_inferior_call): Work with thread pointers instead of ptid_t.
1936 (call_function_by_hand_dummy): Work with thread pointers instead
1937 of ptid_t. Use thread_info_ref.
1938 * infcmd.c (proceed_thread_callback): Access thread's state
1940 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
1941 access thread's state directly.
1942 (continue_command): Use inferior_thread.
1943 (info_program_command): Use find_thread_ptid and access thread
1945 (proceed_after_attach_callback): Use thread state directly.
1946 (notice_new_inferior): Take a thread_info pointer instead of a
1947 ptid_t. All callers adjusted.
1948 (exit_inferior): Take an inferior pointer instead of a pid. All
1950 (exit_inferior_silent): New.
1951 (detach_inferior): Delete.
1952 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
1953 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
1954 (detach_inferior_command, kill_inferior_command): Use
1955 find_inferior_id instead of valid_gdb_inferior_id and
1956 gdb_inferior_id_to_pid.
1957 (inferior_command): Use inferior and thread pointers.
1958 * inferior.h (struct thread_info): Forward declare.
1959 (notice_new_inferior): Take a thread_info pointer instead of a
1960 ptid_t. All callers adjusted.
1961 (detach_inferior): Delete declaration.
1962 (exit_inferior, exit_inferior_silent): Take an inferior pointer
1963 instead of a pid. All callers adjusted.
1964 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
1965 (valid_gdb_inferior_id): Delete.
1966 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
1967 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
1968 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
1970 <inf>: ... this new field.
1971 <step_ptid>: Delete, replaced by ...
1972 <step_thread>: ... this new field.
1973 (get_displaced_stepping_state): Take an inferior pointer instead
1974 of a pid. All callers adjusted.
1975 (displaced_step_in_progress_any_inferior): Adjust.
1976 (displaced_step_in_progress_thread): Take a thread pointer instead
1977 of a ptid_t. All callers adjusted.
1978 (displaced_step_in_progress, add_displaced_stepping_state): Take
1979 an inferior pointer instead of a pid. All callers adjusted.
1980 (get_displaced_step_closure_by_addr): Adjust.
1981 (remove_displaced_stepping_state): Take an inferior pointer
1982 instead of a pid. All callers adjusted.
1983 (displaced_step_prepare_throw, displaced_step_prepare)
1984 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
1985 All callers adjusted.
1986 (start_step_over): Adjust.
1987 (infrun_thread_ptid_changed): Remove bit updating ptids in the
1988 displaced step queue.
1989 (do_target_resume): Adjust.
1990 (fetch_inferior_event): Use inferior_thread.
1991 (context_switch, get_inferior_stop_soon): Take an
1992 execution_control_state pointer instead of a ptid_t. All callers
1994 (switch_to_thread_cleanup): Delete.
1995 (stop_all_threads): Use scoped_restore_current_thread.
1996 * inline-frame.c: Include "gdbthread.h".
1997 (inline_state) <inline_state>: Take a thread pointer instead of a
1998 ptid_t. All callers adjusted.
1999 <ptid>: Delete, replaced by ...
2000 <thread>: ... this new field.
2001 (find_inline_frame_state): Take a thread pointer instead of a
2002 ptid_t. All callers adjusted.
2003 (skip_inline_frames, step_into_inline_frame)
2004 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2005 pointer instead of a ptid_t. All callers adjusted.
2006 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2007 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2008 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2010 * linux-nat.c (get_detach_signal): Likewise.
2011 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2012 (thread_db_notice_clone): Adjust.
2013 (thread_db_find_new_threads_silently)
2014 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2015 a thread pointer instead of a ptid_t. All callers adjusted.
2016 * mi/mi-cmd-var.c: Include "inferior.h".
2017 (mi_cmd_var_update_iter): Update to use thread pointers.
2018 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2020 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2022 (mi_output_running): ... this new function.
2023 (mi_on_resume_1): Adjust to use it.
2024 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2025 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2027 (interrupt_thread_callback): : Adjust to use thread and inferior
2029 * proc-service.c: Include "gdbthread.h".
2030 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2031 * progspace-and-thread.c: Include "inferior.h".
2032 * progspace.c: Include "inferior.h".
2033 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2034 hold a reference to an inferior_object.
2035 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2037 * python/py-inferior.c (struct inferior_object): Give the type a
2038 tag name instead of a typedef.
2039 (python_on_normal_stop): No need to check if the current thread is
2041 (inferior_to_inferior_object): Change return type to
2042 inferior_object. All callers adjusted.
2043 (find_thread_object): Delete, bits factored out to ...
2044 (thread_to_thread_object): ... this new function.
2045 * python/py-infthread.c (create_thread_object): Use
2046 inferior_to_inferior_object.
2047 (thpy_is_stopped): Use thread pointer directly.
2048 (gdbpy_selected_thread): Use inferior_thread.
2049 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2050 field, replaced with ...
2051 <thread>: ... this new field. All users adjusted.
2052 (btpy_insn_or_gap_new): Drop const.
2053 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2055 * python/py-record.c: Include "gdbthread.h".
2056 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2057 a ptid_t. All callers adjusted.
2058 (gdbpy_current_recording): Use inferior_thread.
2059 * python/py-record.h (recpy_record_object) <ptid>: Delete
2060 field, replaced with ...
2061 <thread>: ... this new field. All users adjusted.
2062 (recpy_element_object) <ptid>: Delete
2063 field, replaced with ...
2064 <thread>: ... this new field. All users adjusted.
2065 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2066 a ptid_t. All callers adjusted.
2067 * python/py-threadevent.c: Include "gdbthread.h".
2068 (get_event_thread): Use thread_to_thread_object.
2069 * python/python-internal.h (struct inferior_object): Forward
2071 (find_thread_object, find_inferior_object): Delete declarations.
2072 (thread_to_thread_object, inferior_to_inferior_object): New
2074 * record-btrace.c: Include "inferior.h".
2075 (require_btrace_thread): Use inferior_thread.
2076 (record_btrace_frame_sniffer)
2077 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2078 (get_thread_current_frame): Use scoped_restore_current_thread and
2080 (get_thread_current_frame): Use thread pointer directly.
2081 (record_btrace_replay_at_breakpoint): Use thread's inferior
2083 * record-full.c: Include "inferior.h".
2084 * regcache.c: Include "gdbthread.h".
2085 (get_thread_arch_regcache): Use the inferior's address space
2087 (get_thread_regcache, registers_changed_thread): New.
2088 * regcache.h (get_thread_regcache(thread_info *thread)): New
2090 (registers_changed_thread): New.
2091 (remote_target) <remote_detach_1>: Swap order of parameters.
2092 (remote_add_thread): <remote_add_thread>: Return the new thread.
2093 (get_remote_thread_info(ptid_t)): New overload.
2094 (remote_target::remote_notice_new_inferior): Use thread pointers
2096 (remote_target::process_initial_stop_replies): Use
2097 thread_info::set_running.
2098 (remote_target::remote_detach_1, remote_target::detach)
2099 (extended_remote_target::detach): Adjust.
2100 * stack.c (frame_show_address): Use inferior_thread.
2101 * target-debug.h (target_debug_print_thread_info_pp): New.
2102 * target-delegates.c: Regenerate.
2103 * target.c (default_thread_address_space): Delete.
2104 (memory_xfer_partial_1): Use current_inferior.
2105 (target_detach): Use current_inferior.
2106 (target_thread_address_space): Delete.
2107 (generic_mourn_inferior): Use current_inferior.
2108 * target.h (struct target_ops) <thread_address_space>: Delete.
2109 (target_thread_address_space): Delete.
2110 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2112 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2113 thread pointer instead of a ptid_t. Adjust all callers.
2114 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2115 (first_thread_of_process): Delete, replaced by ...
2116 (first_thread_of_inferior): ... this new function. All callers
2118 (any_thread_of_process): Rename to ...
2119 (any_thread_of_inferior): ... this, and take an inferior pointer.
2120 (any_live_thread_of_process): Rename to ...
2121 (any_live_thread_of_inferior): ... this, and take an inferior
2123 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2124 (value_in_thread_stack_temporaries)
2125 (get_last_thread_stack_temporary): Take a thread pointer instead
2126 of a ptid_t. Adjust all callers.
2127 (thread_info::set_running): New.
2128 (validate_registers_access): Use inferior_thread.
2129 (can_access_registers_ptid): Rename to ...
2130 (can_access_registers_thread): ... this, and take a thread
2132 (print_thread_info_1): Adjust to compare thread pointers instead
2134 (switch_to_no_thread, switch_to_thread): Make extern.
2135 (scoped_restore_current_thread::~scoped_restore_current_thread):
2136 Use m_thread pointer directly.
2137 (scoped_restore_current_thread::scoped_restore_current_thread):
2138 Use inferior_thread.
2139 (thread_command): Use thread pointer directly.
2140 (thread_num_make_value_helper): Use inferior_thread.
2141 * top.c (execute_command): Use inferior_thread.
2142 * tui/tui-interp.c: Include "inferior.h".
2143 * varobj.c (varobj_create): Use inferior_thread.
2144 (value_of_root_1): Use find_thread_global_id instead of
2145 global_thread_id_to_ptid.
2147 2018-06-21 Alan Hayward <alan.hayward@arm.com>
2149 * regcache.c (readable_regcache::read_part): Avoid memcpy when
2151 (regcache::write_part): Likewise.
2152 (readable_regcache::cooked_read_part): Update comment.
2153 (readable_regcache::cooked_write_part): Likewise.
2154 * regcache.h: (readable_regcache::read_part): Likewise.
2155 (regcache::write_part): Likewise.
2157 2018-06-21 Richard Bunt <richard.bunt@arm.com>
2158 Dirk Schubert <dirk.schubert@arm.com>
2160 * aarch64-linux-nat.c (post_attach): New.
2161 (aarch64_linux_nat_target::post_attach): Override post_attach to
2162 record the number of hardware debug registers.
2164 2018-06-20 Tom Tromey <tom@tromey.com>
2166 * python/py-param.c (add_setshow_generic): Make parameters const.
2167 (parmpy_init): Update.
2169 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2171 * regcache.h (regcache_cooked_read_ftype): Rename to...
2172 (register_read_ftype): ...this, change type to function_view.
2173 (class reg_buffer) <save>: Remove src parameter.
2174 (readonly_detached_regcache) <readonly_detached_regcache>: Make
2175 parameter non-const in first overload. Remove src parameter in
2177 * regcache.c (do_cooked_read): Remove.
2178 (readonly_detached_regcache::readonly_detached_regcache): Make
2179 parameter non-const, adjust call to other constructor.
2180 (reg_buffer::save): Remove src parameter.
2181 * frame.c (do_frame_register_read): Remove.
2182 (frame_save_as_regcache): Use lambda function.
2183 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2184 parameter to ppu2spu_data *.
2185 (ppu2spu_sniffer): Use lambda function.
2187 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2189 * record-full.c (record_full_target::insert_breakpoint): Remove
2190 "struct" keyword, add const.
2192 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2194 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2195 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2196 * configure.ac: Remove AC_PREREQ, add missing quoting.
2197 * gnulib/configure.ac: Modernize usage of
2198 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
2199 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2200 (AUTOMAKE_VERSION): Bump to 1.15.1.
2201 * configure: Re-generate.
2202 * config.in: Re-generate.
2203 * aclocal.m4: Re-generate.
2204 * gnulib/aclocal.m4: Re-generate.
2205 * gnulib/config.in: Re-generate.
2206 * gnulib/configure: Re-generate.
2207 * gnulib/import/Makefile.in: Re-generate.
2209 2018-06-19 Pedro Alves <palves@redhat.com>
2211 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2212 (lookup_minimal_symbol_by_pc_section): ... here with
2213 gdb_assert_not_reached added.
2215 2018-06-19 Pedro Alves <palves@redhat.com>
2217 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2218 parameter with a block parameter. Compare location's block symbol
2219 with the frame's block instead of addresses.
2220 (skip_inline_frames): Pass the current block instead of the
2221 frame's address. Break out as soon as we determine the frame
2222 should not be skipped.
2224 2018-06-18 Tom Tromey <tom@tromey.com>
2226 * solib-aix.c (solib_aix_get_section_offsets): Return
2228 (solib_aix_solib_create_inferior_hook): Update.
2230 2018-06-18 Tom Tromey <tom@tromey.com>
2232 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2234 2018-06-18 Tom Tromey <tom@tromey.com>
2236 * solib-frv.c (frv_relocate_main_executable): Use
2238 * solib-dsbt.c (dsbt_relocate_main_executable): Use
2241 2018-06-18 Tom Tromey <tom@tromey.com>
2243 * objfiles.h (inhibit_section_map_updates): Update.
2244 (resume_section_map_updates, resume_section_map_updates_cleanup):
2246 * solib-svr4.c (svr4_handle_solib_event): Update.
2247 * objfiles.c (inhibit_section_map_updates): Return
2248 scoped_restore_tmpl<int>.
2249 (resume_section_map_updates, resume_section_map_updates_cleanup):
2252 2018-06-18 Tom Tromey <tom@tromey.com>
2254 * valprint.h (read_string): Update.
2255 * valprint.c (read_string): Change type of "buffer".
2256 (val_print_string): Update.
2257 * python/py-value.c (valpy_string): Update.
2258 * language.h (struct language_defn) <la_get_string>: Change
2260 (default_get_string, c_get_string): Update.
2261 * language.c (default_get_string): Change type of "buffer".
2262 * guile/scm-value.c (gdbscm_value_to_string): Update.
2263 * c-lang.c (c_get_string): Change type of "buffer".
2265 2018-06-18 Tom Tromey <tom@tromey.com>
2267 * ser-mingw.c (struct pipe_state_destroyer): New.
2268 (pipe_state_up): New typedef.
2269 (cleanup_pipe_state): Remove.
2270 (pipe_windows_open): Use pipe_state_up. Don't release argv.
2272 2018-06-18 Tom Tromey <tom@tromey.com>
2274 * rust-lang.h (rust_yyerror): Don't declare.
2275 * rust-lang.c (rust_language_defn): Update.
2276 * rust-exp.y (yyerror): Now static.
2277 * parse.c (parse_exp_in_context_1): Update.
2278 * p-lang.h (p_yyerror): Don't declare.
2279 * p-lang.c (p_language_defn): Update.
2280 * p-exp.y (yyerror): Now static.
2281 * opencl-lang.c (opencl_language_defn): Update.
2282 * objc-lang.c (objc_language_defn): Update.
2283 * m2-lang.h (m2_yyerror): Don't declare.
2284 * m2-lang.c (m2_language_defn): Update.
2285 * m2-exp.y (yyerror): Now static.
2286 * language.h (struct language_defn) <la_error>: Remove.
2287 * language.c (unk_lang_error): Remove.
2288 (unknown_language_defn, auto_language_defn): Remove.
2289 * go-lang.h (go_yyerror): Don't declare.
2290 * go-lang.c (go_language_defn): Update.
2291 * go-exp.y (yyerror): Now static.
2292 * f-lang.h (f_yyerror): Don't declare.
2293 * f-lang.c (f_language_defn): Update.
2294 * f-exp.y (yyerror): Now static.
2295 * d-lang.h (d_yyerror): Don't declare.
2296 * d-lang.c (d_language_defn): Update.
2297 * d-exp.y (yyerror): Now static.
2298 * c-lang.h (c_yyerror): Don't declare.
2299 * c-lang.c (c_language_defn, cplus_language_defn)
2300 (asm_language_defn, minimal_language_defn): Update.
2301 * c-exp.y (yyerror): Now static.
2302 * ada-lang.h (ada_yyerror): Don't declare.
2303 * ada-lang.c (ada_language_defn): Update.
2304 * ada-exp.y (yyerror): Now static.
2306 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2308 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2309 (store_sveregs_to_thread): Likewise.
2310 (aarch64_linux_fetch_inferior_registers): Check for SVE.
2311 (aarch64_linux_store_inferior_registers): Likewise.
2312 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2314 (aarch64_sve_regs_copy_to_regcache): Likewise.
2315 (aarch64_sve_regs_copy_from_regcache): Likewise.
2316 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2318 (aarch64_sve_regs_copy_to_regcache): Likewise.
2319 (aarch64_sve_regs_copy_from_regcache): Likewise.
2320 (sve_context): Structure from Linux headers.
2321 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2322 (SVE_SIG_ZREG_SIZE): Likewise.
2323 (SVE_SIG_PREG_SIZE): Likewise.
2324 (SVE_SIG_FFR_SIZE): Likewise.
2325 (SVE_SIG_REGS_OFFSET): Likewise.
2326 (SVE_SIG_ZREGS_OFFSET): Likewise.
2327 (SVE_SIG_ZREG_OFFSET): Likewise.
2328 (SVE_SIG_ZREGS_SIZE): Likewise.
2329 (SVE_SIG_PREGS_OFFSET): Likewise.
2330 (SVE_SIG_PREG_OFFSET): Likewise.
2331 (SVE_SIG_PREGS_SIZE): Likewise.
2332 (SVE_SIG_FFR_OFFSET): Likewise.
2333 (SVE_SIG_REGS_SIZE): Likewise.
2334 (SVE_SIG_CONTEXT_SIZE): Likewise.
2335 (SVE_PT_REGS_MASK): Likewise.
2336 (SVE_PT_REGS_FPSIMD): Likewise.
2337 (SVE_PT_REGS_SVE): Likewise.
2338 (SVE_PT_VL_INHERIT): Likewise.
2339 (SVE_PT_VL_ONEXEC): Likewise.
2340 (SVE_PT_REGS_OFFSET): Likewise.
2341 (SVE_PT_FPSIMD_OFFSET): Likewise.
2342 (SVE_PT_FPSIMD_SIZE): Likewise.
2343 (SVE_PT_SVE_ZREG_SIZE): Likewise.
2344 (SVE_PT_SVE_PREG_SIZE): Likewise.
2345 (SVE_PT_SVE_FFR_SIZE): Likewise.
2346 (SVE_PT_SVE_FPSR_SIZE): Likewise.
2347 (SVE_PT_SVE_FPCR_SIZE): Likewise.
2348 (__SVE_SIG_TO_PT): Likewise.
2349 (SVE_PT_SVE_OFFSET): Likewise.
2350 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2351 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2352 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2353 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2354 (SVE_PT_SVE_PREG_OFFSET): Likewise.
2355 (SVE_PT_SVE_PREGS_SIZE): Likewise.
2356 (SVE_PT_SVE_FFR_OFFSET): Likewise.
2357 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2358 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2359 (SVE_PT_SVE_SIZE): Likewise.
2360 (SVE_PT_SIZE): Likewise.
2361 (HAS_SVE_STATE): New define.
2363 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2365 * nat/aarch64-sve-linux-sigcontext.h: New file.
2366 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2368 (SVE_VQ_MIN): Likewise.
2369 (SVE_VQ_MAX): Likewise.
2370 (SVE_VL_MIN): Likewise.
2371 (SVE_VL_MAX): Likewise.
2372 (SVE_NUM_ZREGS): Likewise.
2373 (SVE_NUM_PREGS): Likewise.
2374 (sve_vl_valid): Likewise.
2375 (struct user_sve_header): Likewise.
2377 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
2378 Richard Bunt <Richard.Bunt@arm.com>
2380 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2381 was requested by GDB.
2383 2018-06-15 Tom de Vries <tdevries@suse.de>
2385 * MAINTAINERS (Write After Approval): Add Tom de Vries.
2387 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
2389 * gnulib/update-gnulib.sh: Print expected versions of
2392 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
2394 * arch-utils.c (default_type_align): Use type_length_units.
2395 * gdbtypes.c (type_align): Use type_length_units.
2397 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2399 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2400 of 'define' command.
2402 2018-06-14 Tom de Vries <tdevries@suse.de>
2405 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2406 get_no_prettyformat_print_options.
2408 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
2410 * sparc-nat.h: Include target.h.
2411 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2412 <fetch_registers>: Remove this argument in function call.
2413 <store_registers>: Remove this argument in function call, remove
2415 <low_forget_process>: Call sparc64_forget_process instead of
2416 sparc_forget_process.
2418 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2420 * procfs.c (_initialize_procfs): Use add_inf_child_target.
2421 (procfs_target::make_corefile_notes): Adjust to new
2422 target_read_alloc return type.
2424 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2425 Stephen Roberts <stephen.roberts@arm.com>
2428 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2429 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2430 Move should_notify_stop local into more inner scope.
2432 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2433 Stephen Roberts <stephen.roberts@arm.com>
2436 * infrun.c (resume_1): Add call to mark_async_event_handler.
2438 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2440 * infrun.c (do_target_wait): Change old version of $pc printed.
2442 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
2444 * dwarf2read.c (read_index_from_section): Rename to...
2445 (read_gdb_index_from_section): ... this, update all callers.
2446 (dwarf2_read_index): Rename to...
2447 (dwarf2_read_gdb_index): ... this, update all callers.
2449 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
2451 * gdb/hppa-linux-nat.c
2452 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2453 hppa_linux_nat_target::fetch_registers.
2455 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2457 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2458 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2459 (AARCH64_DWARF_SVE_FFR): Likewise.
2460 (AARCH64_DWARF_SVE_P0): Likewise.
2461 (AARCH64_DWARF_SVE_Z0): Likewise.
2463 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2465 * common/common-regcache.h (raw_compare): New function.
2466 * regcache.c (regcache::raw_compare): Likewise.
2467 * regcache.h (regcache::raw_compare): New declaration.
2469 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2471 * common/common-regcache.h (reg_buffer_common): New structure.
2472 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2473 (reg_buffer::raw_supply): Likewise.
2474 (reg_buffer::raw_supply_integer): Likewise.
2475 (reg_buffer::raw_supply_zeroed): Likewise.
2476 (reg_buffer::raw_collect): Likewise.
2477 (reg_buffer::raw_collect_integer): Likewise.
2478 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2479 (reg_buffer::raw_supply): Likewise.
2480 (reg_buffer::raw_supply_integer): Likewise.
2481 (reg_buffer::raw_supply_zeroed): Likewise.
2482 (reg_buffer::raw_collect): Likewise.
2483 (reg_buffer::raw_collect_integer): Likewise.
2485 2018-06-10 Tom Tromey <tom@tromey.com>
2487 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
2488 (class remote_state) <stop_reply_queue>: Now std::vector.
2489 (remote_state::~remote_state)
2490 (remote_target::stop_reply_queue_length): Update.
2491 (struct queue_iter_param, remove_child_of_pending_fork)
2492 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2493 (check_pending_event_prevents_wildcard_vcont_callback)
2494 (remove_stop_reply_for_inferior)
2495 (remove_stop_reply_of_remote_state)
2496 (remote_notif_remove_once_on_match)
2497 (stop_reply_match_ptid_and_ws)
2498 (remote_kill_child_of_pending_fork): Remove.
2499 (remote_target::remove_new_fork_children)
2500 (remote_target::check_pending_events_prevent_wildcard_vcont)
2501 (remote_target::discard_pending_stop_replies)
2502 (remote_target::discard_pending_stop_replies_in_queue)
2503 (remote_target::remote_notif_remove_queued_reply)
2504 (remote_target::queued_stop_reply)
2505 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2506 (remote_target::wait, remote_target::kill_new_fork_children)
2507 (remote_target::async): Update.
2509 2018-06-10 Tom Tromey <tom@tromey.com>
2511 * record-full.c (record_full_arch_list_cleanups): Remove.
2512 (record_full_message): Use try/catch.
2513 (record_full_wait_cleanups): Remove.
2514 (record_full_wait_1): Use try/catch.
2515 (record_full_restore): Likewise.
2517 2018-06-10 Tom Tromey <tom@tromey.com>
2519 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
2520 declare VEC. Add constructor.
2521 <in_target_beneath>: Now bool.
2522 (record_full_breakpoints): Now a std::vector, static.
2523 (record_full_sync_record_breakpoints)
2524 (record_full_init_record_breakpoints)
2525 (record_full_target::insert_breakpoint)
2526 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
2528 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
2530 * dwarf2read.c (process_cu_includes): Remove struct keyword.
2531 * serial.c (serial_interface_lookup): Remove struct keyword.
2533 2018-06-10 Tom Tromey <tom@tromey.com>
2535 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
2537 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
2539 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
2541 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
2542 "beneath" as a method.
2543 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
2544 Use "beneath" as a method.
2546 2018-06-10 Tom Tromey <tom@tromey.com>
2548 * tracefile.c (struct trace_file_writer_deleter): New.
2549 <operator()>: Rename from trace_file_writer_xfree.
2550 (trace_file_writer_up): New typedef.
2551 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
2553 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2555 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
2556 <m_registers, m_register_status>: Change type to
2558 * regcache.c (reg_buffer::reg_buffer): Use new instead of
2561 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2563 * common/common-regcache.h (enum register_status): Add
2564 underlying type "signed char".
2565 * regcache.h (reg_buffer) <m_register_status>: Change type to
2567 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
2568 register_status instead of signed char.
2569 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
2570 (reg_buffer::get_register_status): Remove cast.
2571 (readable_regcache::raw_read): Remove cast.
2572 (readable_regcache::cooked_read): Remove cast.
2574 2018-06-09 Tom Tromey <tom@tromey.com>
2576 * source.c (reverse_search_command, forward_search_command): Use
2579 2018-06-09 Tom Tromey <tom@tromey.com>
2581 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
2582 (serial_ops_list): Now static, std::vector.
2583 (serial_interface_lookup, serial_add_interface): Update.
2585 2018-06-09 Tom Tromey <tom@tromey.com>
2587 * dwarf2read.c (process_cu_includes): Update.
2588 (process_full_comp_unit): Update.
2589 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
2592 2018-06-08 Paul Koning <paul_koning@dell.com>
2596 * python/python.c (do_start_initialization):
2597 Avoid call to internal Python API.
2598 (init__gdb_module): New function.
2600 2018-06-08 Gary Benson <gbenson@redhat.com>
2602 * linux-thread-db.c (valprint.h): New include.
2603 (struct check_thread_db_info): New structure.
2604 (check_thread_db_on_load, tdb_testinfo): New static globals.
2605 (check_thread_db, check_thread_db_callback): New functions.
2606 (try_thread_db_load_1): Run integrity checks if requested.
2607 (maintenance_check_libthread_db): New function.
2608 (_initialize_thread_db): Register "maint check libthread-db"
2609 and "maint set/show check-libthread-db".
2610 * NEWS: Mention the above new commands.
2612 2018-06-08 Tom Tromey <tom@tromey.com>
2614 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
2617 2018-06-08 Tom Tromey <tom@tromey.com>
2619 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
2621 2018-06-08 Tom Tromey <tom@tromey.com>
2623 * common/btrace-common.h (struct btrace_data): Add constructor,
2624 destructor, move assignment operator.
2625 <empty, clear, fini>: New methods.
2626 <format>: Initialize.
2627 (btrace_data_init, btrace_data_fini, btrace_data_clear)
2628 (btrace_data_empty): Don't declare.
2629 * common/btrace-common.c (btrace_data_init): Remove.
2630 (btrace_data::fini): Rename from btrace_data_fini.
2631 (btrace_data::empty): Rename from btrace_data_empty.
2632 (btrace_data::clear): Rename from btrace_data_clear. Return
2634 * btrace.h (make_cleanup_btrace_data): Don't declare.
2635 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
2636 (parse_xml_btrace): Update.
2637 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
2638 (maint_btrace_clear_packet_history_cmd): Update.
2640 2018-06-07 Pedro Alves <palves@redhat.com>
2642 * target.h (target_ops) <beneath>: Now a method. All references
2644 (class target_stack): New.
2645 * target.c (g_target_stack): New.
2646 (g_current_top_target): Delete.
2647 (current_top_target): Get the top target out of g_target_stack.
2648 (target_stack::push, target_stack::unpush): New.
2649 (push_target, unpush_target): Reimplement.
2650 (target_is_pushed): Reimplement in terms of g_target_stack.
2651 (target_ops::beneath, target_stack::find_beneath): New.
2653 2018-06-07 Pedro Alves <palves@redhat.com>
2655 * target.h (find_target_beneath): Delete declaration.
2656 * target.c (find_target_beneath): Delete definition.
2657 * aix-thread.c: All callers of find_target_beneath adjusted to
2658 call target_ops::beneath instead.
2659 * bsd-uthread.c: Likewise.
2660 * linux-thread-db.c: Likewise.
2661 * ravenscar-thread.c: Likewise.
2662 * sol-thread.c: Likewise.
2663 * spu-multiarch.c: Likewise.
2665 2018-06-07 Pedro Alves <palves@redhat.com>
2667 * target.h (target_ops) <beneath>: Now a method. All references
2669 (target_ops) <m_beneath>: New.
2670 * target.c (target_ops::beneath): New.
2671 * corelow.c: Adjust all references to target_ops::beneath.
2672 * linux-thread-db.c: Likewise.
2673 * make-target-delegates: Likewise.
2674 * record-btrace.c: Likewise.
2675 * record-full.c: Likewise.
2676 * remote.c: Likewise.
2677 * target.c: Likewise.
2678 * target-delegates.c: Regenerate.
2680 2018-06-07 Pedro Alves <palves@redhat.com>
2682 * target.h (target_stack): Delete.
2683 (current_top_target): Declare function.
2684 * target.c (target_stack): Delete.
2685 (g_current_top_target): New.
2686 (current_top_target): New function.
2687 * auxv.c: Use current_top_target instead of target_stack
2689 * avr-tdep.c: Likewise.
2690 * breakpoint.c: Likewise.
2691 * corefile.c: Likewise.
2692 * elfread.c: Likewise.
2694 * exceptions.c: Likewise.
2695 * frame.c: Likewise.
2696 * gdbarch-selftests.c: Likewise.
2697 * gnu-v3-abi.c: Likewise.
2698 * ia64-tdep.c: Likewise.
2699 * ia64-vms-tdep.c: Likewise.
2700 * infcall.c: Likewise.
2701 * infcmd.c: Likewise.
2702 * infrun.c: Likewise.
2703 * linespec.c: Likewise.
2704 * linux-tdep.c: Likewise.
2705 * minsyms.c: Likewise.
2706 * ppc-linux-nat.c: Likewise.
2707 * ppc-linux-tdep.c: Likewise.
2708 * procfs.c: Likewise.
2709 * regcache.c: Likewise.
2710 * remote.c: Likewise.
2711 * rs6000-tdep.c: Likewise.
2712 * s390-linux-nat.c: Likewise.
2713 * s390-tdep.c: Likewise.
2714 * solib-aix.c: Likewise.
2715 * solib-darwin.c: Likewise.
2716 * solib-dsbt.c: Likewise.
2717 * solib-spu.c: Likewise.
2718 * solib-svr4.c: Likewise.
2719 * solib-target.c: Likewise.
2720 * sparc-tdep.c: Likewise.
2721 * sparc64-tdep.c: Likewise.
2722 * spu-tdep.c: Likewise.
2723 * symfile.c: Likewise.
2724 * symtab.c: Likewise.
2725 * target-descriptions.c: Likewise.
2726 * target-memory.c: Likewise.
2727 * target.c: Likewise.
2728 * target.h: Likewise.
2729 * tracefile-tfile.c: Likewise.
2730 * tracepoint.c: Likewise.
2731 * valops.c: Likewise.
2732 * valprint.c: Likewise.
2733 * value.c: Likewise.
2734 * windows-tdep.c: Likewise.
2735 * mi/mi-main.c: Likewise.
2737 2018-06-07 Tom Tromey <tom@tromey.com>
2739 * valprint.h (build_address_symbolic): Declare.
2740 * printcmd.c (print_address_symbolic): Update.
2741 (build_address_symbolic): Change "name" and "filename" to
2743 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
2745 * defs.h (build_address_symbolic): Remove declaration.
2747 2018-06-07 Alan Hayward <alan.hayward@arm.com>
2749 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
2750 (aarch64_vnv_type): Add function.
2751 (aarch64_pseudo_register_name): Add V regs for SVE.
2752 (aarch64_pseudo_register_type): Likewise.
2753 (aarch64_pseudo_register_reggroup_p): Likewise.
2754 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
2755 (aarch64_pseudo_read_value): Add V regs for SVE.
2756 (aarch64_pseudo_write_2): Use V0 offset for SVE
2757 (aarch64_pseudo_write): Add V regs for SVE.
2758 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
2760 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
2762 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
2763 (sve_vl_from_vq): Likewise.
2765 2018-06-05 Tom Tromey <tom@tromey.com>
2767 * cli/cli-cmds.c (show_version): Update.
2768 * top.c (print_gdb_version): Add "interactive" parameter.
2770 * main.c (captured_main_1): Update.
2771 * top.h (print_gdb_version): Add "interactive" parameter and a
2774 2018-06-05 David Malcolm <dmalcolm@redhat.com>
2776 * common/enum-flags.h: Add trailing semicolon to example in
2779 2018-06-05 Tom Tromey <tom@tromey.com>
2782 * NEWS: Add entry about pager.
2783 * utils.c (pagination_disabled_for_command): New global.
2784 (prompt_for_continue): Allow "c" response to prompt.
2785 (reinitialize_more_filter): Clear
2786 pagination_disabled_for_command.
2787 (fputs_maybe_filtered): Check pagination_disabled_for_command.
2789 2018-06-04 Tom Tromey <tom@tromey.com>
2791 * ada-lang.h (ada_lookup_symbol_list): Update.
2792 * ada-lang.c (resolve_subexp): Update.
2793 (symbols_are_identical_enums): Change type of syms. Remove nsyms
2795 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
2796 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
2797 results parameter to std::vector.
2798 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
2800 * ada-exp.y (block_lookup): Update.
2801 (select_possible_type_sym): Change type of syms. Remove nsyms
2803 (write_var_or_type, write_name_assoc): Update.
2805 2018-06-04 Joel Brobecker <brobecker@adacore.com>
2807 * windows-nat.c (windows_nat_target::xfer_partial): Return
2808 TARGET_XFER_E_IO if we need to delegate to the target beneath
2809 but BENEATH is NULL.
2811 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
2813 * Makefile.in (config.status): Add configure.nat as a
2816 2018-06-04 Tom Tromey <tom@tromey.com>
2818 * cp-name-parser.y (cpname_state): Add method declarations.
2819 (HANDLE_QUAL): Update.
2820 (cpname_state::d_grab, cpname_state::fill_comp)
2821 (cpname_state::make_operator, cpname_state::make_dtor)
2822 (cpname_state::make_builtin_type, cpname_state::make_name)
2823 (cpname_state::d_qualify, cpname_state::d_int_type)
2824 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
2825 (%union): Move earlier.
2827 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2829 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
2831 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2833 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
2834 (aarch64_pseudo_write_1): Likewise.
2835 (aarch64_pseudo_read_value): Use helper.
2836 (aarch64_pseudo_write): Likewise.
2838 2018-06-04 Pedro Alves <palves@redhat.com>
2840 * darwin-nat.c (darwin_ops): Delete.
2841 (darwin_attach_pid): Use get_native_target.
2843 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2845 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
2846 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
2848 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2850 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
2851 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
2852 (aarch64_gdbarch_init): Check for SVE.
2853 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
2855 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2857 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
2858 * aarch64-tdep.h (aarch64_read_description): Likewise.
2859 * arch/aarch64.c (aarch64_create_target_description): Likewise.
2860 * arch/aarch64.h (aarch64_create_target_description): Likewise.
2861 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
2862 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
2863 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
2865 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
2867 * value.c (value_fetch_lazy_bitfield): New.
2868 (value_fetch_lazy_memory): New.
2869 (value_fetch_lazy_register): New.
2870 (value_fetch_lazy): Factor out to smaller functions.
2872 2018-06-01 Tom Tromey <tom@tromey.com>
2874 * cp-name-parser.y (backslashable, represented): Now const.
2876 2018-06-01 Tom Tromey <tom@tromey.com>
2878 * cp-name-parser.y: Include parser-defs.h.
2879 (parser_fprintf): Remove declaration.
2881 2018-06-01 Tom Tromey <tom@tromey.com>
2883 * cp-name-parser.y: Use %pure-parser, %lex-param, and
2885 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
2886 (global_result): Remove globals.
2887 (struct cpname_state): New.
2888 (yyparse): Don't declare.
2889 (yylex, yyerror): Move declarations after %union.
2890 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
2891 (make_name): Add state parameter.
2893 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
2895 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
2897 (yylex): Add lvalp, state parameters.
2898 (yyerror): Add state parameter.
2899 (cp_demangled_name_to_comp): Update.
2901 2018-06-01 Tom Tromey <tom@tromey.com>
2903 * cp-name-parser.y (parser_fprintf): Declare.
2904 (GDB_YY_REMAP_PREFIX): Define.
2905 Include yy-remap.h. Don't redefine yy* identifiers.
2907 2018-06-01 Tom Tromey <tom@tromey.com>
2909 * python/py-type.c (typy_legacy_template_argument): Update.
2910 * cp-support.h (cp_demangled_name_to_comp): Update.
2911 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
2912 parameter to be a "std::string *".
2915 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
2917 * ada-lex.l: Include "diagnostics.h" instead of
2918 "common/diagnostics.h".
2919 * unittests/environ-selftests.c: Likewise.
2920 * common/diagnostics.h: Moved to ../include.
2922 2018-06-01 Joel Brobecker <brobecker@adacore.com>
2924 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
2925 to language_mode_manual while calling breakpoint_re_set_one.
2927 2018-06-01 Tom Tromey <tom@tromey.com>
2929 * valops.c (value_cast_structs, destructor_name_p): Update.
2930 * symtab.c (gdb_mangle_name): Update.
2931 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
2933 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
2934 (pascal_object_print_value_fields, pascal_object_print_value):
2936 * p-typeprint.c (pascal_type_print_derivation_info): Update.
2937 * linespec.c (find_methods): Update.
2938 * gdbtypes.h (type_name_no_tag): Remove.
2939 (type_name_or_error): Rename from type_name_no_tag_or_error.
2940 * gdbtypes.c (type_name_no_tag): Remove.
2941 (type_name_or_error): Rename from type_name_no_tag_or_error.
2942 (lookup_struct_elt_type, check_typedef): Update.
2943 * expprint.c (print_subexp_standard): Update.
2944 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
2945 * d-namespace.c (d_lookup_nested_symbol): Update.
2946 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
2947 (cp_print_class_member): Update.
2948 * cp-namespace.c (cp_lookup_nested_symbol): Update.
2949 * completer.c (add_struct_fields): Update.
2950 * c-typeprint.c (cp_type_print_derivation_info)
2951 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
2953 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
2954 (ada_prefer_type, ada_is_exception_sym): Update.
2956 2018-06-01 Tom Tromey <tom@tromey.com>
2958 * valops.c (enum_constant_from_type, value_namespace_elt)
2959 (value_maybe_namespace_elt): Update.
2960 * valarith.c (find_size_for_pointer_math): Update.
2961 * target-descriptions.c (make_gdb_type): Update.
2962 * symmisc.c (print_symbol): Update.
2963 * stabsread.c (define_symbol, read_type)
2964 (complain_about_struct_wipeout, add_undefined_type)
2965 (cleanup_undefined_types_1): Update.
2966 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
2967 (rust_range_type_p, val_print_struct, rust_print_struct_def)
2968 (rust_internal_print_type, rust_composite_type)
2969 (rust_evaluate_funcall, rust_evaluate_subexp)
2970 (rust_inclusive_range_type_p): Update.
2971 * python/py-type.c (typy_get_tag): Update.
2972 * p-typeprint.c (pascal_type_print_base): Update.
2973 * mdebugread.c (parse_symbol, parse_type): Update.
2974 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
2976 * guile/scm-type.c (gdbscm_type_tag): Update.
2977 * go-lang.c (sixg_string_p): Update.
2978 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
2980 * gdbtypes.h (struct main_type) <tag_name>: Remove.
2981 (TYPE_TAG_NAME): Remove.
2982 * gdbtypes.c (type_name_no_tag): Simplify.
2983 (check_typedef, check_types_equal, recursive_dump_type)
2984 (copy_type_recursive, arch_composite_type): Update.
2985 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
2986 in summary mode when needed.
2987 * eval.c (evaluate_funcall): Update.
2988 * dwarf2read.c (fixup_go_packaging, read_structure_type)
2989 (process_structure_scope, read_enumeration_type)
2990 (read_namespace_type, read_module_type, determine_prefix): Update.
2991 * cp-support.c (inspect_type): Update.
2992 * coffread.c (process_coff_symbol, decode_base_type): Update.
2993 * c-varobj.c (c_is_path_expr_parent): Update.
2994 * c-typeprint.c (c_type_print_base_struct_union): Update.
2995 (c_type_print_base_1): Update. Print struct/class/union/enum in
2996 summary when using C language.
2997 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
2998 (gen_maybe_namespace_elt): Update.
2999 * ada-lang.c (ada_type_name): Simplify.
3000 (empty_record, ada_template_to_fixed_record_type_1)
3001 (template_to_static_fixed_type)
3002 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3004 2018-06-01 Tom Tromey <tom@tromey.com>
3006 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3008 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3009 (c_print_type): Update.
3010 (c_print_type): New overload.
3011 (c_type_print_varspec_prefix, c_type_print_args)
3012 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3013 (c_type_print_base_struct_union, c_type_print_base_1)
3014 (cp_type_print_method_args): Add "language" parameter.
3015 (c_type_print_base): Update.
3016 * c-lang.h (c_print_type): Add new overload.
3018 2018-06-01 Tom Tromey <tom@tromey.com>
3020 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3021 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3023 2018-06-01 Alan Hayward <alan.hayward@arm.com>
3025 * aarch64-tdep.c (aarch64_sve_register_names): New const
3027 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3028 (AARCH64_SVE_Z_REGS_NUM): New define.
3029 (AARCH64_SVE_P_REGS_NUM): Likewise.
3030 (AARCH64_SVE_NUM_REGS): Likewise.
3032 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
3034 * nat/linux-ptrace.h [__alpha__]
3035 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3038 2018-05-31 Maciej W. Rozycki <macro@mips.com>
3040 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3041 the endianness selected.
3042 * NEWS: Document `set endian auto' mode operation update.
3044 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3046 * Makefile.in: Add new header.
3047 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3048 (sve_vl_from_vg): Likewise.
3049 (sve_vq_from_vl): Likewise.
3050 (sve_vl_from_vq): Likewise.
3051 (sve_vq_from_vg): Likewise.
3052 (sve_vg_from_vq): Likewise.
3053 * configure.nat: Add new c file.
3054 * nat/aarch64-sve-linux-ptrace.c: New file.
3055 * nat/aarch64-sve-linux-ptrace.h: New file.
3057 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3059 * aarch64-linux-nat.c (aarch64_linux_read_description):
3061 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3063 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3064 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3065 (aarch64_gdbarch_init): Add parmeter zero.
3066 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3067 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3068 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3070 * doc/gdb.texinfo: Describe SVE feature
3071 * features/aarch64-sve.c: New file.
3073 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
3076 * gdbarch.sh (significant_addr_bit): Default to zero when
3077 not set by target architecture.
3078 * gdbarch.c: Re-generated.
3079 * utils.c (address_significant): Update.
3081 2018-05-30 Joel Brobecker <brobecker@adacore.com>
3083 * stack.c (func_command): Remove trailing newline in call to error.
3085 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3087 * regcache.h (regcache_raw_collect): Remove, update callers to
3088 use regcache::raw_collect.
3089 * regcache.c (regcache_raw_collect): Remove.
3091 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3093 * regcache.h (regcache_raw_supply): Remove, update callers to
3094 use detached_regcache::raw_supply.
3095 * regcache.c (regcache_raw_supply): Remove.
3097 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3099 * regcache.h (regcache_cooked_write_part): Remove, update
3100 callers to use regcache::cooked_write_part.
3101 * regcache.c (regcache_cooked_write_part): Remove.
3103 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3105 * regcache.h (regcache_cooked_read_part): Remove, update callers
3106 to use readable_regcache::cooked_read_part.
3107 * regcache.c (regcache_cooked_read_part): Remove.
3109 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3111 * regcache.h (regcache_cooked_read_value): Remove, update
3112 callers to use readable_regcache::cooked_read_value.
3113 * regcache.c (regcache_cooked_read_value): Remove.
3115 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3117 * regcache.h (regcache_cooked_write): Remove, update callers to
3118 use regcache::cooked_write.
3119 * regcache.c (regcache_cooked_write): Remove.
3121 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3123 * regcache.h (regcache_invalidate): Remove, update callers to
3124 use detached_regcache::invalidate instead.
3125 * regcache.c (regcache_invalidate): Remove.
3127 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3129 * regcache.h (regcache_raw_write_part): Remove, update callers
3130 to use regcache::raw_write_part instead.
3131 * regcache.c (regcache_raw_write_part): Remove.
3133 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3135 * regcache.h (regcache_raw_read_part): Remove, update callers to
3136 use readable_regcache::raw_read_part instead.
3137 * regcache.c (regcache_raw_read_part): Remove.
3139 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3141 * regcache.h (regcache_cooked_read): Remove, update callers to
3142 use readable_regcache::cooked_read instead.
3143 * regcache.c (regcache_cooked_read): Remove.
3145 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3147 * regcache.h (regcache_raw_write): Remove, update callers to use
3148 regcache::raw_write instead.
3149 * regcache.c (regcache_raw_write): Remove.
3151 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3153 * regcache.h (regcache_raw_read): Remove, update callers to use
3154 readable_regcache::raw_read instead.
3155 * regcache.c (regcache_raw_read): Remove.
3157 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3159 * regcache.h (regcache_raw_update): Remove, update callers to
3160 use readable_regcache::raw_update instead.
3161 * regcache.c (regcache_raw_update): Remove.
3163 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3165 * regcache.h (regcache_register_status): Remove, update callers
3166 to use reg_buffer::get_register_status directly instead.
3167 * regcache.c (regcache_register_status): Remove.
3169 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3171 * regcache.h (regcache_get_ptid): Remove, update all callers to
3172 call regcache::ptid instead.
3173 * regcache.c (regcache_get_ptid): Remove.
3175 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3177 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3179 2018-05-30 Pedro Alves <palves@redhat.com>
3181 * common/common-exceptions.h (exception_rethrow): Use
3184 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
3186 * breakpoint.c (print_solib_event, check_status_catch_solib):
3187 Remove struct keyword in range-based for loops.
3188 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3189 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3191 * linespec.c (find_superclass_methods, search_minsyms_for_name):
3193 * symfile.c (addr_info_make_relative): Likewise.
3194 * thread.c (value_in_thread_stack_temporaries): Likewise.
3196 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
3199 * valops.c (value_struct_elt_for_reference): Call check_typedef on
3200 aggregate type to get its real type before accessing it.
3202 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
3204 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3205 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3206 * coff-pe-read.c (add_pe_forwarded_sym): Replace
3207 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3208 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3209 * jit.c (jit_breakpoint_re_set_internal): Likewise.
3210 * printcmd.c (info_address_command): Likewise.
3212 2018-05-29 Tom Tromey <tom@tromey.com>
3214 * windows-nat.c (handle_exception): Update fall-through comment.
3216 2018-05-29 Tom Tromey <tom@tromey.com>
3218 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
3219 (struct program_space) <added_solibs>: Now a std::vector.
3220 * breakpoint.c (print_solib_event): Update.
3221 (check_status_catch_solib): Update.
3222 * progspace.c (clear_program_space_solib_cache): Update.
3223 * solib.c (update_solib_list): Update.
3225 2018-05-29 Tom Tromey <tom@tromey.com>
3227 * python/py-type.c (typy_richcompare): Update.
3228 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3229 * gdbtypes.h (types_deeply_equal): Return bool.
3230 (types_equal): Likewise.
3231 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
3233 (check_types_equal): Change worklist to std::vector. Return
3235 (struct type_equality_entry): Add constructor.
3236 (compare_maybe_null_strings): Return bool.
3237 (check_types_worklist): Return bool. Change worklist to
3239 (types_deeply_equal): Use std::vector.
3240 (types_equal): Return bool.
3241 (compare_maybe_null_strings): Simplify.
3243 2018-05-29 Tom Tromey <tom@tromey.com>
3245 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
3247 2018-05-29 Tom Tromey <tom@tromey.com>
3249 * objc-lang.h: Don't include cp-support.h.
3250 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
3253 2018-05-27 Tom Tromey <tom@tromey.com>
3255 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3257 2018-05-25 Tom Tromey <tom@tromey.com>
3259 * value.c (value::location): Initialize.
3261 2018-05-25 Tom Tromey <tom@tromey.com>
3263 * dbxread.c (init_bincl_list): Remove.
3264 (bincl_list): Now a std::vector.
3265 (bincls_allocated, next_bincl): Remove.
3266 (free_bincl_list, do_free_bincl_list_cleanup)
3267 (make_cleanup_free_bincl_list): Remove.
3268 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3270 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3271 (struct header_file_location): Add constructor.
3272 (add_bincl_to_list): Remove.
3274 2018-05-25 Tom Tromey <tom@tromey.com>
3276 * tui/tui.c (tui_enable): Update.
3277 * mi/mi-interp.c (mi_interp::init): Update.
3278 * interps.h (class interp) <name>: New method.
3279 <m_name>: Rename from name.
3280 (~scoped_restore_interp): Update.
3281 * interps.c (interp::interp): Update.
3282 (interp_add, interp_set, interp_lookup_existing)
3283 (current_interp_named_p): Update.
3285 2018-05-25 Tom Tromey <tom@tromey.com>
3287 * interps.c (interp_name): Remove.
3288 * mi/mi-interp.c (mi_interp::init): Update.
3289 * interps.h (interp_name): Remove.
3290 (~scoped_restore_interp): Update.
3291 * tui/tui.c (tui_enable): Update.
3293 2018-05-25 Tom Tromey <tom@tromey.com>
3295 * utils.c (fputs_maybe_filtered): Update.
3296 * linespec.c (decode_line_full): Update.
3297 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3298 (mi_print_breakpoint_for_event, mi_solib_loaded)
3299 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3300 (mi_user_selected_context_changed): Update.
3301 * mi/mi-main.c (mi_execute_command): Update.
3302 * cli/cli-script.c (execute_control_command): Update.
3303 * python/python.c (execute_gdb_command): Update.
3304 * solib.c (info_sharedlibrary_command): Update.
3305 * interps.c (interp_ui_out): Remove.
3306 * interps.h (interp_ui_out): Remove.
3308 2018-05-25 Tom Tromey <tom@tromey.com>
3310 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3311 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3312 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3314 2018-05-25 Tom Tromey <tom@tromey.com>
3316 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3317 * interps.c (interp_exec): Use scoped_restore.
3319 2018-05-25 Tom Tromey <tom@tromey.com>
3321 * remote.c (remote_target::remote_file_get): Use
3323 (remote_target::remote_file_put): Likewise.
3325 2018-05-25 Tom Tromey <tom@tromey.com>
3327 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3329 (get_pe_section_index, add_pe_exported_sym): Update.
3330 (read_pe_exported_syms): Use gdb::def_vector.
3332 2018-05-25 Tom Tromey <tom@tromey.com>
3334 * frame.c (remove_prev_frame): Remove.
3335 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3337 2018-05-25 Maciej W. Rozycki <macro@mips.com>
3339 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3341 * mips-linux-nat.c (supply_fpregset): Always call
3342 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3343 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3344 `mips_fill_fpregset'.
3345 * mips-linux-tdep.c (mips_supply_fpregset)
3346 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3347 (mips_fill_fpregset_wrapper): Remove functions.
3348 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3349 (mips_linux_fpregset): Remove variable.
3350 (mips_linux_iterate_over_regset_sections): Use
3351 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3352 (mips_linux_o32_sigframe_init): Remove comment.
3354 2018-05-25 Pedro Alves <palves@redhat.com>
3356 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3357 (struct readahead_cache, struct packet_reg, struct
3358 remote_arch_state, class remote_state): Move higher up in the
3360 (remote_target::m_remote_state): Now an object instead of a pointer.
3361 (remote_target::get_remote_state): Adjust.
3363 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3365 * stack.c (select_and_print_frame): Delete.
3366 (struct function_bounds): Move struct within function.
3367 (func_command): Most content moved into new function
3368 find_frame_for_function, use new function, print result, add
3370 (find_frame_for_function): New function, now returns a result.
3372 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3374 * stack.c (iterate_over_block_arg_vars): Fix comment.
3375 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3377 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3381 (scoped_restore_selected_frame::scoped_restore_selected_frame):
3383 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3385 * frame.h (class scoped_restore_selected_frame): New class.
3386 * stack.c (print_frame_local_vars): Remove catching and rethrowing
3387 of any exception, use scoped_restore_selected_frame to restore the
3390 2018-05-24 Pedro Alves <palves@redhat.com>
3392 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3395 2018-05-23 Tom Tromey <tom@tromey.com>
3397 * complaints.c (struct complaints): Remove.
3398 (symfile_complaint_book): Remove.
3399 (series): New global.
3400 (complaint_internal): Update.
3401 (clear_complaints): Update.
3403 2018-05-23 Tom Tromey <tom@tromey.com>
3405 * complaints.c (counters): New global.
3406 (struct complain): Remove.
3407 (struct complaints) <root>: Remove.
3408 (complaint_sentinel): Remove.
3409 (symfile_complaint_book): Update.
3410 (find_complaint) Remove.
3411 (complaint_internal, clear_complaints): Update.
3413 2018-05-23 Tom Tromey <tom@tromey.com>
3415 * complaints.c (struct complain) <file, line>: Remove.
3416 (find_complaint): Remove file, line parameters.
3417 (complaint_internal): Update.
3419 2018-05-23 Tom Tromey <tom@tromey.com>
3421 * complaints.c (vcomplaint): Remove.
3422 (complaint_internal) Merge in contents of vcomplaint.
3424 2018-05-23 Tom Tromey <tom@tromey.com>
3426 * complaints.c (struct complaints) <explanation>: Remove.
3427 (symfile_explanations): Remove.
3428 (symfile_complaint_book): Update.
3429 (vcomplaint): Update.
3430 (struct explanation): Remove.
3432 2018-05-23 Tom Tromey <tom@tromey.com>
3434 * complaints.c (symfile_complaints): Remove.
3435 (complaint_internal): Remove "complaints" parameter.
3436 (clear_complaints, vcomplaint): Remove "c" parameter.
3437 (get_complaints): Remove.
3438 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3439 (dwarf2_debug_line_missing_file_complaint)
3440 (dwarf2_debug_line_missing_end_sequence_complaint)
3441 (dwarf2_complex_location_expr_complaint)
3442 (dwarf2_const_value_length_mismatch_complaint)
3443 (dwarf2_section_buffer_overflow_complaint)
3444 (dwarf2_macro_malformed_definition_complaint)
3445 (dwarf2_invalid_attrib_class_complaint)
3446 (create_addrmap_from_index, dw2_symtab_iter_next)
3447 (dw2_expand_marked_cus)
3448 (dw2_debug_names_iterator::find_vec_in_debug_names)
3449 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3450 (create_debug_type_hash_table, init_cutu_and_read_dies)
3451 (partial_die_parent_scope, add_partial_enumeration)
3452 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3453 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3454 (read_import_statement, read_file_scope, create_dwo_cu_reader)
3455 (create_cus_hash_table, create_dwp_hash_table)
3456 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3457 (dwarf2_rnglists_process, dwarf2_ranges_process)
3458 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3459 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3460 (handle_struct_member_die, process_structure_scope)
3461 (read_array_type, read_common_block, read_module_type)
3462 (read_tag_pointer_type, read_typedef, read_base_type)
3463 (read_subrange_type, load_partial_dies, partial_die_info::read)
3464 (partial_die_info::read, partial_die_info::read)
3465 (partial_die_info::read, read_checked_initial_length_and_offset)
3466 (dwarf2_string_attr, read_formatted_entries)
3467 (dwarf_decode_line_header)
3468 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3469 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3470 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3471 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3472 (get_signatured_type, get_DW_AT_signature_type)
3473 (decode_locdesc, file_file_name, consume_improper_spaces)
3474 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3475 (dwarf_decode_macro_bytes, dwarf_decode_macros)
3476 (dwarf2_symbol_mark_computed, set_die_type)
3477 (read_attribute_value): Update.
3478 * stap-probe.c (handle_stap_probe, get_stap_base_address):
3480 * dbxread.c (unknown_symtype_complaint)
3481 (lbrac_mismatch_complaint, repeated_header_complaint)
3482 (set_namestring, function_outside_compilation_unit_complaint)
3483 (read_dbx_symtab, process_one_symbol): Update.
3484 * gdbtypes.c (stub_noname_complaint): Update.
3485 * windows-nat.c (handle_unload_dll): Update.
3486 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3487 (decode_base_type): Update.
3488 * xcoffread.c (bf_notfound_complaint, ef_complaint)
3489 (eb_complaint, record_include_begin, record_include_end)
3490 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3491 (process_xcoff_symbol, read_symbol)
3492 (function_outside_compilation_unit_complaint)
3493 (scan_xcoff_symtab): Update.
3494 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3495 * buildsym.c (finish_block_internal, make_blockvector)
3496 (end_symtab_get_static_block, augment_type_symtab): Update.
3497 * dtrace-probe.c (dtrace_process_dof)
3498 (dtrace_static_probe_ops::get_probes): Update.
3499 * complaints.h (struct complaint): Don't declare.
3500 (symfile_complaints): Remove.
3501 (complaint_internal): Remove "complaints" parameter.
3502 (complaint): Likewise.
3503 (clear_complaints): Likewise.
3504 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3505 (reread_symbols): Update.
3506 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3507 (dwarf2_frame_cache, decode_frame_entry): Update.
3508 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3509 * objc-lang.c (lookup_objc_class, lookup_child_selector)
3510 (info_selectors_command): Update.
3511 * macrotab.c (macro_include, check_for_redefinition)
3512 (macro_undef): Update.
3513 * objfiles.c (filter_overlapping_sections): Update.
3514 * stabsread.c (invalid_cpp_abbrev_complaint)
3515 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3516 (define_symbol, error_type, read_type, rs6000_builtin_type)
3517 (stabs_method_name_from_physname, read_member_functions)
3518 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3519 (attach_fields_to_type, complain_about_struct_wipeout)
3520 (read_range_type, read_args, common_block_start)
3521 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
3523 * mdebugread.c (index_complaint, unknown_ext_complaint)
3524 (basic_type_complaint, bad_tag_guess_complaint)
3525 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
3526 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
3527 (parse_procedure, parse_lines)
3528 (function_outside_compilation_unit_complaint)
3529 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
3530 (bad_tag_guess_complaint, reg_value_complaint): Update.
3531 * cp-support.c (demangled_name_complaint): Update.
3532 * macroscope.c (sal_macro_scope): Update.
3533 * dwarf-index-write.c (class debug_names): Update.
3535 2018-05-23 Tom Tromey <tom@tromey.com>
3537 * complaints.c (clear_complaints): Remove "noisy" parameter.
3538 * complaints.h (clear_complaints): Update.
3539 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3540 (reread_symbols): Update.
3542 2018-05-23 Tom Tromey <tom@tromey.com>
3544 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
3546 (vcomplaint, clear_complaints): Update.
3547 (symfile_explanations): Remove some messages.
3549 2018-05-23 Tom Tromey <tom@tromey.com>
3551 * complaints.c (internal_complaint): Remove.
3552 * complaints.h (internal_complaint): Remove.
3554 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3556 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
3558 2018-05-22 Pedro Alves <palves@redhat.com>
3560 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
3561 (remote_fileio_badfd, remote_fileio_return_errno)
3562 (remote_fileio_return_success, remote_fileio_func_open)
3563 (remote_fileio_func_open, remote_fileio_func_close)
3564 (remote_fileio_func_read, remote_fileio_func_write)
3565 (remote_fileio_func_lseek, remote_fileio_func_rename)
3566 (remote_fileio_func_unlink, remote_fileio_func_stat)
3567 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
3568 (remote_fileio_func_isatty, remote_fileio_func_system): Add
3569 remote_target parameter.
3570 (remote_fio_func_map) <func>: Add remote_target parameter.
3571 (do_remote_fileio_request, remote_fileio_request):
3572 * remote-fileio.h (remote_fileio_request):
3573 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
3574 remote_target parameter.
3575 (remote_notif_process, handle_notification): Adjust to pass down
3577 (remote_notif_state_allocate): Add remote_target parameter. Save
3579 * remote-notif.h (struct remote_target): Forward declare.
3580 (struct notif_client) <parse, ack, can_get_pending_events>: Add
3581 remote_target parameter.
3582 (struct remote_notif_state) <remote>: New field.
3583 (remote_notif_ack, remote_notif_parse): Add remote_target
3585 (remote_notif_state_allocate, remote_notif_state_allocate): Add
3586 remote_target parameter.
3587 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
3588 (threads_listing_context, rmt_thread_action, protocol_feature)
3589 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
3590 (packet_result, struct threads_listing_context, remote_state):
3591 Move definitions and declarations higher up.
3592 (remote_target) <~remote_target>: Declare.
3593 (remote_download_command_source, remote_file_put, remote_file_get)
3594 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
3595 (remote_hostio_pread_vFile, remote_hostio_send_command)
3596 (remote_hostio_set_filesystem, remote_hostio_open)
3597 (remote_hostio_close, remote_hostio_unlink, remote_state)
3598 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
3599 (get_memory_write_packet_size, get_memory_read_packet_size)
3600 (append_pending_thread_resumptions, remote_detach_1)
3601 (append_resumption, remote_resume_with_vcont)
3602 (add_current_inferior_and_thread, wait_ns, wait_as)
3603 (process_stop_reply, remote_notice_new_inferior)
3604 (process_initial_stop_replies, remote_add_thread)
3605 (btrace_sync_conf, remote_btrace_maybe_reopen)
3606 (remove_new_fork_children, kill_new_fork_children)
3607 (discard_pending_stop_replies, stop_reply_queue_length)
3608 (check_pending_events_prevent_wildcard_vcont)
3609 (discard_pending_stop_replies_in_queue, stop_reply)
3610 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
3611 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
3612 (remote_interrupt_as, remote_interrupt_ns)
3613 (remote_get_noisy_reply, remote_query_attached)
3614 (remote_add_inferior, remote_current_thread, get_current_thread)
3615 (set_thread, set_general_thread, set_continue_thread)
3616 (set_general_process, write_ptid)
3617 (remote_unpack_thread_info_response, remote_get_threadinfo)
3618 (parse_threadlist_response, remote_get_threadlist)
3619 (remote_threadlist_iterator, remote_get_threads_with_ql)
3620 (remote_get_threads_with_qxfer)
3621 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
3622 (get_offsets, remote_check_symbols, remote_supported_packet)
3623 (remote_query_supported, remote_packet_size)
3624 (remote_serial_quit_handler, remote_detach_pid)
3625 (remote_vcont_probe, remote_resume_with_hc)
3626 (send_interrupt_sequence, interrupt_query)
3627 (remote_notif_get_pending_events, fetch_register_using_p)
3628 (send_g_packet, process_g_packet, fetch_registers_using_g)
3629 (store_register_using_P, store_registers_using_G)
3630 (set_remote_traceframe, check_binary_download)
3631 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
3632 (remote_xfer_live_readonly_partial, remote_read_bytes)
3633 (remote_send_printf, remote_flash_write, readchar)
3634 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
3635 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
3636 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
3637 (extended_remote_disable_randomization, extended_remote_run)
3638 (send_environment_packet, extended_remote_environment_support)
3639 (extended_remote_set_inferior_cwd, remote_write_qxfer)
3640 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
3641 (packet_command): Now methods of ...
3642 (remote_target): ... this class.
3643 (m_remote_state) <remote_target>: New field.
3644 (struct remote_state) <stop_reply_queue,
3645 remote_async_inferior_event_token, wait_forever_enabled_p>: New
3647 (remote_state::remote_state): Allocate stop_reply_queue.
3648 (remote_state): Delete global.
3649 (get_remote_state_raw): Delete.
3650 (remote_target::get_remote_state): Allocate m_remote_state on
3652 (get_current_remote_target): New.
3653 (remote_ops, extended_remote_ops): Delete.
3654 (wait_forever_enabled_p, remote_async_inferior_event_token):
3655 Delete, moved to struct remote_state.
3656 (remote_target::close): Delete self. Destruction bits split to
3658 (remote_target::~remote_target): ... this.
3659 (show_memory_packet_size): Adjust to use
3660 get_current_remote_target.
3661 (struct protocol_feature) <func>: Add remote_target parameter.
3662 All callers adjusted.
3663 (curr_quit_handler_target): New.
3664 (remote_serial_quit_handler): Reimplement.
3665 (remote_target::open_1): Adjust to use get_current_remote_target.
3666 Heap-allocate remote_target/extended_remote_target instances.
3667 (vcont_builder::vcont_builder): Add remote_target parameter, and
3668 save it in m_remote. All callers adjusted.
3669 (vcont_builder::m_remote): New field.
3670 (vcont_builder::restart, vcont_builder::flush)
3671 (vcont_builder::push_action): Use it.
3672 (remote_target::commit_resume): Use it.
3673 (struct queue_iter_param) <remote>: New field.
3674 (remote_target::remove_new_fork_children): Fill in 'remote' field.
3675 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
3676 (check_pending_event_prevents_wildcard_vcont_callback)
3677 (remote_target::check_pending_events_prevent_wildcard_vcont)
3678 (remote_target::discard_pending_stop_replies)
3679 (remote_target::discard_pending_stop_replies_in_queue)
3680 (remote_target::remote_notif_remove_queued_reply): Fill in
3682 (remote_notif_get_pending_events): New.
3683 (remote_target::readchar, remote_target::remote_serial_write):
3684 Save/restore curr_quit_handler_target.
3686 (kill_new_fork_children): Fill in 'remote' field.
3687 (packet_command): Use get_current_remote_target, defer to
3688 remote_target method of same name.
3689 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
3690 parameter, and save it in m_remote. All callers adjusted.
3691 (scoped_remote_fd::release): Use m_remote.
3692 (scoped_remote_fd::m_remote): New field.
3693 (remote_file_put, remote_file_get, remote_file_delete): Use
3694 get_current_remote_target, defer to remote_target method of same
3696 (remote_btrace_reset): Add remote_state paremeter. Update all
3698 (remote_async_inferior_event_handler). Pass down 'data'.
3699 (remote_new_objfile): Use get_current_remote_target.
3700 (remote_target::vcont_r_supported): New.
3701 (set_range_stepping): Use get_current_remote_target and
3702 remote_target::vcont_r_supported.
3703 (_initialize_remote): Don't allocate 'remote_state' and
3704 'stop_reply_queue' globals.
3705 * remote.h (struct remote_target): Forward declare.
3706 (getpkt, putpkt, remote_notif_get_pending_events): Add
3707 'remote_target' parameter.
3709 2018-05-22 Pedro Alves <palves@redhat.com>
3711 * remote.c (vcont_builder): Now a class. Make all data members
3713 (vcont_builder) <vcont_builder, restart, flush, push_action>:
3715 (vcont_builder_restart): Rename to ...
3716 (vcont_builder::restart): ... this.
3717 (vcont_builder_flush): Rename to ...
3718 (vcont_builder::flush): ... this.
3719 (vcont_builder_push_action): Rename to ...
3720 (vcont_builder::push_action): ... this.
3721 (remote_target::commit_resume): Adjust.
3723 2018-05-22 Pedro Alves <palves@redhat.com>
3725 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
3726 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
3727 (get_fixed_memory_packet_size): New.
3728 (get_memory_packet_size): Use it.
3729 (set_memory_packet_size): Don't override the config size with
3730 DEFAULT_MAX_MEMORY_PACKET_SIZE.
3731 (show_memory_packet_size): Use get_fixed_memory_packet_size.
3732 Don't refer to get_memory_packet_size if not connected to a remote
3733 target. Show "(default)" if configured size is 0.
3735 2018-05-22 Pedro Alves <palves@redhat.com>
3737 * remote.c (remote_target::mourn_inferior): Move
3738 discard_pending_stop_replies call here from ...
3739 (_initialize_remote): ... here.
3741 2018-05-22 Pedro Alves <palves@redhat.com>
3743 * remote.c (compare_section_command): Remove set_general_process
3746 2018-05-22 Pedro Alves <palves@redhat.com>
3748 * remote.c (struct packet_reg, struct remote_arch_state):
3749 Move higher up in the file.
3750 (remote_state) <m_arch_states>: Store remote_arch_state values
3751 instead of remote_arch_state pointers.
3752 (remote_state::get_remote_arch_state): Adjust.
3754 2018-05-22 Pedro Alves <palves@redhat.com>
3756 * remote.c: Include <unordered_map>.
3757 (remote_state): Now a class.
3758 (remote_state) <get_remote_arch_state>: Declare method.
3759 <get_remote_arch_state>: New field.
3760 (remote_arch_state) <remote_arch_state>: Declare ctor.
3761 <regs>: Now a unique_ptr.
3762 (remote_gdbarch_data_handle): Delete.
3763 (get_remote_arch_state): Delete.
3764 (remote_state::get_remote_arch_state): New.
3765 (get_remote_state): Adjust to call remote_state's
3766 get_remote_arch_state method.
3767 (init_remote_state): Delete, bits factored out to ...
3768 (remote_arch_state::remote_arch_state): ... this new method.
3769 (get_remote_packet_size, get_memory_packet_size)
3770 (process_g_packet, remote_target::fetch_registers)
3771 (remote_target::prepare_to_store, store_registers_using_G)
3772 (remote_target::store_registers, remote_target::get_trace_status):
3773 Adjust to call remote_state's method.
3774 (_initialize_remote): Remove reference to
3775 remote_gdbarch_data_handle.
3777 2018-05-22 Pedro Alves <palves@redhat.com>
3779 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
3780 pread>: New method declarations.
3781 (remote_target::open_1): Adjust.
3782 (readahead_cache_invalidate): Rename to ...
3783 (readahead_cache::invalidate): ... this, and adjust to be a class
3785 (readahead_cache_invalidate_fd): Rename to ...
3786 (readahead_cache::invalidate_fd): ... this, and adjust to be a
3788 (remote_hostio_pwrite): Adjust.
3789 (remote_hostio_pread_from_cache): Rename to ...
3790 (readahead_cache::pread): ... this, and adjust to be a class
3792 (remote_hostio_close): Adjust.
3794 2018-05-22 Pedro Alves <palves@redhat.com>
3796 * remote.c (remote_hostio_close_cleanup): Delete.
3797 (class scoped_remote_fd): New.
3798 (remote_file_put, remote_file_get): Use it.
3800 2018-05-22 Pedro Alves <palves@redhat.com>
3802 (struct vCont_action_support): Use bool and initialize all fields.
3803 (struct readahead_cache): Initialize all fields.
3804 (remote_state): Use bool and initialize all fields.
3805 (remote_state::remote_state, remote_state::~remote_state): New.
3806 (new_remote_state): Delete.
3807 (_initialize_remote): Use new to allocate remote_state.
3809 2018-05-22 Pedro Alves <palves@redhat.com>
3813 * c-exp.y: Include "c-support.h".
3814 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
3815 of tolower. Use c_ident_is_alpha to scan names.
3816 * c-lang.c: Include "c-support.h".
3817 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
3818 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
3819 * c-support.h: New file, with bits factored out from ...
3820 * cp-name-parser.y: ... this file.
3821 Include "c-support.h".
3822 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
3823 c-support.h and renamed.
3824 (symbol_end, yylex): Adjust.
3826 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3828 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
3829 parameter type to CORE_ADDR.
3830 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
3831 parameter type in declaration to CORE_ADDR.
3832 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
3833 target_auxv_search to get AT_HWCAP and use the result to get the
3835 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
3836 to CORE_ADDR. Remove the cast of the return value to unsigned
3837 long. Fix error predicate of target_auxv_search.
3838 (ppc_linux_nat_target::read_description): Change the type of the
3839 hwcap variable to CORE_ADDR.
3841 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3843 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
3844 if the size of fpscr is larger than 32 bits.
3846 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3848 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
3849 (ppc32_linux_vsxregmap): New global.
3850 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
3851 regcache_supply_regset, and regcache_collect_regset.
3852 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
3853 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
3854 (fetch_vsx_register, store_vsx_register): Remove.
3855 (fetch_vsx_registers): Add regno parameter. Get regset using
3856 ppc_linux_vsxregset. Use regset to supply registers.
3857 (store_vsx_registers): Add regno parameter. Get regset using
3858 ppc_linux_vsxregset. Use regset to collect registers.
3859 (fetch_register): Call fetch_vsx_registers instead of
3861 (store_register): Call store_vsx_registers instead of
3863 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
3864 new regno parameter.
3865 (store_ppc_registers): Call store_vsx_registers with -1 for the
3866 new regno parameter.
3867 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
3868 (ppc_collect_vsxregset): Remove.
3870 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3872 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
3874 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
3875 for vector register offset fields.
3876 (ppc64_fbsd_reg_offsets): Likewise.
3877 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3878 to vector register offset fields.
3879 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3880 to vector register offset fields.
3881 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
3882 vector register offset fields.
3883 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
3884 initializers for vector register offset fields.
3885 (rs6000_aix64_reg_offsets): Likewise.
3886 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
3887 (ppc_supply_vrregset): Remove.
3888 (ppc_collect_vrregset): Remove.
3889 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
3890 (ppc_linux_vrregset) : New function.
3891 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
3892 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
3893 (ppc32_linux_vrregset): Remove.
3894 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
3895 and use result instead of ppc32_linux_vrregset.
3896 (ppc32_linux_reg_offsets): Remove initializers for vector register
3898 (ppc64_linux_reg_offsets): Likewise.
3899 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
3900 * ppc-linux-nat.c: Include regset.h.
3901 (gdb_vrregset_t): Adjust comment to account for little-endian
3903 (supply_vrregset, fill_vrregset): Remove.
3904 (fetch_altivec_register, store_altivec_register): Remove.
3905 (fetch_altivec_registers): Add regno parameter. Get regset using
3906 ppc_linux_vrregset. Use regset to supply registers.
3907 (store_altivec_registers): Add regno parameter. Get regset using
3908 ppc_linux_vrregset. Use regset to collect registers.
3909 (fetch_register): Call fetch_altivec_registers instead of
3910 fetch_altivec_register.
3911 (store_register): Call store_altivec_registers instead of
3912 store_altivec_register.
3913 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
3914 the new regno parameter.
3915 (store_ppc_registers): Call store_altivec_registers with -1 for
3916 the new regno parameter.
3918 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3920 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
3921 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
3922 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3923 (gdb_vrregset_t): Change array type size to
3924 PPC_LINUX_SIZEOF_VRREGSET.
3925 (gdb_vsxregset_t): Change array type size to
3926 PPC_LINUX_SIZEOF_VSXREGSET.
3927 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
3928 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
3929 PPC_LINUX_SIZEOF_VSXREGSET.
3931 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3933 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
3934 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
3936 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
3937 ppc_linux_target_wordsize with tid.
3938 (ppc_linux_nat_target::read_description): Call ppc_linux_target
3940 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
3941 (ppc64_64bit_inferior_p): Add static and inline specifiers.
3942 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
3943 tid parameter. Remove static specifier.
3944 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
3945 (ppc_linux_target_wordsize): New declaration.
3947 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3949 * arch/ppc-linux-common.c: New file.
3950 * arch/ppc-linux-common.h: New file.
3951 * arch/ppc-linux-tdesc.h: New file.
3952 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
3953 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
3954 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
3955 arch/ppc-linux-tdesc.h.
3956 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
3957 arch/ppc-linux-tdesc.h.
3958 (ppc_linux_nat_target::read_description): Remove target
3959 description matching code. Fill a ppc_linux_features struct and
3960 call ppc_linux_match_description with it. Move comment about ISA
3961 2.05 to ppc-linux-common.c.
3962 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
3963 arch/ppc-linux-tdesc.h.
3964 (ppc_linux_core_read_description): Remove target description
3965 matching code. Fill a ppc_linux_features struct and call
3966 ppc_linux_match_description with it.
3967 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3968 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3969 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3970 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3971 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3972 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3973 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3974 (tdesc_powerpc_e500l): Remove.
3976 2018-05-22 Joel Brobecker <brobecker@adacore.com>
3978 * ada-lang.c (catch_assert_command): Pass empty string instead
3979 of NULL for excep_string argument.
3981 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3983 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
3984 the width of the requested register exceeds the width of the
3987 2018-05-21 Tom Tromey <tom@tromey.com>
3989 * printcmd.c (output_command): Remove.
3990 (output_command_const): Rename to output_command.
3991 * valprint.h (output_command): Rename from output_command_const.
3992 * tracepoint.c (trace_dump_actions): Call output_command.
3994 2018-05-21 Tom Tromey <tom@tromey.com>
3996 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3997 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
3998 * ada-lang.h (create_ada_exception_catchpoint): Update.
3999 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4001 (create_excep_cond_exprs, ~ada_catchpoint)
4002 (should_stop_exception, print_one_exception)
4003 (print_mention_exception, print_recreate_exception): Update.
4004 (ada_get_next_arg): Remove.
4005 (catch_ada_exception_command_split): Use std::string. Change type
4006 of "excep_string", "cond_string".
4007 (catch_ada_exception_command): Update.
4008 (create_ada_exception_catchpoint): Change type of excep_string.
4009 (ada_exception_sal): Remove excep_string parameter.
4010 (~ada_catchpoint): Remove.
4012 2018-05-21 Tom Tromey <tom@tromey.com>
4014 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4017 2018-05-21 Tom Tromey <tom@tromey.com>
4019 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4020 Return unique_xmalloc_ptr.
4021 (print_it_exception): Update.
4023 2018-05-21 Tom Tromey <tom@tromey.com>
4025 * tracepoint.c (trace_dump_actions): Use std::string.
4027 2018-05-21 Tom Tromey <tom@tromey.com>
4029 * symfile.c (reread_symbols): Use std::string for original_name.
4031 2018-05-21 Tom Tromey <tom@tromey.com>
4033 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4034 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4037 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4039 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4041 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4042 * objfiles.c (get_objfile_bfd_data): Allocate
4043 objfile_per_bfd_storage with obstack_new when allocating on
4046 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4048 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4050 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4051 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4052 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4053 (add_pending): Likewise.
4054 (parse_symbol): Likewise.
4055 (parse_partial_symbols): Likewise.
4056 (psymtab_to_symtab_1): Likewise.
4057 (new_psymtab): Likewise.
4058 (elfmdebug_build_psymtabs): Likewise.
4059 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4060 * objfiles.c (get_objfile_bfd_data): Likewise.
4061 (objfile_register_static_link): Likewise.
4062 * psymtab.c (allocate_psymtab): Likewise.
4063 * stabsread.c (read_member_functions): Likewise.
4064 * xcoffread.c (xcoff_end_psymtab): Likewise.
4066 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4068 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4069 compiler supports std::is_trivially_constructible.
4070 * common/poison.h: Include obstack.h.
4071 (IsMallocable): Define to is_trivially_constructible if the
4072 compiler supports it, define to true_type otherwise.
4076 (XOBNEWVEC): Redefine.
4077 * gdb_obstack.h (obstack_zalloc): New.
4078 (OBSTACK_ZALLOC): Redefine.
4079 (obstack_calloc): New.
4080 (OBSTACK_CALLOC): Redefine.
4082 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4083 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4085 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4086 obstack_calloc/obstack_zalloc.
4087 (gdbarch_obstack_zalloc): Remove.
4088 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4090 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4092 * stack.c (backtrace_command_1): Remove useless variable int i.
4094 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4096 * stack.c (print_frame_info): Fix comment.
4098 2018-05-18 Tom Tromey <tom@tromey.com>
4100 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4101 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4102 (~dwarf2_per_objfile): Update
4103 (dwarf2_get_dwz_file): Use new.
4104 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4107 2018-05-18 Tom Tromey <tom@tromey.com>
4109 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4111 * dwarf2read.c (struct dwp_file): Add constructor and
4113 (open_and_init_dwp_file): Return a unique_ptr.
4114 (dwarf2_per_objfile, create_dwp_hash_table)
4115 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4116 (lookup_dwo_unit_in_dwp): Update.
4117 (open_and_init_dwp_file, get_dwp_file): Update.
4119 2018-05-18 Tom Tromey <tom@tromey.com>
4121 * dwarf2read.c (dwarf2_per_objfile): Update.
4122 (struct mapped_index): Add initializers.
4123 (dwarf2_read_index): Use new.
4124 (dw2_symtab_iter_init): Update.
4125 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4128 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4130 * dwarf2read.c (mapped_index) <total_size>: Remove.
4132 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4134 * unittests/format_pieces-selftests.c (test_format_specifier):
4137 2018-05-18 Tom Tromey <tom@tromey.com>
4139 * c-typeprint.c (maybe_print_hole): New function.
4140 (c_print_type_struct_field_offset): Update.
4141 (c_type_print_base_struct_union): Call maybe_print_hole.
4143 2018-05-17 Keith Seitz <keiths@redhat.com>
4145 * breakpoint.c (build_bpstat_chain): New function, moved from
4147 (bpstat_stop_status): Add optional parameter, `stop_chain'.
4148 If no stop chain is passed, call build_bpstat_chain to build it.
4149 * breakpoint.h (build_bpstat_chain): Declare.
4150 (bpstat_stop_status): Move documentation here from breakpoint.c.
4151 * infrun.c (handle_signal_stop): Before eliding inlined frames,
4152 build the stop chain and pass it to skip_inline_frames.
4153 Pass this stop chain to bpstat_stop_status.
4154 * inline-frame.c: Include breakpoint.h.
4155 (stopped_by_user_bp_inline_frame): New function.
4156 (skip_inline_frames): Add parameter `stop_chain'.
4157 Move documention to inline-frame.h.
4158 If non-NULL, use stopped_by_user_bp_inline_frame to determine
4159 whether the frame should be elided.
4160 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4161 Add moved documentation and update for new parameter.
4163 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4166 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4167 unittests/format_pieces-selftests.c.
4168 * common/format.h (format_piece) <operator==>: New.
4169 (format_pieces) <operator[]>: Remove.
4170 * common/format.c (format_pieces::format_pieces): Handle \e.
4171 * unittests/format_pieces-selftests.c: New.
4173 2018-05-17 Tom Tromey <tom@tromey.com>
4176 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4177 (dw2_instantiate_symtab): Add skip_partial parameter.
4178 (dw2_find_last_source_symtab, dw2_map_expand_apply)
4179 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4180 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4181 (dw2_expand_symtabs_matching_one)
4182 (dw2_find_pc_sect_compunit_symtab)
4183 (dw2_debug_names_lookup_symbol)
4184 (dw2_debug_names_expand_symtabs_for_function): Update.
4185 (init_cutu_and_read_dies): Add skip_partial parameter.
4186 (process_psymtab_comp_unit, build_type_psymtabs_1)
4187 (process_skeletonless_type_unit, load_partial_comp_unit)
4188 (psymtab_to_symtab_1): Update.
4189 (load_full_comp_unit): Add skip_partial parameter.
4190 (process_imported_unit_die, dwarf2_read_addr_index)
4191 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4192 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4193 (read_signatured_type): Update.
4195 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4197 * value.c (release_value): Remove unused variable.
4198 (record_latest_value): Likewise.
4199 (access_value_history): Likewise.
4200 (preserve_values): Likewise.
4202 2018-05-17 Tom Tromey <tom@tromey.com>
4204 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4207 2018-05-16 Maciej W. Rozycki <macro@mips.com>
4210 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4211 Also handle registers whose width is not a multiple of
4213 (linux_nat_trad_target::store_register): Likewise.
4215 2018-05-16 Tom Tromey <tom@tromey.com>
4217 * gdbcore.h (core_bfd): Redefine.
4218 * corelow.c (core_target::close): Update.
4219 (core_target_open): Update.
4220 * progspace.h (struct program_space) <cbfd>: Now a
4223 2018-05-16 Tom Tromey <tom@tromey.com>
4226 * symfile-add-flags.h (enum symfile_add_flags)
4227 <SYMFILE_NOT_FILENAME>: New constant.
4228 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
4229 objfile name from BFD.
4230 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4231 * minidebug.c (find_separate_debug_file_in_section): Put
4232 ".gnu_debugdata" into BFD's file name.
4234 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
4236 * regcache.c (regcache_read_ftype, regcache_write_ftype):
4239 2018-05-15 Tamar Christina <tamar.christina@arm.com>
4242 * aarch64-tdep.c (aarch64_analyze_prologue,
4243 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4244 Indicate not interested in errors.
4246 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4248 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4249 Supply the MIPS_ZERO_REGNUM register.
4251 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4253 * mips-tdep.c (mask_address_var): Make variable static.
4255 2018-05-14 Tom Tromey <tom@tromey.com>
4257 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4259 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
4261 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4262 FXSAVE_ADDR for the mxcsr register.
4264 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
4266 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4268 2018-05-11 Pedro Alves <palves@redhat.com>
4270 * corelow.c (core_target) <core_target>: No longer inline.
4271 Initialize m_core_gdbarch, m_core_vec and build the section table
4273 <~core_target>: New.
4274 <core_gdbarch, get_core_register_section>: New methods.
4275 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4276 factored out from ...
4277 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4279 (sniff_core_bfd): Add gdbarch parameter.
4280 (core_close): Delete, merged into ...
4281 (core_target::close): ... here. Delete self.
4282 (core_close_cleanup): Delete.
4283 (core_target_open): Allocate a core_target on the heap. Use a
4284 unique_ptr instead of a cleanup. Bits moved into the core_target
4285 ctor. Adjust to use core_target methods instead of globals.
4286 (get_core_register_section): Rename to ...
4287 (core_target::get_core_register_section): ... this and adjust.
4288 (struct get_core_registers_cb_data): New.
4289 (get_core_registers_cb): Use it. Use bool.
4290 (core_target::fetch_registers, core_target::files_info)
4291 (core_target::xfer_partial, core_target::read_description)
4292 (core_target::pid_to, core_target::thread_name): Adjust to
4293 reference class fields instead of globals.
4294 * target.h (struct target_ops_deleter, target_ops_up): New.
4296 2018-05-11 Pedro Alves <palves@redhat.com>
4298 * corefile.c (core_file_command): Move to corelow.c.
4299 * corelow.c (the_core_target): Delete.
4300 (core_file_command): Moved from corefile.c. Check exec_bfd
4301 instead of the_core_target. Use target_detach instead of calling
4302 into the_core_target directly.
4303 (maybe_say_no_core_file_now): New.
4304 (core_target::detach): Use it.
4305 (_initialize_corelow): Remove references to the_core_target.
4306 * gdbcore.h (the_core_target): Delete.
4308 2018-05-11 Tom Tromey <tromey@redhat.com>
4309 Pedro Alves <palves@redhat.com>
4311 * corefile.c (core_bfd): Remove.
4312 * gdbcore.h (core_bfd): Now a macro.
4313 * progspace.h (struct program_space) <cbfd>: New field.
4315 2018-05-11 Tom Tromey <tom@tromey.com>
4317 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4320 2018-05-10 Tom Tromey <tom@tromey.com>
4322 * configure: Rebuild.
4323 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4325 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4328 * regformats/regdat.sh: Adjust script, following the addition
4329 of the new expedite_regs parameter to init_target_desc.
4331 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
4334 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4335 set_gdbarch_significant_addr_bit.
4336 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4337 set_gdbarch_significant_addr_bit.
4338 * utils.c (address_significant): Update to sign extend addr.
4340 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
4342 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4343 (xtensa_linux_init_abi): Limit tdep->num_regs by
4344 tdep->num_nopriv_regs.
4345 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4346 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4349 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
4351 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4353 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4355 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4356 (I387_MXCSR_INIT_VAL): New constant.
4357 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4358 buffer if it was supplied by the inferior.
4359 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4360 (i387_xsave_get_clear_bv): New function.
4361 (i387_supply_xsave): Only read x87 control registers from the
4362 xsave buffer if the feature is enabled, and the state will have
4363 been written, otherwise, provide a suitable default.
4364 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4365 including x87 control registers. Update control registers if they
4366 have changed from the default value, and mark features as enabled
4368 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4370 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4372 * spu-tdep.c (info_spu_event_command): Fix output formatting.
4374 2018-05-07 Tom Tromey <tom@tromey.com>
4376 * configure: Rebuild.
4377 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4379 2018-05-07 Tom Tromey <tom@tromey.com>
4382 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4383 bit. Use correct value for VDIV.
4385 2018-05-04 Tom Tromey <tom@tromey.com>
4387 * configure: Rebuild.
4388 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4390 2018-05-04 Tom Tromey <tom@tromey.com>
4392 * linux-record.c (record_linux_system_call) <case
4393 RECORD_SYS_RECVFROM>: Add "break".
4395 2018-05-04 Tom Tromey <tom@tromey.com>
4397 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4398 Add missing "break".
4399 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4400 Add missing "break".
4402 2018-05-04 Tom Tromey <tom@tromey.com>
4404 * rs6000-tdep.c (ppc_process_record_op4)
4405 (ppc_process_record_op63): Add fall-through comment.
4407 2018-05-04 Tom Tromey <tom@tromey.com>
4409 * i386-tdep.c (i386_process_record): Add fall-through comment.
4411 2018-05-04 Tom Tromey <tom@tromey.com>
4413 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4416 2018-05-04 Tom Tromey <tom@tromey.com>
4418 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4419 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4420 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4422 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4424 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4427 2018-05-04 Tom Tromey <tom@tromey.com>
4429 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4431 2018-05-04 Tom Tromey <tom@tromey.com>
4433 * s390-tdep.c (s390_process_record): Fix fall-through comments.
4434 * xcoffread.c (scan_xcoff_symtab): Move comment later.
4435 * symfile.c (section_is_mapped): Fix fall-through comment.
4436 * stabsread.c (define_symbol, read_member_functions): Fix
4437 fall-through comment.
4438 * s390-linux-tdep.c (s390_process_record): Fix fall-through
4440 * remote.c (remote_wait_as): Fix fall-through comment.
4441 * p-exp.y (yylex): Fix fall-through comment.
4442 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4444 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4445 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4446 * jv-exp.y (yylex): Fix fall-through comment.
4447 * go-exp.y (lex_one_token): Fix fall-through comment.
4448 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4449 fall-through comment.
4450 * f-exp.y (yylex): Fix fall-through comment.
4451 * dwarf2read.c (process_die): Fix fall-through comments.
4452 * dbxread.c (process_one_symbol): Fix fall-through comment.
4453 * d-exp.y (lex_one_token): Fix fall-through comment.
4454 * cp-name-parser.y (yylex): Fix fall-through comment.
4455 * coffread.c (coff_symtab_read): Fix fall-through comment.
4456 * c-exp.y (lex_one_token): Fix fall-through comment.
4457 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4459 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4462 2018-05-04 Tom Tromey <tom@tromey.com>
4465 * NEWS: Mention gdb.execute change.
4466 * gdbcmd.h (execute_control_command): Don't declare.
4467 * python/python.c (execute_gdb_command): Use read_command_lines_1,
4468 execute_control_commands, execute_control_commands_to_string.
4469 * cli/cli-script.h (execute_control_commands)
4470 (execute_control_commands_to_string): Declare.
4471 (execute_control_command): Add from_tty parameter.
4472 * cli/cli-script.c (execute_control_commands)
4473 (execute_control_commands_to_string): New functions.
4474 (execute_user_command): Use execute_control_commands.
4475 (execute_control_command_1): Add "from_tty" parameter. Update.
4476 (execute_control_command): Likewise.
4478 2018-05-04 Tom Tromey <tom@tromey.com>
4481 * NEWS: Mention that breakpoint commands are writable.
4482 * python/py-breakpoint.c (bppy_set_commands): New function.
4483 (breakpoint_object_getset) <"commands">: Use it.
4485 2018-05-04 Tom Tromey <tom@tromey.com>
4487 * tracepoint.c (actions_command): Update.
4488 * mi/mi-cmd-break.c (mi_command_line_array)
4489 (mi_command_line_array_cnt, mi_command_line_array_ptr)
4490 (mi_read_next_line): Remove.
4491 (mi_cmd_break_commands): Update.
4492 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4494 * cli/cli-script.c (get_command_line): Update.
4495 (process_next_line): Use function_view. Constify.
4496 (recurse_read_control_structure, read_command_lines)
4497 (read_command_lines_1): Change argument types to function_view.
4498 (do_define_command, document_command): Update.
4499 * breakpoint.h (check_tracepoint_command): Don't declare.
4500 * breakpoint.c (check_tracepoint_command): Remove.
4501 (commands_command_1, create_tracepoint_from_upload): Update.
4503 2018-05-04 Tom Tromey <tom@tromey.com>
4506 * cli/cli-script.h (enum command_control_type) <define_control>:
4508 * cli/cli-script.c (multi_line_command_p): Handle define_control.
4509 (build_command_line, execute_control_command_1)
4510 (process_next_line): Likewise.
4511 (do_define_command): New function, extracted from define_command.
4512 (define_command): Use it.
4514 2018-05-04 Tom Tromey <tom@tromey.com>
4516 * tracepoint.c (actions_command): Update.
4517 * cli/cli-script.h (read_command_lines): Update.
4518 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4519 (MAX_TMPBUF): Remove define.
4520 (define_command): Use string_printf.
4521 (document_command): Likewise.
4522 * breakpoint.c (commands_command_1): Update.
4524 2018-05-04 Tom Tromey <tom@tromey.com>
4526 * top.c (execute_command): Update.
4527 * cli/cli-script.h (print_command_lines): Now varargs.
4528 * cli/cli-script.c (print_command_lines): Now varargs.
4529 (execute_control_command_1) <case while_control, case if_control>:
4532 2018-05-04 Tom Tromey <tom@tromey.com>
4534 * tracepoint.c (all_tracepoint_actions): Rename from
4535 all_tracepoint_actions_and_cleanup. Change return type.
4536 (actions_command, encode_actions_1, encode_actions)
4537 (trace_dump_actions, tdump_command): Update.
4538 * remote.c (remote_download_command_source): Update.
4539 * python/python.c (gdbpy_eval_from_control_command)
4540 (python_command, python_interactive_command): Update.
4541 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
4542 * guile/guile.c (guile_command)
4543 (gdbscm_eval_from_control_command, guile_command): Update.
4544 * compile/compile.c (compile_code_command)
4545 (compile_print_command, compile_to_object): Update.
4546 * cli/cli-script.h (struct command_lines_deleter): New.
4547 (counted_command_line): New typedef.
4548 (struct command_line): Add constructor, destructor.
4549 <body_list>: Remove.
4550 <body_list_0, body_list_1>: New members.
4551 (command_line_up): Remove typedef.
4552 (read_command_lines, read_command_lines_1, get_command_line):
4554 (copy_command_lines): Don't declare.
4555 * cli/cli-script.c (build_command_line): Use "new".
4556 (get_command_line): Return counted_command_line.
4557 (print_command_lines, execute_user_command)
4558 (execute_control_command_1, while_command, if_command): Update.
4559 (realloc_body_list): Remove.
4560 (process_next_line, recurse_read_control_structure): Update.
4561 (read_command_lines, read_command_lines_1): Return counted_command_line.
4562 (free_command_lines): Use "delete".
4563 (copy_command_lines): Remove.
4564 (define_command, document_command, show_user_1): Update.
4565 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
4566 a counted_command_line.
4567 * breakpoint.h (counted_command_line): Remove typedef.
4568 (breakpoint_set_commands): Update.
4569 * breakpoint.c (check_no_tracepoint_commands)
4570 (validate_commands_for_breakpoint): Update.
4571 (breakpoint_set_commands): Change commands to be a
4572 counted_command_line.
4573 (commands_command_1, update_dprintf_command_list)
4574 (create_tracepoint_from_upload): Update.
4576 2018-05-04 Tom Tromey <tom@tromey.com>
4578 * cli/cli-decode.h (cmd_list_element): New constructor.
4579 (~cmd_list_element): New destructor.
4580 (struct cmd_list_element): Add initializers.
4581 * cli/cli-decode.c (do_add_cmd): Use "new".
4582 (delete_cmd): Use "delete".
4584 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4585 Pedro Alves <palves@redhat.com>
4587 PR breakpoints/19806 and support for PR external/20207.
4588 * NEWS: Mention Aarch64 watchpoint improvements.
4589 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
4590 watchpoints and PR external/20207 watchpoints.
4591 * nat/aarch64-linux-hw-point.c
4592 (kernel_supports_any_contiguous_range): New.
4593 (aarch64_watchpoint_offset): New.
4594 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
4595 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
4596 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
4597 (aarch64_align_watchpoint): New parameters aligned_offset_p and
4598 next_addr_orig_p. Support PR external/20207 watchpoints.
4599 (aarch64_downgrade_regs): New.
4600 (aarch64_dr_state_insert_one_point): New parameters offset and
4602 (aarch64_dr_state_remove_one_point): Likewise.
4603 (aarch64_handle_breakpoint): Update caller.
4604 (aarch64_handle_aligned_watchpoint): Likewise.
4605 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
4607 (aarch64_linux_set_debug_regs): Remove const from state. Call
4608 aarch64_downgrade_regs.
4609 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
4610 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
4611 (DR_CONTROL_MASK): ... this.
4612 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
4613 (unsigned int aarch64_watchpoint_offset): New prototype.
4614 (aarch64_linux_set_debug_regs): Remove const from state.
4615 * utils.c (align_up, align_down): Move to ...
4616 * common/common-utils.c (align_up, align_down): ... here.
4617 * utils.h (align_up, align_down): Move to ...
4618 * common/common-utils.h (align_up, align_down): ... here.
4620 2018-05-04 Joel Brobecker <brobecker@adacore.com>
4622 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
4623 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
4624 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
4625 Re-implement to match the ABI as summarized in GCC's
4626 gcc/config/sparc/sparc.c. All callers updated.
4627 (sparc32_store_arguments): Remove assertion.
4629 2018-05-04 Tom Tromey <tom@tromey.com>
4631 * printcmd.c: Don't include tui.h.
4632 (decode_format): Use skip_spaces.
4634 2018-05-04 Tom Tromey <tom@tromey.com>
4637 * printcmd.c (last_count): New global.
4638 (x_command): Use saved count when repeating.
4640 2018-05-04 Tom Tromey <tom@tromey.com>
4642 * nto-procfs.c (do_closedir_cleanup): Remove.
4643 (procfs_pidlist): Use gdb_dir_up.
4644 * procfs.c (do_closedir_cleanup): Remove.
4645 (proc_update_threads): Use gdb_dir_up.
4646 * common/filestuff.h (struct gdb_dir_deleter): New.
4647 (gdb_dir_up): New typedef.
4649 2018-05-04 Tom Tromey <tom@tromey.com>
4651 * ada-lang.c (print_mention_exception): Use std::string.
4653 2018-05-04 Tom Tromey <tom@tromey.com>
4655 * ada-lang.c (create_excep_cond_exprs): Update.
4656 (ada_exception_catchpoint_cond_string): Use std::string.
4658 2018-05-04 Tom Tromey <tom@tromey.com>
4660 * ada-lang.c (xget_renaming_scope): Return std::string.
4661 (old_renaming_is_invisible): Update.
4663 2018-05-04 Tom Tromey <tom@tromey.com>
4665 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
4666 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
4668 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
4670 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
4672 2018-05-04 Tom Tromey <tom@tromey.com>
4674 * remote.c (remote_query_supported_append): Change type.
4675 (remote_check_symbols): Update.
4677 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
4680 * configure.ac: Prepend libpython.
4681 * python/python-config.py: Likewise.
4682 * configure: Regenerate.
4684 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
4686 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
4688 2018-05-03 Pedro Alves <palves@redhat.com>
4691 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
4692 override. Write 'true' instead of '1'.
4693 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
4696 2018-05-02 Pedro Alves <palves@redhat.com>
4698 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
4699 add_inf_child_target.
4700 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
4701 add_inf_child_target.
4702 * aix-thread.c (aix_thread_target_info): New.
4703 (aix_thread_target) <shortname, longname, doc>: Delete.
4705 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
4706 add_inf_child_target.
4707 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
4708 add_inf_child_target.
4709 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
4710 add_inf_child_target.
4711 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
4712 add_inf_child_target.
4713 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
4714 add_inf_child_target.
4715 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
4716 add_inf_child_target.
4717 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
4718 add_inf_child_target.
4719 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
4720 add_inf_child_target.
4721 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
4722 add_inf_child_target.
4723 * bfd-target.c (target_bfd_target_info): New.
4724 (target_bfd) <shortname, longname, doc>: Delete.
4726 * bsd-kvm.c (bsd_kvm_target_info): New.
4727 (bsd_kvm_target) <shortname, longname, doc>: Delete.
4729 (bsd_kvm_target::open): Rename to ...
4730 (bsd_kvm_target_open): ... this. Adjust.
4731 * bsd-uthread.c (bsd_uthread_target_info): New.
4732 (bsd_uthread_target) <shortname, longname, doc>: Delete.
4734 * corefile.c (core_file_command): Adjust.
4735 * corelow.c (core_target_info): New.
4736 (core_target) <shortname, longname, doc>: Delete.
4738 (core_target::open): Rename to ...
4739 (core_target_open): ... this. Adjust.
4740 * ctf.c (ctf_target_info): New.
4741 (ctf_target) <shortname, longname, doc>: Delete.
4743 (ctf_target::open): Rename to ...
4744 (ctf_target_open): ... this.
4745 (_initialize_ctf): Adjust.
4746 * exec.c (exec_target_info): New.
4747 (exec_target) <shortname, longname, doc>: Delete.
4749 (exec_target::open): Rename to ...
4750 (exec_target_open): ... this.
4751 * gdbcore.h (core_target_open): Declare.
4752 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
4753 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
4754 add_inf_child_target.
4755 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
4756 add_inf_child_target.
4757 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
4758 add_inf_child_target.
4759 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
4760 add_inf_child_target.
4761 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
4762 add_inf_child_target.
4763 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
4764 add_inf_child_target.
4765 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
4766 add_inf_child_target.
4767 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
4768 add_inf_child_target.
4769 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
4770 add_inf_child_target.
4771 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
4772 add_inf_child_target.
4773 * inf-child.c (inf_child_target_info): New.
4774 (inf_child_target::info): New.
4775 (inf_child_open_target): Remove 'target' parameter. Use
4776 get_native_target instead.
4777 (inf_child_target::open): Delete.
4778 (add_inf_child_target): New.
4779 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
4782 (add_inf_child_target): Declare.
4783 (inf_child_open_target): Declare.
4784 * linux-thread-db.c (thread_db_target_info): New.
4785 (thread_db_target) <shortname, longname, doc>: Delete.
4787 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
4788 add_inf_child_target.
4789 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
4790 add_inf_child_target.
4791 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
4792 add_inf_child_target.
4793 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
4794 add_inf_child_target.
4795 * make-target-delegates (print_class): Adjust.
4796 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
4797 add_inf_child_target.
4798 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
4799 add_inf_child_target.
4800 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
4801 add_inf_child_target.
4802 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
4803 add_inf_child_target.
4804 * nto-procfs.c (nto_native_target_info): New.
4805 (nto_procfs_target_native) <shortname, longname, doc>:
4808 (nto_procfs_target_info): New.
4809 (nto_procfs_target_procfs) <shortname, longname, doc>:
4812 (init_procfs_targets): Adjust.
4813 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
4814 add_inf_child_target.
4815 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
4816 add_inf_child_target.
4817 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
4818 add_inf_child_target.
4819 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
4820 add_inf_child_target.
4821 * ravenscar-thread.c (ravenscar_target_info): New.
4822 (ravenscar_thread_target) <shortname, longname, doc>:
4825 * record-btrace.c (record_btrace_target_info):
4826 (record_btrace_target) <shortname, longname, doc>: Delete.
4828 (record_btrace_target::open): Rename to ...
4829 (record_btrace_target_open): ... this. Adjust.
4830 * record-full.c (record_longname, record_doc): New.
4831 (record_full_base_target) <shortname, longname, doc>: Delete.
4833 (record_full_target_info): New.
4834 (record_full_target): <shortname>: Delete.
4836 (record_full_core_open_1, record_full_open_1): Update comments.
4837 (record_full_base_target::open): Rename to ...
4838 (record_full_open): ... this.
4839 (cmd_record_full_restore): Update.
4840 (_initialize_record_full): Update.
4841 * remote-sim.c (remote_sim_target_info): New.
4842 (gdbsim_target) <shortname, longname, doc>: Delete.
4844 (gdbsim_target::open): Rename to ...
4845 (gdbsim_target_open): ... this.
4846 (_initialize_remote_sim): Adjust.
4847 * remote.c (remote_doc): New.
4848 (remote_target_info): New.
4849 (remote_target) <shortname, longname, doc>: Delete.
4851 (extended_remote_target_info): New.
4852 (extended_remote_target) <shortname, longname, doc>: Delete.
4854 (remote_target::open_1): Make static. Adjust.
4855 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
4856 * s390-linux-nat.c (_initialize_s390_nat): Use
4857 add_inf_child_target.
4858 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
4859 add_inf_child_target.
4860 * sol-thread.c (thread_db_target_info): New.
4861 (sol_thread_target) <shortname, longname, doc>: Delete.
4863 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
4864 add_inf_child_target.
4865 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
4866 add_inf_child_target.
4867 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
4868 add_inf_child_target.
4869 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
4870 add_inf_child_target.
4871 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
4872 add_inf_child_target.
4873 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
4874 add_inf_child_target.
4875 * spu-linux-nat.c (_initialize_spu_nat): Use
4876 add_inf_child_target.
4877 * spu-multiarch.c (spu_multiarch_target_info): New.
4878 (spu_multiarch_target) <shortname, longname, doc>: Delete.
4880 * target-delegates.c: Regenerate.
4881 * target.c: Include <unordered_map>.
4882 (target_ops_p): Delete.
4883 (DEF_VEC_P(target_ops_p)): Delete.
4884 (target_factories): New.
4885 (test_target_info): New.
4886 (test_target_ops::info): New.
4887 (open_target): Adjust to use target_factories.
4888 (add_target_with_completer): Rename to ...
4889 (add_target): ... this. Change prototype. Register target_info
4890 and open callback in target_factories. Register target_info in
4891 command context instead of target_ops.
4892 (add_target): Delete old implementation.
4893 (add_deprecated_target_alias): Change prototype. Adjust.
4894 (the_native_target): New.
4895 (set_native_target, get_native_target): New.
4896 (find_default_run_target): Use the_native_target.
4897 (find_attach_target, find_run_target): Simplify.
4898 (target_ops::open): Delete.
4899 (dummy_target_info): New.
4900 (dummy_target::shortname, dummy_target::longname)
4901 (dummy_target::doc): Delete.
4902 (dummy_target::info): New.
4903 (debug_target::shortname, debug_target::longname)
4904 (debug_target::doc): Delete.
4905 (debug_target::info): New.
4906 * target.h (struct target_info): New.
4907 (target_ops::~target_ops): Add comment.
4908 (target_ops::info): New.
4909 (target_ops::shortname, target_ops::longname, target_ops::doc): No
4910 longer virtual. Implement in terms of target_info.
4911 (set_native_target, get_native_target): Declare.
4912 (target_open_ftype): New.
4913 (add_target, add_target_with_completer)
4914 (add_deprecated_target_alias): Change prototype.
4915 (test_target) <shortname, longname, doc>: Delete.
4917 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
4918 add_inf_child_target.
4919 * tracefile-tfile.c (tfile_target_info): New.
4920 (tfile_target) <shortname, longname, doc>: Delete.
4922 (tfile_target::open): Rename to ...
4923 (tfile_target_open): ... this.
4924 (_initialize_tracefile_tfile): Adjust.
4925 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
4926 add_inf_child_target.
4927 * windows-nat.c (_initialize_windows_nat): Use
4928 add_inf_child_target.
4929 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
4930 add_inf_child_target.
4932 2018-05-02 Pedro Alves <palves@redhat.com>
4934 * linux-nat.h (linux_nat_target) <low_new_thread,
4935 low_delete_thread, low_new_fork, low_forget_process,
4936 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
4937 New virtual methods.
4938 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4939 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
4940 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
4941 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4942 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
4944 * linux-fork.c (delete_fork): Adjust to call low method.
4945 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
4946 (linux_nat_new_fork, linux_nat_forget_process_hook)
4947 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
4948 (linux_nat_status_is_event):
4949 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
4950 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
4952 (sigtrap_is_event): Rename to ...
4953 (linux_nat_target::low_status_is_event): ... this.
4954 (linux_nat_set_status_is_event): Delete.
4955 (save_stop_reason, linux_nat_wait_1)
4956 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
4958 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4959 (linux_nat_set_new_fork, linux_nat_set_forget_process)
4960 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4961 (linux_nat_set_prepare_to_resume): Delete.
4962 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
4963 low virtual methods.
4964 * amd64-linux-nat.c: Likewise.
4965 * arm-linux-nat.c: Likewise.
4966 * i386-linux-nat.c: Likewise.
4967 * ia64-linux-nat.c: Likewise.
4968 * mips-linux-nat.c: Likewise.
4969 * ppc-linux-nat.c: Likewise.
4970 * s390-linux-nat.c: Likewise.
4971 * sparc64-linux-nat.c: Likewise.
4972 * x86-linux-nat.c: Likewise.
4973 * x86-linux-nat.h: Include "nat/x86-linux.h".
4974 (x86_linux_nat_target) <low_new_fork, low_forget_process,
4975 low_prepare_to_resume, low_new_thread, low_delete_thread>:
4978 2018-05-02 Pedro Alves <palves@redhat.com>
4980 * target.h (target_ops)
4981 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4982 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
4983 stopped_by_watchpoint, have_continuable_watchpoint,
4984 stopped_data_address, watchpoint_addr_within_range,
4985 can_accel_watchpoint_condition, can_run, thread_alive,
4986 has_all_memory, has_memory, has_stack, has_registers,
4987 has_execution, can_async_p, is_async_p, supports_non_stop,
4988 always_non_stop_p, can_execute_reverse, supports_multi_process,
4989 supports_enable_disable_tracepoint,
4990 supports_disable_randomization, supports_string_tracing,
4991 supports_evaluation_of_breakpoint_conditions,
4992 can_run_breakpoint_commands, filesystem_is_local,
4993 can_download_tracepoint, get_trace_state_variable_value,
4994 set_trace_notes, get_tib_address, use_agent, can_use_agent,
4995 record_is_replaying, record_will_replay,
4996 augmented_libraries_svr4_read>: Adjust to return bool.
4997 * aarch64-linux-nat.c: All implementations adjusted.
4998 * aix-thread.c: All implementations adjusted.
4999 * arm-linux-nat.c: All implementations adjusted.
5000 * breakpoint.c: All implementations adjusted.
5001 * bsd-kvm.c: All implementations adjusted.
5002 * bsd-uthread.c: All implementations adjusted.
5003 * corelow.c: All implementations adjusted.
5004 * ctf.c: All implementations adjusted.
5005 * darwin-nat.c: All implementations adjusted.
5006 * darwin-nat.h: All implementations adjusted.
5007 * exec.c: All implementations adjusted.
5008 * fbsd-nat.c: All implementations adjusted.
5009 * fbsd-nat.h: All implementations adjusted.
5010 * gnu-nat.c: All implementations adjusted.
5011 * gnu-nat.h: All implementations adjusted.
5012 * go32-nat.c: All implementations adjusted.
5013 * ia64-linux-nat.c: All implementations adjusted.
5014 * inf-child.c: All implementations adjusted.
5015 * inf-child.h: All implementations adjusted.
5016 * inf-ptrace.c: All implementations adjusted.
5017 * inf-ptrace.h: All implementations adjusted.
5018 * linux-nat.c: All implementations adjusted.
5019 * linux-nat.h: All implementations adjusted.
5020 * mips-linux-nat.c: All implementations adjusted.
5021 * nto-procfs.c: All implementations adjusted.
5022 * ppc-linux-nat.c: All implementations adjusted.
5023 * procfs.c: All implementations adjusted.
5024 * ravenscar-thread.c: All implementations adjusted.
5025 * record-btrace.c: All implementations adjusted.
5026 * record-full.c: All implementations adjusted.
5027 * remote-sim.c: All implementations adjusted.
5028 * remote.c: All implementations adjusted.
5029 * s390-linux-nat.c: All implementations adjusted.
5030 * sol-thread.c: All implementations adjusted.
5031 * spu-multiarch.c: All implementations adjusted.
5032 * target-delegates.c: All implementations adjusted.
5033 * target.c: All implementations adjusted.
5034 * target.h: All implementations adjusted.
5035 * tracefile-tfile.c: All implementations adjusted.
5036 * tracefile.c: All implementations adjusted.
5037 * tracefile.h: All implementations adjusted.
5038 * windows-nat.c: All implementations adjusted.
5039 * x86-linux-nat.h: All implementations adjusted.
5040 * x86-nat.h: All implementations adjusted.
5042 2018-05-02 Pedro Alves <palves@redhat.com>
5044 * make-target-delegates (scan_target_h): Don't trim lines here.
5045 Replace sequences of tabs and/or whitespace with a single
5047 (top level, parsing methods): Trim each line before processing it
5050 2018-05-02 Pedro Alves <palves@redhat.com>
5051 John Baldwin <jhb@freebsd.org>
5053 * target.h (enum strata) <debug_stratum>: New.
5054 (struct target_ops) <all delegation methods>: Replace by C++
5055 virtual methods, and drop "to_" prefix. All references updated
5057 <to_shortname, to_longname, to_doc, to_data,
5058 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5059 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5060 virtual methods. All references updated throughout.
5061 <can_attach, supports_terminal_ours, can_create_inferior,
5062 get_thread_control_capabilities, attach_no_wait>: New
5064 <insert_breakpoint, remove_breakpoint>: Now
5065 TARGET_DEFAULT_NORETURN methods.
5066 <info_proc>: Now returns bool.
5068 (OPS_MAGIC): Delete.
5069 (current_target): Delete. All references replaced by references
5071 (target_stack): ... this. New.
5072 (target_shortname, target_longname): Adjust.
5073 (target_can_run): Now a function declaration.
5074 (default_child_has_all_memory, default_child_has_memory)
5075 (default_child_has_stack, default_child_has_registers)
5076 (default_child_has_execution): Remove target_ops parameter.
5077 (complete_target_initialization): Delete.
5078 (memory_breakpoint_target): New template class.
5079 (test_target_ops): Refactor as a C++ class with virtual methods.
5080 * make-target-delegates (NAME_PART): Tighten.
5081 (POINTER_PART, CP_SYMBOL): New.
5082 (SIMPLE_RETURN_PART): Reimplement.
5083 (VEC_RETURN_PART): Expect less.
5084 (RETURN_PART, VIRTUAL_PART): New.
5085 (METHOD): Adjust to C++ virtual methods.
5086 (scan_target_h): Remove reference to C99.
5087 (dname): Output "target_ops::" prefix.
5088 (write_function_header): Adjust to output a C++ class method.
5089 (write_declaration): New.
5090 (write_delegator): Adjust to output a C++ class method.
5091 (tdname): Output "dummy_target::" prefix.
5092 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5094 (tdefault_names, debug_names): Delete.
5095 (return_types, tdefaults, styles, argtypes_array): New.
5096 (top level): All methods are delegators.
5098 (top level): Print dummy_target and debug_target classes.
5099 * target-delegates.c: Regenerate.
5100 * target-debug.h (target_debug_print_enum_info_proc_what)
5101 (target_debug_print_thread_control_capabilities)
5102 (target_debug_print_thread_info_p): New.
5103 * target.c (dummy_target): Delete.
5104 (the_dummy_target, the_debug_target): New.
5105 (target_stack): Now extern.
5106 (set_targetdebug): Push/unpush debug target.
5107 (default_child_has_all_memory, default_child_has_memory)
5108 (default_child_has_stack, default_child_has_registers)
5109 (default_child_has_execution): Remove target_ops parameter.
5110 (complete_target_initialization): Delete.
5111 (add_target_with_completer): No longer call
5112 complete_target_initialization.
5113 (target_supports_terminal_ours): Use regular delegation.
5114 (update_current_target): Delete.
5115 (push_target): No longer check magic number. Don't call
5116 update_current_target.
5117 (unpush_target): Don't call update_current_target.
5118 (target_is_pushed): No longer check magic number.
5119 (target_require_runnable): Skip for all stratums over
5121 (target_ops::info_proc): New.
5122 (target_info_proc): Use find_target_at and
5123 find_default_run_target.
5124 (target_supports_disable_randomization): Use regular delegation.
5125 (target_get_osdata): Use find_target_at.
5126 (target_ops::open, target_ops::close, target_ops::can_attach)
5127 (target_ops::attach, target_ops::can_create_inferior)
5128 (target_ops::create_inferior, target_ops::can_run)
5129 (target_can_run): New.
5130 (default_fileio_target): Use regular delegation.
5131 (target_ops::fileio_open, target_ops::fileio_pwrite)
5132 (target_ops::fileio_pread, target_ops::fileio_fstat)
5133 (target_ops::fileio_close, target_ops::fileio_unlink)
5134 (target_ops::fileio_readlink): New.
5135 (target_fileio_open_1, target_fileio_unlink)
5136 (target_fileio_readlink): Always call the target method. Handle
5138 (return_zero, return_zero_has_execution): Delete.
5139 (init_dummy_target): Delete.
5140 (dummy_target::dummy_target, dummy_target::shortname)
5141 (dummy_target::longname, dummy_target::doc)
5142 (debug_target::debug_target, debug_target::shortname)
5143 (debug_target::longname, debug_target::doc): New.
5144 (target_supports_delete_record): Use regular delegation.
5145 (setup_target_debug): Delete.
5146 (maintenance_print_target_stack): Skip debug_stratum.
5147 (initialize_targets): Instantiate the_dummy_target and
5149 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
5151 (target_auxv_search, fprint_target_auxv): Adjust.
5152 (info_auxv_command): Adjust to use target_stack.
5153 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5154 * exceptions.c (print_flush): Handle a NULL target_stack.
5155 * regcache.c (target_ops_no_register): Refactor as class with
5158 * exec.c (exec_target): New class.
5159 (exec_ops): Now an exec_target.
5160 (exec_open, exec_close_1, exec_get_section_table)
5161 (exec_xfer_partial, exec_files_info, exec_has_memory)
5162 (exec_make_note_section): Refactor as exec_target methods.
5163 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5165 (exec_target::find_memory_regions): New.
5166 (_initialize_exec): Don't call init_exec_ops.
5167 * gdbcore.h (exec_file_clear): Delete.
5169 * corefile.c (core_target): Delete.
5170 (core_file_command): Adjust.
5171 * corelow.c (core_target): New class.
5172 (the_core_target): New.
5173 (core_close): Remove target_ops parameter.
5174 (core_close_cleanup): Adjust.
5175 (core_target::close): New.
5176 (core_open, core_detach, get_core_registers, core_files_info)
5177 (core_xfer_partial, core_thread_alive, core_read_description)
5178 (core_pid_to_str, core_thread_name, core_has_memory)
5179 (core_has_stack, core_has_registers, core_info_proc): Rework as
5180 core_target methods.
5181 (ignore, core_remove_breakpoint, init_core_ops): Delete.
5182 (_initialize_corelow): Initialize the_core_target.
5183 * gdbcore.h (core_target): Delete.
5184 (the_core_target): New.
5186 * ctf.c: (ctf_target): New class.
5187 (ctf_ops): Now a ctf_target.
5188 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5189 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5190 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5192 (init_ctf_ops): Delete.
5193 (_initialize_ctf): Don't call it.
5194 * tracefile-tfile.c (tfile_target): New class.
5195 (tfile_ops): Now a tfile_target.
5196 (tfile_open, tfile_close, tfile_files_info)
5197 (tfile_get_tracepoint_status, tfile_trace_find)
5198 (tfile_fetch_registers, tfile_xfer_partial)
5199 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5200 Refactor as tfile_target methods.
5201 (tfile_xfer_partial_features): Remove target_ops parameter.
5202 (init_tfile_ops): Delete.
5203 (_initialize_tracefile_tfile): Don't call it.
5204 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5205 (tracefile_has_stack, tracefile_has_registers)
5206 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5207 tracefile_target methods.
5208 (init_tracefile_ops): Delete.
5209 (tracefile_target::tracefile_target): New.
5210 * tracefile.h: Include "target.h".
5211 (tracefile_target): New class.
5212 (init_tracefile_ops): Delete.
5214 * spu-multiarch.c (spu_multiarch_target): New class.
5215 (spu_ops): Now a spu_multiarch_target.
5216 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5217 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5218 (spu_search_memory, spu_mourn_inferior): Refactor as
5219 spu_multiarch_target methods.
5220 (init_spu_ops): Delete.
5221 (_initialize_spu_multiarch): Remove references to init_spu_ops,
5222 complete_target_initialization.
5224 * ravenscar-thread.c (ravenscar_thread_target): New class.
5225 (ravenscar_ops): Now a ravenscar_thread_target.
5226 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5227 (ravenscar_thread_alive, ravenscar_pid_to_str)
5228 (ravenscar_fetch_registers, ravenscar_store_registers)
5229 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5230 (ravenscar_stopped_by_hw_breakpoint)
5231 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5232 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5233 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5235 (init_ravenscar_thread_ops): Delete.
5236 (_initialize_ravenscar): Remove references to
5237 init_ravenscar_thread_ops and complete_target_initialization.
5239 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5240 (bsd_uthread_target): New class.
5241 (bsd_uthread_ops): Now a bsd_uthread_target.
5242 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5243 (bsd_uthread_close, bsd_uthread_mourn_inferior)
5244 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5245 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5246 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5247 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5248 (bsd_uthread_target): Delete function.
5249 (_initialize_bsd_uthread): Remove reference to
5250 complete_target_initialization.
5252 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
5253 (target_bfd): ... this new class.
5254 (target_bfd_xfer_partial, target_bfd_get_section_table)
5255 (target_bfd_close): Refactor as target_bfd methods.
5256 (target_bfd::~target_bfd): New.
5257 (target_bfd_reopen): Adjust.
5258 (target_bfd::close): New.
5260 * record-btrace.c (record_btrace_target): New class.
5261 (record_btrace_ops): Now a record_btrace_target.
5262 (record_btrace_open, record_btrace_stop_recording)
5263 (record_btrace_disconnect, record_btrace_close)
5264 (record_btrace_async, record_btrace_info)
5265 (record_btrace_insn_history, record_btrace_insn_history_range)
5266 (record_btrace_insn_history_from, record_btrace_call_history)
5267 (record_btrace_call_history_range)
5268 (record_btrace_call_history_from, record_btrace_record_method)
5269 (record_btrace_is_replaying, record_btrace_will_replay)
5270 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5271 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5272 (record_btrace_store_registers, record_btrace_prepare_to_store)
5273 (record_btrace_to_get_unwinder)
5274 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5275 (record_btrace_commit_resume, record_btrace_wait)
5276 (record_btrace_stop, record_btrace_can_execute_reverse)
5277 (record_btrace_stopped_by_sw_breakpoint)
5278 (record_btrace_supports_stopped_by_sw_breakpoint)
5279 (record_btrace_stopped_by_hw_breakpoint)
5280 (record_btrace_supports_stopped_by_hw_breakpoint)
5281 (record_btrace_update_thread_list, record_btrace_thread_alive)
5282 (record_btrace_goto_begin, record_btrace_goto_end)
5283 (record_btrace_goto, record_btrace_stop_replaying_all)
5284 (record_btrace_execution_direction)
5285 (record_btrace_prepare_to_generate_core)
5286 (record_btrace_done_generating_core): Refactor as
5287 record_btrace_target methods.
5288 (init_record_btrace_ops): Delete.
5289 (_initialize_record_btrace): Remove reference to
5290 init_record_btrace_ops.
5291 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5292 the execution_direction global.
5293 (record_full_base_target, record_full_target)
5294 (record_full_core_target): New classes.
5295 (record_full_ops): Now a record_full_target.
5296 (record_full_core_ops): Now a record_full_core_target.
5297 (record_full_target::detach, record_full_target::disconnect)
5298 (record_full_core_target::disconnect)
5299 (record_full_target::mourn_inferior, record_full_target::kill):
5301 (record_full_open, record_full_close, record_full_async): Refactor
5302 as methods of the record_full_base_target class.
5303 (record_full_resume, record_full_commit_resume): Refactor
5304 as methods of the record_full_target class.
5305 (record_full_wait, record_full_stopped_by_watchpoint)
5306 (record_full_stopped_data_address)
5307 (record_full_stopped_by_sw_breakpoint)
5308 (record_full_supports_stopped_by_sw_breakpoint)
5309 (record_full_stopped_by_hw_breakpoint)
5310 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5311 methods of the record_full_base_target class.
5312 (record_full_store_registers, record_full_xfer_partial)
5313 (record_full_insert_breakpoint, record_full_remove_breakpoint):
5314 Refactor as methods of the record_full_target class.
5315 (record_full_can_execute_reverse, record_full_get_bookmark)
5316 (record_full_goto_bookmark, record_full_execution_direction)
5317 (record_full_record_method, record_full_info, record_full_delete)
5318 (record_full_is_replaying, record_full_will_replay)
5319 (record_full_goto_begin, record_full_goto_end, record_full_goto)
5320 (record_full_stop_replaying): Refactor as methods of the
5321 record_full_base_target class.
5322 (record_full_core_resume, record_full_core_kill)
5323 (record_full_core_fetch_registers)
5324 (record_full_core_prepare_to_store)
5325 (record_full_core_store_registers, record_full_core_xfer_partial)
5326 (record_full_core_insert_breakpoint)
5327 (record_full_core_remove_breakpoint)
5328 (record_full_core_has_execution): Refactor
5329 as methods of the record_full_core_target class.
5330 (record_full_base_target::supports_delete_record): New.
5331 (init_record_full_ops): Delete.
5332 (init_record_full_core_ops): Delete.
5333 (record_full_save): Refactor as method of the
5334 record_full_base_target class.
5335 (_initialize_record_full): Remove references to
5336 init_record_full_ops and init_record_full_core_ops.
5338 * remote.c (remote_target, extended_remote_target): New classes.
5339 (remote_ops): Now a remote_target.
5340 (extended_remote_ops): Now an extended_remote_target.
5341 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5342 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5343 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5344 (remote_pass_signals, remote_set_syscall_catchpoint)
5345 (remote_program_signals, )
5346 (remote_thread_always_alive): Remove target_ops parameter.
5347 (remote_thread_alive, remote_thread_name)
5348 (remote_update_thread_list, remote_threads_extra_info)
5349 (remote_static_tracepoint_marker_at)
5350 (remote_static_tracepoint_markers_by_strid)
5351 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5352 (remote_open): Refactor as methods of remote_target.
5353 (extended_remote_open, extended_remote_detach)
5354 (extended_remote_attach, extended_remote_post_attach):
5355 (extended_remote_supports_disable_randomization)
5356 (extended_remote_create_inferior): : Refactor as method of
5357 extended_remote_target.
5358 (remote_set_permissions, remote_open_1, remote_detach)
5359 (remote_follow_fork, remote_follow_exec, remote_disconnect)
5360 (remote_resume, remote_commit_resume, remote_stop)
5361 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5362 (remote_terminal_ours, remote_wait, remote_fetch_registers)
5363 (remote_prepare_to_store, remote_store_registers)
5364 (remote_flash_erase, remote_flash_done, remote_files_info)
5365 (remote_kill, remote_mourn, remote_insert_breakpoint)
5366 (remote_remove_breakpoint, remote_insert_watchpoint)
5367 (remote_watchpoint_addr_within_range)
5368 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5369 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5370 (remote_supports_stopped_by_sw_breakpoint)
5371 (remote_stopped_by_hw_breakpoint)
5372 (remote_supports_stopped_by_hw_breakpoint)
5373 (remote_stopped_by_watchpoint, remote_stopped_data_address)
5374 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5375 (remote_verify_memory): Refactor as methods of remote_target.
5376 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5378 (remote_xfer_partial, remote_get_memory_xfer_limit)
5379 (remote_search_memory, remote_rcmd, remote_memory_map)
5380 (remote_pid_to_str, remote_get_thread_local_address)
5381 (remote_get_tib_address, remote_read_description): Refactor as
5382 methods of remote_target.
5383 (remote_target::fileio_open, remote_target::fileio_pwrite)
5384 (remote_target::fileio_pread, remote_target::fileio_close): New.
5385 (remote_hostio_readlink, remote_hostio_fstat)
5386 (remote_filesystem_is_local, remote_can_execute_reverse)
5387 (remote_supports_non_stop, remote_supports_disable_randomization)
5388 (remote_supports_multi_process, remote_supports_cond_breakpoints)
5389 (remote_supports_enable_disable_tracepoint)
5390 (remote_supports_string_tracing)
5391 (remote_can_run_breakpoint_commands, remote_trace_init)
5392 (remote_download_tracepoint, remote_can_download_tracepoint)
5393 (remote_download_trace_state_variable, remote_enable_tracepoint)
5394 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5395 (remote_trace_start, remote_get_trace_status)
5396 (remote_get_tracepoint_status, remote_trace_stop)
5397 (remote_trace_find, remote_get_trace_state_variable_value)
5398 (remote_save_trace_data, remote_get_raw_trace_data)
5399 (remote_set_disconnected_tracing, remote_core_of_thread)
5400 (remote_set_circular_trace_buffer, remote_traceframe_info)
5401 (remote_get_min_fast_tracepoint_insn_len)
5402 (remote_set_trace_buffer_size, remote_set_trace_notes)
5403 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5404 (remote_disable_btrace, remote_teardown_btrace)
5405 (remote_read_btrace, remote_btrace_conf)
5406 (remote_augmented_libraries_svr4_read, remote_load)
5407 (remote_pid_to_exec_file, remote_can_do_single_step)
5408 (remote_execution_direction, remote_thread_handle_to_thread_info):
5409 Refactor as methods of remote_target.
5410 (init_remote_ops, init_extended_remote_ops): Delete.
5411 (remote_can_async_p, remote_is_async_p, remote_async)
5412 (remote_thread_events, remote_upload_tracepoints)
5413 (remote_upload_trace_state_variables): Refactor as methods of
5415 (_initialize_remote): Remove references to init_remote_ops and
5416 init_extended_remote_ops.
5418 * remote-sim.c (gdbsim_target): New class.
5419 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5420 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5421 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5422 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5423 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5424 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5425 Refactor as methods of gdbsim_target.
5426 (gdbsim_ops): Now a gdbsim_target.
5427 (init_gdbsim_ops): Delete.
5428 (gdbsim_cntrl_c): Adjust.
5429 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5431 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5432 (the_amd64_linux_nat_target): New.
5433 (amd64_linux_fetch_inferior_registers)
5434 (amd64_linux_store_inferior_registers): Refactor as methods of
5435 amd64_linux_nat_target.
5436 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
5437 * i386-linux-nat.c: Don't include "linux-nat.h".
5438 (i386_linux_nat_target): New class.
5439 (the_i386_linux_nat_target): New.
5440 (i386_linux_fetch_inferior_registers)
5441 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5442 as methods of i386_linux_nat_target.
5443 (_initialize_i386_linux_nat): Adjust. Set linux_target.
5444 * inf-child.c (inf_child_ops): Delete.
5445 (inf_child_fetch_inferior_registers)
5446 (inf_child_store_inferior_registers): Delete.
5447 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5448 methods of inf_child_target.
5449 (inf_child_target::supports_terminal_ours)
5450 (inf_child_target::terminal_init)
5451 (inf_child_target::terminal_inferior)
5452 (inf_child_target::terminal_ours_for_output)
5453 (inf_child_target::terminal_ours, inf_child_target::interrupt)
5454 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5456 (inf_child_open, inf_child_disconnect, inf_child_close)
5457 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5458 (inf_child_post_startup_inferior, inf_child_can_run)
5459 (inf_child_pid_to_exec_file): Refactor as methods of
5461 (inf_child_follow_fork): Delete.
5462 (inf_child_target::can_create_inferior)
5463 (inf_child_target::can_attach): New.
5464 (inf_child_target::has_all_memory, inf_child_target::has_memory)
5465 (inf_child_target::has_stack, inf_child_target::has_registers)
5466 (inf_child_target::has_execution): New.
5467 (inf_child_fileio_open, inf_child_fileio_pwrite)
5468 (inf_child_fileio_pread, inf_child_fileio_fstat)
5469 (inf_child_fileio_close, inf_child_fileio_unlink)
5470 (inf_child_fileio_readlink, inf_child_use_agent)
5471 (inf_child_can_use_agent): Refactor as methods of
5473 (return_zero, inf_child_target): Delete.
5474 (inf_child_target::inf_child_target): New.
5475 * inf-child.h: Include "target.h".
5476 (inf_child_target): Delete function prototype.
5477 (inf_child_target): New class.
5478 (inf_child_open_target, inf_child_mourn_inferior)
5479 (inf_child_maybe_unpush_target): Delete.
5480 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5481 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5482 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5483 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5484 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5485 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5486 (inf_ptrace_wait, inf_ptrace_xfer_partial)
5487 (inf_ptrace_thread_alive, inf_ptrace_files_info)
5488 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5489 methods of inf_ptrace_target.
5490 (inf_ptrace_target): Delete function.
5491 * inf-ptrace.h: Include "inf-child.h".
5492 (inf_ptrace_target): Delete function declaration.
5493 (inf_ptrace_target): New class.
5494 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5495 * linux-nat.c (linux_target): New.
5496 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5497 (linux_nat_target::~linux_nat_target): New.
5498 (linux_child_post_attach, linux_child_post_startup_inferior)
5499 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5500 (linux_child_remove_fork_catchpoint)
5501 (linux_child_insert_vfork_catchpoint)
5502 (linux_child_remove_vfork_catchpoint)
5503 (linux_child_insert_exec_catchpoint)
5504 (linux_child_remove_exec_catchpoint)
5505 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5506 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5507 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5508 (linux_nat_stopped_data_address)
5509 (linux_nat_stopped_by_sw_breakpoint)
5510 (linux_nat_supports_stopped_by_sw_breakpoint)
5511 (linux_nat_stopped_by_hw_breakpoint)
5512 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5513 (linux_nat_kill, linux_nat_mourn_inferior)
5514 (linux_nat_xfer_partial, linux_nat_thread_alive)
5515 (linux_nat_update_thread_list, linux_nat_pid_to_str)
5516 (linux_nat_thread_name, linux_child_pid_to_exec_file)
5517 (linux_child_static_tracepoint_markers_by_strid)
5518 (linux_nat_is_async_p, linux_nat_can_async_p)
5519 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5520 (linux_nat_supports_multi_process)
5521 (linux_nat_supports_disable_randomization, linux_nat_async)
5522 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
5523 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
5524 (linux_nat_fileio_open, linux_nat_fileio_readlink)
5525 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
5526 methods of linux_nat_target.
5527 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
5528 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
5530 (check_stopped_by_watchpoint): Adjust.
5531 (linux_xfer_partial): Delete.
5532 (linux_target_install_ops, linux_target, linux_nat_add_target):
5534 (linux_nat_target::linux_nat_target): New.
5535 * linux-nat.h: Include "inf-ptrace.h".
5536 (linux_nat_target): New.
5537 (linux_target, linux_target_install_ops, linux_nat_add_target):
5538 Delete function declarations.
5539 (linux_target): Declare global.
5540 * linux-thread-db.c (thread_db_target): New.
5541 (thread_db_target::thread_db_target): New.
5542 (thread_db_ops): Delete.
5543 (the_thread_db_target): New.
5544 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
5545 (thread_db_update_thread_list, thread_db_pid_to_str)
5546 (thread_db_extra_thread_info)
5547 (thread_db_thread_handle_to_thread_info)
5548 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
5549 (thread_db_resume): Refactor as methods of thread_db_target.
5550 (init_thread_db_ops): Delete.
5551 (_initialize_thread_db): Remove reference to init_thread_db_ops.
5552 * x86-linux-nat.c: Don't include "linux-nat.h".
5553 (super_post_startup_inferior): Delete.
5554 (x86_linux_nat_target::~x86_linux_nat_target): New.
5555 (x86_linux_child_post_startup_inferior)
5556 (x86_linux_read_description, x86_linux_enable_btrace)
5557 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
5558 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
5559 methods of x86_linux_nat_target.
5560 (x86_linux_create_target): Delete. Bits folded ...
5561 (x86_linux_add_target): ... here. Now takes a linux_nat_target
5563 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
5564 (x86_linux_nat_target): New class.
5565 (x86_linux_create_target): Delete.
5566 (x86_linux_add_target): Now takes a linux_nat_target pointer.
5567 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
5568 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
5569 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
5570 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
5571 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
5573 (x86_use_watchpoints): Delete.
5574 * x86-nat.h: Include "breakpoint.h" and "target.h".
5575 (x86_use_watchpoints): Delete.
5576 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
5577 (x86_stopped_by_watchpoint, x86_stopped_data_address)
5578 (x86_insert_watchpoint, x86_remove_watchpoint)
5579 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
5580 (x86_stopped_by_hw_breakpoint): New declarations.
5581 (x86_nat_target): New template class.
5583 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
5584 (the_ppc_linux_nat_target): New.
5585 (ppc_linux_fetch_inferior_registers)
5586 (ppc_linux_can_use_hw_breakpoint)
5587 (ppc_linux_region_ok_for_hw_watchpoint)
5588 (ppc_linux_ranged_break_num_registers)
5589 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
5590 (ppc_linux_insert_mask_watchpoint)
5591 (ppc_linux_remove_mask_watchpoint)
5592 (ppc_linux_can_accel_watchpoint_condition)
5593 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
5594 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
5595 (ppc_linux_watchpoint_addr_within_range)
5596 (ppc_linux_masked_watch_num_registers)
5597 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
5598 (ppc_linux_read_description): Refactor as methods of
5599 ppc_linux_nat_target.
5600 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
5602 * procfs.c (procfs_xfer_partial): Delete forward declaration.
5603 (procfs_target): New class.
5604 (the_procfs_target): New.
5605 (procfs_target): Delete function.
5606 (procfs_auxv_parse, procfs_attach, procfs_detach)
5607 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
5608 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
5609 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
5610 (procfs_create_inferior, procfs_update_thread_list)
5611 (procfs_thread_alive, procfs_pid_to_str)
5612 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
5613 (procfs_stopped_data_address, procfs_insert_watchpoint)
5614 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
5615 (proc_find_memory_regions, procfs_info_proc)
5616 (procfs_make_note_section): Refactor as methods of procfs_target.
5617 (_initialize_procfs): Adjust.
5618 * sol-thread.c (sol_thread_target): New class.
5619 (sol_thread_ops): Now a sol_thread_target.
5620 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
5621 (sol_thread_fetch_registers, sol_thread_store_registers)
5622 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
5623 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
5624 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
5625 (init_sol_thread_ops): Delete.
5626 (_initialize_sol_thread): Adjust. Remove references to
5627 init_sol_thread_ops and complete_target_initialization.
5629 * windows-nat.c (windows_nat_target): New class.
5630 (windows_fetch_inferior_registers)
5631 (windows_store_inferior_registers, windows_resume, windows_wait)
5632 (windows_attach, windows_detach, windows_pid_to_exec_file)
5633 (windows_files_info, windows_create_inferior)
5634 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
5635 (windows_close, windows_pid_to_str, windows_xfer_partial)
5636 (windows_get_tib_address, windows_get_ada_task_ptid)
5637 (windows_thread_name, windows_thread_alive): Refactor as
5638 windows_nat_target methods.
5639 (do_initial_windows_stuff): Adjust.
5640 (windows_target): Delete function.
5641 (_initialize_windows_nat): Adjust.
5643 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
5644 (darwin_mourn_inferior, darwin_kill_inferior)
5645 (darwin_create_inferior, darwin_attach, darwin_detach)
5646 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
5647 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
5648 (darwin_supports_multi_process): Refactor as darwin_nat_target
5650 (darwin_resume_to, darwin_files_info): Delete.
5651 (_initialize_darwin_inferior): Rename to ...
5652 (_initialize_darwin_nat): ... this. Adjust to C++ification.
5653 * darwin-nat.h: Include "inf-child.h".
5654 (darwin_nat_target): New class.
5655 (darwin_complete_target): Delete.
5656 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
5657 (darwin_target): New.
5658 (i386_darwin_fetch_inferior_registers)
5659 (i386_darwin_store_inferior_registers): Refactor as methods of
5661 (darwin_complete_target): Delete, with ...
5662 (_initialize_i386_darwin_nat): ... bits factored out here.
5664 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
5665 (the_alpha_linux_nat_target): New.
5666 (alpha_linux_register_u_offset): Refactor as
5667 alpha_linux_nat_target method.
5668 (_initialize_alpha_linux_nat): Adjust.
5669 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
5670 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5671 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
5672 methods of linux_nat_trad_target.
5673 (linux_trad_target): Delete.
5674 * linux-nat-trad.h (linux_trad_target): Delete function.
5675 (linux_nat_trad_target): New class.
5676 * mips-linux-nat.c (mips_linux_nat_target): New class.
5677 (super_fetch_registers, super_store_registers, super_close):
5679 (the_mips_linux_nat_target): New.
5680 (mips64_linux_regsets_fetch_registers)
5681 (mips64_linux_regsets_store_registers)
5682 (mips64_linux_fetch_registers, mips64_linux_store_registers)
5683 (mips_linux_register_u_offset, mips_linux_read_description)
5684 (mips_linux_can_use_hw_breakpoint)
5685 (mips_linux_stopped_by_watchpoint)
5686 (mips_linux_stopped_data_address)
5687 (mips_linux_region_ok_for_hw_watchpoint)
5688 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5689 (mips_linux_close): Refactor as methods of mips_linux_nat.
5690 (_initialize_mips_linux_nat): Adjust to C++ification.
5692 * aix-thread.c (aix_thread_target): New class.
5693 (aix_thread_ops): Now an aix_thread_target.
5694 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
5695 (aix_thread_fetch_registers, aix_thread_store_registers)
5696 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
5697 (aix_thread_thread_alive, aix_thread_pid_to_str)
5698 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
5699 Refactor as methods of aix_thread_target.
5700 (init_aix_thread_ops): Delete.
5701 (_initialize_aix_thread): Remove references to init_aix_thread_ops
5702 and complete_target_initialization.
5703 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
5704 (rs6000_nat_target): New class.
5705 (the_rs6000_nat_target): New.
5706 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
5707 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
5708 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
5709 (super_create_inferior): Delete.
5710 (_initialize_rs6000_nat): Adjust to C++ification.
5712 * arm-linux-nat.c (arm_linux_nat_target): New class.
5713 (the_arm_linux_nat_target): New.
5714 (arm_linux_fetch_inferior_registers)
5715 (arm_linux_store_inferior_registers, arm_linux_read_description)
5716 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
5717 (arm_linux_remove_hw_breakpoint)
5718 (arm_linux_region_ok_for_hw_watchpoint)
5719 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
5720 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
5721 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
5722 arm_linux_nat_target.
5723 (_initialize_arm_linux_nat): Adjust to C++ification.
5725 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
5726 (the_aarch64_linux_nat_target): New.
5727 (aarch64_linux_fetch_inferior_registers)
5728 (aarch64_linux_store_inferior_registers)
5729 (aarch64_linux_child_post_startup_inferior)
5730 (aarch64_linux_read_description)
5731 (aarch64_linux_can_use_hw_breakpoint)
5732 (aarch64_linux_insert_hw_breakpoint)
5733 (aarch64_linux_remove_hw_breakpoint)
5734 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
5735 (aarch64_linux_region_ok_for_hw_watchpoint)
5736 (aarch64_linux_stopped_data_address)
5737 (aarch64_linux_stopped_by_watchpoint)
5738 (aarch64_linux_watchpoint_addr_within_range)
5739 (aarch64_linux_can_do_single_step): Refactor as methods of
5740 aarch64_linux_nat_target.
5741 (super_post_startup_inferior): Delete.
5742 (_initialize_aarch64_linux_nat): Adjust to C++ification.
5744 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
5745 (the_hppa_linux_nat_target): New.
5746 (hppa_linux_fetch_inferior_registers)
5747 (hppa_linux_store_inferior_registers): Refactor as methods of
5748 hppa_linux_nat_target.
5749 (_initialize_hppa_linux_nat): Adjust to C++ification.
5751 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
5752 (the_ia64_linux_nat_target): New.
5753 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
5754 (ia64_linux_stopped_data_address)
5755 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
5756 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
5757 ia64_linux_nat_target methods.
5758 (super_xfer_partial): Delete.
5759 (_initialize_ia64_linux_nat): Adjust to C++ification.
5761 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
5762 (the_m32r_linux_nat_target): New.
5763 (m32r_linux_fetch_inferior_registers)
5764 (m32r_linux_store_inferior_registers): Refactor as
5765 m32r_linux_nat_target methods.
5766 (_initialize_m32r_linux_nat): Adjust to C++ification.
5768 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
5769 (the_m68k_linux_nat_target): New.
5770 (m68k_linux_fetch_inferior_registers)
5771 (m68k_linux_store_inferior_registers): Refactor as
5772 m68k_linux_nat_target methods.
5773 (_initialize_m68k_linux_nat): Adjust to C++ification.
5775 * s390-linux-nat.c (s390_linux_nat_target): New class.
5776 (the_s390_linux_nat_target): New.
5777 (s390_linux_fetch_inferior_registers)
5778 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
5779 (s390_insert_watchpoint, s390_remove_watchpoint)
5780 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
5781 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
5782 (s390_auxv_parse, s390_read_description): Refactor as methods of
5783 s390_linux_nat_target.
5784 (_initialize_s390_nat): Adjust to C++ification.
5786 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
5787 (the_sparc_linux_nat_target): New.
5788 (_initialize_sparc_linux_nat): Adjust to C++ification.
5789 * sparc-nat.c (sparc_fetch_inferior_registers)
5790 (sparc_store_inferior_registers): Remove target_ops parameter.
5791 * sparc-nat.h (sparc_fetch_inferior_registers)
5792 (sparc_store_inferior_registers): Remove target_ops parameter.
5793 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
5794 (the_sparc64_linux_nat_target): New.
5795 (_initialize_sparc64_linux_nat): Adjust to C++ification.
5797 * spu-linux-nat.c (spu_linux_nat_target): New class.
5798 (the_spu_linux_nat_target): New.
5799 (spu_child_post_startup_inferior, spu_child_post_attach)
5800 (spu_child_wait, spu_fetch_inferior_registers)
5801 (spu_store_inferior_registers, spu_xfer_partial)
5802 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
5804 (_initialize_spu_nat): Adjust to C++ification.
5806 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
5807 (the_tilegx_linux_nat_target): New.
5808 (fetch_inferior_registers, store_inferior_registers):
5809 Refactor as methods.
5810 (_initialize_tile_linux_nat): Adjust to C++ification.
5812 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
5813 (the_xtensa_linux_nat_target): New.
5814 (xtensa_linux_fetch_inferior_registers)
5815 (xtensa_linux_store_inferior_registers): Refactor as
5816 xtensa_linux_nat_target methods.
5817 (_initialize_xtensa_linux_nat): Adjust to C++ification.
5819 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
5820 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
5821 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
5822 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
5823 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
5824 (fbsd_stopped_by_sw_breakpoint)
5825 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
5826 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
5827 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
5828 (fbsd_post_startup_inferior, fbsd_post_attach)
5829 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
5830 (fbsd_set_syscall_catchpoint)
5831 (super_xfer_partial, super_resume, super_wait)
5832 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
5833 (fbsd_handle_debug_trap): Remove target_ops parameter.
5834 (fbsd_nat_add_target): Delete.
5835 * fbsd-nat.h: Include "inf-ptrace.h".
5836 (fbsd_nat_add_target): Delete.
5837 (USE_SIGTRAP_SIGINFO): Define.
5838 (fbsd_nat_target): New class.
5840 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
5841 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
5842 (amd64bsd_target): Delete.
5843 * amd64-bsd-nat.h: New file.
5844 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
5846 (amd64_fbsd_nat_target): New class.
5847 (the_amd64_fbsd_nat_target): New.
5848 (amd64fbsd_read_description): Refactor as method of
5849 amd64_fbsd_nat_target.
5850 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5851 (_initialize_amd64fbsd_nat): Adjust to C++ification.
5852 * amd64-nat.h (amd64bsd_target): Delete function declaration.
5853 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
5854 (i386bsd_store_inferior_registers): Remove target_ops parameter.
5855 (i386bsd_target): Delete.
5856 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
5857 (i386bsd_fetch_inferior_registers)
5858 (i386bsd_store_inferior_registers): Declare.
5859 (i386_bsd_nat_target): New class.
5860 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
5861 (the_i386_fbsd_nat_target): New.
5862 (i386fbsd_resume, i386fbsd_read_description): Refactor as
5863 i386_fbsd_nat_target methods.
5864 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5865 (_initialize_i386fbsd_nat): Adjust to C++ification.
5866 * x86-bsd-nat.c (super_mourn_inferior): Delete.
5867 (x86bsd_mourn_inferior, x86bsd_target): Delete.
5868 (_initialize_x86_bsd_nat): Adjust to C++ification.
5869 * x86-bsd-nat.h: Include "x86-nat.h".
5870 (x86bsd_target): Delete declaration.
5871 (x86bsd_nat_target): New class.
5873 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
5874 (the_aarch64_fbsd_nat_target): New.
5875 (aarch64_fbsd_fetch_inferior_registers)
5876 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
5877 aarch64_fbsd_nat_target.
5878 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
5879 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
5880 (the_alpha_bsd_nat_target): New.
5881 (alphabsd_fetch_inferior_registers)
5882 (alphabsd_store_inferior_registers): Refactor as
5883 alpha_bsd_nat_target methods.
5884 (_initialize_alphabsd_nat): Refactor as methods of
5885 alpha_bsd_nat_target.
5886 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
5887 (the_amd64_nbsd_nat_target): New.
5888 (_initialize_amd64nbsd_nat): Adjust to C++ification.
5889 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
5890 (the_amd64_obsd_nat_target): New.
5891 (_initialize_amd64obsd_nat): Adjust to C++ification.
5892 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
5893 (the_arm_fbsd_nat_target): New.
5894 (arm_fbsd_fetch_inferior_registers)
5895 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
5896 (_initialize_arm_fbsd_nat): Refactor as methods of
5897 arm_fbsd_nat_target.
5898 (_initialize_arm_fbsd_nat): Adjust to C++ification.
5899 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
5900 (the_arm_netbsd_nat_target): New.
5901 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
5902 arm_netbsd_nat_target.
5903 (_initialize_arm_netbsd_nat): Adjust to C++ification.
5904 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
5905 (the_hppa_nbsd_nat_target): New.
5906 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
5907 hppa_nbsd_nat_target methods.
5908 (_initialize_hppanbsd_nat): Adjust to C++ification.
5909 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
5910 (the_hppa_obsd_nat_target): New.
5911 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
5912 methods of hppa_obsd_nat_target.
5913 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
5915 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
5916 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
5918 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
5919 (_initialize_i386obsd_nat): Use add_target.
5920 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
5921 (the_m68k_bsd_nat_target): New.
5922 (m68kbsd_fetch_inferior_registers)
5923 (m68kbsd_store_inferior_registers): Refactor as methods of
5924 m68k_bsd_nat_target.
5925 (_initialize_m68kbsd_nat): Adjust to C++ification.
5926 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
5927 (the_mips_fbsd_nat_target): New.
5928 (mips_fbsd_fetch_inferior_registers)
5929 (mips_fbsd_store_inferior_registers): Refactor as methods of
5930 mips_fbsd_nat_target.
5931 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
5933 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
5934 (the_mips_nbsd_nat_target): New.
5935 (mipsnbsd_fetch_inferior_registers)
5936 (mipsnbsd_store_inferior_registers): Refactor as methods of
5937 mips_nbsd_nat_target.
5938 (_initialize_mipsnbsd_nat): Adjust to C++ification.
5939 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
5940 (the_mips64_obsd_nat_target): New.
5941 (mips64obsd_fetch_inferior_registers)
5942 (mips64obsd_store_inferior_registers): Refactor as methods of
5943 mips64_obsd_nat_target.
5944 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
5946 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
5948 * nbsd-nat.h: Include "inf-ptrace.h".
5949 (nbsd_nat_target): New class.
5950 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
5951 (obsd_wait): Refactor as methods of obsd_nat_target.
5952 (obsd_add_target): Delete.
5953 * obsd-nat.h: Include "inf-ptrace.h".
5954 (obsd_nat_target): New class.
5955 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
5956 (the_ppc_fbsd_nat_target): New.
5957 (ppcfbsd_fetch_inferior_registers)
5958 (ppcfbsd_store_inferior_registers): Refactor as methods of
5959 ppc_fbsd_nat_target.
5960 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
5962 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
5963 (the_ppc_nbsd_nat_target): New.
5964 (ppcnbsd_fetch_inferior_registers)
5965 (ppcnbsd_store_inferior_registers): Refactor as methods of
5966 ppc_nbsd_nat_target.
5967 (_initialize_ppcnbsd_nat): Adjust to C++ification.
5968 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
5969 (the_ppc_obsd_nat_target): New.
5970 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
5971 methods of ppc_obsd_nat_target.
5972 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
5974 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
5975 (the_sh_nbsd_nat_target): New.
5976 (shnbsd_fetch_inferior_registers)
5977 (shnbsd_store_inferior_registers): Refactor as methods of
5979 (_initialize_shnbsd_nat): Adjust to C++ification.
5980 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
5981 (inf_ptrace_xfer_partial): Delete.
5982 (sparc_xfer_partial, sparc_target): Delete.
5983 * sparc-nat.h (sparc_fetch_inferior_registers)
5984 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
5985 (sparc_target): Delete function declaration.
5986 (sparc_target): New template class.
5987 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
5988 (_initialize_sparcnbsd_nat): Adjust to C++ification.
5989 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
5990 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
5992 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
5993 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
5994 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
5995 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
5997 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
5998 (the_vax_bsd_nat_target): New.
5999 (vaxbsd_fetch_inferior_registers)
6000 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6002 (_initialize_vaxbsd_nat): Adjust to C++ification.
6004 * bsd-kvm.c (bsd_kvm_target): New class.
6005 (bsd_kvm_ops): Now a bsd_kvm_target.
6006 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6007 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6008 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6010 (bsd_kvm_return_one): Delete.
6011 (bsd_kvm_add_target): Adjust to C++ification.
6013 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6014 (nto_procfs_target_procfs): New classes.
6015 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6016 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6017 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6018 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6019 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6020 (procfs_remove_hw_breakpoint, procfs_resume)
6021 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6022 (procfs_kill_inferior, procfs_store_registers)
6023 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6024 as methods of nto_procfs_target.
6025 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6026 (nto_native_ops): Delete.
6027 (procfs_open, procfs_native_open): Delete.
6028 (nto_native_ops): Now an nto_procfs_target_native.
6029 (init_procfs_targets): Adjust to C++ification.
6030 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6031 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6032 Refactor as methods of nto_procfs_target.
6034 * go32-nat.c (go32_nat_target): New class.
6035 (the_go32_nat_target): New.
6036 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6037 (go32_store_registers, go32_xfer_partial, go32_files_info)
6038 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6039 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6040 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6041 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6042 (go32_target): Delete.
6043 (_initialize_go32_nat): Adjust to C++ification.
6045 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6046 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6047 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6048 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6050 (gnu_target): Delete.
6051 * gnu-nat.h (gnu_target): Delete.
6052 (gnu_nat_target): New class.
6053 * i386-gnu-nat.c (gnu_base_target): New.
6054 (i386_gnu_nat_target): New class.
6055 (the_i386_gnu_nat_target): New.
6056 (_initialize_i386gnu_nat): Adjust to C++ification.
6058 2018-05-02 Pedro Alves <palves@redhat.com>
6060 * bfd-target.c (target_bfd_xclose): Rename to ...
6061 (target_bfd_close): ... this.
6062 (target_bfd_reopen): Adjust.
6063 * target.c (target_close): Remove references to to_xclose.
6064 * target.h (target_ops::to_xclose): Delete.
6065 (target_ops::to_close): Update comments.
6067 2018-05-02 Pedro Alves <palves@redhat.com>
6069 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6071 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6072 * inf-ptrace.c (inf_ptrace_register_u_offset)
6073 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6074 (inf_ptrace_store_register, inf_ptrace_store_registers)
6075 (inf_ptrace_trad_target): Move to ...
6076 * linux-nat-trad.c: ... this new file.
6077 * linux-nat-trad.h: New file.
6078 * linux-nat.c (linux_target_install_ops): Make extern.
6079 (linux_trad_target): Delete.
6080 * linux-nat.h (linux_trad_target): Delete declaration.
6081 (linux_target_install_ops): Declare.
6082 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6085 2018-05-02 Pedro Alves <palves@redhat.com>
6087 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6088 procfs_target/add_target here.
6089 * procfs.c (procfs_target): Make static.
6090 (_initialize_procfs): Call add_target here.
6091 * procfs.h (struct target_ops): Remove forward declaration.
6092 (procfs_target): Remove declaration.
6093 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6095 2018-05-02 Pedro Alves <palves@redhat.com>
6097 * procfs.c (procfs_stopped_by_watchpoint)
6098 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6099 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6101 (procfs_use_watchpoints): Delete, move contents...
6102 (procfs_target): ... here.
6103 * procfs.h (procfs_use_watchpoints): Delete declaration.
6104 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6105 procfs_use_watchpoints.
6106 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6107 procfs_use_watchpoints.
6109 2018-05-02 Tom Tromey <tom@tromey.com>
6112 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6113 and var_zuinteger_unlimited.
6114 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6115 and PARAM_ZUINTEGER_UNLIMITED.
6116 (set_parameter_value): Handle var_zuinteger and
6117 var_zuinteger_unlimited.
6118 (add_setshow_generic): Likewise.
6119 (parmpy_init): Likewise.
6121 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6124 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6125 pointer is not null before dereferencing it.
6127 2018-04-30 Tom Tromey <tom@tromey.com>
6129 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6132 2018-04-30 Tom Tromey <tom@tromey.com>
6134 * breakpoint.c (mention): Remove use of is_mi_like_p.
6135 (print_mention_ranged_breakpoint): Likewise.
6136 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6139 2018-04-30 Tom Tromey <tom@tromey.com>
6141 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6143 2018-04-30 Tom Tromey <tom@tromey.com>
6145 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6146 (info_spu_event_command): Remove some uses of is_mi_like_p.
6148 2018-04-30 Tom Tromey <tom@tromey.com>
6150 * python/py-framefilter.c (py_print_single_arg)
6151 (enumerate_locals, py_print_args, py_print_frame): Remove some
6152 uses of is_mi_like_p.
6154 2018-04-30 Tom Tromey <tom@tromey.com>
6157 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6158 * ui-out.h (ui_out::is_mi_like_p): Now const.
6159 (ui_out::do_is_mi_like_p): Now const.
6160 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6162 2018-04-30 Tom Tromey <tom@tromey.com>
6164 * varobj.c (varobj_set_visualizer): Use new_reference.
6165 * python/python.c (gdbpy_decode_line): Use new_reference.
6166 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6169 2018-04-30 Tom Tromey <tom@tromey.com>
6171 * varobj.c (install_new_value): Use new_reference.
6172 * value.h (value_incref): Return void. Swap intro comment with
6174 * value.c (set_value_parent): Use new_reference.
6175 (value_incref): Return void. Update intro comment.
6176 (release_value): Use new_reference.
6177 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6179 2018-04-30 Tom Tromey <tom@tromey.com>
6181 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6182 * gdb_bfd.h (new_bfd_ref): Remove.
6183 (gdb_bfd_open): Update comment.
6184 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6185 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6186 (gdb_bfd_fdopenr): Use new_reference.
6187 * exec.c (exec_file_attach): Use new_reference.
6189 2018-04-30 Tom Tromey <tom@tromey.com>
6191 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6194 2018-04-30 Tom Tromey <tom@tromey.com>
6196 * jit.c (jit_read_code_entry): Use type_align.
6197 * i386-tdep.c (i386_gdbarch_init): Don't call
6198 set_gdbarch_long_long_align_bit.
6199 * gdbarch.sh: Remove long_long_align_bit.
6200 * gdbarch.c, gdbarch.h: Rebuild.
6201 * arc-tdep.c (arc_type_align): New function.
6202 (arc_gdbarch_init): Use arc_type_align. Don't call
6203 set_gdbarch_long_long_align_bit.
6205 2018-04-30 Tom Tromey <tom@tromey.com>
6207 * rust-lang.c (rust_type_alignment): Remove.
6208 (rust_composite_type): Use type_align.
6210 2018-04-30 Tom Tromey <tom@tromey.com>
6212 * NEWS: Mention Type.align.
6213 * python/py-type.c (typy_get_alignof): New function.
6214 (type_object_getset): Add "alignof".
6216 2018-04-30 Tom Tromey <tom@tromey.com>
6220 * std-operator.def (UNOP_ALIGNOF): New operator.
6221 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6223 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6224 * c-lang.c (c_op_print_tab): Add alignof.
6225 * c-exp.y (ALIGNOF): New token.
6226 (exp): Add "ALIGNOF" production.
6227 (ident_tokens): Add _Alignof and alignof.
6229 2018-04-30 Tom Tromey <tom@tromey.com>
6231 * i386-tdep.c (i386_type_align): New function.
6232 (i386_gdbarch_init): Update.
6233 * gdbarch.sh (type_align): New method.
6234 * gdbarch.c, gdbarch.h: Rebuild.
6235 * arch-utils.h (default_type_align): Declare.
6236 * arch-utils.c (default_type_align): New function.
6237 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6238 (struct type) <align_log2>: New field.
6239 <instance_flags>: Now a bitfield.
6240 (TYPE_RAW_ALIGN): New macro.
6241 (type_align, type_raw_align, set_type_align): Declare.
6242 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6244 * dwarf2read.c (quirk_rust_enum): Set type alignment.
6245 (get_alignment, maybe_set_alignment): New functions.
6246 (read_structure_type, read_enumeration_type, read_array_type)
6247 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6248 (read_subrange_type, read_base_type): Set type alignment.
6250 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
6252 * dwarf2read.c (read_index_from_section): Use bool.
6254 2018-04-29 Fabian Groffen <grobian@gentoo.org>
6257 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6260 2018-04-29 John Reiser <jreiser@BitWagon.com>
6263 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6264 last step, and do it atomically.
6266 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
6268 * compile/compile-c-types.c (convert_int, convert_float):
6271 2018-04-27 Tom Tromey <tom@tromey.com>
6274 * rust-lang.c (rust_inclusive_range_type_p): New function.
6275 (rust_range): Handle inclusive ranges.
6276 (rust_compute_range): Likewise.
6277 * rust-exp.y (struct rust_op) <inclusive>: New field.
6278 (DOTDOTEQ): New constant.
6279 (range_expr): Add "..=" productions.
6280 (operator_tokens): Add "..=" token.
6281 (ast_range): Add "inclusive" parameter.
6282 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6284 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6286 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6287 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6289 * expprint.c (print_subexp_standard): Handle new bounds values.
6290 (dump_subexp_body_standard): Likewise.
6292 2018-04-27 Tom Tromey <tom@tromey.com>
6294 * configure: Rebuild.
6295 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6296 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6298 (class symbol_needs_eval_context): Likewise.
6299 * dwarf2read.c (mock_mapped_index::symbol_name_count)
6300 (mock_mapped_index::symbol_name_at): Use "override". Remove
6302 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6304 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6305 * aarch64-tdep.c (instruction_reader::read): Use "override".
6306 (instruction_reader_test::read): Likewise.
6307 * arm-tdep.c (instruction_reader::read): Use "override".
6308 (instruction_reader_thumb::read): Likewise.
6310 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
6313 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6314 instead of remote_send.
6315 (remote_send): Remove.
6317 2018-04-26 Pedro Alves <palves@redhat.com>
6319 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6320 find_function_start_sal instead of find_pc_line.
6322 2018-04-26 Pedro Alves <palves@redhat.com>
6324 * breakpoint.c (set_breakpoint_location_function): Handle
6326 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6327 * elfread.c (elf_symtab_read): Give data symbols with
6328 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6329 (elf_rel_plt_read): Update comment.
6330 * linespec.c (convert_linespec_to_sals): Handle
6332 (minsym_found): Handle mst_data_gnu_ifunc.
6333 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6334 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6335 * parse.c (find_minsym_type_and_address): Handle
6337 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6338 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6339 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6341 <mst_data_gnu_ifunc>: New enumerator.
6343 2018-04-26 Pedro Alves <palves@redhat.com>
6345 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6346 (lookup_minimal_symbol_by_pc_section): ... this. Replace
6347 'want_trampoline' parameter by a lookup_msym_prefer parameter.
6349 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6350 (lookup_minimal_symbol_by_pc): Adjust.
6351 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6352 (lookup_solib_trampoline_symbol_by_pc): Adjust.
6353 * minsyms.h (lookup_msym_prefer): New enum.
6354 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6355 parameter by a lookup_msym_prefer parameter.
6357 2018-04-26 Pedro Alves <palves@redhat.com>
6359 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6360 ends in "@plt" instead of looking at the symbol's section.
6362 2018-04-26 Pedro Alves <palves@redhat.com>
6364 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
6366 (find_pc_partial_function_gnu_ifunc): Rename to ...
6367 (find_pc_partial_function): ... this, and remove references to
6369 (find_pc_partial_function): Delete old implementation.
6370 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6372 2018-04-26 Pedro Alves <palves@redhat.com>
6374 * linespec.c (struct bound_minimal_symbol_search_key): New.
6375 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
6376 skip first line if we found a GNU ifunc minimal symbol by name.
6377 (compare_msymbols): Change parameters to work with a destructured
6379 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6382 2018-04-26 Pedro Alves <palves@redhat.com>
6384 * breakpoint.c (set_breakpoint_location_function): Don't resolve
6385 ifunc targets here. Instead, if we have an ifunc minsym, use its
6387 (add_location_to_breakpoint): Store the minsym and the objfile in
6388 the breakpoint location.
6389 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6390 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6391 Record the minsym in the sal.
6392 * symtab.h (symtab_and_line) <msymbol>: New field.
6394 2018-04-26 Pedro Alves <palves@redhat.com>
6396 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6397 unless we actually resolved the ifunc.
6399 2018-04-26 Pedro Alves <palves@redhat.com>
6401 * c-exp.y (variable production): Prefer ifunc minsyms over
6402 regular function symbols.
6403 * symtab.c (find_gnu_ifunc): New function.
6404 * minsyms.h (lookup_msym_prefer): New enum.
6405 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6406 parameter by a lookup_msym_prefer parameter.
6407 * symtab.h (find_gnu_ifunc): New declaration.
6409 2018-04-26 Pedro Alves <palves@redhat.com>
6411 * blockframe.c (find_gnu_ifunc_target_type): New function.
6412 (find_function_type): New.
6413 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6414 return a value with a memory address.
6415 (eval_call): For calls to GNU ifunc functions, try to find the
6416 type of the target function from the type that the resolver
6418 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6420 * infcall.c (find_function_return_type): Delete.
6421 (find_function_addr): Add 'function_type' parameter. For calls to
6422 GNU ifunc functions, try to find the type of the target function
6423 from the type that the resolver returns, and return it via
6425 (call_function_by_hand_dummy): Adjust to use the function type
6426 returned by find_function_addr.
6427 (find_function_addr): Add 'function_type' parameter and move
6429 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6432 2018-04-26 Pedro Alves <palves@redhat.com>
6434 * c-exp.y (variable production): Skip finding an alias for ifunc
6437 2018-04-26 Pedro Alves <palves@redhat.com>
6439 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6441 2018-04-25 Pedro Alves <palves@redhat.com>
6443 * infcmd.c (kill_command): Print the pid as string, not the whole
6444 thread's ptid. Add comment. s/has been killed/killed/ in output
6446 * remote.c (remote_detach_1): Print the pid as string, not the
6447 whole thread's ptid.
6449 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6450 Sergio Durigan Junior <sergiodj@redhat.com>
6451 Pedro Alves <palves@redhat.com>
6453 * infcmd.c (kill_command): Print message when inferior has
6455 * inferior.c (print_inferior_events): Remove 'static'. Set as
6457 (add_inferior): Improve message printed when
6458 'print_inferior_events' is on.
6459 (exit_inferior): Remove message printed when
6460 'print_inferior_events' is on.
6461 (detach_inferior): Improve message printed when
6462 'print_inferior_events' is on.
6463 (initialize_inferiors): Use 'add_inferior_silent' to set
6464 'current_inferior_'.
6465 * inferior.h (print_inferior_events): Declare here as
6467 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6468 '[Detaching...]' messages when 'print_inferior_events' is on.
6469 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
6470 as prefix/suffix for messages. Remove periods. Fix erroneous
6471 'Detaching after fork from child...', replace it by '... from
6473 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6474 prefix/suffix when printing 'Detaching...' messages. Print
6475 them when 'print_inferior_events' is on.
6476 * remote.c (remote_detach_1): Print message when detaching
6477 from inferior and '!is_fork_parent'.
6479 2018-04-24 Tom Tromey <tom@tromey.com>
6481 * cli-out.h: Reindent.
6483 2018-04-24 Tom Tromey <tom@tromey.com>
6485 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6486 (cli_ui_out::do_field_string): Use fputs_filtered.
6487 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6489 2018-04-23 Tom Tromey <tom@tromey.com>
6491 * guile/scm-frame.c (gdbscm_frame_read_var): Use
6492 gdb::unique_xmalloc_ptr.
6494 2018-04-23 Tom Tromey <tom@tromey.com>
6496 * configure: Rebuild.
6498 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
6501 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6502 prepare_for_testing. Set normal_bp to r_debug_state if target
6505 2018-04-21 Pedro Alves <palves@redhat.com>
6506 Rajendra SY <rajendra.sy@gmail.com>
6508 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6509 * remote.c (extended_remote_attach): In all-stop mode, mark the
6510 thread as executing.
6512 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6514 * thread.c (thread_apply_all_command): Fix comment.
6515 (thread_command): Fix comment.
6517 2018-04-10 Alan Hayward <alan.hayward@arm.com>
6519 * common/tdesc.h (tdesc_create_feature): Remove xml filename
6521 * features/aarch64-core.c (create_feature_aarch64_core):
6523 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
6525 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
6527 * features/i386/32bit-avx512.c
6528 (create_feature_i386_32bit_avx512): Likewise.
6529 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
6531 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
6533 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
6535 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
6537 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
6539 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
6541 * features/i386/64bit-avx512.c
6542 (create_feature_i386_64bit_avx512): Likewise.
6543 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
6545 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
6547 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
6549 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
6551 * features/i386/64bit-segments.c
6552 (create_feature_i386_64bit_segments): Likewise.
6553 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
6555 * features/i386/x32-core.c
6556 (create_feature_i386_x32_core): Likewise.
6557 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
6558 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
6559 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
6560 * target-descriptions.c: In generated code, don't pass xml
6563 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6565 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
6566 (print_xml_feature::visit_post): Likewise.
6567 (print_xml_feature::visit): Likewise.
6568 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
6569 (print_xml_feature): Add new class.
6570 * regformats/regdat.sh: Null xmltarget on feature targets.
6571 * target-descriptions.c (struct target_desc): Add xmltarget.
6572 (maintenance_check_tdesc_xml_convert): Add unittest function.
6573 (tdesc_get_features_xml): Add function to get xml.
6574 (maintenance_check_xml_descriptions): Test xml generation.
6575 * xml-tdesc.c (string_read_description_xml): Add function.
6576 * xml-tdesc.h (string_read_description_xml): Add declaration.
6578 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6580 * features/Makefile: Add feature marker to targets with new style
6581 target descriptions.
6582 * regformats/aarch64.dat: Regenerate.
6583 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
6584 * regformats/i386/amd64-avx-linux.dat: Likewise.
6585 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
6586 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
6587 * regformats/i386/amd64-linux.dat: Likewise.
6588 * regformats/i386/amd64-mpx-linux.dat: Likewise.
6589 * regformats/i386/amd64.dat: Likewise.
6590 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
6591 * regformats/i386/i386-avx-linux.dat: Likewise.
6592 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
6593 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
6594 * regformats/i386/i386-linux.dat: Likewise.
6595 * regformats/i386/i386-mmx-linux.dat: Likewise.
6596 * regformats/i386/i386-mpx-linux.dat: Likewise.
6597 * regformats/i386/i386.dat: Likewise.
6598 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
6599 * regformats/i386/x32-avx-linux.dat: Likewise.
6600 * regformats/i386/x32-linux.dat: Likewise.
6601 * regformats/tic6x-c62x-linux.dat: Likewise.
6602 * regformats/tic6x-c64x-linux.dat: Likewise.
6603 * regformats/tic6x-c64xp-linux.dat: Likewise.
6604 * regformats/regdat.sh: Parse feature marker.
6606 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6608 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
6609 (tdesc_osabi_name): Likewise.
6610 * target-descriptions.c (tdesc_architecture_name): Add new
6612 (tdesc_osabi_name): Likewise.
6614 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6616 * common/tdesc.c (tdesc_predefined_type): Move to here.
6617 (tdesc_named_type): Likewise.
6618 (tdesc_create_vector): Likewise.
6619 (tdesc_create_struct): Likewise.
6620 (tdesc_set_struct_size): Likewise.
6621 (tdesc_create_union): Likewise.
6622 (tdesc_create_flags): Likewise.
6623 (tdesc_create_enum): Likewise.
6624 (tdesc_add_field): Likewise.
6625 (tdesc_add_typed_bitfield): Likewise.
6626 (tdesc_add_bitfield): Likewise.
6627 (tdesc_add_flag): Likewise.
6628 (tdesc_add_enum_value): Likewise.
6629 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
6630 (struct tdesc_type_vector): Likewise.
6631 (struct tdesc_type_field): Likewise.
6632 (struct tdesc_type_with_fields): Likewise.
6633 (tdesc_create_enum): Add declaration.
6634 (tdesc_add_typed_bitfield): Likewise.
6635 (tdesc_add_enum_value): Likewise.
6636 * target-descriptions.c (tdesc_type_field): Move from here.
6637 (tdesc_type_builtin): Likewise.
6638 (tdesc_type_vector): Likewise.
6639 (tdesc_type_with_fields): Likewise.
6640 (tdesc_predefined_types): Likewise.
6641 (tdesc_named_type): Likewise.
6642 (tdesc_create_vector): Likewise.
6643 (tdesc_create_struct): Likewise.
6644 (tdesc_set_struct_size): Likewise.
6645 (tdesc_create_union): Likewise.
6646 (tdesc_create_flags): Likewise.
6647 (tdesc_create_enum): Likewise.
6648 (tdesc_add_field): Likewise.
6649 (tdesc_add_typed_bitfield): Likewise.
6650 (tdesc_add_bitfield): Likewise.
6651 (tdesc_add_flag): Likewise.
6652 (tdesc_add_enum_value): Likewise.
6653 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
6654 (tdesc_add_typed_bitfield): Likewise.
6655 (tdesc_add_enum_value): Likewise.
6657 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6659 * common/tdesc.c (tdesc_feature::accept): Move to here.
6660 (tdesc_feature::operator==): Likewise.
6661 (tdesc_create_reg): Likewise.
6662 * common/tdesc.h (tdesc_type_kind): Likewise.
6663 (struct tdesc_type): Likewise.
6664 (struct tdesc_feature): Likewise.
6665 * regformats/regdat.sh: Create a feature.
6666 * target-descriptions.c (tdesc_type_kind): Move from here.
6667 (tdesc_type): Likewise.
6668 (tdesc_type_up): Likewise.
6669 (tdesc_feature): Likewise.
6670 (tdesc_create_reg): Likewise.
6672 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6674 * Makefile.in: Add arch/tdesc.c
6675 * common/tdesc.c: New file.
6676 * common/tdesc.h (tdesc_element_visitor): Move to here.
6677 (tdesc_element): Likewise.
6678 (tdesc_reg): Likewise.
6679 (tdesc_reg_up): Likewise.
6680 * regformats/regdef.h (reg): Add offset to constructors.
6681 * target-descriptions.c (tdesc_element_visitor): Move from here.
6682 (tdesc_element): Likewise.
6683 (tdesc_reg): Likewise.
6684 (tdesc_reg_up): Likewise.
6686 2018-04-17 Tom Tromey <tom@tromey.com>
6688 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
6691 2018-04-17 Tom Tromey <tom@tromey.com>
6693 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
6695 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
6697 * symtab.c (print_symbol_info): Skip printing filename and line
6698 number when `last' is NULL.
6699 (symtab_symbol_info): Use empty string instead of NULL for first
6700 invocation of print_symbol_info.
6701 (rbreak_command): Pass NULL to `last' parameter of
6704 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
6706 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
6709 2018-04-16 Pedro Alves <palves@redhat.com>
6711 * MAINTAINERS (sh): Remove.
6712 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
6713 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
6714 (ALLDEPFILES): Remove sh64-tdep.c.
6715 * NEWS: Mentions that support for SH-5/SH64 is removed.
6716 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
6717 (sh*-*-openbsd*): Ditto.
6718 (sh64-*-elf*): Remove.
6720 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
6721 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
6722 * sh-tdep.c: No longer include "sh64-tdep.h".
6723 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
6724 * sh64-tdep.c, sh64-tdep.h: Remove files.
6726 2018-04-16 Pedro Alves <palves@redhat.com>
6728 * MAINTAINERS: Remove m88k.
6729 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
6730 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
6731 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
6732 * NEWS: Mention that support for m88k was removed.
6733 * configure.host (m88*-*-*): Remove support.
6734 * configure.nat (m88k-*-*): Remove support.
6735 * configure.tgt (m88*-*-openbsd*): Remove.
6736 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
6738 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
6740 * configure.tgt (x86_tobjs): New variable.
6741 (amd64_tobjs, i386_tobjs): Use it.
6743 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6745 * symtab.c (print_symbol_info): Precede the symbol definition by
6746 the line number when available.
6747 * NEWS: Advertise this enhancement.
6749 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6751 * NEWS (New options): announce set/show record btrace cpu.
6752 * btrace.c: Include record-btrace.h.
6753 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
6754 the vendor is unknown.
6755 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
6756 Maybe overwrite the btrace configuration's cpu.
6757 (btrace_compute_ftrace): Add cpu parameter. Update callers.
6758 (btrace_fetch): Add cpu parameter. Update callers.
6759 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
6760 Maybe overwrite the btrace configuration's cpu. Skip enabling
6761 errata workarounds if the vendor is unknown.
6762 * python/py-record-btrace.c: Include record-btrace.h.
6763 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
6764 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
6765 * record-btrace.c (record_btrace_cpu_state_kind): New.
6766 (record_btrace_cpu): New.
6767 (set_record_btrace_cpu_cmdlist): New.
6768 (record_btrace_get_cpu): New.
6769 (require_btrace_thread, record_btrace_info)
6770 (record_btrace_resume_thread): Call record_btrace_get_cpu.
6771 (cmd_set_record_btrace_cpu_none): New.
6772 (cmd_set_record_btrace_cpu_auto): New.
6773 (cmd_set_record_btrace_cpu): New.
6774 (cmd_show_record_btrace_cpu): New.
6775 (_initialize_record_btrace): Initialize set/show record btrace cpu
6777 * record-btrace.h (record_btrace_get_cpu): New.
6779 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6781 * record.c (set_record_command): Fix typo in message.
6783 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6785 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
6787 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6789 * infrun.c (process_event_stop_test): Call
6790 gdbarch_in_indirect_branch_thunk.
6791 * gdbarch.sh (in_indirect_branch_thunk): New.
6792 * gdbarch.c: Regenerated.
6793 * gdbarch.h: Regenerated.
6796 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
6797 (HFILES_NO_SRCDIR): Add x86-tdep.h.
6798 (ALLDEPFILES): Add x86-tdep.c.
6799 * arch-utils.h (default_in_indirect_branch_thunk): New.
6800 * arch-utils.c (default_in_indirect_branch_thunk): New.
6801 * i386-tdep: Include x86-tdep.h.
6802 (i386_in_indirect_branch_thunk): New.
6803 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
6805 * amd64-tdep: Include x86-tdep.h.
6806 (amd64_in_indirect_branch_thunk): New.
6807 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
6809 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
6812 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
6813 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
6814 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
6817 2018-04-12 Tom Tromey <tom@tromey.com>
6819 * rust-lang.c (rust_print_struct_def): Remove univariant code.
6820 (rust_evaluate_subexp): Likewise.
6822 2018-04-12 Pedro Alves <palves@redhat.com>
6824 * procfs.c (procfs_detach): Make forward declaration's prototype
6825 match definition's protototype.
6826 (proc_get_LDT_entry): Remove stale do_cleanups call.
6828 2018-04-12 Pedro Alves <palves@redhat.com>
6830 * target.h (target_ops::to_has_exited): Delete.
6831 (target_has_exited): Delete.
6832 * target-delegates.c: Regenerate.
6834 2018-04-11 Pedro Alves <palves@redhat.com>
6836 * target.c (fileio_fh_t::t): Add comment.
6837 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6838 (target_fileio_close): Handle a NULL target.
6839 (invalidate_fileio_fh): New.
6840 (target_close): Call it.
6841 * remote.c (remote_hostio_send_command): No longer check whether
6842 remote_desc is open.
6844 2018-04-11 Pedro Alves <palves@redhat.com>
6846 * target.c (fileio_fh_t): Make it a named struct instead of a
6848 (fileio_fh_t::is_closed): New method.
6849 (DEF_VEC_O (fileio_fh_t)): Remove.
6850 (fileio_fhandles): Now a std::vector.
6851 (is_closed_fileio_fh): Delete.
6852 (acquire_fileio_fd): Adjust. Rename parameters.
6853 (release_fileio_fd): Adjust.
6854 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
6855 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6856 (target_fileio_close): Adjust.
6858 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
6860 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
6863 2018-04-10 Pedro Alves <palves@redhat.com>
6865 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
6866 (scoped_finish_thread_state): New class.
6867 * infcmd.c (run_command_1): Use it instead of finish_thread_state
6869 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
6870 (fetch_inferior_event, normal_stop): Likewise.
6871 * thread.c (finish_thread_state_cleanup): Delete.
6873 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6874 Pedro Alves <palves@redhat.com>
6876 * value.c: Include "selftest.h" and "common/array-view.h".
6877 (struct range) <operator ==>: New.
6878 (test_ranges_contain): New.
6879 (check_ranges_vector): New.
6880 (test_insert_into_bit_range_vector): New.
6881 (_initialize_values): Register selftests.
6882 * common/array-view.h (operator==, operator!=): New.
6884 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6886 * common/gdb_vecs.h (unordered_remove): Add overload that takes
6888 * inline-frame.c: Include <algorithm>.
6889 (struct inline_state): Add constructor.
6890 (inline_state_s): Remove.
6891 (DEF_VEC_O(inline_state_s)): Remove.
6892 (inline_states): Change type to std::vector.
6893 (find_inline_frame_state): Adjust to std::vector.
6894 (allocate_inline_frame_state): Remove.
6895 (clear_inline_frame_state): Adjust to std::vector.
6896 (skip_inline_frames): Adjust to std::vector.
6898 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6900 * tracepoint.h (struct trace_state_variable): Add constructor.
6901 <name>: Change type to std::string.
6902 * tracepoint.c (tsv_s): Remove.
6903 (DEF_VEC_O(tsv_s)): Remove.
6904 (tvariables): Change to std::vector.
6905 (create_trace_state_variable): Adjust to std::vector.
6906 (find_trace_state_variable): Likewise.
6907 (find_trace_state_variable_by_number): Likewise.
6908 (delete_trace_state_variable): Likewise.
6909 (trace_variable_command): Adjust to std::string.
6910 (delete_trace_variable_command): Likewise.
6911 (tvariables_info_1): Adjust to std::vector.
6912 (save_trace_state_variables): Likewise.
6913 (start_tracing): Likewise.
6914 (merge_uploaded_trace_state_variables): Adjust to std::vector
6916 * target.h (struct target_ops)
6917 <to_download_trace_state_variable>: Pass reference to
6918 trace_state_variable.
6919 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
6920 * target-delegates.c: Re-generate.
6921 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
6922 (mi_tsv_deleted): Likewise.
6923 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
6924 * remote.c (remote_download_trace_state_variable): Change
6925 pointer to reference and adjust.
6926 * make-target-delegates (parse_argtypes): Handle references.
6927 (write_function_header): Likewise.
6928 (munge_type): Likewise.
6930 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6932 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6933 string_view-selftests.c.
6934 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
6936 * unittests/basic_string_view/cons/char/1.cc: Likewise.
6937 * unittests/basic_string_view/cons/char/2.cc: Likewise.
6938 * unittests/basic_string_view/cons/char/3.cc: Likewise.
6939 * unittests/basic_string_view/element_access/char/1.cc:
6941 * unittests/basic_string_view/element_access/char/empty.cc:
6943 * unittests/basic_string_view/element_access/char/front_back.cc:
6945 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
6946 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
6948 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
6950 * unittests/basic_string_view/modifiers/swap/char/1.cc:
6952 * unittests/basic_string_view/operations/compare/char/1.cc:
6954 * unittests/basic_string_view/operations/compare/char/13650.cc:
6956 * unittests/basic_string_view/operations/copy/char/1.cc:
6958 * unittests/basic_string_view/operations/data/char/1.cc:
6960 * unittests/basic_string_view/operations/find/char/1.cc:
6962 * unittests/basic_string_view/operations/find/char/2.cc:
6964 * unittests/basic_string_view/operations/find/char/3.cc:
6966 * unittests/basic_string_view/operations/find/char/4.cc:
6968 * unittests/basic_string_view/operations/rfind/char/1.cc:
6970 * unittests/basic_string_view/operations/rfind/char/2.cc:
6972 * unittests/basic_string_view/operations/rfind/char/3.cc:
6974 * unittests/basic_string_view/operations/substr/char/1.cc:
6976 * unittests/basic_string_view/operators/char/2.cc: Likewise.
6977 * unittests/string_view-selftests.c: New file.
6979 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6981 * unittests/basic_string_view/capacity/1.cc: New file.
6982 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
6983 * unittests/basic_string_view/cons/char/1.cc: New file.
6984 * unittests/basic_string_view/cons/char/2.cc: New file.
6985 * unittests/basic_string_view/cons/char/3.cc: New file.
6986 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
6987 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
6988 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
6989 * unittests/basic_string_view/element_access/char/1.cc: New file.
6990 * unittests/basic_string_view/element_access/char/2.cc: New file.
6991 * unittests/basic_string_view/element_access/char/empty.cc: New file.
6992 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
6993 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
6994 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
6995 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
6996 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
6997 * unittests/basic_string_view/include.cc: New file.
6998 * unittests/basic_string_view/inserters/char/1.cc: New file.
6999 * unittests/basic_string_view/inserters/char/2.cc: New file.
7000 * unittests/basic_string_view/inserters/char/3.cc: New file.
7001 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7002 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7003 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7004 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7005 * unittests/basic_string_view/literals/types.cc: New file.
7006 * unittests/basic_string_view/literals/values.cc: New file.
7007 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7008 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7009 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7010 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7011 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7012 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7013 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7014 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7015 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7016 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7017 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7018 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7019 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7020 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7021 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7022 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7023 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7024 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7025 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7026 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7027 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7028 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7029 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7030 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7031 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7032 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7033 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7034 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7035 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7036 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7037 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7038 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7039 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7040 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7041 * unittests/basic_string_view/operators/char/2.cc: New file.
7042 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7043 * unittests/basic_string_view/range_access/char/1.cc: New file.
7044 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7045 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7046 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7047 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7048 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7049 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7050 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7051 * unittests/basic_string_view/typedefs.cc: New file.
7052 * unittests/basic_string_view/types/1.cc: New file.
7054 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7056 * common/gdb_string_view.h: Remove libstdc++ implementation
7057 details, adjust to gdb reality.
7058 * common/gdb_string_view.tcc: Likewise.
7059 * cli/cli-script.c (struct string_view): Remove.
7060 (user_args) <m_args>: Change element type to gdb::string_view.
7061 (user_args::insert_args): Adjust.
7063 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7065 * common/gdb_string_view.h: New file.
7066 * common/gdb_string_view.tcc: New file.
7068 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7070 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7071 * configure: Re-generate.
7073 2018-04-09 Pedro Alves <palves@redhat.com>
7075 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7076 (set_target_gdbarch): Call
7077 gdb::observers::architecture_changed.notify instead of
7078 observer_notify_architecture_changed.
7080 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7082 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7083 (do_restore_current_traceframe_cleanup): Remove.
7084 (restore_current_traceframe_cleanup_dtor): Remove.
7085 (make_cleanup_restore_current_traceframe): Remove.
7086 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7088 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7089 * infrun.c (fetch_inferior_event): Use
7090 scoped_restore_current_traceframe.
7092 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7094 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7096 <n_allocated_type_units>: Remove.
7097 <all_type_units>: Change to std::vector.
7098 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7099 to std::vector change.
7100 (dwarf2_per_objfile::get_cutu): Likewise.
7101 (dwarf2_per_objfile::get_tu): Likewise.
7102 (create_signatured_type_table_from_index): Likewise.
7103 (create_signatured_type_table_from_debug_names): Likewise.
7104 (dw2_symtab_iter_next): Likewise.
7105 (dw2_print_stats): Likewise.
7106 (dw2_expand_all_symtabs): Likewise.
7107 (dw2_expand_marked_cus): Likewise.
7108 (dw2_debug_names_iterator::next): Likewise.
7109 (dwarf2_initialize_objfile): Likewise.
7110 (add_signatured_type_cu_to_table): Likewise.
7111 (create_all_type_units): Likewise.
7112 (add_type_unit): Likewise.
7113 (struct tu_abbrev_offset): Add constructor.
7114 (build_type_psymtabs_1): Adjust to std::vector change.
7115 (print_tu_stats): Likewise.
7116 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7117 (write_debug_names): Likewise.
7119 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7121 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7122 Make an std::vector.
7123 <n_comp_units>: Remove.
7124 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7125 to std::vector change.
7126 (dwarf2_per_objfile::get_cutu): Likewise.
7127 (dwarf2_per_objfile::get_cu): Likewise.
7128 (create_cus_from_index): Likewise.
7129 (create_addrmap_from_index): Likewise.
7130 (create_addrmap_from_aranges): Likewise.
7131 (dwarf2_read_index): Likewise.
7132 (dw2_find_last_source_symtab): Likewise.
7133 (dw2_map_symtabs_matching_filename): Likewise.
7134 (dw2_symtab_iter_next): Likewise.
7135 (dw2_print_stats): Likewise.
7136 (dw2_expand_all_symtabs): Likewise.
7137 (dw2_expand_symtabs_with_fullname): Likewise.
7138 (dw2_expand_marked_cus): Likewise.
7139 (dw2_map_symbol_filenames): Likewise.
7140 (create_cus_from_debug_names): Likewise.
7141 (dwarf2_read_debug_names): Likewise.
7142 (dw2_debug_names_iterator::next): Likewise.
7143 (dwarf2_initialize_objfile): Likewise.
7144 (set_partial_user): Likewise.
7145 (dwarf2_build_psymtabs_hard): Likewise.
7146 (read_comp_units_from_section): Remove arguments, adjust to
7148 (create_all_comp_units): Adjust to std::vector and
7149 read_comp_units_from_section changes.
7150 (dwarf2_find_containing_comp_unit): Adjust to std::vector
7152 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7153 (psyms_seen_size): Likewise.
7154 (write_gdbindex): Likewise.
7155 (write_debug_names): Likewise.
7157 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7159 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7160 with dwarf2_per_objfile.
7161 (create_cus_from_index): Likewise.
7162 (create_signatured_type_table_from_index): Likewise.
7163 (dwarf2_read_index): Likewise.
7164 (dwarf2_initialize_objfile): Likewise.
7165 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
7166 per_cu rather than get_dwarf2_per_objfile.
7168 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7170 * dwarf2read.h (struct signatured_type): Forward declare.
7171 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7173 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7174 (dw2_get_cutu): ...this.
7175 (dwarf2_per_objfile::get_cu): Rename from...
7176 (dw2_get_cu): ...this.
7177 (dwarf2_per_objfile::get_tu): New.
7178 (create_addrmap_from_index): Adjust.
7179 (create_addrmap_from_aranges): Adjust.
7180 (dw2_find_last_source_symtab): Adjust.
7181 (dw2_map_symtabs_matching_filename): Adjust.
7182 (dw2_symtab_iter_next): Adjust.
7183 (dw2_print_stats): Adjust.
7184 (dw2_expand_all_symtabs): Adjust.
7185 (dw2_expand_symtabs_with_fullname): Adjust.
7186 (dw2_expand_marked_cus): Adjust.
7187 (dw_expand_symtabs_matching_file_matcher): Adjust.
7188 (dw2_map_symbol_filenames): Adjust.
7189 (dw2_debug_names_iterator::next): Adjust.
7190 (dwarf2_initialize_objfile): Adjust.
7191 (set_partial_user): Adjust.
7192 (dwarf2_build_psymtabs_hard): Adjust.
7194 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7196 * dwarf2read.c (create_signatured_type_table_from_debug_names):
7197 Remove unused variables.
7198 (dw2_map_symtabs_matching_filename): Likewise.
7199 (dwarf2_record_block_ranges): Likewise.
7200 (dwarf2_read_addr_index): Likewise.
7201 (follow_die_offset): Likewise.
7203 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7205 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7206 to symbol_file_add_main.
7208 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7211 * mi/mi-console.c (do_fputc_async_safe): New.
7212 (mi_console_file::write_async_safe): New.
7213 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7214 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7216 * ui-file.c (ui_file::putstrn): Adjust call to
7217 fputstrn_unfiltered.
7218 * utils.c (printchar): Replace do_fputs and do_fprintf
7219 parameters by do_fputc.
7220 (fputstr_filtered): Adjust call to printchar.
7221 (fputstr_unfiltered): Likewise.
7222 (fputstrn_filtered): Likewise.
7223 (fputstrn_unfiltered): Add do_fputc parameter, pass to
7225 * utils.h (do_fputc_ftype): New typedef.
7226 (fputstrn_unfiltered): Add do_fputc parameter.
7228 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7230 * regformats/i386/i386-avx.dat: Remove.
7232 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7235 * amd64-tdep.c (amd64_none_init_abi): New function.
7236 (amd64_x32_none_init_abi): New function.
7237 (_initialize_amd64_tdep): Register handlers for x86-64 and
7238 x64_32 with GDB_OSABI_NONE.
7239 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7240 GDB_OSABI_NONE osabi.
7242 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7245 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7247 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7248 * osabi.c (gdb_osabi_names): Add "unknown" entry.
7250 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7252 * common/byte-vector.h (char_vector): New type.
7253 * target.h (target_read_alloc): Return
7254 gdb::optional<byte_vector>.
7255 (target_read_stralloc): Return gdb::optional<char_vector>.
7256 (target_get_osdata): Return gdb::optional<char_vector>.
7257 * target.c (target_read_alloc_1): Templatize. Replacement
7258 manual memory management with vector.
7259 (target_read_alloc): Change return type, adjust.
7260 (target_read_stralloc): Change return type, adjust.
7261 (target_get_osdata): Change return type, adjust.
7262 * auxv.c (struct auxv_info) <length>: Remove.
7263 <data>: Change type to gdb::optional<byte_vector>.
7264 (auxv_inferior_data_cleanup): Free auxv_info with delete.
7265 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7266 (target_auxv_search): Adjust.
7267 (fprint_target_auxv): Adjust.
7268 * avr-tdep.c (avr_io_reg_read_command): Adjust.
7269 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7270 (linux_make_corefile_notes): Adjust.
7271 * osdata.c (get_osdata): Adjust.
7272 * remote.c (remote_get_threads_with_qxfer): Adjust.
7273 (remote_memory_map): Adjust.
7274 (remote_traceframe_info): Adjust.
7275 (btrace_read_config): Adjust.
7276 (remote_read_btrace): Adjust.
7277 (remote_pid_to_exec_file): Adjust.
7278 * solib-aix.c (solib_aix_get_library_list): Adjust.
7279 * solib-dsbt.c (decode_loadmap): Don't free buf.
7280 (dsbt_get_initial_loadmaps): Adjust.
7281 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7282 * solib-target.c (solib_target_current_sos): Adjust.
7283 * tracepoint.c (sdata_make_value): Adjust.
7284 * xml-support.c (xinclude_start_include): Adjust.
7285 (xml_fetch_content_from_file): Adjust.
7286 * xml-support.h (xml_fetch_another): Change return type.
7287 (xml_fetch_content_from_file): Change return type.
7288 * xml-syscall.c (xml_init_syscalls_info): Adjust.
7289 * xml-tdesc.c (file_read_description_xml): Adjust.
7290 (fetch_available_features_from_target): Change return type.
7291 (target_fetch_description_xml): Adjust.
7292 (target_read_description_xml): Adjust.
7294 2018-04-06 Tom Tromey <tom@tromey.com>
7296 * value.c (~value): Update.
7297 (struct value) <contents>: Now unique_xmalloc_ptr.
7298 (value_contents_bits_eq, allocate_value_contents)
7299 (value_contents_raw, value_contents_all_raw)
7300 (value_contents_for_printing, value_contents_for_printing_const)
7301 (set_value_enclosing_type): Update.
7303 2018-04-06 Tom Tromey <tom@tromey.com>
7305 * value.c (range_s): Remove typedef, VEC.
7306 (struct range): Add operator<.
7307 (range_lessthan): Remove.
7308 (ranges_contain): Change type.
7310 (struct value) <unavailable, optimized_out>: Now std::vector.
7311 (value_entirely_available)
7312 (value_entirely_covered_by_range_vector)
7313 (value_entirely_unavailable, value_entirely_optimized_out):
7315 (insert_into_bit_range_vector): Change argument type.
7316 (find_first_range_overlap): Likewise.
7317 (struct ranges_and_idx, value_contents_bits_eq)
7318 (require_not_optimized_out, require_available): Update.
7319 (ranges_copy_adjusted): Change argument types.
7320 (value_optimized_out, value_copy, value_fetch_lazy): Update.
7322 2018-04-06 Tom Tromey <tom@tromey.com>
7324 * value.c (~value): Update.
7325 (struct value) <parent>: Now a value_ref_ptr.
7326 (value_parent, set_value_parent, value_address, value_copy):
7329 2018-04-06 Tom Tromey <tom@tromey.com>
7331 * value.c (struct value): Add constructor, destructor, and member
7333 (allocate_value_lazy, value_decref): Update.
7335 2018-04-06 Tom Tromey <tom@tromey.com>
7337 * value.c (struct value) <released, next>: Remove.
7338 (all_values): Now a std::vector.
7339 (allocate_value_lazy): Update.
7340 (value_next): Remove.
7341 (value_mark, value_free_to_mark, release_value)
7342 (value_release_to_mark): Update.
7344 2018-04-06 Tom Tromey <tom@tromey.com>
7346 * value.h (fetch_subexp_value, value_release_to_mark): Update.
7347 (free_value_chain): Remove.
7348 * value.c (free_value_chain): Remove.
7349 (value_release_to_mark): Return a std::vector.
7350 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7352 (check_condition): Update.
7353 * eval.c (fetch_subexp_value): Change "val_chain" to a
7355 * breakpoint.c (update_watchpoint): Update.
7356 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7358 2018-04-06 Tom Tromey <tom@tromey.com>
7360 * value.h (free_all_values): Remove.
7361 * value.c (free_all_values): Remove.
7363 2018-04-06 Tom Tromey <tom@tromey.com>
7365 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7366 (value_history_chain, value_history_count): Remove.
7367 (value_history): New global.
7368 (record_latest_value, access_value_history, show_values)
7369 (preserve_values): Update.
7371 2018-04-06 Tom Tromey <tom@tromey.com>
7373 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7374 * varobj.c (varobj_set_display_format, varobj_set_value)
7375 (install_default_visualizer, construct_visualizer)
7376 (install_new_value, ~varobj, varobj_get_value_type)
7377 (my_value_of_variable, varobj_editable_p): Update.
7378 * c-varobj.c (c_describe_child, c_value_of_variable)
7379 (cplus_number_of_children, cplus_describe_child): Update.
7380 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7381 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7382 (ada_value_of_variable, ada_value_is_changeable_p): Update.
7384 2018-04-06 Tom Tromey <tom@tromey.com>
7386 * printcmd.c (last_examine_address): Change type to
7388 (do_examine, x_command): Update.
7390 2018-04-06 Tom Tromey <tom@tromey.com>
7392 * value.c (release_value): Update.
7393 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7394 (struct bpstats) <val>: Now a value_ref_ptr.
7395 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7396 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7397 (~watchpoint, print_it_watchpoint, watch_command_1)
7398 (invalidate_bp_value_on_memory_change): Update.
7400 2018-04-06 Tom Tromey <tom@tromey.com>
7402 * varobj.c (varobj_clear_saved_item)
7403 (update_dynamic_varobj_children, install_new_value, ~varobj):
7405 * value.h (value_incref): Move declaration earlier.
7406 (value_decref): Rename from value_free.
7407 (struct value_ref_policy): New.
7408 (value_ref_ptr): New typedef.
7409 (struct value_deleter): Remove.
7410 (gdb_value_up): Remove typedef.
7411 (release_value): Change return type.
7412 (release_value_or_incref): Remove.
7413 * value.c (set_value_parent): Update.
7414 (value_incref): Change return type.
7415 (value_decref): Rename from value_free.
7416 (value_free_to_mark, free_all_values, free_value_chain): Update.
7417 (release_value): Return value_ref_ptr.
7418 (release_value_or_incref): Remove.
7419 (record_latest_value, set_internalvar, clear_internalvar):
7421 * stack.c (info_frame_command): Don't call value_free.
7422 * python/py-value.c (valpy_dealloc, valpy_new)
7423 (value_to_value_object): Update.
7424 * printcmd.c (do_examine): Update.
7425 * opencl-lang.c (lval_func_free_closure): Update.
7426 * mi/mi-main.c (register_changed_p): Don't call value_free.
7427 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7428 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7429 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7431 * guile/scm-value.c (vlscm_free_value_smob)
7432 (vlscm_scm_from_value): Update.
7433 * frame.c (frame_register_unwind, frame_unwind_register_signed)
7434 (frame_unwind_register_unsigned, get_frame_register_bytes)
7435 (put_frame_register_bytes): Don't call value_free.
7436 * findvar.c (address_from_register): Don't call value_free.
7437 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7438 * dwarf2loc.c (entry_data_value_free_closure)
7439 (value_of_dwarf_reg_entry, free_pieced_value_closure)
7440 (dwarf2_evaluate_loc_desc_full): Update.
7441 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7442 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7443 (~watchpoint, watch_command_1)
7444 (invalidate_bp_value_on_memory_change): Update.
7445 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7447 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
7450 * warning.m4: Add -Wno-error=deprecated-register.
7451 * configure: Re-generate.
7453 2018-04-05 Tom Tromey <tom@tromey.com>
7455 * linespec.h: Remove include of "vec.h".
7457 2018-04-05 Tom Tromey <tom@tromey.com>
7459 * linespec.c (typep): Remove typedef.
7460 (find_methods, find_superclass_methods): Take a std::vector.
7461 (find_method): Use std::vector.
7463 2018-04-05 Tom Tromey <tom@tromey.com>
7465 * utils.c (compare_strings): Remove.
7466 * utils.h (compare_strings): Remove.
7467 * objc-lang.h (find_imps): Update.
7468 * objc-lang.c (find_methods): Take a std::vector.
7469 (uniquify_strings, find_imps): Likewise.
7470 * linespec.c (find_methods): Take a std::vector.
7471 (decode_objc): Use std::vector.
7472 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7474 (find_method, find_function_symbols): Use std::vector.
7476 2018-04-05 Tom Tromey <tom@tromey.com>
7478 * completer.c (completion_tracker::completion_tracker): Remove
7480 (completion_tracker::discard_completions): Likewise.
7481 * breakpoint.c (ambiguous_names_p): Remove cast.
7482 * ada-lang.c (_initialize_ada_language): Remove cast.
7483 * utils.h (streq): Update.
7484 (streq_hash): Add new declaration.
7485 * utils.c (streq): Return bool.
7486 (streq_hash): New function.
7488 2018-04-05 Tom Tromey <tom@tromey.com>
7490 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7491 Remove a string copy.
7493 2018-04-05 Tom Tromey <tom@tromey.com>
7495 * linespec.c (filter_results): Use std::vector.
7496 (decode_line_2, decode_line_full): Update.
7498 2018-04-05 Tom Tromey <tom@tromey.com>
7500 * linespec.c (canonical_to_fullform): Return std::string.
7501 (filter_results): Update.
7502 (struct decode_line_2_item): Add constructor.
7503 <fullform, displayform>: Now std::string.
7504 (decode_line_2_compare_items): Now a std::sort comparator.
7505 (decode_line_2): Update.
7507 2018-04-05 Tom Tromey <tom@tromey.com>
7509 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7510 (unexpected_linespec_error): Update.
7511 (linespec_parse_basic, parse_linespec): Update.
7513 2018-04-05 Tom Tromey <tom@tromey.com>
7515 * linespec.c (linespec_parse_basic): Reindent.
7517 2018-04-05 Tom Tromey <tom@tromey.com>
7519 * minsyms.h (iterate_over_minimal_symbols): Update.
7520 * minsyms.c (iterate_over_minimal_symbols): Take a
7522 * linespec.c (struct collect_minsyms): Remove.
7523 (compare_msyms): Now a std::sort comparator.
7524 (add_minsym): Add parameters.
7525 (search_minsyms_for_name): Update. Use std::vector.
7527 2018-04-03 Tom Tromey <tom@tromey.com>
7529 * mipsread.c (read_alphacoff_dynamic_symtab): Use
7532 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7534 * MAINTAINERS (Write After Approval): Add Weimin Pan.
7536 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7539 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
7540 printing static type.
7542 2018-04-01 Tom Tromey <tom@tromey.com>
7544 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
7545 (rs6000_xfer_shared_libraries): Update.
7547 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
7549 * common/gdb_vecs.h (char_ptr): Remove.
7550 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
7552 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7554 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
7556 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
7558 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7560 * tracepoint.h (struct uploaded_tp): Initialize fields.
7561 <actions, step_actions, cmd_strings>: Change type to
7562 std::vector<char *>.
7563 * tracepoint.c (get_uploaded_tp): Allocate with new.
7564 (free_uploaded_tps): Free with delete.
7565 (parse_tracepoint_definition): Adjust to std::vector change.
7566 * breakpoint.c (read_uploaded_action): Likewise.
7567 (create_tracepoint_from_upload): Likewise.
7568 * ctf.c (ctf_write_uploaded_tp): Likewise.
7569 (SET_ARRAY_FIELD): Likewise.
7570 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
7572 2018-03-30 Tom Tromey <tom@tromey.com>
7574 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
7576 (svr4_keep_data_in_core): Update.
7577 (svr4_read_so_list): Update.
7579 2018-03-30 Tom Tromey <tom@tromey.com>
7581 * windows-nat.c (handle_output_debug_string, handle_exception):
7583 * target.h (target_read_string): Update.
7584 * target.c (target_read_string): Change "string" to
7586 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
7588 * solib-frv.c (frv_current_sos): Update.
7589 * solib-dsbt.c (dsbt_current_sos): Update.
7590 * solib-darwin.c (darwin_current_sos): Update.
7591 * linux-thread-db.c (inferior_has_bug): Update.
7592 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
7593 Update. Remove alloca.
7594 * ada-lang.c (ada_main_name): Update.
7596 2018-03-30 Tom Tromey <tom@tromey.com>
7598 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
7599 (struct dwo_file_deleter): New.
7600 (dwo_file_up): New typedef.
7601 (open_and_init_dwo_file): Use dwo_file_up.
7602 (free_dwo_file_cleanup): Remove.
7604 2018-03-30 Tom Tromey <tom@tromey.com>
7606 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
7607 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
7609 2018-03-30 Tom Tromey <tom@tromey.com>
7611 * dwarf2read.c (class free_cached_comp_units): New class.
7612 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
7613 (free_cached_comp_units): Remove function.
7615 2018-03-30 Tom Tromey <tom@tromey.com>
7617 * utils.h (make_cleanup_unpush_target): Remove.
7618 * inf-ptrace.c (struct target_unpusher): New.
7619 (target_unpush_up) New typedef.
7620 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
7622 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
7624 2018-03-27 Tom Tromey <tom@tromey.com>
7626 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
7628 2018-03-27 Pedro Alves <palves@redhat.com>
7629 Tom Tromey <tom@tromey.com>
7631 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
7632 destructor. Now a class.
7633 (gdb_readline_wrapper_cleanup): Remove function.
7634 (gdb_readline_wrapper): Remove cleanups.
7636 2018-03-27 Tom Tromey <tom@tromey.com>
7638 * typeprint.h (struct type_print_options) <local_typedefs,
7639 global_typedefs>: Remove "struct" keyword.
7640 (class typedef_hash_table): New class.
7641 (recursively_update_typedef_hash, add_template_parameters)
7642 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
7643 (find_typedef_in_hash): Don't declare.
7644 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
7645 (typedef_hash_table::recursively_update): Rename from
7646 recursively_update_typedef_hash. Now a member.
7647 (typedef_hash_table::add_template_parameters): Rename from
7648 add_template_parameters. Now a member.
7649 (typedef_hash_table::typedef_hash_table): Now a constructor;
7650 rename from create_typedef_hash.
7651 (typedef_hash_table::~typedef_hash_table): Now a destructor;
7652 rename from free_typedef_hash.
7653 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
7654 (do_free_global_table): Remove.
7655 (typedef_hash_table::typedef_hash_table): New constructor; renamed
7656 from copy_type_recursive.
7657 (create_global_typedef_table): Remove.
7658 (typedef_hash_table::find_global_typedef): Now a member of
7660 (typedef_hash_table::find_typedef): Rename from
7661 find_typedef_in_hash; now a member.
7662 (whatis_exp): Update.
7663 * extension.h (struct ext_lang_type_printers): Add constructor and
7665 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
7667 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
7668 Now a constructor; rename from start_ext_lang_type_printers.
7669 (ext_lang_type_printers): Now a destructor; rename from
7670 free_ext_lang_type_printers.
7671 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
7673 (c_type_print_base_struct_union): Update. Remove cleanups.
7675 2018-03-27 Tom Tromey <tom@tromey.com>
7677 * dwarf-index-write.c: Include <cmath>.
7679 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7681 * NEWS: Add entry describing new "set|show varsize-limit" command.
7682 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
7684 * printcmd.c (_initialize_printcmd): Add "set var" alias of
7687 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
7689 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
7691 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
7692 * dwarf-index-common.c: New file.
7693 * dwarf-index-common.h: New file.
7694 * dwarf-index-write.c: New file.
7695 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
7696 (struct dwarf2_section_info): Move from here.
7697 (dwarf2_section_info_def): Likewise.
7698 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
7699 (offset_type): Likewise.
7700 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
7701 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
7702 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
7703 (byte_swap): Likewise.
7704 (MAYBE_SWAP): Likewise.
7705 (dwarf2_per_cu_ptr): Likewise.
7706 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
7707 (struct tu_stats): Likewise.
7708 (struct dwarf2_per_objfile): Likewise.
7709 (struct dwarf2_per_cu_data): Likewise.
7710 (struct signatured_type): Likewise.
7711 (sig_type_ptr): Likewise.
7712 (DEF_VEC_P (sig_type_ptr)): Likewise.
7713 (INDEX4_SUFFIX): Likewise.
7714 (INDEX5_SUFFIX): Likewise.
7715 (DEBUG_STR_SUFFIX): Likewise.
7716 (dwarf2_read_section): Make non-static.
7717 (mapped_index_string_hash): Move from here.
7718 (dwarf5_djb_hash): Likewise.
7719 (file_write): Likewise.
7720 (class data_buf): Likewise.
7721 (struct symtab_index_entry): Likewise.
7722 (struct mapped_symtab): Likewise.
7723 (find_slot): Likewise.
7724 (hash_expand): Likewise.
7725 (add_index_entry): Likewise.
7726 (uniquify_cu_indices): Likewise.
7727 (class c_str_view): Likewise.
7728 (class c_str_view_hasher): Likewise.
7729 (class vector_hasher): Likewise.
7730 (write_hash_table): Likewise.
7731 (psym_index_map): Likewise.
7732 (struct addrmap_index_data): Likewise.
7733 (add_address_entry): Likewise.
7734 (add_address_entry_worker): Likewise.
7735 (write_address_map): Likewise.
7736 (symbol_kind): Likewise.
7737 (write_psymbols): Likewise.
7738 (struct signatured_type_index_data): Likewise.
7739 (write_one_signatured_type): Likewise.
7740 (recursively_count_psymbols): Likewise.
7741 (recursively_write_psymbols): Likewise.
7742 (class debug_names): Likewise.
7743 (check_dwarf64_offsets): Likewise.
7744 (psyms_seen_size): Likewise.
7745 (write_gdbindex): Likewise.
7746 (write_debug_names): Likewise.
7747 (assert_file_size): Likewise.
7748 (write_psymtabs_to_index): Likewise.
7749 (save_gdb_index_command): Likewise.
7750 (_initialize_dwarf2_read): Don't register the "save gdb-index"
7752 * dwarf2read.h: New file.
7754 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7757 * dwarf2read.c (dwarf2_physname): Do not return the demangled
7758 symbol name if the CU's language stores symbol names in linkage
7760 * language.h (struct language_defn)
7761 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
7762 all instances of this struct.
7764 2018-03-26 Tom Tromey <tom@tromey.com>
7766 * stack.c (backtrace_command_1): Remove verbose code.
7768 2018-03-26 Tom Tromey <tom@tromey.com>
7770 * python/py-framefilter.c (py_print_type): Don't catch
7771 exceptions. Return void.
7772 (py_print_value): Likewise.
7773 (py_print_single_arg): Likewise.
7774 (enumerate_args): Don't catch exceptions.
7775 (py_print_args): Likewise.
7776 (py_print_frame): Likewise.
7777 (gdbpy_apply_frame_filter): Catch exceptions here.
7779 2018-03-26 Tom Tromey <tom@tromey.com>
7781 * stack.c (_initialize_stack): Remove trailing newlines from help
7782 text. Add "Usage" line to "backtrace" help.
7784 2018-03-26 Tom Tromey <tom@tromey.com>
7787 * python/py-framefilter.c (py_print_args): Call wrap_hint.
7789 2018-03-26 Tom Tromey <tom@tromey.com>
7791 * python/py-framefilter.c (py_print_single_arg): Return
7792 EXT_LANG_BT_ERROR from catch.
7794 2018-03-26 Tom Tromey <tom@tromey.com>
7797 * stack.c (backtrace_command_1): Move some code into no-filters
7800 2018-03-26 Tom Tromey <tom@tromey.com>
7802 * python/py-framefilter.c (throw_quit_or_print_exception): New
7804 (gdbpy_apply_frame_filter): Use it.
7806 2018-03-26 Tom Tromey <tom@tromey.com>
7809 * python/py-framefilter.c (py_print_type, py_print_value)
7810 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
7813 2018-03-26 Tom Tromey <tom@tromey.com>
7815 * python/py-framefilter.c (enumerate_args): Use
7816 gdb::unique_xmalloc_ptr.
7818 2018-03-26 Tom Tromey <tom@tromey.com>
7820 * python/py-framefilter.c (py_print_frame): Return
7822 (gdbpy_apply_frame_filter): Update comment.
7823 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
7825 <EXT_LANG_BT_NO_FILTERS>: Change value.
7827 2018-03-26 Tom Tromey <tom@tromey.com>
7830 * stack.c (backtrace_command): Parse "hide" argument.
7831 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
7832 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
7835 2018-03-26 Tom Tromey <tom@tromey.com>
7837 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
7839 (backtrace_command): Remove "fulltrace", add "flags".
7841 2018-03-26 Tom Tromey <tom@tromey.com>
7843 * stack.c (backtrace_command): Rewrite command line parsing.
7845 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7847 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
7849 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7851 * filename-seen-cache.h: Add include guard.
7853 2018-03-26 Keith Seitz <keiths@redhat.com>
7855 * symfile.c (place_section): Remove "struct" from section_addr_info
7857 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
7858 "struct" keyword from section_addr_info.
7860 2018-03-26 Alan Hayward <alan.hayward@arm.com>
7862 * regformats/regdef.h (reg): Add constructors.
7864 2018-03-25 Pedro Alves <palves@redhat.com>
7866 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
7867 if then/else bodies in var_func_name extraction.
7869 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
7871 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
7872 lookup_minimal_symbol() to find symbol entry.
7873 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
7875 2018-03-23 Keith Seitz <keiths@redhat.com>
7878 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
7879 nested type definitions for C++, too.
7881 2018-03-23 Tom Tromey <tom@tromey.com>
7883 * machoread.c (struct oso_el): Add a constructor. Don't define as
7885 (macho_register_oso): Remove.
7886 (macho_symtab_read): Take a std::vector.
7887 (oso_el_compare_name): Now a std::sort comparator.
7888 (macho_symfile_read_all_oso): Take a std::vector.
7889 (macho_symfile_read): Use std::vector. Remove cleanups.
7891 2018-03-22 Tom Tromey <tom@tromey.com>
7893 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
7894 (record_full_goto_bookmark): Use std::string.
7896 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7899 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
7902 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7904 * rs6000-tdep.c (store_insn_p): New function.
7905 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
7906 and cr_reg to their unshifted values. Use store_insn_p to
7907 match LR saves using either R1 or fdata->alloca_reg. Use
7908 store_insn_p to match CR saves. Set alloca_reg_offset
7909 when alloca_reg and framep are set. Remove lr_reg shift
7910 when assigning to fdata->lr_register.
7912 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
7914 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
7915 command line args instead of emitting a warning.
7917 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7919 * tracepoint.h (struct static_tracepoint_marker): Initialize
7920 fields, define default constructor, move constructor and move
7921 assignment, disable the rest.
7922 <str_id, extra>: Make std::string.
7923 (release_static_tracepoint_marker): Remove.
7924 (free_current_marker): Remove.
7925 * tracepoint.c (free_current_marker): Remove.
7926 (parse_static_tracepoint_marker_definition): Adjust to
7927 std::string, use new hex2str overload.
7928 (release_static_tracepoint_marker): Remove.
7929 (print_one_static_tracepoint_marker): Get marker by reference
7930 and adjust to std::string.
7931 (info_static_tracepoint_markers_command): Adjust to std::vector
7933 * target.h (static_tracepoint_marker_p): Remove typedef.
7934 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
7935 (struct target_ops) <to_static_tracepoint_marker_at>: Return
7937 <to_static_tracepoint_markers_by_strid>: Return std::vector.
7939 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
7940 (target_debug_print_std_vector_static_tracepoint_marker): New.
7941 (target_debug_print_struct_static_tracepoint_marker_p): Rename
7943 (target_debug_print_static_tracepoint_marker_p): ... this.
7944 * target-delegates.c: Re-generate.
7945 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
7947 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
7948 (decode_static_tracepoint_spec): Adjust to std::vector.
7949 (tracepoint_print_one_detail): Adjust to std::string.
7950 (strace_marker_decode_location): Adjust to std::string.
7951 (update_static_tracepoint): Adjust to std::string, remove call
7952 to release_static_tracepoint_marker.
7953 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
7954 Adjust to std::vector.
7955 * remote.c (remote_static_tracepoint_marker_at): Return bool.
7956 (remote_static_tracepoint_markers_by_strid): Adjust to
7958 * common/rsp-low.h (hex2str): New overload with explicit count
7960 * common/rsp-low.c (hex2str): New overload with explicit count
7962 * unittests/rsp-low-selftests.c (test_hex2str): New function.
7963 (_initialize_rsp_low_selftests): Add test_hex2str test.
7964 * unittests/tracepoint-selftests.c
7965 (test_parse_static_tracepoint_marker_definition): Adjust to
7968 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7970 * tracepoint.c (parse_static_tracepoint_marker_definition):
7971 Consider case where the definition is followed by more
7973 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7974 tracepoint-selftests.c.
7975 * unittests/tracepoint-selftests.c: New.
7977 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7979 * MAINTAINERS (Write After Approval): Add Pedro Franco de
7982 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7984 * symtab.c (find_pc_sect_line): fixed indentation.
7986 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7988 * symtab.c (find_pc_sect_line): now uses binary search.
7990 2018-03-19 Tom Tromey <tom@tromey.com>
7992 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
7995 2018-03-19 Pedro Alves <palves@redhat.com>
7996 Tom Tromey <tom@tromey.com>
7998 * unittests/observable-selftests.c: New file.
7999 * common/observable.h: New file.
8000 * observable.h: New file.
8001 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8002 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8003 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8004 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8005 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8006 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8007 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8008 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8009 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8010 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8011 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8012 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8013 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8014 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8015 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8016 tui/tui-interp.c, valops.c: Update all users.
8017 * tui/tui-hooks.c (tui_bp_created_observer)
8018 (tui_bp_deleted_observer, tui_bp_modified_observer)
8019 (tui_inferior_exit_observer, tui_before_prompt_observer)
8020 (tui_normal_stop_observer, tui_register_changed_observer):
8022 (tui_observers_token): New global.
8023 (attach_or_detach, tui_attach_detach_observers): New functions.
8024 (tui_install_hooks, tui_remove_hooks): Use
8025 tui_attach_detach_observers.
8026 * record-btrace.c (record_btrace_thread_observer): Remove.
8027 (record_btrace_thread_observer_token): New global.
8028 * observer.sh: Remove.
8029 * observer.c: Rename to observable.c.
8030 * observable.c (namespace gdb_observers): Define new objects.
8031 (observer_debug): Move into gdb_observers namespace.
8032 (struct observer, struct observer_list, xalloc_observer_list_node)
8033 (xfree_observer_list_node, generic_observer_attach)
8034 (generic_observer_detach, generic_observer_notify): Remove.
8035 (_initialize_observer): Update.
8036 Don't include observer.inc.
8037 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8038 (clean mostlyclean): Likewise.
8039 (observer.h, observer.inc): Remove targets.
8040 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8041 (COMMON_SFILES): Use observable.c, not observer.c.
8042 * .gitignore: Remove observer.h.
8044 2018-03-18 Tom Tromey <tom@tromey.com>
8046 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8048 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8050 2018-03-17 Tom Tromey <tom@tromey.com>
8052 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8054 2018-03-17 Tom Tromey <tom@tromey.com>
8056 * target.c (class scoped_target_fd): New.
8057 (target_fileio_close_cleanup): Remove.
8058 (target_fileio_read_alloc_1): Use scoped_target_fd.
8060 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8062 * silent-rules.mk: New.
8063 * Makefile.in: Include silent-rules.mk
8064 (srcdir, VPATH, top_srcdir): Move up.
8065 (COMPILE): Add ECHO_CXX.
8066 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8067 (init.c): Add ECHO_INIT_C.
8068 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8069 (version.c): Add ECHO_GEN.
8070 (printcmd.o): Add ECHO_CXX.
8071 (target-float.o): Add ECHO_CXX.
8072 (ada-exp.o): Add ECHO_CXX.
8073 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8074 (insight$(EXEEXT)): Add ECHO_CXXLD.
8075 * gnulib/configure.ac: Add AM_SILENT_RULES.
8076 * gnulib/aclocal.m4: Re-generate.
8077 * gnulib/configure: Re-generate.
8078 * gnulib/import/Makefile.in: Re-generate.
8080 2018-03-16 Tom Tromey <tom@tromey.com>
8082 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8083 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8084 * utils.c (do_free_section_addr_info)
8085 (make_cleanup_free_section_addr_info): Remove.
8086 * symfile.h (struct other_sections): Add constructor.
8087 (struct section_addr_info): Remove.
8088 (section_addr_info): New typedef.
8089 (struct sym_fns) <sym_offsets>: Change type of parameter.
8090 (build_section_addr_info_from_objfile)
8091 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8092 (default_symfile_offsets, symbol_file_add)
8093 (symbol_file_add_from_bfd)
8094 (build_section_addr_info_from_section_table): Update.
8095 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8096 * symfile.c (alloc_section_addr_info): Remove.
8097 (build_section_addr_info_from_section_table): Change return type.
8099 (build_section_addr_info_from_bfd)
8100 (build_section_addr_info_from_objfile): Likewise.
8101 (free_section_addr_info): Remove.
8102 (relative_addr_info_to_section_offsets): Change type of "addrs".
8103 (addrs_section_compar): Now a std::sort comparator.
8104 (addrs_section_sort): Change return type.
8105 (addr_info_make_relative): Change type of "addrs". Update.
8106 (default_symfile_offsets, syms_from_objfile_1)
8107 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8108 (symbol_file_add_separate): Update.
8109 (symbol_file_add): Change type of "addrs". Update.
8110 (add_symbol_file_command): Update. Remove cleanups.
8111 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8113 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8114 * solib.c (solib_read_symbols): Update.
8115 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8116 * machoread.c (macho_symfile_offsets): Update.
8117 * jit.c (jit_bfd_try_read_symtab): Update.
8119 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8121 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8122 unittests/utils-selftests.c.
8123 * unittests/utils-selftests.c: New file.
8125 2018-03-14 Tom Tromey <tom@tromey.com>
8128 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8131 2018-03-14 Tom Tromey <tom@tromey.com>
8134 * printcmd.c (printf_pointer): Allow "-" in format.
8136 2018-03-14 Tom Tromey <tom@tromey.com>
8138 * printcmd.c (_initialize_printcmd): Add usage to printf.
8140 2018-03-14 Yao Qi <qiyao@sourceware.org>
8142 * MAINTAINERS: Update my email address.
8144 2018-03-13 Tom Tromey <tom@tromey.com>
8146 * machoread.c (macho_check_dsym): Change filenamep to a
8148 (macho_symfile_read): Update.
8149 * symfile.c (load_command): Use std::string.
8151 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
8153 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8154 to error message string.
8155 (riscv_register_name): Use xsnprintf instead of sprintf.
8156 (riscv_insn::fetch_instruction): Use gdb_assert instead of
8158 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8160 (riscv_push_dummy_call): Likewise.
8162 2018-03-12 Tom Tromey <tom@tromey.com>
8164 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8165 Use gdb::byte_vector.
8166 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8168 2018-03-12 Yao Qi <yao.qi@linaro.org>
8170 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8171 parameter type to readable_regcache.
8172 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8175 2018-03-11 Tom Tromey <tom@tromey.com>
8177 * dwarf2read.c (struct nextfield): Add initializers.
8178 (struct nextfnfield): Remove.
8179 (struct fnfieldlist): Add initializers. Remove "length" and
8180 "head", use std::vector.
8181 (struct decl_field_list): Remove.
8182 (struct field_info): Add initializers.
8183 <fields, baseclasses>: Now std::vector.
8184 <nbaseclasses, nfnfields, typedef_field_list_count,
8185 nested_types_list_count>: Remove.
8186 (dwarf2_add_field, dwarf2_add_type_defn)
8187 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8188 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8189 (process_structure_scope): Update.
8191 2018-03-11 Tom Tromey <tom@tromey.com>
8193 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8194 for use by std::sort.
8195 (build_type_psymtabs_1): Use std::vector.
8197 2018-03-09 Eli Zaretskii <eliz@gnu.org>
8199 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8200 and LIBMPFR in the printed configuration.
8202 2018-03-08 Tom Tromey <tom@tromey.com>
8204 * source.c (get_filename_and_charpos): Use scoped_fd.
8205 * nto-procfs.c (procfs_open_1): Use scoped_fd.
8206 (procfs_pidlist): Likewise.
8207 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8208 (iterate_over_mappings): Likewise.
8210 2018-03-08 Tom Tromey <tom@tromey.com>
8212 * infcall.c (struct call_return_meta_info)
8213 <stack_temporaries_enabled>: Remove.
8214 (get_call_return_value, call_function_by_hand_dummy): Update.
8215 * thread.c (disable_thread_stack_temporaries): Remove.
8216 (enable_thread_stack_temporaries): Remove.
8217 (thread_stack_temporaries_enabled_p): Return bool.
8218 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8219 (get_last_thread_stack_temporary): Update.
8220 * eval.c (evaluate_subexp): Update.
8221 * gdbthread.h (class enable_thread_stack_temporaries): Now a
8222 class, not a function.
8223 (value_ptr, value_vec): Remove typedefs.
8224 (class thread_info) <stack_temporaries_enabled>: Now bool.
8225 <stack_temporaries>: Now a std::vector.
8226 (thread_stack_temporaries_enabled_p)
8227 (value_in_thread_stack_temporaries): Return bool.
8229 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
8231 * remote.c (putpkt_binary): Fix omitted bytes reporting.
8232 (getpkt_or_notif_sane_1): Likewise.
8234 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8236 * build-id.c (build_id_to_debug_bfd): Use std::string.
8238 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8240 * build-id.c (find_separate_debug_file_by_buildid): Return
8242 * build-id.h (find_separate_debug_file_by_buildid): Return
8244 * coffread.c (coff_symfile_read): Adjust to std::string.
8245 * elfread.c (elf_symfile_read): Adjust to std::string.
8246 * symfile.c (separate_debug_file_exists): Change parameter to
8248 (find_separate_debug_file): Return std::string.
8249 (find_separate_debug_file_by_debuglink): Return std::string.
8250 * symfile.h (find_separate_debug_file_by_debuglink): Return
8253 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8255 * common/xml-utils.c (xml_escape_text): Move code to...
8256 (xml_escape_text_append): ... this new function.
8257 * common/xml-utils.h (xml_escape_text_append): New declaration.
8258 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8260 (_initialize_xml_utils): register test_xml_escape_text_append as
8263 2018-03-07 Alan Hayward <alan.hayward@arm.com>
8265 * defs.h: Remove MAX_REGISTER_SIZE.
8266 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8268 * python/py-unwind.c (pyuw_sniffer): Likewise.
8270 2018-03-07 Tom Tromey <tom@tromey.com>
8272 * linux-tdep.c (linux_info_proc): Update.
8273 * target.h (struct target_ops) <to_fileio_readlink>: Return
8275 (target_fileio_readlink): Return optional<string>.
8276 * remote.c (remote_hostio_readlink): Return optional<string>.
8277 * inf-child.c (inf_child_fileio_readlink): Return
8279 * target.c (target_fileio_readlink): Return optional<string>.
8281 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
8283 * regcache.c (cooked_read_test): Add riscv to the list of
8284 architectures that have a save_reggroup.
8286 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
8288 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8289 value is not a dynamic class object.
8291 2018-03-06 Tom Tromey <tom@tromey.com>
8293 * rust-exp.y: Formatting fixes.
8295 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8297 * riscv-tdep.c (riscv_register_name): Remove target description
8299 (riscv_gdbarch_init): Remove target description check.
8301 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8303 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8305 * riscv-tdep.h: Likewise.
8307 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8309 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8310 (riscv_pseudo_register_write): Delete.
8311 (riscv_gdbarch_init): Remove all use of pseudo registers.
8313 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8315 * record-btrace.c (btrace_print_lines): Replace cleanup
8316 parameter with RAII equivalents.
8317 (btrace_insn_history): Replace cleanup with RAII equivalents.
8318 * ui-out.h (make_cleanup_ui_out_list_begin_end,
8319 make_cleanup_ui_out_tuple_begin_end): Remove.
8320 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8321 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8322 make_cleanup_ui_out_list_begin_end): Remove.
8324 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8326 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8327 parameter types to std::vector. Use bool.
8328 (record_btrace_wait): Replace VEC(tp_t) with
8329 std::vector<thread_info *>.
8330 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8332 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8334 * record-btrace.c (record_btrace_disable_callback): Remove.
8335 (struct scoped_btrace_disable): New.
8336 (record_btrace_open): Use scoped_btrace_disable.
8338 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8340 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8341 reading values from registers.
8343 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8345 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8348 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8350 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8351 change parameter type. Use GDB's print functions, and use
8352 core_addr_to_string where appropriate.
8353 (riscv_push_dummy_call): Use core_addr_to_string where
8354 appropriate, update call to riscv_print_arg_location, and reindent
8356 (riscv_return_value): Update call to riscv_print_arg_location.
8358 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8359 Tim Newsome <tim@sifive.com>
8360 Albert Ou <a0u@eecs.berkeley.edu>
8361 Darius Rad <darius@bluespec.com>
8363 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8364 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8365 (ALLDEPFILES): Add riscv-tdep.c
8366 * configure.tgt: Add riscv support.
8367 * riscv-tdep.c: New file.
8368 * riscv-tdep.h: New file.
8369 * NEWS: Mention new target.
8370 * MAINTAINERS: Add entry for riscv.
8372 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8374 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8375 fields within aggregates.
8377 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
8379 * record-btrace.c (btrace_print_lines): Change type of flags to
8380 gdb_disassembly_flags.
8382 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8384 * fbsd-nat.c: Include "inf-ptrace.h".
8385 (USE_SIGTRAP_SIGINFO): Conditionally define.
8386 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8387 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8388 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8390 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8392 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8394 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8395 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8396 "supports_stopped_by_hw_breakpoint" target methods.
8398 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8400 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8401 * fbsd-nat.c (debug_fbsd_nat): New variable.
8402 (show_fbsd_nat_debug): New function.
8403 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8404 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8406 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8408 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8409 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8411 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8412 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8415 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8417 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8418 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8420 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8422 * charset.c (struct charset_vector): New.
8423 (charsets): Change type to charset_vector.
8424 (find_charset_names): Adjust.
8426 (_initialize_charset): Adjust.
8428 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8430 * progspace.h (struct program_space) <deleted_solibs>: Change
8431 type to std::vector<std::string>.
8432 * progspace.c (clear_program_space_solib_cache): Adjust.
8433 * breakpoint.c (print_solib_event): Adjust.
8434 (check_status_catch_solib): Adjust.
8435 * solib.c (update_solib_list): Adjust.
8436 * ui-out.h (class ui_out) <field_string>: New overload.
8437 * ui-out.c (ui_out::field_string): New overload.
8439 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8441 * progspace.h (struct program_space): Add constructor and
8442 destructor, initialize fields.
8443 (add_program_space): Remove.
8444 * progspace.c (add_program_space): Rename to...
8445 (program_space::program_space): ... this.
8446 (release_program_space): Rename to...
8447 (program_space::~program_space): ... this.
8448 (delete_program_space): Use delete to delete program_space.
8449 (initialize_progspace): Use new to allocate program_space.
8450 * inferior.c (add_inferior_with_spaces): Likewise.
8451 (clone_inferior_command): Likewise.
8452 * infrun.c (follow_fork_inferior): Likewise.
8453 (handle_vfork_child_exec_or_exit): Likewise.
8455 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8457 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8458 (delim_string_to_char_ptr_vec): Return std::vector of
8459 gdb::unique_xmalloc_ptr.
8460 (dirnames_to_char_ptr_vec_append): Take std::vector of
8461 gdb::unique_xmalloc_ptr.
8462 (dirnames_to_char_ptr_vec): Return std::vector of
8463 gdb::unique_xmalloc_ptr.
8464 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8465 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8466 (delim_string_to_char_ptr_vec): Return an std::vector of
8467 gdb::unique_xmalloc_ptr, adjust the code.
8468 (dirnames_to_char_ptr_vec_append): Take an std::vector of
8469 gdb::unique_xmalloc_ptr, adjust the code.
8470 (dirnames_to_char_ptr_vec): Return an std::vector of
8471 gdb::unique_xmalloc_ptr, adjust the code.
8472 * auto-load.c (auto_load_safe_path_vec): Change type to
8473 std::vector of gdb::unique_xmalloc_ptr.
8474 (auto_load_expand_dir_vars): Return an std::vector of
8475 gdb::unique_xmalloc_ptr, adjust the code.
8476 (auto_load_safe_path_vec_update): Adjust.
8477 (filename_is_in_auto_load_safe_path_vec): Adjust.
8478 (auto_load_objfile_script_1): Adjust.
8479 * build-id.c (build_id_to_debug_bfd): Adjust.
8480 * linux-thread-db.c (thread_db_load_search): Adjust.
8481 * source.c (add_path): Adjust.
8483 * symfile.c (find_separate_debug_file): Adjust.
8484 * utils.c (do_free_char_ptr_vec): Remove.
8485 (make_cleanup_free_char_ptr_vec): Remove.
8487 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
8490 * common/pathstuff.c: Conditionally include "<windows.h>".
8492 2018-03-01 Georg Sauthoff <mail@georg.so>
8495 * gcore.in: Quote variables and switch interpreter to bash.
8497 2018-03-01 Tom Tromey <tom@tromey.com>
8499 * dwarf2read.c (alloc_discriminant_info): Fix default_index
8500 assertion. Add assertion for discriminant_index.
8501 (quirk_rust_enum): Use correct base type name in univariant case.
8503 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
8505 * record.c (get_call_history_modifiers): Return a
8507 (cmd_record_call_history): Adjust.
8508 * record-btrace.c (record_btrace_call_history): Adjust.
8509 (record_btrace_call_history_range): Adjust.
8510 (record_btrace_call_history_from): Adjust.
8511 * target-debug.h (target_debug_print_record_print_flags): New.
8512 * target-delegates.c: Re-generate.
8513 * target.c (target_call_history): Change flags type.
8514 (target_call_history_from): Likewise.
8515 (target_call_history_range): Likewise.
8516 * target.h (struct target_ops) <target_call_history>: Likewise.
8517 (target_call_history_from): Likewise.
8518 (target_call_history_range): Likewise.
8520 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8521 Simon Marchi <simon.marchi@polymtl.ca>
8523 * common/common-utils.c: Include "sys/stat.h".
8524 (is_regular_file): Move here from "source.c"; change return
8526 * common/common-utils.h (is_regular_file): New prototype.
8527 * common/pathstuff.c (contains_dir_separator): New function.
8528 * common/pathstuff.h (contains_dir_separator): New prototype.
8529 * source.c: Don't include "sys/stat.h".
8530 (is_regular_file): Move to "common/common-utils.c".
8532 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8534 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
8535 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
8536 * auto-load.c: Include "common/pathstuff.h".
8537 * common/common-def.h (current_directory): Move here.
8538 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
8540 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
8542 * common/pathstuff.c: New file.
8543 * common/pathstuff.h: New file.
8544 * compile/compile.c: Include "common/pathstuff.h".
8545 * defs.h (current_directory): Move to "common/common-defs.h".
8546 * dwarf2read.c: Include "common/pathstuff.h".
8548 * guile/scm-safe-call.c: Likewise.
8549 * linux-thread-db.c: Likewise.
8551 * nto-tdep.c: Likewise.
8552 * objfiles.c: Likewise.
8553 * source.c: Likewise.
8554 * symtab.c: Likewise.
8555 * utils.c: Include "common/pathstuff.h".
8556 (gdb_realpath): Move to "common/pathstuff.c".
8557 (gdb_realpath_keepfile): Likewise.
8558 (gdb_abspath): Likewise.
8559 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
8560 (gdb_realpath_keepfile): Likewise.
8561 (gdb_abspath): Likewise.
8563 2018-02-28 John Baldwin <jhb@FreeBSD.org>
8565 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
8566 wildcard process pid for super_resume for kernels with a
8569 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
8571 * compile/compile.c (get_args): Add additional comments
8572 explaining function.
8574 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
8575 Tom Tromey <tom@tromey.com>
8577 * target.h (memory_write_request_s): Remove typedef. Don't define
8579 (target_write_memory_blocks): Change argument to std::vector.
8580 (struct memory_write_request): Add constructor.
8581 * target-memory.c (compare_block_starting_address): Return bool.
8582 Change argument types.
8583 (claim_memory): Change arguments to use std::vector.
8584 (split_regular_and_flash_blocks, blocks_to_erase)
8585 (compute_garbled_blocks): Likewise.
8586 (cleanup_request_data, cleanup_write_requests_vector): Remove.
8587 (target_write_memory_blocks): Change argument to std::vector.
8588 * symfile.c (struct load_section_data): Add constructor and
8589 destructor. Use std::vector for "requests".
8590 (struct load_progress_data): Add initializers.
8591 (load_section_callback): Update. Use "new".
8592 (clear_memory_write_data): Remove.
8593 (generic_load): Update.
8595 2018-02-27 Alan Hayward <alan.hayward@arm.com>
8597 * arch/aarch64.h: Use common/tdesc.h.
8599 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8601 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
8602 architecture with a 64-bit ABI.
8604 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8606 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
8607 ahead of target description loading.
8609 2018-02-26 Tom Tromey <tom@tromey.com>
8611 * stack.c (backtrace_command_1): Update.
8612 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
8614 * python/py-framefilter.c (py_print_frame)
8615 (gdbpy_apply_frame_filter): Change type of "flags".
8616 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
8618 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
8619 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
8620 * extension.h (enum frame_filter_flag): Rename from
8622 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
8623 (apply_ext_lang_frame_filter): Change type of "flags".
8624 * extension.c (apply_ext_lang_frame_filter): Change type of
8626 * extension-priv.h (struct extension_language_ops)
8627 <apply_frame_filter>: Change type of "flags".
8629 2018-02-26 Tom Tromey <tom@tromey.com>
8632 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
8633 off-by-one in py_end computation.
8634 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
8636 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
8639 2018-02-26 Tom Tromey <tom@tromey.com>
8641 * dwarf2read.c (struct variant_field): New.
8642 (struct nextfield) <variant>: New field.
8643 (dwarf2_add_field): Handle DW_TAG_variant_part.
8644 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
8645 discriminated union.
8646 (read_structure_type): Handle DW_TAG_variant_part.
8647 (handle_struct_member_die): New function, extracted from
8648 process_structure_scope. Handle DW_TAG_variant.
8649 (process_structure_scope): Handle discriminated unions. Call
8650 handle_struct_member_die.
8652 2018-02-26 Tom Tromey <tom@tromey.com>
8654 * rust-lang.h (rust_last_path_segment): Declare.
8655 * rust-lang.c (rust_last_path_segment): Now public. Change
8657 (struct disr_info): Remove.
8658 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
8659 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
8660 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
8661 (rust_enum_p, rust_enum_variant): New function.
8662 (rust_underscore_fields): Remove "offset" parameter.
8663 (rust_print_enum): New function.
8664 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
8665 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
8666 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
8668 (rust_internal_print_type): New function, from rust_print_type.
8670 (rust_print_type): Call rust_internal_print_type.
8671 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
8672 Update enum handling.
8673 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
8674 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
8675 (rust_union_quirks): New functions.
8676 (process_full_comp_unit, process_full_type_unit): Call
8678 (process_structure_scope): Update rust_unions if necessary.
8680 2018-02-26 Tom Tromey <tom@tromey.com>
8682 * value.h (value_union_variant): Declare.
8683 * valops.c (value_union_variant): New function.
8684 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
8685 (struct discriminant_info): New.
8686 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
8688 (struct main_type) <flag_discriminated_union>: New field.
8690 2018-02-26 Tom Tromey <tom@tromey.com>
8692 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8693 unittests/unpack-selftests.c.
8694 * unittests/unpack-selftests.c: New file.
8695 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
8697 2018-02-26 Yao Qi <yao.qi@linaro.org>
8699 * dwarf2read.c (struct partial_die_info) <read>: New method.
8700 (read_partial_die): Remove the declaration.
8701 (load_partial_dies): Update.
8702 (partial_die_info::partial_die_info):
8703 (read_partial_die): Change it to partial_die_info::read.
8705 2018-02-26 Yao Qi <yao.qi@linaro.org>
8707 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
8708 (fixup_partial_die): Remove declaration.
8709 (scan_partial_symbols): Update.
8710 (partial_die_parent_scope): Likewise.
8711 (partial_die_full_name): Likewise.
8712 (fixup_partial_die): Change it to partial_die_info::fixup.
8714 2018-02-26 Yao Qi <yao.qi@linaro.org>
8716 * dwarf2read.c (read_partial_die): Update the declaration.
8717 (load_partial_dies): Caller update.
8718 (read_partial_die): Remove one argument abbrev_len.
8720 2018-02-26 Yao Qi <yao.qi@linaro.org>
8722 * dwarf2read.c (struct partial_die_info): Add ctor, delete
8723 assignment operator.
8724 (load_partial_dies): Use ctor and copy ctor.
8725 (read_partial_die): Update.
8726 (dwarf2_cu::find_partial_die): Use ctor.
8728 2018-02-26 Yao Qi <yao.qi@linaro.org>
8730 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
8731 (find_partial_die_in_comp_unit): Change it to
8732 dwarf2_cu::find_partial_die.
8733 (find_partial_die): Update.
8735 2018-02-26 Yao Qi <yao.qi@linaro.org>
8737 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
8740 2018-02-26 Yao Qi <yao.qi@linaro.org>
8742 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
8744 2018-02-26 Alan Hayward <alan.hayward@arm.com>
8746 * arch/amd64.h: Use common/tdesc.h.
8747 * arch/i386.c: Likewise.
8748 * arch/i386.h: Likewise.
8749 * arch/tic6x.c: Likewise.
8750 * arch/tdesc.h: Move file from here...
8751 * common/tdesc.h: ...to here.
8752 * features/aarch64-core.c: Regenerate.
8753 * features/aarch64-fpu.c: Regenerate.
8754 * features/i386/32bit-avx.c: Regenerate.
8755 * features/i386/32bit-avx512.c: Regenerate.
8756 * features/i386/32bit-core.c: Regenerate.
8757 * features/i386/32bit-linux.c: Regenerate.
8758 * features/i386/32bit-mpx.c: Regenerate.
8759 * features/i386/32bit-pkeys.c: Regenerate.
8760 * features/i386/32bit-sse.c: Regenerate.
8761 * features/i386/64bit-avx.c: Regenerate.
8762 * features/i386/64bit-avx512.c: Regenerate.
8763 * features/i386/64bit-core.c: Regenerate.
8764 * features/i386/64bit-linux.c: Regenerate.
8765 * features/i386/64bit-mpx.c: Regenerate.
8766 * features/i386/64bit-pkeys.c: Regenerate.
8767 * features/i386/64bit-segments.c: Regenerate.
8768 * features/i386/64bit-sse.c: Regenerate.
8769 * features/i386/x32-core.c: Regenerate.
8770 * features/tic6x-c6xp.c: Regenerate.
8771 * features/tic6x-core.c: Regenerate.
8772 * features/tic6x-gp.c: Regenerate.
8773 * target-descriptions.c: Use common/tdesc.h.
8774 * target-descriptions.h: Likewise.
8776 2018-02-24 Tom Tromey <tom@tromey.com>
8778 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
8779 (try_thread_db_load_from_dir, thread_db_load_search): Use
8781 (info_auto_load_libthread_db_compare): Return bool. Change
8783 (info_auto_load_libthread_db): Use std::vector, std::string.
8786 2018-02-24 Tom Tromey <tom@tromey.com>
8788 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
8790 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
8792 * gdbarch.c: Rebuild.
8793 * gdbarch.h: Rebuild.
8794 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
8795 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
8796 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
8799 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
8801 * gdbtypes.h (sect_offset): Change type to uint64_t.
8802 (sect_offset_str): New function.
8803 * dwarf2read.c (create_addrmap_from_aranges): Use
8805 (error_check_comp_unit_head): Likewise.
8806 (create_debug_type_hash_table): Likewise.
8807 (read_cutu_die_from_dwo): Likewise.
8808 (init_cutu_and_read_dies): Likewise.
8809 (init_cutu_and_read_dies_no_follow): Likewise.
8810 (process_psymtab_comp_unit_reader): Likewise.
8811 (partial_die_parent_scope): Likewise.
8812 (peek_die_abbrev): Likewise.
8813 (process_queue): Likewise.
8814 (dwarf2_physname): Likewise.
8815 (read_namespace_alias): Likewise.
8816 (read_import_statement): Likewise.
8817 (create_dwo_cu_reader): Likewise.
8818 (create_cus_hash_table): Likewise.
8819 (lookup_dwo_cutu): Likewise.
8820 (inherit_abstract_dies): Likewise.
8821 (read_func_scope): Likewise.
8822 (read_call_site_scope): Likewise.
8823 (dwarf2_add_member_fn): Likewise.
8824 (read_common_block): Likewise.
8825 (read_module_type): Likewise.
8826 (read_typedef): Likewise.
8827 (read_subrange_type): Likewise.
8828 (load_partial_dies): Likewise.
8829 (read_partial_die): Likewise.
8830 (find_partial_die): Likewise.
8831 (read_str_index): Likewise.
8832 (dwarf2_string_attr): Likewise.
8833 (build_error_marker_type): Likewise.
8834 (lookup_die_type): Likewise.
8835 (dump_die_shallow): Likewise.
8836 (follow_die_ref): Likewise.
8837 (dwarf2_fetch_die_loc_sect_off): Likewise.
8838 (dwarf2_fetch_constant_bytes): Likewise.
8839 (follow_die_sig): Likewise.
8840 (get_signatured_type): Likewise.
8841 (get_DW_AT_signature_type): Likewise.
8842 (dwarf2_find_containing_comp_unit): Likewise.
8843 (set_die_type): Likewise.
8845 2018-02-21 John Baldwin <jhb@FreeBSD.org>
8847 * arch/aarch64.c: Include "common-defs.h".
8848 * arch/amd64.c: Likewise.
8849 * arch/i386.c: Likewise.
8851 2018-02-21 Tom Tromey <tom@tromey.com>
8853 * value.h: (extract_field_op): Update.
8854 * eval.c (extract_field_op): Return a const char *.
8855 * expression.h (parse_expression_for_completion): Update.
8856 * completer.c (complete_expression): Update.
8857 (add_struct_fields): Make fieldname const.
8858 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
8859 (mark_completion_tag, parse_exp_in_context_1): Update.
8860 (parse_expression_for_completion): Change "name" to
8861 unique_xmalloc_ptr*.
8863 2018-02-21 Tom Tromey <tom@tromey.com>
8865 * infcall.c (call_function_by_hand_dummy): Use std::vector.
8867 2018-02-21 Yao Qi <yao.qi@linaro.org>
8869 * avr-tdep.c (avr_read_pc): Change parameter type to
8871 * gdbarch.sh (read_pc): Likewise.
8872 * gdbarch.c: Re-generated.
8873 * gdbarch.h: Re-generated.
8874 * hppa-tdep.c (hppa_read_pc): Change parameter type to
8876 * ia64-tdep.c (ia64_read_pc): Likewise.
8877 * mips-tdep.c (mips_read_pc): Likewise.
8878 * spu-tdep.c (spu_read_pc): Likewise.
8880 2018-02-21 Yao Qi <yao.qi@linaro.org>
8882 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
8883 * regcache-dump.c: New file.
8884 * regcache.c: Move register_dump to regcache-dump.c.
8885 (maintenance_print_registers): Likewise.
8886 (maintenance_print_raw_registers): Likewise.
8887 (maintenance_print_cooked_registers): Likewise.
8888 (maintenance_print_register_groups): Likewise.
8889 (maintenance_print_remote_registers): Likewise.
8890 (_initialize_regcache): Likewise.
8891 * regcache.h (register_dump): Moved from regcache.c.
8893 2018-02-21 Yao Qi <yao.qi@linaro.org>
8895 * regcache.c (regcache::regcache): Update.
8896 (regcache::invalidate): Move it to detached_regcache::invalidate.
8897 (get_thread_arch_aspace_regcache): Update.
8898 (regcache::raw_update): Update.
8899 (regcache::cooked_read): Remove some code.
8900 (regcache::cooked_read_value): Likewise.
8901 (regcache::raw_write): Remove assert on m_readonly_p.
8902 (regcache::raw_supply_integer): Move it to
8903 detached_regcache::raw_supply_integer.
8904 (regcache::raw_supply_zeroed): Likewise.
8905 * regcache.h (detached_regcache) <raw_supply_integer>: New
8907 <raw_supply_zeroed, invalidate>: Likewise.
8908 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
8909 <invalidate>: Likewise.
8910 <m_readonly_p>: Removed.
8912 2018-02-21 Yao Qi <yao.qi@linaro.org>
8914 * infcmd.c (get_return_value): Let stop_regs point to
8915 get_current_regcache.
8916 * regcache.c (regcache::regcache): Remove.
8917 (register_dump_reg_buffer): New class.
8918 (regcache_print): Adjust.
8919 * regcache.h (regcache): Remove constructors.
8921 2018-02-21 Yao Qi <yao.qi@linaro.org>
8923 * regcache.c (class register_dump): New class.
8924 (register_dump_regcache, register_dump_none): New class.
8925 (register_dump_remote, register_dump_groups): New class.
8926 (regcache_print): Update.
8927 * regcache.h (regcache_dump_what): Move it to regcache.c.
8928 (regcache) <dump>: Remove.
8930 2018-02-21 Yao Qi <yao.qi@linaro.org>
8932 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
8934 (jit_unwind_reg_set_impl): Call raw_supply.
8935 (jit_frame_sniffer): Use reg_buffer_rw.
8936 * record-full.c (record_full_core_regbuf): Change its type.
8937 (record_full_core_open_1): Use reg_buffer_rw.
8938 (record_full_close): Likewise.
8939 (record_full_core_fetch_registers): Use regcache->raw_supply.
8940 (record_full_core_store_registers): Likewise.
8941 * regcache.c (regcache::get_register_status): Move it to
8943 (regcache_raw_set_cached_value): Remove.
8944 (regcache::raw_set_cached_value): Remove.
8945 (regcache::raw_write): Call raw_supply.
8946 (regcache::raw_supply): Move it to reg_buffer_rw.
8947 * regcache.h (regcache_raw_set_cached_value): Remove.
8948 (reg_buffer_rw): New class.
8950 2018-02-21 Yao Qi <yao.qi@linaro.org>
8952 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
8953 readonly_detached_regcache.
8954 (dummy_frame_prev_register): Use regcache->cooked_read.
8955 * frame.c (frame_save_as_regcache): Change return type.
8956 (frame_pop): Update.
8957 * frame.h (frame_save_as_regcache): Update declaration.
8958 * inferior.h (get_infcall_suspend_state_regcache): Update
8960 * infrun.c (infcall_suspend_state) <registers>: use
8961 readonly_detached_regcache.
8962 (save_infcall_suspend_state): Don't use regcache_dup.
8963 (get_infcall_suspend_state_regcache): Change return type.
8964 * linux-fork.c (struct fork_info) <savedregs>: Change to
8965 readonly_detached_regcache.
8967 (fork_save_infrun_state): Don't use regcache_dup.
8968 (info_checkpoints_command): Adjust.
8969 * mi/mi-main.c (register_changed_p): Update declaration.
8970 (mi_cmd_data_list_changed_registers): Use
8971 readonly_detached_regcache.
8972 (register_changed_p): Change parameter type to
8973 readonly_detached_regcache.
8974 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
8975 readonly_detached_regcache.
8976 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
8977 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
8979 (regcache::save): Move it to reg_buffer.
8980 (regcache::restore): Change parameter type.
8981 (regcache_dup): Remove.
8982 * regcache.h (reg_buffer) <save>: New method.
8983 (readonly_detached_regcache): New class.
8984 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
8985 readonly_detached_regcache.
8986 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
8988 2018-02-21 Yao Qi <yao.qi@linaro.org>
8990 * frame.c (frame_save_as_regcache): Use regcache method save.
8991 (frame_pop): Use regcache method restore.
8992 * infrun.c (restore_infcall_suspend_state): Likewise.
8993 * linux-fork.c (fork_load_infrun_state): Likewise.
8994 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
8996 * regcache.c (regcache_save): Remove.
8997 (regcache::restore): More asserts.
8998 (regcache_cpy): Remove.
8999 * regcache.h (regcache_save): Remove the declaration.
9000 (regcache::restore): Move from private to public.
9001 Remove the friend declaration of regcache_cpy.
9002 (regcache_cpy): Remove declaration.
9004 2018-02-21 Yao Qi <yao.qi@linaro.org>
9006 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9007 parameter type to 'readable_regcache *'.
9008 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9009 * arm-tdep.c (arm_neon_quad_read): Likewise.
9010 (arm_pseudo_read): Likewise.
9011 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9012 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9013 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9014 * gdbarch.c: Re-generated.
9015 * gdbarch.h: Re-generated.
9016 * gdbarch.sh (pseudo_register_read): Change parameter type to
9017 'readable_regcache *'.
9018 (pseudo_register_read_value): Likewise.
9019 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9020 (h8300_pseudo_register_read): Likewise.
9021 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9022 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9023 (i386_pseudo_register_read_into_value): Likewise.
9024 (i386_pseudo_register_read_value): Likewise.
9025 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9027 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9028 * m32c-tdep.c (m32c_raw_read): Likewise.
9029 (m32c_read_flg): Likewise.
9030 (m32c_banked_register): Likewise.
9031 (m32c_banked_read): Likewise.
9032 (m32c_sb_read): Likewise.
9033 (m32c_part_read): Likewise.
9034 (m32c_cat_read): Likewise.
9035 (m32c_r3r2r1r0_read): Likewise.
9036 (m32c_pseudo_register_read): Likewise.
9037 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9038 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9039 (mep_pseudo_cr64_read): Likewise.
9040 (mep_pseudo_register_read): Likewise.
9041 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9042 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9043 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9044 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9045 (regcache::cooked_read): Likewise.
9046 (regcache::cooked_read_value): Likewise.
9047 (regcache_cooked_read_signed):
9048 (regcache::cooked_read): Likewise.
9049 * regcache.h (readable_regcache): New class.
9050 (regcache): Inherit readable_regcache. Move some methods to
9052 * rl78-tdep.c (rl78_pseudo_register_read): Change
9053 parameter type to 'readable_regcache *'.
9054 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9055 (e500_pseudo_register_read): Change parameter type to
9056 'readable_regcache *'.
9057 (dfp_pseudo_register_read): Likewise.
9058 (vsx_pseudo_register_read): Likewise.
9059 (efpr_pseudo_register_read): Likewise.
9060 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9061 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9062 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9063 (sh64_pseudo_register_read): Likewise.
9064 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9065 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9066 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9067 (spu_pseudo_register_read): Likewise.
9068 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9069 (xtensa_pseudo_register_read): Likewise.
9071 2018-02-21 Yao Qi <yao.qi@linaro.org>
9073 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9074 (regcache::arch): Move it to reg_buffer::arch.
9075 (regcache::register_buffer): Likewise.
9076 (regcache::assert_regnum): Likewise.
9077 (regcache::num_raw_registers): Likewise.
9078 * regcache.h (reg_buffer): New class.
9079 (regcache): Inherit reg_buffer.
9081 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9083 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9084 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9086 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9088 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9090 2018-02-19 Alan Hayward <alan.hayward@arm.com>
9092 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9093 (SFILES): Remove common/*.c files.
9094 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9095 * common/common.host: Add common reference.
9096 * configure.ac: Likewise.
9097 * configure: Regenerate.
9099 2018-02-16 Yao Qi <yao.qi@linaro.org>
9101 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9102 (block_initialize_namespace): Use new.
9103 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9104 (dwarf2_free_objfile): Use delete.
9105 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9106 (copy_type_recursive): Use new.
9107 * gdb_obstack.h (allocate_on_obstack): New.
9109 2018-02-15 Yao Qi <yao.qi@linaro.org>
9112 * inferior.c (exit_inferior_1): Reset inf->control.
9114 2018-02-15 Joel Brobecker <brobecker@adacore.com>
9116 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9119 2018-02-14 Pedro Alves <palves@redhat.com>
9121 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9122 frame_cleanup_after_sniffer on exception.
9124 2018-02-14 Tom Tromey <tom@tromey.com>
9126 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9128 (solib_bfd_open): Make pathname const.
9129 * solib.c (solib_bfd_open): Make pathname const.
9130 * solib-spu.c (spu_bfd_fopen): Make name const.
9131 (spu_bfd_open): Make pathname const.
9132 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9133 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9135 2018-02-14 Tom Tromey <tom@tromey.com>
9137 * symfile.c (symfile_bfd_open): Update.
9138 * source.h (openp, source_full_path_of, find_and_open_source):
9139 Change argument type to unique_xmalloc_ptr.
9140 * source.c (openp): Take a unique_xmalloc_ptr.
9141 (source_full_path_of, find_and_open_source): Likewise.
9142 (open_source_file, symtab_to_fullname): Update.
9143 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9145 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9146 (exec_file_find): Update.
9147 * psymtab.c (psymtab_to_fullname): Update.
9148 * nto-tdep.h (nto_find_and_open_solib): Update.
9149 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9151 * exec.c (exec_file_attach): Update.
9152 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9153 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9155 2018-02-14 Tom Tromey <tom@tromey.com>
9157 * solib.c: Include source.h.
9158 * nto-tdep.c: Include source.h.
9159 * mi/mi-cmd-env.c: Include source.h.
9160 * infcmd.c: Include source.h.
9161 * exec.c: Include source.h.
9162 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9163 (add_path, directory_switch, source_path, init_source_path): Move
9165 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9166 (add_path, directory_switch, source_path, init_source_path):
9169 2018-02-14 Tom Tromey <tom@tromey.com>
9171 * solist.h (exec_file_find, solib_find): Return
9173 (solib_bfd_fopen): Take a const char *.
9174 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9175 (exec_file_find, solib_find): Likewise.
9176 (solib_bfd_fopen): Do not take ownership of "pathname".
9177 (solib_bfd_open): Use unique_xmalloc_ptr.
9178 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9179 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9180 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9181 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9183 2018-02-14 Joel Brobecker <brobecker@adacore.com>
9185 * ada-lang.c (name_match_type_from_name): Remove reference to
9186 ada_name_for_lookup in function's documentation.
9187 * ada-lang.h (ada_name_for_lookup): Delete declaration.
9189 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9191 * defs.h (enum openp_flags): New enum.
9192 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9193 Move to enum openp_flags.
9194 (openp_flags): New enum flags.
9195 (openp): Change parameter type to openp_flags.
9196 * source.c (openp): Change parameter type to openp_flags.
9197 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9198 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9200 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9202 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9205 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
9207 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9209 (class dwarf2_queue_guard): ...the destructor of this new class.
9210 (dw2_do_instantiate_symtab): Create instance of the new class
9211 dwarf2_queue_guard, remove cleanup.
9213 2018-02-09 Tom Tromey <tom@tromey.com>
9215 * source.c (find_source_lines): Don't reference past the end of
9218 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9220 * remote.c (remote_btrace_maybe_reopen): Change error message.
9221 * btrace.c (btrace_enable): Likewise.
9222 (parse_xml_btrace): Likewise.
9223 (parse_xml_btrace_conf): Likewise.
9225 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9227 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9228 (linux_enable_pt, linux_enable_bts): Call
9229 diagnose_perf_event_open_fail.
9231 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9233 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9234 Remove parameter and change return type. Update callers. Move it.
9235 (linux_enable_bts, linux_enable_pt): Improve error message.
9236 (linux_enable_pt): Remove zero buffer size check.
9237 (linux_enable_btrace): Improve error messages. Remove NULL return
9240 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9242 * btrace.c (btrace_enable): Remove target_supports_btrace call.
9243 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9244 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9245 (linux_supports_pt, linux_supports_btrace): Remove.
9246 (linux_enable_bts): Call cpu_supports_bts.
9247 * nat/linux-btrace.h (linux_supports_btrace): Remove.
9248 * remote.c (remote_supports_btrace): Remove.
9249 (init_remote_ops): Remove remote_supports_btrace.
9250 * target-delegates.c: Regenerated.
9251 * target.c (target_supports_btrace): Remove.
9252 * target.h (target_ops) <to_supports_btrace>: Remove
9253 (target_supports_btrace): Remove.
9254 * x86-linux-nat.c (x86_linux_create_target): Remove
9255 linux_supports_btrace.
9257 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9259 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9261 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9262 exception and use message in own exception.
9264 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9266 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9267 (perf_event_pt_event_type): Use gdb_file_up.
9268 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9269 scoped_fd, and scoped_mmap.
9271 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9273 * common/scoped_mmap.h: New.
9274 * unittests/scoped_mmap-selftest.c: New.
9275 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9276 unittests/scoped_mmap-selftest.c.
9278 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9280 * common/scoped_fd.h: New.
9281 * unittests/scoped_fd-selftest.c: New.
9282 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9283 unittests/scoped_fd-selftest.c.
9285 2018-02-09 Tom Tromey <tom@tromey.com>
9287 * auto-load.c (auto_load_section_scripts): Use
9288 gdb::unique_xmalloc_ptr.
9290 2018-02-09 Tom Tromey <tom@tromey.com>
9292 * auto-load.c (execute_script_contents): Use std::string.
9294 2018-02-09 Joel Brobecker <brobecker@adacore.com>
9296 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9297 Python function, rather than a new command.
9299 2018-02-08 Tom Tromey <tom@tromey.com>
9301 * solib.c (solib_find_1): Use std::string.
9302 (solib_bfd_fopen): Use unique_xmalloc_ptr.
9304 2018-02-08 Tom Tromey <tom@tromey.com>
9306 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9308 2018-02-08 Tom Tromey <tom@tromey.com>
9310 * source.c (find_source_lines): Use gdb::def_vector.
9312 2018-02-08 Tom Tromey <tom@tromey.com>
9314 * macrocmd.c (struct temporary_macro_definition): New.
9315 (macro_define_command): Use temporary_macro_definition. Remove
9317 (free_macro_definition_ptr): Remove.
9319 2018-02-08 Tom Tromey <tom@tromey.com>
9321 * macroexp.c (maybe_expand): Use std::string.
9323 2018-02-08 Tom Tromey <tom@tromey.com>
9325 * macroexp.c (struct macro_buffer): Add initializers for some
9327 (init_buffer, init_shared_buffer, free_buffer)
9328 (free_buffer_return_text): Remove.
9329 (macro_buffer): New constructors.
9330 (~macro_buffer): New destructor.
9331 (macro_buffer::set_shared): New method.
9332 (macro_buffer::resize_buffer, macro_buffer::appendc)
9333 (macro_buffer::appendmem): Now methods, not free functions.
9334 (set_token, append_tokens_without_splicing, stringify)
9335 (macro_stringify): Update.
9336 (gather_arguments): Change return type. Remove argc_p argument,
9337 add args_ptr argument. Use std::vector.
9338 (substitute_args): Remove argc argument. Accept std::vector.
9339 (expand): Update. Use std::vector.
9340 (scan, macro_expand, macro_expand_next): Update.
9342 2018-02-08 Tom Tromey <tom@tromey.com>
9344 * symtab.c (default_collect_symbol_completion_matches_break_on):
9345 Use unique_xmalloc_ptr.
9346 * macroscope.h: (sal_macro_scope, user_macro_scope)
9347 (default_macro_scope): Return unique_xmalloc_ptr.
9348 * macroscope.c (sal_macro_scope, user_macro_scope)
9349 (default_macro_scope): Return unique_xmalloc_ptr.
9350 * macroexp.h (macro_expand, macro_expand_once): Return
9352 * macroexp.c (macro_expand, macro_expand_once): Return
9354 * macrocmd.c (macro_expand_command, macro_expand_once_command)
9355 (info_macro_command, info_macros_command): Use
9357 * compile/compile-c-support.c (write_macro_definitions): Use
9359 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9361 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
9363 * value.c (value_static_field): Assign field type instead of
9364 containing type when returning an optimized out value.
9366 2018-02-06 Yao Qi <yao.qi@linaro.org>
9368 * ft32-tdep.c (ft32_read_pc): Remove.
9369 (ft32_write_pc): Remove.
9370 (ft32_gdbarch_init): Update.
9371 * m32r-tdep.c (m32r_read_pc): Remove.
9372 (m32r_gdbarch_init): Update.
9373 * mep-tdep.c (mep_read_pc): Remove.
9374 (mep_gdbarch_init): Update.
9375 * microblaze-tdep.c (microblaze_write_pc): Remove.
9376 (microblaze_gdbarch_init): Update.
9377 * mn10300-tdep.c (mn10300_read_pc): Remove.
9378 (mn10300_write_pc): Remove.
9379 (mn10300_gdbarch_init): Update.
9380 * moxie-tdep.c (moxie_read_pc): Remove.
9381 (moxie_write_pc): Remove.
9382 (moxie_gdbarch_init): Update.
9384 2018-02-06 Yao Qi <yao.qi@linaro.org>
9386 * expprint.c (print_subexp_standard): Handle
9387 OP_F77_UNDETERMINED_ARGLIST.
9388 (dump_subexp_body_standard): Likewise.
9390 2018-02-05 Alan Hayward <alan.hayward@arm.com>
9392 * target-descriptions.c (tdesc_element_visitor) Add empty
9394 (tdesc_type): Move make_gdb_type from here.
9395 (tdesc_type_builtin): Likewise.
9396 (tdesc_type_vector): Likewise.
9397 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9398 (make_gdb_type_struct): Move from tdesc_type_with_fields.
9399 (make_gdb_type_union): Likewise.
9400 (make_gdb_type_flags): Likewise.
9401 (make_gdb_type_enum): Likewise.
9402 (make_gdb_type): New function.
9403 (tdesc_register_type): Use static make_gdb_type.
9405 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
9407 * infcmd.c (default_print_one_register_info): Align natural-format
9408 column values consistently one under another.
9409 (pad_to_column): New function.
9411 2018-02-05 Joel Brobecker <brobecker@adacore.com>
9413 * dwarf2read.c (dwarf2_physname): Move commment.
9415 2018-02-01 Leszek Swirski <leszeks@google.com>
9417 * varobj.c (varobj_formatted_print_options): Allow recursive
9418 pretty printing if pretty printing is enabled.
9420 2018-02-01 Leszek Swirski <leszeks@google.com>
9422 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9423 names after a structop as a filename.
9425 2018-02-01 Yao Qi <yao.qi@linaro.org>
9427 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9428 (arm_record_coproc_data_proc): Likewise.
9430 2018-02-01 Yao Qi <yao.qi@linaro.org>
9432 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9434 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
9436 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9437 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9439 2018-01-31 Pedro Alves <palves@redhat.com>
9441 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9442 * inflow.c (child_terminal_save_inferior): Wrap reference to
9443 tcgetpgrp in HAVE_TERMIOS_H.
9444 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9446 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9447 always iterate over all inferiors.
9448 (gdbsim_cntrl_c): Adjust.
9449 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9451 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9453 * gdbtypes.c (lookup_array_range_type): Make sure the array's
9454 index type is objfile-owned if the element type is as well.
9456 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9460 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
9462 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9463 "features/s390x-linux64.c".
9464 (_initialize_s390_linux_tdep): Remove initialization of tdescs
9465 s390_linux32 and s390x_linux64.
9466 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9468 * s390-tdep.c: Include "features/s390-linux32.c" and
9469 "features/s390x-linux64.c".
9470 (s390_tdesc_valid): Add check for tdesc_has_registers.
9471 (s390_gdbarch_init): Make sure there is always a valid tdesc.
9472 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9473 tdesc_s390x_linux64.
9474 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9475 tdesc_s390x_linux64 to...
9476 * s390-tdep.h: ...here.
9478 2018-01-30 Pedro Alves <palves@redhat.com>
9481 * config.in, configure: Regenerate.
9482 * configure.ac: Check for getpgid.
9483 * go32-nat.c (go32_pass_ctrlc): New.
9484 (go32_target): Install it.
9485 * inf-child.c (inf_child_target): Install
9486 child_terminal_save_inferior, child_pass_ctrlc and
9488 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9489 (inf_ptrace_target): No longer install it.
9490 * infcmd.c (interrupt_target_1): Adjust.
9491 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9492 (child_interrupt): Declare.
9493 (inferior::terminal_state): New.
9494 * inflow.c (struct terminal_info): Update comments.
9495 (inferior_process_group): Delete.
9496 (terminal_is_ours): Delete.
9497 (gdb_tty_state): New.
9498 (child_terminal_init): Adjust.
9499 (is_gdb_terminal, sharing_input_terminal_1)
9500 (sharing_input_terminal): New functions.
9501 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
9502 Set the process's actual process group in the foreground if
9503 possible. Handle is_ours_for_output/is_ours distinction. Don't
9504 mark terminal as the inferior's if not sharing GDB's terminal.
9505 Don't check attach_flag.
9506 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9507 pass down a target_terminal_state.
9508 (child_terminal_save_inferior): New, factored out from ...
9509 (child_terminal_ours_1): ... this. Handle
9510 target_terminal_state::is_ours_for_output.
9511 (child_interrupt, child_pass_ctrlc): New.
9512 (inflow_inferior_exit): Clear the inferior's terminal_state.
9513 (copy_terminal_info): Copy the inferior's terminal state.
9514 (_initialize_inflow): Remove reference to terminal_is_ours.
9515 * inflow.h (inferior_process_group): Delete.
9516 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9517 * procfs.c (procfs_target): Don't install procfs_interrupt.
9518 (procfs_interrupt): Delete.
9519 * remote.c (remote_serial_quit_handler): Adjust.
9520 (remote_interrupt): Remove ptid parameter. Adjust.
9521 * target-delegates.c: Regenerate.
9522 * target.c: Include "terminal.h".
9523 (target_terminal::terminal_state): Rename to ...
9524 (target_terminal::m_terminal_state): ... this.
9525 (target_terminal::init): Adjust.
9526 (target_terminal::inferior): Adjust to per-inferior
9528 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
9529 (target_terminal::ours, target_terminal::ours_for_output): Use
9530 target_terminal_is_ours_kind.
9531 (target_interrupt): Remove ptid parameter. Adjust.
9532 (default_target_pass_ctrlc): Adjust.
9533 * target.h (target_ops::to_terminal_save_inferior): New field.
9534 (target_ops::to_interrupt): Remove ptid_t parameter.
9535 (target_interrupt): Remove ptid_t parameter. Update comment.
9536 (target_pass_ctrlc): Update comment.
9537 * target/target.h (target_terminal_state): New scoped enum,
9539 (target_terminal::terminal_state): ... here.
9540 (target_terminal::inferior): Update comments.
9541 (target_terminal::restore_inferior): New.
9542 (target_terminal::is_inferior, target_terminal::is_ours)
9543 (target_terminal::is_ours_for_output): Adjust.
9544 (target_terminal::scoped_restore_terminal_state): Adjust to
9545 rename, and call restore_inferior() instead of inferior().
9546 (target_terminal::scoped_restore_terminal_state::m_state): Change
9548 (target_terminal::terminal_state): Rename to ...
9549 (target_terminal::m_terminal_state): ... this and change type.
9551 2018-01-30 Pedro Alves <palves@redhat.com>
9553 * linux-nat.c (wait_for_signal): New function.
9554 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
9556 (async_terminal_is_ours)
9557 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
9558 (linux_nat_add_target): Don't override
9559 to_terminal_inferior/to_terminal_ours.
9561 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
9563 * remote.c (remote_follow_fork): Don't call "detach_inferior".
9565 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
9567 * dwarf2read.c (free_dwo_files): Add forward-declaration.
9568 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
9569 dwarf2_per_objfile_free here.
9570 (dwarf2_per_objfile_free): Remove.
9571 (_initialize_dwarf2_read): Don't register
9572 dwarf2_per_objfile_free as a registry cleanup.
9574 2018-01-27 Eli Zaretskii <eliz@gnu.org>
9576 Avoid compilation errors in MinGW native builds
9578 The error is triggered by including python-internal.h, and the
9581 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
9582 from build-gnulib/import/math.h:27,
9583 from d:/usr/Python26/include/pyport.h:235,
9584 from d:/usr/Python26/include/Python.h:58,
9585 from python/python-internal.h:94,
9586 from python/py-arch.c:24:
9587 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
9591 This happens because Python headers define 'hypot' to expand t
9592 '_hypot' in the Windows builds.
9593 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
9594 'hypoth'. This avoids a compilation error.
9596 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9598 * MAINTAINERS (Write After Approval): Fix ordering.
9600 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9602 * MAINTAINERS (Write After Approval): Add Alan Hayward.
9604 2018-01-26 Alan Modra <amodra@gmail.com>
9606 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
9607 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
9608 Remove nop. Make const. Comment.
9609 (powerpc32_plt_stub_so_2): New.
9610 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
9611 Correct count. Update uses.
9612 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
9613 Move common code reading PLT entry word. Correct
9614 powerpc32_plt_stub PLT address calculation.
9615 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
9616 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
9617 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
9618 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
9619 (ppc64_standard_linkage8): Likewise.
9620 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
9621 Correct insns description.
9622 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
9624 2018-01-24 Pedro Alves <palves@redhat.com>
9626 GCC PR libstdc++/83906
9627 * gdbtypes.c (operator==(const dynamic_prop &,
9628 const dynamic_prop &)): New.
9629 (operator==(const range_bounds &, const range_bounds &)): New.
9630 (check_types_equal): Use them instead of memcmp.
9631 * gdbtypes.h (operator==(const dynamic_prop &,
9632 const dynamic_prop &)): Declare.
9633 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
9634 (operator==(const range_bounds &, const range_bounds &)): Declare.
9635 (operator!=(const range_bounds &, const range_bounds &)): Declare.
9637 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9639 * s390-linux-tdep.c (s390_record_address_mask)
9640 (s390_record_calc_disp_common, s390_record_calc_disp)
9641 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9642 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9643 (s390_process_record): Move to s390-tdep.c.
9644 (s390_linux_init_abi_any): Adjust.
9645 * s390-tdep.c (s390_record_address_mask)
9646 (s390_record_calc_disp_common, s390_record_calc_disp)
9647 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9648 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9649 (s390_process_record): Moved from s390-linux-tdep.c
9650 (s390_gdbarch_init): Adjust.
9652 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9654 * s390-linux-nat.c (s390-tdep.h): New include.
9655 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
9656 (HFILES_NO_SRCDIR): Add s390-tdep.h.
9657 (ALLDEPFILES): Add s390-tdep.c.
9658 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
9659 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
9660 * s390-tdep.h: ...this. New file.
9661 * s390-linux-tdep.c (s390-tdep.h): New include.
9662 (_initialize_s390_tdep): Rename to...
9663 (_initialize_s390_linux_tdep): ...this and adjust.
9664 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
9665 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
9667 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
9668 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
9669 (s390_is_partial_instruction, s390_software_single_step)
9670 (is_non_branch_ril, s390_displaced_step_copy_insn)
9671 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
9672 (s390_prologue_data, s390_addr, s390_store, s390_load)
9673 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
9674 (s390_register_call_saved, s390_guess_tracepoint_registers)
9675 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
9676 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
9677 (s390_pseudo_register_name, s390_pseudo_register_type)
9678 (s390_pseudo_register_read, s390_pseudo_register_write)
9679 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
9680 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
9681 (s390_addr_bits_remove, s390_address_class_type_flags)
9682 (s390_address_class_type_flags_to_name)
9683 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
9684 (s390_function_arg_float, s390_function_arg_vector)
9685 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
9686 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
9687 (s390_frame_align, s390_register_return_value, s390_return_value)
9688 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
9689 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
9690 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
9691 (s390_trad_frame_prev_register, s390_unwind_cache)
9692 (s390_prologue_frame_unwind_cache)
9693 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
9694 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
9695 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
9696 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
9697 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
9698 (s390_frame_base_address, s390_local_base_address)
9699 (s390_frame_base, s390_gcc_target_options)
9700 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
9701 (s390_validate_reg_range, s390_tdesc_valid)
9702 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
9703 * s390-tdep.c: ...this. New file.
9705 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9707 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
9708 (s390_process_record, s390_gdbarch_tdep_alloc)
9709 (s390_linux_init_abi_any): Use/set new hook.
9711 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9713 * s390-linux-tdep.c (osabi.h): New include.
9714 (s390_linux_init_abi_31, s390_linux_init_abi_64)
9715 (s390_linux_init_abi_any): New functions.
9716 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
9718 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9720 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
9721 tdesc_has_registers check
9723 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9725 * s390-linux-tdep.c (s390_tdesc_valid): New function.
9726 (s390_validate_reg_range): New macro.
9727 (s390_gdbarch_init): Adjust.
9729 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9731 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
9732 (s390_gdbarch_tdep_alloc): Adjust.
9733 (s390_gdbarch_init): Adjust.
9735 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9737 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
9738 <have_tdb>: Change type to bool.
9739 (s390_gdbarch_tdep_alloc): Adjust.
9740 (s390_gdbarch_init): Adjust.
9742 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9744 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
9745 (gdbarch_tdep) <have_upper, have_vx>: New fields.
9746 (s390_gdbarch_tdep_alloc): New function.
9747 (s390_gdbarch_init): Allocate tdep at start and use its fields
9748 instead of separate variables.
9750 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9752 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
9753 when looking for cached gdbarch and add comment for remaining.
9755 2018-01-22 Pedro Alves <palves@redhat.com>
9756 Sergio Durigan Junior <sergiodj@redhat.com>
9758 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
9761 2018-01-22 Maciej W. Rozycki <macro@mips.com>
9763 * MAINTAINERS: Update my company e-mail address.
9765 2018-01-22 Yao Qi <yao.qi@linaro.org>
9767 * regcache.c (cooked_write_test): New function.
9768 (_initialize_regcache): Register the test.
9770 2018-01-22 Yao Qi <yao.qi@linaro.org>
9772 * ia64-tdep.c (ia64_pseudo_register_read): Call
9773 regcache->cooked_read instead of regcache_cooked_read_unsigned.
9774 * m32c-tdep.c (m32c_cat_read): Likewise.
9775 (m32c_r3r2r1r0_read): Likewise.
9776 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9777 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9779 2018-01-22 Yao Qi <yao.qi@linaro.org>
9781 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
9782 method raw_read instead of regcache_raw_read.
9783 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9784 * arm-tdep.c (arm_neon_quad_read): Likewise.
9785 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9786 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9787 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9788 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
9789 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9790 (i386_pseudo_register_read_into_value): Likewise.
9791 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9792 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9793 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9794 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
9795 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
9796 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9797 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9798 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9799 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
9801 2018-01-22 Yao Qi <yao.qi@linaro.org>
9803 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
9804 * configure.tgt: Remove target mt.
9805 * mt-tdep.c: Remove.
9806 * regcache.c (cooked_read_test): Remove the check for mt.
9808 2018-01-22 Yao Qi <yao.qi@linaro.org>
9810 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
9811 instead of gdbarch_pseudo_register_read_value.
9813 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9815 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
9818 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9820 * linespec.c (create_sals_line_offset): Remove code that preserved
9821 the symtab_and_line's line number.
9823 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9825 * varobj.c (varobj_create): Don't set valid_block when creating a
9828 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9830 * varobj.c (varobj_create): Remove out of date comment.
9832 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9835 * ada-exp.y (write_var_from_sym): Pass extra parameter when
9836 updating innermost block.
9837 * parse.c (innermost_block_tracker::update): Take extra type
9838 parameter, and check types match before updating innermost block.
9839 (write_dollar_variable): Update innermost block for registers.
9840 * parser-defs.h (enum innermost_block_tracker_type): New enum.
9841 (innermost_block_tracker::innermost_block_tracker): Initialise
9843 (innermost_block_tracker::reset): Take type parameter.
9844 (innermost_block_tracker::update): Take type parameter, and pass
9845 type through as needed.
9846 (innermost_block_tracker::m_types): New member.
9847 * varobj.c (varobj_create): Pass type when reseting innermost
9850 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9852 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
9853 * ada-lang.c (resolve_subexp): Likewise.
9854 * breakpoint.c (set_breakpoint_condition) Likewise.
9855 (watch_command_1) Likewise.
9856 * c-exp.y (variable): Likewise.
9857 * d-exp.y (PrimaryExpression): Likewise.
9858 * f-exp.y (variable): Likewise.
9859 * go-exp.y (variable): Likewise.
9860 * m2-exp.y (variable): Likewise.
9861 * objfiles.c (objfile::~objfile): Likewise.
9862 * p-exp.y (variable): Likewise.
9863 * parse.c (innermost_block): Change type.
9864 * parser-defs.h (class innermost_block_tracker): New.
9865 (innermost_block): Change to innermost_block_tracker.
9866 * printcmd.c (display_command): Switch to innermost_block API.
9867 (do_one_display): Likewise.
9868 * rust-exp.y (do_one_display): Likewise.
9869 * symfile.c (clear_symtab_users): Likewise.
9870 * varobj.c (varobj_create): Switch to innermost_block API, replace
9871 use of innermost_block with block stored on varobj object.
9873 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9875 * expression.h (innermost_block): Remove declaration.
9876 * varobj.c: Add 'parser-defs.h' include.
9878 2018-01-19 Tom Tromey <tom@tromey.com>
9880 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
9881 symbols in the static and global blocks.
9883 2018-01-19 James Clarke <jrtc27@jrtc27.com>
9885 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
9886 gdb_ptrace.h, and move including gdb_wait.h ...
9887 * nat/linux-ptrace.h: ... to here.
9889 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9891 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
9892 inf_ptrace_detach_success.
9893 (inf_ptrace_detach_success): Add inferior parameter, use it
9894 instead of inferior_ptid, pass it to detach_inferior.
9895 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
9897 * inferior.c (detach_inferior): Add overload that takes an
9899 * inferior.h (detach_inferior): Likewise.
9900 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
9901 use inferior_ptid, adjust call to inf_ptrace_detach_success.
9902 * linux-thread-db.c (thread_db_detach): Use inf parameter.
9904 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9906 * target.h (struct target_ops) <to_detach>: Add inferior
9908 (target_detach): Likewise.
9909 * target.c (dispose_inferior): Pass inferior down.
9910 (target_detach): Pass inferior down. Assert that it is equal to
9911 the current inferior.
9912 * aix-thread.c (aix_thread_detach): Pass inferior down.
9913 * corefile.c (core_file_command): Pass current_inferior() down.
9914 * corelow.c (core_detach): Add inferior parameter.
9915 * darwin-nat.c (darwin_detach): Likewise.
9916 * gnu-nat.c (gnu_detach): Likewise.
9917 * inf-ptrace.c (inf_ptrace_detach): Likewise.
9918 * infcmd.c (detach_command): Pass current_inferior() down to
9920 * infrun.c (follow_fork_inferior): Pass parent_inf to
9922 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
9924 * linux-nat.c (linux_nat_detach): Add inferior parameter.
9925 * linux-thread-db.c (thread_db_detach): Likewise.
9926 * nto-procfs.c (procfs_detach): Likewise.
9927 * procfs.c (procfs_detach): Likewise.
9928 * record.c (record_detach): Likewise.
9929 * record.h (struct inferior): Forward-declare.
9930 (record_detach): Add inferior parameter.
9931 * remote-sim.c (gdbsim_detach): Likewise.
9932 * remote.c (remote_detach_1): Likewise.
9933 (remote_detach): Likewise.
9934 (extended_remote_detach): Likewise.
9935 * sol-thread.c (sol_thread_detach): Likewise.
9936 * target-debug.h (target_debug_print_inferior_p): New macro.
9937 * target-delegates.c: Re-generate.
9938 * top.c (kill_or_detach): Pass inferior down to target_detach.
9939 * windows-nat.c (windows_detach): Add inferior parameter.
9941 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9943 * target.h (struct target_ops) <to_detach>: Remove args
9945 (target_detach): Likewise.
9946 * target.c (dispose_inferior): Adjust.
9947 (target_detach): Remove args parameter, adjust.
9948 * aix-thread.c (aix_thread_detach): Adjust.
9949 * corefile.c (core_file_command): Adjust.
9950 * corelow.c (core_detach): Adjust.
9951 * darwin-nat.c (darwin_detach): Adjust.
9952 * gnu-nat.c (gnu_detach): Adjust.
9953 * inf-ptrace.c (inf_ptrace_detach): Adjust.
9954 * infcmd.c (detach_command): Adjust
9955 * infrun.c (follow_fork_inferior): Adjust.
9956 (handle_vfork_child_exec_or_exit): Adjust.
9957 * linux-fork.c (linux_fork_detach): Remove args parameter.
9958 * linux-fork.h (linux_fork_detach): Likewise.
9959 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
9960 * linux-thread-db.c (thread_db_detach): Likewise.
9961 * nto-procfs.c (procfs_detach): Likewise.
9962 * procfs.c (procfs_detach): Likewise.
9963 (do_detach): Remove signo parameter.
9964 * record.c (record_detach): Remove args parameter.
9965 * record.h (record_detach): Likewise.
9966 * remote-sim.c (gdbsim_detach): Likewise.
9967 * remote.c (remote_detach_1): Likewise.
9968 (remote_detach): Likewise.
9969 (extended_remote_detach): Likewise.
9970 * sol-thread.c (sol_thread_detach): Likewise.
9971 * target-delegates.c: Re-generate.
9972 * top.c (struct qt_args) <args>: Remove field.
9973 (kill_or_detach): Don't pass args.
9974 (quit_force): Don't set args.
9975 * windows-nat.c (windows_detach): Remove args parameter.
9977 2018-01-19 Yao Qi <yao.qi@linaro.org>
9979 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
9980 (arm_linux_init_abi): Install it.
9982 2018-01-19 Yao Qi <yao.qi@linaro.org>
9984 * osabi.c (gdb_osabi_names): Extend the regexp for
9985 arm-linux-gnueabihf.
9987 2018-01-18 Yao Qi <yao.qi@linaro.org>
9989 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
9991 (abbrev_table::add_abbrev): Update.
9992 (abbrev_table::lookup_abbrev): Update.
9994 2018-01-18 Yao Qi <yao.qi@linaro.org>
9996 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
9998 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10000 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10003 2018-01-17 Tom Tromey <tom@tromey.com>
10005 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10007 2018-01-17 Tom Tromey <tom@tromey.com>
10009 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10010 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10011 (create_array_type_with_stride): Update.
10012 * dwarf2read.c (set_die_type): Update.
10014 2018-01-17 Tom Tromey <tom@tromey.com>
10016 * dwarf2read.c (delayed_method_info): Remove typedef.
10017 (dwarf2_cu::method_info): Now a std::vector.
10018 (add_to_method_list): Update.
10019 (free_delayed_list): Remove.
10020 (compute_delayed_physnames): Update.
10021 (process_full_comp_unit, process_full_type_unit): Clear the method
10022 list. Remove cleanups.
10023 (psymtab_include_file_name): Add name_holder parameter. Use
10024 unique_xmalloc_ptr.
10025 (dwarf_decode_lines): Update.
10027 2018-01-17 Tom Tromey <tom@tromey.com>
10028 Simon Marchi <simon.marchi@ericsson.com>
10030 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10031 (dwarf2_per_objfile::free_cached_comp_units)
10032 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10033 (init_cutu_and_read_dies_no_follow): Update.
10034 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10035 (dwarf2_cu::~dwarf2_cu): New.
10036 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10037 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10039 2018-01-17 Tom Tromey <tom@tromey.com>
10040 Simon Marchi <simon.marchi@ericsson.com>
10042 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10043 (struct die_reader_specs) <abbrev_table>: New member.
10044 (struct abbrev_table): Add constructor.
10045 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10046 <abbrev_obstack>: Now an auto_obstack.
10047 (abbrev_table_up): New typedef.
10048 (init_cu_die_reader): Add abbrev_table parameter.
10049 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10050 Add result_dwo_abbrev_table.
10051 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10052 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10054 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10056 (skip_children): Update.
10057 (abbrev_table::alloc_abbrev): Rename from
10058 abbrev_table_alloc_abbrev.
10059 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10060 (abbrev_table::lookup_abbrev): Rename from
10061 abbrev_table_lookup_abbrev.
10062 (abbrev_table_read_table): Return abbrev_table_up.
10063 (abbrev_table_free, abbrev_table_free_cleanup)
10064 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10065 (load_partial_dies): Update.
10067 2018-01-17 Tom Tromey <tom@tromey.com>
10069 * dwarf2read.c (dwarf2_compute_name): Update comment.
10070 (read_func_scope, read_variable): Update.
10071 (new_symbol): Remove.
10072 (new_symbol_full): Rename to new_symbol.
10074 2018-01-17 Mike Gulick <mgulick@mathworks.com>
10077 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10078 a warning instead of throwing an error, set section size to 0 and return
10080 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10082 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10084 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10086 (linux_ptrace_attach_fail_reason_string): Likewise.
10087 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10089 (linux_ptrace_attach_fail_reason_string): Likewise.
10090 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10092 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10094 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10096 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10099 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10100 checking for fs_base/gs_base fields in struct user_regs_struct.
10101 * configure: Regenerate.
10103 2018-01-17 Yao Qi <yao.qi@linaro.org>
10105 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10107 (aarch64_linux_init_abi): Install it to gdbarch hook
10108 gcc_target_options.
10110 2018-01-15 Pedro Alves <palves@redhat.com>
10112 * common/signals-state-save-restore.c
10113 (save_original_signals_state): Fix typos.
10115 2017-01-12 Tom Tromey <tom@tromey.com>
10116 Sergio Durigan Junior <sergiodj@redhat.com>
10118 * Makefile.in (install-only): Install gdb-add-index.
10120 2018-01-12 John Baldwin <jhb@FreeBSD.org>
10122 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10124 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10126 * infrun.c (keep_going_pass_signal): Clear step-over info when
10127 insert_breakpoints fails.
10129 2018-01-11 Pedro Alves <palves@redhat.com>
10132 * infrun.c (resume): Rename to ...
10133 (resume_1): ... this.
10134 (resume): Reimplement as wrapper around resume_1.
10136 2018-01-11 Pedro Alves <palves@redhat.com>
10139 * remote.c (remote_parse_stop_reply): Default to the last-set
10140 general thread instead of to 'magic_null_ptid'.
10142 2018-01-10 Pedro Alves <palves@redhat.com>
10144 * language.h (language_get_symbol_name_matcher): Rename ...
10145 (get_symbol_name_matcher): ... this.
10146 * language.c (language_get_symbol_name_matcher): Ditto.
10147 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10150 2018-01-10 Pedro Alves <palves@redhat.com>
10154 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10155 Adjust to use language_get_symbol_name_matcher instead of
10156 language_defn::la_get_symbol_name_matcher.
10157 * language.c (language_get_symbol_name_matcher): If in Ada mode
10158 and the lookup name is a verbatim match, return Ada's matcher.
10159 * language.h (language_get_symbol_name_matcher): Adjust comment.
10160 (ada_lookup_name_info::verbatim_p):: New method.
10162 2018-01-10 Pedro Alves <palves@redhat.com>
10165 * ada-lang.c (ada_collect_symbol_completion_matches): If the
10166 minsym's language is language_auto or language_cplus, pass down
10167 language_ada instead.
10168 * symtab.c (compare_symbol_name): Don't frob symbol language here.
10170 2018-01-10 Pedro Alves <palves@redhat.com>
10173 * minsyms.c (linkage_name_str): New function.
10174 (iterate_over_minimal_symbols): Use it.
10176 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10178 * NEWS: Document that 'info proc' now works on FreeBSD.
10180 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10182 * configure.ac: Check for kinfo_getfile in libutil.
10183 * configure: Regenerate.
10184 * config.in: Regenerate.
10185 * fbsd-nat.c: Include "fbsd-tdep.h".
10186 (fbsd_fetch_cmdline): New.
10187 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10188 rather than calling error.
10189 (fbsd_info_proc): New.
10190 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10191 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10192 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10194 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10196 * fbsd-nat.c (struct free_deleter): Remove.
10197 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10199 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10201 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10202 NULL for an empty pathname.
10204 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10206 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10207 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10208 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10209 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10210 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10211 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10212 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10213 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10214 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10215 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10216 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10217 (fbsd_core_fetch_timeval, fbsd_print_sigset)
10218 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10219 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
10220 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10222 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
10224 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10225 (gnu_xfer_auxv): New function.
10226 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10227 TARGET_OBJECT_AUXV.
10229 2018-01-08 Yao Qi <yao.qi@linaro.org>
10230 Simon Marchi <simon.marchi@ericsson.com>
10232 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10234 (COMMON_OBS): Remove selftest.o.
10235 * configure.ac: Append selftest-arch.c and common/selftest.c to
10236 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
10237 * configure: Re-generated.
10238 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10240 (maintenance_info_selftests): Likewise.
10242 2018-01-08 Xavier Roirand <roirand@adacore.com>
10244 * ada-valprint.c (val_print_packed_array_elements): Use
10245 proper number of elements when printing an array indexed
10246 by an enumeration type.
10248 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10250 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10251 (dw2_get_file_names_reader): Adjust.
10252 (lookup_dwo_signatured_type): Adjust.
10253 (lookup_dwp_signatured_type): Adjust.
10254 (lookup_signatured_type): Adjust.
10255 (create_type_unit_group): Adjust.
10256 (get_type_unit_group): Adjust.
10257 (process_psymtab_comp_unit_reader): Adjust.
10258 (build_type_psymtabs_reader): Adjust.
10259 (scan_partial_symbols): Adjust.
10260 (add_partial_symbol): Adjust.
10261 (add_partial_subprogram): Adjust.
10262 (peek_die_abbrev): Adjust.
10263 (fixup_go_packaging): Adjust.
10264 (process_imported_unit_die): Adjust.
10265 (dwarf2_compute_name): Adjust.
10266 (dwarf2_physname): Adjust.
10267 (read_import_statement): Adjust.
10268 (handle_DW_AT_stmt_list): Adjust.
10269 (read_file_scope): Adjust.
10270 (read_func_scope): Adjust.
10271 (read_lexical_block_scope): Adjust.
10272 (read_call_site_scope): Adjust.
10273 (read_variable): Adjust.
10274 (dwarf2_rnglists_process): Adjust.
10275 (dwarf2_ranges_process): Adjust.
10276 (dwarf2_ranges_read): Adjust.
10277 (dwarf2_get_pc_bounds): Adjust.
10278 (dwarf2_record_block_ranges): Adjust.
10279 (dwarf2_add_field): Adjust.
10280 (dwarf2_add_member_fn): Adjust.
10281 (read_structure_type): Adjust.
10282 (process_structure_scope): Adjust.
10283 (read_enumeration_type): Adjust.
10284 (read_array_type): Adjust.
10285 (mark_common_block_symbol_computed): Adjust.
10286 (read_common_block): Adjust.
10287 (read_namespace_type): Adjust.
10288 (read_namespace): Adjust.
10289 (read_module_type): Adjust.
10290 (read_tag_pointer_type): Adjust.
10291 (read_tag_ptr_to_member_type): Adjust.
10292 (read_tag_string_type): Adjust.
10293 (read_subroutine_type): Adjust.
10294 (read_typedef): Adjust.
10295 (read_base_type): Adjust.
10296 (attr_to_dynamic_prop): Adjust.
10297 (read_subrange_type): Adjust.
10298 (read_unspecified_type): Adjust.
10299 (dwarf2_read_abbrevs): Adjust.
10300 (load_partial_dies): Adjust.
10301 (read_partial_die): Adjust.
10302 (find_partial_die): Adjust.
10303 (guess_partial_die_structure_name): Adjust.
10304 (fixup_partial_die): Adjust.
10305 (read_attribute_value): Adjust.
10306 (read_addr_index): Adjust.
10307 (read_addr_index_from_leb128): Adjust.
10308 (read_str_index): Adjust.
10309 (dwarf2_string_attr): Adjust.
10310 (get_debug_line_section): Adjust.
10311 (dwarf_decode_line_header): Adjust.
10312 (lnp_state_machine::check_line_address): Adjust.
10313 (dwarf_decode_lines_1): Adjust.
10314 (dwarf_decode_lines): Adjust.
10315 (dwarf2_start_symtab): Adjust.
10316 (var_decode_location): Adjust.
10317 (new_symbol_full): Adjust.
10318 (dwarf2_const_value_data): Adjust.
10319 (dwarf2_const_value_attr): Adjust.
10320 (dwarf2_const_value): Adjust.
10321 (die_type): Adjust.
10322 (die_containing_type): Adjust.
10323 (build_error_marker_type): Adjust.
10324 (lookup_die_type): Adjust.
10325 (guess_full_die_structure_name): Adjust.
10326 (anonymous_struct_prefix): Adjust.
10327 (determine_prefix): Adjust.
10328 (dwarf2_name): Adjust.
10329 (follow_die_ref_or_sig): Adjust.
10330 (follow_die_offset): Adjust.
10331 (follow_die_ref): Adjust.
10332 (follow_die_sig_1): Adjust.
10333 (follow_die_sig): Adjust.
10334 (get_signatured_type): Adjust.
10335 (get_DW_AT_signature_type): Adjust.
10336 (decode_locdesc): Adjust.
10337 (dwarf_decode_macros): Adjust.
10338 (cu_debug_loc_section): Adjust.
10339 (fill_in_loclist_baton): Adjust.
10340 (dwarf2_symbol_mark_computed): Adjust.
10341 (init_one_comp_unit): Don't assign
10342 dwarf2_cu::dwarf2_per_objfile.
10343 (set_die_type): Adjust.
10345 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10347 * dwarf2read.c (struct mapped_debug_names): Add constructor.
10348 <dwarf2_per_objfile>: New field.
10349 (dwarf2_per_objfile): Remove global.
10350 (get_dwarf2_per_objfile): New function.
10351 (set_dwarf2_per_objfile): New function.
10352 (dwarf2_build_psymtabs_hard): Change objfile parameter to
10353 dwarf2_per_objfile.
10354 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10355 (read_abbrev_offset): Likewise.
10356 (read_indirect_string): Likewise.
10357 (read_indirect_line_string): Likewise.
10358 (read_indirect_string_at_offset): Likewise.
10359 (read_indirect_string_from_dwz): Likewise.
10360 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10361 dwarf2_per_objfile.
10362 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10363 (create_all_comp_units): Change objfile parameter to
10364 dwarf2_per_objfile.
10365 (create_all_type_units): Likewise.
10366 (process_queue): Add dwarf2_per_objfile parameter.
10367 (read_and_check_comp_unit_head): Likewise.
10368 (lookup_dwo_unit_in_dwp): Likewise.
10369 (get_dwp_file): Likewise.
10370 (process_cu_includes): Likewise.
10371 (struct free_dwo_file_cleanup_data): New struct.
10372 (dwarf2_has_info): Use get_dwarf2_per_objfile and
10373 set_dwarf2_per_objfile.
10374 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10375 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10376 context, adjust calls.
10377 (dw2_instantiate_symtab): Likewise.
10378 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10379 (dw2_get_cu): Likewise.
10380 (create_cu_from_index_list): Change objfile parameter to
10381 dwarf2_per_objfile.
10382 (create_cus_from_index_list): Get dwarf2_per_objfile from
10383 context, adjust calls.
10384 (create_cus_from_index): Likewise.
10385 (create_signatured_type_table_from_index): Change objfile
10386 parameter to dwarf2_per_objfile.
10387 (create_signatured_type_table_from_debug_names): Change objfile
10388 parameter to dwarf2_per_objfile.
10389 (create_addrmap_from_index): Likewise.
10390 (create_addrmap_from_aranges): Likewise.
10391 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10392 (dw2_setup): Remove.
10393 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10395 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10396 get_dwarf2_per_objfile.
10397 (dw2_forget_cached_source_info): Likewise.
10398 (dw2_map_symtabs_matching_filename): Likewise.
10399 (struct dw2_symtab_iterator) <index>: Remove.
10400 <dwarf2_per_objfile>: New field.
10401 (dw2_symtab_iter_init): Replace index parameter with
10402 dwarf2_per_objfile.
10403 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10404 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10405 (dw2_print_stats): Likewise.
10406 (dw2_dump): Likewise.
10407 (dw2_expand_symtabs_for_function): Likewise.
10408 (dw2_expand_all_symtabs): Likewise.
10409 (dw2_expand_symtabs_with_fullname): Likewise.
10410 (dw2_expand_marked_cus): Replace index and objfile parameters
10411 with dwarf2_per_objfile.
10412 (dw_expand_symtabs_matching_file_matcher): Add
10413 dwarf2_per_objfile parameter and adjust calls.
10414 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10416 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10417 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10419 (create_cus_from_debug_names_list): Replace objfile parameter
10420 with dwarf2_per_objfile and adjust calls.
10421 (create_cus_from_debug_names): Likewise.
10422 (dwarf2_read_debug_names): Likewise.
10423 (mapped_debug_names::namei_to_name): Adjust call.
10424 (dw2_debug_names_iterator::next): Likewise.
10425 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10426 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10427 (dw2_debug_names_dump): Likewise.
10428 (dw2_debug_names_expand_symtabs_for_function): Likewise.
10429 (dw2_debug_names_expand_symtabs_matching): Likewise.
10430 (dwarf2_initialize_objfile): Likewise.
10431 (dwarf2_build_psymtabs): Likewise.
10432 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10434 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10435 (read_and_check_comp_unit_head): Likewise.
10436 (read_abbrev_offset): Likewise.
10437 (create_debug_type_hash_table): Likewise.
10438 (create_debug_types_hash_table): Likewise.
10439 (create_all_type_units): Replace objfile parameter with
10440 dwarf2_per_objfile.
10441 (add_type_unit): Add dwarf2_per_objfile parameter.
10442 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10443 with dwarf2_per_objfile.
10444 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10445 (lookup_dwp_signatured_type): Likewise.
10446 (lookup_signatured_type): Likewise.
10447 (read_cutu_die_from_dwo): Likewise.
10448 (init_tu_and_read_dwo_dies): Likewise.
10449 (init_cutu_and_read_dies): Likewise.
10450 (init_cutu_and_read_dies_no_follow): Likewise.
10451 (allocate_type_unit_groups_table): Add objfile parameter.
10452 (create_type_unit_group): Use dwarf2_per_objfile from cu.
10453 (get_type_unit_group): Likewise.
10454 (process_psymtab_comp_unit): Update call.
10455 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10456 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10457 (print_tu_stats): Likewise.
10458 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10459 in void* parameter.
10460 (build_type_psymtabs): Change objfile parameter to
10461 dwarf2_per_objfile.
10462 (process_skeletonless_type_unit): Use dwarf2_per_objfile
10463 passed in void* parameter.
10464 (process_skeletonless_type_units): Change objfile parameter to
10465 dwarf2_per_objfile.
10466 (set_partial_user): Likewise.
10467 (dwarf2_build_psymtabs_hard): Likewise.
10468 (read_comp_units_from_section): Likewise.
10469 (create_all_comp_units): Likewise.
10470 (scan_partial_symbols): Update calls.
10471 (add_partial_symbol): Likewise.
10472 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10473 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10474 (process_queue): Add dwarf2_per_objfile parameter.
10475 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10476 (compute_compunit_symtab_includes): Likewise.
10477 (process_cu_includes): Add dwarf2_per_objfile parameter.
10478 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10479 (process_full_type_unit): Likewise.
10480 (process_imported_unit_die): Update call.
10481 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10482 (read_file_scope): Likewise.
10483 (allocate_dwo_file_hash_table): Add objfile parameter.
10484 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10485 (create_cus_hash_table): Likewise.
10486 (create_dwp_hash_table): Likewise.
10487 (create_dwo_unit_in_dwp_v1): Likewise.
10488 (create_dwp_v2_section): Likewise.
10489 (create_dwo_unit_in_dwp_v2): Likewise.
10490 (lookup_dwo_unit_in_dwp): Likewise.
10491 (try_open_dwop_file): Likewise.
10492 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10493 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10494 cleanup to include a reference to dwarf2_per_objfile.
10495 (open_dwp_file): Add dwarf2_per_objfile parameter.
10496 (open_and_init_dwp_file): Likewise.
10497 (get_dwp_file): Likewise.
10498 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10499 (queue_and_load_all_dwo_tus): Update call.
10500 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10502 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10503 (dwarf2_ranges_process): Likewise.
10504 (dwarf2_get_pc_bounds): Likewise.
10505 (mark_common_block_symbol_computed): Likewise.
10506 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10507 (dwarf2_read_abbrevs): Update call.
10508 (read_partial_die): Use dwarf2_per_objfile from cu.
10509 (find_partial_die): Likewise.
10510 (fixup_partial_die): Likewise.
10511 (read_attribute_value): Likewise.
10512 (read_indirect_string_at_offset_from): Add objfile parameter.
10513 (read_indirect_string_at_offset): Add dwarf2_per_objfile
10515 (read_indirect_string_from_dwz): Add objfile parameter.
10516 (read_indirect_string): Add objfile parameter.
10517 (read_addr_index_1): Add dwarf2_per_objfile parameter.
10518 (read_addr_index): Use dwarf2_per_objfile from cu.
10519 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10521 (read_str_index): Use dwarf2_per_objfile from cu.
10522 (get_debug_line_section): Likewise.
10523 (read_formatted_entries): Add dwarf2_per_objfile parameter.
10524 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
10525 (new_symbol_full): Use dwarf2_per_objfile from cu.
10526 (build_error_marker_type): Likewise.
10527 (lookup_die_type): Likewise.
10528 (determine_prefix): Likewise.
10529 (follow_die_offset): Likewise.
10530 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
10531 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
10532 (dwarf2_fetch_die_type_sect_off): Likewise.
10533 (dwarf2_get_die_type): Likewise.
10534 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
10535 (get_signatured_type): Likewise.
10536 (get_DW_AT_signature_type): Likewise.
10537 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
10538 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
10539 (cu_debug_loc_section): Likewise.
10540 (fill_in_loclist_baton): Likewise.
10541 (dwarf2_symbol_mark_computed): Likewise.
10542 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10543 dwarf2_per_objfile.
10544 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
10546 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10547 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
10548 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
10549 (set_die_type): Use dwarf2_free_objfile from cu.
10550 (get_die_type_at_offset): Likewise.
10551 (dwarf2_per_objfile_free): Don't assign global variable.
10552 (debug_names) <constructor>: Add dwarf2_per_objfile
10553 parameter, update m_debugstrlookup construction.
10554 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
10556 <m_dwarf2_per_objfile>: New field.
10557 <lookup>: Use m_dwarf2_per_objfile.
10558 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
10559 (psyms_seen_size): Likewise.
10560 (write_gdbindex): Replace objfile parameter with
10561 dwarf2_per_objfile.
10562 (write_debug_names): Likewise.
10563 (write_psymtabs_to_index): Likewise.
10564 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
10567 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10569 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
10570 <dwarf2_per_objfile>: New field.
10571 (struct dwarf2_per_cu_data) <objfile>: Remove.
10572 <dwarf2_per_objfile>: New field.
10573 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
10575 (create_signatured_type_table_from_index): Likewise.
10576 (create_debug_type_hash_table): Likewise.
10577 (fill_in_sig_entry_from_dwo_entry): Likewise.
10578 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
10579 (create_type_unit_group): Assign dwarf2_per_objfile instead of
10581 (create_partial_symtab): Access objfile through
10582 dwarf2_per_objfile.
10583 (process_psymtab_comp_unit_reader): Likewise.
10584 (read_comp_units_from_section): Likewise.
10585 (scan_partial_symbols): Likewise.
10586 (add_partial_symbol): Likewise.
10587 (add_partial_subprogram): Likewise.
10588 (peek_die_abbrev): Likewise.
10589 (fixup_go_packaging): Likewise.
10590 (process_full_comp_unit): Likewise.
10591 (process_full_type_unit): Likewise.
10592 (process_imported_unit_die): Likewise.
10593 (dwarf2_compute_name): Likewise.
10594 (dwarf2_physname): Likewise.
10595 (read_import_statement): Likewise.
10596 (create_cus_hash_table): Assign dwarf2_physname instead of
10598 (read_func_scope): Access objfile through dwarf2_per_objfile.
10599 (read_lexical_block_scope): Likewise.
10600 (read_call_site_scope): Likewise.
10601 (read_variable): Likewise.
10602 (dwarf2_rnglists_process): Likewise.
10603 (dwarf2_ranges_process): Likewise.
10604 (dwarf2_ranges_read): Likewise.
10605 (dwarf2_record_block_ranges): Likewise.
10606 (dwarf2_add_field): Likewise.
10607 (dwarf2_add_member_fn): Likewise.
10608 (read_structure_type): Likewise.
10609 (process_structure_scope): Likewise.
10610 (read_enumeration_type): Likewise.
10611 (read_array_type): Likewise.
10612 (read_common_block): Likewise.
10613 (read_namespace_type): Likewise.
10614 (read_namespace): Likewise.
10615 (read_module_type): Likewise.
10616 (read_tag_pointer_type): Likewise.
10617 (read_tag_ptr_to_member_type): Likewise.
10618 (read_tag_string_type): Likewise.
10619 (read_subroutine_type): Likewise.
10620 (read_typedef): Likewise.
10621 (read_base_type): Likewise.
10622 (attr_to_dynamic_prop): Likewise.
10623 (read_subrange_type): Likewise.
10624 (read_unspecified_type): Likewise.
10625 (load_partial_dies): Likewise.
10626 (read_partial_die): Likewise.
10627 (find_partial_die): Likewise.
10628 (guess_partial_die_structure_name): Likewise.
10629 (fixup_partial_die): Likewise.
10630 (read_attribute_value): Likewise.
10631 (read_addr_index_from_leb128): Likewise.
10632 (dwarf2_read_addr_index): Likewise.
10633 (dwarf2_string_attr): Likewise.
10634 (lnp_state_machine::check_line_address): Likewise.
10635 (dwarf_decode_lines_1): Likewise.
10636 (dwarf_decode_lines): Likewise.
10637 (dwarf2_start_symtab): Likewise.
10638 (var_decode_location): Likewise.
10639 (new_symbol_full): Likewise.
10640 (dwarf2_const_value_data): Likewise.
10641 (dwarf2_const_value_attr): Likewise.
10642 (dwarf2_const_value): Likewise.
10643 (die_type): Likewise.
10644 (die_containing_type): Likewise.
10645 (lookup_die_type): Likewise.
10646 (guess_full_die_structure_name): Likewise.
10647 (anonymous_struct_prefix): Likewise.
10648 (dwarf2_name): Likewise.
10649 (follow_die_ref_or_sig): Likewise.
10650 (follow_die_offset): Likewise.
10651 (follow_die_ref): Likewise.
10652 (dwarf2_fetch_die_loc_sect_off): Likewise.
10653 (dwarf2_fetch_constant_bytes): Likewise.
10654 (dwarf2_fetch_die_type_sect_off): Likewise.
10655 (dwarf2_get_die_type): Likewise.
10656 (follow_die_sig): Likewise.
10657 (decode_locdesc): Likewise.
10658 (dwarf2_per_cu_objfile): Likewise.
10659 (dwarf2_per_cu_text_offset): Likewise.
10660 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
10662 (set_die_type): Access objfile through
10663 dwarf2_per_objfile.
10665 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10667 * valprint.c (converted_character_d): Remove typedef.
10668 (DEF_VEC_O (converted_character_d)): Remove.
10669 (count_next_character): Use std::vector.
10670 (print_converted_chars_to_obstack): Likewise.
10671 (generic_printstr): Likewise.
10673 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10675 * xml-support.h (struct gdb_xml_value): Add constructor.
10676 <value>: Change type to unique_xmalloc_ptr.
10677 (gdb_xml_value_s): Remove typedef.
10678 (DEF_VEC_O (gdb_xml_value_s)): Remove.
10679 (gdb_xml_element_start_handler): Change parameter type to
10681 (xml_find_attribute): Likewise.
10682 * xml-support.c (xml_find_attribute): Change parameter type to
10683 std::vector and adjust.
10684 (gdb_xml_values_cleanup): Remove.
10685 (gdb_xml_parser::start_element): Adjust to std::vector.
10686 (xinclude_start_include): Change paraeter type to std::vector
10688 * btrace.c (check_xml_btrace_version): Likewise.
10689 (parse_xml_btrace_block): Likewise.
10690 (parse_xml_btrace_pt_config_cpu): Likewise.
10691 (parse_xml_btrace_pt): Likewise.
10692 (parse_xml_btrace_conf_bts): Likewise.
10693 (parse_xml_btrace_conf_pt): Likewise.
10694 * memory-map.c (memory_map_start_memory): Likewise.
10695 (memory_map_start_property): Likewise.
10696 * osdata.c (osdata_start_osdata): Likewise.
10697 (osdata_start_item): Likewise.
10698 (osdata_start_column): Likewise.
10699 * remote.c (start_thread): Likewise.
10700 * solib-aix.c (library_list_start_library): Likewise.
10701 (library_list_start_list): Likewise.
10702 * solib-svr4.c (library_list_start_library): Likewise.
10703 (svr4_library_list_start_list): Likewise.
10704 * solib-target.c (library_list_start_segment): Likewise.
10705 (library_list_start_section): Likewise.
10706 (library_list_start_library): Likewise.
10707 (library_list_start_list): Likewise.
10708 * tracepoint.c (traceframe_info_start_memory): Likewise.
10709 (traceframe_info_start_tvar): Likewise.
10710 * xml-syscall.c (syscall_start_syscall): Likewise.
10711 * xml-tdesc.c (tdesc_start_target): Likewise.
10712 (tdesc_start_feature): Likewise.
10713 (tdesc_start_reg): Likewise.
10714 (tdesc_start_union): Likewise.
10715 (tdesc_start_struct): Likewise.
10716 (tdesc_start_flags): Likewise.
10717 (tdesc_start_enum): Likewise.
10718 (tdesc_start_field): Likewise.
10719 (tdesc_start_enum_value): Likewise.
10720 (tdesc_start_vector): Likewise.
10722 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10724 * extension.h (struct xmethod_worker) <clone>: Remove.
10725 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
10727 (python_xmethod_worker::clone): Remove.
10728 * valops.c (find_overload_match): Use std::move instead of
10731 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10733 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
10734 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
10735 <free_xmethod_worker_data>: Remove.
10736 <get_matching_xmethod_workers>: Chance VEC to std::vector.
10737 <get_xmethod_arg_types>: Remove.
10738 <get_xmethod_result_type>: Remove.
10739 <invoke_xmethod>: Remove.
10740 * extension.c (new_xmethod_worker): Remove.
10741 (clone_xmethod_worker): Remove.
10742 (get_matching_xmethod_workers): Return void, pass std::vector by
10744 (get_xmethod_arg_types): Rename to...
10745 (xmethod_worker::get_arg_types): ... this, and adjust.
10746 (get_xmethod_result_type): Rename to...
10747 (xmethod_worker::get_result_type): ... this, and adjust.
10748 (invoke_xmethod): Remove.
10749 (free_xmethod_worker): Remove.
10750 (free_xmethod_worker_vec): Remove.
10751 * extension.h (enum ext_lang_rc): Move here from
10753 (struct xmethod_worker): Add constructor and destructor.
10756 <invoke, clone, do_get_result_type, do_get_arg_types>: New
10757 virtual pure methods.
10758 <get_arg_types, get_result_type>: New methods.
10759 (xmethod_worker_ptr): Remove typedef.
10760 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
10761 (xmethod_worker_vec): Remove typedef.
10762 (xmethod_worker_up): New typedef.
10763 (invoke_xmethod): Remove.
10764 (clone_xmethod_worker): Remove.
10765 (free_xmethod_worker): Remove.
10766 (free_xmethod_worker_vec): Remove.
10767 (get_xmethod_arg_types): Remove.
10768 (get_xmethod_result_type): Remove.
10769 * valops.c (find_method_list): Use std::vector, don't use
10770 intermediate vector.
10771 (value_find_oload_method_list): Use std::vector.
10772 (find_overload_match): Use std::vector.
10773 (find_oload_champ): Use std::vector.
10774 * value.c (value_free): Use operator delete.
10775 (value_of_xmethod): Rename to...
10776 (value_from_xmethod): ... this. Don't assign
10777 xmethod_worker::value, take rvalue-reference.
10778 (result_type_of_xmethod): Adjust.
10779 (call_xmethod): Adjust.
10780 * value.h: Include extension.h.
10781 (struct xmethod_worker): Don't forward-declare.
10782 (value_of_xmethod): Rename to...
10783 (value_from_xmethod): ... this, take rvalue-reference.
10784 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
10785 (struct python_xmethod_worker): ... this, add constructor and
10787 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
10788 (gdbpy_free_xmethod_worker_data): Rename to...
10789 (python_xmethod_worker::~python_xmethod_worker): ... this and
10791 (gdbpy_clone_xmethod_worker_data): Rename to...
10792 (python_xmethod_worker::clone): ... this and adjust.
10793 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
10795 (gdbpy_get_xmethod_arg_types): Rename to...
10796 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
10797 (gdbpy_get_xmethod_result_type): Rename to...
10798 (python_xmethod_worker::do_get_result_type): ... this and
10800 (gdbpy_invoke_xmethod): Rename to...
10801 (python_xmethod_worker::invoke): ... this and adjust.
10802 (new_python_xmethod_worker): Rename to...
10803 (python_xmethod_worker::python_xmethod_worker): ... this and
10805 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
10807 (gdbpy_free_xmethod_worker_data): Remove.
10808 (gdbpy_get_matching_xmethod_workers): Use std::vector.
10809 (gdbpy_get_xmethod_arg_types): Remove.
10810 (gdbpy_get_xmethod_result_type): Remove.
10811 (gdbpy_invoke_xmethod): Remove.
10812 * python/python.c (python_extension_ops): Remove obsolete
10815 2018-01-05 Pedro Alves <palves@redhat.com>
10818 * common/signals-state-save-restore.c
10819 (save_original_signals_state): New parameter 'quiet'. Warn if we
10820 find a custom handler preinstalled, instead of internal erroring.
10821 But only warn if !quiet.
10822 * common/signals-state-save-restore.h
10823 (save_original_signals_state): New parameter 'quiet'.
10824 * main.c (captured_main_1): Move save_original_signals_state call
10825 after option handling, and pass QUIET.
10827 2018-01-05 Pedro Alves <palves@redhat.com>
10829 * spu-tdep.c (spu_catch_start): Pass
10830 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
10832 2018-01-05 Pedro Alves <palves@redhat.com>
10835 * ada-lang.c (literal_symbol_name_matcher): New function.
10836 (ada_get_symbol_name_matcher): Use it for
10837 symbol_name_match_type::SEARCH_NAME.
10838 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
10839 it down instead of assuming symbol_name_match_type::FULL.
10840 * block.h (block_lookup_symbol): New parameter 'match_type'.
10841 * c-valprint.c (print_unpacked_pointer): Use
10842 lookup_symbol_search_name instead of lookup_symbol.
10843 * compile/compile-object-load.c (get_out_value_type): Pass down
10844 symbol_name_match_type::SEARCH_NAME.
10845 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
10846 symbol_name_match_type::FULL.
10847 * cp-support.c (cp_get_symbol_name_matcher): Handle
10848 symbol_name_match_type::SEARCH_NAME.
10849 * infrun.c (insert_exception_resume_breakpoint): Use
10850 lookup_symbol_search_name.
10851 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
10852 * psymtab.c (maintenance_check_psymtabs): Use
10853 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
10854 * stack.c (print_frame_args): Use lookup_symbol_search_name and
10855 SYMBOL_SEARCH_NAME.
10856 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
10857 if symbol_name_match_type::SEARCH_NAME.
10858 (lookup_symbol_in_language): Pass down
10859 symbol_name_match_type::FULL.
10860 (lookup_symbol_search_name): New.
10861 (lookup_language_this): Pass down
10862 symbol_name_match_type::SEARCH_NAME.
10863 (lookup_symbol_aux, lookup_local_symbol): New parameter
10864 'match_type'. Pass it down.
10865 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
10866 (lookup_symbol_search_name): New declaration.
10867 (lookup_symbol_in_block): New 'match_type' parameter.
10869 2018-01-05 Pedro Alves <palves@redhat.com>
10872 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
10874 (ada_lookup_symbol): Reimplement in terms of
10875 ada_lookup_symbol_list, bits factored out from
10876 ada_lookup_encoded_symbol.
10878 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10880 * ada-exp.y (write_object_renaming): When subscripting an array
10881 using a symbol as the index, pass the block in call to
10882 ada_lookup_encoded_symbol when looking that symbol up.
10884 2018-01-05 Jerome Guitton <guitton@adacore.com>
10886 * ada-lang.c (ada_array_length): Use ada_index_type instead of
10889 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10891 * ada-lang.c (ada_to_fixed_value_create): Add handling of
10892 the case where VALUE_LVAL (val0) is not lval_memory.
10894 2018-01-05 Xavier Roirand <roirand@adacore.com>
10896 * ada-valprint.c (print_optional_low_bound): Handle
10897 character-indexed array printing like boolean-indexed array
10900 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10902 * NEWS: Create a new section for the next release branch.
10903 Rename the section of the current branch, now that it has
10906 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10908 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
10909 * version.in: Bump version to 8.1.50.DATE-git.
10911 2018-01-03 Xavier Roirand <roirand@adacore.com>
10913 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
10915 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
10917 (default_exception_support_info) <catch_handlers_sym>: Add field.
10918 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
10919 (ada_exception_name_addr_1): Add "catch handlers" handling.
10920 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
10921 Update all callers.
10922 (create_excep_cond_exprs) <ex>: Add parameter.
10923 (re_set_exception): Update create_excep_cond_exprs call.
10924 (print_it_exception, print_one_exception, print_mention_exception)
10925 (print_recreate_exception): Add "catch handler" handling.
10926 (allocate_location_catch_handlers, re_set_catch_handlers)
10927 (check_status_catch_handlers, print_it_catch_handlers)
10928 (print_one_catch_handlers, print_mention_catch_handlers)
10929 (print_recreate_catch_handlers): New function.
10930 (catch_handlers_breakpoint_ops): New variable.
10931 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
10932 Add parameter. Add "catch handler" handling.
10933 (ada_exception_sym_name, ada_exception_breakpoint_ops):
10934 Add "catch handler" handling.
10935 (ada_exception_catchpoint_cond_string): Add "catch handler"
10937 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
10939 (catch_ada_handlers_command): New function.
10940 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
10941 operations structure.
10942 (_initialize_ada_language): Add "catch handlers" command entry.
10943 * NEWS: Document "catch handlers" feature.
10945 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10947 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
10948 account when creating the array type of the slice.
10949 (ada_value_slice): Likewise.
10951 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10953 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
10955 (create_array_type_with_stride): Add byte_stride_prop parameter.
10956 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
10957 New parameter. Update all callers in this file.
10958 (array_type_has_dynamic_stride): New function.
10959 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
10960 of arrays with dynamic byte strides.
10961 * dwarf2read.c (read_array_type): Add support for dynamic
10962 DW_AT_byte_stride attributes.
10964 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10966 * dwarf2read.c (read_unspecified_type): Treat
10967 DW_TAG_enumeration_type DIEs from Ada units as stubs.
10969 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10971 Update copyright year range in all GDB files.
10973 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10975 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
10976 and gdb/testsuite/gdb.base/step-line.c.
10978 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10980 * copyright.py (main): Dump the contents of
10981 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
10982 even if BY_HAND is empty.
10984 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10986 * top.c (print_gdb_version): Update Copyright year in version
10989 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10991 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
10993 For older changes see ChangeLog-2017.
10999 version-control: never