1 2018-07-26 Tom Tromey <tromey@redhat.com>
3 * dbxread.c (end_psymtab): Use text_high_valid and
5 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
6 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
7 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
9 <text_low_valid, text_high_valid>: New fields.
10 <set_text_low, set_text_high>: Update.
11 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
13 2018-07-26 Tom Tromey <tom@tromey.com>
15 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
17 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
18 textlow and texthigh fields.
19 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
21 * mdebugread.c (parse_lines, parse_partial_symbols)
22 (psymtab_to_symtab_1): Update.
23 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
24 Rename fields. Update comment. Now private.
25 <text_low, text_high, set_text_low, set_text_high>: New methods.
26 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
27 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
28 (start_psymtab_common, maintenance_info_psymtabs)
29 (maintenance_check_psymtabs): Update.
30 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
32 (scan_xcoff_symtab): Update.
34 2018-07-26 Tom Tromey <tromey@redhat.com>
36 * psympriv.h (struct partial_symbol) <unrelocated_address,
37 address, set_address>: New methods.
38 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
39 (fixup_psymbol_section, relocate_psymtabs): Update.
40 (print_partial_symbols): Add 'objfile' parameter. Update.
41 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
44 2018-07-26 Tom Tromey <tom@tromey.com>
46 * dwarf-index-write.c (write_psymbols, debug_names::insert)
47 (debug_names::write_psymbols): Update.
48 * psympriv.h (struct partial_symbol): Derive from
50 <obj_section>: New method.
51 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
52 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
53 (find_pc_sect_psymbol, fixup_psymbol_section)
54 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
55 (print_partial_symbols, recursively_search_psymtabs)
56 (compare_psymbols, psymbol_hash, psymbol_compare)
57 (add_psymbol_to_bcache, maintenance_check_psymtabs)
58 (psymbol_name_matches, psym_fill_psymbol_map): Update.
60 2018-07-26 Tom Tromey <tromey@redhat.com>
62 * dbxread.c (end_psymtab): Remove dead code.
64 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
66 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
67 DWARF unwinders are disabled.
68 * dwarf2-frame.c: Add dwarf2read.h include.
69 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
71 (dwarf2_frame_unwinders_enabled_p): Define.
72 (show_dwarf_unwinders_enabled_p): New function.
73 (_initialize_dwarf2_frame): Register switch to control DWARF
75 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
76 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
77 (show_dwarf_cmdlist): Remove static keyword.
78 * dwarf2read.h (set_dwarf_cmdlist): Declare.
79 (show_dwarf_cmdlist): Declare.
80 * NEWS: Document new feature.
82 2018-07-26 Tom de Vries <tdevries@suse.de>
85 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
87 2018-07-26 Tom de Vries <tdevries@suse.de>
89 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
90 DW_AT_count can't be translated to a dynamic prop.
92 2018-07-25 Tom de Vries <tdevries@suse.de>
94 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
97 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
99 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
101 2018-07-25 Joel Brobecker <brobecker@adacore.com>
103 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
105 2018-07-24 Keith Seitz <keiths@redhat.comt
108 * dwarf2read.c (dw2_add_symbol_to_list): New function.
109 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
110 instead of add_symbol_to_list.
111 (read_file_scope): Call prepare_one_comp_unit before reading
114 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
116 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
118 2018-07-24 Tom Tromey <tom@tromey.com>
120 * utils.c (malloc, realloc, free): Don't declare.
121 * configure, config.in: Rebuild.
122 * configure.ac: Don't check for declarations of free, malloc, or
125 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
127 * aarch64-linux-nat.c
128 (aarch64_linux_nat_target::stopped_data_address): Remove unused
130 * arm-linux-nat.c (fetch_regs): Likewise.
131 (store_regs): Likewise.
132 (fetch_vfp_regs): Likewise.
133 (store_vfp_regs): Likewise.
134 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
135 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
136 (arm_linux_nat_target::insert_watchpoint): Likewise.
137 (arm_linux_nat_target::remove_watchpoint): Likewise.
138 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
140 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
142 * ppc-linux-nat.c (fetch_register): Likewise.
143 (fetch_all_gp_regs): Likewise.
144 (fetch_ppc_registers): Likewise.
145 (store_all_gp_regs): Likewise.
146 (store_ppc_registers): Likewise.
147 (hwdebug_insert_point): Likewise.
148 (can_use_watchpoint_cond_accel): Likewise.
149 * remote-sim.c (gdb_os_write_stdout): Likewise.
151 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
152 Tom Tromey <tom@tromey.com>
154 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
156 * configure: Rebuild.
158 2018-07-22 Tom Tromey <tom@tromey.com>
160 * regformats/regdat.sh: Define xmltarget_${name} inside
161 #ifndef IN_PROCESS_AGENT.
163 2018-07-22 Tom Tromey <tom@tromey.com>
165 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
167 2018-07-22 Tom Tromey <tom@tromey.com>
169 * symfile.c (reread_symbols): Notify iter, not objfile.
171 2018-07-22 Tom Tromey <tom@tromey.com>
173 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
175 (ravenscar_thread_target::prepare_to_store): Likewise.
177 2018-07-22 Tom Tromey <tom@tromey.com>
179 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
180 unused variable. Call value_fetch_lazy when needed.
181 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
182 Remove unused variable. Call value_fetch_lazy when needed.
184 2018-07-22 Tom Tromey <tom@tromey.com>
186 * m32c-tdep.c (mark_dma): Return void.
187 (make_regs): Remove unused declarations.
189 2018-07-22 Tom Tromey <tom@tromey.com>
191 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
192 cmdscm_get_valid_command_smob_arg_unsafe for effect.
193 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
194 bkscm_get_valid_block_smob_arg_unsafe for effect.
196 2018-07-22 Tom Tromey <tom@tromey.com>
198 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
201 2018-07-22 Tom Tromey <tom@tromey.com>
203 * windows-nat.c (saved_context): Conditionally define.
204 * remote.c (remote_target::remote_btrace_maybe_reopen):
205 Conditionally declare "warned".
206 * inflow.c (sigquit_ours): Conditionally define.
207 (new_tty): Move "tty" declaration inside #if.
208 * guile/guile.c (guile_datadir): Conditionally define.
209 * charset.c (set_be_le_names): Move some declarations inside #if.
210 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
212 (parse_xml_btrace_conf): Likewise.
214 2018-07-22 Tom Tromey <tom@tromey.com>
216 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
218 2018-07-22 Tom Tromey <tom@tromey.com>
220 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
221 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
222 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
223 * buildsym-legacy.c (get_macro_table): Remove unused variable.
224 * stack.c (frame_apply_level_command): Remove unused variable.
225 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
226 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
227 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
229 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
230 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
231 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
233 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
234 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
236 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
237 Remove unused variable.
238 * cli/cli-script.c (recurse_read_control_structure): Remove unused
240 * common/tdesc.c (print_xml_feature::visit): Remove unused
242 * compile/compile-object-load.c (store_regs): Remove unused
244 * complaints.c (clear_complaints): Remove unused variable.
245 * corelow.c (core_target_open): Remove unused variable.
246 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
248 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
250 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
252 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
254 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
256 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
258 * ia64-tdep.c (examine_prologue): Remove unused variable.
259 * infcall.c (run_inferior_call): Remove unused variable.
260 * inferior.c (exit_inferior): Remove unused variable.
261 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
262 * linespec.c (decode_line_2): Remove unused variable.
263 * linux-nat.c (super_close): Remove.
264 * linux-tdep.c (linux_info_proc): Remove unused variable.
265 * mi/mi-main.c (mi_execute_command): Remove unused variable.
266 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
267 Remove unused variable.
268 * parse.c (find_minsym_type_and_address): Remove unused variable.
269 * printcmd.c (info_symbol_command, printf_floating): Remove unused
271 * python/py-breakpoint.c (bppy_set_commands): Remove unused
273 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
275 * record-btrace.c (record_btrace_target::store_registers): Remove
277 (cmd_show_record_btrace_cpu): Remove unused variable.
278 * riscv-tdep.c (riscv_register_reggroup_p)
279 (riscv_push_dummy_call, riscv_return_value): Remove unused
281 * rust-exp.y (literal): Remove unused variable.
282 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
284 <STRUCTOP_ANONYMOUS>: Likewise.
285 * s390-linux-tdep.c (s390_linux_init_abi_31)
286 (s390_linux_init_abi_64): Remove unused variable.
287 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
288 (file_select_thread, net_windows_open, _initialize_ser_windows):
289 Remove unused variables.
290 * symtab.c (find_pc_sect_line): Remove unused variable.
291 * target-memory.c (compute_garbled_blocks): Remove unused
293 (target_write_memory_blocks): Remove unused variable.
294 * target.c (target_stack::unpush): Remove unused variables.
295 * tracepoint.c (start_tracing, all_tracepoint_actions)
296 (merge_uploaded_trace_state_variables)
297 (print_one_static_tracepoint_marker): Remove unused variable.
298 * unittests/basic_string_view/element_access/char/1.cc (test01):
299 Remove unused variable.
300 * windows-nat.c (windows_continue, windows_add_all_dlls)
301 (do_initial_windows_stuff, windows_nat_target::create_inferior):
302 Remove unused variables.
304 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
306 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
307 attr_profile in HAVE_ELF.
308 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
311 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
313 * frame.c (frame_register_unwind): Change parameter name.
314 (frame_unwind_register): Likewise.
315 (frame_unwind_register_value): Likewise.
316 (frame_unwind_register_signed): Likewise.
317 (frame_unwind_register_unsigned): Likewise.
318 * frame.h (frame_register_unwind): Likewise.
319 (frame_unwind_register): Likewise.
320 (frame_unwind_register_value): Likewise.
321 (frame_unwind_register_signed): Likewise.
322 (frame_unwind_register_unsigned): Likewise.
323 (frame_unwind_arch): Likewise.
325 2018-07-20 Maciej W. Rozycki <macro@mips.com>
327 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
330 2018-07-20 Maciej W. Rozycki <macro@mips.com>
332 * mips-linux-nat.c (mips_linux_nat_target::read_description):
333 Call `get_ptrace_pid' rather than extracting the ptrace PID by
336 2018-07-20 Keith Seitz <keiths@redhat.com>
338 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
339 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
340 m_compunit_symtab, m_language>: Add "m_" prefix.
342 * buildsym.c: Update all uses.
344 2018-07-20 Tom Tromey <tom@tromey.com>
346 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
347 * buildsym.h (record_line_ftype): Remove typedef.
349 2018-07-20 Tom Tromey <tom@tromey.com>
351 * buildsym-legacy.h (augment_type_symtab): Don't declare.
352 (end_expandable_symtab): Likewise.
353 (end_symtab_get_static_block): Likewise.
354 (end_symtab_from_static_block): Likewise.
355 * buildsym-legacy.c (augment_type_symtab): Remove.
356 (end_expandable_symtab): Remove.
357 (end_symtab_get_static_block): Remove.
358 (end_symtab_from_static_block): Remove.
360 2018-07-20 Tom Tromey <tom@tromey.com>
362 * dwarf2read.c: Include buildsym.h.
363 (struct dwarf2_cu) <builder>: New method.
364 (fixup_go_packaging): Update.
365 (process_full_comp_unit, process_full_type_unit): Update. Don't
366 use scoped_free_pendings.
367 (using_directives): Add "cu" parameter, remove "language".
368 (read_import_statement, setup_type_unit_groups, )
369 (read_func_scope, read_lexical_block_scope)
370 (dwarf2_record_block_ranges, read_namespace): Update.
371 (lnp_state_machine::lnp_state_machine): Add cu parameter.
372 (lnp_state_machine::handle_end_sequence): Update.
373 (class lnp_state_machine) <m_cu>: New member.
374 <m_record_line_callback>: Remove.
375 <m_currently_recording_lines>: New member.
376 (lnp_state_machine::handle_set_file): Update.
377 (noop_record_line): Remove.
378 (dwarf_record_line_p): Add cu parameter.
379 (dwarf_record_line_1, dwarf_finish_line): Likewise.
380 (lnp_state_machine::record_line)
381 (lnp_state_machine::lnp_state_machine)
382 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
383 (dwarf_decode_lines): Update.
384 (dwarf2_start_subfile): Add cu parameter.
385 (dwarf2_start_symtab, new_symbol): Update.
386 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
387 Remove dwarf2_per_objfile parameter.
388 (dwarf_decode_macros): Update.
390 2018-07-20 Tom Tromey <tom@tromey.com>
392 * stabsread.c (define_symbol): Update.
393 * buildsym-legacy.h (get_buildsym_compunit): Declare.
394 * dwarf2read.c (new_symbol): Update.
395 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
396 * cp-namespace.c: Include buildsym.h.
397 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
398 * buildsym-legacy.c (get_buildsym_compunit): New function.
400 2018-07-20 Tom Tromey <tom@tromey.com>
402 * xcoffread.c: Include buildsym-legacy.h.
403 * windows-nat.c: Include buildsym-legacy.h.
404 * stabsread.c: Include buildsym-legacy.h.
405 * mdebugread.c: Include buildsym-legacy.h.
406 * buildsym-legacy.h: New file.
407 * buildsym-legacy.c: New file, from buildsym.c.
408 * go32-nat.c: Include buildsym-legacy.h.
409 * dwarf2read.c: Include buildsym-legacy.h.
410 * dbxread.c: Include buildsym-legacy.h.
411 * cp-namespace.c: Include buildsym-legacy.h.
412 * coffread.c: Include buildsym-legacy.h.
413 * buildsym.h: Move some contents to buildsym-legacy.h.
414 * buildsym.c: Include buildsym-legacy.h. Move many functions to
416 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
418 2018-07-20 Tom Tromey <tom@tromey.com>
420 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
421 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
422 (buildsym_compunit::buildsym_compunit)
423 (buildsym_compunit::~buildsym_compunit)
424 (buildsym_compunit::get_macro_table): Define.
426 2018-07-20 Tom Tromey <tom@tromey.com>
428 * buildsym.c (reset_symtab_globals): Remove.
429 (buildsym_compunit::end_symtab_from_static_block): Update.
430 (buildsym_compunit::augment_type_symtab): Update.
431 (end_symtab_from_static_block): Call free_buildsym_compunit.
432 (augment_type_symtab, end_symtab, end_expandable_symtab):
435 2018-07-20 Tom Tromey <tom@tromey.com>
437 * arch-utils.c: Do not include buildsym.h.
438 * mipsread.c: Do not include buildsym.h.
439 * machoread.c: Do not include buildsym.h.
440 * elfread.c: Do not include buildsym.h.
442 2018-07-20 Tom Tromey <tom@tromey.com>
444 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
446 (buildsym_compunit): Add new constructor.
447 (struct buildsym_compunit) <get_last_source_file, finish_block,
448 record_block_range, start_subfile, patch_subfile_names,
449 push_subfile, pop_subfile, record_line, get_compunit_symtab,
450 set_last_source_start_addr, get_last_source_start_addr,
451 get_local_using_directives, set_local_using_directives,
452 get_global_using_directives, outermost_context_p,
453 get_current_context_stack, get_context_stack_depth,
454 get_current_subfile, get_local_symbols, get_file_symbols,
455 get_global_symbols, record_debugformat, record_producer,
456 push_context, pop_context, end_symtab_get_static_block,
457 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
459 <record_pending_block, finish_block_internal, make_blockvector,
460 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
464 2018-05-22 Tom Tromey <tom@tromey.com>
466 * buildsym.c (record_pending_block): Move earlier. Remove objfile
468 (finish_block_internal): Update.
470 2018-07-20 Tom Tromey <tom@tromey.com>
472 * buildsym.c (record_pending_block): Move earlier. Remove objfile
474 (finish_block_internal): Update.
476 2018-07-20 Tom Tromey <tom@tromey.com>
478 * buildsym.h (EXTERN): Don't define or undef.
479 * buildsym.c (EXTERN): Don't define.
481 2018-07-20 Tom Tromey <tom@tromey.com>
483 * buildsym.c: Remove TODO comment.
485 2018-07-20 Tom Tromey <tom@tromey.com>
487 * coffread.c (coff_symtab_read): Update.
488 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
489 (xcoff_new_init): Update.
490 * mipsread.c (mipscoff_new_init): Update.
491 * mdebugread.c (mdebug_build_psymtabs): Update.
492 * elfread.c (elf_new_init): Update.
493 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
495 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
496 (coffstab_build_psymtabs, elfstab_build_psymtabs)
497 (stabsect_build_psymtabs): Update.
498 * buildsym.h (buildsym_init): Don't declare.
499 * buildsym.c: Update comment.
500 (prepare_for_building): Remove.
501 (start_symtab, restart_symtab): Update.
502 (reset_symtab_globals): Update comment.
503 (buildsym_init): Remove.
505 2018-07-20 Tom Tromey <tom@tromey.com>
507 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
508 * stabsread.c (patch_block_stabs, define_symbol, read_type)
509 (read_enum_type, common_block_start, common_block_end)
510 (cleanup_undefined_types_1, finish_global_stabs): Update.
511 * mdebugread.c (psymtab_to_symtab_1): Update.
512 * dwarf2read.c (fixup_go_packaging, read_func_scope)
513 (read_lexical_block_scope, new_symbol): Update.
514 * dbxread.c (process_one_symbol): Update.
515 * coffread.c (coff_symtab_read, process_coff_symbol)
516 (coff_read_enum_type): Update.
517 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
519 (get_local_symbols, get_file_symbols, get_global_symbols): New
521 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
523 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
524 (~scoped_free_pendings): Update.
525 (finish_block, prepare_for_building, reset_symtab_globals)
526 (end_symtab_get_static_block, end_symtab_with_blockvector)
527 (augment_type_symtab, push_context): Update.
528 (get_local_symbols, get_file_symbols, get_global_symbols): New
530 (buildsym_init): Update.
532 2018-07-20 Tom Tromey <tom@tromey.com>
534 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
535 (process_full_type_unit): Likewise.
536 (dwarf2_start_symtab): Set list_in_scope.
538 2018-07-20 Tom Tromey <tom@tromey.com>
540 * dwarf2read.c (process_psymtab_comp_unit_reader)
541 (build_type_psymtabs_reader): Do not set list_in_scope.
543 2018-07-20 Tom Tromey <tom@tromey.com>
545 * buildsym.c (free_pendings): Remove.
546 (add_symbol_to_list, scoped_free_pendings)
547 (finish_block_internal, buildsym_init): Update.
549 2018-07-20 Tom Tromey <tom@tromey.com>
551 * xcoffread.c (read_xcoff_symtab): Update.
552 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
554 * dbxread.c (process_one_symbol): Update.
555 * coffread.c (coff_symtab_read): Update.
556 * buildsym.h (finish_block): Update.
557 * buildsym.c (finish_block): Remove "listhead" argument.
558 (end_symtab_get_static_block): Update.
560 2018-07-20 Tom Tromey <tom@tromey.com>
562 * buildsym.h (class scoped_free_pendings): Remove constructor.
563 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
565 <m_pending_block_obstack, m_pending_blocks>: New members.
566 (pending_block_obstack, pending_blocks): Remove.
567 (scoped_free_pendings::scoped_free_pendings): Default.
568 (~scoped_free_pendings): Update.
569 (free_pending_blocks): Remove.
570 (finish_block_internal, record_pending_block, make_blockvector)
571 (end_symtab_get_static_block, augment_type_symtab, push_context)
572 (buildsym_init): Update.
574 2018-07-20 Tom Tromey <tom@tromey.com>
576 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
577 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
579 (pending_addrmap, pending_addrmap_obstack)
580 (pending_addrmap_interesting): Remove.
581 (scoped_free_pendings, record_block_range, make_blockvector)
582 (prepare_for_building, reset_symtab_globals, buildsym_init):
585 2018-07-20 Tom Tromey <tom@tromey.com>
587 * xcoffread.c (process_linenos): Update.
588 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
589 * mdebugread.c (psymtab_to_symtab_1): Update.
590 * dwarf2read.c (setup_type_unit_groups)
591 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
592 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
593 * dbxread.c (process_one_symbol): Update.
594 * coffread.c (coff_symtab_read, enter_linenos)
595 (process_coff_symbol): Update.
596 * buildsym.h (current_subfile): Don't declare.
597 (get_current_subfile): Declare.
598 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
600 (start_subfile, free_buildsym_compunit, push_subfile)
601 (prepare_for_building, start_symtab): Update.
602 (get_current_subfile): New function.
604 2018-07-20 Tom Tromey <tom@tromey.com>
606 * coffread.c (coff_symtab_read): Update.
607 * xcoffread.c (read_xcoff_symtab): Update.
608 * dwarf2read.c (new_symbol): Update.
609 (read_func_scope, read_lexical_block_scope): Update.
610 * dbxread.c (process_one_symbol): Update.
611 * buildsym.h (context_stack, context_stack_depth): Don't declare.
612 (outermost_context_p): Remove macro.
613 (outermost_context_p, get_current_context_stack)
614 (get_context_stack_depth): Declare.
615 (pop_context): Return struct context_stack.
616 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
618 (context_stack_size): Remove.
619 (INITIAL_CONTEXT_STACK_SIZE): Remove.
620 (prepare_for_building, end_symtab_get_static_block)
621 (augment_type_symtab, push_context): Update.
622 (pop_context): Return struct context_stack.
623 (outermost_context_p, get_current_context_stack)
624 (get_context_stack_depth): New functions.
625 (buildsym_init): Update.
627 2018-07-20 Tom Tromey <tom@tromey.com>
629 * rust-exp.y: Now a pure parser. Update all rules.
630 (%union): Move earlier.
631 (current_parser, work_obstack): Remove globals.
632 (rust_parser, ~rust_parser): Update.
633 (class rust_parser) <copy_name, concat3, crate_name, super_name,
634 lex_character, lex_number, lex_string, lex_identifier,
635 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
636 convert_name, convert_params_to_expression,
637 convert_ast_to_expression, ast_basic_type, ast_operation,
638 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
639 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
640 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
641 ast_array_type, ast_slice_type, ast_reference_type,
642 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
643 (rust_parse): Update.
644 (rustyyerror, rustyylex): Add parser parameter.
645 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
646 (rust_lex_stringish_test, rust_lex_test_sequence)
647 (rust_lex_test_trailing_dot, rust_lex_test_completion)
648 (rust_lex_test_push_back, rust_lex_tests): Update.
650 2018-07-19 Pedro Alves <palves@redhat.com>
652 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
653 gdb::unique_xmalloc_ptr.
654 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
655 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
656 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
658 * guile/scm-pretty-print.c (ppscm_print_children): Use
659 gdb::unique_xmalloc_ptr instead of cleanups.
660 (gdbscm_apply_val_pretty_printer): Remove cleanups.
661 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
662 gdb::unique_xmalloc_ptr.
663 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
664 Adjust to use gdb::unique_xmalloc_ptr.
665 * guile/scm-utils.c (extract_arg): Adjust.
666 * guile/scm-value.c (gdbscm_value_field): Adjust to use
667 gdb::unique_xmalloc_ptr instead of a cleanup.
669 2018-07-19 Tom Tromey <tom@tromey.com>
671 * utils.c (do_value_free_to_mark)
672 (make_cleanup_value_free_to_mark): Remove.
673 * utils.h (make_cleanup_value_free_to_mark): Remove.
675 2018-07-19 Pedro Alves <palves@redhat.com>
677 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
678 forwarding reference.
680 2018-07-18 Pedro Alves <palves@redhat.com>
682 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
683 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
686 2018-07-18 Pedro Alves <palves@redhat.com>
688 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
690 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
692 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
693 directly instead of a cleanup.
694 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
695 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
696 (vlscm_binop_gdbthrow): New, factored out from ...
697 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
698 (vlscm_rich_compare): Use gdbscm_wrap.
699 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
700 instead of a cleanup.
701 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
703 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
704 Use xfree directly instead of a cleanup.
705 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
706 Adjust to use gdbscm_wrap and scoped_value_mark.
707 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
708 (gdbscm_value_address, gdbscm_value_dereference)
709 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
711 (gdbscm_value_dynamic_type): Use scoped_value_mark.
712 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
714 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
715 gdbscm_wrap and scoped_value_mark.
716 (gdbscm_value_to_string): Use xfree directly instead of a
717 cleanup. Move 'buffer' unique_ptr to TRY scope.
718 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
719 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
721 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
722 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
724 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
727 2018-07-18 Tom de Vries <tdevries@suse.de>
729 * findvar.c (default_read_var_value): Also resolve dynamic type for
730 LOC_OPTIMIZED_OUT vars.
732 2018-07-18 Maciej W. Rozycki <macro@mips.com>
734 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
737 2018-07-17 Tom Tromey <tom@tromey.com>
739 * guile/scm-param.c (pascm_set_func, pascm_show_func)
740 (compute_enum_list, pascm_set_param_value_x)
741 (gdbscm_parameter_value): Update.
742 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
743 (gdbscm_scm_to_host_string): Update.
744 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
746 * guile/scm-cmd.c (cmdscm_add_completion): Update.
747 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
748 * guile/scm-string.c (gdbscm_scm_to_string): Return
750 (gdbscm_scm_to_host_string): Likewise.
752 2018-07-17 Tom Tromey <tom@tromey.com>
754 * guile/guile.c (gdbscm_eval_from_control_command): Update.
755 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
756 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
757 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
760 2018-07-17 Tom Tromey <tom@tromey.com>
762 * guile/scm-param.c (pascm_signal_setshow_error): Update.
763 * guile/guile-internal.h (gdbscm_exception_message_to_string):
765 * guile/scm-cmd.c (cmdscm_function): Update.
766 * guile/scm-pretty-print.c
767 (ppscm_print_exception_unless_memory_error): Update.
768 * guile/scm-exception.c (gdbscm_exception_message_to_string):
769 Return unique_xmalloc_ptr.
771 2018-07-17 Tom Tromey <tom@tromey.com>
773 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
776 2018-07-17 Jim Wilson <jimw@sifive.com>
778 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
779 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
780 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
781 unecessary braces after EF_RISCV_RVC test. Delete call to
782 set_gdbarch_decr_pc_after_break.
784 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
785 RISCV_LAST_FP_REGNUM + 1.
786 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
788 2018-07-17 Tom Tromey <tom@tromey.com>
790 * configure.ac: Remove --disable-gdbcli.
791 * configure: Rebuild.
792 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
793 (SUBDIR_CLI_CFLAGS): Remove.
794 (SFILES): Use SUBDIR_CLI_SRCS.
795 (COMMON_OBS): Use SUBDIR_CLI_OBS.
797 2018-07-17 Tom Tromey <tom@tromey.com>
800 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
802 2018-07-16 Jim Wilson <jimw@sifive.com>
804 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
806 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
808 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
810 (libunwind_frame_sniffer): Likewise.
811 (libunwind_frame_prev_register): Likewise.
812 (libunwind_sigtramp_frame_sniffer): Likewise.
813 * ia64-tdep.c (ia64_access_reg): Likewise.
814 (ia64_access_rse_reg): Likewise.
815 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
816 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
818 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
820 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
822 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
824 * remote-sim.c (gdbsim_target::close,
825 gdbsim_target::mourn_inferior): Remove unused variables.
827 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
829 * ia64-tdep.c (ktab_buf): New global.
830 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
831 (get_kernel_table): Adjust.
833 2018-07-16 Tom Tromey <tom@tromey.com>
835 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
836 * dwarf2read.c (using_directives, new_symbol): Use
838 * dbxread.c (process_one_symbol): Use outermost_context_p.
839 * coffread.c (coff_symtab_read): Use outermost_context_p.
841 2018-07-16 Tom Tromey <tom@tromey.com>
843 * dwarf2read.c (using_directives, read_func_scope)
844 (read_lexical_block_scope): Update.
845 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
846 * buildsym.h (local_using_directives, global_using_directives):
848 (get_local_using_directives, set_local_using_directives)
849 (get_global_using_directives): Declare.
850 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
851 m_global_using_directives>: New members.
852 (finish_block_internal, prepare_for_building)
853 (reset_symtab_globals, end_symtab_get_static_block)
854 (push_context): Update.
855 (get_local_using_directives, set_local_using_directives)
856 (get_global_using_directives): New functions.
857 (buildsym_init): Update.
859 2018-07-16 Tom Tromey <tom@tromey.com>
861 * xcoffread.c (xcoff_initial_scan): Don't call
863 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
864 * buildsym.h (class scoped_free_pendings): Add constructor.
865 (free_pending_blocks): Don't declare.
866 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
867 (free_pending_blocks): Now static.
869 2018-07-16 Tom Tromey <tom@tromey.com>
871 * buildsym.h (push_subfile, pop_subfile): Update declarations.
872 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
874 (struct subfile_stack): Remove.
875 (subfile_stack): Remove.
876 (push_subfile, pop_subfile, buildsym_init): Update.
878 2018-07-16 Tom Tromey <tom@tromey.com>
880 * buildsym.c (push_subfile): Use gdb_assert.
881 (pop_subfile): Use gdb_assert.
883 2018-07-16 Tom Tromey <tom@tromey.com>
885 * buildsym.h (merge_symbol_lists): Remove.
886 * buildsym.c (merge_symbol_lists): Remove.
888 2018-07-16 Tom Tromey <tom@tromey.com>
890 * stabsread.c (scan_file_globals): Update comment.
891 * stabsread.h (scan_file_globals): Move from buildsym.h.
892 * buildsym.h (scan_file_globals): Move to stabsread.h.
894 2018-07-16 Tom Tromey <tom@tromey.com>
896 * xcoffread.c (xcoff_new_init): Update.
897 * mipsread.c (mipscoff_new_init): Update.
898 * mdebugread.c (mdebug_build_psymtabs): Update.
899 * elfread.c (elf_new_init): Update.
900 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
901 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
902 * buildsym.h (buildsym_new_init): Don't declare.
903 * buildsym.c (buildsym_new_init): Remove.
905 2018-07-16 Tom Tromey <tom@tromey.com>
907 * stabsread.h (within_function): Move from buildsym.h.
908 * stabsread.c (start_stabs): Clear within_function.
909 * coffread.c (coff_start_symtab): Clear within_function.
910 * buildsym.h (within_function): Move to stabsread.h.
911 * buildsym.c (prepare_for_building): Update.
913 2018-07-16 Tom Tromey <tom@tromey.com>
915 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
916 * dwarf2read.c (dwarf2_start_symtab): Don't set
917 processing_gcc_compilation.
918 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
920 2018-07-16 Tom Tromey <tom@tromey.com>
922 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
923 (next_symbol_text_func): Move from buildsym.h.
924 * stabsread.c (hashname): Move from buildsym.c.
925 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
926 (next_symbol_text_func, hashname): Move to stabsread.h.
927 * buildsym.c: Don't include bcache.h
928 (hashname): Move to stasbread.c.
930 2018-07-16 Tom Tromey <tom@tromey.com>
932 * buildsym.h (context_stack_size): Don't declare.
933 * buildsym.c (context_stack_size): New global.
935 2018-07-16 Tom Tromey <tom@tromey.com>
937 * dbxread.c (processing_acc_compilation): New global.
938 * buildsym.h (processing_acc_compilation): Don't declare.
940 2018-07-16 Tom Tromey <tom@tromey.com>
942 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
943 * dbxread.c (read_ofile_symtab): Update.
944 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
945 * buildsym.h (last_source_start_addr): Remove.
946 (set_last_source_start_addr, get_last_source_start_addr):
948 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
950 (struct buildsym_compunit) <m_last_source_start_addr>: New
952 (prepare_for_building): Remove start_addr parameter.
953 (start_symtab, restart_symtab, end_symtab_get_static_block)
954 (end_symtab_with_blockvector): Update.
955 (set_last_source_start_addr, get_last_source_start_addr): New
958 2018-07-16 Tom Tromey <tom@tromey.com>
960 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
962 (have_line_numbers): Remove.
963 (record_line, prepare_for_building, end_symtab_get_static_block)
964 (augment_type_symtab): Update.
966 2018-07-16 Tom Tromey <tom@tromey.com>
968 * buildsym.c (~buildsym_compunit): Free the macro table.
969 (struct buildsym_compunit) <get_macro_table, release_macros>: New
971 <m_pending_macros>: New member.
972 (pending_macros): Remove.
973 (~scoped_free_pendings, get_macro_table, prepare_for_building)
974 (reset_symtab_globals, end_symtab_get_static_block)
975 (end_symtab_with_blockvector, augment_type_symtab)
976 (buildsym_init): Update.
978 2018-07-16 Tom Tromey <tom@tromey.com>
980 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
982 (buildsym_compunit::set_last_source_file): New method.
983 <m_last_source_file>: New member.
984 (prepare_for_building): Remove "name" parameter.
985 (start_symtab, restart_symtab, reset_symtab_globals): Update.
986 (last_source_file): Remove.
987 (set_last_source_file, get_last_source_file): Update.
989 2018-07-16 Tom Tromey <tom@tromey.com>
991 * buildsym.c (prepare_for_building): Add assert.
993 2018-07-16 Tom Tromey <tom@tromey.com>
995 * buildsym.c (~buildsym_compunit): Update.
996 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
997 (start_subfile, patch_subfile_names)
998 (end_symtab_with_blockvector): Update.
1000 2018-07-16 Tom Tromey <tom@tromey.com>
1002 * buildsym.c (struct buildsym_compunit): Add constructor,
1003 destructor, initializers.
1004 (start_buildsym_compunit): Remove.
1005 (free_buildsym_compunit): Use "delete".
1006 (start_symtab, restart_symtab): Use "new".
1008 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1010 * symfile.c (set_objfile_default_section_offset): Remove struct
1013 2018-07-14 Stafford Horne <shorne@gmail.com>
1015 * (Responsible Maintainers): Add myself as or1k maintainer.
1017 2018-07-13 Tom Tromey <tom@tromey.com>
1019 * symfile.c (set_objfile_default_section_offset): Use extra braces
1022 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1024 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1027 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1029 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1030 unittests/cli-utils-selftests.c
1031 * unittests/cli-utils-selftests.c: New file.
1033 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1035 * NEWS: Mention new commands. Mention change to 'thread apply'.
1037 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1039 * thread.c (thr_try_catch_cmd): New function.
1040 (thread_apply_all_command): Handle qcs flags.
1041 (thread_apply_command): Handle qcs flags.
1042 (taas_command): New function.
1043 (tfaas_command): New function.
1044 (_initialize_thread): Update to setup the new commands 'taas
1045 and 'tfaas'. Change doc string for 'thread apply'.
1047 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1049 * stack.c: (trailing_outermost_frame): New function, mostly
1050 extracted from backtrace_command_1.
1051 (leading_innermost_frame): New function.
1052 (backtrace_command_1): Update to call trailing_outermost_frame.
1053 (frame_apply_command_count): New function.
1054 (frame_apply_level_command): New function.
1055 (frame_apply_all_command): New function.
1056 (frame_apply_command): New function.
1057 (faas_command): New function.
1058 (frame_cmd_list): New variable.
1059 (_initialize_stack): Update to setup the new commands 'frame apply'
1062 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1064 * cli-utils.c (number_or_range_parser::get_number): Only handle
1065 numbers or convenience var as numbers.
1066 (parse_flags): New function.
1067 (parse_flags_qcs): New function.
1068 (number_or_range_parser::finished): Ensure parsing end is detected
1069 before end of string.
1070 * cli-utils.h (parse_flags): New function.
1071 (parse_flags_qcs): New function.
1072 (number_or_range_parser): Remove m_finished bool.
1073 (number_or_range_parser::skip_range): Set m_in_range to false.
1075 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
1077 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1080 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1081 Jan Kratochvil <jan.kratochvil@redhat.com>
1082 Paul Fertser <fercerpav@gmail.com>
1083 Tsutomu Seki <sekiriki@gmail.com>
1084 Pedro Alves <palves@redhat.com>
1086 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1087 'unittests/parse-connection-spec-selftests.c'.
1088 (COMMON_SFILES): Add 'common/netstuff.c'.
1089 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1090 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1091 * common/netstuff.c: New file.
1092 * common/netstuff.h: New file.
1093 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1094 (wait_for_connect): Update comment. New parameter
1095 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1096 Use 'sock' directly instead of 'scb->fd'.
1097 (try_connect): New function, with code from 'net_open'.
1098 (net_open): Rewrite main loop to deal with multiple
1099 sockets/addresses. Handle IPv6-style hostnames; implement
1100 support for IPv6 connections.
1101 * unittests/parse-connection-spec-selftests.c: New file.
1103 2018-07-11 Pedro Alves <palves@redhat.com>
1106 * remote.c (remote_target::remote_detach_pid): Call
1107 set_current_process.
1109 2018-07-11 Pedro Alves <palves@redhat.com>
1111 * h8300-tdep.c (h8300_gdbarch_init): Remove
1112 set_gdbarch_ecoff_reg_to_regnum calls.
1114 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1117 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1118 offsets/sizes for static members of a class/struct.
1120 2018-07-11 Alan Hayward <alan.hayward@arm.com>
1122 * target-descriptions.c (tdesc_register_bitsize): Rename.
1123 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1124 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1125 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1127 2018-07-10 Tom Tromey <tom@tromey.com>
1129 * breakpoint.c (moribund_locations): Now static and a
1131 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1132 (build_bpstat_chain, update_global_location_list)
1133 (breakpoint_retire_moribund): Update.
1134 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1137 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1139 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1140 (riscv_register_reggroup_p): Use new function, remove unneeded
1142 (riscv_push_dummy_call): Extend assert to compare against xlen or
1143 flen based on register type.
1145 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1147 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1149 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1151 * remote.c (show_hardware_watchpoint_limit): New function.
1152 (show_hardware_watchpoint_length_limit): New function.
1153 (show_hardware_breakpoint_limit): New function.
1154 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1155 where appropriate, update help text.
1157 2018-07-09 Tom Tromey <tom@tromey.com>
1159 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1160 (CLIBS): Don't mention NAT_CLIBS.
1162 2018-07-09 Tom Tromey <tom@tromey.com>
1164 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1165 (LIBGDB_OBS, clean mostlyclean): Update.
1166 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1168 2018-07-09 Tom Tromey <tom@tromey.com>
1170 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1171 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1172 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1174 2018-07-09 Tom Tromey <tom@tromey.com>
1176 * Makefile.in (ALLDEPFILES): Remove exec.c.
1177 (COMMON_OBS): Remove exec.o.
1178 (COMMON_SFILES): Add exec.c.
1180 2018-07-09 Tom Tromey <tom@tromey.com>
1182 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1184 2018-07-09 Tom Tromey <tom@tromey.com>
1186 * Makefile.in (clean mostlyclean): Remove stamp-version.
1187 (version.c): Depend on stamp-version.
1188 (stamp-version): New rule, from version.c rule.
1190 2018-07-09 Tom Tromey <tom@tromey.com>
1192 * Makefile.in (init.c): Depend on stamp-init.
1193 (stamp-init): New rule, from init.c rule.
1194 (clean mostlyclean): Remove stamp-init.
1196 2018-07-09 Tom Tromey <tom@tromey.com>
1198 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1199 SUBDIR_GCC_COMPILE_SRCS.
1201 2018-07-09 Tom Tromey <tom@tromey.com>
1203 * Makefile.in (init.c): Remove some unused sed rules.
1205 2018-07-09 Tom Tromey <tom@tromey.com>
1207 * Makefile.in (TSOBS): Remove.
1208 (INIT_FILES): Update.
1209 (LIBGDB_OBS): Update.
1210 (COMMON_SFILES): Add inflow.c.
1211 (SFILES): Remove inflow.c.
1213 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1215 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1217 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1219 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1220 get_saveloc_name, is_signal_frame_name, step_name,
1221 init_remote_name, create_addr_space_name,
1222 destroy_addr_space_name, search_unwind_table_name,
1223 find_dyn_list_name): Constify.
1225 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1227 * darwin-nat.c (darwin_pthread_kill): New function.
1228 (darwin_resume_thread): Use darwin_pthread_kill.
1230 2018-07-05 Tom de Vries <tdevries@suse.de>
1232 * macroexp.c (macro_buffer) <operator=>: New member function.
1234 2018-07-04 Tom Tromey <tom@tromey.com>
1236 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1238 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
1240 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1241 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1242 * maint.c: Likewise.
1245 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1247 * NEWS: Create a new section for the next release branch.
1248 Rename the section of the current branch, now that it has
1251 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1253 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1254 * version.in: Bump version to 8.2.50.DATE-git.
1256 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1257 Pedro Alves <palves@redhat.com>
1259 * linux-nat.c (linux_init_ptrace): Rename to ...
1260 (linux_init_ptrace_procfs): ... this. Call
1261 linux_proc_init_warnings.
1262 (linux_nat_target::post_attach)
1263 (linux_nat_target::post_startup_inferior): Adjust.
1264 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1265 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1267 2018-07-04 Tom de Vries <tdevries@suse.de>
1269 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1271 (read_comp_unit_head): ... here.
1273 2018-07-03 Tom Tromey <tom@tromey.com>
1275 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1276 (stop_tracing, tstatus_command)
1277 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1278 (print_one_static_tracepoint_marker): Update.
1279 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1281 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
1283 (all_tracepoints, static_tracepoints_here): Return std::vector.
1285 2018-07-03 Tom Tromey <tom@tromey.com>
1287 * common/ptid.c (ptid_equal): Remove.
1288 * common/ptid.h (ptid_equal): Don't declare.
1289 * ada-tasks.c: Update.
1290 * breakpoint.c: Update.
1291 * common/agent.c: Update.
1292 * corelow.c: Update.
1293 * darwin-nat-info.c: Update.
1294 * darwin-nat.c: Update.
1296 * dtrace-probe.c: Update.
1297 * dummy-frame.c: Update.
1298 * fbsd-nat.c: Update.
1300 * gdbthread.h: Update.
1301 * gnu-nat.c: Update.
1302 * go32-nat.c: Update.
1303 * inf-loop.c: Update.
1304 * inf-ptrace.c: Update.
1305 * infcall.c: Update.
1309 * linux-fork.c: Update.
1310 * linux-nat.c: Update.
1311 * linux-thread-db.c: Update.
1312 * mi/mi-cmd-var.c: Update.
1313 * mi/mi-interp.c: Update.
1314 * mi/mi-main.c: Update.
1315 * nto-procfs.c: Update.
1316 * ppc-linux-tdep.c: Update.
1318 * python/py-inferior.c: Update.
1319 * python/py-record-btrace.c: Update.
1320 * python/py-record.c: Update.
1321 * ravenscar-thread.c: Update.
1322 * regcache.c: Update.
1323 * remote-sim.c: Update.
1325 * sol-thread.c: Update.
1328 * tui/tui-stack.c: Update.
1330 * windows-nat.c: Update.
1331 * windows-tdep.c: Update.
1333 2018-07-03 Tom Tromey <tom@tromey.com>
1335 * common/ptid.c (ptid_match): Remove.
1336 * common/ptid.h (ptid_match): Don't declare.
1337 * fbsd-nat.c: Update.
1340 * linux-nat.c: Update.
1341 * record-btrace.c: Update.
1342 * regcache.c: Update.
1345 2018-07-03 Tom Tromey <tom@tromey.com>
1347 * common/ptid.c (ptid_tid_p): Remove.
1348 * common/ptid.h (ptid_tid_p): Don't declare.
1349 * sol-thread.c: Update.
1351 2018-07-03 Tom Tromey <tom@tromey.com>
1353 * common/ptid.c (ptid_lwp_p): Remove.
1354 * common/ptid.h (ptid_lwp_p): Don't declare.
1355 * fbsd-nat.c: Update.
1356 * linux-nat.c: Update.
1357 * nat/linux-procfs.c: Update.
1358 * nat/x86-linux-dregs.c: Update.
1359 * sol-thread.c: Update.
1361 2018-07-03 Tom Tromey <tom@tromey.com>
1363 * common/ptid.c (ptid_is_pid): Remove.
1364 * common/ptid.h (ptid_is_pid): Don't declare.
1366 * linux-nat.c: Update.
1367 * mi/mi-interp.c: Update.
1371 2018-07-03 Tom Tromey <tom@tromey.com>
1373 * common/ptid.c (ptid_get_tid): Remove.
1374 * common/ptid.h (ptid_get_tid): Don't declare.
1375 * ada-tasks.c: Update.
1376 * aix-thread.c: Update.
1377 * bsd-uthread.c: Update.
1378 * darwin-nat.c: Update.
1379 * fbsd-nat.c: Update.
1380 * i386-darwin-nat.c: Update.
1382 * linux-tdep.c: Update.
1383 * nto-procfs.c: Update.
1384 * ppc-ravenscar-thread.c: Update.
1385 * python/py-infthread.c: Update.
1386 * ravenscar-thread.c: Update.
1387 * sol-thread.c: Update.
1388 * sparc-ravenscar-thread.c: Update.
1389 * windows-nat.c: Update.
1391 2018-07-03 Tom Tromey <tom@tromey.com>
1393 * common/ptid.c (ptid_get_lwp): Remove.
1394 * common/ptid.h (ptid_get_lwp): Don't declare.
1395 * aarch64-linux-nat.c: Update.
1396 * ada-tasks.c: Update.
1397 * aix-thread.c: Update.
1398 * amd64-linux-nat.c: Update.
1399 * arm-linux-nat.c: Update.
1400 * corelow.c: Update.
1401 * fbsd-nat.c: Update.
1402 * fbsd-tdep.c: Update.
1403 * gnu-nat.c: Update.
1404 * i386-cygwin-tdep.c: Update.
1405 * i386-gnu-nat.c: Update.
1406 * i386-linux-nat.c: Update.
1407 * ia64-linux-nat.c: Update.
1408 * inf-ptrace.c: Update.
1410 * linux-fork.c: Update.
1411 * linux-nat.c: Update.
1412 * linux-tdep.c: Update.
1413 * linux-thread-db.c: Update.
1414 * mips-linux-nat.c: Update.
1415 * nat/aarch64-linux-hw-point.c: Update.
1416 * nat/aarch64-linux.c: Update.
1417 * nat/linux-btrace.c: Update.
1418 * nat/linux-osdata.c: Update.
1419 * nat/linux-procfs.c: Update.
1420 * nat/x86-linux-dregs.c: Update.
1421 * obsd-nat.c: Update.
1422 * ppc-fbsd-nat.c: Update.
1423 * ppc-linux-nat.c: Update.
1425 * python/py-infthread.c: Update.
1426 * ravenscar-thread.c: Update.
1428 * s390-linux-nat.c: Update.
1429 * sol-thread.c: Update.
1430 * sol2-tdep.c: Update.
1431 * spu-linux-nat.c: Update.
1432 * x86-linux-nat.c: Update.
1433 * xtensa-linux-nat.c: Update.
1435 2018-07-03 Tom Tromey <tom@tromey.com>
1437 * common/ptid.c (ptid_get_pid): Remove.
1438 * common/ptid.h (ptid_get_pid): Don't declare.
1439 * aarch64-linux-nat.c: Update.
1440 * ada-lang.c: Update.
1441 * aix-thread.c: Update.
1442 * alpha-bsd-nat.c: Update.
1443 * amd64-fbsd-nat.c: Update.
1444 * amd64-linux-nat.c: Update.
1445 * arm-linux-nat.c: Update.
1446 * arm-nbsd-nat.c: Update.
1448 * break-catch-syscall.c: Update.
1449 * breakpoint.c: Update.
1450 * bsd-uthread.c: Update.
1451 * corelow.c: Update.
1453 * darwin-nat.c: Update.
1454 * fbsd-nat.c: Update.
1455 * fbsd-tdep.c: Update.
1457 * gnu-nat.c: Update.
1458 * hppa-nbsd-nat.c: Update.
1459 * hppa-obsd-nat.c: Update.
1460 * i386-fbsd-nat.c: Update.
1461 * ia64-linux-nat.c: Update.
1462 * inf-ptrace.c: Update.
1464 * inferior.c: Update.
1465 * inferior.h: Update.
1468 * linux-fork.c: Update.
1469 * linux-nat.c: Update.
1470 * linux-tdep.c: Update.
1471 * linux-thread-db.c: Update.
1472 * m68k-bsd-nat.c: Update.
1473 * mi/mi-interp.c: Update.
1474 * mi/mi-main.c: Update.
1475 * mips-linux-nat.c: Update.
1476 * mips-nbsd-nat.c: Update.
1477 * mips64-obsd-nat.c: Update.
1478 * nat/aarch64-linux-hw-point.c: Update.
1479 * nat/aarch64-linux.c: Update.
1480 * nat/linux-btrace.c: Update.
1481 * nat/linux-osdata.c: Update.
1482 * nat/linux-procfs.c: Update.
1483 * nat/x86-linux-dregs.c: Update.
1484 * nto-procfs.c: Update.
1485 * obsd-nat.c: Update.
1486 * ppc-linux-nat.c: Update.
1487 * ppc-nbsd-nat.c: Update.
1488 * ppc-obsd-nat.c: Update.
1489 * proc-service.c: Update.
1491 * python/py-inferior.c: Update.
1492 * python/py-infthread.c: Update.
1493 * ravenscar-thread.c: Update.
1495 * remote-sim.c: Update.
1497 * rs6000-nat.c: Update.
1498 * s390-linux-nat.c: Update.
1499 * sh-nbsd-nat.c: Update.
1500 * sol-thread.c: Update.
1501 * sparc-nat.c: Update.
1502 * sparc64-tdep.c: Update.
1503 * spu-linux-nat.c: Update.
1504 * spu-tdep.c: Update.
1505 * target-debug.h: Update.
1508 * tid-parse.c: Update.
1509 * tracefile-tfile.c: Update.
1510 * vax-bsd-nat.c: Update.
1511 * windows-nat.c: Update.
1512 * x86-linux-nat.c: Update.
1513 * x86-nat.c: Update.
1515 2018-07-03 Tom Tromey <tom@tromey.com>
1517 * common/ptid.c (pid_to_ptid): Remove.
1518 * common/ptid.h (pid_to_ptid): Don't declare.
1519 * aix-thread.c: Update.
1520 * arm-linux-nat.c: Update.
1521 * common/ptid.c: Update.
1522 * common/ptid.h: Update.
1523 * corelow.c: Update.
1525 * darwin-nat.c: Update.
1526 * fbsd-nat.c: Update.
1527 * fork-child.c: Update.
1528 * gnu-nat.c: Update.
1529 * go32-nat.c: Update.
1530 * inf-ptrace.c: Update.
1532 * inferior.c: Update.
1534 * linux-fork.c: Update.
1535 * linux-nat.c: Update.
1536 * nat/aarch64-linux-hw-point.c: Update.
1537 * nat/fork-inferior.c: Update.
1538 * nat/x86-linux-dregs.c: Update.
1539 * nto-procfs.c: Update.
1540 * obsd-nat.c: Update.
1542 * progspace.c: Update.
1544 * rs6000-nat.c: Update.
1545 * s390-linux-nat.c: Update.
1546 * sol-thread.c: Update.
1547 * spu-linux-nat.c: Update.
1550 * tracefile-tfile.c: Update.
1551 * windows-nat.c: Update.
1553 2018-07-03 Tom Tromey <tom@tromey.com>
1555 * common/ptid.h (ptid_build): Don't declare.
1556 * common/ptid.c (ptid_build): Remove.
1557 * aix-thread.c: Update.
1558 * bsd-kvm.c: Update.
1559 * bsd-uthread.c: Update.
1560 * common/agent.c: Update.
1561 * common/ptid.c: Update.
1562 * common/ptid.h: Update.
1563 * corelow.c: Update.
1564 * darwin-nat.c: Update.
1565 * fbsd-nat.c: Update.
1566 * gnu-nat.c: Update.
1567 * linux-fork.c: Update.
1568 * linux-nat.c: Update.
1569 * linux-thread-db.c: Update.
1570 * nat/linux-osdata.c: Update.
1571 * nat/linux-procfs.c: Update.
1572 * nto-procfs.c: Update.
1573 * obsd-nat.c: Update.
1574 * proc-service.c: Update.
1576 * ravenscar-thread.c: Update.
1577 * remote-sim.c: Update.
1579 * sol-thread.c: Update.
1581 * windows-nat.c: Update.
1583 2018-07-03 Tom Tromey <tom@tromey.com>
1585 * infrun.c (follow_exec): Use exit_inferior_silent.
1586 * inferior.c (exit_inferior_num_silent): Remove.
1587 * inferior.h (exit_inferior_num_silent): Don't declare.
1589 2018-07-03 Tom Tromey <tom@tromey.com>
1592 * darwin-nat.c (darwin_attach_pid): Reset inferior and
1593 inferior_ptid on error.
1595 2018-07-02 Maciej W. Rozycki <macro@mips.com>
1596 Simon Marchi <simon.marchi@polymtl.ca>
1599 * disasm.h (gdb_disassembler): Add
1600 `m_disassembler_options_holder'. member
1601 * disasm.c (get_all_disassembler_options): New function.
1602 (gdb_disassembler::gdb_disassembler): Use it.
1603 (gdb_buffered_insn_length_init_dis): Likewise.
1604 (gdb_buffered_insn_length): Adjust accordingly.
1605 (set_disassembler_options): Handle options with arguments.
1606 (show_disassembler_options_sfunc): Likewise. Add a leading new
1607 line if showing options with descriptions.
1608 (disassembler_options_completer): Adapt to using the
1609 `disasm_options_and_args_t' structure.
1610 * mips-tdep.c (mips_disassembler_options): New variable.
1611 (mips_disassembler_options_o32): Likewise.
1612 (mips_disassembler_options_n32): Likewise.
1613 (mips_disassembler_options_n64): Likewise.
1614 (gdb_print_insn_mips): Don't set `disassembler_options'.
1615 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1617 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
1618 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
1619 `gdbarch_disassembler_options_implicit' and
1620 `gdbarch_valid_disassembler_options'.
1621 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
1622 `disasm_options_and_args_t' structure.
1623 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
1625 (valid_disassembler_options): Switch from `disasm_options_t' to
1626 the `disasm_options_and_args_t' structure.
1627 * NEWS: Document `set disassembler-options' support for the MIPS
1629 * gdbarch.h: Regenerate.
1630 * gdbarch.c: Regenerate.
1632 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
1634 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
1636 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1638 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
1639 parameter in call to amd64_target_description.
1640 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
1641 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
1642 (amd64fbsd_init_abi): Likewise.
1643 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
1644 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
1645 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
1646 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
1648 2018-06-29 Pedro Alves <palves@redhat.com>
1650 * gdb/amd64-tdep.h (amd64_create_target_description): Add
1651 "segments" parameter.
1652 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
1653 (_initialize_amd64_tdep): Update call to
1654 amd64_create_target_description.
1655 (amd64_target_description): Add "segments" parameter. Adjust
1656 the implementation to use it.
1657 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
1658 call to amd64_create_target_description.
1659 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
1660 * gdb/arch/amd64.h (amd64_create_target_description): Add
1661 "segments" register.
1662 * gdb/arch/amd64.c (amd64_create_target_description): Add
1663 "segments" parameter. Call create_feature_i386_64bit_segments
1664 only if SEGMENTS is true.
1665 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
1666 call to amd64_create_target_description.
1668 2018-06-29 Pedro Alves <palves@redhat.com>
1670 * thread.c (thread_target_id_str): New, factored out from ...
1671 (print_thread_info_1): ... here. Use it to compute the max
1672 "Target Id" column width.
1674 2018-06-29 Pedro Alves <palves@redhat.com>
1676 * remote.c (remote_target::extra_thread_info): Delete
1677 'display_buf' and 'n' locals. from the cache, regardless of
1678 packet mechanims is in use. Use cache for qThreadExtra and qP
1681 2018-06-29 Pedro Alves <palves@redhat.com>
1683 * blockframe.c (find_pc_sect_containing_function): New function.
1684 * breakpoint.c (print_breakpoint_location): Don't call
1685 find_pc_sect_function.
1686 * linespec.c (create_sals_line_offset): Record the location's
1688 * linespec.c (convert_address_location_to_sals): Fill in sal's
1689 symbol with find_pc_sect_containing_function.
1690 * symtab.c (find_function_start_sal): Rename to ...
1691 (find_function_start_sal_1): ... this.
1692 (find_function_start_sal): Reimplement as wrapper around
1693 find_function_start_sal_1, and use
1694 find_pc_sect_containing_function to fill in the sal's symbol.
1695 (find_function_start_sal(symbol*, bool)): Adjust.
1696 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
1698 (find_pc_sect_containing_function): Declare.
1700 2018-06-29 Pedro Alves <palves@redhat.com>
1702 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
1703 true if the the location has no symbol.
1705 2018-06-28 Tom Tromey <tom@tromey.com>
1707 * NEWS: Mention --enable-codesign.
1708 * silent-rules.mk (ECHO_SIGN): New variable.
1709 * configure.ac: Add --enable-codesign.
1710 * configure: Rebuild.
1711 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
1712 (gdb$(EXEEXT)): Optionally invoke codesign.
1714 2018-06-28 Pedro Alves <palves@redhat.com>
1716 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
1718 (switch_to_thread_no_regs): Adjust comment.
1719 * infcmd.c (stop_pc): Delete.
1720 (post_create_inferior, info_program_command): Replace references
1721 to stop_pc with references to thread_info->suspend.stop_pc.
1722 * inferior.h (stop_pc): Delete declaration.
1723 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
1724 (handle_inferior_event_1, handle_signal_stop)
1725 (process_event_stop_test, keep_going_stepped_thread)
1726 (handle_step_into_function, handle_step_into_function_backward)
1727 (print_stop_location): Replace references to stop_pc with
1728 references to thread_info->suspend.stop_pc.
1729 (struct infcall_suspend_state) <stop_pc>: Delete field.
1730 (save_infcall_suspend_state, restore_infcall_suspend_state):
1731 Remove references to inf_stat->stop_pc.
1732 * linux-fork.c (fork_load_infrun_state): Likewise.
1733 * record-btrace.c (record_btrace_set_replay): Likewise.
1734 * record-full.c (record_full_goto_entry): Likewise.
1735 * remote.c (print_one_stopped_thread): Likewise.
1736 * target.c (target_resume): Extend comment.
1737 * thread.c (set_executing_thread): New.
1738 (set_executing): Use it.
1739 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
1740 Remove references to stop_pc.
1742 2018-06-28 Pedro Alves <palves@redhat.com>
1744 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
1745 Moving fetching stop_pc until after ecs->event_thread is refreshed.
1747 2018-06-28 Tom Tromey <tom@tromey.com>
1749 * coffread.c (coff_symfile_finish): Update.
1750 * xcoffread.c (xcoff_symfile_finish): Update.
1751 * elfread.c (elf_symfile_finish): Update.
1752 * symfile.h (dwarf2_free_objfile): Don't declare.
1753 * dwarf2read.c (_initialize_dwarf2_read): Use
1754 register_objfile_data_with_cleanup.
1755 (dwarf2_free_objfile): Now static. Change signature.
1757 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1759 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
1760 option "-o" to add-symbol-file-load to add an offset to each
1761 section's load address.
1762 * symfile.c (set_objfile_default_section_offset): New function.
1764 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1766 * symfile.c (add_symbol_file_command): Make sure that sections
1767 with the same name are sorted in the same order.
1769 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1771 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
1772 require the second argument. If omitted, load sections at the
1773 addresses specified in the file.
1775 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1777 * symfile.c (symbol_file_command, symbol_file_add_main_1)
1778 (_initialize_symfile): Add option "-o" to symbol-file to add an
1779 offset to each section of the symbol file.
1781 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1783 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
1785 2018-06-27 Tom Tromey <tom@tromey.com>
1787 * stack.c (_initialize_stack): Update "func" help text.
1789 2018-06-27 Tom Tromey <tom@tromey.com>
1791 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
1793 (unwind_infopy_str, pyuw_create_unwind_info)
1794 (unwind_infopy_add_saved_register, pyuw_sniffer)
1795 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
1797 (struct saved_reg): Add constructor.
1798 <value>: Now a gdbpy_ref<>.
1800 2018-06-27 Tom Tromey <tom@tromey.com>
1802 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
1804 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1806 * gdb-gdb.py.in: Format using autopep8.
1808 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1810 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
1811 (type_lookup_function): Recognize CORE_ADDR values.
1813 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1815 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
1818 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1820 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
1823 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1825 * gdb-gdb.py: Move to...
1826 * gdb-gdb.py.in: ... here.
1827 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
1828 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
1830 (distclean): Remove gdb-gdb.py when cleaning.
1831 (gdb-gdb.py, gdb-gdb.gdb): New rules.
1832 * configure: Re-generate.
1834 2018-06-27 Pedro Alves <palves@redhat.com>
1836 * proc-service.c (get_ps_regcache): New.
1837 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1838 (ps_lsetfpregs): Use it.
1840 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
1843 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
1844 (dwarf_decode_lines_1): Adjust.
1846 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1848 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
1850 <info_proc>: Likewise.
1852 2018-06-26 Joel Brobecker <brobecker@adacore.com>
1854 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
1855 to windows_fetch_one_register, and only handle the case of
1856 fetching one register. Move the code that reloads the context
1857 and iterates over all registers if R is negative to...
1858 (windows_nat_target::fetch_registers): ... here.
1859 (do_windows_store_inferior_registers): Rename to
1860 windows_store_one_register, and only handle the case of storing
1861 one register. Move the code that handles the case where r is
1863 (windows_nat_target::store_registers) ... here.
1865 2018-06-26 Tom Tromey <tom@tromey.com>
1868 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
1869 * rust-lang.c (rust_print_struct_def): Add podata parameter.
1871 (rust_internal_print_type): Add podata parameter.
1872 (rust_print_type): Update.
1874 2018-06-26 Tom Tromey <tom@tromey.com>
1876 * typeprint.h (struct print_offset_data) <update, finish,
1877 maybe_print_hole>: New methods.
1878 <indentation>: New constant.
1879 * typeprint.c (print_offset_data::indentation): Define.
1880 (print_offset_data::maybe_print_hole, print_offset_data::update)
1881 (print_offset_data::finish): Move from c-typeprint.c and rename.
1882 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
1883 (print_spaces_filtered_with_print_options): Update.
1884 (c_print_type_union_field_offset, maybe_print_hole)
1885 (c_print_type_struct_field_offset): Move to typeprint.c and
1887 (c_type_print_base_struct_union): Update.
1889 2018-06-25 Pedro Alves <palves@redhat.com>
1891 * gdbthread.h (thread_info_ref, delete_thread)
1892 (delete_thread_silent, first_thread_of_inferior)
1893 (any_thread_of_inferior, switch_to_thread)
1894 (enable_thread_stack_temporaries)
1895 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1896 (get_last_thread_stack_temporary)
1897 (value_in_thread_stack_temporaries, can_access_registers_thread):
1898 Spell out "struct thread_info" instead of just "thread_info".
1899 * inferior.h (notice_new_inferior): Likewise.
1901 2018-06-25 Pedro Alves <palves@redhat.com>
1903 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1904 pass thread_info pointer to delete_thread.
1905 (windows_nat_target::detach): Pass inferior pointer to
1907 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
1909 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
1910 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
1911 and pass a thread_info pointer to delete_thread.
1912 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
1913 pass thread_info pointer to delete_thread.
1914 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
1915 delete_thread_silent call.
1916 * procfs.c (procfs_target::detach): Pass inferior pointer to
1918 (procfs_target::wait): Pass thread_info pointer to delete_thread.
1919 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
1920 delete_thread_silent call.
1921 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1922 pass thread_info pointer to delete_thread.
1923 (windows_nat_target::detach): Pass inferior pointer to
1926 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1928 * regcache.c (readable_regcache::read_part): Fix asserts.
1929 (reg_buffer::raw_collect_part): New function.
1930 (regcache::write_part): Fix asserts.
1931 (reg_buffer::raw_supply_part): New function.
1932 (regcache::transfer_regset_register): New helper function.
1933 (regcache::transfer_regset): Call new functions.
1934 (regcache_supply_regset): Use gdb_byte*.
1935 (regcache::supply_regset): Likewise.
1936 (regcache_collect_regset): Likewise.
1937 (regcache::collect_regset): Likewise.
1938 * regcache.h (reg_buffer::raw_collect_part): New declaration.
1939 (reg_buffer::raw_supply_part): Likewise.
1940 (regcache::transfer_regset_register): Likewise.
1941 (regcache::transfer_regset): Use gdb_byte*.
1943 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1945 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
1947 2018-06-21 Pedro Alves <palves@redhat.com>
1949 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
1950 instead of a ptid_t. All callers adjusted.
1951 * ada-tasks.c (ada_get_task_number): Likewise. All callers
1953 (print_ada_task_info, display_current_task_id, task_command_1):
1955 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
1957 (breakpoint_kind): Adjust.
1958 (remove_breakpoints_pid): Rename to ...
1959 (remove_breakpoints_inf): ... this. Adjust to take an inferior
1960 pointer. All callers adjusted.
1961 (bpstat_clear_actions): Use inferior_thread.
1962 (get_bpstat_thread): New.
1963 (bpstat_do_actions): Use it.
1964 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
1965 to take a thread_info pointer. All callers adjusted.
1966 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
1967 (breakpoint_re_set_thread): Use inferior_thread.
1968 * breakpoint.h (struct inferior): Forward declare.
1969 (bpstat_stop_status): Update.
1970 (remove_breakpoints_pid): Delete.
1971 (remove_breakpoints_inf): New.
1972 * bsd-uthread.c (bsd_uthread_target::wait)
1973 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
1974 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
1975 (maint_btrace_packet_history_cmd)
1976 (maint_btrace_clear_packet_history_cmd): Adjust.
1977 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
1979 * cli/cli-interp.c: Include "inferior.h".
1980 * common/refcounted-object.h (struct
1981 refcounted_object_ref_policy): New.
1982 * compile/compile-object-load.c: Include gdbthread.h.
1983 (store_regs): Use inferior_thread.
1984 * corelow.c (core_target::close): Use current_inferior.
1985 (core_target_open): Adjust to use first_thread_of_inferior and use
1986 the current inferior.
1987 * ctf.c (ctf_target::close): Adjust to use current_inferior.
1988 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
1989 <thread>: ... this new field. All references adjusted.
1990 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
1991 Take a thread_info pointer instead of a ptid_t.
1992 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
1993 (dummy_frame_discard, register_dummy_frame_dtor): Take a
1994 thread_info pointer instead of a ptid_t.
1995 * elfread.c: Include "inferior.h".
1996 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
1997 Use inferior_thread.
1998 * eval.c (evaluate_subexp): Likewise.
1999 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2001 * gdb_proc_service.h (struct thread_info): Forward declare.
2002 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2003 <thread>: ... this new field. All references adjusted.
2004 * gdbarch.h, gdbarch.c: Regenerate.
2005 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2006 'thread' parameter. All implementations and callers adjusted.
2007 * gdbthread.h (thread_info) <set_running>: New method.
2008 (delete_thread, delete_thread_silent): Take a thread_info pointer
2010 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2011 (first_thread_of_process): Delete, replaced by ...
2012 (first_thread_of_inferior): ... this new function. All callers
2014 (any_live_thread_of_process): Delete, replaced by ...
2015 (any_live_thread_of_inferior): ... this new function. All callers
2017 (switch_to_thread, switch_to_no_thread): Declare.
2018 (is_executing): Delete.
2019 (enable_thread_stack_temporaries): Update comment.
2020 <enable_thread_stack_temporaries>: Take a thread_info pointer
2021 instead of a ptid_t. Incref the thread.
2022 <~enable_thread_stack_temporaries>: Decref the thread.
2025 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2026 (get_last_thread_stack_temporary)
2027 (value_in_thread_stack_temporaries, can_access_registers_thread):
2028 Take a thread_info pointer instead of a ptid_t. All callers
2030 * infcall.c (get_call_return_value): Use inferior_thread.
2031 (run_inferior_call): Work with thread pointers instead of ptid_t.
2032 (call_function_by_hand_dummy): Work with thread pointers instead
2033 of ptid_t. Use thread_info_ref.
2034 * infcmd.c (proceed_thread_callback): Access thread's state
2036 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2037 access thread's state directly.
2038 (continue_command): Use inferior_thread.
2039 (info_program_command): Use find_thread_ptid and access thread
2041 (proceed_after_attach_callback): Use thread state directly.
2042 (notice_new_inferior): Take a thread_info pointer instead of a
2043 ptid_t. All callers adjusted.
2044 (exit_inferior): Take an inferior pointer instead of a pid. All
2046 (exit_inferior_silent): New.
2047 (detach_inferior): Delete.
2048 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2049 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2050 (detach_inferior_command, kill_inferior_command): Use
2051 find_inferior_id instead of valid_gdb_inferior_id and
2052 gdb_inferior_id_to_pid.
2053 (inferior_command): Use inferior and thread pointers.
2054 * inferior.h (struct thread_info): Forward declare.
2055 (notice_new_inferior): Take a thread_info pointer instead of a
2056 ptid_t. All callers adjusted.
2057 (detach_inferior): Delete declaration.
2058 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2059 instead of a pid. All callers adjusted.
2060 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2061 (valid_gdb_inferior_id): Delete.
2062 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2063 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2064 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2066 <inf>: ... this new field.
2067 <step_ptid>: Delete, replaced by ...
2068 <step_thread>: ... this new field.
2069 (get_displaced_stepping_state): Take an inferior pointer instead
2070 of a pid. All callers adjusted.
2071 (displaced_step_in_progress_any_inferior): Adjust.
2072 (displaced_step_in_progress_thread): Take a thread pointer instead
2073 of a ptid_t. All callers adjusted.
2074 (displaced_step_in_progress, add_displaced_stepping_state): Take
2075 an inferior pointer instead of a pid. All callers adjusted.
2076 (get_displaced_step_closure_by_addr): Adjust.
2077 (remove_displaced_stepping_state): Take an inferior pointer
2078 instead of a pid. All callers adjusted.
2079 (displaced_step_prepare_throw, displaced_step_prepare)
2080 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2081 All callers adjusted.
2082 (start_step_over): Adjust.
2083 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2084 displaced step queue.
2085 (do_target_resume): Adjust.
2086 (fetch_inferior_event): Use inferior_thread.
2087 (context_switch, get_inferior_stop_soon): Take an
2088 execution_control_state pointer instead of a ptid_t. All callers
2090 (switch_to_thread_cleanup): Delete.
2091 (stop_all_threads): Use scoped_restore_current_thread.
2092 * inline-frame.c: Include "gdbthread.h".
2093 (inline_state) <inline_state>: Take a thread pointer instead of a
2094 ptid_t. All callers adjusted.
2095 <ptid>: Delete, replaced by ...
2096 <thread>: ... this new field.
2097 (find_inline_frame_state): Take a thread pointer instead of a
2098 ptid_t. All callers adjusted.
2099 (skip_inline_frames, step_into_inline_frame)
2100 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2101 pointer instead of a ptid_t. All callers adjusted.
2102 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2103 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2104 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2106 * linux-nat.c (get_detach_signal): Likewise.
2107 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2108 (thread_db_notice_clone): Adjust.
2109 (thread_db_find_new_threads_silently)
2110 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2111 a thread pointer instead of a ptid_t. All callers adjusted.
2112 * mi/mi-cmd-var.c: Include "inferior.h".
2113 (mi_cmd_var_update_iter): Update to use thread pointers.
2114 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2116 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2118 (mi_output_running): ... this new function.
2119 (mi_on_resume_1): Adjust to use it.
2120 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2121 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2123 (interrupt_thread_callback): : Adjust to use thread and inferior
2125 * proc-service.c: Include "gdbthread.h".
2126 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2127 * progspace-and-thread.c: Include "inferior.h".
2128 * progspace.c: Include "inferior.h".
2129 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2130 hold a reference to an inferior_object.
2131 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2133 * python/py-inferior.c (struct inferior_object): Give the type a
2134 tag name instead of a typedef.
2135 (python_on_normal_stop): No need to check if the current thread is
2137 (inferior_to_inferior_object): Change return type to
2138 inferior_object. All callers adjusted.
2139 (find_thread_object): Delete, bits factored out to ...
2140 (thread_to_thread_object): ... this new function.
2141 * python/py-infthread.c (create_thread_object): Use
2142 inferior_to_inferior_object.
2143 (thpy_is_stopped): Use thread pointer directly.
2144 (gdbpy_selected_thread): Use inferior_thread.
2145 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2146 field, replaced with ...
2147 <thread>: ... this new field. All users adjusted.
2148 (btpy_insn_or_gap_new): Drop const.
2149 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2151 * python/py-record.c: Include "gdbthread.h".
2152 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2153 a ptid_t. All callers adjusted.
2154 (gdbpy_current_recording): Use inferior_thread.
2155 * python/py-record.h (recpy_record_object) <ptid>: Delete
2156 field, replaced with ...
2157 <thread>: ... this new field. All users adjusted.
2158 (recpy_element_object) <ptid>: Delete
2159 field, replaced with ...
2160 <thread>: ... this new field. All users adjusted.
2161 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2162 a ptid_t. All callers adjusted.
2163 * python/py-threadevent.c: Include "gdbthread.h".
2164 (get_event_thread): Use thread_to_thread_object.
2165 * python/python-internal.h (struct inferior_object): Forward
2167 (find_thread_object, find_inferior_object): Delete declarations.
2168 (thread_to_thread_object, inferior_to_inferior_object): New
2170 * record-btrace.c: Include "inferior.h".
2171 (require_btrace_thread): Use inferior_thread.
2172 (record_btrace_frame_sniffer)
2173 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2174 (get_thread_current_frame): Use scoped_restore_current_thread and
2176 (get_thread_current_frame): Use thread pointer directly.
2177 (record_btrace_replay_at_breakpoint): Use thread's inferior
2179 * record-full.c: Include "inferior.h".
2180 * regcache.c: Include "gdbthread.h".
2181 (get_thread_arch_regcache): Use the inferior's address space
2183 (get_thread_regcache, registers_changed_thread): New.
2184 * regcache.h (get_thread_regcache(thread_info *thread)): New
2186 (registers_changed_thread): New.
2187 (remote_target) <remote_detach_1>: Swap order of parameters.
2188 (remote_add_thread): <remote_add_thread>: Return the new thread.
2189 (get_remote_thread_info(ptid_t)): New overload.
2190 (remote_target::remote_notice_new_inferior): Use thread pointers
2192 (remote_target::process_initial_stop_replies): Use
2193 thread_info::set_running.
2194 (remote_target::remote_detach_1, remote_target::detach)
2195 (extended_remote_target::detach): Adjust.
2196 * stack.c (frame_show_address): Use inferior_thread.
2197 * target-debug.h (target_debug_print_thread_info_pp): New.
2198 * target-delegates.c: Regenerate.
2199 * target.c (default_thread_address_space): Delete.
2200 (memory_xfer_partial_1): Use current_inferior.
2201 (target_detach): Use current_inferior.
2202 (target_thread_address_space): Delete.
2203 (generic_mourn_inferior): Use current_inferior.
2204 * target.h (struct target_ops) <thread_address_space>: Delete.
2205 (target_thread_address_space): Delete.
2206 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2208 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2209 thread pointer instead of a ptid_t. Adjust all callers.
2210 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2211 (first_thread_of_process): Delete, replaced by ...
2212 (first_thread_of_inferior): ... this new function. All callers
2214 (any_thread_of_process): Rename to ...
2215 (any_thread_of_inferior): ... this, and take an inferior pointer.
2216 (any_live_thread_of_process): Rename to ...
2217 (any_live_thread_of_inferior): ... this, and take an inferior
2219 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2220 (value_in_thread_stack_temporaries)
2221 (get_last_thread_stack_temporary): Take a thread pointer instead
2222 of a ptid_t. Adjust all callers.
2223 (thread_info::set_running): New.
2224 (validate_registers_access): Use inferior_thread.
2225 (can_access_registers_ptid): Rename to ...
2226 (can_access_registers_thread): ... this, and take a thread
2228 (print_thread_info_1): Adjust to compare thread pointers instead
2230 (switch_to_no_thread, switch_to_thread): Make extern.
2231 (scoped_restore_current_thread::~scoped_restore_current_thread):
2232 Use m_thread pointer directly.
2233 (scoped_restore_current_thread::scoped_restore_current_thread):
2234 Use inferior_thread.
2235 (thread_command): Use thread pointer directly.
2236 (thread_num_make_value_helper): Use inferior_thread.
2237 * top.c (execute_command): Use inferior_thread.
2238 * tui/tui-interp.c: Include "inferior.h".
2239 * varobj.c (varobj_create): Use inferior_thread.
2240 (value_of_root_1): Use find_thread_global_id instead of
2241 global_thread_id_to_ptid.
2243 2018-06-21 Alan Hayward <alan.hayward@arm.com>
2245 * regcache.c (readable_regcache::read_part): Avoid memcpy when
2247 (regcache::write_part): Likewise.
2248 (readable_regcache::cooked_read_part): Update comment.
2249 (readable_regcache::cooked_write_part): Likewise.
2250 * regcache.h: (readable_regcache::read_part): Likewise.
2251 (regcache::write_part): Likewise.
2253 2018-06-21 Richard Bunt <richard.bunt@arm.com>
2254 Dirk Schubert <dirk.schubert@arm.com>
2256 * aarch64-linux-nat.c (post_attach): New.
2257 (aarch64_linux_nat_target::post_attach): Override post_attach to
2258 record the number of hardware debug registers.
2260 2018-06-20 Tom Tromey <tom@tromey.com>
2262 * python/py-param.c (add_setshow_generic): Make parameters const.
2263 (parmpy_init): Update.
2265 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2267 * regcache.h (regcache_cooked_read_ftype): Rename to...
2268 (register_read_ftype): ...this, change type to function_view.
2269 (class reg_buffer) <save>: Remove src parameter.
2270 (readonly_detached_regcache) <readonly_detached_regcache>: Make
2271 parameter non-const in first overload. Remove src parameter in
2273 * regcache.c (do_cooked_read): Remove.
2274 (readonly_detached_regcache::readonly_detached_regcache): Make
2275 parameter non-const, adjust call to other constructor.
2276 (reg_buffer::save): Remove src parameter.
2277 * frame.c (do_frame_register_read): Remove.
2278 (frame_save_as_regcache): Use lambda function.
2279 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2280 parameter to ppu2spu_data *.
2281 (ppu2spu_sniffer): Use lambda function.
2283 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2285 * record-full.c (record_full_target::insert_breakpoint): Remove
2286 "struct" keyword, add const.
2288 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2290 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2291 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2292 * configure.ac: Remove AC_PREREQ, add missing quoting.
2293 * gnulib/configure.ac: Modernize usage of
2294 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
2295 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2296 (AUTOMAKE_VERSION): Bump to 1.15.1.
2297 * configure: Re-generate.
2298 * config.in: Re-generate.
2299 * aclocal.m4: Re-generate.
2300 * gnulib/aclocal.m4: Re-generate.
2301 * gnulib/config.in: Re-generate.
2302 * gnulib/configure: Re-generate.
2303 * gnulib/import/Makefile.in: Re-generate.
2305 2018-06-19 Pedro Alves <palves@redhat.com>
2307 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2308 (lookup_minimal_symbol_by_pc_section): ... here with
2309 gdb_assert_not_reached added.
2311 2018-06-19 Pedro Alves <palves@redhat.com>
2313 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2314 parameter with a block parameter. Compare location's block symbol
2315 with the frame's block instead of addresses.
2316 (skip_inline_frames): Pass the current block instead of the
2317 frame's address. Break out as soon as we determine the frame
2318 should not be skipped.
2320 2018-06-18 Tom Tromey <tom@tromey.com>
2322 * solib-aix.c (solib_aix_get_section_offsets): Return
2324 (solib_aix_solib_create_inferior_hook): Update.
2326 2018-06-18 Tom Tromey <tom@tromey.com>
2328 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2330 2018-06-18 Tom Tromey <tom@tromey.com>
2332 * solib-frv.c (frv_relocate_main_executable): Use
2334 * solib-dsbt.c (dsbt_relocate_main_executable): Use
2337 2018-06-18 Tom Tromey <tom@tromey.com>
2339 * objfiles.h (inhibit_section_map_updates): Update.
2340 (resume_section_map_updates, resume_section_map_updates_cleanup):
2342 * solib-svr4.c (svr4_handle_solib_event): Update.
2343 * objfiles.c (inhibit_section_map_updates): Return
2344 scoped_restore_tmpl<int>.
2345 (resume_section_map_updates, resume_section_map_updates_cleanup):
2348 2018-06-18 Tom Tromey <tom@tromey.com>
2350 * valprint.h (read_string): Update.
2351 * valprint.c (read_string): Change type of "buffer".
2352 (val_print_string): Update.
2353 * python/py-value.c (valpy_string): Update.
2354 * language.h (struct language_defn) <la_get_string>: Change
2356 (default_get_string, c_get_string): Update.
2357 * language.c (default_get_string): Change type of "buffer".
2358 * guile/scm-value.c (gdbscm_value_to_string): Update.
2359 * c-lang.c (c_get_string): Change type of "buffer".
2361 2018-06-18 Tom Tromey <tom@tromey.com>
2363 * ser-mingw.c (struct pipe_state_destroyer): New.
2364 (pipe_state_up): New typedef.
2365 (cleanup_pipe_state): Remove.
2366 (pipe_windows_open): Use pipe_state_up. Don't release argv.
2368 2018-06-18 Tom Tromey <tom@tromey.com>
2370 * rust-lang.h (rust_yyerror): Don't declare.
2371 * rust-lang.c (rust_language_defn): Update.
2372 * rust-exp.y (yyerror): Now static.
2373 * parse.c (parse_exp_in_context_1): Update.
2374 * p-lang.h (p_yyerror): Don't declare.
2375 * p-lang.c (p_language_defn): Update.
2376 * p-exp.y (yyerror): Now static.
2377 * opencl-lang.c (opencl_language_defn): Update.
2378 * objc-lang.c (objc_language_defn): Update.
2379 * m2-lang.h (m2_yyerror): Don't declare.
2380 * m2-lang.c (m2_language_defn): Update.
2381 * m2-exp.y (yyerror): Now static.
2382 * language.h (struct language_defn) <la_error>: Remove.
2383 * language.c (unk_lang_error): Remove.
2384 (unknown_language_defn, auto_language_defn): Remove.
2385 * go-lang.h (go_yyerror): Don't declare.
2386 * go-lang.c (go_language_defn): Update.
2387 * go-exp.y (yyerror): Now static.
2388 * f-lang.h (f_yyerror): Don't declare.
2389 * f-lang.c (f_language_defn): Update.
2390 * f-exp.y (yyerror): Now static.
2391 * d-lang.h (d_yyerror): Don't declare.
2392 * d-lang.c (d_language_defn): Update.
2393 * d-exp.y (yyerror): Now static.
2394 * c-lang.h (c_yyerror): Don't declare.
2395 * c-lang.c (c_language_defn, cplus_language_defn)
2396 (asm_language_defn, minimal_language_defn): Update.
2397 * c-exp.y (yyerror): Now static.
2398 * ada-lang.h (ada_yyerror): Don't declare.
2399 * ada-lang.c (ada_language_defn): Update.
2400 * ada-exp.y (yyerror): Now static.
2402 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2404 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2405 (store_sveregs_to_thread): Likewise.
2406 (aarch64_linux_fetch_inferior_registers): Check for SVE.
2407 (aarch64_linux_store_inferior_registers): Likewise.
2408 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2410 (aarch64_sve_regs_copy_to_regcache): Likewise.
2411 (aarch64_sve_regs_copy_from_regcache): Likewise.
2412 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2414 (aarch64_sve_regs_copy_to_regcache): Likewise.
2415 (aarch64_sve_regs_copy_from_regcache): Likewise.
2416 (sve_context): Structure from Linux headers.
2417 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2418 (SVE_SIG_ZREG_SIZE): Likewise.
2419 (SVE_SIG_PREG_SIZE): Likewise.
2420 (SVE_SIG_FFR_SIZE): Likewise.
2421 (SVE_SIG_REGS_OFFSET): Likewise.
2422 (SVE_SIG_ZREGS_OFFSET): Likewise.
2423 (SVE_SIG_ZREG_OFFSET): Likewise.
2424 (SVE_SIG_ZREGS_SIZE): Likewise.
2425 (SVE_SIG_PREGS_OFFSET): Likewise.
2426 (SVE_SIG_PREG_OFFSET): Likewise.
2427 (SVE_SIG_PREGS_SIZE): Likewise.
2428 (SVE_SIG_FFR_OFFSET): Likewise.
2429 (SVE_SIG_REGS_SIZE): Likewise.
2430 (SVE_SIG_CONTEXT_SIZE): Likewise.
2431 (SVE_PT_REGS_MASK): Likewise.
2432 (SVE_PT_REGS_FPSIMD): Likewise.
2433 (SVE_PT_REGS_SVE): Likewise.
2434 (SVE_PT_VL_INHERIT): Likewise.
2435 (SVE_PT_VL_ONEXEC): Likewise.
2436 (SVE_PT_REGS_OFFSET): Likewise.
2437 (SVE_PT_FPSIMD_OFFSET): Likewise.
2438 (SVE_PT_FPSIMD_SIZE): Likewise.
2439 (SVE_PT_SVE_ZREG_SIZE): Likewise.
2440 (SVE_PT_SVE_PREG_SIZE): Likewise.
2441 (SVE_PT_SVE_FFR_SIZE): Likewise.
2442 (SVE_PT_SVE_FPSR_SIZE): Likewise.
2443 (SVE_PT_SVE_FPCR_SIZE): Likewise.
2444 (__SVE_SIG_TO_PT): Likewise.
2445 (SVE_PT_SVE_OFFSET): Likewise.
2446 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2447 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2448 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2449 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2450 (SVE_PT_SVE_PREG_OFFSET): Likewise.
2451 (SVE_PT_SVE_PREGS_SIZE): Likewise.
2452 (SVE_PT_SVE_FFR_OFFSET): Likewise.
2453 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2454 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2455 (SVE_PT_SVE_SIZE): Likewise.
2456 (SVE_PT_SIZE): Likewise.
2457 (HAS_SVE_STATE): New define.
2459 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2461 * nat/aarch64-sve-linux-sigcontext.h: New file.
2462 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2464 (SVE_VQ_MIN): Likewise.
2465 (SVE_VQ_MAX): Likewise.
2466 (SVE_VL_MIN): Likewise.
2467 (SVE_VL_MAX): Likewise.
2468 (SVE_NUM_ZREGS): Likewise.
2469 (SVE_NUM_PREGS): Likewise.
2470 (sve_vl_valid): Likewise.
2471 (struct user_sve_header): Likewise.
2473 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
2474 Richard Bunt <Richard.Bunt@arm.com>
2476 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2477 was requested by GDB.
2479 2018-06-15 Tom de Vries <tdevries@suse.de>
2481 * MAINTAINERS (Write After Approval): Add Tom de Vries.
2483 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
2485 * gnulib/update-gnulib.sh: Print expected versions of
2488 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
2490 * arch-utils.c (default_type_align): Use type_length_units.
2491 * gdbtypes.c (type_align): Use type_length_units.
2493 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2495 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2496 of 'define' command.
2498 2018-06-14 Tom de Vries <tdevries@suse.de>
2501 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2502 get_no_prettyformat_print_options.
2504 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
2506 * sparc-nat.h: Include target.h.
2507 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2508 <fetch_registers>: Remove this argument in function call.
2509 <store_registers>: Remove this argument in function call, remove
2511 <low_forget_process>: Call sparc64_forget_process instead of
2512 sparc_forget_process.
2514 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2516 * procfs.c (_initialize_procfs): Use add_inf_child_target.
2517 (procfs_target::make_corefile_notes): Adjust to new
2518 target_read_alloc return type.
2520 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2521 Stephen Roberts <stephen.roberts@arm.com>
2524 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2525 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2526 Move should_notify_stop local into more inner scope.
2528 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2529 Stephen Roberts <stephen.roberts@arm.com>
2532 * infrun.c (resume_1): Add call to mark_async_event_handler.
2534 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2536 * infrun.c (do_target_wait): Change old version of $pc printed.
2538 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
2540 * dwarf2read.c (read_index_from_section): Rename to...
2541 (read_gdb_index_from_section): ... this, update all callers.
2542 (dwarf2_read_index): Rename to...
2543 (dwarf2_read_gdb_index): ... this, update all callers.
2545 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
2547 * gdb/hppa-linux-nat.c
2548 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2549 hppa_linux_nat_target::fetch_registers.
2551 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2553 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2554 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2555 (AARCH64_DWARF_SVE_FFR): Likewise.
2556 (AARCH64_DWARF_SVE_P0): Likewise.
2557 (AARCH64_DWARF_SVE_Z0): Likewise.
2559 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2561 * common/common-regcache.h (raw_compare): New function.
2562 * regcache.c (regcache::raw_compare): Likewise.
2563 * regcache.h (regcache::raw_compare): New declaration.
2565 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2567 * common/common-regcache.h (reg_buffer_common): New structure.
2568 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2569 (reg_buffer::raw_supply): Likewise.
2570 (reg_buffer::raw_supply_integer): Likewise.
2571 (reg_buffer::raw_supply_zeroed): Likewise.
2572 (reg_buffer::raw_collect): Likewise.
2573 (reg_buffer::raw_collect_integer): Likewise.
2574 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2575 (reg_buffer::raw_supply): Likewise.
2576 (reg_buffer::raw_supply_integer): Likewise.
2577 (reg_buffer::raw_supply_zeroed): Likewise.
2578 (reg_buffer::raw_collect): Likewise.
2579 (reg_buffer::raw_collect_integer): Likewise.
2581 2018-06-10 Tom Tromey <tom@tromey.com>
2583 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
2584 (class remote_state) <stop_reply_queue>: Now std::vector.
2585 (remote_state::~remote_state)
2586 (remote_target::stop_reply_queue_length): Update.
2587 (struct queue_iter_param, remove_child_of_pending_fork)
2588 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2589 (check_pending_event_prevents_wildcard_vcont_callback)
2590 (remove_stop_reply_for_inferior)
2591 (remove_stop_reply_of_remote_state)
2592 (remote_notif_remove_once_on_match)
2593 (stop_reply_match_ptid_and_ws)
2594 (remote_kill_child_of_pending_fork): Remove.
2595 (remote_target::remove_new_fork_children)
2596 (remote_target::check_pending_events_prevent_wildcard_vcont)
2597 (remote_target::discard_pending_stop_replies)
2598 (remote_target::discard_pending_stop_replies_in_queue)
2599 (remote_target::remote_notif_remove_queued_reply)
2600 (remote_target::queued_stop_reply)
2601 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2602 (remote_target::wait, remote_target::kill_new_fork_children)
2603 (remote_target::async): Update.
2605 2018-06-10 Tom Tromey <tom@tromey.com>
2607 * record-full.c (record_full_arch_list_cleanups): Remove.
2608 (record_full_message): Use try/catch.
2609 (record_full_wait_cleanups): Remove.
2610 (record_full_wait_1): Use try/catch.
2611 (record_full_restore): Likewise.
2613 2018-06-10 Tom Tromey <tom@tromey.com>
2615 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
2616 declare VEC. Add constructor.
2617 <in_target_beneath>: Now bool.
2618 (record_full_breakpoints): Now a std::vector, static.
2619 (record_full_sync_record_breakpoints)
2620 (record_full_init_record_breakpoints)
2621 (record_full_target::insert_breakpoint)
2622 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
2624 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
2626 * dwarf2read.c (process_cu_includes): Remove struct keyword.
2627 * serial.c (serial_interface_lookup): Remove struct keyword.
2629 2018-06-10 Tom Tromey <tom@tromey.com>
2631 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
2633 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
2635 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
2637 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
2638 "beneath" as a method.
2639 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
2640 Use "beneath" as a method.
2642 2018-06-10 Tom Tromey <tom@tromey.com>
2644 * tracefile.c (struct trace_file_writer_deleter): New.
2645 <operator()>: Rename from trace_file_writer_xfree.
2646 (trace_file_writer_up): New typedef.
2647 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
2649 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2651 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
2652 <m_registers, m_register_status>: Change type to
2654 * regcache.c (reg_buffer::reg_buffer): Use new instead of
2657 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2659 * common/common-regcache.h (enum register_status): Add
2660 underlying type "signed char".
2661 * regcache.h (reg_buffer) <m_register_status>: Change type to
2663 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
2664 register_status instead of signed char.
2665 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
2666 (reg_buffer::get_register_status): Remove cast.
2667 (readable_regcache::raw_read): Remove cast.
2668 (readable_regcache::cooked_read): Remove cast.
2670 2018-06-09 Tom Tromey <tom@tromey.com>
2672 * source.c (reverse_search_command, forward_search_command): Use
2675 2018-06-09 Tom Tromey <tom@tromey.com>
2677 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
2678 (serial_ops_list): Now static, std::vector.
2679 (serial_interface_lookup, serial_add_interface): Update.
2681 2018-06-09 Tom Tromey <tom@tromey.com>
2683 * dwarf2read.c (process_cu_includes): Update.
2684 (process_full_comp_unit): Update.
2685 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
2688 2018-06-08 Paul Koning <paul_koning@dell.com>
2692 * python/python.c (do_start_initialization):
2693 Avoid call to internal Python API.
2694 (init__gdb_module): New function.
2696 2018-06-08 Gary Benson <gbenson@redhat.com>
2698 * linux-thread-db.c (valprint.h): New include.
2699 (struct check_thread_db_info): New structure.
2700 (check_thread_db_on_load, tdb_testinfo): New static globals.
2701 (check_thread_db, check_thread_db_callback): New functions.
2702 (try_thread_db_load_1): Run integrity checks if requested.
2703 (maintenance_check_libthread_db): New function.
2704 (_initialize_thread_db): Register "maint check libthread-db"
2705 and "maint set/show check-libthread-db".
2706 * NEWS: Mention the above new commands.
2708 2018-06-08 Tom Tromey <tom@tromey.com>
2710 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
2713 2018-06-08 Tom Tromey <tom@tromey.com>
2715 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
2717 2018-06-08 Tom Tromey <tom@tromey.com>
2719 * common/btrace-common.h (struct btrace_data): Add constructor,
2720 destructor, move assignment operator.
2721 <empty, clear, fini>: New methods.
2722 <format>: Initialize.
2723 (btrace_data_init, btrace_data_fini, btrace_data_clear)
2724 (btrace_data_empty): Don't declare.
2725 * common/btrace-common.c (btrace_data_init): Remove.
2726 (btrace_data::fini): Rename from btrace_data_fini.
2727 (btrace_data::empty): Rename from btrace_data_empty.
2728 (btrace_data::clear): Rename from btrace_data_clear. Return
2730 * btrace.h (make_cleanup_btrace_data): Don't declare.
2731 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
2732 (parse_xml_btrace): Update.
2733 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
2734 (maint_btrace_clear_packet_history_cmd): Update.
2736 2018-06-07 Pedro Alves <palves@redhat.com>
2738 * target.h (target_ops) <beneath>: Now a method. All references
2740 (class target_stack): New.
2741 * target.c (g_target_stack): New.
2742 (g_current_top_target): Delete.
2743 (current_top_target): Get the top target out of g_target_stack.
2744 (target_stack::push, target_stack::unpush): New.
2745 (push_target, unpush_target): Reimplement.
2746 (target_is_pushed): Reimplement in terms of g_target_stack.
2747 (target_ops::beneath, target_stack::find_beneath): New.
2749 2018-06-07 Pedro Alves <palves@redhat.com>
2751 * target.h (find_target_beneath): Delete declaration.
2752 * target.c (find_target_beneath): Delete definition.
2753 * aix-thread.c: All callers of find_target_beneath adjusted to
2754 call target_ops::beneath instead.
2755 * bsd-uthread.c: Likewise.
2756 * linux-thread-db.c: Likewise.
2757 * ravenscar-thread.c: Likewise.
2758 * sol-thread.c: Likewise.
2759 * spu-multiarch.c: Likewise.
2761 2018-06-07 Pedro Alves <palves@redhat.com>
2763 * target.h (target_ops) <beneath>: Now a method. All references
2765 (target_ops) <m_beneath>: New.
2766 * target.c (target_ops::beneath): New.
2767 * corelow.c: Adjust all references to target_ops::beneath.
2768 * linux-thread-db.c: Likewise.
2769 * make-target-delegates: Likewise.
2770 * record-btrace.c: Likewise.
2771 * record-full.c: Likewise.
2772 * remote.c: Likewise.
2773 * target.c: Likewise.
2774 * target-delegates.c: Regenerate.
2776 2018-06-07 Pedro Alves <palves@redhat.com>
2778 * target.h (target_stack): Delete.
2779 (current_top_target): Declare function.
2780 * target.c (target_stack): Delete.
2781 (g_current_top_target): New.
2782 (current_top_target): New function.
2783 * auxv.c: Use current_top_target instead of target_stack
2785 * avr-tdep.c: Likewise.
2786 * breakpoint.c: Likewise.
2787 * corefile.c: Likewise.
2788 * elfread.c: Likewise.
2790 * exceptions.c: Likewise.
2791 * frame.c: Likewise.
2792 * gdbarch-selftests.c: Likewise.
2793 * gnu-v3-abi.c: Likewise.
2794 * ia64-tdep.c: Likewise.
2795 * ia64-vms-tdep.c: Likewise.
2796 * infcall.c: Likewise.
2797 * infcmd.c: Likewise.
2798 * infrun.c: Likewise.
2799 * linespec.c: Likewise.
2800 * linux-tdep.c: Likewise.
2801 * minsyms.c: Likewise.
2802 * ppc-linux-nat.c: Likewise.
2803 * ppc-linux-tdep.c: Likewise.
2804 * procfs.c: Likewise.
2805 * regcache.c: Likewise.
2806 * remote.c: Likewise.
2807 * rs6000-tdep.c: Likewise.
2808 * s390-linux-nat.c: Likewise.
2809 * s390-tdep.c: Likewise.
2810 * solib-aix.c: Likewise.
2811 * solib-darwin.c: Likewise.
2812 * solib-dsbt.c: Likewise.
2813 * solib-spu.c: Likewise.
2814 * solib-svr4.c: Likewise.
2815 * solib-target.c: Likewise.
2816 * sparc-tdep.c: Likewise.
2817 * sparc64-tdep.c: Likewise.
2818 * spu-tdep.c: Likewise.
2819 * symfile.c: Likewise.
2820 * symtab.c: Likewise.
2821 * target-descriptions.c: Likewise.
2822 * target-memory.c: Likewise.
2823 * target.c: Likewise.
2824 * target.h: Likewise.
2825 * tracefile-tfile.c: Likewise.
2826 * tracepoint.c: Likewise.
2827 * valops.c: Likewise.
2828 * valprint.c: Likewise.
2829 * value.c: Likewise.
2830 * windows-tdep.c: Likewise.
2831 * mi/mi-main.c: Likewise.
2833 2018-06-07 Tom Tromey <tom@tromey.com>
2835 * valprint.h (build_address_symbolic): Declare.
2836 * printcmd.c (print_address_symbolic): Update.
2837 (build_address_symbolic): Change "name" and "filename" to
2839 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
2841 * defs.h (build_address_symbolic): Remove declaration.
2843 2018-06-07 Alan Hayward <alan.hayward@arm.com>
2845 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
2846 (aarch64_vnv_type): Add function.
2847 (aarch64_pseudo_register_name): Add V regs for SVE.
2848 (aarch64_pseudo_register_type): Likewise.
2849 (aarch64_pseudo_register_reggroup_p): Likewise.
2850 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
2851 (aarch64_pseudo_read_value): Add V regs for SVE.
2852 (aarch64_pseudo_write_2): Use V0 offset for SVE
2853 (aarch64_pseudo_write): Add V regs for SVE.
2854 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
2856 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
2858 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
2859 (sve_vl_from_vq): Likewise.
2861 2018-06-05 Tom Tromey <tom@tromey.com>
2863 * cli/cli-cmds.c (show_version): Update.
2864 * top.c (print_gdb_version): Add "interactive" parameter.
2866 * main.c (captured_main_1): Update.
2867 * top.h (print_gdb_version): Add "interactive" parameter and a
2870 2018-06-05 David Malcolm <dmalcolm@redhat.com>
2872 * common/enum-flags.h: Add trailing semicolon to example in
2875 2018-06-05 Tom Tromey <tom@tromey.com>
2878 * NEWS: Add entry about pager.
2879 * utils.c (pagination_disabled_for_command): New global.
2880 (prompt_for_continue): Allow "c" response to prompt.
2881 (reinitialize_more_filter): Clear
2882 pagination_disabled_for_command.
2883 (fputs_maybe_filtered): Check pagination_disabled_for_command.
2885 2018-06-04 Tom Tromey <tom@tromey.com>
2887 * ada-lang.h (ada_lookup_symbol_list): Update.
2888 * ada-lang.c (resolve_subexp): Update.
2889 (symbols_are_identical_enums): Change type of syms. Remove nsyms
2891 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
2892 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
2893 results parameter to std::vector.
2894 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
2896 * ada-exp.y (block_lookup): Update.
2897 (select_possible_type_sym): Change type of syms. Remove nsyms
2899 (write_var_or_type, write_name_assoc): Update.
2901 2018-06-04 Joel Brobecker <brobecker@adacore.com>
2903 * windows-nat.c (windows_nat_target::xfer_partial): Return
2904 TARGET_XFER_E_IO if we need to delegate to the target beneath
2905 but BENEATH is NULL.
2907 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
2909 * Makefile.in (config.status): Add configure.nat as a
2912 2018-06-04 Tom Tromey <tom@tromey.com>
2914 * cp-name-parser.y (cpname_state): Add method declarations.
2915 (HANDLE_QUAL): Update.
2916 (cpname_state::d_grab, cpname_state::fill_comp)
2917 (cpname_state::make_operator, cpname_state::make_dtor)
2918 (cpname_state::make_builtin_type, cpname_state::make_name)
2919 (cpname_state::d_qualify, cpname_state::d_int_type)
2920 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
2921 (%union): Move earlier.
2923 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2925 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
2927 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2929 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
2930 (aarch64_pseudo_write_1): Likewise.
2931 (aarch64_pseudo_read_value): Use helper.
2932 (aarch64_pseudo_write): Likewise.
2934 2018-06-04 Pedro Alves <palves@redhat.com>
2936 * darwin-nat.c (darwin_ops): Delete.
2937 (darwin_attach_pid): Use get_native_target.
2939 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2941 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
2942 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
2944 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2946 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
2947 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
2948 (aarch64_gdbarch_init): Check for SVE.
2949 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
2951 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2953 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
2954 * aarch64-tdep.h (aarch64_read_description): Likewise.
2955 * arch/aarch64.c (aarch64_create_target_description): Likewise.
2956 * arch/aarch64.h (aarch64_create_target_description): Likewise.
2957 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
2958 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
2959 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
2961 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
2963 * value.c (value_fetch_lazy_bitfield): New.
2964 (value_fetch_lazy_memory): New.
2965 (value_fetch_lazy_register): New.
2966 (value_fetch_lazy): Factor out to smaller functions.
2968 2018-06-01 Tom Tromey <tom@tromey.com>
2970 * cp-name-parser.y (backslashable, represented): Now const.
2972 2018-06-01 Tom Tromey <tom@tromey.com>
2974 * cp-name-parser.y: Include parser-defs.h.
2975 (parser_fprintf): Remove declaration.
2977 2018-06-01 Tom Tromey <tom@tromey.com>
2979 * cp-name-parser.y: Use %pure-parser, %lex-param, and
2981 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
2982 (global_result): Remove globals.
2983 (struct cpname_state): New.
2984 (yyparse): Don't declare.
2985 (yylex, yyerror): Move declarations after %union.
2986 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
2987 (make_name): Add state parameter.
2989 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
2991 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
2993 (yylex): Add lvalp, state parameters.
2994 (yyerror): Add state parameter.
2995 (cp_demangled_name_to_comp): Update.
2997 2018-06-01 Tom Tromey <tom@tromey.com>
2999 * cp-name-parser.y (parser_fprintf): Declare.
3000 (GDB_YY_REMAP_PREFIX): Define.
3001 Include yy-remap.h. Don't redefine yy* identifiers.
3003 2018-06-01 Tom Tromey <tom@tromey.com>
3005 * python/py-type.c (typy_legacy_template_argument): Update.
3006 * cp-support.h (cp_demangled_name_to_comp): Update.
3007 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3008 parameter to be a "std::string *".
3011 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3013 * ada-lex.l: Include "diagnostics.h" instead of
3014 "common/diagnostics.h".
3015 * unittests/environ-selftests.c: Likewise.
3016 * common/diagnostics.h: Moved to ../include.
3018 2018-06-01 Joel Brobecker <brobecker@adacore.com>
3020 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3021 to language_mode_manual while calling breakpoint_re_set_one.
3023 2018-06-01 Tom Tromey <tom@tromey.com>
3025 * valops.c (value_cast_structs, destructor_name_p): Update.
3026 * symtab.c (gdb_mangle_name): Update.
3027 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3029 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3030 (pascal_object_print_value_fields, pascal_object_print_value):
3032 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3033 * linespec.c (find_methods): Update.
3034 * gdbtypes.h (type_name_no_tag): Remove.
3035 (type_name_or_error): Rename from type_name_no_tag_or_error.
3036 * gdbtypes.c (type_name_no_tag): Remove.
3037 (type_name_or_error): Rename from type_name_no_tag_or_error.
3038 (lookup_struct_elt_type, check_typedef): Update.
3039 * expprint.c (print_subexp_standard): Update.
3040 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3041 * d-namespace.c (d_lookup_nested_symbol): Update.
3042 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3043 (cp_print_class_member): Update.
3044 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3045 * completer.c (add_struct_fields): Update.
3046 * c-typeprint.c (cp_type_print_derivation_info)
3047 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3049 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3050 (ada_prefer_type, ada_is_exception_sym): Update.
3052 2018-06-01 Tom Tromey <tom@tromey.com>
3054 * valops.c (enum_constant_from_type, value_namespace_elt)
3055 (value_maybe_namespace_elt): Update.
3056 * valarith.c (find_size_for_pointer_math): Update.
3057 * target-descriptions.c (make_gdb_type): Update.
3058 * symmisc.c (print_symbol): Update.
3059 * stabsread.c (define_symbol, read_type)
3060 (complain_about_struct_wipeout, add_undefined_type)
3061 (cleanup_undefined_types_1): Update.
3062 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3063 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3064 (rust_internal_print_type, rust_composite_type)
3065 (rust_evaluate_funcall, rust_evaluate_subexp)
3066 (rust_inclusive_range_type_p): Update.
3067 * python/py-type.c (typy_get_tag): Update.
3068 * p-typeprint.c (pascal_type_print_base): Update.
3069 * mdebugread.c (parse_symbol, parse_type): Update.
3070 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3072 * guile/scm-type.c (gdbscm_type_tag): Update.
3073 * go-lang.c (sixg_string_p): Update.
3074 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3076 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3077 (TYPE_TAG_NAME): Remove.
3078 * gdbtypes.c (type_name_no_tag): Simplify.
3079 (check_typedef, check_types_equal, recursive_dump_type)
3080 (copy_type_recursive, arch_composite_type): Update.
3081 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3082 in summary mode when needed.
3083 * eval.c (evaluate_funcall): Update.
3084 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3085 (process_structure_scope, read_enumeration_type)
3086 (read_namespace_type, read_module_type, determine_prefix): Update.
3087 * cp-support.c (inspect_type): Update.
3088 * coffread.c (process_coff_symbol, decode_base_type): Update.
3089 * c-varobj.c (c_is_path_expr_parent): Update.
3090 * c-typeprint.c (c_type_print_base_struct_union): Update.
3091 (c_type_print_base_1): Update. Print struct/class/union/enum in
3092 summary when using C language.
3093 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3094 (gen_maybe_namespace_elt): Update.
3095 * ada-lang.c (ada_type_name): Simplify.
3096 (empty_record, ada_template_to_fixed_record_type_1)
3097 (template_to_static_fixed_type)
3098 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3100 2018-06-01 Tom Tromey <tom@tromey.com>
3102 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3104 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3105 (c_print_type): Update.
3106 (c_print_type): New overload.
3107 (c_type_print_varspec_prefix, c_type_print_args)
3108 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3109 (c_type_print_base_struct_union, c_type_print_base_1)
3110 (cp_type_print_method_args): Add "language" parameter.
3111 (c_type_print_base): Update.
3112 * c-lang.h (c_print_type): Add new overload.
3114 2018-06-01 Tom Tromey <tom@tromey.com>
3116 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3117 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3119 2018-06-01 Alan Hayward <alan.hayward@arm.com>
3121 * aarch64-tdep.c (aarch64_sve_register_names): New const
3123 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3124 (AARCH64_SVE_Z_REGS_NUM): New define.
3125 (AARCH64_SVE_P_REGS_NUM): Likewise.
3126 (AARCH64_SVE_NUM_REGS): Likewise.
3128 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
3130 * nat/linux-ptrace.h [__alpha__]
3131 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3134 2018-05-31 Maciej W. Rozycki <macro@mips.com>
3136 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3137 the endianness selected.
3138 * NEWS: Document `set endian auto' mode operation update.
3140 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3142 * Makefile.in: Add new header.
3143 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3144 (sve_vl_from_vg): Likewise.
3145 (sve_vq_from_vl): Likewise.
3146 (sve_vl_from_vq): Likewise.
3147 (sve_vq_from_vg): Likewise.
3148 (sve_vg_from_vq): Likewise.
3149 * configure.nat: Add new c file.
3150 * nat/aarch64-sve-linux-ptrace.c: New file.
3151 * nat/aarch64-sve-linux-ptrace.h: New file.
3153 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3155 * aarch64-linux-nat.c (aarch64_linux_read_description):
3157 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3159 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3160 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3161 (aarch64_gdbarch_init): Add parmeter zero.
3162 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3163 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3164 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3166 * doc/gdb.texinfo: Describe SVE feature
3167 * features/aarch64-sve.c: New file.
3169 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
3172 * gdbarch.sh (significant_addr_bit): Default to zero when
3173 not set by target architecture.
3174 * gdbarch.c: Re-generated.
3175 * utils.c (address_significant): Update.
3177 2018-05-30 Joel Brobecker <brobecker@adacore.com>
3179 * stack.c (func_command): Remove trailing newline in call to error.
3181 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3183 * regcache.h (regcache_raw_collect): Remove, update callers to
3184 use regcache::raw_collect.
3185 * regcache.c (regcache_raw_collect): Remove.
3187 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3189 * regcache.h (regcache_raw_supply): Remove, update callers to
3190 use detached_regcache::raw_supply.
3191 * regcache.c (regcache_raw_supply): Remove.
3193 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3195 * regcache.h (regcache_cooked_write_part): Remove, update
3196 callers to use regcache::cooked_write_part.
3197 * regcache.c (regcache_cooked_write_part): Remove.
3199 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3201 * regcache.h (regcache_cooked_read_part): Remove, update callers
3202 to use readable_regcache::cooked_read_part.
3203 * regcache.c (regcache_cooked_read_part): Remove.
3205 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3207 * regcache.h (regcache_cooked_read_value): Remove, update
3208 callers to use readable_regcache::cooked_read_value.
3209 * regcache.c (regcache_cooked_read_value): Remove.
3211 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3213 * regcache.h (regcache_cooked_write): Remove, update callers to
3214 use regcache::cooked_write.
3215 * regcache.c (regcache_cooked_write): Remove.
3217 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3219 * regcache.h (regcache_invalidate): Remove, update callers to
3220 use detached_regcache::invalidate instead.
3221 * regcache.c (regcache_invalidate): Remove.
3223 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3225 * regcache.h (regcache_raw_write_part): Remove, update callers
3226 to use regcache::raw_write_part instead.
3227 * regcache.c (regcache_raw_write_part): Remove.
3229 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3231 * regcache.h (regcache_raw_read_part): Remove, update callers to
3232 use readable_regcache::raw_read_part instead.
3233 * regcache.c (regcache_raw_read_part): Remove.
3235 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3237 * regcache.h (regcache_cooked_read): Remove, update callers to
3238 use readable_regcache::cooked_read instead.
3239 * regcache.c (regcache_cooked_read): Remove.
3241 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3243 * regcache.h (regcache_raw_write): Remove, update callers to use
3244 regcache::raw_write instead.
3245 * regcache.c (regcache_raw_write): Remove.
3247 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3249 * regcache.h (regcache_raw_read): Remove, update callers to use
3250 readable_regcache::raw_read instead.
3251 * regcache.c (regcache_raw_read): Remove.
3253 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3255 * regcache.h (regcache_raw_update): Remove, update callers to
3256 use readable_regcache::raw_update instead.
3257 * regcache.c (regcache_raw_update): Remove.
3259 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3261 * regcache.h (regcache_register_status): Remove, update callers
3262 to use reg_buffer::get_register_status directly instead.
3263 * regcache.c (regcache_register_status): Remove.
3265 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3267 * regcache.h (regcache_get_ptid): Remove, update all callers to
3268 call regcache::ptid instead.
3269 * regcache.c (regcache_get_ptid): Remove.
3271 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3273 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3275 2018-05-30 Pedro Alves <palves@redhat.com>
3277 * common/common-exceptions.h (exception_rethrow): Use
3280 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
3282 * breakpoint.c (print_solib_event, check_status_catch_solib):
3283 Remove struct keyword in range-based for loops.
3284 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3285 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3287 * linespec.c (find_superclass_methods, search_minsyms_for_name):
3289 * symfile.c (addr_info_make_relative): Likewise.
3290 * thread.c (value_in_thread_stack_temporaries): Likewise.
3292 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
3295 * valops.c (value_struct_elt_for_reference): Call check_typedef on
3296 aggregate type to get its real type before accessing it.
3298 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
3300 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3301 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3302 * coff-pe-read.c (add_pe_forwarded_sym): Replace
3303 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3304 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3305 * jit.c (jit_breakpoint_re_set_internal): Likewise.
3306 * printcmd.c (info_address_command): Likewise.
3308 2018-05-29 Tom Tromey <tom@tromey.com>
3310 * windows-nat.c (handle_exception): Update fall-through comment.
3312 2018-05-29 Tom Tromey <tom@tromey.com>
3314 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
3315 (struct program_space) <added_solibs>: Now a std::vector.
3316 * breakpoint.c (print_solib_event): Update.
3317 (check_status_catch_solib): Update.
3318 * progspace.c (clear_program_space_solib_cache): Update.
3319 * solib.c (update_solib_list): Update.
3321 2018-05-29 Tom Tromey <tom@tromey.com>
3323 * python/py-type.c (typy_richcompare): Update.
3324 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3325 * gdbtypes.h (types_deeply_equal): Return bool.
3326 (types_equal): Likewise.
3327 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
3329 (check_types_equal): Change worklist to std::vector. Return
3331 (struct type_equality_entry): Add constructor.
3332 (compare_maybe_null_strings): Return bool.
3333 (check_types_worklist): Return bool. Change worklist to
3335 (types_deeply_equal): Use std::vector.
3336 (types_equal): Return bool.
3337 (compare_maybe_null_strings): Simplify.
3339 2018-05-29 Tom Tromey <tom@tromey.com>
3341 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
3343 2018-05-29 Tom Tromey <tom@tromey.com>
3345 * objc-lang.h: Don't include cp-support.h.
3346 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
3349 2018-05-27 Tom Tromey <tom@tromey.com>
3351 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3353 2018-05-25 Tom Tromey <tom@tromey.com>
3355 * value.c (value::location): Initialize.
3357 2018-05-25 Tom Tromey <tom@tromey.com>
3359 * dbxread.c (init_bincl_list): Remove.
3360 (bincl_list): Now a std::vector.
3361 (bincls_allocated, next_bincl): Remove.
3362 (free_bincl_list, do_free_bincl_list_cleanup)
3363 (make_cleanup_free_bincl_list): Remove.
3364 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3366 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3367 (struct header_file_location): Add constructor.
3368 (add_bincl_to_list): Remove.
3370 2018-05-25 Tom Tromey <tom@tromey.com>
3372 * tui/tui.c (tui_enable): Update.
3373 * mi/mi-interp.c (mi_interp::init): Update.
3374 * interps.h (class interp) <name>: New method.
3375 <m_name>: Rename from name.
3376 (~scoped_restore_interp): Update.
3377 * interps.c (interp::interp): Update.
3378 (interp_add, interp_set, interp_lookup_existing)
3379 (current_interp_named_p): Update.
3381 2018-05-25 Tom Tromey <tom@tromey.com>
3383 * interps.c (interp_name): Remove.
3384 * mi/mi-interp.c (mi_interp::init): Update.
3385 * interps.h (interp_name): Remove.
3386 (~scoped_restore_interp): Update.
3387 * tui/tui.c (tui_enable): Update.
3389 2018-05-25 Tom Tromey <tom@tromey.com>
3391 * utils.c (fputs_maybe_filtered): Update.
3392 * linespec.c (decode_line_full): Update.
3393 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3394 (mi_print_breakpoint_for_event, mi_solib_loaded)
3395 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3396 (mi_user_selected_context_changed): Update.
3397 * mi/mi-main.c (mi_execute_command): Update.
3398 * cli/cli-script.c (execute_control_command): Update.
3399 * python/python.c (execute_gdb_command): Update.
3400 * solib.c (info_sharedlibrary_command): Update.
3401 * interps.c (interp_ui_out): Remove.
3402 * interps.h (interp_ui_out): Remove.
3404 2018-05-25 Tom Tromey <tom@tromey.com>
3406 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3407 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3408 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3410 2018-05-25 Tom Tromey <tom@tromey.com>
3412 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3413 * interps.c (interp_exec): Use scoped_restore.
3415 2018-05-25 Tom Tromey <tom@tromey.com>
3417 * remote.c (remote_target::remote_file_get): Use
3419 (remote_target::remote_file_put): Likewise.
3421 2018-05-25 Tom Tromey <tom@tromey.com>
3423 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3425 (get_pe_section_index, add_pe_exported_sym): Update.
3426 (read_pe_exported_syms): Use gdb::def_vector.
3428 2018-05-25 Tom Tromey <tom@tromey.com>
3430 * frame.c (remove_prev_frame): Remove.
3431 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3433 2018-05-25 Maciej W. Rozycki <macro@mips.com>
3435 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3437 * mips-linux-nat.c (supply_fpregset): Always call
3438 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3439 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3440 `mips_fill_fpregset'.
3441 * mips-linux-tdep.c (mips_supply_fpregset)
3442 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3443 (mips_fill_fpregset_wrapper): Remove functions.
3444 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3445 (mips_linux_fpregset): Remove variable.
3446 (mips_linux_iterate_over_regset_sections): Use
3447 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3448 (mips_linux_o32_sigframe_init): Remove comment.
3450 2018-05-25 Pedro Alves <palves@redhat.com>
3452 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3453 (struct readahead_cache, struct packet_reg, struct
3454 remote_arch_state, class remote_state): Move higher up in the
3456 (remote_target::m_remote_state): Now an object instead of a pointer.
3457 (remote_target::get_remote_state): Adjust.
3459 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3461 * stack.c (select_and_print_frame): Delete.
3462 (struct function_bounds): Move struct within function.
3463 (func_command): Most content moved into new function
3464 find_frame_for_function, use new function, print result, add
3466 (find_frame_for_function): New function, now returns a result.
3468 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3470 * stack.c (iterate_over_block_arg_vars): Fix comment.
3471 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3473 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3477 (scoped_restore_selected_frame::scoped_restore_selected_frame):
3479 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3481 * frame.h (class scoped_restore_selected_frame): New class.
3482 * stack.c (print_frame_local_vars): Remove catching and rethrowing
3483 of any exception, use scoped_restore_selected_frame to restore the
3486 2018-05-24 Pedro Alves <palves@redhat.com>
3488 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3491 2018-05-23 Tom Tromey <tom@tromey.com>
3493 * complaints.c (struct complaints): Remove.
3494 (symfile_complaint_book): Remove.
3495 (series): New global.
3496 (complaint_internal): Update.
3497 (clear_complaints): Update.
3499 2018-05-23 Tom Tromey <tom@tromey.com>
3501 * complaints.c (counters): New global.
3502 (struct complain): Remove.
3503 (struct complaints) <root>: Remove.
3504 (complaint_sentinel): Remove.
3505 (symfile_complaint_book): Update.
3506 (find_complaint) Remove.
3507 (complaint_internal, clear_complaints): Update.
3509 2018-05-23 Tom Tromey <tom@tromey.com>
3511 * complaints.c (struct complain) <file, line>: Remove.
3512 (find_complaint): Remove file, line parameters.
3513 (complaint_internal): Update.
3515 2018-05-23 Tom Tromey <tom@tromey.com>
3517 * complaints.c (vcomplaint): Remove.
3518 (complaint_internal) Merge in contents of vcomplaint.
3520 2018-05-23 Tom Tromey <tom@tromey.com>
3522 * complaints.c (struct complaints) <explanation>: Remove.
3523 (symfile_explanations): Remove.
3524 (symfile_complaint_book): Update.
3525 (vcomplaint): Update.
3526 (struct explanation): Remove.
3528 2018-05-23 Tom Tromey <tom@tromey.com>
3530 * complaints.c (symfile_complaints): Remove.
3531 (complaint_internal): Remove "complaints" parameter.
3532 (clear_complaints, vcomplaint): Remove "c" parameter.
3533 (get_complaints): Remove.
3534 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3535 (dwarf2_debug_line_missing_file_complaint)
3536 (dwarf2_debug_line_missing_end_sequence_complaint)
3537 (dwarf2_complex_location_expr_complaint)
3538 (dwarf2_const_value_length_mismatch_complaint)
3539 (dwarf2_section_buffer_overflow_complaint)
3540 (dwarf2_macro_malformed_definition_complaint)
3541 (dwarf2_invalid_attrib_class_complaint)
3542 (create_addrmap_from_index, dw2_symtab_iter_next)
3543 (dw2_expand_marked_cus)
3544 (dw2_debug_names_iterator::find_vec_in_debug_names)
3545 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3546 (create_debug_type_hash_table, init_cutu_and_read_dies)
3547 (partial_die_parent_scope, add_partial_enumeration)
3548 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3549 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3550 (read_import_statement, read_file_scope, create_dwo_cu_reader)
3551 (create_cus_hash_table, create_dwp_hash_table)
3552 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3553 (dwarf2_rnglists_process, dwarf2_ranges_process)
3554 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3555 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3556 (handle_struct_member_die, process_structure_scope)
3557 (read_array_type, read_common_block, read_module_type)
3558 (read_tag_pointer_type, read_typedef, read_base_type)
3559 (read_subrange_type, load_partial_dies, partial_die_info::read)
3560 (partial_die_info::read, partial_die_info::read)
3561 (partial_die_info::read, read_checked_initial_length_and_offset)
3562 (dwarf2_string_attr, read_formatted_entries)
3563 (dwarf_decode_line_header)
3564 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3565 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3566 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3567 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3568 (get_signatured_type, get_DW_AT_signature_type)
3569 (decode_locdesc, file_file_name, consume_improper_spaces)
3570 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3571 (dwarf_decode_macro_bytes, dwarf_decode_macros)
3572 (dwarf2_symbol_mark_computed, set_die_type)
3573 (read_attribute_value): Update.
3574 * stap-probe.c (handle_stap_probe, get_stap_base_address):
3576 * dbxread.c (unknown_symtype_complaint)
3577 (lbrac_mismatch_complaint, repeated_header_complaint)
3578 (set_namestring, function_outside_compilation_unit_complaint)
3579 (read_dbx_symtab, process_one_symbol): Update.
3580 * gdbtypes.c (stub_noname_complaint): Update.
3581 * windows-nat.c (handle_unload_dll): Update.
3582 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3583 (decode_base_type): Update.
3584 * xcoffread.c (bf_notfound_complaint, ef_complaint)
3585 (eb_complaint, record_include_begin, record_include_end)
3586 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3587 (process_xcoff_symbol, read_symbol)
3588 (function_outside_compilation_unit_complaint)
3589 (scan_xcoff_symtab): Update.
3590 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3591 * buildsym.c (finish_block_internal, make_blockvector)
3592 (end_symtab_get_static_block, augment_type_symtab): Update.
3593 * dtrace-probe.c (dtrace_process_dof)
3594 (dtrace_static_probe_ops::get_probes): Update.
3595 * complaints.h (struct complaint): Don't declare.
3596 (symfile_complaints): Remove.
3597 (complaint_internal): Remove "complaints" parameter.
3598 (complaint): Likewise.
3599 (clear_complaints): Likewise.
3600 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3601 (reread_symbols): Update.
3602 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3603 (dwarf2_frame_cache, decode_frame_entry): Update.
3604 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3605 * objc-lang.c (lookup_objc_class, lookup_child_selector)
3606 (info_selectors_command): Update.
3607 * macrotab.c (macro_include, check_for_redefinition)
3608 (macro_undef): Update.
3609 * objfiles.c (filter_overlapping_sections): Update.
3610 * stabsread.c (invalid_cpp_abbrev_complaint)
3611 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3612 (define_symbol, error_type, read_type, rs6000_builtin_type)
3613 (stabs_method_name_from_physname, read_member_functions)
3614 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3615 (attach_fields_to_type, complain_about_struct_wipeout)
3616 (read_range_type, read_args, common_block_start)
3617 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
3619 * mdebugread.c (index_complaint, unknown_ext_complaint)
3620 (basic_type_complaint, bad_tag_guess_complaint)
3621 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
3622 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
3623 (parse_procedure, parse_lines)
3624 (function_outside_compilation_unit_complaint)
3625 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
3626 (bad_tag_guess_complaint, reg_value_complaint): Update.
3627 * cp-support.c (demangled_name_complaint): Update.
3628 * macroscope.c (sal_macro_scope): Update.
3629 * dwarf-index-write.c (class debug_names): Update.
3631 2018-05-23 Tom Tromey <tom@tromey.com>
3633 * complaints.c (clear_complaints): Remove "noisy" parameter.
3634 * complaints.h (clear_complaints): Update.
3635 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3636 (reread_symbols): Update.
3638 2018-05-23 Tom Tromey <tom@tromey.com>
3640 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
3642 (vcomplaint, clear_complaints): Update.
3643 (symfile_explanations): Remove some messages.
3645 2018-05-23 Tom Tromey <tom@tromey.com>
3647 * complaints.c (internal_complaint): Remove.
3648 * complaints.h (internal_complaint): Remove.
3650 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3652 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
3654 2018-05-22 Pedro Alves <palves@redhat.com>
3656 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
3657 (remote_fileio_badfd, remote_fileio_return_errno)
3658 (remote_fileio_return_success, remote_fileio_func_open)
3659 (remote_fileio_func_open, remote_fileio_func_close)
3660 (remote_fileio_func_read, remote_fileio_func_write)
3661 (remote_fileio_func_lseek, remote_fileio_func_rename)
3662 (remote_fileio_func_unlink, remote_fileio_func_stat)
3663 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
3664 (remote_fileio_func_isatty, remote_fileio_func_system): Add
3665 remote_target parameter.
3666 (remote_fio_func_map) <func>: Add remote_target parameter.
3667 (do_remote_fileio_request, remote_fileio_request):
3668 * remote-fileio.h (remote_fileio_request):
3669 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
3670 remote_target parameter.
3671 (remote_notif_process, handle_notification): Adjust to pass down
3673 (remote_notif_state_allocate): Add remote_target parameter. Save
3675 * remote-notif.h (struct remote_target): Forward declare.
3676 (struct notif_client) <parse, ack, can_get_pending_events>: Add
3677 remote_target parameter.
3678 (struct remote_notif_state) <remote>: New field.
3679 (remote_notif_ack, remote_notif_parse): Add remote_target
3681 (remote_notif_state_allocate, remote_notif_state_allocate): Add
3682 remote_target parameter.
3683 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
3684 (threads_listing_context, rmt_thread_action, protocol_feature)
3685 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
3686 (packet_result, struct threads_listing_context, remote_state):
3687 Move definitions and declarations higher up.
3688 (remote_target) <~remote_target>: Declare.
3689 (remote_download_command_source, remote_file_put, remote_file_get)
3690 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
3691 (remote_hostio_pread_vFile, remote_hostio_send_command)
3692 (remote_hostio_set_filesystem, remote_hostio_open)
3693 (remote_hostio_close, remote_hostio_unlink, remote_state)
3694 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
3695 (get_memory_write_packet_size, get_memory_read_packet_size)
3696 (append_pending_thread_resumptions, remote_detach_1)
3697 (append_resumption, remote_resume_with_vcont)
3698 (add_current_inferior_and_thread, wait_ns, wait_as)
3699 (process_stop_reply, remote_notice_new_inferior)
3700 (process_initial_stop_replies, remote_add_thread)
3701 (btrace_sync_conf, remote_btrace_maybe_reopen)
3702 (remove_new_fork_children, kill_new_fork_children)
3703 (discard_pending_stop_replies, stop_reply_queue_length)
3704 (check_pending_events_prevent_wildcard_vcont)
3705 (discard_pending_stop_replies_in_queue, stop_reply)
3706 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
3707 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
3708 (remote_interrupt_as, remote_interrupt_ns)
3709 (remote_get_noisy_reply, remote_query_attached)
3710 (remote_add_inferior, remote_current_thread, get_current_thread)
3711 (set_thread, set_general_thread, set_continue_thread)
3712 (set_general_process, write_ptid)
3713 (remote_unpack_thread_info_response, remote_get_threadinfo)
3714 (parse_threadlist_response, remote_get_threadlist)
3715 (remote_threadlist_iterator, remote_get_threads_with_ql)
3716 (remote_get_threads_with_qxfer)
3717 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
3718 (get_offsets, remote_check_symbols, remote_supported_packet)
3719 (remote_query_supported, remote_packet_size)
3720 (remote_serial_quit_handler, remote_detach_pid)
3721 (remote_vcont_probe, remote_resume_with_hc)
3722 (send_interrupt_sequence, interrupt_query)
3723 (remote_notif_get_pending_events, fetch_register_using_p)
3724 (send_g_packet, process_g_packet, fetch_registers_using_g)
3725 (store_register_using_P, store_registers_using_G)
3726 (set_remote_traceframe, check_binary_download)
3727 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
3728 (remote_xfer_live_readonly_partial, remote_read_bytes)
3729 (remote_send_printf, remote_flash_write, readchar)
3730 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
3731 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
3732 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
3733 (extended_remote_disable_randomization, extended_remote_run)
3734 (send_environment_packet, extended_remote_environment_support)
3735 (extended_remote_set_inferior_cwd, remote_write_qxfer)
3736 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
3737 (packet_command): Now methods of ...
3738 (remote_target): ... this class.
3739 (m_remote_state) <remote_target>: New field.
3740 (struct remote_state) <stop_reply_queue,
3741 remote_async_inferior_event_token, wait_forever_enabled_p>: New
3743 (remote_state::remote_state): Allocate stop_reply_queue.
3744 (remote_state): Delete global.
3745 (get_remote_state_raw): Delete.
3746 (remote_target::get_remote_state): Allocate m_remote_state on
3748 (get_current_remote_target): New.
3749 (remote_ops, extended_remote_ops): Delete.
3750 (wait_forever_enabled_p, remote_async_inferior_event_token):
3751 Delete, moved to struct remote_state.
3752 (remote_target::close): Delete self. Destruction bits split to
3754 (remote_target::~remote_target): ... this.
3755 (show_memory_packet_size): Adjust to use
3756 get_current_remote_target.
3757 (struct protocol_feature) <func>: Add remote_target parameter.
3758 All callers adjusted.
3759 (curr_quit_handler_target): New.
3760 (remote_serial_quit_handler): Reimplement.
3761 (remote_target::open_1): Adjust to use get_current_remote_target.
3762 Heap-allocate remote_target/extended_remote_target instances.
3763 (vcont_builder::vcont_builder): Add remote_target parameter, and
3764 save it in m_remote. All callers adjusted.
3765 (vcont_builder::m_remote): New field.
3766 (vcont_builder::restart, vcont_builder::flush)
3767 (vcont_builder::push_action): Use it.
3768 (remote_target::commit_resume): Use it.
3769 (struct queue_iter_param) <remote>: New field.
3770 (remote_target::remove_new_fork_children): Fill in 'remote' field.
3771 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
3772 (check_pending_event_prevents_wildcard_vcont_callback)
3773 (remote_target::check_pending_events_prevent_wildcard_vcont)
3774 (remote_target::discard_pending_stop_replies)
3775 (remote_target::discard_pending_stop_replies_in_queue)
3776 (remote_target::remote_notif_remove_queued_reply): Fill in
3778 (remote_notif_get_pending_events): New.
3779 (remote_target::readchar, remote_target::remote_serial_write):
3780 Save/restore curr_quit_handler_target.
3782 (kill_new_fork_children): Fill in 'remote' field.
3783 (packet_command): Use get_current_remote_target, defer to
3784 remote_target method of same name.
3785 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
3786 parameter, and save it in m_remote. All callers adjusted.
3787 (scoped_remote_fd::release): Use m_remote.
3788 (scoped_remote_fd::m_remote): New field.
3789 (remote_file_put, remote_file_get, remote_file_delete): Use
3790 get_current_remote_target, defer to remote_target method of same
3792 (remote_btrace_reset): Add remote_state paremeter. Update all
3794 (remote_async_inferior_event_handler). Pass down 'data'.
3795 (remote_new_objfile): Use get_current_remote_target.
3796 (remote_target::vcont_r_supported): New.
3797 (set_range_stepping): Use get_current_remote_target and
3798 remote_target::vcont_r_supported.
3799 (_initialize_remote): Don't allocate 'remote_state' and
3800 'stop_reply_queue' globals.
3801 * remote.h (struct remote_target): Forward declare.
3802 (getpkt, putpkt, remote_notif_get_pending_events): Add
3803 'remote_target' parameter.
3805 2018-05-22 Pedro Alves <palves@redhat.com>
3807 * remote.c (vcont_builder): Now a class. Make all data members
3809 (vcont_builder) <vcont_builder, restart, flush, push_action>:
3811 (vcont_builder_restart): Rename to ...
3812 (vcont_builder::restart): ... this.
3813 (vcont_builder_flush): Rename to ...
3814 (vcont_builder::flush): ... this.
3815 (vcont_builder_push_action): Rename to ...
3816 (vcont_builder::push_action): ... this.
3817 (remote_target::commit_resume): Adjust.
3819 2018-05-22 Pedro Alves <palves@redhat.com>
3821 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
3822 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
3823 (get_fixed_memory_packet_size): New.
3824 (get_memory_packet_size): Use it.
3825 (set_memory_packet_size): Don't override the config size with
3826 DEFAULT_MAX_MEMORY_PACKET_SIZE.
3827 (show_memory_packet_size): Use get_fixed_memory_packet_size.
3828 Don't refer to get_memory_packet_size if not connected to a remote
3829 target. Show "(default)" if configured size is 0.
3831 2018-05-22 Pedro Alves <palves@redhat.com>
3833 * remote.c (remote_target::mourn_inferior): Move
3834 discard_pending_stop_replies call here from ...
3835 (_initialize_remote): ... here.
3837 2018-05-22 Pedro Alves <palves@redhat.com>
3839 * remote.c (compare_section_command): Remove set_general_process
3842 2018-05-22 Pedro Alves <palves@redhat.com>
3844 * remote.c (struct packet_reg, struct remote_arch_state):
3845 Move higher up in the file.
3846 (remote_state) <m_arch_states>: Store remote_arch_state values
3847 instead of remote_arch_state pointers.
3848 (remote_state::get_remote_arch_state): Adjust.
3850 2018-05-22 Pedro Alves <palves@redhat.com>
3852 * remote.c: Include <unordered_map>.
3853 (remote_state): Now a class.
3854 (remote_state) <get_remote_arch_state>: Declare method.
3855 <get_remote_arch_state>: New field.
3856 (remote_arch_state) <remote_arch_state>: Declare ctor.
3857 <regs>: Now a unique_ptr.
3858 (remote_gdbarch_data_handle): Delete.
3859 (get_remote_arch_state): Delete.
3860 (remote_state::get_remote_arch_state): New.
3861 (get_remote_state): Adjust to call remote_state's
3862 get_remote_arch_state method.
3863 (init_remote_state): Delete, bits factored out to ...
3864 (remote_arch_state::remote_arch_state): ... this new method.
3865 (get_remote_packet_size, get_memory_packet_size)
3866 (process_g_packet, remote_target::fetch_registers)
3867 (remote_target::prepare_to_store, store_registers_using_G)
3868 (remote_target::store_registers, remote_target::get_trace_status):
3869 Adjust to call remote_state's method.
3870 (_initialize_remote): Remove reference to
3871 remote_gdbarch_data_handle.
3873 2018-05-22 Pedro Alves <palves@redhat.com>
3875 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
3876 pread>: New method declarations.
3877 (remote_target::open_1): Adjust.
3878 (readahead_cache_invalidate): Rename to ...
3879 (readahead_cache::invalidate): ... this, and adjust to be a class
3881 (readahead_cache_invalidate_fd): Rename to ...
3882 (readahead_cache::invalidate_fd): ... this, and adjust to be a
3884 (remote_hostio_pwrite): Adjust.
3885 (remote_hostio_pread_from_cache): Rename to ...
3886 (readahead_cache::pread): ... this, and adjust to be a class
3888 (remote_hostio_close): Adjust.
3890 2018-05-22 Pedro Alves <palves@redhat.com>
3892 * remote.c (remote_hostio_close_cleanup): Delete.
3893 (class scoped_remote_fd): New.
3894 (remote_file_put, remote_file_get): Use it.
3896 2018-05-22 Pedro Alves <palves@redhat.com>
3898 (struct vCont_action_support): Use bool and initialize all fields.
3899 (struct readahead_cache): Initialize all fields.
3900 (remote_state): Use bool and initialize all fields.
3901 (remote_state::remote_state, remote_state::~remote_state): New.
3902 (new_remote_state): Delete.
3903 (_initialize_remote): Use new to allocate remote_state.
3905 2018-05-22 Pedro Alves <palves@redhat.com>
3909 * c-exp.y: Include "c-support.h".
3910 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
3911 of tolower. Use c_ident_is_alpha to scan names.
3912 * c-lang.c: Include "c-support.h".
3913 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
3914 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
3915 * c-support.h: New file, with bits factored out from ...
3916 * cp-name-parser.y: ... this file.
3917 Include "c-support.h".
3918 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
3919 c-support.h and renamed.
3920 (symbol_end, yylex): Adjust.
3922 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3924 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
3925 parameter type to CORE_ADDR.
3926 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
3927 parameter type in declaration to CORE_ADDR.
3928 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
3929 target_auxv_search to get AT_HWCAP and use the result to get the
3931 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
3932 to CORE_ADDR. Remove the cast of the return value to unsigned
3933 long. Fix error predicate of target_auxv_search.
3934 (ppc_linux_nat_target::read_description): Change the type of the
3935 hwcap variable to CORE_ADDR.
3937 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3939 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
3940 if the size of fpscr is larger than 32 bits.
3942 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3944 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
3945 (ppc32_linux_vsxregmap): New global.
3946 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
3947 regcache_supply_regset, and regcache_collect_regset.
3948 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
3949 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
3950 (fetch_vsx_register, store_vsx_register): Remove.
3951 (fetch_vsx_registers): Add regno parameter. Get regset using
3952 ppc_linux_vsxregset. Use regset to supply registers.
3953 (store_vsx_registers): Add regno parameter. Get regset using
3954 ppc_linux_vsxregset. Use regset to collect registers.
3955 (fetch_register): Call fetch_vsx_registers instead of
3957 (store_register): Call store_vsx_registers instead of
3959 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
3960 new regno parameter.
3961 (store_ppc_registers): Call store_vsx_registers with -1 for the
3962 new regno parameter.
3963 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
3964 (ppc_collect_vsxregset): Remove.
3966 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3968 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
3970 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
3971 for vector register offset fields.
3972 (ppc64_fbsd_reg_offsets): Likewise.
3973 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3974 to vector register offset fields.
3975 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3976 to vector register offset fields.
3977 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
3978 vector register offset fields.
3979 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
3980 initializers for vector register offset fields.
3981 (rs6000_aix64_reg_offsets): Likewise.
3982 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
3983 (ppc_supply_vrregset): Remove.
3984 (ppc_collect_vrregset): Remove.
3985 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
3986 (ppc_linux_vrregset) : New function.
3987 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
3988 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
3989 (ppc32_linux_vrregset): Remove.
3990 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
3991 and use result instead of ppc32_linux_vrregset.
3992 (ppc32_linux_reg_offsets): Remove initializers for vector register
3994 (ppc64_linux_reg_offsets): Likewise.
3995 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
3996 * ppc-linux-nat.c: Include regset.h.
3997 (gdb_vrregset_t): Adjust comment to account for little-endian
3999 (supply_vrregset, fill_vrregset): Remove.
4000 (fetch_altivec_register, store_altivec_register): Remove.
4001 (fetch_altivec_registers): Add regno parameter. Get regset using
4002 ppc_linux_vrregset. Use regset to supply registers.
4003 (store_altivec_registers): Add regno parameter. Get regset using
4004 ppc_linux_vrregset. Use regset to collect registers.
4005 (fetch_register): Call fetch_altivec_registers instead of
4006 fetch_altivec_register.
4007 (store_register): Call store_altivec_registers instead of
4008 store_altivec_register.
4009 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4010 the new regno parameter.
4011 (store_ppc_registers): Call store_altivec_registers with -1 for
4012 the new regno parameter.
4014 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4016 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4017 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4018 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4019 (gdb_vrregset_t): Change array type size to
4020 PPC_LINUX_SIZEOF_VRREGSET.
4021 (gdb_vsxregset_t): Change array type size to
4022 PPC_LINUX_SIZEOF_VSXREGSET.
4023 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4024 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4025 PPC_LINUX_SIZEOF_VSXREGSET.
4027 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4029 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4030 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4032 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4033 ppc_linux_target_wordsize with tid.
4034 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4036 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4037 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4038 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4039 tid parameter. Remove static specifier.
4040 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4041 (ppc_linux_target_wordsize): New declaration.
4043 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4045 * arch/ppc-linux-common.c: New file.
4046 * arch/ppc-linux-common.h: New file.
4047 * arch/ppc-linux-tdesc.h: New file.
4048 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4049 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4050 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4051 arch/ppc-linux-tdesc.h.
4052 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4053 arch/ppc-linux-tdesc.h.
4054 (ppc_linux_nat_target::read_description): Remove target
4055 description matching code. Fill a ppc_linux_features struct and
4056 call ppc_linux_match_description with it. Move comment about ISA
4057 2.05 to ppc-linux-common.c.
4058 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4059 arch/ppc-linux-tdesc.h.
4060 (ppc_linux_core_read_description): Remove target description
4061 matching code. Fill a ppc_linux_features struct and call
4062 ppc_linux_match_description with it.
4063 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4064 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4065 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4066 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4067 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4068 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4069 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4070 (tdesc_powerpc_e500l): Remove.
4072 2018-05-22 Joel Brobecker <brobecker@adacore.com>
4074 * ada-lang.c (catch_assert_command): Pass empty string instead
4075 of NULL for excep_string argument.
4077 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4079 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4080 the width of the requested register exceeds the width of the
4083 2018-05-21 Tom Tromey <tom@tromey.com>
4085 * printcmd.c (output_command): Remove.
4086 (output_command_const): Rename to output_command.
4087 * valprint.h (output_command): Rename from output_command_const.
4088 * tracepoint.c (trace_dump_actions): Call output_command.
4090 2018-05-21 Tom Tromey <tom@tromey.com>
4092 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4093 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4094 * ada-lang.h (create_ada_exception_catchpoint): Update.
4095 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4097 (create_excep_cond_exprs, ~ada_catchpoint)
4098 (should_stop_exception, print_one_exception)
4099 (print_mention_exception, print_recreate_exception): Update.
4100 (ada_get_next_arg): Remove.
4101 (catch_ada_exception_command_split): Use std::string. Change type
4102 of "excep_string", "cond_string".
4103 (catch_ada_exception_command): Update.
4104 (create_ada_exception_catchpoint): Change type of excep_string.
4105 (ada_exception_sal): Remove excep_string parameter.
4106 (~ada_catchpoint): Remove.
4108 2018-05-21 Tom Tromey <tom@tromey.com>
4110 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4113 2018-05-21 Tom Tromey <tom@tromey.com>
4115 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4116 Return unique_xmalloc_ptr.
4117 (print_it_exception): Update.
4119 2018-05-21 Tom Tromey <tom@tromey.com>
4121 * tracepoint.c (trace_dump_actions): Use std::string.
4123 2018-05-21 Tom Tromey <tom@tromey.com>
4125 * symfile.c (reread_symbols): Use std::string for original_name.
4127 2018-05-21 Tom Tromey <tom@tromey.com>
4129 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4130 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4133 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4135 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4137 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4138 * objfiles.c (get_objfile_bfd_data): Allocate
4139 objfile_per_bfd_storage with obstack_new when allocating on
4142 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4144 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4146 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4147 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4148 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4149 (add_pending): Likewise.
4150 (parse_symbol): Likewise.
4151 (parse_partial_symbols): Likewise.
4152 (psymtab_to_symtab_1): Likewise.
4153 (new_psymtab): Likewise.
4154 (elfmdebug_build_psymtabs): Likewise.
4155 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4156 * objfiles.c (get_objfile_bfd_data): Likewise.
4157 (objfile_register_static_link): Likewise.
4158 * psymtab.c (allocate_psymtab): Likewise.
4159 * stabsread.c (read_member_functions): Likewise.
4160 * xcoffread.c (xcoff_end_psymtab): Likewise.
4162 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4164 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4165 compiler supports std::is_trivially_constructible.
4166 * common/poison.h: Include obstack.h.
4167 (IsMallocable): Define to is_trivially_constructible if the
4168 compiler supports it, define to true_type otherwise.
4172 (XOBNEWVEC): Redefine.
4173 * gdb_obstack.h (obstack_zalloc): New.
4174 (OBSTACK_ZALLOC): Redefine.
4175 (obstack_calloc): New.
4176 (OBSTACK_CALLOC): Redefine.
4178 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4179 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4181 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4182 obstack_calloc/obstack_zalloc.
4183 (gdbarch_obstack_zalloc): Remove.
4184 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4186 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4188 * stack.c (backtrace_command_1): Remove useless variable int i.
4190 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4192 * stack.c (print_frame_info): Fix comment.
4194 2018-05-18 Tom Tromey <tom@tromey.com>
4196 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4197 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4198 (~dwarf2_per_objfile): Update
4199 (dwarf2_get_dwz_file): Use new.
4200 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4203 2018-05-18 Tom Tromey <tom@tromey.com>
4205 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4207 * dwarf2read.c (struct dwp_file): Add constructor and
4209 (open_and_init_dwp_file): Return a unique_ptr.
4210 (dwarf2_per_objfile, create_dwp_hash_table)
4211 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4212 (lookup_dwo_unit_in_dwp): Update.
4213 (open_and_init_dwp_file, get_dwp_file): Update.
4215 2018-05-18 Tom Tromey <tom@tromey.com>
4217 * dwarf2read.c (dwarf2_per_objfile): Update.
4218 (struct mapped_index): Add initializers.
4219 (dwarf2_read_index): Use new.
4220 (dw2_symtab_iter_init): Update.
4221 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4224 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4226 * dwarf2read.c (mapped_index) <total_size>: Remove.
4228 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4230 * unittests/format_pieces-selftests.c (test_format_specifier):
4233 2018-05-18 Tom Tromey <tom@tromey.com>
4235 * c-typeprint.c (maybe_print_hole): New function.
4236 (c_print_type_struct_field_offset): Update.
4237 (c_type_print_base_struct_union): Call maybe_print_hole.
4239 2018-05-17 Keith Seitz <keiths@redhat.com>
4241 * breakpoint.c (build_bpstat_chain): New function, moved from
4243 (bpstat_stop_status): Add optional parameter, `stop_chain'.
4244 If no stop chain is passed, call build_bpstat_chain to build it.
4245 * breakpoint.h (build_bpstat_chain): Declare.
4246 (bpstat_stop_status): Move documentation here from breakpoint.c.
4247 * infrun.c (handle_signal_stop): Before eliding inlined frames,
4248 build the stop chain and pass it to skip_inline_frames.
4249 Pass this stop chain to bpstat_stop_status.
4250 * inline-frame.c: Include breakpoint.h.
4251 (stopped_by_user_bp_inline_frame): New function.
4252 (skip_inline_frames): Add parameter `stop_chain'.
4253 Move documention to inline-frame.h.
4254 If non-NULL, use stopped_by_user_bp_inline_frame to determine
4255 whether the frame should be elided.
4256 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4257 Add moved documentation and update for new parameter.
4259 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4262 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4263 unittests/format_pieces-selftests.c.
4264 * common/format.h (format_piece) <operator==>: New.
4265 (format_pieces) <operator[]>: Remove.
4266 * common/format.c (format_pieces::format_pieces): Handle \e.
4267 * unittests/format_pieces-selftests.c: New.
4269 2018-05-17 Tom Tromey <tom@tromey.com>
4272 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4273 (dw2_instantiate_symtab): Add skip_partial parameter.
4274 (dw2_find_last_source_symtab, dw2_map_expand_apply)
4275 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4276 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4277 (dw2_expand_symtabs_matching_one)
4278 (dw2_find_pc_sect_compunit_symtab)
4279 (dw2_debug_names_lookup_symbol)
4280 (dw2_debug_names_expand_symtabs_for_function): Update.
4281 (init_cutu_and_read_dies): Add skip_partial parameter.
4282 (process_psymtab_comp_unit, build_type_psymtabs_1)
4283 (process_skeletonless_type_unit, load_partial_comp_unit)
4284 (psymtab_to_symtab_1): Update.
4285 (load_full_comp_unit): Add skip_partial parameter.
4286 (process_imported_unit_die, dwarf2_read_addr_index)
4287 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4288 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4289 (read_signatured_type): Update.
4291 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4293 * value.c (release_value): Remove unused variable.
4294 (record_latest_value): Likewise.
4295 (access_value_history): Likewise.
4296 (preserve_values): Likewise.
4298 2018-05-17 Tom Tromey <tom@tromey.com>
4300 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4303 2018-05-16 Maciej W. Rozycki <macro@mips.com>
4306 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4307 Also handle registers whose width is not a multiple of
4309 (linux_nat_trad_target::store_register): Likewise.
4311 2018-05-16 Tom Tromey <tom@tromey.com>
4313 * gdbcore.h (core_bfd): Redefine.
4314 * corelow.c (core_target::close): Update.
4315 (core_target_open): Update.
4316 * progspace.h (struct program_space) <cbfd>: Now a
4319 2018-05-16 Tom Tromey <tom@tromey.com>
4322 * symfile-add-flags.h (enum symfile_add_flags)
4323 <SYMFILE_NOT_FILENAME>: New constant.
4324 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
4325 objfile name from BFD.
4326 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4327 * minidebug.c (find_separate_debug_file_in_section): Put
4328 ".gnu_debugdata" into BFD's file name.
4330 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
4332 * regcache.c (regcache_read_ftype, regcache_write_ftype):
4335 2018-05-15 Tamar Christina <tamar.christina@arm.com>
4338 * aarch64-tdep.c (aarch64_analyze_prologue,
4339 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4340 Indicate not interested in errors.
4342 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4344 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4345 Supply the MIPS_ZERO_REGNUM register.
4347 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4349 * mips-tdep.c (mask_address_var): Make variable static.
4351 2018-05-14 Tom Tromey <tom@tromey.com>
4353 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4355 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
4357 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4358 FXSAVE_ADDR for the mxcsr register.
4360 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
4362 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4364 2018-05-11 Pedro Alves <palves@redhat.com>
4366 * corelow.c (core_target) <core_target>: No longer inline.
4367 Initialize m_core_gdbarch, m_core_vec and build the section table
4369 <~core_target>: New.
4370 <core_gdbarch, get_core_register_section>: New methods.
4371 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4372 factored out from ...
4373 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4375 (sniff_core_bfd): Add gdbarch parameter.
4376 (core_close): Delete, merged into ...
4377 (core_target::close): ... here. Delete self.
4378 (core_close_cleanup): Delete.
4379 (core_target_open): Allocate a core_target on the heap. Use a
4380 unique_ptr instead of a cleanup. Bits moved into the core_target
4381 ctor. Adjust to use core_target methods instead of globals.
4382 (get_core_register_section): Rename to ...
4383 (core_target::get_core_register_section): ... this and adjust.
4384 (struct get_core_registers_cb_data): New.
4385 (get_core_registers_cb): Use it. Use bool.
4386 (core_target::fetch_registers, core_target::files_info)
4387 (core_target::xfer_partial, core_target::read_description)
4388 (core_target::pid_to, core_target::thread_name): Adjust to
4389 reference class fields instead of globals.
4390 * target.h (struct target_ops_deleter, target_ops_up): New.
4392 2018-05-11 Pedro Alves <palves@redhat.com>
4394 * corefile.c (core_file_command): Move to corelow.c.
4395 * corelow.c (the_core_target): Delete.
4396 (core_file_command): Moved from corefile.c. Check exec_bfd
4397 instead of the_core_target. Use target_detach instead of calling
4398 into the_core_target directly.
4399 (maybe_say_no_core_file_now): New.
4400 (core_target::detach): Use it.
4401 (_initialize_corelow): Remove references to the_core_target.
4402 * gdbcore.h (the_core_target): Delete.
4404 2018-05-11 Tom Tromey <tromey@redhat.com>
4405 Pedro Alves <palves@redhat.com>
4407 * corefile.c (core_bfd): Remove.
4408 * gdbcore.h (core_bfd): Now a macro.
4409 * progspace.h (struct program_space) <cbfd>: New field.
4411 2018-05-11 Tom Tromey <tom@tromey.com>
4413 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4416 2018-05-10 Tom Tromey <tom@tromey.com>
4418 * configure: Rebuild.
4419 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4421 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4424 * regformats/regdat.sh: Adjust script, following the addition
4425 of the new expedite_regs parameter to init_target_desc.
4427 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
4430 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4431 set_gdbarch_significant_addr_bit.
4432 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4433 set_gdbarch_significant_addr_bit.
4434 * utils.c (address_significant): Update to sign extend addr.
4436 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
4438 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4439 (xtensa_linux_init_abi): Limit tdep->num_regs by
4440 tdep->num_nopriv_regs.
4441 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4442 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4445 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
4447 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4449 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4451 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4452 (I387_MXCSR_INIT_VAL): New constant.
4453 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4454 buffer if it was supplied by the inferior.
4455 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4456 (i387_xsave_get_clear_bv): New function.
4457 (i387_supply_xsave): Only read x87 control registers from the
4458 xsave buffer if the feature is enabled, and the state will have
4459 been written, otherwise, provide a suitable default.
4460 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4461 including x87 control registers. Update control registers if they
4462 have changed from the default value, and mark features as enabled
4464 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4466 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4468 * spu-tdep.c (info_spu_event_command): Fix output formatting.
4470 2018-05-07 Tom Tromey <tom@tromey.com>
4472 * configure: Rebuild.
4473 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4475 2018-05-07 Tom Tromey <tom@tromey.com>
4478 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4479 bit. Use correct value for VDIV.
4481 2018-05-04 Tom Tromey <tom@tromey.com>
4483 * configure: Rebuild.
4484 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4486 2018-05-04 Tom Tromey <tom@tromey.com>
4488 * linux-record.c (record_linux_system_call) <case
4489 RECORD_SYS_RECVFROM>: Add "break".
4491 2018-05-04 Tom Tromey <tom@tromey.com>
4493 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4494 Add missing "break".
4495 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4496 Add missing "break".
4498 2018-05-04 Tom Tromey <tom@tromey.com>
4500 * rs6000-tdep.c (ppc_process_record_op4)
4501 (ppc_process_record_op63): Add fall-through comment.
4503 2018-05-04 Tom Tromey <tom@tromey.com>
4505 * i386-tdep.c (i386_process_record): Add fall-through comment.
4507 2018-05-04 Tom Tromey <tom@tromey.com>
4509 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4512 2018-05-04 Tom Tromey <tom@tromey.com>
4514 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4515 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4516 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4518 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4520 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4523 2018-05-04 Tom Tromey <tom@tromey.com>
4525 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4527 2018-05-04 Tom Tromey <tom@tromey.com>
4529 * s390-tdep.c (s390_process_record): Fix fall-through comments.
4530 * xcoffread.c (scan_xcoff_symtab): Move comment later.
4531 * symfile.c (section_is_mapped): Fix fall-through comment.
4532 * stabsread.c (define_symbol, read_member_functions): Fix
4533 fall-through comment.
4534 * s390-linux-tdep.c (s390_process_record): Fix fall-through
4536 * remote.c (remote_wait_as): Fix fall-through comment.
4537 * p-exp.y (yylex): Fix fall-through comment.
4538 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4540 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4541 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4542 * jv-exp.y (yylex): Fix fall-through comment.
4543 * go-exp.y (lex_one_token): Fix fall-through comment.
4544 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4545 fall-through comment.
4546 * f-exp.y (yylex): Fix fall-through comment.
4547 * dwarf2read.c (process_die): Fix fall-through comments.
4548 * dbxread.c (process_one_symbol): Fix fall-through comment.
4549 * d-exp.y (lex_one_token): Fix fall-through comment.
4550 * cp-name-parser.y (yylex): Fix fall-through comment.
4551 * coffread.c (coff_symtab_read): Fix fall-through comment.
4552 * c-exp.y (lex_one_token): Fix fall-through comment.
4553 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4555 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4558 2018-05-04 Tom Tromey <tom@tromey.com>
4561 * NEWS: Mention gdb.execute change.
4562 * gdbcmd.h (execute_control_command): Don't declare.
4563 * python/python.c (execute_gdb_command): Use read_command_lines_1,
4564 execute_control_commands, execute_control_commands_to_string.
4565 * cli/cli-script.h (execute_control_commands)
4566 (execute_control_commands_to_string): Declare.
4567 (execute_control_command): Add from_tty parameter.
4568 * cli/cli-script.c (execute_control_commands)
4569 (execute_control_commands_to_string): New functions.
4570 (execute_user_command): Use execute_control_commands.
4571 (execute_control_command_1): Add "from_tty" parameter. Update.
4572 (execute_control_command): Likewise.
4574 2018-05-04 Tom Tromey <tom@tromey.com>
4577 * NEWS: Mention that breakpoint commands are writable.
4578 * python/py-breakpoint.c (bppy_set_commands): New function.
4579 (breakpoint_object_getset) <"commands">: Use it.
4581 2018-05-04 Tom Tromey <tom@tromey.com>
4583 * tracepoint.c (actions_command): Update.
4584 * mi/mi-cmd-break.c (mi_command_line_array)
4585 (mi_command_line_array_cnt, mi_command_line_array_ptr)
4586 (mi_read_next_line): Remove.
4587 (mi_cmd_break_commands): Update.
4588 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4590 * cli/cli-script.c (get_command_line): Update.
4591 (process_next_line): Use function_view. Constify.
4592 (recurse_read_control_structure, read_command_lines)
4593 (read_command_lines_1): Change argument types to function_view.
4594 (do_define_command, document_command): Update.
4595 * breakpoint.h (check_tracepoint_command): Don't declare.
4596 * breakpoint.c (check_tracepoint_command): Remove.
4597 (commands_command_1, create_tracepoint_from_upload): Update.
4599 2018-05-04 Tom Tromey <tom@tromey.com>
4602 * cli/cli-script.h (enum command_control_type) <define_control>:
4604 * cli/cli-script.c (multi_line_command_p): Handle define_control.
4605 (build_command_line, execute_control_command_1)
4606 (process_next_line): Likewise.
4607 (do_define_command): New function, extracted from define_command.
4608 (define_command): Use it.
4610 2018-05-04 Tom Tromey <tom@tromey.com>
4612 * tracepoint.c (actions_command): Update.
4613 * cli/cli-script.h (read_command_lines): Update.
4614 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4615 (MAX_TMPBUF): Remove define.
4616 (define_command): Use string_printf.
4617 (document_command): Likewise.
4618 * breakpoint.c (commands_command_1): Update.
4620 2018-05-04 Tom Tromey <tom@tromey.com>
4622 * top.c (execute_command): Update.
4623 * cli/cli-script.h (print_command_lines): Now varargs.
4624 * cli/cli-script.c (print_command_lines): Now varargs.
4625 (execute_control_command_1) <case while_control, case if_control>:
4628 2018-05-04 Tom Tromey <tom@tromey.com>
4630 * tracepoint.c (all_tracepoint_actions): Rename from
4631 all_tracepoint_actions_and_cleanup. Change return type.
4632 (actions_command, encode_actions_1, encode_actions)
4633 (trace_dump_actions, tdump_command): Update.
4634 * remote.c (remote_download_command_source): Update.
4635 * python/python.c (gdbpy_eval_from_control_command)
4636 (python_command, python_interactive_command): Update.
4637 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
4638 * guile/guile.c (guile_command)
4639 (gdbscm_eval_from_control_command, guile_command): Update.
4640 * compile/compile.c (compile_code_command)
4641 (compile_print_command, compile_to_object): Update.
4642 * cli/cli-script.h (struct command_lines_deleter): New.
4643 (counted_command_line): New typedef.
4644 (struct command_line): Add constructor, destructor.
4645 <body_list>: Remove.
4646 <body_list_0, body_list_1>: New members.
4647 (command_line_up): Remove typedef.
4648 (read_command_lines, read_command_lines_1, get_command_line):
4650 (copy_command_lines): Don't declare.
4651 * cli/cli-script.c (build_command_line): Use "new".
4652 (get_command_line): Return counted_command_line.
4653 (print_command_lines, execute_user_command)
4654 (execute_control_command_1, while_command, if_command): Update.
4655 (realloc_body_list): Remove.
4656 (process_next_line, recurse_read_control_structure): Update.
4657 (read_command_lines, read_command_lines_1): Return counted_command_line.
4658 (free_command_lines): Use "delete".
4659 (copy_command_lines): Remove.
4660 (define_command, document_command, show_user_1): Update.
4661 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
4662 a counted_command_line.
4663 * breakpoint.h (counted_command_line): Remove typedef.
4664 (breakpoint_set_commands): Update.
4665 * breakpoint.c (check_no_tracepoint_commands)
4666 (validate_commands_for_breakpoint): Update.
4667 (breakpoint_set_commands): Change commands to be a
4668 counted_command_line.
4669 (commands_command_1, update_dprintf_command_list)
4670 (create_tracepoint_from_upload): Update.
4672 2018-05-04 Tom Tromey <tom@tromey.com>
4674 * cli/cli-decode.h (cmd_list_element): New constructor.
4675 (~cmd_list_element): New destructor.
4676 (struct cmd_list_element): Add initializers.
4677 * cli/cli-decode.c (do_add_cmd): Use "new".
4678 (delete_cmd): Use "delete".
4680 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4681 Pedro Alves <palves@redhat.com>
4683 PR breakpoints/19806 and support for PR external/20207.
4684 * NEWS: Mention Aarch64 watchpoint improvements.
4685 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
4686 watchpoints and PR external/20207 watchpoints.
4687 * nat/aarch64-linux-hw-point.c
4688 (kernel_supports_any_contiguous_range): New.
4689 (aarch64_watchpoint_offset): New.
4690 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
4691 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
4692 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
4693 (aarch64_align_watchpoint): New parameters aligned_offset_p and
4694 next_addr_orig_p. Support PR external/20207 watchpoints.
4695 (aarch64_downgrade_regs): New.
4696 (aarch64_dr_state_insert_one_point): New parameters offset and
4698 (aarch64_dr_state_remove_one_point): Likewise.
4699 (aarch64_handle_breakpoint): Update caller.
4700 (aarch64_handle_aligned_watchpoint): Likewise.
4701 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
4703 (aarch64_linux_set_debug_regs): Remove const from state. Call
4704 aarch64_downgrade_regs.
4705 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
4706 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
4707 (DR_CONTROL_MASK): ... this.
4708 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
4709 (unsigned int aarch64_watchpoint_offset): New prototype.
4710 (aarch64_linux_set_debug_regs): Remove const from state.
4711 * utils.c (align_up, align_down): Move to ...
4712 * common/common-utils.c (align_up, align_down): ... here.
4713 * utils.h (align_up, align_down): Move to ...
4714 * common/common-utils.h (align_up, align_down): ... here.
4716 2018-05-04 Joel Brobecker <brobecker@adacore.com>
4718 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
4719 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
4720 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
4721 Re-implement to match the ABI as summarized in GCC's
4722 gcc/config/sparc/sparc.c. All callers updated.
4723 (sparc32_store_arguments): Remove assertion.
4725 2018-05-04 Tom Tromey <tom@tromey.com>
4727 * printcmd.c: Don't include tui.h.
4728 (decode_format): Use skip_spaces.
4730 2018-05-04 Tom Tromey <tom@tromey.com>
4733 * printcmd.c (last_count): New global.
4734 (x_command): Use saved count when repeating.
4736 2018-05-04 Tom Tromey <tom@tromey.com>
4738 * nto-procfs.c (do_closedir_cleanup): Remove.
4739 (procfs_pidlist): Use gdb_dir_up.
4740 * procfs.c (do_closedir_cleanup): Remove.
4741 (proc_update_threads): Use gdb_dir_up.
4742 * common/filestuff.h (struct gdb_dir_deleter): New.
4743 (gdb_dir_up): New typedef.
4745 2018-05-04 Tom Tromey <tom@tromey.com>
4747 * ada-lang.c (print_mention_exception): Use std::string.
4749 2018-05-04 Tom Tromey <tom@tromey.com>
4751 * ada-lang.c (create_excep_cond_exprs): Update.
4752 (ada_exception_catchpoint_cond_string): Use std::string.
4754 2018-05-04 Tom Tromey <tom@tromey.com>
4756 * ada-lang.c (xget_renaming_scope): Return std::string.
4757 (old_renaming_is_invisible): Update.
4759 2018-05-04 Tom Tromey <tom@tromey.com>
4761 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
4762 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
4764 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
4766 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
4768 2018-05-04 Tom Tromey <tom@tromey.com>
4770 * remote.c (remote_query_supported_append): Change type.
4771 (remote_check_symbols): Update.
4773 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
4776 * configure.ac: Prepend libpython.
4777 * python/python-config.py: Likewise.
4778 * configure: Regenerate.
4780 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
4782 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
4784 2018-05-03 Pedro Alves <palves@redhat.com>
4787 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
4788 override. Write 'true' instead of '1'.
4789 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
4792 2018-05-02 Pedro Alves <palves@redhat.com>
4794 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
4795 add_inf_child_target.
4796 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
4797 add_inf_child_target.
4798 * aix-thread.c (aix_thread_target_info): New.
4799 (aix_thread_target) <shortname, longname, doc>: Delete.
4801 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
4802 add_inf_child_target.
4803 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
4804 add_inf_child_target.
4805 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
4806 add_inf_child_target.
4807 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
4808 add_inf_child_target.
4809 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
4810 add_inf_child_target.
4811 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
4812 add_inf_child_target.
4813 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
4814 add_inf_child_target.
4815 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
4816 add_inf_child_target.
4817 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
4818 add_inf_child_target.
4819 * bfd-target.c (target_bfd_target_info): New.
4820 (target_bfd) <shortname, longname, doc>: Delete.
4822 * bsd-kvm.c (bsd_kvm_target_info): New.
4823 (bsd_kvm_target) <shortname, longname, doc>: Delete.
4825 (bsd_kvm_target::open): Rename to ...
4826 (bsd_kvm_target_open): ... this. Adjust.
4827 * bsd-uthread.c (bsd_uthread_target_info): New.
4828 (bsd_uthread_target) <shortname, longname, doc>: Delete.
4830 * corefile.c (core_file_command): Adjust.
4831 * corelow.c (core_target_info): New.
4832 (core_target) <shortname, longname, doc>: Delete.
4834 (core_target::open): Rename to ...
4835 (core_target_open): ... this. Adjust.
4836 * ctf.c (ctf_target_info): New.
4837 (ctf_target) <shortname, longname, doc>: Delete.
4839 (ctf_target::open): Rename to ...
4840 (ctf_target_open): ... this.
4841 (_initialize_ctf): Adjust.
4842 * exec.c (exec_target_info): New.
4843 (exec_target) <shortname, longname, doc>: Delete.
4845 (exec_target::open): Rename to ...
4846 (exec_target_open): ... this.
4847 * gdbcore.h (core_target_open): Declare.
4848 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
4849 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
4850 add_inf_child_target.
4851 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
4852 add_inf_child_target.
4853 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
4854 add_inf_child_target.
4855 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
4856 add_inf_child_target.
4857 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
4858 add_inf_child_target.
4859 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
4860 add_inf_child_target.
4861 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
4862 add_inf_child_target.
4863 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
4864 add_inf_child_target.
4865 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
4866 add_inf_child_target.
4867 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
4868 add_inf_child_target.
4869 * inf-child.c (inf_child_target_info): New.
4870 (inf_child_target::info): New.
4871 (inf_child_open_target): Remove 'target' parameter. Use
4872 get_native_target instead.
4873 (inf_child_target::open): Delete.
4874 (add_inf_child_target): New.
4875 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
4878 (add_inf_child_target): Declare.
4879 (inf_child_open_target): Declare.
4880 * linux-thread-db.c (thread_db_target_info): New.
4881 (thread_db_target) <shortname, longname, doc>: Delete.
4883 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
4884 add_inf_child_target.
4885 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
4886 add_inf_child_target.
4887 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
4888 add_inf_child_target.
4889 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
4890 add_inf_child_target.
4891 * make-target-delegates (print_class): Adjust.
4892 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
4893 add_inf_child_target.
4894 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
4895 add_inf_child_target.
4896 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
4897 add_inf_child_target.
4898 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
4899 add_inf_child_target.
4900 * nto-procfs.c (nto_native_target_info): New.
4901 (nto_procfs_target_native) <shortname, longname, doc>:
4904 (nto_procfs_target_info): New.
4905 (nto_procfs_target_procfs) <shortname, longname, doc>:
4908 (init_procfs_targets): Adjust.
4909 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
4910 add_inf_child_target.
4911 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
4912 add_inf_child_target.
4913 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
4914 add_inf_child_target.
4915 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
4916 add_inf_child_target.
4917 * ravenscar-thread.c (ravenscar_target_info): New.
4918 (ravenscar_thread_target) <shortname, longname, doc>:
4921 * record-btrace.c (record_btrace_target_info):
4922 (record_btrace_target) <shortname, longname, doc>: Delete.
4924 (record_btrace_target::open): Rename to ...
4925 (record_btrace_target_open): ... this. Adjust.
4926 * record-full.c (record_longname, record_doc): New.
4927 (record_full_base_target) <shortname, longname, doc>: Delete.
4929 (record_full_target_info): New.
4930 (record_full_target): <shortname>: Delete.
4932 (record_full_core_open_1, record_full_open_1): Update comments.
4933 (record_full_base_target::open): Rename to ...
4934 (record_full_open): ... this.
4935 (cmd_record_full_restore): Update.
4936 (_initialize_record_full): Update.
4937 * remote-sim.c (remote_sim_target_info): New.
4938 (gdbsim_target) <shortname, longname, doc>: Delete.
4940 (gdbsim_target::open): Rename to ...
4941 (gdbsim_target_open): ... this.
4942 (_initialize_remote_sim): Adjust.
4943 * remote.c (remote_doc): New.
4944 (remote_target_info): New.
4945 (remote_target) <shortname, longname, doc>: Delete.
4947 (extended_remote_target_info): New.
4948 (extended_remote_target) <shortname, longname, doc>: Delete.
4950 (remote_target::open_1): Make static. Adjust.
4951 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
4952 * s390-linux-nat.c (_initialize_s390_nat): Use
4953 add_inf_child_target.
4954 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
4955 add_inf_child_target.
4956 * sol-thread.c (thread_db_target_info): New.
4957 (sol_thread_target) <shortname, longname, doc>: Delete.
4959 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
4960 add_inf_child_target.
4961 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
4962 add_inf_child_target.
4963 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
4964 add_inf_child_target.
4965 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
4966 add_inf_child_target.
4967 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
4968 add_inf_child_target.
4969 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
4970 add_inf_child_target.
4971 * spu-linux-nat.c (_initialize_spu_nat): Use
4972 add_inf_child_target.
4973 * spu-multiarch.c (spu_multiarch_target_info): New.
4974 (spu_multiarch_target) <shortname, longname, doc>: Delete.
4976 * target-delegates.c: Regenerate.
4977 * target.c: Include <unordered_map>.
4978 (target_ops_p): Delete.
4979 (DEF_VEC_P(target_ops_p)): Delete.
4980 (target_factories): New.
4981 (test_target_info): New.
4982 (test_target_ops::info): New.
4983 (open_target): Adjust to use target_factories.
4984 (add_target_with_completer): Rename to ...
4985 (add_target): ... this. Change prototype. Register target_info
4986 and open callback in target_factories. Register target_info in
4987 command context instead of target_ops.
4988 (add_target): Delete old implementation.
4989 (add_deprecated_target_alias): Change prototype. Adjust.
4990 (the_native_target): New.
4991 (set_native_target, get_native_target): New.
4992 (find_default_run_target): Use the_native_target.
4993 (find_attach_target, find_run_target): Simplify.
4994 (target_ops::open): Delete.
4995 (dummy_target_info): New.
4996 (dummy_target::shortname, dummy_target::longname)
4997 (dummy_target::doc): Delete.
4998 (dummy_target::info): New.
4999 (debug_target::shortname, debug_target::longname)
5000 (debug_target::doc): Delete.
5001 (debug_target::info): New.
5002 * target.h (struct target_info): New.
5003 (target_ops::~target_ops): Add comment.
5004 (target_ops::info): New.
5005 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5006 longer virtual. Implement in terms of target_info.
5007 (set_native_target, get_native_target): Declare.
5008 (target_open_ftype): New.
5009 (add_target, add_target_with_completer)
5010 (add_deprecated_target_alias): Change prototype.
5011 (test_target) <shortname, longname, doc>: Delete.
5013 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5014 add_inf_child_target.
5015 * tracefile-tfile.c (tfile_target_info): New.
5016 (tfile_target) <shortname, longname, doc>: Delete.
5018 (tfile_target::open): Rename to ...
5019 (tfile_target_open): ... this.
5020 (_initialize_tracefile_tfile): Adjust.
5021 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5022 add_inf_child_target.
5023 * windows-nat.c (_initialize_windows_nat): Use
5024 add_inf_child_target.
5025 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5026 add_inf_child_target.
5028 2018-05-02 Pedro Alves <palves@redhat.com>
5030 * linux-nat.h (linux_nat_target) <low_new_thread,
5031 low_delete_thread, low_new_fork, low_forget_process,
5032 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5033 New virtual methods.
5034 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5035 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5036 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5037 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5038 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5040 * linux-fork.c (delete_fork): Adjust to call low method.
5041 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5042 (linux_nat_new_fork, linux_nat_forget_process_hook)
5043 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5044 (linux_nat_status_is_event):
5045 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5046 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5048 (sigtrap_is_event): Rename to ...
5049 (linux_nat_target::low_status_is_event): ... this.
5050 (linux_nat_set_status_is_event): Delete.
5051 (save_stop_reason, linux_nat_wait_1)
5052 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5054 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5055 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5056 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5057 (linux_nat_set_prepare_to_resume): Delete.
5058 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5059 low virtual methods.
5060 * amd64-linux-nat.c: Likewise.
5061 * arm-linux-nat.c: Likewise.
5062 * i386-linux-nat.c: Likewise.
5063 * ia64-linux-nat.c: Likewise.
5064 * mips-linux-nat.c: Likewise.
5065 * ppc-linux-nat.c: Likewise.
5066 * s390-linux-nat.c: Likewise.
5067 * sparc64-linux-nat.c: Likewise.
5068 * x86-linux-nat.c: Likewise.
5069 * x86-linux-nat.h: Include "nat/x86-linux.h".
5070 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5071 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5074 2018-05-02 Pedro Alves <palves@redhat.com>
5076 * target.h (target_ops)
5077 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5078 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5079 stopped_by_watchpoint, have_continuable_watchpoint,
5080 stopped_data_address, watchpoint_addr_within_range,
5081 can_accel_watchpoint_condition, can_run, thread_alive,
5082 has_all_memory, has_memory, has_stack, has_registers,
5083 has_execution, can_async_p, is_async_p, supports_non_stop,
5084 always_non_stop_p, can_execute_reverse, supports_multi_process,
5085 supports_enable_disable_tracepoint,
5086 supports_disable_randomization, supports_string_tracing,
5087 supports_evaluation_of_breakpoint_conditions,
5088 can_run_breakpoint_commands, filesystem_is_local,
5089 can_download_tracepoint, get_trace_state_variable_value,
5090 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5091 record_is_replaying, record_will_replay,
5092 augmented_libraries_svr4_read>: Adjust to return bool.
5093 * aarch64-linux-nat.c: All implementations adjusted.
5094 * aix-thread.c: All implementations adjusted.
5095 * arm-linux-nat.c: All implementations adjusted.
5096 * breakpoint.c: All implementations adjusted.
5097 * bsd-kvm.c: All implementations adjusted.
5098 * bsd-uthread.c: All implementations adjusted.
5099 * corelow.c: All implementations adjusted.
5100 * ctf.c: All implementations adjusted.
5101 * darwin-nat.c: All implementations adjusted.
5102 * darwin-nat.h: All implementations adjusted.
5103 * exec.c: All implementations adjusted.
5104 * fbsd-nat.c: All implementations adjusted.
5105 * fbsd-nat.h: All implementations adjusted.
5106 * gnu-nat.c: All implementations adjusted.
5107 * gnu-nat.h: All implementations adjusted.
5108 * go32-nat.c: All implementations adjusted.
5109 * ia64-linux-nat.c: All implementations adjusted.
5110 * inf-child.c: All implementations adjusted.
5111 * inf-child.h: All implementations adjusted.
5112 * inf-ptrace.c: All implementations adjusted.
5113 * inf-ptrace.h: All implementations adjusted.
5114 * linux-nat.c: All implementations adjusted.
5115 * linux-nat.h: All implementations adjusted.
5116 * mips-linux-nat.c: All implementations adjusted.
5117 * nto-procfs.c: All implementations adjusted.
5118 * ppc-linux-nat.c: All implementations adjusted.
5119 * procfs.c: All implementations adjusted.
5120 * ravenscar-thread.c: All implementations adjusted.
5121 * record-btrace.c: All implementations adjusted.
5122 * record-full.c: All implementations adjusted.
5123 * remote-sim.c: All implementations adjusted.
5124 * remote.c: All implementations adjusted.
5125 * s390-linux-nat.c: All implementations adjusted.
5126 * sol-thread.c: All implementations adjusted.
5127 * spu-multiarch.c: All implementations adjusted.
5128 * target-delegates.c: All implementations adjusted.
5129 * target.c: All implementations adjusted.
5130 * target.h: All implementations adjusted.
5131 * tracefile-tfile.c: All implementations adjusted.
5132 * tracefile.c: All implementations adjusted.
5133 * tracefile.h: All implementations adjusted.
5134 * windows-nat.c: All implementations adjusted.
5135 * x86-linux-nat.h: All implementations adjusted.
5136 * x86-nat.h: All implementations adjusted.
5138 2018-05-02 Pedro Alves <palves@redhat.com>
5140 * make-target-delegates (scan_target_h): Don't trim lines here.
5141 Replace sequences of tabs and/or whitespace with a single
5143 (top level, parsing methods): Trim each line before processing it
5146 2018-05-02 Pedro Alves <palves@redhat.com>
5147 John Baldwin <jhb@freebsd.org>
5149 * target.h (enum strata) <debug_stratum>: New.
5150 (struct target_ops) <all delegation methods>: Replace by C++
5151 virtual methods, and drop "to_" prefix. All references updated
5153 <to_shortname, to_longname, to_doc, to_data,
5154 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5155 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5156 virtual methods. All references updated throughout.
5157 <can_attach, supports_terminal_ours, can_create_inferior,
5158 get_thread_control_capabilities, attach_no_wait>: New
5160 <insert_breakpoint, remove_breakpoint>: Now
5161 TARGET_DEFAULT_NORETURN methods.
5162 <info_proc>: Now returns bool.
5164 (OPS_MAGIC): Delete.
5165 (current_target): Delete. All references replaced by references
5167 (target_stack): ... this. New.
5168 (target_shortname, target_longname): Adjust.
5169 (target_can_run): Now a function declaration.
5170 (default_child_has_all_memory, default_child_has_memory)
5171 (default_child_has_stack, default_child_has_registers)
5172 (default_child_has_execution): Remove target_ops parameter.
5173 (complete_target_initialization): Delete.
5174 (memory_breakpoint_target): New template class.
5175 (test_target_ops): Refactor as a C++ class with virtual methods.
5176 * make-target-delegates (NAME_PART): Tighten.
5177 (POINTER_PART, CP_SYMBOL): New.
5178 (SIMPLE_RETURN_PART): Reimplement.
5179 (VEC_RETURN_PART): Expect less.
5180 (RETURN_PART, VIRTUAL_PART): New.
5181 (METHOD): Adjust to C++ virtual methods.
5182 (scan_target_h): Remove reference to C99.
5183 (dname): Output "target_ops::" prefix.
5184 (write_function_header): Adjust to output a C++ class method.
5185 (write_declaration): New.
5186 (write_delegator): Adjust to output a C++ class method.
5187 (tdname): Output "dummy_target::" prefix.
5188 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5190 (tdefault_names, debug_names): Delete.
5191 (return_types, tdefaults, styles, argtypes_array): New.
5192 (top level): All methods are delegators.
5194 (top level): Print dummy_target and debug_target classes.
5195 * target-delegates.c: Regenerate.
5196 * target-debug.h (target_debug_print_enum_info_proc_what)
5197 (target_debug_print_thread_control_capabilities)
5198 (target_debug_print_thread_info_p): New.
5199 * target.c (dummy_target): Delete.
5200 (the_dummy_target, the_debug_target): New.
5201 (target_stack): Now extern.
5202 (set_targetdebug): Push/unpush debug target.
5203 (default_child_has_all_memory, default_child_has_memory)
5204 (default_child_has_stack, default_child_has_registers)
5205 (default_child_has_execution): Remove target_ops parameter.
5206 (complete_target_initialization): Delete.
5207 (add_target_with_completer): No longer call
5208 complete_target_initialization.
5209 (target_supports_terminal_ours): Use regular delegation.
5210 (update_current_target): Delete.
5211 (push_target): No longer check magic number. Don't call
5212 update_current_target.
5213 (unpush_target): Don't call update_current_target.
5214 (target_is_pushed): No longer check magic number.
5215 (target_require_runnable): Skip for all stratums over
5217 (target_ops::info_proc): New.
5218 (target_info_proc): Use find_target_at and
5219 find_default_run_target.
5220 (target_supports_disable_randomization): Use regular delegation.
5221 (target_get_osdata): Use find_target_at.
5222 (target_ops::open, target_ops::close, target_ops::can_attach)
5223 (target_ops::attach, target_ops::can_create_inferior)
5224 (target_ops::create_inferior, target_ops::can_run)
5225 (target_can_run): New.
5226 (default_fileio_target): Use regular delegation.
5227 (target_ops::fileio_open, target_ops::fileio_pwrite)
5228 (target_ops::fileio_pread, target_ops::fileio_fstat)
5229 (target_ops::fileio_close, target_ops::fileio_unlink)
5230 (target_ops::fileio_readlink): New.
5231 (target_fileio_open_1, target_fileio_unlink)
5232 (target_fileio_readlink): Always call the target method. Handle
5234 (return_zero, return_zero_has_execution): Delete.
5235 (init_dummy_target): Delete.
5236 (dummy_target::dummy_target, dummy_target::shortname)
5237 (dummy_target::longname, dummy_target::doc)
5238 (debug_target::debug_target, debug_target::shortname)
5239 (debug_target::longname, debug_target::doc): New.
5240 (target_supports_delete_record): Use regular delegation.
5241 (setup_target_debug): Delete.
5242 (maintenance_print_target_stack): Skip debug_stratum.
5243 (initialize_targets): Instantiate the_dummy_target and
5245 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
5247 (target_auxv_search, fprint_target_auxv): Adjust.
5248 (info_auxv_command): Adjust to use target_stack.
5249 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5250 * exceptions.c (print_flush): Handle a NULL target_stack.
5251 * regcache.c (target_ops_no_register): Refactor as class with
5254 * exec.c (exec_target): New class.
5255 (exec_ops): Now an exec_target.
5256 (exec_open, exec_close_1, exec_get_section_table)
5257 (exec_xfer_partial, exec_files_info, exec_has_memory)
5258 (exec_make_note_section): Refactor as exec_target methods.
5259 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5261 (exec_target::find_memory_regions): New.
5262 (_initialize_exec): Don't call init_exec_ops.
5263 * gdbcore.h (exec_file_clear): Delete.
5265 * corefile.c (core_target): Delete.
5266 (core_file_command): Adjust.
5267 * corelow.c (core_target): New class.
5268 (the_core_target): New.
5269 (core_close): Remove target_ops parameter.
5270 (core_close_cleanup): Adjust.
5271 (core_target::close): New.
5272 (core_open, core_detach, get_core_registers, core_files_info)
5273 (core_xfer_partial, core_thread_alive, core_read_description)
5274 (core_pid_to_str, core_thread_name, core_has_memory)
5275 (core_has_stack, core_has_registers, core_info_proc): Rework as
5276 core_target methods.
5277 (ignore, core_remove_breakpoint, init_core_ops): Delete.
5278 (_initialize_corelow): Initialize the_core_target.
5279 * gdbcore.h (core_target): Delete.
5280 (the_core_target): New.
5282 * ctf.c: (ctf_target): New class.
5283 (ctf_ops): Now a ctf_target.
5284 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5285 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5286 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5288 (init_ctf_ops): Delete.
5289 (_initialize_ctf): Don't call it.
5290 * tracefile-tfile.c (tfile_target): New class.
5291 (tfile_ops): Now a tfile_target.
5292 (tfile_open, tfile_close, tfile_files_info)
5293 (tfile_get_tracepoint_status, tfile_trace_find)
5294 (tfile_fetch_registers, tfile_xfer_partial)
5295 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5296 Refactor as tfile_target methods.
5297 (tfile_xfer_partial_features): Remove target_ops parameter.
5298 (init_tfile_ops): Delete.
5299 (_initialize_tracefile_tfile): Don't call it.
5300 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5301 (tracefile_has_stack, tracefile_has_registers)
5302 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5303 tracefile_target methods.
5304 (init_tracefile_ops): Delete.
5305 (tracefile_target::tracefile_target): New.
5306 * tracefile.h: Include "target.h".
5307 (tracefile_target): New class.
5308 (init_tracefile_ops): Delete.
5310 * spu-multiarch.c (spu_multiarch_target): New class.
5311 (spu_ops): Now a spu_multiarch_target.
5312 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5313 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5314 (spu_search_memory, spu_mourn_inferior): Refactor as
5315 spu_multiarch_target methods.
5316 (init_spu_ops): Delete.
5317 (_initialize_spu_multiarch): Remove references to init_spu_ops,
5318 complete_target_initialization.
5320 * ravenscar-thread.c (ravenscar_thread_target): New class.
5321 (ravenscar_ops): Now a ravenscar_thread_target.
5322 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5323 (ravenscar_thread_alive, ravenscar_pid_to_str)
5324 (ravenscar_fetch_registers, ravenscar_store_registers)
5325 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5326 (ravenscar_stopped_by_hw_breakpoint)
5327 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5328 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5329 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5331 (init_ravenscar_thread_ops): Delete.
5332 (_initialize_ravenscar): Remove references to
5333 init_ravenscar_thread_ops and complete_target_initialization.
5335 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5336 (bsd_uthread_target): New class.
5337 (bsd_uthread_ops): Now a bsd_uthread_target.
5338 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5339 (bsd_uthread_close, bsd_uthread_mourn_inferior)
5340 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5341 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5342 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5343 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5344 (bsd_uthread_target): Delete function.
5345 (_initialize_bsd_uthread): Remove reference to
5346 complete_target_initialization.
5348 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
5349 (target_bfd): ... this new class.
5350 (target_bfd_xfer_partial, target_bfd_get_section_table)
5351 (target_bfd_close): Refactor as target_bfd methods.
5352 (target_bfd::~target_bfd): New.
5353 (target_bfd_reopen): Adjust.
5354 (target_bfd::close): New.
5356 * record-btrace.c (record_btrace_target): New class.
5357 (record_btrace_ops): Now a record_btrace_target.
5358 (record_btrace_open, record_btrace_stop_recording)
5359 (record_btrace_disconnect, record_btrace_close)
5360 (record_btrace_async, record_btrace_info)
5361 (record_btrace_insn_history, record_btrace_insn_history_range)
5362 (record_btrace_insn_history_from, record_btrace_call_history)
5363 (record_btrace_call_history_range)
5364 (record_btrace_call_history_from, record_btrace_record_method)
5365 (record_btrace_is_replaying, record_btrace_will_replay)
5366 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5367 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5368 (record_btrace_store_registers, record_btrace_prepare_to_store)
5369 (record_btrace_to_get_unwinder)
5370 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5371 (record_btrace_commit_resume, record_btrace_wait)
5372 (record_btrace_stop, record_btrace_can_execute_reverse)
5373 (record_btrace_stopped_by_sw_breakpoint)
5374 (record_btrace_supports_stopped_by_sw_breakpoint)
5375 (record_btrace_stopped_by_hw_breakpoint)
5376 (record_btrace_supports_stopped_by_hw_breakpoint)
5377 (record_btrace_update_thread_list, record_btrace_thread_alive)
5378 (record_btrace_goto_begin, record_btrace_goto_end)
5379 (record_btrace_goto, record_btrace_stop_replaying_all)
5380 (record_btrace_execution_direction)
5381 (record_btrace_prepare_to_generate_core)
5382 (record_btrace_done_generating_core): Refactor as
5383 record_btrace_target methods.
5384 (init_record_btrace_ops): Delete.
5385 (_initialize_record_btrace): Remove reference to
5386 init_record_btrace_ops.
5387 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5388 the execution_direction global.
5389 (record_full_base_target, record_full_target)
5390 (record_full_core_target): New classes.
5391 (record_full_ops): Now a record_full_target.
5392 (record_full_core_ops): Now a record_full_core_target.
5393 (record_full_target::detach, record_full_target::disconnect)
5394 (record_full_core_target::disconnect)
5395 (record_full_target::mourn_inferior, record_full_target::kill):
5397 (record_full_open, record_full_close, record_full_async): Refactor
5398 as methods of the record_full_base_target class.
5399 (record_full_resume, record_full_commit_resume): Refactor
5400 as methods of the record_full_target class.
5401 (record_full_wait, record_full_stopped_by_watchpoint)
5402 (record_full_stopped_data_address)
5403 (record_full_stopped_by_sw_breakpoint)
5404 (record_full_supports_stopped_by_sw_breakpoint)
5405 (record_full_stopped_by_hw_breakpoint)
5406 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5407 methods of the record_full_base_target class.
5408 (record_full_store_registers, record_full_xfer_partial)
5409 (record_full_insert_breakpoint, record_full_remove_breakpoint):
5410 Refactor as methods of the record_full_target class.
5411 (record_full_can_execute_reverse, record_full_get_bookmark)
5412 (record_full_goto_bookmark, record_full_execution_direction)
5413 (record_full_record_method, record_full_info, record_full_delete)
5414 (record_full_is_replaying, record_full_will_replay)
5415 (record_full_goto_begin, record_full_goto_end, record_full_goto)
5416 (record_full_stop_replaying): Refactor as methods of the
5417 record_full_base_target class.
5418 (record_full_core_resume, record_full_core_kill)
5419 (record_full_core_fetch_registers)
5420 (record_full_core_prepare_to_store)
5421 (record_full_core_store_registers, record_full_core_xfer_partial)
5422 (record_full_core_insert_breakpoint)
5423 (record_full_core_remove_breakpoint)
5424 (record_full_core_has_execution): Refactor
5425 as methods of the record_full_core_target class.
5426 (record_full_base_target::supports_delete_record): New.
5427 (init_record_full_ops): Delete.
5428 (init_record_full_core_ops): Delete.
5429 (record_full_save): Refactor as method of the
5430 record_full_base_target class.
5431 (_initialize_record_full): Remove references to
5432 init_record_full_ops and init_record_full_core_ops.
5434 * remote.c (remote_target, extended_remote_target): New classes.
5435 (remote_ops): Now a remote_target.
5436 (extended_remote_ops): Now an extended_remote_target.
5437 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5438 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5439 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5440 (remote_pass_signals, remote_set_syscall_catchpoint)
5441 (remote_program_signals, )
5442 (remote_thread_always_alive): Remove target_ops parameter.
5443 (remote_thread_alive, remote_thread_name)
5444 (remote_update_thread_list, remote_threads_extra_info)
5445 (remote_static_tracepoint_marker_at)
5446 (remote_static_tracepoint_markers_by_strid)
5447 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5448 (remote_open): Refactor as methods of remote_target.
5449 (extended_remote_open, extended_remote_detach)
5450 (extended_remote_attach, extended_remote_post_attach):
5451 (extended_remote_supports_disable_randomization)
5452 (extended_remote_create_inferior): : Refactor as method of
5453 extended_remote_target.
5454 (remote_set_permissions, remote_open_1, remote_detach)
5455 (remote_follow_fork, remote_follow_exec, remote_disconnect)
5456 (remote_resume, remote_commit_resume, remote_stop)
5457 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5458 (remote_terminal_ours, remote_wait, remote_fetch_registers)
5459 (remote_prepare_to_store, remote_store_registers)
5460 (remote_flash_erase, remote_flash_done, remote_files_info)
5461 (remote_kill, remote_mourn, remote_insert_breakpoint)
5462 (remote_remove_breakpoint, remote_insert_watchpoint)
5463 (remote_watchpoint_addr_within_range)
5464 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5465 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5466 (remote_supports_stopped_by_sw_breakpoint)
5467 (remote_stopped_by_hw_breakpoint)
5468 (remote_supports_stopped_by_hw_breakpoint)
5469 (remote_stopped_by_watchpoint, remote_stopped_data_address)
5470 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5471 (remote_verify_memory): Refactor as methods of remote_target.
5472 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5474 (remote_xfer_partial, remote_get_memory_xfer_limit)
5475 (remote_search_memory, remote_rcmd, remote_memory_map)
5476 (remote_pid_to_str, remote_get_thread_local_address)
5477 (remote_get_tib_address, remote_read_description): Refactor as
5478 methods of remote_target.
5479 (remote_target::fileio_open, remote_target::fileio_pwrite)
5480 (remote_target::fileio_pread, remote_target::fileio_close): New.
5481 (remote_hostio_readlink, remote_hostio_fstat)
5482 (remote_filesystem_is_local, remote_can_execute_reverse)
5483 (remote_supports_non_stop, remote_supports_disable_randomization)
5484 (remote_supports_multi_process, remote_supports_cond_breakpoints)
5485 (remote_supports_enable_disable_tracepoint)
5486 (remote_supports_string_tracing)
5487 (remote_can_run_breakpoint_commands, remote_trace_init)
5488 (remote_download_tracepoint, remote_can_download_tracepoint)
5489 (remote_download_trace_state_variable, remote_enable_tracepoint)
5490 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5491 (remote_trace_start, remote_get_trace_status)
5492 (remote_get_tracepoint_status, remote_trace_stop)
5493 (remote_trace_find, remote_get_trace_state_variable_value)
5494 (remote_save_trace_data, remote_get_raw_trace_data)
5495 (remote_set_disconnected_tracing, remote_core_of_thread)
5496 (remote_set_circular_trace_buffer, remote_traceframe_info)
5497 (remote_get_min_fast_tracepoint_insn_len)
5498 (remote_set_trace_buffer_size, remote_set_trace_notes)
5499 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5500 (remote_disable_btrace, remote_teardown_btrace)
5501 (remote_read_btrace, remote_btrace_conf)
5502 (remote_augmented_libraries_svr4_read, remote_load)
5503 (remote_pid_to_exec_file, remote_can_do_single_step)
5504 (remote_execution_direction, remote_thread_handle_to_thread_info):
5505 Refactor as methods of remote_target.
5506 (init_remote_ops, init_extended_remote_ops): Delete.
5507 (remote_can_async_p, remote_is_async_p, remote_async)
5508 (remote_thread_events, remote_upload_tracepoints)
5509 (remote_upload_trace_state_variables): Refactor as methods of
5511 (_initialize_remote): Remove references to init_remote_ops and
5512 init_extended_remote_ops.
5514 * remote-sim.c (gdbsim_target): New class.
5515 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5516 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5517 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5518 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5519 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5520 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5521 Refactor as methods of gdbsim_target.
5522 (gdbsim_ops): Now a gdbsim_target.
5523 (init_gdbsim_ops): Delete.
5524 (gdbsim_cntrl_c): Adjust.
5525 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5527 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5528 (the_amd64_linux_nat_target): New.
5529 (amd64_linux_fetch_inferior_registers)
5530 (amd64_linux_store_inferior_registers): Refactor as methods of
5531 amd64_linux_nat_target.
5532 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
5533 * i386-linux-nat.c: Don't include "linux-nat.h".
5534 (i386_linux_nat_target): New class.
5535 (the_i386_linux_nat_target): New.
5536 (i386_linux_fetch_inferior_registers)
5537 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5538 as methods of i386_linux_nat_target.
5539 (_initialize_i386_linux_nat): Adjust. Set linux_target.
5540 * inf-child.c (inf_child_ops): Delete.
5541 (inf_child_fetch_inferior_registers)
5542 (inf_child_store_inferior_registers): Delete.
5543 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5544 methods of inf_child_target.
5545 (inf_child_target::supports_terminal_ours)
5546 (inf_child_target::terminal_init)
5547 (inf_child_target::terminal_inferior)
5548 (inf_child_target::terminal_ours_for_output)
5549 (inf_child_target::terminal_ours, inf_child_target::interrupt)
5550 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5552 (inf_child_open, inf_child_disconnect, inf_child_close)
5553 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5554 (inf_child_post_startup_inferior, inf_child_can_run)
5555 (inf_child_pid_to_exec_file): Refactor as methods of
5557 (inf_child_follow_fork): Delete.
5558 (inf_child_target::can_create_inferior)
5559 (inf_child_target::can_attach): New.
5560 (inf_child_target::has_all_memory, inf_child_target::has_memory)
5561 (inf_child_target::has_stack, inf_child_target::has_registers)
5562 (inf_child_target::has_execution): New.
5563 (inf_child_fileio_open, inf_child_fileio_pwrite)
5564 (inf_child_fileio_pread, inf_child_fileio_fstat)
5565 (inf_child_fileio_close, inf_child_fileio_unlink)
5566 (inf_child_fileio_readlink, inf_child_use_agent)
5567 (inf_child_can_use_agent): Refactor as methods of
5569 (return_zero, inf_child_target): Delete.
5570 (inf_child_target::inf_child_target): New.
5571 * inf-child.h: Include "target.h".
5572 (inf_child_target): Delete function prototype.
5573 (inf_child_target): New class.
5574 (inf_child_open_target, inf_child_mourn_inferior)
5575 (inf_child_maybe_unpush_target): Delete.
5576 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5577 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5578 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5579 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5580 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5581 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5582 (inf_ptrace_wait, inf_ptrace_xfer_partial)
5583 (inf_ptrace_thread_alive, inf_ptrace_files_info)
5584 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5585 methods of inf_ptrace_target.
5586 (inf_ptrace_target): Delete function.
5587 * inf-ptrace.h: Include "inf-child.h".
5588 (inf_ptrace_target): Delete function declaration.
5589 (inf_ptrace_target): New class.
5590 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5591 * linux-nat.c (linux_target): New.
5592 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5593 (linux_nat_target::~linux_nat_target): New.
5594 (linux_child_post_attach, linux_child_post_startup_inferior)
5595 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5596 (linux_child_remove_fork_catchpoint)
5597 (linux_child_insert_vfork_catchpoint)
5598 (linux_child_remove_vfork_catchpoint)
5599 (linux_child_insert_exec_catchpoint)
5600 (linux_child_remove_exec_catchpoint)
5601 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5602 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5603 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5604 (linux_nat_stopped_data_address)
5605 (linux_nat_stopped_by_sw_breakpoint)
5606 (linux_nat_supports_stopped_by_sw_breakpoint)
5607 (linux_nat_stopped_by_hw_breakpoint)
5608 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5609 (linux_nat_kill, linux_nat_mourn_inferior)
5610 (linux_nat_xfer_partial, linux_nat_thread_alive)
5611 (linux_nat_update_thread_list, linux_nat_pid_to_str)
5612 (linux_nat_thread_name, linux_child_pid_to_exec_file)
5613 (linux_child_static_tracepoint_markers_by_strid)
5614 (linux_nat_is_async_p, linux_nat_can_async_p)
5615 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5616 (linux_nat_supports_multi_process)
5617 (linux_nat_supports_disable_randomization, linux_nat_async)
5618 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
5619 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
5620 (linux_nat_fileio_open, linux_nat_fileio_readlink)
5621 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
5622 methods of linux_nat_target.
5623 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
5624 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
5626 (check_stopped_by_watchpoint): Adjust.
5627 (linux_xfer_partial): Delete.
5628 (linux_target_install_ops, linux_target, linux_nat_add_target):
5630 (linux_nat_target::linux_nat_target): New.
5631 * linux-nat.h: Include "inf-ptrace.h".
5632 (linux_nat_target): New.
5633 (linux_target, linux_target_install_ops, linux_nat_add_target):
5634 Delete function declarations.
5635 (linux_target): Declare global.
5636 * linux-thread-db.c (thread_db_target): New.
5637 (thread_db_target::thread_db_target): New.
5638 (thread_db_ops): Delete.
5639 (the_thread_db_target): New.
5640 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
5641 (thread_db_update_thread_list, thread_db_pid_to_str)
5642 (thread_db_extra_thread_info)
5643 (thread_db_thread_handle_to_thread_info)
5644 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
5645 (thread_db_resume): Refactor as methods of thread_db_target.
5646 (init_thread_db_ops): Delete.
5647 (_initialize_thread_db): Remove reference to init_thread_db_ops.
5648 * x86-linux-nat.c: Don't include "linux-nat.h".
5649 (super_post_startup_inferior): Delete.
5650 (x86_linux_nat_target::~x86_linux_nat_target): New.
5651 (x86_linux_child_post_startup_inferior)
5652 (x86_linux_read_description, x86_linux_enable_btrace)
5653 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
5654 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
5655 methods of x86_linux_nat_target.
5656 (x86_linux_create_target): Delete. Bits folded ...
5657 (x86_linux_add_target): ... here. Now takes a linux_nat_target
5659 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
5660 (x86_linux_nat_target): New class.
5661 (x86_linux_create_target): Delete.
5662 (x86_linux_add_target): Now takes a linux_nat_target pointer.
5663 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
5664 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
5665 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
5666 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
5667 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
5669 (x86_use_watchpoints): Delete.
5670 * x86-nat.h: Include "breakpoint.h" and "target.h".
5671 (x86_use_watchpoints): Delete.
5672 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
5673 (x86_stopped_by_watchpoint, x86_stopped_data_address)
5674 (x86_insert_watchpoint, x86_remove_watchpoint)
5675 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
5676 (x86_stopped_by_hw_breakpoint): New declarations.
5677 (x86_nat_target): New template class.
5679 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
5680 (the_ppc_linux_nat_target): New.
5681 (ppc_linux_fetch_inferior_registers)
5682 (ppc_linux_can_use_hw_breakpoint)
5683 (ppc_linux_region_ok_for_hw_watchpoint)
5684 (ppc_linux_ranged_break_num_registers)
5685 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
5686 (ppc_linux_insert_mask_watchpoint)
5687 (ppc_linux_remove_mask_watchpoint)
5688 (ppc_linux_can_accel_watchpoint_condition)
5689 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
5690 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
5691 (ppc_linux_watchpoint_addr_within_range)
5692 (ppc_linux_masked_watch_num_registers)
5693 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
5694 (ppc_linux_read_description): Refactor as methods of
5695 ppc_linux_nat_target.
5696 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
5698 * procfs.c (procfs_xfer_partial): Delete forward declaration.
5699 (procfs_target): New class.
5700 (the_procfs_target): New.
5701 (procfs_target): Delete function.
5702 (procfs_auxv_parse, procfs_attach, procfs_detach)
5703 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
5704 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
5705 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
5706 (procfs_create_inferior, procfs_update_thread_list)
5707 (procfs_thread_alive, procfs_pid_to_str)
5708 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
5709 (procfs_stopped_data_address, procfs_insert_watchpoint)
5710 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
5711 (proc_find_memory_regions, procfs_info_proc)
5712 (procfs_make_note_section): Refactor as methods of procfs_target.
5713 (_initialize_procfs): Adjust.
5714 * sol-thread.c (sol_thread_target): New class.
5715 (sol_thread_ops): Now a sol_thread_target.
5716 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
5717 (sol_thread_fetch_registers, sol_thread_store_registers)
5718 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
5719 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
5720 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
5721 (init_sol_thread_ops): Delete.
5722 (_initialize_sol_thread): Adjust. Remove references to
5723 init_sol_thread_ops and complete_target_initialization.
5725 * windows-nat.c (windows_nat_target): New class.
5726 (windows_fetch_inferior_registers)
5727 (windows_store_inferior_registers, windows_resume, windows_wait)
5728 (windows_attach, windows_detach, windows_pid_to_exec_file)
5729 (windows_files_info, windows_create_inferior)
5730 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
5731 (windows_close, windows_pid_to_str, windows_xfer_partial)
5732 (windows_get_tib_address, windows_get_ada_task_ptid)
5733 (windows_thread_name, windows_thread_alive): Refactor as
5734 windows_nat_target methods.
5735 (do_initial_windows_stuff): Adjust.
5736 (windows_target): Delete function.
5737 (_initialize_windows_nat): Adjust.
5739 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
5740 (darwin_mourn_inferior, darwin_kill_inferior)
5741 (darwin_create_inferior, darwin_attach, darwin_detach)
5742 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
5743 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
5744 (darwin_supports_multi_process): Refactor as darwin_nat_target
5746 (darwin_resume_to, darwin_files_info): Delete.
5747 (_initialize_darwin_inferior): Rename to ...
5748 (_initialize_darwin_nat): ... this. Adjust to C++ification.
5749 * darwin-nat.h: Include "inf-child.h".
5750 (darwin_nat_target): New class.
5751 (darwin_complete_target): Delete.
5752 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
5753 (darwin_target): New.
5754 (i386_darwin_fetch_inferior_registers)
5755 (i386_darwin_store_inferior_registers): Refactor as methods of
5757 (darwin_complete_target): Delete, with ...
5758 (_initialize_i386_darwin_nat): ... bits factored out here.
5760 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
5761 (the_alpha_linux_nat_target): New.
5762 (alpha_linux_register_u_offset): Refactor as
5763 alpha_linux_nat_target method.
5764 (_initialize_alpha_linux_nat): Adjust.
5765 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
5766 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5767 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
5768 methods of linux_nat_trad_target.
5769 (linux_trad_target): Delete.
5770 * linux-nat-trad.h (linux_trad_target): Delete function.
5771 (linux_nat_trad_target): New class.
5772 * mips-linux-nat.c (mips_linux_nat_target): New class.
5773 (super_fetch_registers, super_store_registers, super_close):
5775 (the_mips_linux_nat_target): New.
5776 (mips64_linux_regsets_fetch_registers)
5777 (mips64_linux_regsets_store_registers)
5778 (mips64_linux_fetch_registers, mips64_linux_store_registers)
5779 (mips_linux_register_u_offset, mips_linux_read_description)
5780 (mips_linux_can_use_hw_breakpoint)
5781 (mips_linux_stopped_by_watchpoint)
5782 (mips_linux_stopped_data_address)
5783 (mips_linux_region_ok_for_hw_watchpoint)
5784 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5785 (mips_linux_close): Refactor as methods of mips_linux_nat.
5786 (_initialize_mips_linux_nat): Adjust to C++ification.
5788 * aix-thread.c (aix_thread_target): New class.
5789 (aix_thread_ops): Now an aix_thread_target.
5790 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
5791 (aix_thread_fetch_registers, aix_thread_store_registers)
5792 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
5793 (aix_thread_thread_alive, aix_thread_pid_to_str)
5794 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
5795 Refactor as methods of aix_thread_target.
5796 (init_aix_thread_ops): Delete.
5797 (_initialize_aix_thread): Remove references to init_aix_thread_ops
5798 and complete_target_initialization.
5799 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
5800 (rs6000_nat_target): New class.
5801 (the_rs6000_nat_target): New.
5802 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
5803 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
5804 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
5805 (super_create_inferior): Delete.
5806 (_initialize_rs6000_nat): Adjust to C++ification.
5808 * arm-linux-nat.c (arm_linux_nat_target): New class.
5809 (the_arm_linux_nat_target): New.
5810 (arm_linux_fetch_inferior_registers)
5811 (arm_linux_store_inferior_registers, arm_linux_read_description)
5812 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
5813 (arm_linux_remove_hw_breakpoint)
5814 (arm_linux_region_ok_for_hw_watchpoint)
5815 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
5816 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
5817 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
5818 arm_linux_nat_target.
5819 (_initialize_arm_linux_nat): Adjust to C++ification.
5821 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
5822 (the_aarch64_linux_nat_target): New.
5823 (aarch64_linux_fetch_inferior_registers)
5824 (aarch64_linux_store_inferior_registers)
5825 (aarch64_linux_child_post_startup_inferior)
5826 (aarch64_linux_read_description)
5827 (aarch64_linux_can_use_hw_breakpoint)
5828 (aarch64_linux_insert_hw_breakpoint)
5829 (aarch64_linux_remove_hw_breakpoint)
5830 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
5831 (aarch64_linux_region_ok_for_hw_watchpoint)
5832 (aarch64_linux_stopped_data_address)
5833 (aarch64_linux_stopped_by_watchpoint)
5834 (aarch64_linux_watchpoint_addr_within_range)
5835 (aarch64_linux_can_do_single_step): Refactor as methods of
5836 aarch64_linux_nat_target.
5837 (super_post_startup_inferior): Delete.
5838 (_initialize_aarch64_linux_nat): Adjust to C++ification.
5840 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
5841 (the_hppa_linux_nat_target): New.
5842 (hppa_linux_fetch_inferior_registers)
5843 (hppa_linux_store_inferior_registers): Refactor as methods of
5844 hppa_linux_nat_target.
5845 (_initialize_hppa_linux_nat): Adjust to C++ification.
5847 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
5848 (the_ia64_linux_nat_target): New.
5849 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
5850 (ia64_linux_stopped_data_address)
5851 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
5852 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
5853 ia64_linux_nat_target methods.
5854 (super_xfer_partial): Delete.
5855 (_initialize_ia64_linux_nat): Adjust to C++ification.
5857 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
5858 (the_m32r_linux_nat_target): New.
5859 (m32r_linux_fetch_inferior_registers)
5860 (m32r_linux_store_inferior_registers): Refactor as
5861 m32r_linux_nat_target methods.
5862 (_initialize_m32r_linux_nat): Adjust to C++ification.
5864 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
5865 (the_m68k_linux_nat_target): New.
5866 (m68k_linux_fetch_inferior_registers)
5867 (m68k_linux_store_inferior_registers): Refactor as
5868 m68k_linux_nat_target methods.
5869 (_initialize_m68k_linux_nat): Adjust to C++ification.
5871 * s390-linux-nat.c (s390_linux_nat_target): New class.
5872 (the_s390_linux_nat_target): New.
5873 (s390_linux_fetch_inferior_registers)
5874 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
5875 (s390_insert_watchpoint, s390_remove_watchpoint)
5876 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
5877 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
5878 (s390_auxv_parse, s390_read_description): Refactor as methods of
5879 s390_linux_nat_target.
5880 (_initialize_s390_nat): Adjust to C++ification.
5882 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
5883 (the_sparc_linux_nat_target): New.
5884 (_initialize_sparc_linux_nat): Adjust to C++ification.
5885 * sparc-nat.c (sparc_fetch_inferior_registers)
5886 (sparc_store_inferior_registers): Remove target_ops parameter.
5887 * sparc-nat.h (sparc_fetch_inferior_registers)
5888 (sparc_store_inferior_registers): Remove target_ops parameter.
5889 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
5890 (the_sparc64_linux_nat_target): New.
5891 (_initialize_sparc64_linux_nat): Adjust to C++ification.
5893 * spu-linux-nat.c (spu_linux_nat_target): New class.
5894 (the_spu_linux_nat_target): New.
5895 (spu_child_post_startup_inferior, spu_child_post_attach)
5896 (spu_child_wait, spu_fetch_inferior_registers)
5897 (spu_store_inferior_registers, spu_xfer_partial)
5898 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
5900 (_initialize_spu_nat): Adjust to C++ification.
5902 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
5903 (the_tilegx_linux_nat_target): New.
5904 (fetch_inferior_registers, store_inferior_registers):
5905 Refactor as methods.
5906 (_initialize_tile_linux_nat): Adjust to C++ification.
5908 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
5909 (the_xtensa_linux_nat_target): New.
5910 (xtensa_linux_fetch_inferior_registers)
5911 (xtensa_linux_store_inferior_registers): Refactor as
5912 xtensa_linux_nat_target methods.
5913 (_initialize_xtensa_linux_nat): Adjust to C++ification.
5915 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
5916 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
5917 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
5918 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
5919 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
5920 (fbsd_stopped_by_sw_breakpoint)
5921 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
5922 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
5923 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
5924 (fbsd_post_startup_inferior, fbsd_post_attach)
5925 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
5926 (fbsd_set_syscall_catchpoint)
5927 (super_xfer_partial, super_resume, super_wait)
5928 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
5929 (fbsd_handle_debug_trap): Remove target_ops parameter.
5930 (fbsd_nat_add_target): Delete.
5931 * fbsd-nat.h: Include "inf-ptrace.h".
5932 (fbsd_nat_add_target): Delete.
5933 (USE_SIGTRAP_SIGINFO): Define.
5934 (fbsd_nat_target): New class.
5936 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
5937 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
5938 (amd64bsd_target): Delete.
5939 * amd64-bsd-nat.h: New file.
5940 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
5942 (amd64_fbsd_nat_target): New class.
5943 (the_amd64_fbsd_nat_target): New.
5944 (amd64fbsd_read_description): Refactor as method of
5945 amd64_fbsd_nat_target.
5946 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5947 (_initialize_amd64fbsd_nat): Adjust to C++ification.
5948 * amd64-nat.h (amd64bsd_target): Delete function declaration.
5949 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
5950 (i386bsd_store_inferior_registers): Remove target_ops parameter.
5951 (i386bsd_target): Delete.
5952 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
5953 (i386bsd_fetch_inferior_registers)
5954 (i386bsd_store_inferior_registers): Declare.
5955 (i386_bsd_nat_target): New class.
5956 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
5957 (the_i386_fbsd_nat_target): New.
5958 (i386fbsd_resume, i386fbsd_read_description): Refactor as
5959 i386_fbsd_nat_target methods.
5960 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5961 (_initialize_i386fbsd_nat): Adjust to C++ification.
5962 * x86-bsd-nat.c (super_mourn_inferior): Delete.
5963 (x86bsd_mourn_inferior, x86bsd_target): Delete.
5964 (_initialize_x86_bsd_nat): Adjust to C++ification.
5965 * x86-bsd-nat.h: Include "x86-nat.h".
5966 (x86bsd_target): Delete declaration.
5967 (x86bsd_nat_target): New class.
5969 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
5970 (the_aarch64_fbsd_nat_target): New.
5971 (aarch64_fbsd_fetch_inferior_registers)
5972 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
5973 aarch64_fbsd_nat_target.
5974 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
5975 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
5976 (the_alpha_bsd_nat_target): New.
5977 (alphabsd_fetch_inferior_registers)
5978 (alphabsd_store_inferior_registers): Refactor as
5979 alpha_bsd_nat_target methods.
5980 (_initialize_alphabsd_nat): Refactor as methods of
5981 alpha_bsd_nat_target.
5982 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
5983 (the_amd64_nbsd_nat_target): New.
5984 (_initialize_amd64nbsd_nat): Adjust to C++ification.
5985 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
5986 (the_amd64_obsd_nat_target): New.
5987 (_initialize_amd64obsd_nat): Adjust to C++ification.
5988 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
5989 (the_arm_fbsd_nat_target): New.
5990 (arm_fbsd_fetch_inferior_registers)
5991 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
5992 (_initialize_arm_fbsd_nat): Refactor as methods of
5993 arm_fbsd_nat_target.
5994 (_initialize_arm_fbsd_nat): Adjust to C++ification.
5995 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
5996 (the_arm_netbsd_nat_target): New.
5997 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
5998 arm_netbsd_nat_target.
5999 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6000 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6001 (the_hppa_nbsd_nat_target): New.
6002 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6003 hppa_nbsd_nat_target methods.
6004 (_initialize_hppanbsd_nat): Adjust to C++ification.
6005 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6006 (the_hppa_obsd_nat_target): New.
6007 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6008 methods of hppa_obsd_nat_target.
6009 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6011 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6012 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6014 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6015 (_initialize_i386obsd_nat): Use add_target.
6016 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6017 (the_m68k_bsd_nat_target): New.
6018 (m68kbsd_fetch_inferior_registers)
6019 (m68kbsd_store_inferior_registers): Refactor as methods of
6020 m68k_bsd_nat_target.
6021 (_initialize_m68kbsd_nat): Adjust to C++ification.
6022 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6023 (the_mips_fbsd_nat_target): New.
6024 (mips_fbsd_fetch_inferior_registers)
6025 (mips_fbsd_store_inferior_registers): Refactor as methods of
6026 mips_fbsd_nat_target.
6027 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6029 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6030 (the_mips_nbsd_nat_target): New.
6031 (mipsnbsd_fetch_inferior_registers)
6032 (mipsnbsd_store_inferior_registers): Refactor as methods of
6033 mips_nbsd_nat_target.
6034 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6035 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6036 (the_mips64_obsd_nat_target): New.
6037 (mips64obsd_fetch_inferior_registers)
6038 (mips64obsd_store_inferior_registers): Refactor as methods of
6039 mips64_obsd_nat_target.
6040 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6042 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6044 * nbsd-nat.h: Include "inf-ptrace.h".
6045 (nbsd_nat_target): New class.
6046 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6047 (obsd_wait): Refactor as methods of obsd_nat_target.
6048 (obsd_add_target): Delete.
6049 * obsd-nat.h: Include "inf-ptrace.h".
6050 (obsd_nat_target): New class.
6051 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6052 (the_ppc_fbsd_nat_target): New.
6053 (ppcfbsd_fetch_inferior_registers)
6054 (ppcfbsd_store_inferior_registers): Refactor as methods of
6055 ppc_fbsd_nat_target.
6056 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6058 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6059 (the_ppc_nbsd_nat_target): New.
6060 (ppcnbsd_fetch_inferior_registers)
6061 (ppcnbsd_store_inferior_registers): Refactor as methods of
6062 ppc_nbsd_nat_target.
6063 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6064 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6065 (the_ppc_obsd_nat_target): New.
6066 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6067 methods of ppc_obsd_nat_target.
6068 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6070 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6071 (the_sh_nbsd_nat_target): New.
6072 (shnbsd_fetch_inferior_registers)
6073 (shnbsd_store_inferior_registers): Refactor as methods of
6075 (_initialize_shnbsd_nat): Adjust to C++ification.
6076 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6077 (inf_ptrace_xfer_partial): Delete.
6078 (sparc_xfer_partial, sparc_target): Delete.
6079 * sparc-nat.h (sparc_fetch_inferior_registers)
6080 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6081 (sparc_target): Delete function declaration.
6082 (sparc_target): New template class.
6083 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6084 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6085 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6086 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6088 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6089 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6090 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6091 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6093 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6094 (the_vax_bsd_nat_target): New.
6095 (vaxbsd_fetch_inferior_registers)
6096 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6098 (_initialize_vaxbsd_nat): Adjust to C++ification.
6100 * bsd-kvm.c (bsd_kvm_target): New class.
6101 (bsd_kvm_ops): Now a bsd_kvm_target.
6102 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6103 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6104 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6106 (bsd_kvm_return_one): Delete.
6107 (bsd_kvm_add_target): Adjust to C++ification.
6109 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6110 (nto_procfs_target_procfs): New classes.
6111 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6112 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6113 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6114 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6115 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6116 (procfs_remove_hw_breakpoint, procfs_resume)
6117 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6118 (procfs_kill_inferior, procfs_store_registers)
6119 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6120 as methods of nto_procfs_target.
6121 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6122 (nto_native_ops): Delete.
6123 (procfs_open, procfs_native_open): Delete.
6124 (nto_native_ops): Now an nto_procfs_target_native.
6125 (init_procfs_targets): Adjust to C++ification.
6126 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6127 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6128 Refactor as methods of nto_procfs_target.
6130 * go32-nat.c (go32_nat_target): New class.
6131 (the_go32_nat_target): New.
6132 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6133 (go32_store_registers, go32_xfer_partial, go32_files_info)
6134 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6135 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6136 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6137 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6138 (go32_target): Delete.
6139 (_initialize_go32_nat): Adjust to C++ification.
6141 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6142 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6143 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6144 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6146 (gnu_target): Delete.
6147 * gnu-nat.h (gnu_target): Delete.
6148 (gnu_nat_target): New class.
6149 * i386-gnu-nat.c (gnu_base_target): New.
6150 (i386_gnu_nat_target): New class.
6151 (the_i386_gnu_nat_target): New.
6152 (_initialize_i386gnu_nat): Adjust to C++ification.
6154 2018-05-02 Pedro Alves <palves@redhat.com>
6156 * bfd-target.c (target_bfd_xclose): Rename to ...
6157 (target_bfd_close): ... this.
6158 (target_bfd_reopen): Adjust.
6159 * target.c (target_close): Remove references to to_xclose.
6160 * target.h (target_ops::to_xclose): Delete.
6161 (target_ops::to_close): Update comments.
6163 2018-05-02 Pedro Alves <palves@redhat.com>
6165 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6167 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6168 * inf-ptrace.c (inf_ptrace_register_u_offset)
6169 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6170 (inf_ptrace_store_register, inf_ptrace_store_registers)
6171 (inf_ptrace_trad_target): Move to ...
6172 * linux-nat-trad.c: ... this new file.
6173 * linux-nat-trad.h: New file.
6174 * linux-nat.c (linux_target_install_ops): Make extern.
6175 (linux_trad_target): Delete.
6176 * linux-nat.h (linux_trad_target): Delete declaration.
6177 (linux_target_install_ops): Declare.
6178 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6181 2018-05-02 Pedro Alves <palves@redhat.com>
6183 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6184 procfs_target/add_target here.
6185 * procfs.c (procfs_target): Make static.
6186 (_initialize_procfs): Call add_target here.
6187 * procfs.h (struct target_ops): Remove forward declaration.
6188 (procfs_target): Remove declaration.
6189 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6191 2018-05-02 Pedro Alves <palves@redhat.com>
6193 * procfs.c (procfs_stopped_by_watchpoint)
6194 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6195 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6197 (procfs_use_watchpoints): Delete, move contents...
6198 (procfs_target): ... here.
6199 * procfs.h (procfs_use_watchpoints): Delete declaration.
6200 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6201 procfs_use_watchpoints.
6202 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6203 procfs_use_watchpoints.
6205 2018-05-02 Tom Tromey <tom@tromey.com>
6208 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6209 and var_zuinteger_unlimited.
6210 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6211 and PARAM_ZUINTEGER_UNLIMITED.
6212 (set_parameter_value): Handle var_zuinteger and
6213 var_zuinteger_unlimited.
6214 (add_setshow_generic): Likewise.
6215 (parmpy_init): Likewise.
6217 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6220 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6221 pointer is not null before dereferencing it.
6223 2018-04-30 Tom Tromey <tom@tromey.com>
6225 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6228 2018-04-30 Tom Tromey <tom@tromey.com>
6230 * breakpoint.c (mention): Remove use of is_mi_like_p.
6231 (print_mention_ranged_breakpoint): Likewise.
6232 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6235 2018-04-30 Tom Tromey <tom@tromey.com>
6237 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6239 2018-04-30 Tom Tromey <tom@tromey.com>
6241 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6242 (info_spu_event_command): Remove some uses of is_mi_like_p.
6244 2018-04-30 Tom Tromey <tom@tromey.com>
6246 * python/py-framefilter.c (py_print_single_arg)
6247 (enumerate_locals, py_print_args, py_print_frame): Remove some
6248 uses of is_mi_like_p.
6250 2018-04-30 Tom Tromey <tom@tromey.com>
6253 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6254 * ui-out.h (ui_out::is_mi_like_p): Now const.
6255 (ui_out::do_is_mi_like_p): Now const.
6256 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6258 2018-04-30 Tom Tromey <tom@tromey.com>
6260 * varobj.c (varobj_set_visualizer): Use new_reference.
6261 * python/python.c (gdbpy_decode_line): Use new_reference.
6262 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6265 2018-04-30 Tom Tromey <tom@tromey.com>
6267 * varobj.c (install_new_value): Use new_reference.
6268 * value.h (value_incref): Return void. Swap intro comment with
6270 * value.c (set_value_parent): Use new_reference.
6271 (value_incref): Return void. Update intro comment.
6272 (release_value): Use new_reference.
6273 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6275 2018-04-30 Tom Tromey <tom@tromey.com>
6277 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6278 * gdb_bfd.h (new_bfd_ref): Remove.
6279 (gdb_bfd_open): Update comment.
6280 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6281 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6282 (gdb_bfd_fdopenr): Use new_reference.
6283 * exec.c (exec_file_attach): Use new_reference.
6285 2018-04-30 Tom Tromey <tom@tromey.com>
6287 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6290 2018-04-30 Tom Tromey <tom@tromey.com>
6292 * jit.c (jit_read_code_entry): Use type_align.
6293 * i386-tdep.c (i386_gdbarch_init): Don't call
6294 set_gdbarch_long_long_align_bit.
6295 * gdbarch.sh: Remove long_long_align_bit.
6296 * gdbarch.c, gdbarch.h: Rebuild.
6297 * arc-tdep.c (arc_type_align): New function.
6298 (arc_gdbarch_init): Use arc_type_align. Don't call
6299 set_gdbarch_long_long_align_bit.
6301 2018-04-30 Tom Tromey <tom@tromey.com>
6303 * rust-lang.c (rust_type_alignment): Remove.
6304 (rust_composite_type): Use type_align.
6306 2018-04-30 Tom Tromey <tom@tromey.com>
6308 * NEWS: Mention Type.align.
6309 * python/py-type.c (typy_get_alignof): New function.
6310 (type_object_getset): Add "alignof".
6312 2018-04-30 Tom Tromey <tom@tromey.com>
6316 * std-operator.def (UNOP_ALIGNOF): New operator.
6317 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6319 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6320 * c-lang.c (c_op_print_tab): Add alignof.
6321 * c-exp.y (ALIGNOF): New token.
6322 (exp): Add "ALIGNOF" production.
6323 (ident_tokens): Add _Alignof and alignof.
6325 2018-04-30 Tom Tromey <tom@tromey.com>
6327 * i386-tdep.c (i386_type_align): New function.
6328 (i386_gdbarch_init): Update.
6329 * gdbarch.sh (type_align): New method.
6330 * gdbarch.c, gdbarch.h: Rebuild.
6331 * arch-utils.h (default_type_align): Declare.
6332 * arch-utils.c (default_type_align): New function.
6333 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6334 (struct type) <align_log2>: New field.
6335 <instance_flags>: Now a bitfield.
6336 (TYPE_RAW_ALIGN): New macro.
6337 (type_align, type_raw_align, set_type_align): Declare.
6338 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6340 * dwarf2read.c (quirk_rust_enum): Set type alignment.
6341 (get_alignment, maybe_set_alignment): New functions.
6342 (read_structure_type, read_enumeration_type, read_array_type)
6343 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6344 (read_subrange_type, read_base_type): Set type alignment.
6346 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
6348 * dwarf2read.c (read_index_from_section): Use bool.
6350 2018-04-29 Fabian Groffen <grobian@gentoo.org>
6353 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6356 2018-04-29 John Reiser <jreiser@BitWagon.com>
6359 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6360 last step, and do it atomically.
6362 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
6364 * compile/compile-c-types.c (convert_int, convert_float):
6367 2018-04-27 Tom Tromey <tom@tromey.com>
6370 * rust-lang.c (rust_inclusive_range_type_p): New function.
6371 (rust_range): Handle inclusive ranges.
6372 (rust_compute_range): Likewise.
6373 * rust-exp.y (struct rust_op) <inclusive>: New field.
6374 (DOTDOTEQ): New constant.
6375 (range_expr): Add "..=" productions.
6376 (operator_tokens): Add "..=" token.
6377 (ast_range): Add "inclusive" parameter.
6378 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6380 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6382 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6383 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6385 * expprint.c (print_subexp_standard): Handle new bounds values.
6386 (dump_subexp_body_standard): Likewise.
6388 2018-04-27 Tom Tromey <tom@tromey.com>
6390 * configure: Rebuild.
6391 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6392 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6394 (class symbol_needs_eval_context): Likewise.
6395 * dwarf2read.c (mock_mapped_index::symbol_name_count)
6396 (mock_mapped_index::symbol_name_at): Use "override". Remove
6398 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6400 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6401 * aarch64-tdep.c (instruction_reader::read): Use "override".
6402 (instruction_reader_test::read): Likewise.
6403 * arm-tdep.c (instruction_reader::read): Use "override".
6404 (instruction_reader_thumb::read): Likewise.
6406 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
6409 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6410 instead of remote_send.
6411 (remote_send): Remove.
6413 2018-04-26 Pedro Alves <palves@redhat.com>
6415 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6416 find_function_start_sal instead of find_pc_line.
6418 2018-04-26 Pedro Alves <palves@redhat.com>
6420 * breakpoint.c (set_breakpoint_location_function): Handle
6422 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6423 * elfread.c (elf_symtab_read): Give data symbols with
6424 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6425 (elf_rel_plt_read): Update comment.
6426 * linespec.c (convert_linespec_to_sals): Handle
6428 (minsym_found): Handle mst_data_gnu_ifunc.
6429 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6430 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6431 * parse.c (find_minsym_type_and_address): Handle
6433 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6434 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6435 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6437 <mst_data_gnu_ifunc>: New enumerator.
6439 2018-04-26 Pedro Alves <palves@redhat.com>
6441 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6442 (lookup_minimal_symbol_by_pc_section): ... this. Replace
6443 'want_trampoline' parameter by a lookup_msym_prefer parameter.
6445 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6446 (lookup_minimal_symbol_by_pc): Adjust.
6447 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6448 (lookup_solib_trampoline_symbol_by_pc): Adjust.
6449 * minsyms.h (lookup_msym_prefer): New enum.
6450 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6451 parameter by a lookup_msym_prefer parameter.
6453 2018-04-26 Pedro Alves <palves@redhat.com>
6455 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6456 ends in "@plt" instead of looking at the symbol's section.
6458 2018-04-26 Pedro Alves <palves@redhat.com>
6460 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
6462 (find_pc_partial_function_gnu_ifunc): Rename to ...
6463 (find_pc_partial_function): ... this, and remove references to
6465 (find_pc_partial_function): Delete old implementation.
6466 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6468 2018-04-26 Pedro Alves <palves@redhat.com>
6470 * linespec.c (struct bound_minimal_symbol_search_key): New.
6471 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
6472 skip first line if we found a GNU ifunc minimal symbol by name.
6473 (compare_msymbols): Change parameters to work with a destructured
6475 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6478 2018-04-26 Pedro Alves <palves@redhat.com>
6480 * breakpoint.c (set_breakpoint_location_function): Don't resolve
6481 ifunc targets here. Instead, if we have an ifunc minsym, use its
6483 (add_location_to_breakpoint): Store the minsym and the objfile in
6484 the breakpoint location.
6485 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6486 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6487 Record the minsym in the sal.
6488 * symtab.h (symtab_and_line) <msymbol>: New field.
6490 2018-04-26 Pedro Alves <palves@redhat.com>
6492 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6493 unless we actually resolved the ifunc.
6495 2018-04-26 Pedro Alves <palves@redhat.com>
6497 * c-exp.y (variable production): Prefer ifunc minsyms over
6498 regular function symbols.
6499 * symtab.c (find_gnu_ifunc): New function.
6500 * minsyms.h (lookup_msym_prefer): New enum.
6501 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6502 parameter by a lookup_msym_prefer parameter.
6503 * symtab.h (find_gnu_ifunc): New declaration.
6505 2018-04-26 Pedro Alves <palves@redhat.com>
6507 * blockframe.c (find_gnu_ifunc_target_type): New function.
6508 (find_function_type): New.
6509 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6510 return a value with a memory address.
6511 (eval_call): For calls to GNU ifunc functions, try to find the
6512 type of the target function from the type that the resolver
6514 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6516 * infcall.c (find_function_return_type): Delete.
6517 (find_function_addr): Add 'function_type' parameter. For calls to
6518 GNU ifunc functions, try to find the type of the target function
6519 from the type that the resolver returns, and return it via
6521 (call_function_by_hand_dummy): Adjust to use the function type
6522 returned by find_function_addr.
6523 (find_function_addr): Add 'function_type' parameter and move
6525 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6528 2018-04-26 Pedro Alves <palves@redhat.com>
6530 * c-exp.y (variable production): Skip finding an alias for ifunc
6533 2018-04-26 Pedro Alves <palves@redhat.com>
6535 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6537 2018-04-25 Pedro Alves <palves@redhat.com>
6539 * infcmd.c (kill_command): Print the pid as string, not the whole
6540 thread's ptid. Add comment. s/has been killed/killed/ in output
6542 * remote.c (remote_detach_1): Print the pid as string, not the
6543 whole thread's ptid.
6545 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6546 Sergio Durigan Junior <sergiodj@redhat.com>
6547 Pedro Alves <palves@redhat.com>
6549 * infcmd.c (kill_command): Print message when inferior has
6551 * inferior.c (print_inferior_events): Remove 'static'. Set as
6553 (add_inferior): Improve message printed when
6554 'print_inferior_events' is on.
6555 (exit_inferior): Remove message printed when
6556 'print_inferior_events' is on.
6557 (detach_inferior): Improve message printed when
6558 'print_inferior_events' is on.
6559 (initialize_inferiors): Use 'add_inferior_silent' to set
6560 'current_inferior_'.
6561 * inferior.h (print_inferior_events): Declare here as
6563 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6564 '[Detaching...]' messages when 'print_inferior_events' is on.
6565 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
6566 as prefix/suffix for messages. Remove periods. Fix erroneous
6567 'Detaching after fork from child...', replace it by '... from
6569 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6570 prefix/suffix when printing 'Detaching...' messages. Print
6571 them when 'print_inferior_events' is on.
6572 * remote.c (remote_detach_1): Print message when detaching
6573 from inferior and '!is_fork_parent'.
6575 2018-04-24 Tom Tromey <tom@tromey.com>
6577 * cli-out.h: Reindent.
6579 2018-04-24 Tom Tromey <tom@tromey.com>
6581 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6582 (cli_ui_out::do_field_string): Use fputs_filtered.
6583 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6585 2018-04-23 Tom Tromey <tom@tromey.com>
6587 * guile/scm-frame.c (gdbscm_frame_read_var): Use
6588 gdb::unique_xmalloc_ptr.
6590 2018-04-23 Tom Tromey <tom@tromey.com>
6592 * configure: Rebuild.
6594 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
6597 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6598 prepare_for_testing. Set normal_bp to r_debug_state if target
6601 2018-04-21 Pedro Alves <palves@redhat.com>
6602 Rajendra SY <rajendra.sy@gmail.com>
6604 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6605 * remote.c (extended_remote_attach): In all-stop mode, mark the
6606 thread as executing.
6608 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6610 * thread.c (thread_apply_all_command): Fix comment.
6611 (thread_command): Fix comment.
6613 2018-04-10 Alan Hayward <alan.hayward@arm.com>
6615 * common/tdesc.h (tdesc_create_feature): Remove xml filename
6617 * features/aarch64-core.c (create_feature_aarch64_core):
6619 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
6621 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
6623 * features/i386/32bit-avx512.c
6624 (create_feature_i386_32bit_avx512): Likewise.
6625 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
6627 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
6629 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
6631 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
6633 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
6635 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
6637 * features/i386/64bit-avx512.c
6638 (create_feature_i386_64bit_avx512): Likewise.
6639 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
6641 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
6643 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
6645 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
6647 * features/i386/64bit-segments.c
6648 (create_feature_i386_64bit_segments): Likewise.
6649 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
6651 * features/i386/x32-core.c
6652 (create_feature_i386_x32_core): Likewise.
6653 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
6654 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
6655 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
6656 * target-descriptions.c: In generated code, don't pass xml
6659 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6661 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
6662 (print_xml_feature::visit_post): Likewise.
6663 (print_xml_feature::visit): Likewise.
6664 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
6665 (print_xml_feature): Add new class.
6666 * regformats/regdat.sh: Null xmltarget on feature targets.
6667 * target-descriptions.c (struct target_desc): Add xmltarget.
6668 (maintenance_check_tdesc_xml_convert): Add unittest function.
6669 (tdesc_get_features_xml): Add function to get xml.
6670 (maintenance_check_xml_descriptions): Test xml generation.
6671 * xml-tdesc.c (string_read_description_xml): Add function.
6672 * xml-tdesc.h (string_read_description_xml): Add declaration.
6674 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6676 * features/Makefile: Add feature marker to targets with new style
6677 target descriptions.
6678 * regformats/aarch64.dat: Regenerate.
6679 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
6680 * regformats/i386/amd64-avx-linux.dat: Likewise.
6681 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
6682 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
6683 * regformats/i386/amd64-linux.dat: Likewise.
6684 * regformats/i386/amd64-mpx-linux.dat: Likewise.
6685 * regformats/i386/amd64.dat: Likewise.
6686 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
6687 * regformats/i386/i386-avx-linux.dat: Likewise.
6688 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
6689 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
6690 * regformats/i386/i386-linux.dat: Likewise.
6691 * regformats/i386/i386-mmx-linux.dat: Likewise.
6692 * regformats/i386/i386-mpx-linux.dat: Likewise.
6693 * regformats/i386/i386.dat: Likewise.
6694 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
6695 * regformats/i386/x32-avx-linux.dat: Likewise.
6696 * regformats/i386/x32-linux.dat: Likewise.
6697 * regformats/tic6x-c62x-linux.dat: Likewise.
6698 * regformats/tic6x-c64x-linux.dat: Likewise.
6699 * regformats/tic6x-c64xp-linux.dat: Likewise.
6700 * regformats/regdat.sh: Parse feature marker.
6702 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6704 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
6705 (tdesc_osabi_name): Likewise.
6706 * target-descriptions.c (tdesc_architecture_name): Add new
6708 (tdesc_osabi_name): Likewise.
6710 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6712 * common/tdesc.c (tdesc_predefined_type): Move to here.
6713 (tdesc_named_type): Likewise.
6714 (tdesc_create_vector): Likewise.
6715 (tdesc_create_struct): Likewise.
6716 (tdesc_set_struct_size): Likewise.
6717 (tdesc_create_union): Likewise.
6718 (tdesc_create_flags): Likewise.
6719 (tdesc_create_enum): Likewise.
6720 (tdesc_add_field): Likewise.
6721 (tdesc_add_typed_bitfield): Likewise.
6722 (tdesc_add_bitfield): Likewise.
6723 (tdesc_add_flag): Likewise.
6724 (tdesc_add_enum_value): Likewise.
6725 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
6726 (struct tdesc_type_vector): Likewise.
6727 (struct tdesc_type_field): Likewise.
6728 (struct tdesc_type_with_fields): Likewise.
6729 (tdesc_create_enum): Add declaration.
6730 (tdesc_add_typed_bitfield): Likewise.
6731 (tdesc_add_enum_value): Likewise.
6732 * target-descriptions.c (tdesc_type_field): Move from here.
6733 (tdesc_type_builtin): Likewise.
6734 (tdesc_type_vector): Likewise.
6735 (tdesc_type_with_fields): Likewise.
6736 (tdesc_predefined_types): Likewise.
6737 (tdesc_named_type): Likewise.
6738 (tdesc_create_vector): Likewise.
6739 (tdesc_create_struct): Likewise.
6740 (tdesc_set_struct_size): Likewise.
6741 (tdesc_create_union): Likewise.
6742 (tdesc_create_flags): Likewise.
6743 (tdesc_create_enum): Likewise.
6744 (tdesc_add_field): Likewise.
6745 (tdesc_add_typed_bitfield): Likewise.
6746 (tdesc_add_bitfield): Likewise.
6747 (tdesc_add_flag): Likewise.
6748 (tdesc_add_enum_value): Likewise.
6749 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
6750 (tdesc_add_typed_bitfield): Likewise.
6751 (tdesc_add_enum_value): Likewise.
6753 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6755 * common/tdesc.c (tdesc_feature::accept): Move to here.
6756 (tdesc_feature::operator==): Likewise.
6757 (tdesc_create_reg): Likewise.
6758 * common/tdesc.h (tdesc_type_kind): Likewise.
6759 (struct tdesc_type): Likewise.
6760 (struct tdesc_feature): Likewise.
6761 * regformats/regdat.sh: Create a feature.
6762 * target-descriptions.c (tdesc_type_kind): Move from here.
6763 (tdesc_type): Likewise.
6764 (tdesc_type_up): Likewise.
6765 (tdesc_feature): Likewise.
6766 (tdesc_create_reg): Likewise.
6768 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6770 * Makefile.in: Add arch/tdesc.c
6771 * common/tdesc.c: New file.
6772 * common/tdesc.h (tdesc_element_visitor): Move to here.
6773 (tdesc_element): Likewise.
6774 (tdesc_reg): Likewise.
6775 (tdesc_reg_up): Likewise.
6776 * regformats/regdef.h (reg): Add offset to constructors.
6777 * target-descriptions.c (tdesc_element_visitor): Move from here.
6778 (tdesc_element): Likewise.
6779 (tdesc_reg): Likewise.
6780 (tdesc_reg_up): Likewise.
6782 2018-04-17 Tom Tromey <tom@tromey.com>
6784 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
6787 2018-04-17 Tom Tromey <tom@tromey.com>
6789 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
6791 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
6793 * symtab.c (print_symbol_info): Skip printing filename and line
6794 number when `last' is NULL.
6795 (symtab_symbol_info): Use empty string instead of NULL for first
6796 invocation of print_symbol_info.
6797 (rbreak_command): Pass NULL to `last' parameter of
6800 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
6802 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
6805 2018-04-16 Pedro Alves <palves@redhat.com>
6807 * MAINTAINERS (sh): Remove.
6808 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
6809 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
6810 (ALLDEPFILES): Remove sh64-tdep.c.
6811 * NEWS: Mentions that support for SH-5/SH64 is removed.
6812 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
6813 (sh*-*-openbsd*): Ditto.
6814 (sh64-*-elf*): Remove.
6816 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
6817 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
6818 * sh-tdep.c: No longer include "sh64-tdep.h".
6819 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
6820 * sh64-tdep.c, sh64-tdep.h: Remove files.
6822 2018-04-16 Pedro Alves <palves@redhat.com>
6824 * MAINTAINERS: Remove m88k.
6825 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
6826 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
6827 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
6828 * NEWS: Mention that support for m88k was removed.
6829 * configure.host (m88*-*-*): Remove support.
6830 * configure.nat (m88k-*-*): Remove support.
6831 * configure.tgt (m88*-*-openbsd*): Remove.
6832 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
6834 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
6836 * configure.tgt (x86_tobjs): New variable.
6837 (amd64_tobjs, i386_tobjs): Use it.
6839 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6841 * symtab.c (print_symbol_info): Precede the symbol definition by
6842 the line number when available.
6843 * NEWS: Advertise this enhancement.
6845 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6847 * NEWS (New options): announce set/show record btrace cpu.
6848 * btrace.c: Include record-btrace.h.
6849 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
6850 the vendor is unknown.
6851 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
6852 Maybe overwrite the btrace configuration's cpu.
6853 (btrace_compute_ftrace): Add cpu parameter. Update callers.
6854 (btrace_fetch): Add cpu parameter. Update callers.
6855 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
6856 Maybe overwrite the btrace configuration's cpu. Skip enabling
6857 errata workarounds if the vendor is unknown.
6858 * python/py-record-btrace.c: Include record-btrace.h.
6859 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
6860 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
6861 * record-btrace.c (record_btrace_cpu_state_kind): New.
6862 (record_btrace_cpu): New.
6863 (set_record_btrace_cpu_cmdlist): New.
6864 (record_btrace_get_cpu): New.
6865 (require_btrace_thread, record_btrace_info)
6866 (record_btrace_resume_thread): Call record_btrace_get_cpu.
6867 (cmd_set_record_btrace_cpu_none): New.
6868 (cmd_set_record_btrace_cpu_auto): New.
6869 (cmd_set_record_btrace_cpu): New.
6870 (cmd_show_record_btrace_cpu): New.
6871 (_initialize_record_btrace): Initialize set/show record btrace cpu
6873 * record-btrace.h (record_btrace_get_cpu): New.
6875 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6877 * record.c (set_record_command): Fix typo in message.
6879 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6881 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
6883 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6885 * infrun.c (process_event_stop_test): Call
6886 gdbarch_in_indirect_branch_thunk.
6887 * gdbarch.sh (in_indirect_branch_thunk): New.
6888 * gdbarch.c: Regenerated.
6889 * gdbarch.h: Regenerated.
6892 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
6893 (HFILES_NO_SRCDIR): Add x86-tdep.h.
6894 (ALLDEPFILES): Add x86-tdep.c.
6895 * arch-utils.h (default_in_indirect_branch_thunk): New.
6896 * arch-utils.c (default_in_indirect_branch_thunk): New.
6897 * i386-tdep: Include x86-tdep.h.
6898 (i386_in_indirect_branch_thunk): New.
6899 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
6901 * amd64-tdep: Include x86-tdep.h.
6902 (amd64_in_indirect_branch_thunk): New.
6903 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
6905 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
6908 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
6909 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
6910 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
6913 2018-04-12 Tom Tromey <tom@tromey.com>
6915 * rust-lang.c (rust_print_struct_def): Remove univariant code.
6916 (rust_evaluate_subexp): Likewise.
6918 2018-04-12 Pedro Alves <palves@redhat.com>
6920 * procfs.c (procfs_detach): Make forward declaration's prototype
6921 match definition's protototype.
6922 (proc_get_LDT_entry): Remove stale do_cleanups call.
6924 2018-04-12 Pedro Alves <palves@redhat.com>
6926 * target.h (target_ops::to_has_exited): Delete.
6927 (target_has_exited): Delete.
6928 * target-delegates.c: Regenerate.
6930 2018-04-11 Pedro Alves <palves@redhat.com>
6932 * target.c (fileio_fh_t::t): Add comment.
6933 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6934 (target_fileio_close): Handle a NULL target.
6935 (invalidate_fileio_fh): New.
6936 (target_close): Call it.
6937 * remote.c (remote_hostio_send_command): No longer check whether
6938 remote_desc is open.
6940 2018-04-11 Pedro Alves <palves@redhat.com>
6942 * target.c (fileio_fh_t): Make it a named struct instead of a
6944 (fileio_fh_t::is_closed): New method.
6945 (DEF_VEC_O (fileio_fh_t)): Remove.
6946 (fileio_fhandles): Now a std::vector.
6947 (is_closed_fileio_fh): Delete.
6948 (acquire_fileio_fd): Adjust. Rename parameters.
6949 (release_fileio_fd): Adjust.
6950 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
6951 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6952 (target_fileio_close): Adjust.
6954 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
6956 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
6959 2018-04-10 Pedro Alves <palves@redhat.com>
6961 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
6962 (scoped_finish_thread_state): New class.
6963 * infcmd.c (run_command_1): Use it instead of finish_thread_state
6965 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
6966 (fetch_inferior_event, normal_stop): Likewise.
6967 * thread.c (finish_thread_state_cleanup): Delete.
6969 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6970 Pedro Alves <palves@redhat.com>
6972 * value.c: Include "selftest.h" and "common/array-view.h".
6973 (struct range) <operator ==>: New.
6974 (test_ranges_contain): New.
6975 (check_ranges_vector): New.
6976 (test_insert_into_bit_range_vector): New.
6977 (_initialize_values): Register selftests.
6978 * common/array-view.h (operator==, operator!=): New.
6980 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6982 * common/gdb_vecs.h (unordered_remove): Add overload that takes
6984 * inline-frame.c: Include <algorithm>.
6985 (struct inline_state): Add constructor.
6986 (inline_state_s): Remove.
6987 (DEF_VEC_O(inline_state_s)): Remove.
6988 (inline_states): Change type to std::vector.
6989 (find_inline_frame_state): Adjust to std::vector.
6990 (allocate_inline_frame_state): Remove.
6991 (clear_inline_frame_state): Adjust to std::vector.
6992 (skip_inline_frames): Adjust to std::vector.
6994 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6996 * tracepoint.h (struct trace_state_variable): Add constructor.
6997 <name>: Change type to std::string.
6998 * tracepoint.c (tsv_s): Remove.
6999 (DEF_VEC_O(tsv_s)): Remove.
7000 (tvariables): Change to std::vector.
7001 (create_trace_state_variable): Adjust to std::vector.
7002 (find_trace_state_variable): Likewise.
7003 (find_trace_state_variable_by_number): Likewise.
7004 (delete_trace_state_variable): Likewise.
7005 (trace_variable_command): Adjust to std::string.
7006 (delete_trace_variable_command): Likewise.
7007 (tvariables_info_1): Adjust to std::vector.
7008 (save_trace_state_variables): Likewise.
7009 (start_tracing): Likewise.
7010 (merge_uploaded_trace_state_variables): Adjust to std::vector
7012 * target.h (struct target_ops)
7013 <to_download_trace_state_variable>: Pass reference to
7014 trace_state_variable.
7015 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7016 * target-delegates.c: Re-generate.
7017 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7018 (mi_tsv_deleted): Likewise.
7019 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7020 * remote.c (remote_download_trace_state_variable): Change
7021 pointer to reference and adjust.
7022 * make-target-delegates (parse_argtypes): Handle references.
7023 (write_function_header): Likewise.
7024 (munge_type): Likewise.
7026 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7028 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7029 string_view-selftests.c.
7030 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7032 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7033 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7034 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7035 * unittests/basic_string_view/element_access/char/1.cc:
7037 * unittests/basic_string_view/element_access/char/empty.cc:
7039 * unittests/basic_string_view/element_access/char/front_back.cc:
7041 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7042 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7044 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7046 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7048 * unittests/basic_string_view/operations/compare/char/1.cc:
7050 * unittests/basic_string_view/operations/compare/char/13650.cc:
7052 * unittests/basic_string_view/operations/copy/char/1.cc:
7054 * unittests/basic_string_view/operations/data/char/1.cc:
7056 * unittests/basic_string_view/operations/find/char/1.cc:
7058 * unittests/basic_string_view/operations/find/char/2.cc:
7060 * unittests/basic_string_view/operations/find/char/3.cc:
7062 * unittests/basic_string_view/operations/find/char/4.cc:
7064 * unittests/basic_string_view/operations/rfind/char/1.cc:
7066 * unittests/basic_string_view/operations/rfind/char/2.cc:
7068 * unittests/basic_string_view/operations/rfind/char/3.cc:
7070 * unittests/basic_string_view/operations/substr/char/1.cc:
7072 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7073 * unittests/string_view-selftests.c: New file.
7075 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7077 * unittests/basic_string_view/capacity/1.cc: New file.
7078 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7079 * unittests/basic_string_view/cons/char/1.cc: New file.
7080 * unittests/basic_string_view/cons/char/2.cc: New file.
7081 * unittests/basic_string_view/cons/char/3.cc: New file.
7082 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7083 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7084 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7085 * unittests/basic_string_view/element_access/char/1.cc: New file.
7086 * unittests/basic_string_view/element_access/char/2.cc: New file.
7087 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7088 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7089 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7090 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7091 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7092 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7093 * unittests/basic_string_view/include.cc: New file.
7094 * unittests/basic_string_view/inserters/char/1.cc: New file.
7095 * unittests/basic_string_view/inserters/char/2.cc: New file.
7096 * unittests/basic_string_view/inserters/char/3.cc: New file.
7097 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7098 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7099 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7100 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7101 * unittests/basic_string_view/literals/types.cc: New file.
7102 * unittests/basic_string_view/literals/values.cc: New file.
7103 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7104 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7105 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7106 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7107 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7108 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7109 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7110 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7111 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7112 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7113 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7114 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7115 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7116 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7117 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7118 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7119 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7120 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7121 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7122 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7123 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7124 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7125 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7126 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7127 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7128 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7129 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7130 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7131 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7132 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7133 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7134 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7135 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7136 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7137 * unittests/basic_string_view/operators/char/2.cc: New file.
7138 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7139 * unittests/basic_string_view/range_access/char/1.cc: New file.
7140 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7141 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7142 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7143 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7144 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7145 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7146 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7147 * unittests/basic_string_view/typedefs.cc: New file.
7148 * unittests/basic_string_view/types/1.cc: New file.
7150 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7152 * common/gdb_string_view.h: Remove libstdc++ implementation
7153 details, adjust to gdb reality.
7154 * common/gdb_string_view.tcc: Likewise.
7155 * cli/cli-script.c (struct string_view): Remove.
7156 (user_args) <m_args>: Change element type to gdb::string_view.
7157 (user_args::insert_args): Adjust.
7159 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7161 * common/gdb_string_view.h: New file.
7162 * common/gdb_string_view.tcc: New file.
7164 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7166 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7167 * configure: Re-generate.
7169 2018-04-09 Pedro Alves <palves@redhat.com>
7171 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7172 (set_target_gdbarch): Call
7173 gdb::observers::architecture_changed.notify instead of
7174 observer_notify_architecture_changed.
7176 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7178 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7179 (do_restore_current_traceframe_cleanup): Remove.
7180 (restore_current_traceframe_cleanup_dtor): Remove.
7181 (make_cleanup_restore_current_traceframe): Remove.
7182 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7184 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7185 * infrun.c (fetch_inferior_event): Use
7186 scoped_restore_current_traceframe.
7188 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7190 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7192 <n_allocated_type_units>: Remove.
7193 <all_type_units>: Change to std::vector.
7194 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7195 to std::vector change.
7196 (dwarf2_per_objfile::get_cutu): Likewise.
7197 (dwarf2_per_objfile::get_tu): Likewise.
7198 (create_signatured_type_table_from_index): Likewise.
7199 (create_signatured_type_table_from_debug_names): Likewise.
7200 (dw2_symtab_iter_next): Likewise.
7201 (dw2_print_stats): Likewise.
7202 (dw2_expand_all_symtabs): Likewise.
7203 (dw2_expand_marked_cus): Likewise.
7204 (dw2_debug_names_iterator::next): Likewise.
7205 (dwarf2_initialize_objfile): Likewise.
7206 (add_signatured_type_cu_to_table): Likewise.
7207 (create_all_type_units): Likewise.
7208 (add_type_unit): Likewise.
7209 (struct tu_abbrev_offset): Add constructor.
7210 (build_type_psymtabs_1): Adjust to std::vector change.
7211 (print_tu_stats): Likewise.
7212 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7213 (write_debug_names): Likewise.
7215 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7217 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7218 Make an std::vector.
7219 <n_comp_units>: Remove.
7220 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7221 to std::vector change.
7222 (dwarf2_per_objfile::get_cutu): Likewise.
7223 (dwarf2_per_objfile::get_cu): Likewise.
7224 (create_cus_from_index): Likewise.
7225 (create_addrmap_from_index): Likewise.
7226 (create_addrmap_from_aranges): Likewise.
7227 (dwarf2_read_index): Likewise.
7228 (dw2_find_last_source_symtab): Likewise.
7229 (dw2_map_symtabs_matching_filename): Likewise.
7230 (dw2_symtab_iter_next): Likewise.
7231 (dw2_print_stats): Likewise.
7232 (dw2_expand_all_symtabs): Likewise.
7233 (dw2_expand_symtabs_with_fullname): Likewise.
7234 (dw2_expand_marked_cus): Likewise.
7235 (dw2_map_symbol_filenames): Likewise.
7236 (create_cus_from_debug_names): Likewise.
7237 (dwarf2_read_debug_names): Likewise.
7238 (dw2_debug_names_iterator::next): Likewise.
7239 (dwarf2_initialize_objfile): Likewise.
7240 (set_partial_user): Likewise.
7241 (dwarf2_build_psymtabs_hard): Likewise.
7242 (read_comp_units_from_section): Remove arguments, adjust to
7244 (create_all_comp_units): Adjust to std::vector and
7245 read_comp_units_from_section changes.
7246 (dwarf2_find_containing_comp_unit): Adjust to std::vector
7248 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7249 (psyms_seen_size): Likewise.
7250 (write_gdbindex): Likewise.
7251 (write_debug_names): Likewise.
7253 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7255 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7256 with dwarf2_per_objfile.
7257 (create_cus_from_index): Likewise.
7258 (create_signatured_type_table_from_index): Likewise.
7259 (dwarf2_read_index): Likewise.
7260 (dwarf2_initialize_objfile): Likewise.
7261 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
7262 per_cu rather than get_dwarf2_per_objfile.
7264 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7266 * dwarf2read.h (struct signatured_type): Forward declare.
7267 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7269 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7270 (dw2_get_cutu): ...this.
7271 (dwarf2_per_objfile::get_cu): Rename from...
7272 (dw2_get_cu): ...this.
7273 (dwarf2_per_objfile::get_tu): New.
7274 (create_addrmap_from_index): Adjust.
7275 (create_addrmap_from_aranges): Adjust.
7276 (dw2_find_last_source_symtab): Adjust.
7277 (dw2_map_symtabs_matching_filename): Adjust.
7278 (dw2_symtab_iter_next): Adjust.
7279 (dw2_print_stats): Adjust.
7280 (dw2_expand_all_symtabs): Adjust.
7281 (dw2_expand_symtabs_with_fullname): Adjust.
7282 (dw2_expand_marked_cus): Adjust.
7283 (dw_expand_symtabs_matching_file_matcher): Adjust.
7284 (dw2_map_symbol_filenames): Adjust.
7285 (dw2_debug_names_iterator::next): Adjust.
7286 (dwarf2_initialize_objfile): Adjust.
7287 (set_partial_user): Adjust.
7288 (dwarf2_build_psymtabs_hard): Adjust.
7290 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7292 * dwarf2read.c (create_signatured_type_table_from_debug_names):
7293 Remove unused variables.
7294 (dw2_map_symtabs_matching_filename): Likewise.
7295 (dwarf2_record_block_ranges): Likewise.
7296 (dwarf2_read_addr_index): Likewise.
7297 (follow_die_offset): Likewise.
7299 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7301 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7302 to symbol_file_add_main.
7304 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7307 * mi/mi-console.c (do_fputc_async_safe): New.
7308 (mi_console_file::write_async_safe): New.
7309 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7310 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7312 * ui-file.c (ui_file::putstrn): Adjust call to
7313 fputstrn_unfiltered.
7314 * utils.c (printchar): Replace do_fputs and do_fprintf
7315 parameters by do_fputc.
7316 (fputstr_filtered): Adjust call to printchar.
7317 (fputstr_unfiltered): Likewise.
7318 (fputstrn_filtered): Likewise.
7319 (fputstrn_unfiltered): Add do_fputc parameter, pass to
7321 * utils.h (do_fputc_ftype): New typedef.
7322 (fputstrn_unfiltered): Add do_fputc parameter.
7324 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7326 * regformats/i386/i386-avx.dat: Remove.
7328 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7331 * amd64-tdep.c (amd64_none_init_abi): New function.
7332 (amd64_x32_none_init_abi): New function.
7333 (_initialize_amd64_tdep): Register handlers for x86-64 and
7334 x64_32 with GDB_OSABI_NONE.
7335 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7336 GDB_OSABI_NONE osabi.
7338 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7341 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7343 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7344 * osabi.c (gdb_osabi_names): Add "unknown" entry.
7346 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7348 * common/byte-vector.h (char_vector): New type.
7349 * target.h (target_read_alloc): Return
7350 gdb::optional<byte_vector>.
7351 (target_read_stralloc): Return gdb::optional<char_vector>.
7352 (target_get_osdata): Return gdb::optional<char_vector>.
7353 * target.c (target_read_alloc_1): Templatize. Replacement
7354 manual memory management with vector.
7355 (target_read_alloc): Change return type, adjust.
7356 (target_read_stralloc): Change return type, adjust.
7357 (target_get_osdata): Change return type, adjust.
7358 * auxv.c (struct auxv_info) <length>: Remove.
7359 <data>: Change type to gdb::optional<byte_vector>.
7360 (auxv_inferior_data_cleanup): Free auxv_info with delete.
7361 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7362 (target_auxv_search): Adjust.
7363 (fprint_target_auxv): Adjust.
7364 * avr-tdep.c (avr_io_reg_read_command): Adjust.
7365 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7366 (linux_make_corefile_notes): Adjust.
7367 * osdata.c (get_osdata): Adjust.
7368 * remote.c (remote_get_threads_with_qxfer): Adjust.
7369 (remote_memory_map): Adjust.
7370 (remote_traceframe_info): Adjust.
7371 (btrace_read_config): Adjust.
7372 (remote_read_btrace): Adjust.
7373 (remote_pid_to_exec_file): Adjust.
7374 * solib-aix.c (solib_aix_get_library_list): Adjust.
7375 * solib-dsbt.c (decode_loadmap): Don't free buf.
7376 (dsbt_get_initial_loadmaps): Adjust.
7377 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7378 * solib-target.c (solib_target_current_sos): Adjust.
7379 * tracepoint.c (sdata_make_value): Adjust.
7380 * xml-support.c (xinclude_start_include): Adjust.
7381 (xml_fetch_content_from_file): Adjust.
7382 * xml-support.h (xml_fetch_another): Change return type.
7383 (xml_fetch_content_from_file): Change return type.
7384 * xml-syscall.c (xml_init_syscalls_info): Adjust.
7385 * xml-tdesc.c (file_read_description_xml): Adjust.
7386 (fetch_available_features_from_target): Change return type.
7387 (target_fetch_description_xml): Adjust.
7388 (target_read_description_xml): Adjust.
7390 2018-04-06 Tom Tromey <tom@tromey.com>
7392 * value.c (~value): Update.
7393 (struct value) <contents>: Now unique_xmalloc_ptr.
7394 (value_contents_bits_eq, allocate_value_contents)
7395 (value_contents_raw, value_contents_all_raw)
7396 (value_contents_for_printing, value_contents_for_printing_const)
7397 (set_value_enclosing_type): Update.
7399 2018-04-06 Tom Tromey <tom@tromey.com>
7401 * value.c (range_s): Remove typedef, VEC.
7402 (struct range): Add operator<.
7403 (range_lessthan): Remove.
7404 (ranges_contain): Change type.
7406 (struct value) <unavailable, optimized_out>: Now std::vector.
7407 (value_entirely_available)
7408 (value_entirely_covered_by_range_vector)
7409 (value_entirely_unavailable, value_entirely_optimized_out):
7411 (insert_into_bit_range_vector): Change argument type.
7412 (find_first_range_overlap): Likewise.
7413 (struct ranges_and_idx, value_contents_bits_eq)
7414 (require_not_optimized_out, require_available): Update.
7415 (ranges_copy_adjusted): Change argument types.
7416 (value_optimized_out, value_copy, value_fetch_lazy): Update.
7418 2018-04-06 Tom Tromey <tom@tromey.com>
7420 * value.c (~value): Update.
7421 (struct value) <parent>: Now a value_ref_ptr.
7422 (value_parent, set_value_parent, value_address, value_copy):
7425 2018-04-06 Tom Tromey <tom@tromey.com>
7427 * value.c (struct value): Add constructor, destructor, and member
7429 (allocate_value_lazy, value_decref): Update.
7431 2018-04-06 Tom Tromey <tom@tromey.com>
7433 * value.c (struct value) <released, next>: Remove.
7434 (all_values): Now a std::vector.
7435 (allocate_value_lazy): Update.
7436 (value_next): Remove.
7437 (value_mark, value_free_to_mark, release_value)
7438 (value_release_to_mark): Update.
7440 2018-04-06 Tom Tromey <tom@tromey.com>
7442 * value.h (fetch_subexp_value, value_release_to_mark): Update.
7443 (free_value_chain): Remove.
7444 * value.c (free_value_chain): Remove.
7445 (value_release_to_mark): Return a std::vector.
7446 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7448 (check_condition): Update.
7449 * eval.c (fetch_subexp_value): Change "val_chain" to a
7451 * breakpoint.c (update_watchpoint): Update.
7452 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7454 2018-04-06 Tom Tromey <tom@tromey.com>
7456 * value.h (free_all_values): Remove.
7457 * value.c (free_all_values): Remove.
7459 2018-04-06 Tom Tromey <tom@tromey.com>
7461 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7462 (value_history_chain, value_history_count): Remove.
7463 (value_history): New global.
7464 (record_latest_value, access_value_history, show_values)
7465 (preserve_values): Update.
7467 2018-04-06 Tom Tromey <tom@tromey.com>
7469 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7470 * varobj.c (varobj_set_display_format, varobj_set_value)
7471 (install_default_visualizer, construct_visualizer)
7472 (install_new_value, ~varobj, varobj_get_value_type)
7473 (my_value_of_variable, varobj_editable_p): Update.
7474 * c-varobj.c (c_describe_child, c_value_of_variable)
7475 (cplus_number_of_children, cplus_describe_child): Update.
7476 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7477 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7478 (ada_value_of_variable, ada_value_is_changeable_p): Update.
7480 2018-04-06 Tom Tromey <tom@tromey.com>
7482 * printcmd.c (last_examine_address): Change type to
7484 (do_examine, x_command): Update.
7486 2018-04-06 Tom Tromey <tom@tromey.com>
7488 * value.c (release_value): Update.
7489 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7490 (struct bpstats) <val>: Now a value_ref_ptr.
7491 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7492 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7493 (~watchpoint, print_it_watchpoint, watch_command_1)
7494 (invalidate_bp_value_on_memory_change): Update.
7496 2018-04-06 Tom Tromey <tom@tromey.com>
7498 * varobj.c (varobj_clear_saved_item)
7499 (update_dynamic_varobj_children, install_new_value, ~varobj):
7501 * value.h (value_incref): Move declaration earlier.
7502 (value_decref): Rename from value_free.
7503 (struct value_ref_policy): New.
7504 (value_ref_ptr): New typedef.
7505 (struct value_deleter): Remove.
7506 (gdb_value_up): Remove typedef.
7507 (release_value): Change return type.
7508 (release_value_or_incref): Remove.
7509 * value.c (set_value_parent): Update.
7510 (value_incref): Change return type.
7511 (value_decref): Rename from value_free.
7512 (value_free_to_mark, free_all_values, free_value_chain): Update.
7513 (release_value): Return value_ref_ptr.
7514 (release_value_or_incref): Remove.
7515 (record_latest_value, set_internalvar, clear_internalvar):
7517 * stack.c (info_frame_command): Don't call value_free.
7518 * python/py-value.c (valpy_dealloc, valpy_new)
7519 (value_to_value_object): Update.
7520 * printcmd.c (do_examine): Update.
7521 * opencl-lang.c (lval_func_free_closure): Update.
7522 * mi/mi-main.c (register_changed_p): Don't call value_free.
7523 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7524 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7525 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7527 * guile/scm-value.c (vlscm_free_value_smob)
7528 (vlscm_scm_from_value): Update.
7529 * frame.c (frame_register_unwind, frame_unwind_register_signed)
7530 (frame_unwind_register_unsigned, get_frame_register_bytes)
7531 (put_frame_register_bytes): Don't call value_free.
7532 * findvar.c (address_from_register): Don't call value_free.
7533 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7534 * dwarf2loc.c (entry_data_value_free_closure)
7535 (value_of_dwarf_reg_entry, free_pieced_value_closure)
7536 (dwarf2_evaluate_loc_desc_full): Update.
7537 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7538 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7539 (~watchpoint, watch_command_1)
7540 (invalidate_bp_value_on_memory_change): Update.
7541 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7543 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
7546 * warning.m4: Add -Wno-error=deprecated-register.
7547 * configure: Re-generate.
7549 2018-04-05 Tom Tromey <tom@tromey.com>
7551 * linespec.h: Remove include of "vec.h".
7553 2018-04-05 Tom Tromey <tom@tromey.com>
7555 * linespec.c (typep): Remove typedef.
7556 (find_methods, find_superclass_methods): Take a std::vector.
7557 (find_method): Use std::vector.
7559 2018-04-05 Tom Tromey <tom@tromey.com>
7561 * utils.c (compare_strings): Remove.
7562 * utils.h (compare_strings): Remove.
7563 * objc-lang.h (find_imps): Update.
7564 * objc-lang.c (find_methods): Take a std::vector.
7565 (uniquify_strings, find_imps): Likewise.
7566 * linespec.c (find_methods): Take a std::vector.
7567 (decode_objc): Use std::vector.
7568 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7570 (find_method, find_function_symbols): Use std::vector.
7572 2018-04-05 Tom Tromey <tom@tromey.com>
7574 * completer.c (completion_tracker::completion_tracker): Remove
7576 (completion_tracker::discard_completions): Likewise.
7577 * breakpoint.c (ambiguous_names_p): Remove cast.
7578 * ada-lang.c (_initialize_ada_language): Remove cast.
7579 * utils.h (streq): Update.
7580 (streq_hash): Add new declaration.
7581 * utils.c (streq): Return bool.
7582 (streq_hash): New function.
7584 2018-04-05 Tom Tromey <tom@tromey.com>
7586 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7587 Remove a string copy.
7589 2018-04-05 Tom Tromey <tom@tromey.com>
7591 * linespec.c (filter_results): Use std::vector.
7592 (decode_line_2, decode_line_full): Update.
7594 2018-04-05 Tom Tromey <tom@tromey.com>
7596 * linespec.c (canonical_to_fullform): Return std::string.
7597 (filter_results): Update.
7598 (struct decode_line_2_item): Add constructor.
7599 <fullform, displayform>: Now std::string.
7600 (decode_line_2_compare_items): Now a std::sort comparator.
7601 (decode_line_2): Update.
7603 2018-04-05 Tom Tromey <tom@tromey.com>
7605 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7606 (unexpected_linespec_error): Update.
7607 (linespec_parse_basic, parse_linespec): Update.
7609 2018-04-05 Tom Tromey <tom@tromey.com>
7611 * linespec.c (linespec_parse_basic): Reindent.
7613 2018-04-05 Tom Tromey <tom@tromey.com>
7615 * minsyms.h (iterate_over_minimal_symbols): Update.
7616 * minsyms.c (iterate_over_minimal_symbols): Take a
7618 * linespec.c (struct collect_minsyms): Remove.
7619 (compare_msyms): Now a std::sort comparator.
7620 (add_minsym): Add parameters.
7621 (search_minsyms_for_name): Update. Use std::vector.
7623 2018-04-03 Tom Tromey <tom@tromey.com>
7625 * mipsread.c (read_alphacoff_dynamic_symtab): Use
7628 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7630 * MAINTAINERS (Write After Approval): Add Weimin Pan.
7632 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7635 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
7636 printing static type.
7638 2018-04-01 Tom Tromey <tom@tromey.com>
7640 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
7641 (rs6000_xfer_shared_libraries): Update.
7643 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
7645 * common/gdb_vecs.h (char_ptr): Remove.
7646 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
7648 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7650 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
7652 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
7654 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7656 * tracepoint.h (struct uploaded_tp): Initialize fields.
7657 <actions, step_actions, cmd_strings>: Change type to
7658 std::vector<char *>.
7659 * tracepoint.c (get_uploaded_tp): Allocate with new.
7660 (free_uploaded_tps): Free with delete.
7661 (parse_tracepoint_definition): Adjust to std::vector change.
7662 * breakpoint.c (read_uploaded_action): Likewise.
7663 (create_tracepoint_from_upload): Likewise.
7664 * ctf.c (ctf_write_uploaded_tp): Likewise.
7665 (SET_ARRAY_FIELD): Likewise.
7666 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
7668 2018-03-30 Tom Tromey <tom@tromey.com>
7670 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
7672 (svr4_keep_data_in_core): Update.
7673 (svr4_read_so_list): Update.
7675 2018-03-30 Tom Tromey <tom@tromey.com>
7677 * windows-nat.c (handle_output_debug_string, handle_exception):
7679 * target.h (target_read_string): Update.
7680 * target.c (target_read_string): Change "string" to
7682 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
7684 * solib-frv.c (frv_current_sos): Update.
7685 * solib-dsbt.c (dsbt_current_sos): Update.
7686 * solib-darwin.c (darwin_current_sos): Update.
7687 * linux-thread-db.c (inferior_has_bug): Update.
7688 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
7689 Update. Remove alloca.
7690 * ada-lang.c (ada_main_name): Update.
7692 2018-03-30 Tom Tromey <tom@tromey.com>
7694 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
7695 (struct dwo_file_deleter): New.
7696 (dwo_file_up): New typedef.
7697 (open_and_init_dwo_file): Use dwo_file_up.
7698 (free_dwo_file_cleanup): Remove.
7700 2018-03-30 Tom Tromey <tom@tromey.com>
7702 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
7703 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
7705 2018-03-30 Tom Tromey <tom@tromey.com>
7707 * dwarf2read.c (class free_cached_comp_units): New class.
7708 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
7709 (free_cached_comp_units): Remove function.
7711 2018-03-30 Tom Tromey <tom@tromey.com>
7713 * utils.h (make_cleanup_unpush_target): Remove.
7714 * inf-ptrace.c (struct target_unpusher): New.
7715 (target_unpush_up) New typedef.
7716 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
7718 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
7720 2018-03-27 Tom Tromey <tom@tromey.com>
7722 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
7724 2018-03-27 Pedro Alves <palves@redhat.com>
7725 Tom Tromey <tom@tromey.com>
7727 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
7728 destructor. Now a class.
7729 (gdb_readline_wrapper_cleanup): Remove function.
7730 (gdb_readline_wrapper): Remove cleanups.
7732 2018-03-27 Tom Tromey <tom@tromey.com>
7734 * typeprint.h (struct type_print_options) <local_typedefs,
7735 global_typedefs>: Remove "struct" keyword.
7736 (class typedef_hash_table): New class.
7737 (recursively_update_typedef_hash, add_template_parameters)
7738 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
7739 (find_typedef_in_hash): Don't declare.
7740 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
7741 (typedef_hash_table::recursively_update): Rename from
7742 recursively_update_typedef_hash. Now a member.
7743 (typedef_hash_table::add_template_parameters): Rename from
7744 add_template_parameters. Now a member.
7745 (typedef_hash_table::typedef_hash_table): Now a constructor;
7746 rename from create_typedef_hash.
7747 (typedef_hash_table::~typedef_hash_table): Now a destructor;
7748 rename from free_typedef_hash.
7749 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
7750 (do_free_global_table): Remove.
7751 (typedef_hash_table::typedef_hash_table): New constructor; renamed
7752 from copy_type_recursive.
7753 (create_global_typedef_table): Remove.
7754 (typedef_hash_table::find_global_typedef): Now a member of
7756 (typedef_hash_table::find_typedef): Rename from
7757 find_typedef_in_hash; now a member.
7758 (whatis_exp): Update.
7759 * extension.h (struct ext_lang_type_printers): Add constructor and
7761 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
7763 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
7764 Now a constructor; rename from start_ext_lang_type_printers.
7765 (ext_lang_type_printers): Now a destructor; rename from
7766 free_ext_lang_type_printers.
7767 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
7769 (c_type_print_base_struct_union): Update. Remove cleanups.
7771 2018-03-27 Tom Tromey <tom@tromey.com>
7773 * dwarf-index-write.c: Include <cmath>.
7775 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7777 * NEWS: Add entry describing new "set|show varsize-limit" command.
7778 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
7780 * printcmd.c (_initialize_printcmd): Add "set var" alias of
7783 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
7785 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
7787 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
7788 * dwarf-index-common.c: New file.
7789 * dwarf-index-common.h: New file.
7790 * dwarf-index-write.c: New file.
7791 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
7792 (struct dwarf2_section_info): Move from here.
7793 (dwarf2_section_info_def): Likewise.
7794 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
7795 (offset_type): Likewise.
7796 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
7797 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
7798 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
7799 (byte_swap): Likewise.
7800 (MAYBE_SWAP): Likewise.
7801 (dwarf2_per_cu_ptr): Likewise.
7802 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
7803 (struct tu_stats): Likewise.
7804 (struct dwarf2_per_objfile): Likewise.
7805 (struct dwarf2_per_cu_data): Likewise.
7806 (struct signatured_type): Likewise.
7807 (sig_type_ptr): Likewise.
7808 (DEF_VEC_P (sig_type_ptr)): Likewise.
7809 (INDEX4_SUFFIX): Likewise.
7810 (INDEX5_SUFFIX): Likewise.
7811 (DEBUG_STR_SUFFIX): Likewise.
7812 (dwarf2_read_section): Make non-static.
7813 (mapped_index_string_hash): Move from here.
7814 (dwarf5_djb_hash): Likewise.
7815 (file_write): Likewise.
7816 (class data_buf): Likewise.
7817 (struct symtab_index_entry): Likewise.
7818 (struct mapped_symtab): Likewise.
7819 (find_slot): Likewise.
7820 (hash_expand): Likewise.
7821 (add_index_entry): Likewise.
7822 (uniquify_cu_indices): Likewise.
7823 (class c_str_view): Likewise.
7824 (class c_str_view_hasher): Likewise.
7825 (class vector_hasher): Likewise.
7826 (write_hash_table): Likewise.
7827 (psym_index_map): Likewise.
7828 (struct addrmap_index_data): Likewise.
7829 (add_address_entry): Likewise.
7830 (add_address_entry_worker): Likewise.
7831 (write_address_map): Likewise.
7832 (symbol_kind): Likewise.
7833 (write_psymbols): Likewise.
7834 (struct signatured_type_index_data): Likewise.
7835 (write_one_signatured_type): Likewise.
7836 (recursively_count_psymbols): Likewise.
7837 (recursively_write_psymbols): Likewise.
7838 (class debug_names): Likewise.
7839 (check_dwarf64_offsets): Likewise.
7840 (psyms_seen_size): Likewise.
7841 (write_gdbindex): Likewise.
7842 (write_debug_names): Likewise.
7843 (assert_file_size): Likewise.
7844 (write_psymtabs_to_index): Likewise.
7845 (save_gdb_index_command): Likewise.
7846 (_initialize_dwarf2_read): Don't register the "save gdb-index"
7848 * dwarf2read.h: New file.
7850 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7853 * dwarf2read.c (dwarf2_physname): Do not return the demangled
7854 symbol name if the CU's language stores symbol names in linkage
7856 * language.h (struct language_defn)
7857 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
7858 all instances of this struct.
7860 2018-03-26 Tom Tromey <tom@tromey.com>
7862 * stack.c (backtrace_command_1): Remove verbose code.
7864 2018-03-26 Tom Tromey <tom@tromey.com>
7866 * python/py-framefilter.c (py_print_type): Don't catch
7867 exceptions. Return void.
7868 (py_print_value): Likewise.
7869 (py_print_single_arg): Likewise.
7870 (enumerate_args): Don't catch exceptions.
7871 (py_print_args): Likewise.
7872 (py_print_frame): Likewise.
7873 (gdbpy_apply_frame_filter): Catch exceptions here.
7875 2018-03-26 Tom Tromey <tom@tromey.com>
7877 * stack.c (_initialize_stack): Remove trailing newlines from help
7878 text. Add "Usage" line to "backtrace" help.
7880 2018-03-26 Tom Tromey <tom@tromey.com>
7883 * python/py-framefilter.c (py_print_args): Call wrap_hint.
7885 2018-03-26 Tom Tromey <tom@tromey.com>
7887 * python/py-framefilter.c (py_print_single_arg): Return
7888 EXT_LANG_BT_ERROR from catch.
7890 2018-03-26 Tom Tromey <tom@tromey.com>
7893 * stack.c (backtrace_command_1): Move some code into no-filters
7896 2018-03-26 Tom Tromey <tom@tromey.com>
7898 * python/py-framefilter.c (throw_quit_or_print_exception): New
7900 (gdbpy_apply_frame_filter): Use it.
7902 2018-03-26 Tom Tromey <tom@tromey.com>
7905 * python/py-framefilter.c (py_print_type, py_print_value)
7906 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
7909 2018-03-26 Tom Tromey <tom@tromey.com>
7911 * python/py-framefilter.c (enumerate_args): Use
7912 gdb::unique_xmalloc_ptr.
7914 2018-03-26 Tom Tromey <tom@tromey.com>
7916 * python/py-framefilter.c (py_print_frame): Return
7918 (gdbpy_apply_frame_filter): Update comment.
7919 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
7921 <EXT_LANG_BT_NO_FILTERS>: Change value.
7923 2018-03-26 Tom Tromey <tom@tromey.com>
7926 * stack.c (backtrace_command): Parse "hide" argument.
7927 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
7928 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
7931 2018-03-26 Tom Tromey <tom@tromey.com>
7933 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
7935 (backtrace_command): Remove "fulltrace", add "flags".
7937 2018-03-26 Tom Tromey <tom@tromey.com>
7939 * stack.c (backtrace_command): Rewrite command line parsing.
7941 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7943 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
7945 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7947 * filename-seen-cache.h: Add include guard.
7949 2018-03-26 Keith Seitz <keiths@redhat.com>
7951 * symfile.c (place_section): Remove "struct" from section_addr_info
7953 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
7954 "struct" keyword from section_addr_info.
7956 2018-03-26 Alan Hayward <alan.hayward@arm.com>
7958 * regformats/regdef.h (reg): Add constructors.
7960 2018-03-25 Pedro Alves <palves@redhat.com>
7962 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
7963 if then/else bodies in var_func_name extraction.
7965 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
7967 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
7968 lookup_minimal_symbol() to find symbol entry.
7969 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
7971 2018-03-23 Keith Seitz <keiths@redhat.com>
7974 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
7975 nested type definitions for C++, too.
7977 2018-03-23 Tom Tromey <tom@tromey.com>
7979 * machoread.c (struct oso_el): Add a constructor. Don't define as
7981 (macho_register_oso): Remove.
7982 (macho_symtab_read): Take a std::vector.
7983 (oso_el_compare_name): Now a std::sort comparator.
7984 (macho_symfile_read_all_oso): Take a std::vector.
7985 (macho_symfile_read): Use std::vector. Remove cleanups.
7987 2018-03-22 Tom Tromey <tom@tromey.com>
7989 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
7990 (record_full_goto_bookmark): Use std::string.
7992 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7995 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
7998 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8000 * rs6000-tdep.c (store_insn_p): New function.
8001 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8002 and cr_reg to their unshifted values. Use store_insn_p to
8003 match LR saves using either R1 or fdata->alloca_reg. Use
8004 store_insn_p to match CR saves. Set alloca_reg_offset
8005 when alloca_reg and framep are set. Remove lr_reg shift
8006 when assigning to fdata->lr_register.
8008 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8010 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8011 command line args instead of emitting a warning.
8013 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8015 * tracepoint.h (struct static_tracepoint_marker): Initialize
8016 fields, define default constructor, move constructor and move
8017 assignment, disable the rest.
8018 <str_id, extra>: Make std::string.
8019 (release_static_tracepoint_marker): Remove.
8020 (free_current_marker): Remove.
8021 * tracepoint.c (free_current_marker): Remove.
8022 (parse_static_tracepoint_marker_definition): Adjust to
8023 std::string, use new hex2str overload.
8024 (release_static_tracepoint_marker): Remove.
8025 (print_one_static_tracepoint_marker): Get marker by reference
8026 and adjust to std::string.
8027 (info_static_tracepoint_markers_command): Adjust to std::vector
8029 * target.h (static_tracepoint_marker_p): Remove typedef.
8030 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8031 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8033 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8035 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8036 (target_debug_print_std_vector_static_tracepoint_marker): New.
8037 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8039 (target_debug_print_static_tracepoint_marker_p): ... this.
8040 * target-delegates.c: Re-generate.
8041 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8043 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8044 (decode_static_tracepoint_spec): Adjust to std::vector.
8045 (tracepoint_print_one_detail): Adjust to std::string.
8046 (strace_marker_decode_location): Adjust to std::string.
8047 (update_static_tracepoint): Adjust to std::string, remove call
8048 to release_static_tracepoint_marker.
8049 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8050 Adjust to std::vector.
8051 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8052 (remote_static_tracepoint_markers_by_strid): Adjust to
8054 * common/rsp-low.h (hex2str): New overload with explicit count
8056 * common/rsp-low.c (hex2str): New overload with explicit count
8058 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8059 (_initialize_rsp_low_selftests): Add test_hex2str test.
8060 * unittests/tracepoint-selftests.c
8061 (test_parse_static_tracepoint_marker_definition): Adjust to
8064 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8066 * tracepoint.c (parse_static_tracepoint_marker_definition):
8067 Consider case where the definition is followed by more
8069 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8070 tracepoint-selftests.c.
8071 * unittests/tracepoint-selftests.c: New.
8073 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8075 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8078 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8080 * symtab.c (find_pc_sect_line): fixed indentation.
8082 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8084 * symtab.c (find_pc_sect_line): now uses binary search.
8086 2018-03-19 Tom Tromey <tom@tromey.com>
8088 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8091 2018-03-19 Pedro Alves <palves@redhat.com>
8092 Tom Tromey <tom@tromey.com>
8094 * unittests/observable-selftests.c: New file.
8095 * common/observable.h: New file.
8096 * observable.h: New file.
8097 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8098 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8099 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8100 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8101 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8102 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8103 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8104 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8105 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8106 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8107 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8108 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8109 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8110 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8111 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8112 tui/tui-interp.c, valops.c: Update all users.
8113 * tui/tui-hooks.c (tui_bp_created_observer)
8114 (tui_bp_deleted_observer, tui_bp_modified_observer)
8115 (tui_inferior_exit_observer, tui_before_prompt_observer)
8116 (tui_normal_stop_observer, tui_register_changed_observer):
8118 (tui_observers_token): New global.
8119 (attach_or_detach, tui_attach_detach_observers): New functions.
8120 (tui_install_hooks, tui_remove_hooks): Use
8121 tui_attach_detach_observers.
8122 * record-btrace.c (record_btrace_thread_observer): Remove.
8123 (record_btrace_thread_observer_token): New global.
8124 * observer.sh: Remove.
8125 * observer.c: Rename to observable.c.
8126 * observable.c (namespace gdb_observers): Define new objects.
8127 (observer_debug): Move into gdb_observers namespace.
8128 (struct observer, struct observer_list, xalloc_observer_list_node)
8129 (xfree_observer_list_node, generic_observer_attach)
8130 (generic_observer_detach, generic_observer_notify): Remove.
8131 (_initialize_observer): Update.
8132 Don't include observer.inc.
8133 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8134 (clean mostlyclean): Likewise.
8135 (observer.h, observer.inc): Remove targets.
8136 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8137 (COMMON_SFILES): Use observable.c, not observer.c.
8138 * .gitignore: Remove observer.h.
8140 2018-03-18 Tom Tromey <tom@tromey.com>
8142 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8144 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8146 2018-03-17 Tom Tromey <tom@tromey.com>
8148 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8150 2018-03-17 Tom Tromey <tom@tromey.com>
8152 * target.c (class scoped_target_fd): New.
8153 (target_fileio_close_cleanup): Remove.
8154 (target_fileio_read_alloc_1): Use scoped_target_fd.
8156 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8158 * silent-rules.mk: New.
8159 * Makefile.in: Include silent-rules.mk
8160 (srcdir, VPATH, top_srcdir): Move up.
8161 (COMPILE): Add ECHO_CXX.
8162 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8163 (init.c): Add ECHO_INIT_C.
8164 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8165 (version.c): Add ECHO_GEN.
8166 (printcmd.o): Add ECHO_CXX.
8167 (target-float.o): Add ECHO_CXX.
8168 (ada-exp.o): Add ECHO_CXX.
8169 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8170 (insight$(EXEEXT)): Add ECHO_CXXLD.
8171 * gnulib/configure.ac: Add AM_SILENT_RULES.
8172 * gnulib/aclocal.m4: Re-generate.
8173 * gnulib/configure: Re-generate.
8174 * gnulib/import/Makefile.in: Re-generate.
8176 2018-03-16 Tom Tromey <tom@tromey.com>
8178 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8179 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8180 * utils.c (do_free_section_addr_info)
8181 (make_cleanup_free_section_addr_info): Remove.
8182 * symfile.h (struct other_sections): Add constructor.
8183 (struct section_addr_info): Remove.
8184 (section_addr_info): New typedef.
8185 (struct sym_fns) <sym_offsets>: Change type of parameter.
8186 (build_section_addr_info_from_objfile)
8187 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8188 (default_symfile_offsets, symbol_file_add)
8189 (symbol_file_add_from_bfd)
8190 (build_section_addr_info_from_section_table): Update.
8191 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8192 * symfile.c (alloc_section_addr_info): Remove.
8193 (build_section_addr_info_from_section_table): Change return type.
8195 (build_section_addr_info_from_bfd)
8196 (build_section_addr_info_from_objfile): Likewise.
8197 (free_section_addr_info): Remove.
8198 (relative_addr_info_to_section_offsets): Change type of "addrs".
8199 (addrs_section_compar): Now a std::sort comparator.
8200 (addrs_section_sort): Change return type.
8201 (addr_info_make_relative): Change type of "addrs". Update.
8202 (default_symfile_offsets, syms_from_objfile_1)
8203 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8204 (symbol_file_add_separate): Update.
8205 (symbol_file_add): Change type of "addrs". Update.
8206 (add_symbol_file_command): Update. Remove cleanups.
8207 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8209 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8210 * solib.c (solib_read_symbols): Update.
8211 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8212 * machoread.c (macho_symfile_offsets): Update.
8213 * jit.c (jit_bfd_try_read_symtab): Update.
8215 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8217 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8218 unittests/utils-selftests.c.
8219 * unittests/utils-selftests.c: New file.
8221 2018-03-14 Tom Tromey <tom@tromey.com>
8224 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8227 2018-03-14 Tom Tromey <tom@tromey.com>
8230 * printcmd.c (printf_pointer): Allow "-" in format.
8232 2018-03-14 Tom Tromey <tom@tromey.com>
8234 * printcmd.c (_initialize_printcmd): Add usage to printf.
8236 2018-03-14 Yao Qi <qiyao@sourceware.org>
8238 * MAINTAINERS: Update my email address.
8240 2018-03-13 Tom Tromey <tom@tromey.com>
8242 * machoread.c (macho_check_dsym): Change filenamep to a
8244 (macho_symfile_read): Update.
8245 * symfile.c (load_command): Use std::string.
8247 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
8249 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8250 to error message string.
8251 (riscv_register_name): Use xsnprintf instead of sprintf.
8252 (riscv_insn::fetch_instruction): Use gdb_assert instead of
8254 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8256 (riscv_push_dummy_call): Likewise.
8258 2018-03-12 Tom Tromey <tom@tromey.com>
8260 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8261 Use gdb::byte_vector.
8262 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8264 2018-03-12 Yao Qi <yao.qi@linaro.org>
8266 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8267 parameter type to readable_regcache.
8268 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8271 2018-03-11 Tom Tromey <tom@tromey.com>
8273 * dwarf2read.c (struct nextfield): Add initializers.
8274 (struct nextfnfield): Remove.
8275 (struct fnfieldlist): Add initializers. Remove "length" and
8276 "head", use std::vector.
8277 (struct decl_field_list): Remove.
8278 (struct field_info): Add initializers.
8279 <fields, baseclasses>: Now std::vector.
8280 <nbaseclasses, nfnfields, typedef_field_list_count,
8281 nested_types_list_count>: Remove.
8282 (dwarf2_add_field, dwarf2_add_type_defn)
8283 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8284 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8285 (process_structure_scope): Update.
8287 2018-03-11 Tom Tromey <tom@tromey.com>
8289 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8290 for use by std::sort.
8291 (build_type_psymtabs_1): Use std::vector.
8293 2018-03-09 Eli Zaretskii <eliz@gnu.org>
8295 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8296 and LIBMPFR in the printed configuration.
8298 2018-03-08 Tom Tromey <tom@tromey.com>
8300 * source.c (get_filename_and_charpos): Use scoped_fd.
8301 * nto-procfs.c (procfs_open_1): Use scoped_fd.
8302 (procfs_pidlist): Likewise.
8303 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8304 (iterate_over_mappings): Likewise.
8306 2018-03-08 Tom Tromey <tom@tromey.com>
8308 * infcall.c (struct call_return_meta_info)
8309 <stack_temporaries_enabled>: Remove.
8310 (get_call_return_value, call_function_by_hand_dummy): Update.
8311 * thread.c (disable_thread_stack_temporaries): Remove.
8312 (enable_thread_stack_temporaries): Remove.
8313 (thread_stack_temporaries_enabled_p): Return bool.
8314 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8315 (get_last_thread_stack_temporary): Update.
8316 * eval.c (evaluate_subexp): Update.
8317 * gdbthread.h (class enable_thread_stack_temporaries): Now a
8318 class, not a function.
8319 (value_ptr, value_vec): Remove typedefs.
8320 (class thread_info) <stack_temporaries_enabled>: Now bool.
8321 <stack_temporaries>: Now a std::vector.
8322 (thread_stack_temporaries_enabled_p)
8323 (value_in_thread_stack_temporaries): Return bool.
8325 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
8327 * remote.c (putpkt_binary): Fix omitted bytes reporting.
8328 (getpkt_or_notif_sane_1): Likewise.
8330 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8332 * build-id.c (build_id_to_debug_bfd): Use std::string.
8334 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8336 * build-id.c (find_separate_debug_file_by_buildid): Return
8338 * build-id.h (find_separate_debug_file_by_buildid): Return
8340 * coffread.c (coff_symfile_read): Adjust to std::string.
8341 * elfread.c (elf_symfile_read): Adjust to std::string.
8342 * symfile.c (separate_debug_file_exists): Change parameter to
8344 (find_separate_debug_file): Return std::string.
8345 (find_separate_debug_file_by_debuglink): Return std::string.
8346 * symfile.h (find_separate_debug_file_by_debuglink): Return
8349 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8351 * common/xml-utils.c (xml_escape_text): Move code to...
8352 (xml_escape_text_append): ... this new function.
8353 * common/xml-utils.h (xml_escape_text_append): New declaration.
8354 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8356 (_initialize_xml_utils): register test_xml_escape_text_append as
8359 2018-03-07 Alan Hayward <alan.hayward@arm.com>
8361 * defs.h: Remove MAX_REGISTER_SIZE.
8362 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8364 * python/py-unwind.c (pyuw_sniffer): Likewise.
8366 2018-03-07 Tom Tromey <tom@tromey.com>
8368 * linux-tdep.c (linux_info_proc): Update.
8369 * target.h (struct target_ops) <to_fileio_readlink>: Return
8371 (target_fileio_readlink): Return optional<string>.
8372 * remote.c (remote_hostio_readlink): Return optional<string>.
8373 * inf-child.c (inf_child_fileio_readlink): Return
8375 * target.c (target_fileio_readlink): Return optional<string>.
8377 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
8379 * regcache.c (cooked_read_test): Add riscv to the list of
8380 architectures that have a save_reggroup.
8382 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
8384 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8385 value is not a dynamic class object.
8387 2018-03-06 Tom Tromey <tom@tromey.com>
8389 * rust-exp.y: Formatting fixes.
8391 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8393 * riscv-tdep.c (riscv_register_name): Remove target description
8395 (riscv_gdbarch_init): Remove target description check.
8397 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8399 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8401 * riscv-tdep.h: Likewise.
8403 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8405 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8406 (riscv_pseudo_register_write): Delete.
8407 (riscv_gdbarch_init): Remove all use of pseudo registers.
8409 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8411 * record-btrace.c (btrace_print_lines): Replace cleanup
8412 parameter with RAII equivalents.
8413 (btrace_insn_history): Replace cleanup with RAII equivalents.
8414 * ui-out.h (make_cleanup_ui_out_list_begin_end,
8415 make_cleanup_ui_out_tuple_begin_end): Remove.
8416 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8417 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8418 make_cleanup_ui_out_list_begin_end): Remove.
8420 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8422 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8423 parameter types to std::vector. Use bool.
8424 (record_btrace_wait): Replace VEC(tp_t) with
8425 std::vector<thread_info *>.
8426 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8428 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8430 * record-btrace.c (record_btrace_disable_callback): Remove.
8431 (struct scoped_btrace_disable): New.
8432 (record_btrace_open): Use scoped_btrace_disable.
8434 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8436 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8437 reading values from registers.
8439 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8441 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8444 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8446 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8447 change parameter type. Use GDB's print functions, and use
8448 core_addr_to_string where appropriate.
8449 (riscv_push_dummy_call): Use core_addr_to_string where
8450 appropriate, update call to riscv_print_arg_location, and reindent
8452 (riscv_return_value): Update call to riscv_print_arg_location.
8454 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8455 Tim Newsome <tim@sifive.com>
8456 Albert Ou <a0u@eecs.berkeley.edu>
8457 Darius Rad <darius@bluespec.com>
8459 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8460 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8461 (ALLDEPFILES): Add riscv-tdep.c
8462 * configure.tgt: Add riscv support.
8463 * riscv-tdep.c: New file.
8464 * riscv-tdep.h: New file.
8465 * NEWS: Mention new target.
8466 * MAINTAINERS: Add entry for riscv.
8468 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8470 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8471 fields within aggregates.
8473 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
8475 * record-btrace.c (btrace_print_lines): Change type of flags to
8476 gdb_disassembly_flags.
8478 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8480 * fbsd-nat.c: Include "inf-ptrace.h".
8481 (USE_SIGTRAP_SIGINFO): Conditionally define.
8482 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8483 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8484 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8486 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8488 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8490 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8491 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8492 "supports_stopped_by_hw_breakpoint" target methods.
8494 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8496 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8497 * fbsd-nat.c (debug_fbsd_nat): New variable.
8498 (show_fbsd_nat_debug): New function.
8499 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8500 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8502 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8504 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8505 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8507 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8508 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8511 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8513 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8514 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8516 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8518 * charset.c (struct charset_vector): New.
8519 (charsets): Change type to charset_vector.
8520 (find_charset_names): Adjust.
8522 (_initialize_charset): Adjust.
8524 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8526 * progspace.h (struct program_space) <deleted_solibs>: Change
8527 type to std::vector<std::string>.
8528 * progspace.c (clear_program_space_solib_cache): Adjust.
8529 * breakpoint.c (print_solib_event): Adjust.
8530 (check_status_catch_solib): Adjust.
8531 * solib.c (update_solib_list): Adjust.
8532 * ui-out.h (class ui_out) <field_string>: New overload.
8533 * ui-out.c (ui_out::field_string): New overload.
8535 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8537 * progspace.h (struct program_space): Add constructor and
8538 destructor, initialize fields.
8539 (add_program_space): Remove.
8540 * progspace.c (add_program_space): Rename to...
8541 (program_space::program_space): ... this.
8542 (release_program_space): Rename to...
8543 (program_space::~program_space): ... this.
8544 (delete_program_space): Use delete to delete program_space.
8545 (initialize_progspace): Use new to allocate program_space.
8546 * inferior.c (add_inferior_with_spaces): Likewise.
8547 (clone_inferior_command): Likewise.
8548 * infrun.c (follow_fork_inferior): Likewise.
8549 (handle_vfork_child_exec_or_exit): Likewise.
8551 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8553 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8554 (delim_string_to_char_ptr_vec): Return std::vector of
8555 gdb::unique_xmalloc_ptr.
8556 (dirnames_to_char_ptr_vec_append): Take std::vector of
8557 gdb::unique_xmalloc_ptr.
8558 (dirnames_to_char_ptr_vec): Return std::vector of
8559 gdb::unique_xmalloc_ptr.
8560 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8561 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8562 (delim_string_to_char_ptr_vec): Return an std::vector of
8563 gdb::unique_xmalloc_ptr, adjust the code.
8564 (dirnames_to_char_ptr_vec_append): Take an std::vector of
8565 gdb::unique_xmalloc_ptr, adjust the code.
8566 (dirnames_to_char_ptr_vec): Return an std::vector of
8567 gdb::unique_xmalloc_ptr, adjust the code.
8568 * auto-load.c (auto_load_safe_path_vec): Change type to
8569 std::vector of gdb::unique_xmalloc_ptr.
8570 (auto_load_expand_dir_vars): Return an std::vector of
8571 gdb::unique_xmalloc_ptr, adjust the code.
8572 (auto_load_safe_path_vec_update): Adjust.
8573 (filename_is_in_auto_load_safe_path_vec): Adjust.
8574 (auto_load_objfile_script_1): Adjust.
8575 * build-id.c (build_id_to_debug_bfd): Adjust.
8576 * linux-thread-db.c (thread_db_load_search): Adjust.
8577 * source.c (add_path): Adjust.
8579 * symfile.c (find_separate_debug_file): Adjust.
8580 * utils.c (do_free_char_ptr_vec): Remove.
8581 (make_cleanup_free_char_ptr_vec): Remove.
8583 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
8586 * common/pathstuff.c: Conditionally include "<windows.h>".
8588 2018-03-01 Georg Sauthoff <mail@georg.so>
8591 * gcore.in: Quote variables and switch interpreter to bash.
8593 2018-03-01 Tom Tromey <tom@tromey.com>
8595 * dwarf2read.c (alloc_discriminant_info): Fix default_index
8596 assertion. Add assertion for discriminant_index.
8597 (quirk_rust_enum): Use correct base type name in univariant case.
8599 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
8601 * record.c (get_call_history_modifiers): Return a
8603 (cmd_record_call_history): Adjust.
8604 * record-btrace.c (record_btrace_call_history): Adjust.
8605 (record_btrace_call_history_range): Adjust.
8606 (record_btrace_call_history_from): Adjust.
8607 * target-debug.h (target_debug_print_record_print_flags): New.
8608 * target-delegates.c: Re-generate.
8609 * target.c (target_call_history): Change flags type.
8610 (target_call_history_from): Likewise.
8611 (target_call_history_range): Likewise.
8612 * target.h (struct target_ops) <target_call_history>: Likewise.
8613 (target_call_history_from): Likewise.
8614 (target_call_history_range): Likewise.
8616 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8617 Simon Marchi <simon.marchi@polymtl.ca>
8619 * common/common-utils.c: Include "sys/stat.h".
8620 (is_regular_file): Move here from "source.c"; change return
8622 * common/common-utils.h (is_regular_file): New prototype.
8623 * common/pathstuff.c (contains_dir_separator): New function.
8624 * common/pathstuff.h (contains_dir_separator): New prototype.
8625 * source.c: Don't include "sys/stat.h".
8626 (is_regular_file): Move to "common/common-utils.c".
8628 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8630 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
8631 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
8632 * auto-load.c: Include "common/pathstuff.h".
8633 * common/common-def.h (current_directory): Move here.
8634 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
8636 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
8638 * common/pathstuff.c: New file.
8639 * common/pathstuff.h: New file.
8640 * compile/compile.c: Include "common/pathstuff.h".
8641 * defs.h (current_directory): Move to "common/common-defs.h".
8642 * dwarf2read.c: Include "common/pathstuff.h".
8644 * guile/scm-safe-call.c: Likewise.
8645 * linux-thread-db.c: Likewise.
8647 * nto-tdep.c: Likewise.
8648 * objfiles.c: Likewise.
8649 * source.c: Likewise.
8650 * symtab.c: Likewise.
8651 * utils.c: Include "common/pathstuff.h".
8652 (gdb_realpath): Move to "common/pathstuff.c".
8653 (gdb_realpath_keepfile): Likewise.
8654 (gdb_abspath): Likewise.
8655 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
8656 (gdb_realpath_keepfile): Likewise.
8657 (gdb_abspath): Likewise.
8659 2018-02-28 John Baldwin <jhb@FreeBSD.org>
8661 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
8662 wildcard process pid for super_resume for kernels with a
8665 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
8667 * compile/compile.c (get_args): Add additional comments
8668 explaining function.
8670 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
8671 Tom Tromey <tom@tromey.com>
8673 * target.h (memory_write_request_s): Remove typedef. Don't define
8675 (target_write_memory_blocks): Change argument to std::vector.
8676 (struct memory_write_request): Add constructor.
8677 * target-memory.c (compare_block_starting_address): Return bool.
8678 Change argument types.
8679 (claim_memory): Change arguments to use std::vector.
8680 (split_regular_and_flash_blocks, blocks_to_erase)
8681 (compute_garbled_blocks): Likewise.
8682 (cleanup_request_data, cleanup_write_requests_vector): Remove.
8683 (target_write_memory_blocks): Change argument to std::vector.
8684 * symfile.c (struct load_section_data): Add constructor and
8685 destructor. Use std::vector for "requests".
8686 (struct load_progress_data): Add initializers.
8687 (load_section_callback): Update. Use "new".
8688 (clear_memory_write_data): Remove.
8689 (generic_load): Update.
8691 2018-02-27 Alan Hayward <alan.hayward@arm.com>
8693 * arch/aarch64.h: Use common/tdesc.h.
8695 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8697 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
8698 architecture with a 64-bit ABI.
8700 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8702 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
8703 ahead of target description loading.
8705 2018-02-26 Tom Tromey <tom@tromey.com>
8707 * stack.c (backtrace_command_1): Update.
8708 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
8710 * python/py-framefilter.c (py_print_frame)
8711 (gdbpy_apply_frame_filter): Change type of "flags".
8712 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
8714 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
8715 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
8716 * extension.h (enum frame_filter_flag): Rename from
8718 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
8719 (apply_ext_lang_frame_filter): Change type of "flags".
8720 * extension.c (apply_ext_lang_frame_filter): Change type of
8722 * extension-priv.h (struct extension_language_ops)
8723 <apply_frame_filter>: Change type of "flags".
8725 2018-02-26 Tom Tromey <tom@tromey.com>
8728 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
8729 off-by-one in py_end computation.
8730 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
8732 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
8735 2018-02-26 Tom Tromey <tom@tromey.com>
8737 * dwarf2read.c (struct variant_field): New.
8738 (struct nextfield) <variant>: New field.
8739 (dwarf2_add_field): Handle DW_TAG_variant_part.
8740 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
8741 discriminated union.
8742 (read_structure_type): Handle DW_TAG_variant_part.
8743 (handle_struct_member_die): New function, extracted from
8744 process_structure_scope. Handle DW_TAG_variant.
8745 (process_structure_scope): Handle discriminated unions. Call
8746 handle_struct_member_die.
8748 2018-02-26 Tom Tromey <tom@tromey.com>
8750 * rust-lang.h (rust_last_path_segment): Declare.
8751 * rust-lang.c (rust_last_path_segment): Now public. Change
8753 (struct disr_info): Remove.
8754 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
8755 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
8756 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
8757 (rust_enum_p, rust_enum_variant): New function.
8758 (rust_underscore_fields): Remove "offset" parameter.
8759 (rust_print_enum): New function.
8760 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
8761 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
8762 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
8764 (rust_internal_print_type): New function, from rust_print_type.
8766 (rust_print_type): Call rust_internal_print_type.
8767 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
8768 Update enum handling.
8769 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
8770 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
8771 (rust_union_quirks): New functions.
8772 (process_full_comp_unit, process_full_type_unit): Call
8774 (process_structure_scope): Update rust_unions if necessary.
8776 2018-02-26 Tom Tromey <tom@tromey.com>
8778 * value.h (value_union_variant): Declare.
8779 * valops.c (value_union_variant): New function.
8780 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
8781 (struct discriminant_info): New.
8782 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
8784 (struct main_type) <flag_discriminated_union>: New field.
8786 2018-02-26 Tom Tromey <tom@tromey.com>
8788 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8789 unittests/unpack-selftests.c.
8790 * unittests/unpack-selftests.c: New file.
8791 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
8793 2018-02-26 Yao Qi <yao.qi@linaro.org>
8795 * dwarf2read.c (struct partial_die_info) <read>: New method.
8796 (read_partial_die): Remove the declaration.
8797 (load_partial_dies): Update.
8798 (partial_die_info::partial_die_info):
8799 (read_partial_die): Change it to partial_die_info::read.
8801 2018-02-26 Yao Qi <yao.qi@linaro.org>
8803 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
8804 (fixup_partial_die): Remove declaration.
8805 (scan_partial_symbols): Update.
8806 (partial_die_parent_scope): Likewise.
8807 (partial_die_full_name): Likewise.
8808 (fixup_partial_die): Change it to partial_die_info::fixup.
8810 2018-02-26 Yao Qi <yao.qi@linaro.org>
8812 * dwarf2read.c (read_partial_die): Update the declaration.
8813 (load_partial_dies): Caller update.
8814 (read_partial_die): Remove one argument abbrev_len.
8816 2018-02-26 Yao Qi <yao.qi@linaro.org>
8818 * dwarf2read.c (struct partial_die_info): Add ctor, delete
8819 assignment operator.
8820 (load_partial_dies): Use ctor and copy ctor.
8821 (read_partial_die): Update.
8822 (dwarf2_cu::find_partial_die): Use ctor.
8824 2018-02-26 Yao Qi <yao.qi@linaro.org>
8826 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
8827 (find_partial_die_in_comp_unit): Change it to
8828 dwarf2_cu::find_partial_die.
8829 (find_partial_die): Update.
8831 2018-02-26 Yao Qi <yao.qi@linaro.org>
8833 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
8836 2018-02-26 Yao Qi <yao.qi@linaro.org>
8838 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
8840 2018-02-26 Alan Hayward <alan.hayward@arm.com>
8842 * arch/amd64.h: Use common/tdesc.h.
8843 * arch/i386.c: Likewise.
8844 * arch/i386.h: Likewise.
8845 * arch/tic6x.c: Likewise.
8846 * arch/tdesc.h: Move file from here...
8847 * common/tdesc.h: ...to here.
8848 * features/aarch64-core.c: Regenerate.
8849 * features/aarch64-fpu.c: Regenerate.
8850 * features/i386/32bit-avx.c: Regenerate.
8851 * features/i386/32bit-avx512.c: Regenerate.
8852 * features/i386/32bit-core.c: Regenerate.
8853 * features/i386/32bit-linux.c: Regenerate.
8854 * features/i386/32bit-mpx.c: Regenerate.
8855 * features/i386/32bit-pkeys.c: Regenerate.
8856 * features/i386/32bit-sse.c: Regenerate.
8857 * features/i386/64bit-avx.c: Regenerate.
8858 * features/i386/64bit-avx512.c: Regenerate.
8859 * features/i386/64bit-core.c: Regenerate.
8860 * features/i386/64bit-linux.c: Regenerate.
8861 * features/i386/64bit-mpx.c: Regenerate.
8862 * features/i386/64bit-pkeys.c: Regenerate.
8863 * features/i386/64bit-segments.c: Regenerate.
8864 * features/i386/64bit-sse.c: Regenerate.
8865 * features/i386/x32-core.c: Regenerate.
8866 * features/tic6x-c6xp.c: Regenerate.
8867 * features/tic6x-core.c: Regenerate.
8868 * features/tic6x-gp.c: Regenerate.
8869 * target-descriptions.c: Use common/tdesc.h.
8870 * target-descriptions.h: Likewise.
8872 2018-02-24 Tom Tromey <tom@tromey.com>
8874 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
8875 (try_thread_db_load_from_dir, thread_db_load_search): Use
8877 (info_auto_load_libthread_db_compare): Return bool. Change
8879 (info_auto_load_libthread_db): Use std::vector, std::string.
8882 2018-02-24 Tom Tromey <tom@tromey.com>
8884 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
8886 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
8888 * gdbarch.c: Rebuild.
8889 * gdbarch.h: Rebuild.
8890 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
8891 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
8892 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
8895 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
8897 * gdbtypes.h (sect_offset): Change type to uint64_t.
8898 (sect_offset_str): New function.
8899 * dwarf2read.c (create_addrmap_from_aranges): Use
8901 (error_check_comp_unit_head): Likewise.
8902 (create_debug_type_hash_table): Likewise.
8903 (read_cutu_die_from_dwo): Likewise.
8904 (init_cutu_and_read_dies): Likewise.
8905 (init_cutu_and_read_dies_no_follow): Likewise.
8906 (process_psymtab_comp_unit_reader): Likewise.
8907 (partial_die_parent_scope): Likewise.
8908 (peek_die_abbrev): Likewise.
8909 (process_queue): Likewise.
8910 (dwarf2_physname): Likewise.
8911 (read_namespace_alias): Likewise.
8912 (read_import_statement): Likewise.
8913 (create_dwo_cu_reader): Likewise.
8914 (create_cus_hash_table): Likewise.
8915 (lookup_dwo_cutu): Likewise.
8916 (inherit_abstract_dies): Likewise.
8917 (read_func_scope): Likewise.
8918 (read_call_site_scope): Likewise.
8919 (dwarf2_add_member_fn): Likewise.
8920 (read_common_block): Likewise.
8921 (read_module_type): Likewise.
8922 (read_typedef): Likewise.
8923 (read_subrange_type): Likewise.
8924 (load_partial_dies): Likewise.
8925 (read_partial_die): Likewise.
8926 (find_partial_die): Likewise.
8927 (read_str_index): Likewise.
8928 (dwarf2_string_attr): Likewise.
8929 (build_error_marker_type): Likewise.
8930 (lookup_die_type): Likewise.
8931 (dump_die_shallow): Likewise.
8932 (follow_die_ref): Likewise.
8933 (dwarf2_fetch_die_loc_sect_off): Likewise.
8934 (dwarf2_fetch_constant_bytes): Likewise.
8935 (follow_die_sig): Likewise.
8936 (get_signatured_type): Likewise.
8937 (get_DW_AT_signature_type): Likewise.
8938 (dwarf2_find_containing_comp_unit): Likewise.
8939 (set_die_type): Likewise.
8941 2018-02-21 John Baldwin <jhb@FreeBSD.org>
8943 * arch/aarch64.c: Include "common-defs.h".
8944 * arch/amd64.c: Likewise.
8945 * arch/i386.c: Likewise.
8947 2018-02-21 Tom Tromey <tom@tromey.com>
8949 * value.h: (extract_field_op): Update.
8950 * eval.c (extract_field_op): Return a const char *.
8951 * expression.h (parse_expression_for_completion): Update.
8952 * completer.c (complete_expression): Update.
8953 (add_struct_fields): Make fieldname const.
8954 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
8955 (mark_completion_tag, parse_exp_in_context_1): Update.
8956 (parse_expression_for_completion): Change "name" to
8957 unique_xmalloc_ptr*.
8959 2018-02-21 Tom Tromey <tom@tromey.com>
8961 * infcall.c (call_function_by_hand_dummy): Use std::vector.
8963 2018-02-21 Yao Qi <yao.qi@linaro.org>
8965 * avr-tdep.c (avr_read_pc): Change parameter type to
8967 * gdbarch.sh (read_pc): Likewise.
8968 * gdbarch.c: Re-generated.
8969 * gdbarch.h: Re-generated.
8970 * hppa-tdep.c (hppa_read_pc): Change parameter type to
8972 * ia64-tdep.c (ia64_read_pc): Likewise.
8973 * mips-tdep.c (mips_read_pc): Likewise.
8974 * spu-tdep.c (spu_read_pc): Likewise.
8976 2018-02-21 Yao Qi <yao.qi@linaro.org>
8978 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
8979 * regcache-dump.c: New file.
8980 * regcache.c: Move register_dump to regcache-dump.c.
8981 (maintenance_print_registers): Likewise.
8982 (maintenance_print_raw_registers): Likewise.
8983 (maintenance_print_cooked_registers): Likewise.
8984 (maintenance_print_register_groups): Likewise.
8985 (maintenance_print_remote_registers): Likewise.
8986 (_initialize_regcache): Likewise.
8987 * regcache.h (register_dump): Moved from regcache.c.
8989 2018-02-21 Yao Qi <yao.qi@linaro.org>
8991 * regcache.c (regcache::regcache): Update.
8992 (regcache::invalidate): Move it to detached_regcache::invalidate.
8993 (get_thread_arch_aspace_regcache): Update.
8994 (regcache::raw_update): Update.
8995 (regcache::cooked_read): Remove some code.
8996 (regcache::cooked_read_value): Likewise.
8997 (regcache::raw_write): Remove assert on m_readonly_p.
8998 (regcache::raw_supply_integer): Move it to
8999 detached_regcache::raw_supply_integer.
9000 (regcache::raw_supply_zeroed): Likewise.
9001 * regcache.h (detached_regcache) <raw_supply_integer>: New
9003 <raw_supply_zeroed, invalidate>: Likewise.
9004 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9005 <invalidate>: Likewise.
9006 <m_readonly_p>: Removed.
9008 2018-02-21 Yao Qi <yao.qi@linaro.org>
9010 * infcmd.c (get_return_value): Let stop_regs point to
9011 get_current_regcache.
9012 * regcache.c (regcache::regcache): Remove.
9013 (register_dump_reg_buffer): New class.
9014 (regcache_print): Adjust.
9015 * regcache.h (regcache): Remove constructors.
9017 2018-02-21 Yao Qi <yao.qi@linaro.org>
9019 * regcache.c (class register_dump): New class.
9020 (register_dump_regcache, register_dump_none): New class.
9021 (register_dump_remote, register_dump_groups): New class.
9022 (regcache_print): Update.
9023 * regcache.h (regcache_dump_what): Move it to regcache.c.
9024 (regcache) <dump>: Remove.
9026 2018-02-21 Yao Qi <yao.qi@linaro.org>
9028 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9030 (jit_unwind_reg_set_impl): Call raw_supply.
9031 (jit_frame_sniffer): Use reg_buffer_rw.
9032 * record-full.c (record_full_core_regbuf): Change its type.
9033 (record_full_core_open_1): Use reg_buffer_rw.
9034 (record_full_close): Likewise.
9035 (record_full_core_fetch_registers): Use regcache->raw_supply.
9036 (record_full_core_store_registers): Likewise.
9037 * regcache.c (regcache::get_register_status): Move it to
9039 (regcache_raw_set_cached_value): Remove.
9040 (regcache::raw_set_cached_value): Remove.
9041 (regcache::raw_write): Call raw_supply.
9042 (regcache::raw_supply): Move it to reg_buffer_rw.
9043 * regcache.h (regcache_raw_set_cached_value): Remove.
9044 (reg_buffer_rw): New class.
9046 2018-02-21 Yao Qi <yao.qi@linaro.org>
9048 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9049 readonly_detached_regcache.
9050 (dummy_frame_prev_register): Use regcache->cooked_read.
9051 * frame.c (frame_save_as_regcache): Change return type.
9052 (frame_pop): Update.
9053 * frame.h (frame_save_as_regcache): Update declaration.
9054 * inferior.h (get_infcall_suspend_state_regcache): Update
9056 * infrun.c (infcall_suspend_state) <registers>: use
9057 readonly_detached_regcache.
9058 (save_infcall_suspend_state): Don't use regcache_dup.
9059 (get_infcall_suspend_state_regcache): Change return type.
9060 * linux-fork.c (struct fork_info) <savedregs>: Change to
9061 readonly_detached_regcache.
9063 (fork_save_infrun_state): Don't use regcache_dup.
9064 (info_checkpoints_command): Adjust.
9065 * mi/mi-main.c (register_changed_p): Update declaration.
9066 (mi_cmd_data_list_changed_registers): Use
9067 readonly_detached_regcache.
9068 (register_changed_p): Change parameter type to
9069 readonly_detached_regcache.
9070 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9071 readonly_detached_regcache.
9072 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9073 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9075 (regcache::save): Move it to reg_buffer.
9076 (regcache::restore): Change parameter type.
9077 (regcache_dup): Remove.
9078 * regcache.h (reg_buffer) <save>: New method.
9079 (readonly_detached_regcache): New class.
9080 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9081 readonly_detached_regcache.
9082 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9084 2018-02-21 Yao Qi <yao.qi@linaro.org>
9086 * frame.c (frame_save_as_regcache): Use regcache method save.
9087 (frame_pop): Use regcache method restore.
9088 * infrun.c (restore_infcall_suspend_state): Likewise.
9089 * linux-fork.c (fork_load_infrun_state): Likewise.
9090 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9092 * regcache.c (regcache_save): Remove.
9093 (regcache::restore): More asserts.
9094 (regcache_cpy): Remove.
9095 * regcache.h (regcache_save): Remove the declaration.
9096 (regcache::restore): Move from private to public.
9097 Remove the friend declaration of regcache_cpy.
9098 (regcache_cpy): Remove declaration.
9100 2018-02-21 Yao Qi <yao.qi@linaro.org>
9102 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9103 parameter type to 'readable_regcache *'.
9104 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9105 * arm-tdep.c (arm_neon_quad_read): Likewise.
9106 (arm_pseudo_read): Likewise.
9107 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9108 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9109 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9110 * gdbarch.c: Re-generated.
9111 * gdbarch.h: Re-generated.
9112 * gdbarch.sh (pseudo_register_read): Change parameter type to
9113 'readable_regcache *'.
9114 (pseudo_register_read_value): Likewise.
9115 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9116 (h8300_pseudo_register_read): Likewise.
9117 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9118 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9119 (i386_pseudo_register_read_into_value): Likewise.
9120 (i386_pseudo_register_read_value): Likewise.
9121 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9123 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9124 * m32c-tdep.c (m32c_raw_read): Likewise.
9125 (m32c_read_flg): Likewise.
9126 (m32c_banked_register): Likewise.
9127 (m32c_banked_read): Likewise.
9128 (m32c_sb_read): Likewise.
9129 (m32c_part_read): Likewise.
9130 (m32c_cat_read): Likewise.
9131 (m32c_r3r2r1r0_read): Likewise.
9132 (m32c_pseudo_register_read): Likewise.
9133 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9134 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9135 (mep_pseudo_cr64_read): Likewise.
9136 (mep_pseudo_register_read): Likewise.
9137 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9138 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9139 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9140 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9141 (regcache::cooked_read): Likewise.
9142 (regcache::cooked_read_value): Likewise.
9143 (regcache_cooked_read_signed):
9144 (regcache::cooked_read): Likewise.
9145 * regcache.h (readable_regcache): New class.
9146 (regcache): Inherit readable_regcache. Move some methods to
9148 * rl78-tdep.c (rl78_pseudo_register_read): Change
9149 parameter type to 'readable_regcache *'.
9150 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9151 (e500_pseudo_register_read): Change parameter type to
9152 'readable_regcache *'.
9153 (dfp_pseudo_register_read): Likewise.
9154 (vsx_pseudo_register_read): Likewise.
9155 (efpr_pseudo_register_read): Likewise.
9156 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9157 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9158 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9159 (sh64_pseudo_register_read): Likewise.
9160 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9161 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9162 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9163 (spu_pseudo_register_read): Likewise.
9164 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9165 (xtensa_pseudo_register_read): Likewise.
9167 2018-02-21 Yao Qi <yao.qi@linaro.org>
9169 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9170 (regcache::arch): Move it to reg_buffer::arch.
9171 (regcache::register_buffer): Likewise.
9172 (regcache::assert_regnum): Likewise.
9173 (regcache::num_raw_registers): Likewise.
9174 * regcache.h (reg_buffer): New class.
9175 (regcache): Inherit reg_buffer.
9177 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9179 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9180 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9182 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9184 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9186 2018-02-19 Alan Hayward <alan.hayward@arm.com>
9188 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9189 (SFILES): Remove common/*.c files.
9190 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9191 * common/common.host: Add common reference.
9192 * configure.ac: Likewise.
9193 * configure: Regenerate.
9195 2018-02-16 Yao Qi <yao.qi@linaro.org>
9197 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9198 (block_initialize_namespace): Use new.
9199 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9200 (dwarf2_free_objfile): Use delete.
9201 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9202 (copy_type_recursive): Use new.
9203 * gdb_obstack.h (allocate_on_obstack): New.
9205 2018-02-15 Yao Qi <yao.qi@linaro.org>
9208 * inferior.c (exit_inferior_1): Reset inf->control.
9210 2018-02-15 Joel Brobecker <brobecker@adacore.com>
9212 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9215 2018-02-14 Pedro Alves <palves@redhat.com>
9217 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9218 frame_cleanup_after_sniffer on exception.
9220 2018-02-14 Tom Tromey <tom@tromey.com>
9222 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9224 (solib_bfd_open): Make pathname const.
9225 * solib.c (solib_bfd_open): Make pathname const.
9226 * solib-spu.c (spu_bfd_fopen): Make name const.
9227 (spu_bfd_open): Make pathname const.
9228 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9229 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9231 2018-02-14 Tom Tromey <tom@tromey.com>
9233 * symfile.c (symfile_bfd_open): Update.
9234 * source.h (openp, source_full_path_of, find_and_open_source):
9235 Change argument type to unique_xmalloc_ptr.
9236 * source.c (openp): Take a unique_xmalloc_ptr.
9237 (source_full_path_of, find_and_open_source): Likewise.
9238 (open_source_file, symtab_to_fullname): Update.
9239 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9241 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9242 (exec_file_find): Update.
9243 * psymtab.c (psymtab_to_fullname): Update.
9244 * nto-tdep.h (nto_find_and_open_solib): Update.
9245 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9247 * exec.c (exec_file_attach): Update.
9248 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9249 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9251 2018-02-14 Tom Tromey <tom@tromey.com>
9253 * solib.c: Include source.h.
9254 * nto-tdep.c: Include source.h.
9255 * mi/mi-cmd-env.c: Include source.h.
9256 * infcmd.c: Include source.h.
9257 * exec.c: Include source.h.
9258 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9259 (add_path, directory_switch, source_path, init_source_path): Move
9261 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9262 (add_path, directory_switch, source_path, init_source_path):
9265 2018-02-14 Tom Tromey <tom@tromey.com>
9267 * solist.h (exec_file_find, solib_find): Return
9269 (solib_bfd_fopen): Take a const char *.
9270 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9271 (exec_file_find, solib_find): Likewise.
9272 (solib_bfd_fopen): Do not take ownership of "pathname".
9273 (solib_bfd_open): Use unique_xmalloc_ptr.
9274 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9275 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9276 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9277 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9279 2018-02-14 Joel Brobecker <brobecker@adacore.com>
9281 * ada-lang.c (name_match_type_from_name): Remove reference to
9282 ada_name_for_lookup in function's documentation.
9283 * ada-lang.h (ada_name_for_lookup): Delete declaration.
9285 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9287 * defs.h (enum openp_flags): New enum.
9288 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9289 Move to enum openp_flags.
9290 (openp_flags): New enum flags.
9291 (openp): Change parameter type to openp_flags.
9292 * source.c (openp): Change parameter type to openp_flags.
9293 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9294 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9296 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9298 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9301 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
9303 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9305 (class dwarf2_queue_guard): ...the destructor of this new class.
9306 (dw2_do_instantiate_symtab): Create instance of the new class
9307 dwarf2_queue_guard, remove cleanup.
9309 2018-02-09 Tom Tromey <tom@tromey.com>
9311 * source.c (find_source_lines): Don't reference past the end of
9314 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9316 * remote.c (remote_btrace_maybe_reopen): Change error message.
9317 * btrace.c (btrace_enable): Likewise.
9318 (parse_xml_btrace): Likewise.
9319 (parse_xml_btrace_conf): Likewise.
9321 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9323 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9324 (linux_enable_pt, linux_enable_bts): Call
9325 diagnose_perf_event_open_fail.
9327 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9329 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9330 Remove parameter and change return type. Update callers. Move it.
9331 (linux_enable_bts, linux_enable_pt): Improve error message.
9332 (linux_enable_pt): Remove zero buffer size check.
9333 (linux_enable_btrace): Improve error messages. Remove NULL return
9336 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9338 * btrace.c (btrace_enable): Remove target_supports_btrace call.
9339 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9340 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9341 (linux_supports_pt, linux_supports_btrace): Remove.
9342 (linux_enable_bts): Call cpu_supports_bts.
9343 * nat/linux-btrace.h (linux_supports_btrace): Remove.
9344 * remote.c (remote_supports_btrace): Remove.
9345 (init_remote_ops): Remove remote_supports_btrace.
9346 * target-delegates.c: Regenerated.
9347 * target.c (target_supports_btrace): Remove.
9348 * target.h (target_ops) <to_supports_btrace>: Remove
9349 (target_supports_btrace): Remove.
9350 * x86-linux-nat.c (x86_linux_create_target): Remove
9351 linux_supports_btrace.
9353 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9355 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9357 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9358 exception and use message in own exception.
9360 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9362 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9363 (perf_event_pt_event_type): Use gdb_file_up.
9364 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9365 scoped_fd, and scoped_mmap.
9367 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9369 * common/scoped_mmap.h: New.
9370 * unittests/scoped_mmap-selftest.c: New.
9371 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9372 unittests/scoped_mmap-selftest.c.
9374 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9376 * common/scoped_fd.h: New.
9377 * unittests/scoped_fd-selftest.c: New.
9378 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9379 unittests/scoped_fd-selftest.c.
9381 2018-02-09 Tom Tromey <tom@tromey.com>
9383 * auto-load.c (auto_load_section_scripts): Use
9384 gdb::unique_xmalloc_ptr.
9386 2018-02-09 Tom Tromey <tom@tromey.com>
9388 * auto-load.c (execute_script_contents): Use std::string.
9390 2018-02-09 Joel Brobecker <brobecker@adacore.com>
9392 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9393 Python function, rather than a new command.
9395 2018-02-08 Tom Tromey <tom@tromey.com>
9397 * solib.c (solib_find_1): Use std::string.
9398 (solib_bfd_fopen): Use unique_xmalloc_ptr.
9400 2018-02-08 Tom Tromey <tom@tromey.com>
9402 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9404 2018-02-08 Tom Tromey <tom@tromey.com>
9406 * source.c (find_source_lines): Use gdb::def_vector.
9408 2018-02-08 Tom Tromey <tom@tromey.com>
9410 * macrocmd.c (struct temporary_macro_definition): New.
9411 (macro_define_command): Use temporary_macro_definition. Remove
9413 (free_macro_definition_ptr): Remove.
9415 2018-02-08 Tom Tromey <tom@tromey.com>
9417 * macroexp.c (maybe_expand): Use std::string.
9419 2018-02-08 Tom Tromey <tom@tromey.com>
9421 * macroexp.c (struct macro_buffer): Add initializers for some
9423 (init_buffer, init_shared_buffer, free_buffer)
9424 (free_buffer_return_text): Remove.
9425 (macro_buffer): New constructors.
9426 (~macro_buffer): New destructor.
9427 (macro_buffer::set_shared): New method.
9428 (macro_buffer::resize_buffer, macro_buffer::appendc)
9429 (macro_buffer::appendmem): Now methods, not free functions.
9430 (set_token, append_tokens_without_splicing, stringify)
9431 (macro_stringify): Update.
9432 (gather_arguments): Change return type. Remove argc_p argument,
9433 add args_ptr argument. Use std::vector.
9434 (substitute_args): Remove argc argument. Accept std::vector.
9435 (expand): Update. Use std::vector.
9436 (scan, macro_expand, macro_expand_next): Update.
9438 2018-02-08 Tom Tromey <tom@tromey.com>
9440 * symtab.c (default_collect_symbol_completion_matches_break_on):
9441 Use unique_xmalloc_ptr.
9442 * macroscope.h: (sal_macro_scope, user_macro_scope)
9443 (default_macro_scope): Return unique_xmalloc_ptr.
9444 * macroscope.c (sal_macro_scope, user_macro_scope)
9445 (default_macro_scope): Return unique_xmalloc_ptr.
9446 * macroexp.h (macro_expand, macro_expand_once): Return
9448 * macroexp.c (macro_expand, macro_expand_once): Return
9450 * macrocmd.c (macro_expand_command, macro_expand_once_command)
9451 (info_macro_command, info_macros_command): Use
9453 * compile/compile-c-support.c (write_macro_definitions): Use
9455 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9457 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
9459 * value.c (value_static_field): Assign field type instead of
9460 containing type when returning an optimized out value.
9462 2018-02-06 Yao Qi <yao.qi@linaro.org>
9464 * ft32-tdep.c (ft32_read_pc): Remove.
9465 (ft32_write_pc): Remove.
9466 (ft32_gdbarch_init): Update.
9467 * m32r-tdep.c (m32r_read_pc): Remove.
9468 (m32r_gdbarch_init): Update.
9469 * mep-tdep.c (mep_read_pc): Remove.
9470 (mep_gdbarch_init): Update.
9471 * microblaze-tdep.c (microblaze_write_pc): Remove.
9472 (microblaze_gdbarch_init): Update.
9473 * mn10300-tdep.c (mn10300_read_pc): Remove.
9474 (mn10300_write_pc): Remove.
9475 (mn10300_gdbarch_init): Update.
9476 * moxie-tdep.c (moxie_read_pc): Remove.
9477 (moxie_write_pc): Remove.
9478 (moxie_gdbarch_init): Update.
9480 2018-02-06 Yao Qi <yao.qi@linaro.org>
9482 * expprint.c (print_subexp_standard): Handle
9483 OP_F77_UNDETERMINED_ARGLIST.
9484 (dump_subexp_body_standard): Likewise.
9486 2018-02-05 Alan Hayward <alan.hayward@arm.com>
9488 * target-descriptions.c (tdesc_element_visitor) Add empty
9490 (tdesc_type): Move make_gdb_type from here.
9491 (tdesc_type_builtin): Likewise.
9492 (tdesc_type_vector): Likewise.
9493 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9494 (make_gdb_type_struct): Move from tdesc_type_with_fields.
9495 (make_gdb_type_union): Likewise.
9496 (make_gdb_type_flags): Likewise.
9497 (make_gdb_type_enum): Likewise.
9498 (make_gdb_type): New function.
9499 (tdesc_register_type): Use static make_gdb_type.
9501 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
9503 * infcmd.c (default_print_one_register_info): Align natural-format
9504 column values consistently one under another.
9505 (pad_to_column): New function.
9507 2018-02-05 Joel Brobecker <brobecker@adacore.com>
9509 * dwarf2read.c (dwarf2_physname): Move commment.
9511 2018-02-01 Leszek Swirski <leszeks@google.com>
9513 * varobj.c (varobj_formatted_print_options): Allow recursive
9514 pretty printing if pretty printing is enabled.
9516 2018-02-01 Leszek Swirski <leszeks@google.com>
9518 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9519 names after a structop as a filename.
9521 2018-02-01 Yao Qi <yao.qi@linaro.org>
9523 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9524 (arm_record_coproc_data_proc): Likewise.
9526 2018-02-01 Yao Qi <yao.qi@linaro.org>
9528 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9530 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
9532 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9533 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9535 2018-01-31 Pedro Alves <palves@redhat.com>
9537 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9538 * inflow.c (child_terminal_save_inferior): Wrap reference to
9539 tcgetpgrp in HAVE_TERMIOS_H.
9540 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9542 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9543 always iterate over all inferiors.
9544 (gdbsim_cntrl_c): Adjust.
9545 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9547 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9549 * gdbtypes.c (lookup_array_range_type): Make sure the array's
9550 index type is objfile-owned if the element type is as well.
9552 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9556 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
9558 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9559 "features/s390x-linux64.c".
9560 (_initialize_s390_linux_tdep): Remove initialization of tdescs
9561 s390_linux32 and s390x_linux64.
9562 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9564 * s390-tdep.c: Include "features/s390-linux32.c" and
9565 "features/s390x-linux64.c".
9566 (s390_tdesc_valid): Add check for tdesc_has_registers.
9567 (s390_gdbarch_init): Make sure there is always a valid tdesc.
9568 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9569 tdesc_s390x_linux64.
9570 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9571 tdesc_s390x_linux64 to...
9572 * s390-tdep.h: ...here.
9574 2018-01-30 Pedro Alves <palves@redhat.com>
9577 * config.in, configure: Regenerate.
9578 * configure.ac: Check for getpgid.
9579 * go32-nat.c (go32_pass_ctrlc): New.
9580 (go32_target): Install it.
9581 * inf-child.c (inf_child_target): Install
9582 child_terminal_save_inferior, child_pass_ctrlc and
9584 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9585 (inf_ptrace_target): No longer install it.
9586 * infcmd.c (interrupt_target_1): Adjust.
9587 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9588 (child_interrupt): Declare.
9589 (inferior::terminal_state): New.
9590 * inflow.c (struct terminal_info): Update comments.
9591 (inferior_process_group): Delete.
9592 (terminal_is_ours): Delete.
9593 (gdb_tty_state): New.
9594 (child_terminal_init): Adjust.
9595 (is_gdb_terminal, sharing_input_terminal_1)
9596 (sharing_input_terminal): New functions.
9597 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
9598 Set the process's actual process group in the foreground if
9599 possible. Handle is_ours_for_output/is_ours distinction. Don't
9600 mark terminal as the inferior's if not sharing GDB's terminal.
9601 Don't check attach_flag.
9602 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9603 pass down a target_terminal_state.
9604 (child_terminal_save_inferior): New, factored out from ...
9605 (child_terminal_ours_1): ... this. Handle
9606 target_terminal_state::is_ours_for_output.
9607 (child_interrupt, child_pass_ctrlc): New.
9608 (inflow_inferior_exit): Clear the inferior's terminal_state.
9609 (copy_terminal_info): Copy the inferior's terminal state.
9610 (_initialize_inflow): Remove reference to terminal_is_ours.
9611 * inflow.h (inferior_process_group): Delete.
9612 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9613 * procfs.c (procfs_target): Don't install procfs_interrupt.
9614 (procfs_interrupt): Delete.
9615 * remote.c (remote_serial_quit_handler): Adjust.
9616 (remote_interrupt): Remove ptid parameter. Adjust.
9617 * target-delegates.c: Regenerate.
9618 * target.c: Include "terminal.h".
9619 (target_terminal::terminal_state): Rename to ...
9620 (target_terminal::m_terminal_state): ... this.
9621 (target_terminal::init): Adjust.
9622 (target_terminal::inferior): Adjust to per-inferior
9624 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
9625 (target_terminal::ours, target_terminal::ours_for_output): Use
9626 target_terminal_is_ours_kind.
9627 (target_interrupt): Remove ptid parameter. Adjust.
9628 (default_target_pass_ctrlc): Adjust.
9629 * target.h (target_ops::to_terminal_save_inferior): New field.
9630 (target_ops::to_interrupt): Remove ptid_t parameter.
9631 (target_interrupt): Remove ptid_t parameter. Update comment.
9632 (target_pass_ctrlc): Update comment.
9633 * target/target.h (target_terminal_state): New scoped enum,
9635 (target_terminal::terminal_state): ... here.
9636 (target_terminal::inferior): Update comments.
9637 (target_terminal::restore_inferior): New.
9638 (target_terminal::is_inferior, target_terminal::is_ours)
9639 (target_terminal::is_ours_for_output): Adjust.
9640 (target_terminal::scoped_restore_terminal_state): Adjust to
9641 rename, and call restore_inferior() instead of inferior().
9642 (target_terminal::scoped_restore_terminal_state::m_state): Change
9644 (target_terminal::terminal_state): Rename to ...
9645 (target_terminal::m_terminal_state): ... this and change type.
9647 2018-01-30 Pedro Alves <palves@redhat.com>
9649 * linux-nat.c (wait_for_signal): New function.
9650 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
9652 (async_terminal_is_ours)
9653 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
9654 (linux_nat_add_target): Don't override
9655 to_terminal_inferior/to_terminal_ours.
9657 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
9659 * remote.c (remote_follow_fork): Don't call "detach_inferior".
9661 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
9663 * dwarf2read.c (free_dwo_files): Add forward-declaration.
9664 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
9665 dwarf2_per_objfile_free here.
9666 (dwarf2_per_objfile_free): Remove.
9667 (_initialize_dwarf2_read): Don't register
9668 dwarf2_per_objfile_free as a registry cleanup.
9670 2018-01-27 Eli Zaretskii <eliz@gnu.org>
9672 Avoid compilation errors in MinGW native builds
9674 The error is triggered by including python-internal.h, and the
9677 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
9678 from build-gnulib/import/math.h:27,
9679 from d:/usr/Python26/include/pyport.h:235,
9680 from d:/usr/Python26/include/Python.h:58,
9681 from python/python-internal.h:94,
9682 from python/py-arch.c:24:
9683 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
9687 This happens because Python headers define 'hypot' to expand t
9688 '_hypot' in the Windows builds.
9689 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
9690 'hypoth'. This avoids a compilation error.
9692 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9694 * MAINTAINERS (Write After Approval): Fix ordering.
9696 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9698 * MAINTAINERS (Write After Approval): Add Alan Hayward.
9700 2018-01-26 Alan Modra <amodra@gmail.com>
9702 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
9703 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
9704 Remove nop. Make const. Comment.
9705 (powerpc32_plt_stub_so_2): New.
9706 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
9707 Correct count. Update uses.
9708 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
9709 Move common code reading PLT entry word. Correct
9710 powerpc32_plt_stub PLT address calculation.
9711 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
9712 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
9713 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
9714 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
9715 (ppc64_standard_linkage8): Likewise.
9716 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
9717 Correct insns description.
9718 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
9720 2018-01-24 Pedro Alves <palves@redhat.com>
9722 GCC PR libstdc++/83906
9723 * gdbtypes.c (operator==(const dynamic_prop &,
9724 const dynamic_prop &)): New.
9725 (operator==(const range_bounds &, const range_bounds &)): New.
9726 (check_types_equal): Use them instead of memcmp.
9727 * gdbtypes.h (operator==(const dynamic_prop &,
9728 const dynamic_prop &)): Declare.
9729 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
9730 (operator==(const range_bounds &, const range_bounds &)): Declare.
9731 (operator!=(const range_bounds &, const range_bounds &)): Declare.
9733 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9735 * s390-linux-tdep.c (s390_record_address_mask)
9736 (s390_record_calc_disp_common, s390_record_calc_disp)
9737 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9738 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9739 (s390_process_record): Move to s390-tdep.c.
9740 (s390_linux_init_abi_any): Adjust.
9741 * s390-tdep.c (s390_record_address_mask)
9742 (s390_record_calc_disp_common, s390_record_calc_disp)
9743 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9744 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9745 (s390_process_record): Moved from s390-linux-tdep.c
9746 (s390_gdbarch_init): Adjust.
9748 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9750 * s390-linux-nat.c (s390-tdep.h): New include.
9751 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
9752 (HFILES_NO_SRCDIR): Add s390-tdep.h.
9753 (ALLDEPFILES): Add s390-tdep.c.
9754 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
9755 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
9756 * s390-tdep.h: ...this. New file.
9757 * s390-linux-tdep.c (s390-tdep.h): New include.
9758 (_initialize_s390_tdep): Rename to...
9759 (_initialize_s390_linux_tdep): ...this and adjust.
9760 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
9761 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
9763 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
9764 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
9765 (s390_is_partial_instruction, s390_software_single_step)
9766 (is_non_branch_ril, s390_displaced_step_copy_insn)
9767 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
9768 (s390_prologue_data, s390_addr, s390_store, s390_load)
9769 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
9770 (s390_register_call_saved, s390_guess_tracepoint_registers)
9771 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
9772 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
9773 (s390_pseudo_register_name, s390_pseudo_register_type)
9774 (s390_pseudo_register_read, s390_pseudo_register_write)
9775 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
9776 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
9777 (s390_addr_bits_remove, s390_address_class_type_flags)
9778 (s390_address_class_type_flags_to_name)
9779 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
9780 (s390_function_arg_float, s390_function_arg_vector)
9781 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
9782 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
9783 (s390_frame_align, s390_register_return_value, s390_return_value)
9784 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
9785 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
9786 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
9787 (s390_trad_frame_prev_register, s390_unwind_cache)
9788 (s390_prologue_frame_unwind_cache)
9789 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
9790 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
9791 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
9792 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
9793 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
9794 (s390_frame_base_address, s390_local_base_address)
9795 (s390_frame_base, s390_gcc_target_options)
9796 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
9797 (s390_validate_reg_range, s390_tdesc_valid)
9798 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
9799 * s390-tdep.c: ...this. New file.
9801 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9803 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
9804 (s390_process_record, s390_gdbarch_tdep_alloc)
9805 (s390_linux_init_abi_any): Use/set new hook.
9807 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9809 * s390-linux-tdep.c (osabi.h): New include.
9810 (s390_linux_init_abi_31, s390_linux_init_abi_64)
9811 (s390_linux_init_abi_any): New functions.
9812 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
9814 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9816 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
9817 tdesc_has_registers check
9819 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9821 * s390-linux-tdep.c (s390_tdesc_valid): New function.
9822 (s390_validate_reg_range): New macro.
9823 (s390_gdbarch_init): Adjust.
9825 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9827 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
9828 (s390_gdbarch_tdep_alloc): Adjust.
9829 (s390_gdbarch_init): Adjust.
9831 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9833 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
9834 <have_tdb>: Change type to bool.
9835 (s390_gdbarch_tdep_alloc): Adjust.
9836 (s390_gdbarch_init): Adjust.
9838 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9840 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
9841 (gdbarch_tdep) <have_upper, have_vx>: New fields.
9842 (s390_gdbarch_tdep_alloc): New function.
9843 (s390_gdbarch_init): Allocate tdep at start and use its fields
9844 instead of separate variables.
9846 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9848 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
9849 when looking for cached gdbarch and add comment for remaining.
9851 2018-01-22 Pedro Alves <palves@redhat.com>
9852 Sergio Durigan Junior <sergiodj@redhat.com>
9854 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
9857 2018-01-22 Maciej W. Rozycki <macro@mips.com>
9859 * MAINTAINERS: Update my company e-mail address.
9861 2018-01-22 Yao Qi <yao.qi@linaro.org>
9863 * regcache.c (cooked_write_test): New function.
9864 (_initialize_regcache): Register the test.
9866 2018-01-22 Yao Qi <yao.qi@linaro.org>
9868 * ia64-tdep.c (ia64_pseudo_register_read): Call
9869 regcache->cooked_read instead of regcache_cooked_read_unsigned.
9870 * m32c-tdep.c (m32c_cat_read): Likewise.
9871 (m32c_r3r2r1r0_read): Likewise.
9872 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9873 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9875 2018-01-22 Yao Qi <yao.qi@linaro.org>
9877 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
9878 method raw_read instead of regcache_raw_read.
9879 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9880 * arm-tdep.c (arm_neon_quad_read): Likewise.
9881 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9882 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9883 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9884 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
9885 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9886 (i386_pseudo_register_read_into_value): Likewise.
9887 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9888 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9889 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9890 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
9891 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
9892 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9893 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9894 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9895 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
9897 2018-01-22 Yao Qi <yao.qi@linaro.org>
9899 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
9900 * configure.tgt: Remove target mt.
9901 * mt-tdep.c: Remove.
9902 * regcache.c (cooked_read_test): Remove the check for mt.
9904 2018-01-22 Yao Qi <yao.qi@linaro.org>
9906 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
9907 instead of gdbarch_pseudo_register_read_value.
9909 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9911 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
9914 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9916 * linespec.c (create_sals_line_offset): Remove code that preserved
9917 the symtab_and_line's line number.
9919 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9921 * varobj.c (varobj_create): Don't set valid_block when creating a
9924 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9926 * varobj.c (varobj_create): Remove out of date comment.
9928 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9931 * ada-exp.y (write_var_from_sym): Pass extra parameter when
9932 updating innermost block.
9933 * parse.c (innermost_block_tracker::update): Take extra type
9934 parameter, and check types match before updating innermost block.
9935 (write_dollar_variable): Update innermost block for registers.
9936 * parser-defs.h (enum innermost_block_tracker_type): New enum.
9937 (innermost_block_tracker::innermost_block_tracker): Initialise
9939 (innermost_block_tracker::reset): Take type parameter.
9940 (innermost_block_tracker::update): Take type parameter, and pass
9941 type through as needed.
9942 (innermost_block_tracker::m_types): New member.
9943 * varobj.c (varobj_create): Pass type when reseting innermost
9946 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9948 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
9949 * ada-lang.c (resolve_subexp): Likewise.
9950 * breakpoint.c (set_breakpoint_condition) Likewise.
9951 (watch_command_1) Likewise.
9952 * c-exp.y (variable): Likewise.
9953 * d-exp.y (PrimaryExpression): Likewise.
9954 * f-exp.y (variable): Likewise.
9955 * go-exp.y (variable): Likewise.
9956 * m2-exp.y (variable): Likewise.
9957 * objfiles.c (objfile::~objfile): Likewise.
9958 * p-exp.y (variable): Likewise.
9959 * parse.c (innermost_block): Change type.
9960 * parser-defs.h (class innermost_block_tracker): New.
9961 (innermost_block): Change to innermost_block_tracker.
9962 * printcmd.c (display_command): Switch to innermost_block API.
9963 (do_one_display): Likewise.
9964 * rust-exp.y (do_one_display): Likewise.
9965 * symfile.c (clear_symtab_users): Likewise.
9966 * varobj.c (varobj_create): Switch to innermost_block API, replace
9967 use of innermost_block with block stored on varobj object.
9969 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9971 * expression.h (innermost_block): Remove declaration.
9972 * varobj.c: Add 'parser-defs.h' include.
9974 2018-01-19 Tom Tromey <tom@tromey.com>
9976 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
9977 symbols in the static and global blocks.
9979 2018-01-19 James Clarke <jrtc27@jrtc27.com>
9981 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
9982 gdb_ptrace.h, and move including gdb_wait.h ...
9983 * nat/linux-ptrace.h: ... to here.
9985 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9987 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
9988 inf_ptrace_detach_success.
9989 (inf_ptrace_detach_success): Add inferior parameter, use it
9990 instead of inferior_ptid, pass it to detach_inferior.
9991 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
9993 * inferior.c (detach_inferior): Add overload that takes an
9995 * inferior.h (detach_inferior): Likewise.
9996 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
9997 use inferior_ptid, adjust call to inf_ptrace_detach_success.
9998 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10000 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10002 * target.h (struct target_ops) <to_detach>: Add inferior
10004 (target_detach): Likewise.
10005 * target.c (dispose_inferior): Pass inferior down.
10006 (target_detach): Pass inferior down. Assert that it is equal to
10007 the current inferior.
10008 * aix-thread.c (aix_thread_detach): Pass inferior down.
10009 * corefile.c (core_file_command): Pass current_inferior() down.
10010 * corelow.c (core_detach): Add inferior parameter.
10011 * darwin-nat.c (darwin_detach): Likewise.
10012 * gnu-nat.c (gnu_detach): Likewise.
10013 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10014 * infcmd.c (detach_command): Pass current_inferior() down to
10016 * infrun.c (follow_fork_inferior): Pass parent_inf to
10018 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10020 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10021 * linux-thread-db.c (thread_db_detach): Likewise.
10022 * nto-procfs.c (procfs_detach): Likewise.
10023 * procfs.c (procfs_detach): Likewise.
10024 * record.c (record_detach): Likewise.
10025 * record.h (struct inferior): Forward-declare.
10026 (record_detach): Add inferior parameter.
10027 * remote-sim.c (gdbsim_detach): Likewise.
10028 * remote.c (remote_detach_1): Likewise.
10029 (remote_detach): Likewise.
10030 (extended_remote_detach): Likewise.
10031 * sol-thread.c (sol_thread_detach): Likewise.
10032 * target-debug.h (target_debug_print_inferior_p): New macro.
10033 * target-delegates.c: Re-generate.
10034 * top.c (kill_or_detach): Pass inferior down to target_detach.
10035 * windows-nat.c (windows_detach): Add inferior parameter.
10037 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10039 * target.h (struct target_ops) <to_detach>: Remove args
10041 (target_detach): Likewise.
10042 * target.c (dispose_inferior): Adjust.
10043 (target_detach): Remove args parameter, adjust.
10044 * aix-thread.c (aix_thread_detach): Adjust.
10045 * corefile.c (core_file_command): Adjust.
10046 * corelow.c (core_detach): Adjust.
10047 * darwin-nat.c (darwin_detach): Adjust.
10048 * gnu-nat.c (gnu_detach): Adjust.
10049 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10050 * infcmd.c (detach_command): Adjust
10051 * infrun.c (follow_fork_inferior): Adjust.
10052 (handle_vfork_child_exec_or_exit): Adjust.
10053 * linux-fork.c (linux_fork_detach): Remove args parameter.
10054 * linux-fork.h (linux_fork_detach): Likewise.
10055 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10056 * linux-thread-db.c (thread_db_detach): Likewise.
10057 * nto-procfs.c (procfs_detach): Likewise.
10058 * procfs.c (procfs_detach): Likewise.
10059 (do_detach): Remove signo parameter.
10060 * record.c (record_detach): Remove args parameter.
10061 * record.h (record_detach): Likewise.
10062 * remote-sim.c (gdbsim_detach): Likewise.
10063 * remote.c (remote_detach_1): Likewise.
10064 (remote_detach): Likewise.
10065 (extended_remote_detach): Likewise.
10066 * sol-thread.c (sol_thread_detach): Likewise.
10067 * target-delegates.c: Re-generate.
10068 * top.c (struct qt_args) <args>: Remove field.
10069 (kill_or_detach): Don't pass args.
10070 (quit_force): Don't set args.
10071 * windows-nat.c (windows_detach): Remove args parameter.
10073 2018-01-19 Yao Qi <yao.qi@linaro.org>
10075 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10076 (arm_linux_init_abi): Install it.
10078 2018-01-19 Yao Qi <yao.qi@linaro.org>
10080 * osabi.c (gdb_osabi_names): Extend the regexp for
10081 arm-linux-gnueabihf.
10083 2018-01-18 Yao Qi <yao.qi@linaro.org>
10085 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10087 (abbrev_table::add_abbrev): Update.
10088 (abbrev_table::lookup_abbrev): Update.
10090 2018-01-18 Yao Qi <yao.qi@linaro.org>
10092 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10094 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10096 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10099 2018-01-17 Tom Tromey <tom@tromey.com>
10101 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10103 2018-01-17 Tom Tromey <tom@tromey.com>
10105 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10106 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10107 (create_array_type_with_stride): Update.
10108 * dwarf2read.c (set_die_type): Update.
10110 2018-01-17 Tom Tromey <tom@tromey.com>
10112 * dwarf2read.c (delayed_method_info): Remove typedef.
10113 (dwarf2_cu::method_info): Now a std::vector.
10114 (add_to_method_list): Update.
10115 (free_delayed_list): Remove.
10116 (compute_delayed_physnames): Update.
10117 (process_full_comp_unit, process_full_type_unit): Clear the method
10118 list. Remove cleanups.
10119 (psymtab_include_file_name): Add name_holder parameter. Use
10120 unique_xmalloc_ptr.
10121 (dwarf_decode_lines): Update.
10123 2018-01-17 Tom Tromey <tom@tromey.com>
10124 Simon Marchi <simon.marchi@ericsson.com>
10126 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10127 (dwarf2_per_objfile::free_cached_comp_units)
10128 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10129 (init_cutu_and_read_dies_no_follow): Update.
10130 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10131 (dwarf2_cu::~dwarf2_cu): New.
10132 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10133 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10135 2018-01-17 Tom Tromey <tom@tromey.com>
10136 Simon Marchi <simon.marchi@ericsson.com>
10138 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10139 (struct die_reader_specs) <abbrev_table>: New member.
10140 (struct abbrev_table): Add constructor.
10141 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10142 <abbrev_obstack>: Now an auto_obstack.
10143 (abbrev_table_up): New typedef.
10144 (init_cu_die_reader): Add abbrev_table parameter.
10145 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10146 Add result_dwo_abbrev_table.
10147 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10148 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10150 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10152 (skip_children): Update.
10153 (abbrev_table::alloc_abbrev): Rename from
10154 abbrev_table_alloc_abbrev.
10155 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10156 (abbrev_table::lookup_abbrev): Rename from
10157 abbrev_table_lookup_abbrev.
10158 (abbrev_table_read_table): Return abbrev_table_up.
10159 (abbrev_table_free, abbrev_table_free_cleanup)
10160 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10161 (load_partial_dies): Update.
10163 2018-01-17 Tom Tromey <tom@tromey.com>
10165 * dwarf2read.c (dwarf2_compute_name): Update comment.
10166 (read_func_scope, read_variable): Update.
10167 (new_symbol): Remove.
10168 (new_symbol_full): Rename to new_symbol.
10170 2018-01-17 Mike Gulick <mgulick@mathworks.com>
10173 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10174 a warning instead of throwing an error, set section size to 0 and return
10176 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10178 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10180 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10182 (linux_ptrace_attach_fail_reason_string): Likewise.
10183 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10185 (linux_ptrace_attach_fail_reason_string): Likewise.
10186 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10188 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10190 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10192 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10195 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10196 checking for fs_base/gs_base fields in struct user_regs_struct.
10197 * configure: Regenerate.
10199 2018-01-17 Yao Qi <yao.qi@linaro.org>
10201 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10203 (aarch64_linux_init_abi): Install it to gdbarch hook
10204 gcc_target_options.
10206 2018-01-15 Pedro Alves <palves@redhat.com>
10208 * common/signals-state-save-restore.c
10209 (save_original_signals_state): Fix typos.
10211 2017-01-12 Tom Tromey <tom@tromey.com>
10212 Sergio Durigan Junior <sergiodj@redhat.com>
10214 * Makefile.in (install-only): Install gdb-add-index.
10216 2018-01-12 John Baldwin <jhb@FreeBSD.org>
10218 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10220 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10222 * infrun.c (keep_going_pass_signal): Clear step-over info when
10223 insert_breakpoints fails.
10225 2018-01-11 Pedro Alves <palves@redhat.com>
10228 * infrun.c (resume): Rename to ...
10229 (resume_1): ... this.
10230 (resume): Reimplement as wrapper around resume_1.
10232 2018-01-11 Pedro Alves <palves@redhat.com>
10235 * remote.c (remote_parse_stop_reply): Default to the last-set
10236 general thread instead of to 'magic_null_ptid'.
10238 2018-01-10 Pedro Alves <palves@redhat.com>
10240 * language.h (language_get_symbol_name_matcher): Rename ...
10241 (get_symbol_name_matcher): ... this.
10242 * language.c (language_get_symbol_name_matcher): Ditto.
10243 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10246 2018-01-10 Pedro Alves <palves@redhat.com>
10250 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10251 Adjust to use language_get_symbol_name_matcher instead of
10252 language_defn::la_get_symbol_name_matcher.
10253 * language.c (language_get_symbol_name_matcher): If in Ada mode
10254 and the lookup name is a verbatim match, return Ada's matcher.
10255 * language.h (language_get_symbol_name_matcher): Adjust comment.
10256 (ada_lookup_name_info::verbatim_p):: New method.
10258 2018-01-10 Pedro Alves <palves@redhat.com>
10261 * ada-lang.c (ada_collect_symbol_completion_matches): If the
10262 minsym's language is language_auto or language_cplus, pass down
10263 language_ada instead.
10264 * symtab.c (compare_symbol_name): Don't frob symbol language here.
10266 2018-01-10 Pedro Alves <palves@redhat.com>
10269 * minsyms.c (linkage_name_str): New function.
10270 (iterate_over_minimal_symbols): Use it.
10272 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10274 * NEWS: Document that 'info proc' now works on FreeBSD.
10276 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10278 * configure.ac: Check for kinfo_getfile in libutil.
10279 * configure: Regenerate.
10280 * config.in: Regenerate.
10281 * fbsd-nat.c: Include "fbsd-tdep.h".
10282 (fbsd_fetch_cmdline): New.
10283 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10284 rather than calling error.
10285 (fbsd_info_proc): New.
10286 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10287 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10288 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10290 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10292 * fbsd-nat.c (struct free_deleter): Remove.
10293 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10295 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10297 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10298 NULL for an empty pathname.
10300 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10302 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10303 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10304 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10305 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10306 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10307 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10308 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10309 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10310 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10311 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10312 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10313 (fbsd_core_fetch_timeval, fbsd_print_sigset)
10314 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10315 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
10316 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10318 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
10320 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10321 (gnu_xfer_auxv): New function.
10322 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10323 TARGET_OBJECT_AUXV.
10325 2018-01-08 Yao Qi <yao.qi@linaro.org>
10326 Simon Marchi <simon.marchi@ericsson.com>
10328 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10330 (COMMON_OBS): Remove selftest.o.
10331 * configure.ac: Append selftest-arch.c and common/selftest.c to
10332 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
10333 * configure: Re-generated.
10334 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10336 (maintenance_info_selftests): Likewise.
10338 2018-01-08 Xavier Roirand <roirand@adacore.com>
10340 * ada-valprint.c (val_print_packed_array_elements): Use
10341 proper number of elements when printing an array indexed
10342 by an enumeration type.
10344 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10346 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10347 (dw2_get_file_names_reader): Adjust.
10348 (lookup_dwo_signatured_type): Adjust.
10349 (lookup_dwp_signatured_type): Adjust.
10350 (lookup_signatured_type): Adjust.
10351 (create_type_unit_group): Adjust.
10352 (get_type_unit_group): Adjust.
10353 (process_psymtab_comp_unit_reader): Adjust.
10354 (build_type_psymtabs_reader): Adjust.
10355 (scan_partial_symbols): Adjust.
10356 (add_partial_symbol): Adjust.
10357 (add_partial_subprogram): Adjust.
10358 (peek_die_abbrev): Adjust.
10359 (fixup_go_packaging): Adjust.
10360 (process_imported_unit_die): Adjust.
10361 (dwarf2_compute_name): Adjust.
10362 (dwarf2_physname): Adjust.
10363 (read_import_statement): Adjust.
10364 (handle_DW_AT_stmt_list): Adjust.
10365 (read_file_scope): Adjust.
10366 (read_func_scope): Adjust.
10367 (read_lexical_block_scope): Adjust.
10368 (read_call_site_scope): Adjust.
10369 (read_variable): Adjust.
10370 (dwarf2_rnglists_process): Adjust.
10371 (dwarf2_ranges_process): Adjust.
10372 (dwarf2_ranges_read): Adjust.
10373 (dwarf2_get_pc_bounds): Adjust.
10374 (dwarf2_record_block_ranges): Adjust.
10375 (dwarf2_add_field): Adjust.
10376 (dwarf2_add_member_fn): Adjust.
10377 (read_structure_type): Adjust.
10378 (process_structure_scope): Adjust.
10379 (read_enumeration_type): Adjust.
10380 (read_array_type): Adjust.
10381 (mark_common_block_symbol_computed): Adjust.
10382 (read_common_block): Adjust.
10383 (read_namespace_type): Adjust.
10384 (read_namespace): Adjust.
10385 (read_module_type): Adjust.
10386 (read_tag_pointer_type): Adjust.
10387 (read_tag_ptr_to_member_type): Adjust.
10388 (read_tag_string_type): Adjust.
10389 (read_subroutine_type): Adjust.
10390 (read_typedef): Adjust.
10391 (read_base_type): Adjust.
10392 (attr_to_dynamic_prop): Adjust.
10393 (read_subrange_type): Adjust.
10394 (read_unspecified_type): Adjust.
10395 (dwarf2_read_abbrevs): Adjust.
10396 (load_partial_dies): Adjust.
10397 (read_partial_die): Adjust.
10398 (find_partial_die): Adjust.
10399 (guess_partial_die_structure_name): Adjust.
10400 (fixup_partial_die): Adjust.
10401 (read_attribute_value): Adjust.
10402 (read_addr_index): Adjust.
10403 (read_addr_index_from_leb128): Adjust.
10404 (read_str_index): Adjust.
10405 (dwarf2_string_attr): Adjust.
10406 (get_debug_line_section): Adjust.
10407 (dwarf_decode_line_header): Adjust.
10408 (lnp_state_machine::check_line_address): Adjust.
10409 (dwarf_decode_lines_1): Adjust.
10410 (dwarf_decode_lines): Adjust.
10411 (dwarf2_start_symtab): Adjust.
10412 (var_decode_location): Adjust.
10413 (new_symbol_full): Adjust.
10414 (dwarf2_const_value_data): Adjust.
10415 (dwarf2_const_value_attr): Adjust.
10416 (dwarf2_const_value): Adjust.
10417 (die_type): Adjust.
10418 (die_containing_type): Adjust.
10419 (build_error_marker_type): Adjust.
10420 (lookup_die_type): Adjust.
10421 (guess_full_die_structure_name): Adjust.
10422 (anonymous_struct_prefix): Adjust.
10423 (determine_prefix): Adjust.
10424 (dwarf2_name): Adjust.
10425 (follow_die_ref_or_sig): Adjust.
10426 (follow_die_offset): Adjust.
10427 (follow_die_ref): Adjust.
10428 (follow_die_sig_1): Adjust.
10429 (follow_die_sig): Adjust.
10430 (get_signatured_type): Adjust.
10431 (get_DW_AT_signature_type): Adjust.
10432 (decode_locdesc): Adjust.
10433 (dwarf_decode_macros): Adjust.
10434 (cu_debug_loc_section): Adjust.
10435 (fill_in_loclist_baton): Adjust.
10436 (dwarf2_symbol_mark_computed): Adjust.
10437 (init_one_comp_unit): Don't assign
10438 dwarf2_cu::dwarf2_per_objfile.
10439 (set_die_type): Adjust.
10441 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10443 * dwarf2read.c (struct mapped_debug_names): Add constructor.
10444 <dwarf2_per_objfile>: New field.
10445 (dwarf2_per_objfile): Remove global.
10446 (get_dwarf2_per_objfile): New function.
10447 (set_dwarf2_per_objfile): New function.
10448 (dwarf2_build_psymtabs_hard): Change objfile parameter to
10449 dwarf2_per_objfile.
10450 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10451 (read_abbrev_offset): Likewise.
10452 (read_indirect_string): Likewise.
10453 (read_indirect_line_string): Likewise.
10454 (read_indirect_string_at_offset): Likewise.
10455 (read_indirect_string_from_dwz): Likewise.
10456 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10457 dwarf2_per_objfile.
10458 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10459 (create_all_comp_units): Change objfile parameter to
10460 dwarf2_per_objfile.
10461 (create_all_type_units): Likewise.
10462 (process_queue): Add dwarf2_per_objfile parameter.
10463 (read_and_check_comp_unit_head): Likewise.
10464 (lookup_dwo_unit_in_dwp): Likewise.
10465 (get_dwp_file): Likewise.
10466 (process_cu_includes): Likewise.
10467 (struct free_dwo_file_cleanup_data): New struct.
10468 (dwarf2_has_info): Use get_dwarf2_per_objfile and
10469 set_dwarf2_per_objfile.
10470 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10471 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10472 context, adjust calls.
10473 (dw2_instantiate_symtab): Likewise.
10474 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10475 (dw2_get_cu): Likewise.
10476 (create_cu_from_index_list): Change objfile parameter to
10477 dwarf2_per_objfile.
10478 (create_cus_from_index_list): Get dwarf2_per_objfile from
10479 context, adjust calls.
10480 (create_cus_from_index): Likewise.
10481 (create_signatured_type_table_from_index): Change objfile
10482 parameter to dwarf2_per_objfile.
10483 (create_signatured_type_table_from_debug_names): Change objfile
10484 parameter to dwarf2_per_objfile.
10485 (create_addrmap_from_index): Likewise.
10486 (create_addrmap_from_aranges): Likewise.
10487 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10488 (dw2_setup): Remove.
10489 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10491 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10492 get_dwarf2_per_objfile.
10493 (dw2_forget_cached_source_info): Likewise.
10494 (dw2_map_symtabs_matching_filename): Likewise.
10495 (struct dw2_symtab_iterator) <index>: Remove.
10496 <dwarf2_per_objfile>: New field.
10497 (dw2_symtab_iter_init): Replace index parameter with
10498 dwarf2_per_objfile.
10499 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10500 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10501 (dw2_print_stats): Likewise.
10502 (dw2_dump): Likewise.
10503 (dw2_expand_symtabs_for_function): Likewise.
10504 (dw2_expand_all_symtabs): Likewise.
10505 (dw2_expand_symtabs_with_fullname): Likewise.
10506 (dw2_expand_marked_cus): Replace index and objfile parameters
10507 with dwarf2_per_objfile.
10508 (dw_expand_symtabs_matching_file_matcher): Add
10509 dwarf2_per_objfile parameter and adjust calls.
10510 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10512 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10513 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10515 (create_cus_from_debug_names_list): Replace objfile parameter
10516 with dwarf2_per_objfile and adjust calls.
10517 (create_cus_from_debug_names): Likewise.
10518 (dwarf2_read_debug_names): Likewise.
10519 (mapped_debug_names::namei_to_name): Adjust call.
10520 (dw2_debug_names_iterator::next): Likewise.
10521 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10522 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10523 (dw2_debug_names_dump): Likewise.
10524 (dw2_debug_names_expand_symtabs_for_function): Likewise.
10525 (dw2_debug_names_expand_symtabs_matching): Likewise.
10526 (dwarf2_initialize_objfile): Likewise.
10527 (dwarf2_build_psymtabs): Likewise.
10528 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10530 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10531 (read_and_check_comp_unit_head): Likewise.
10532 (read_abbrev_offset): Likewise.
10533 (create_debug_type_hash_table): Likewise.
10534 (create_debug_types_hash_table): Likewise.
10535 (create_all_type_units): Replace objfile parameter with
10536 dwarf2_per_objfile.
10537 (add_type_unit): Add dwarf2_per_objfile parameter.
10538 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10539 with dwarf2_per_objfile.
10540 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10541 (lookup_dwp_signatured_type): Likewise.
10542 (lookup_signatured_type): Likewise.
10543 (read_cutu_die_from_dwo): Likewise.
10544 (init_tu_and_read_dwo_dies): Likewise.
10545 (init_cutu_and_read_dies): Likewise.
10546 (init_cutu_and_read_dies_no_follow): Likewise.
10547 (allocate_type_unit_groups_table): Add objfile parameter.
10548 (create_type_unit_group): Use dwarf2_per_objfile from cu.
10549 (get_type_unit_group): Likewise.
10550 (process_psymtab_comp_unit): Update call.
10551 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10552 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10553 (print_tu_stats): Likewise.
10554 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10555 in void* parameter.
10556 (build_type_psymtabs): Change objfile parameter to
10557 dwarf2_per_objfile.
10558 (process_skeletonless_type_unit): Use dwarf2_per_objfile
10559 passed in void* parameter.
10560 (process_skeletonless_type_units): Change objfile parameter to
10561 dwarf2_per_objfile.
10562 (set_partial_user): Likewise.
10563 (dwarf2_build_psymtabs_hard): Likewise.
10564 (read_comp_units_from_section): Likewise.
10565 (create_all_comp_units): Likewise.
10566 (scan_partial_symbols): Update calls.
10567 (add_partial_symbol): Likewise.
10568 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10569 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10570 (process_queue): Add dwarf2_per_objfile parameter.
10571 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10572 (compute_compunit_symtab_includes): Likewise.
10573 (process_cu_includes): Add dwarf2_per_objfile parameter.
10574 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10575 (process_full_type_unit): Likewise.
10576 (process_imported_unit_die): Update call.
10577 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10578 (read_file_scope): Likewise.
10579 (allocate_dwo_file_hash_table): Add objfile parameter.
10580 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10581 (create_cus_hash_table): Likewise.
10582 (create_dwp_hash_table): Likewise.
10583 (create_dwo_unit_in_dwp_v1): Likewise.
10584 (create_dwp_v2_section): Likewise.
10585 (create_dwo_unit_in_dwp_v2): Likewise.
10586 (lookup_dwo_unit_in_dwp): Likewise.
10587 (try_open_dwop_file): Likewise.
10588 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10589 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10590 cleanup to include a reference to dwarf2_per_objfile.
10591 (open_dwp_file): Add dwarf2_per_objfile parameter.
10592 (open_and_init_dwp_file): Likewise.
10593 (get_dwp_file): Likewise.
10594 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10595 (queue_and_load_all_dwo_tus): Update call.
10596 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10598 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10599 (dwarf2_ranges_process): Likewise.
10600 (dwarf2_get_pc_bounds): Likewise.
10601 (mark_common_block_symbol_computed): Likewise.
10602 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10603 (dwarf2_read_abbrevs): Update call.
10604 (read_partial_die): Use dwarf2_per_objfile from cu.
10605 (find_partial_die): Likewise.
10606 (fixup_partial_die): Likewise.
10607 (read_attribute_value): Likewise.
10608 (read_indirect_string_at_offset_from): Add objfile parameter.
10609 (read_indirect_string_at_offset): Add dwarf2_per_objfile
10611 (read_indirect_string_from_dwz): Add objfile parameter.
10612 (read_indirect_string): Add objfile parameter.
10613 (read_addr_index_1): Add dwarf2_per_objfile parameter.
10614 (read_addr_index): Use dwarf2_per_objfile from cu.
10615 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10617 (read_str_index): Use dwarf2_per_objfile from cu.
10618 (get_debug_line_section): Likewise.
10619 (read_formatted_entries): Add dwarf2_per_objfile parameter.
10620 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
10621 (new_symbol_full): Use dwarf2_per_objfile from cu.
10622 (build_error_marker_type): Likewise.
10623 (lookup_die_type): Likewise.
10624 (determine_prefix): Likewise.
10625 (follow_die_offset): Likewise.
10626 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
10627 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
10628 (dwarf2_fetch_die_type_sect_off): Likewise.
10629 (dwarf2_get_die_type): Likewise.
10630 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
10631 (get_signatured_type): Likewise.
10632 (get_DW_AT_signature_type): Likewise.
10633 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
10634 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
10635 (cu_debug_loc_section): Likewise.
10636 (fill_in_loclist_baton): Likewise.
10637 (dwarf2_symbol_mark_computed): Likewise.
10638 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10639 dwarf2_per_objfile.
10640 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
10642 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10643 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
10644 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
10645 (set_die_type): Use dwarf2_free_objfile from cu.
10646 (get_die_type_at_offset): Likewise.
10647 (dwarf2_per_objfile_free): Don't assign global variable.
10648 (debug_names) <constructor>: Add dwarf2_per_objfile
10649 parameter, update m_debugstrlookup construction.
10650 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
10652 <m_dwarf2_per_objfile>: New field.
10653 <lookup>: Use m_dwarf2_per_objfile.
10654 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
10655 (psyms_seen_size): Likewise.
10656 (write_gdbindex): Replace objfile parameter with
10657 dwarf2_per_objfile.
10658 (write_debug_names): Likewise.
10659 (write_psymtabs_to_index): Likewise.
10660 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
10663 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10665 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
10666 <dwarf2_per_objfile>: New field.
10667 (struct dwarf2_per_cu_data) <objfile>: Remove.
10668 <dwarf2_per_objfile>: New field.
10669 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
10671 (create_signatured_type_table_from_index): Likewise.
10672 (create_debug_type_hash_table): Likewise.
10673 (fill_in_sig_entry_from_dwo_entry): Likewise.
10674 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
10675 (create_type_unit_group): Assign dwarf2_per_objfile instead of
10677 (create_partial_symtab): Access objfile through
10678 dwarf2_per_objfile.
10679 (process_psymtab_comp_unit_reader): Likewise.
10680 (read_comp_units_from_section): Likewise.
10681 (scan_partial_symbols): Likewise.
10682 (add_partial_symbol): Likewise.
10683 (add_partial_subprogram): Likewise.
10684 (peek_die_abbrev): Likewise.
10685 (fixup_go_packaging): Likewise.
10686 (process_full_comp_unit): Likewise.
10687 (process_full_type_unit): Likewise.
10688 (process_imported_unit_die): Likewise.
10689 (dwarf2_compute_name): Likewise.
10690 (dwarf2_physname): Likewise.
10691 (read_import_statement): Likewise.
10692 (create_cus_hash_table): Assign dwarf2_physname instead of
10694 (read_func_scope): Access objfile through dwarf2_per_objfile.
10695 (read_lexical_block_scope): Likewise.
10696 (read_call_site_scope): Likewise.
10697 (read_variable): Likewise.
10698 (dwarf2_rnglists_process): Likewise.
10699 (dwarf2_ranges_process): Likewise.
10700 (dwarf2_ranges_read): Likewise.
10701 (dwarf2_record_block_ranges): Likewise.
10702 (dwarf2_add_field): Likewise.
10703 (dwarf2_add_member_fn): Likewise.
10704 (read_structure_type): Likewise.
10705 (process_structure_scope): Likewise.
10706 (read_enumeration_type): Likewise.
10707 (read_array_type): Likewise.
10708 (read_common_block): Likewise.
10709 (read_namespace_type): Likewise.
10710 (read_namespace): Likewise.
10711 (read_module_type): Likewise.
10712 (read_tag_pointer_type): Likewise.
10713 (read_tag_ptr_to_member_type): Likewise.
10714 (read_tag_string_type): Likewise.
10715 (read_subroutine_type): Likewise.
10716 (read_typedef): Likewise.
10717 (read_base_type): Likewise.
10718 (attr_to_dynamic_prop): Likewise.
10719 (read_subrange_type): Likewise.
10720 (read_unspecified_type): Likewise.
10721 (load_partial_dies): Likewise.
10722 (read_partial_die): Likewise.
10723 (find_partial_die): Likewise.
10724 (guess_partial_die_structure_name): Likewise.
10725 (fixup_partial_die): Likewise.
10726 (read_attribute_value): Likewise.
10727 (read_addr_index_from_leb128): Likewise.
10728 (dwarf2_read_addr_index): Likewise.
10729 (dwarf2_string_attr): Likewise.
10730 (lnp_state_machine::check_line_address): Likewise.
10731 (dwarf_decode_lines_1): Likewise.
10732 (dwarf_decode_lines): Likewise.
10733 (dwarf2_start_symtab): Likewise.
10734 (var_decode_location): Likewise.
10735 (new_symbol_full): Likewise.
10736 (dwarf2_const_value_data): Likewise.
10737 (dwarf2_const_value_attr): Likewise.
10738 (dwarf2_const_value): Likewise.
10739 (die_type): Likewise.
10740 (die_containing_type): Likewise.
10741 (lookup_die_type): Likewise.
10742 (guess_full_die_structure_name): Likewise.
10743 (anonymous_struct_prefix): Likewise.
10744 (dwarf2_name): Likewise.
10745 (follow_die_ref_or_sig): Likewise.
10746 (follow_die_offset): Likewise.
10747 (follow_die_ref): Likewise.
10748 (dwarf2_fetch_die_loc_sect_off): Likewise.
10749 (dwarf2_fetch_constant_bytes): Likewise.
10750 (dwarf2_fetch_die_type_sect_off): Likewise.
10751 (dwarf2_get_die_type): Likewise.
10752 (follow_die_sig): Likewise.
10753 (decode_locdesc): Likewise.
10754 (dwarf2_per_cu_objfile): Likewise.
10755 (dwarf2_per_cu_text_offset): Likewise.
10756 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
10758 (set_die_type): Access objfile through
10759 dwarf2_per_objfile.
10761 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10763 * valprint.c (converted_character_d): Remove typedef.
10764 (DEF_VEC_O (converted_character_d)): Remove.
10765 (count_next_character): Use std::vector.
10766 (print_converted_chars_to_obstack): Likewise.
10767 (generic_printstr): Likewise.
10769 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10771 * xml-support.h (struct gdb_xml_value): Add constructor.
10772 <value>: Change type to unique_xmalloc_ptr.
10773 (gdb_xml_value_s): Remove typedef.
10774 (DEF_VEC_O (gdb_xml_value_s)): Remove.
10775 (gdb_xml_element_start_handler): Change parameter type to
10777 (xml_find_attribute): Likewise.
10778 * xml-support.c (xml_find_attribute): Change parameter type to
10779 std::vector and adjust.
10780 (gdb_xml_values_cleanup): Remove.
10781 (gdb_xml_parser::start_element): Adjust to std::vector.
10782 (xinclude_start_include): Change paraeter type to std::vector
10784 * btrace.c (check_xml_btrace_version): Likewise.
10785 (parse_xml_btrace_block): Likewise.
10786 (parse_xml_btrace_pt_config_cpu): Likewise.
10787 (parse_xml_btrace_pt): Likewise.
10788 (parse_xml_btrace_conf_bts): Likewise.
10789 (parse_xml_btrace_conf_pt): Likewise.
10790 * memory-map.c (memory_map_start_memory): Likewise.
10791 (memory_map_start_property): Likewise.
10792 * osdata.c (osdata_start_osdata): Likewise.
10793 (osdata_start_item): Likewise.
10794 (osdata_start_column): Likewise.
10795 * remote.c (start_thread): Likewise.
10796 * solib-aix.c (library_list_start_library): Likewise.
10797 (library_list_start_list): Likewise.
10798 * solib-svr4.c (library_list_start_library): Likewise.
10799 (svr4_library_list_start_list): Likewise.
10800 * solib-target.c (library_list_start_segment): Likewise.
10801 (library_list_start_section): Likewise.
10802 (library_list_start_library): Likewise.
10803 (library_list_start_list): Likewise.
10804 * tracepoint.c (traceframe_info_start_memory): Likewise.
10805 (traceframe_info_start_tvar): Likewise.
10806 * xml-syscall.c (syscall_start_syscall): Likewise.
10807 * xml-tdesc.c (tdesc_start_target): Likewise.
10808 (tdesc_start_feature): Likewise.
10809 (tdesc_start_reg): Likewise.
10810 (tdesc_start_union): Likewise.
10811 (tdesc_start_struct): Likewise.
10812 (tdesc_start_flags): Likewise.
10813 (tdesc_start_enum): Likewise.
10814 (tdesc_start_field): Likewise.
10815 (tdesc_start_enum_value): Likewise.
10816 (tdesc_start_vector): Likewise.
10818 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10820 * extension.h (struct xmethod_worker) <clone>: Remove.
10821 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
10823 (python_xmethod_worker::clone): Remove.
10824 * valops.c (find_overload_match): Use std::move instead of
10827 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10829 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
10830 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
10831 <free_xmethod_worker_data>: Remove.
10832 <get_matching_xmethod_workers>: Chance VEC to std::vector.
10833 <get_xmethod_arg_types>: Remove.
10834 <get_xmethod_result_type>: Remove.
10835 <invoke_xmethod>: Remove.
10836 * extension.c (new_xmethod_worker): Remove.
10837 (clone_xmethod_worker): Remove.
10838 (get_matching_xmethod_workers): Return void, pass std::vector by
10840 (get_xmethod_arg_types): Rename to...
10841 (xmethod_worker::get_arg_types): ... this, and adjust.
10842 (get_xmethod_result_type): Rename to...
10843 (xmethod_worker::get_result_type): ... this, and adjust.
10844 (invoke_xmethod): Remove.
10845 (free_xmethod_worker): Remove.
10846 (free_xmethod_worker_vec): Remove.
10847 * extension.h (enum ext_lang_rc): Move here from
10849 (struct xmethod_worker): Add constructor and destructor.
10852 <invoke, clone, do_get_result_type, do_get_arg_types>: New
10853 virtual pure methods.
10854 <get_arg_types, get_result_type>: New methods.
10855 (xmethod_worker_ptr): Remove typedef.
10856 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
10857 (xmethod_worker_vec): Remove typedef.
10858 (xmethod_worker_up): New typedef.
10859 (invoke_xmethod): Remove.
10860 (clone_xmethod_worker): Remove.
10861 (free_xmethod_worker): Remove.
10862 (free_xmethod_worker_vec): Remove.
10863 (get_xmethod_arg_types): Remove.
10864 (get_xmethod_result_type): Remove.
10865 * valops.c (find_method_list): Use std::vector, don't use
10866 intermediate vector.
10867 (value_find_oload_method_list): Use std::vector.
10868 (find_overload_match): Use std::vector.
10869 (find_oload_champ): Use std::vector.
10870 * value.c (value_free): Use operator delete.
10871 (value_of_xmethod): Rename to...
10872 (value_from_xmethod): ... this. Don't assign
10873 xmethod_worker::value, take rvalue-reference.
10874 (result_type_of_xmethod): Adjust.
10875 (call_xmethod): Adjust.
10876 * value.h: Include extension.h.
10877 (struct xmethod_worker): Don't forward-declare.
10878 (value_of_xmethod): Rename to...
10879 (value_from_xmethod): ... this, take rvalue-reference.
10880 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
10881 (struct python_xmethod_worker): ... this, add constructor and
10883 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
10884 (gdbpy_free_xmethod_worker_data): Rename to...
10885 (python_xmethod_worker::~python_xmethod_worker): ... this and
10887 (gdbpy_clone_xmethod_worker_data): Rename to...
10888 (python_xmethod_worker::clone): ... this and adjust.
10889 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
10891 (gdbpy_get_xmethod_arg_types): Rename to...
10892 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
10893 (gdbpy_get_xmethod_result_type): Rename to...
10894 (python_xmethod_worker::do_get_result_type): ... this and
10896 (gdbpy_invoke_xmethod): Rename to...
10897 (python_xmethod_worker::invoke): ... this and adjust.
10898 (new_python_xmethod_worker): Rename to...
10899 (python_xmethod_worker::python_xmethod_worker): ... this and
10901 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
10903 (gdbpy_free_xmethod_worker_data): Remove.
10904 (gdbpy_get_matching_xmethod_workers): Use std::vector.
10905 (gdbpy_get_xmethod_arg_types): Remove.
10906 (gdbpy_get_xmethod_result_type): Remove.
10907 (gdbpy_invoke_xmethod): Remove.
10908 * python/python.c (python_extension_ops): Remove obsolete
10911 2018-01-05 Pedro Alves <palves@redhat.com>
10914 * common/signals-state-save-restore.c
10915 (save_original_signals_state): New parameter 'quiet'. Warn if we
10916 find a custom handler preinstalled, instead of internal erroring.
10917 But only warn if !quiet.
10918 * common/signals-state-save-restore.h
10919 (save_original_signals_state): New parameter 'quiet'.
10920 * main.c (captured_main_1): Move save_original_signals_state call
10921 after option handling, and pass QUIET.
10923 2018-01-05 Pedro Alves <palves@redhat.com>
10925 * spu-tdep.c (spu_catch_start): Pass
10926 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
10928 2018-01-05 Pedro Alves <palves@redhat.com>
10931 * ada-lang.c (literal_symbol_name_matcher): New function.
10932 (ada_get_symbol_name_matcher): Use it for
10933 symbol_name_match_type::SEARCH_NAME.
10934 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
10935 it down instead of assuming symbol_name_match_type::FULL.
10936 * block.h (block_lookup_symbol): New parameter 'match_type'.
10937 * c-valprint.c (print_unpacked_pointer): Use
10938 lookup_symbol_search_name instead of lookup_symbol.
10939 * compile/compile-object-load.c (get_out_value_type): Pass down
10940 symbol_name_match_type::SEARCH_NAME.
10941 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
10942 symbol_name_match_type::FULL.
10943 * cp-support.c (cp_get_symbol_name_matcher): Handle
10944 symbol_name_match_type::SEARCH_NAME.
10945 * infrun.c (insert_exception_resume_breakpoint): Use
10946 lookup_symbol_search_name.
10947 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
10948 * psymtab.c (maintenance_check_psymtabs): Use
10949 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
10950 * stack.c (print_frame_args): Use lookup_symbol_search_name and
10951 SYMBOL_SEARCH_NAME.
10952 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
10953 if symbol_name_match_type::SEARCH_NAME.
10954 (lookup_symbol_in_language): Pass down
10955 symbol_name_match_type::FULL.
10956 (lookup_symbol_search_name): New.
10957 (lookup_language_this): Pass down
10958 symbol_name_match_type::SEARCH_NAME.
10959 (lookup_symbol_aux, lookup_local_symbol): New parameter
10960 'match_type'. Pass it down.
10961 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
10962 (lookup_symbol_search_name): New declaration.
10963 (lookup_symbol_in_block): New 'match_type' parameter.
10965 2018-01-05 Pedro Alves <palves@redhat.com>
10968 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
10970 (ada_lookup_symbol): Reimplement in terms of
10971 ada_lookup_symbol_list, bits factored out from
10972 ada_lookup_encoded_symbol.
10974 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10976 * ada-exp.y (write_object_renaming): When subscripting an array
10977 using a symbol as the index, pass the block in call to
10978 ada_lookup_encoded_symbol when looking that symbol up.
10980 2018-01-05 Jerome Guitton <guitton@adacore.com>
10982 * ada-lang.c (ada_array_length): Use ada_index_type instead of
10985 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10987 * ada-lang.c (ada_to_fixed_value_create): Add handling of
10988 the case where VALUE_LVAL (val0) is not lval_memory.
10990 2018-01-05 Xavier Roirand <roirand@adacore.com>
10992 * ada-valprint.c (print_optional_low_bound): Handle
10993 character-indexed array printing like boolean-indexed array
10996 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10998 * NEWS: Create a new section for the next release branch.
10999 Rename the section of the current branch, now that it has
11002 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11004 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11005 * version.in: Bump version to 8.1.50.DATE-git.
11007 2018-01-03 Xavier Roirand <roirand@adacore.com>
11009 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11011 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11013 (default_exception_support_info) <catch_handlers_sym>: Add field.
11014 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11015 (ada_exception_name_addr_1): Add "catch handlers" handling.
11016 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11017 Update all callers.
11018 (create_excep_cond_exprs) <ex>: Add parameter.
11019 (re_set_exception): Update create_excep_cond_exprs call.
11020 (print_it_exception, print_one_exception, print_mention_exception)
11021 (print_recreate_exception): Add "catch handler" handling.
11022 (allocate_location_catch_handlers, re_set_catch_handlers)
11023 (check_status_catch_handlers, print_it_catch_handlers)
11024 (print_one_catch_handlers, print_mention_catch_handlers)
11025 (print_recreate_catch_handlers): New function.
11026 (catch_handlers_breakpoint_ops): New variable.
11027 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11028 Add parameter. Add "catch handler" handling.
11029 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11030 Add "catch handler" handling.
11031 (ada_exception_catchpoint_cond_string): Add "catch handler"
11033 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11035 (catch_ada_handlers_command): New function.
11036 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11037 operations structure.
11038 (_initialize_ada_language): Add "catch handlers" command entry.
11039 * NEWS: Document "catch handlers" feature.
11041 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11043 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11044 account when creating the array type of the slice.
11045 (ada_value_slice): Likewise.
11047 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11049 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11051 (create_array_type_with_stride): Add byte_stride_prop parameter.
11052 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11053 New parameter. Update all callers in this file.
11054 (array_type_has_dynamic_stride): New function.
11055 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11056 of arrays with dynamic byte strides.
11057 * dwarf2read.c (read_array_type): Add support for dynamic
11058 DW_AT_byte_stride attributes.
11060 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11062 * dwarf2read.c (read_unspecified_type): Treat
11063 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11065 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11067 Update copyright year range in all GDB files.
11069 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11071 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11072 and gdb/testsuite/gdb.base/step-line.c.
11074 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11076 * copyright.py (main): Dump the contents of
11077 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11078 even if BY_HAND is empty.
11080 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11082 * top.c (print_gdb_version): Update Copyright year in version
11085 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11087 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11089 For older changes see ChangeLog-2017.
11095 version-control: never