1 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3 * dwarf2read.c (read_gdb_index_from_section): Rename to...
4 (read_gdb_index_from_buffer): ... this. Remove section
5 parameter, add buffer parameter.
6 (get_gdb_index_contents_ftype,
7 get_gdb_index_contents_dwz_ftype): New typedefs.
8 (dwarf2_read_gdb_index): Add callback parameters to get the
10 (get_gdb_index_contents_from_section): New.
11 (dwarf2_initialize_objfile): Update call to
12 dwarf2_read_gdb_index.
14 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
16 * common/filestuff.h (gdb_fopen_cloexec): New overload.
17 (gdb_open_cloexec): Likewise.
18 * nat/linux-osdata.c (command_from_pid): Use string_printf.
19 (commandline_from_pid): Likewise.
20 (linux_xfer_osdata_threads): Likewise.
21 (linux_xfer_osdata_fds): Likewise.
22 * ada-lang.c (is_package_name): Likewise.
23 * auxv.c (procfs_xfer_auxv): Likewise.
24 * breakpoint.c (print_one_breakpoint_location): Use
26 (print_one_catch_solib): Use string_printf.
27 * coff-pe-read.c (add_pe_exported_sym): Likewise.
28 (add_pe_forwarded_sym): Likewise.
29 * dwarf2read.c (create_type_unit_group): Likewise.
30 (build_error_marker_type): Likewise.
31 * infcall.c (get_function_name): Likewise.
32 * valprint.c (print_converted_chars_to_obstack): Likewise.
33 * xtensa-tdep.c (xtensa_register_type): Likewise.
35 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
37 * remote.c (remote_target::download_tracepoint): Fix format
40 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
42 * tracefile.c: Include common/byte-vector.h.
43 (trace_save): Change type of buf to gdb::byte_vector. Initialize
44 with trace_regblock_size if needed. Update uses of buf.
46 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
48 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
49 std::vector<unsigned char>.
50 * tracepoint.c (collection_list::collection_list): Remove
51 m_regs_mask initializer from initializer list. Resize
52 m_regs_mask using the largest remote register number.
53 (collection_list::add_remote_register): Remove size check on
54 m_regs_mask. Use at to access element.
55 (collection_list::stringify): Change type of temp_buf to
56 gdb::char_vector. Update uses of temp_buf. Resize if needed to
57 stringify the register mask. Use pack_hex_byte for the register
60 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
62 * tracepoint.h (class collection_list) <add_register>: Remove.
63 <add_remote_register, add_ax_registers, add_local_register>:
65 <add_memrange>: Add scope parameter.
66 * tracepoint.c (encode_actions_1): Likewise.
67 (collection_list::add_register): Rename to ...
68 (collection_list::add_remote_register): ... this. Update
70 (collection_list::add_ax_registers, add_local_register): New
72 (collection_list::add_memrange): Add scope parameter. Call
73 add_local_register instead of add_register.
74 (finalize_tracepoint_aexpr): New function.
75 (collection_list::collect_symbol): Update calls to add_memrange.
76 Call add_local_register instead of add_register. Call
77 add_ax_registers. Call finalize_tracepoint_aexpr.
78 (encode_actions_1): Get remote regnos for $reg action. Call
79 add_remote_register, add_ax_registers, and add_local_register.
80 Update call to add_memrange. Call finalize_tracepoint_aexpr.
81 (validate_actionline): Call finalize_tracepoint_aexpr.
83 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
85 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
86 Replace array buf with gdb::char_vector buf, of size
87 get_remote_packet_size (). Replace references to buf and
88 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
89 and xsnprintf with snprintf. Raise errors if the buffer is too
92 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
94 * remote.c (remote_target::download_tracepoint): Fix the has_more
95 predicate in the QTDP action list iteration.
97 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
99 * remote.c (remote_target::download_tracepoint): Fix indentation
102 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
104 * proc-api.c (_initialize_proc_api): Remove c, unused.
105 * procfs.c (procfs_init_inferior): Remove signals, unused.
106 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
109 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
110 Andrew Burgess <andrew.burgess@embecosm.com>
112 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
113 'W_STOPCODE (0)' as this could be ambiguous.
115 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
117 * ser-tcp.c (net_open): Fix thinko when deciding whether to
118 disable TCP's Nagle algorithm (use "ai_protocol" instead of
121 2018-08-02 Tom Tromey <tom@tromey.com>
124 * dwarf2read.c (read_func_scope): Set symtab on template parameter
126 (process_structure_scope): Likewise.
128 2018-08-02 Xavier Roirand <roirand@adacore.com>
131 * darwin-nat.c (darwin_kill_inferior): Fix handling of
134 2018-08-02 Tom Tromey <tom@tromey.com>
136 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
137 (darwin_suspend_inferior, darwin_resume_inferior)
138 (darwin_decode_notify_message, darwin_resume_inferior_threads)
139 (darwin_check_new_threads): Check result of get_darwin_inferior.
141 2018-07-31 Joel Brobecker <brobecker@adacore.com>
145 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
147 * varobj.c (varobj_get_path_expr_parent): Report an error if
148 parent is a dynamic varobj.
150 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
152 * gnulib/aclocal.m4: Re-generate.
153 * gnulib/config.in: Re-generate.
154 * gnulib/configure: Re-generate.
155 * gnulib/import/Makefile.in: Re-generate.
156 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
157 * gnulib/import/m4/onceonly.m4: Re-generate.
159 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
161 * target-descriptions.c (struct xml_test_tdesc): New.
162 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
163 (record_xml_tdesc): Update.
164 (maintenance_check_xml_descriptions): Update.
165 * target-descriptions.h (record_xml_tdesc): Update comment.
167 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
169 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
170 checking array bounds are defined.
172 2018-07-30 Tom Tromey <tom@tromey.com>
174 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
175 irreflexivity violation.
177 2018-07-30 Tom Tromey <tom@tromey.com>
179 * cli/cli-decode.c (lookup_cmd): Remove lint code.
180 * value.c (unpack_long): Remove lint code.
181 * valops.c (value_ind): Remove lint code.
182 * valarith.c (value_x_binop, value_x_unop, value_equal)
183 (value_pos): Remove lint code.
185 2018-07-28 Tom de Vries <tdevries@suse.de>
187 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
188 with undefined upper bound as <optimized out>.
190 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
192 * gcore.in: Rename variable "name" to "prefix". Expand
195 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
197 * windows-nat.c (windows_nat_target::create_inferior): Update to
198 call close() in global namespace.
200 2018-07-26 Tom Tromey <tom@tromey.com>
202 * dwarf-index-write.c (add_address_entry): Don't add objfile
204 * dbxread.c (find_stab_function): Rename from
205 find_stab_function_addr. Return a bound_minimal_symbol.
206 (read_dbx_symtab): Use raw_text_low, raw_text_high.
207 Don't add objfile offsets.
208 (end_psymtab): Use raw_text_low, raw_text_high,
209 MSYMBOL_VALUE_RAW_ADDRESS.
210 (read_ofile_symtab): Update.
211 (process_one_symbol): Update.
212 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
214 (dw2_relocate): Remove.
215 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
217 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
219 (process_psymtab_comp_unit_reader, add_partial_symbol)
220 (add_partial_subprogram, dwarf2_ranges_read): Update.
221 (load_partial_dies): Update.
222 (add_address_entry): Don't add objfile offsets.
223 (dwarf2_build_include_psymtabs): Update.
224 (create_addrmap_from_aranges): Don't add objfile offsets.
225 (dw2_find_pc_sect_compunit_symtab): Update.
226 * mdebugread.c (parse_symbol): Don't add objfile offsets.
227 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
229 (parse_partial_symbols): Don't add objfile offsets. Use
230 raw_text_low, raw_text_high. Update.
231 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
232 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
233 or call 'relocate' quick function. Clear psymbol_map.
234 * psympriv.h (struct partial_symbol) <address>: Add section
236 <set_unrelocated_address>: Rename from set_address.
237 <raw_text_low, raw_text_high>: New methods.
238 <text_low, text_high>: Add objfile parameter.
239 (add_psymbol_to_bcache): Add 'section' parameter. Call
240 set_unrelocated_address.
241 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
242 (find_pc_psymbol): Update.
243 (fixup_psymbol_section, relocate_psymtabs): Remove.
244 (dump_psymtab, psym_functions): Update.
245 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
247 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
248 (start_psymtab_common): Update.
249 * symfile-debug.c (debug_qf_relocate): Remove.
250 (debug_sym_quick_functions): Update.
251 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
252 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
255 2018-07-26 Tom Tromey <tromey@redhat.com>
257 * dbxread.c (end_psymtab): Use text_high_valid and
259 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
260 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
261 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
263 <text_low_valid, text_high_valid>: New fields.
264 <set_text_low, set_text_high>: Update.
265 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
267 2018-07-26 Tom Tromey <tom@tromey.com>
269 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
271 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
272 textlow and texthigh fields.
273 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
275 * mdebugread.c (parse_lines, parse_partial_symbols)
276 (psymtab_to_symtab_1): Update.
277 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
278 Rename fields. Update comment. Now private.
279 <text_low, text_high, set_text_low, set_text_high>: New methods.
280 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
281 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
282 (start_psymtab_common, maintenance_info_psymtabs)
283 (maintenance_check_psymtabs): Update.
284 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
286 (scan_xcoff_symtab): Update.
288 2018-07-26 Tom Tromey <tromey@redhat.com>
290 * psympriv.h (struct partial_symbol) <unrelocated_address,
291 address, set_address>: New methods.
292 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
293 (fixup_psymbol_section, relocate_psymtabs): Update.
294 (print_partial_symbols): Add 'objfile' parameter. Update.
295 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
298 2018-07-26 Tom Tromey <tom@tromey.com>
300 * dwarf-index-write.c (write_psymbols, debug_names::insert)
301 (debug_names::write_psymbols): Update.
302 * psympriv.h (struct partial_symbol): Derive from
304 <obj_section>: New method.
305 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
306 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
307 (find_pc_sect_psymbol, fixup_psymbol_section)
308 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
309 (print_partial_symbols, recursively_search_psymtabs)
310 (compare_psymbols, psymbol_hash, psymbol_compare)
311 (add_psymbol_to_bcache, maintenance_check_psymtabs)
312 (psymbol_name_matches, psym_fill_psymbol_map): Update.
314 2018-07-26 Tom Tromey <tromey@redhat.com>
316 * dbxread.c (end_psymtab): Remove dead code.
318 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
320 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
321 DWARF unwinders are disabled.
322 * dwarf2-frame.c: Add dwarf2read.h include.
323 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
325 (dwarf2_frame_unwinders_enabled_p): Define.
326 (show_dwarf_unwinders_enabled_p): New function.
327 (_initialize_dwarf2_frame): Register switch to control DWARF
329 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
330 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
331 (show_dwarf_cmdlist): Remove static keyword.
332 * dwarf2read.h (set_dwarf_cmdlist): Declare.
333 (show_dwarf_cmdlist): Declare.
334 * NEWS: Document new feature.
336 2018-07-26 Tom de Vries <tdevries@suse.de>
339 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
341 2018-07-26 Tom de Vries <tdevries@suse.de>
343 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
344 DW_AT_count can't be translated to a dynamic prop.
346 2018-07-25 Tom de Vries <tdevries@suse.de>
348 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
351 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
353 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
355 2018-07-25 Joel Brobecker <brobecker@adacore.com>
357 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
359 2018-07-24 Keith Seitz <keiths@redhat.comt
362 * dwarf2read.c (dw2_add_symbol_to_list): New function.
363 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
364 instead of add_symbol_to_list.
365 (read_file_scope): Call prepare_one_comp_unit before reading
368 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
370 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
372 2018-07-24 Tom Tromey <tom@tromey.com>
374 * utils.c (malloc, realloc, free): Don't declare.
375 * configure, config.in: Rebuild.
376 * configure.ac: Don't check for declarations of free, malloc, or
379 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
381 * aarch64-linux-nat.c
382 (aarch64_linux_nat_target::stopped_data_address): Remove unused
384 * arm-linux-nat.c (fetch_regs): Likewise.
385 (store_regs): Likewise.
386 (fetch_vfp_regs): Likewise.
387 (store_vfp_regs): Likewise.
388 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
389 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
390 (arm_linux_nat_target::insert_watchpoint): Likewise.
391 (arm_linux_nat_target::remove_watchpoint): Likewise.
392 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
394 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
396 * ppc-linux-nat.c (fetch_register): Likewise.
397 (fetch_all_gp_regs): Likewise.
398 (fetch_ppc_registers): Likewise.
399 (store_all_gp_regs): Likewise.
400 (store_ppc_registers): Likewise.
401 (hwdebug_insert_point): Likewise.
402 (can_use_watchpoint_cond_accel): Likewise.
403 * remote-sim.c (gdb_os_write_stdout): Likewise.
405 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
406 Tom Tromey <tom@tromey.com>
408 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
410 * configure: Rebuild.
412 2018-07-22 Tom Tromey <tom@tromey.com>
414 * regformats/regdat.sh: Define xmltarget_${name} inside
415 #ifndef IN_PROCESS_AGENT.
417 2018-07-22 Tom Tromey <tom@tromey.com>
419 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
421 2018-07-22 Tom Tromey <tom@tromey.com>
423 * symfile.c (reread_symbols): Notify iter, not objfile.
425 2018-07-22 Tom Tromey <tom@tromey.com>
427 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
429 (ravenscar_thread_target::prepare_to_store): Likewise.
431 2018-07-22 Tom Tromey <tom@tromey.com>
433 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
434 unused variable. Call value_fetch_lazy when needed.
435 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
436 Remove unused variable. Call value_fetch_lazy when needed.
438 2018-07-22 Tom Tromey <tom@tromey.com>
440 * m32c-tdep.c (mark_dma): Return void.
441 (make_regs): Remove unused declarations.
443 2018-07-22 Tom Tromey <tom@tromey.com>
445 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
446 cmdscm_get_valid_command_smob_arg_unsafe for effect.
447 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
448 bkscm_get_valid_block_smob_arg_unsafe for effect.
450 2018-07-22 Tom Tromey <tom@tromey.com>
452 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
455 2018-07-22 Tom Tromey <tom@tromey.com>
457 * windows-nat.c (saved_context): Conditionally define.
458 * remote.c (remote_target::remote_btrace_maybe_reopen):
459 Conditionally declare "warned".
460 * inflow.c (sigquit_ours): Conditionally define.
461 (new_tty): Move "tty" declaration inside #if.
462 * guile/guile.c (guile_datadir): Conditionally define.
463 * charset.c (set_be_le_names): Move some declarations inside #if.
464 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
466 (parse_xml_btrace_conf): Likewise.
468 2018-07-22 Tom Tromey <tom@tromey.com>
470 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
472 2018-07-22 Tom Tromey <tom@tromey.com>
474 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
475 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
476 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
477 * buildsym-legacy.c (get_macro_table): Remove unused variable.
478 * stack.c (frame_apply_level_command): Remove unused variable.
479 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
480 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
481 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
483 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
484 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
485 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
487 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
488 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
490 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
491 Remove unused variable.
492 * cli/cli-script.c (recurse_read_control_structure): Remove unused
494 * common/tdesc.c (print_xml_feature::visit): Remove unused
496 * compile/compile-object-load.c (store_regs): Remove unused
498 * complaints.c (clear_complaints): Remove unused variable.
499 * corelow.c (core_target_open): Remove unused variable.
500 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
502 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
504 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
506 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
508 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
510 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
512 * ia64-tdep.c (examine_prologue): Remove unused variable.
513 * infcall.c (run_inferior_call): Remove unused variable.
514 * inferior.c (exit_inferior): Remove unused variable.
515 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
516 * linespec.c (decode_line_2): Remove unused variable.
517 * linux-nat.c (super_close): Remove.
518 * linux-tdep.c (linux_info_proc): Remove unused variable.
519 * mi/mi-main.c (mi_execute_command): Remove unused variable.
520 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
521 Remove unused variable.
522 * parse.c (find_minsym_type_and_address): Remove unused variable.
523 * printcmd.c (info_symbol_command, printf_floating): Remove unused
525 * python/py-breakpoint.c (bppy_set_commands): Remove unused
527 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
529 * record-btrace.c (record_btrace_target::store_registers): Remove
531 (cmd_show_record_btrace_cpu): Remove unused variable.
532 * riscv-tdep.c (riscv_register_reggroup_p)
533 (riscv_push_dummy_call, riscv_return_value): Remove unused
535 * rust-exp.y (literal): Remove unused variable.
536 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
538 <STRUCTOP_ANONYMOUS>: Likewise.
539 * s390-linux-tdep.c (s390_linux_init_abi_31)
540 (s390_linux_init_abi_64): Remove unused variable.
541 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
542 (file_select_thread, net_windows_open, _initialize_ser_windows):
543 Remove unused variables.
544 * symtab.c (find_pc_sect_line): Remove unused variable.
545 * target-memory.c (compute_garbled_blocks): Remove unused
547 (target_write_memory_blocks): Remove unused variable.
548 * target.c (target_stack::unpush): Remove unused variables.
549 * tracepoint.c (start_tracing, all_tracepoint_actions)
550 (merge_uploaded_trace_state_variables)
551 (print_one_static_tracepoint_marker): Remove unused variable.
552 * unittests/basic_string_view/element_access/char/1.cc (test01):
553 Remove unused variable.
554 * windows-nat.c (windows_continue, windows_add_all_dlls)
555 (do_initial_windows_stuff, windows_nat_target::create_inferior):
556 Remove unused variables.
558 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
560 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
561 attr_profile in HAVE_ELF.
562 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
565 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
567 * frame.c (frame_register_unwind): Change parameter name.
568 (frame_unwind_register): Likewise.
569 (frame_unwind_register_value): Likewise.
570 (frame_unwind_register_signed): Likewise.
571 (frame_unwind_register_unsigned): Likewise.
572 * frame.h (frame_register_unwind): Likewise.
573 (frame_unwind_register): Likewise.
574 (frame_unwind_register_value): Likewise.
575 (frame_unwind_register_signed): Likewise.
576 (frame_unwind_register_unsigned): Likewise.
577 (frame_unwind_arch): Likewise.
579 2018-07-20 Maciej W. Rozycki <macro@mips.com>
581 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
584 2018-07-20 Maciej W. Rozycki <macro@mips.com>
586 * mips-linux-nat.c (mips_linux_nat_target::read_description):
587 Call `get_ptrace_pid' rather than extracting the ptrace PID by
590 2018-07-20 Keith Seitz <keiths@redhat.com>
592 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
593 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
594 m_compunit_symtab, m_language>: Add "m_" prefix.
596 * buildsym.c: Update all uses.
598 2018-07-20 Tom Tromey <tom@tromey.com>
600 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
601 * buildsym.h (record_line_ftype): Remove typedef.
603 2018-07-20 Tom Tromey <tom@tromey.com>
605 * buildsym-legacy.h (augment_type_symtab): Don't declare.
606 (end_expandable_symtab): Likewise.
607 (end_symtab_get_static_block): Likewise.
608 (end_symtab_from_static_block): Likewise.
609 * buildsym-legacy.c (augment_type_symtab): Remove.
610 (end_expandable_symtab): Remove.
611 (end_symtab_get_static_block): Remove.
612 (end_symtab_from_static_block): Remove.
614 2018-07-20 Tom Tromey <tom@tromey.com>
616 * dwarf2read.c: Include buildsym.h.
617 (struct dwarf2_cu) <builder>: New method.
618 (fixup_go_packaging): Update.
619 (process_full_comp_unit, process_full_type_unit): Update. Don't
620 use scoped_free_pendings.
621 (using_directives): Add "cu" parameter, remove "language".
622 (read_import_statement, setup_type_unit_groups, )
623 (read_func_scope, read_lexical_block_scope)
624 (dwarf2_record_block_ranges, read_namespace): Update.
625 (lnp_state_machine::lnp_state_machine): Add cu parameter.
626 (lnp_state_machine::handle_end_sequence): Update.
627 (class lnp_state_machine) <m_cu>: New member.
628 <m_record_line_callback>: Remove.
629 <m_currently_recording_lines>: New member.
630 (lnp_state_machine::handle_set_file): Update.
631 (noop_record_line): Remove.
632 (dwarf_record_line_p): Add cu parameter.
633 (dwarf_record_line_1, dwarf_finish_line): Likewise.
634 (lnp_state_machine::record_line)
635 (lnp_state_machine::lnp_state_machine)
636 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
637 (dwarf_decode_lines): Update.
638 (dwarf2_start_subfile): Add cu parameter.
639 (dwarf2_start_symtab, new_symbol): Update.
640 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
641 Remove dwarf2_per_objfile parameter.
642 (dwarf_decode_macros): Update.
644 2018-07-20 Tom Tromey <tom@tromey.com>
646 * stabsread.c (define_symbol): Update.
647 * buildsym-legacy.h (get_buildsym_compunit): Declare.
648 * dwarf2read.c (new_symbol): Update.
649 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
650 * cp-namespace.c: Include buildsym.h.
651 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
652 * buildsym-legacy.c (get_buildsym_compunit): New function.
654 2018-07-20 Tom Tromey <tom@tromey.com>
656 * xcoffread.c: Include buildsym-legacy.h.
657 * windows-nat.c: Include buildsym-legacy.h.
658 * stabsread.c: Include buildsym-legacy.h.
659 * mdebugread.c: Include buildsym-legacy.h.
660 * buildsym-legacy.h: New file.
661 * buildsym-legacy.c: New file, from buildsym.c.
662 * go32-nat.c: Include buildsym-legacy.h.
663 * dwarf2read.c: Include buildsym-legacy.h.
664 * dbxread.c: Include buildsym-legacy.h.
665 * cp-namespace.c: Include buildsym-legacy.h.
666 * coffread.c: Include buildsym-legacy.h.
667 * buildsym.h: Move some contents to buildsym-legacy.h.
668 * buildsym.c: Include buildsym-legacy.h. Move many functions to
670 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
672 2018-07-20 Tom Tromey <tom@tromey.com>
674 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
675 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
676 (buildsym_compunit::buildsym_compunit)
677 (buildsym_compunit::~buildsym_compunit)
678 (buildsym_compunit::get_macro_table): Define.
680 2018-07-20 Tom Tromey <tom@tromey.com>
682 * buildsym.c (reset_symtab_globals): Remove.
683 (buildsym_compunit::end_symtab_from_static_block): Update.
684 (buildsym_compunit::augment_type_symtab): Update.
685 (end_symtab_from_static_block): Call free_buildsym_compunit.
686 (augment_type_symtab, end_symtab, end_expandable_symtab):
689 2018-07-20 Tom Tromey <tom@tromey.com>
691 * arch-utils.c: Do not include buildsym.h.
692 * mipsread.c: Do not include buildsym.h.
693 * machoread.c: Do not include buildsym.h.
694 * elfread.c: Do not include buildsym.h.
696 2018-07-20 Tom Tromey <tom@tromey.com>
698 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
700 (buildsym_compunit): Add new constructor.
701 (struct buildsym_compunit) <get_last_source_file, finish_block,
702 record_block_range, start_subfile, patch_subfile_names,
703 push_subfile, pop_subfile, record_line, get_compunit_symtab,
704 set_last_source_start_addr, get_last_source_start_addr,
705 get_local_using_directives, set_local_using_directives,
706 get_global_using_directives, outermost_context_p,
707 get_current_context_stack, get_context_stack_depth,
708 get_current_subfile, get_local_symbols, get_file_symbols,
709 get_global_symbols, record_debugformat, record_producer,
710 push_context, pop_context, end_symtab_get_static_block,
711 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
713 <record_pending_block, finish_block_internal, make_blockvector,
714 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
718 2018-05-22 Tom Tromey <tom@tromey.com>
720 * buildsym.c (record_pending_block): Move earlier. Remove objfile
722 (finish_block_internal): Update.
724 2018-07-20 Tom Tromey <tom@tromey.com>
726 * buildsym.c (record_pending_block): Move earlier. Remove objfile
728 (finish_block_internal): Update.
730 2018-07-20 Tom Tromey <tom@tromey.com>
732 * buildsym.h (EXTERN): Don't define or undef.
733 * buildsym.c (EXTERN): Don't define.
735 2018-07-20 Tom Tromey <tom@tromey.com>
737 * buildsym.c: Remove TODO comment.
739 2018-07-20 Tom Tromey <tom@tromey.com>
741 * coffread.c (coff_symtab_read): Update.
742 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
743 (xcoff_new_init): Update.
744 * mipsread.c (mipscoff_new_init): Update.
745 * mdebugread.c (mdebug_build_psymtabs): Update.
746 * elfread.c (elf_new_init): Update.
747 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
749 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
750 (coffstab_build_psymtabs, elfstab_build_psymtabs)
751 (stabsect_build_psymtabs): Update.
752 * buildsym.h (buildsym_init): Don't declare.
753 * buildsym.c: Update comment.
754 (prepare_for_building): Remove.
755 (start_symtab, restart_symtab): Update.
756 (reset_symtab_globals): Update comment.
757 (buildsym_init): Remove.
759 2018-07-20 Tom Tromey <tom@tromey.com>
761 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
762 * stabsread.c (patch_block_stabs, define_symbol, read_type)
763 (read_enum_type, common_block_start, common_block_end)
764 (cleanup_undefined_types_1, finish_global_stabs): Update.
765 * mdebugread.c (psymtab_to_symtab_1): Update.
766 * dwarf2read.c (fixup_go_packaging, read_func_scope)
767 (read_lexical_block_scope, new_symbol): Update.
768 * dbxread.c (process_one_symbol): Update.
769 * coffread.c (coff_symtab_read, process_coff_symbol)
770 (coff_read_enum_type): Update.
771 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
773 (get_local_symbols, get_file_symbols, get_global_symbols): New
775 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
777 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
778 (~scoped_free_pendings): Update.
779 (finish_block, prepare_for_building, reset_symtab_globals)
780 (end_symtab_get_static_block, end_symtab_with_blockvector)
781 (augment_type_symtab, push_context): Update.
782 (get_local_symbols, get_file_symbols, get_global_symbols): New
784 (buildsym_init): Update.
786 2018-07-20 Tom Tromey <tom@tromey.com>
788 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
789 (process_full_type_unit): Likewise.
790 (dwarf2_start_symtab): Set list_in_scope.
792 2018-07-20 Tom Tromey <tom@tromey.com>
794 * dwarf2read.c (process_psymtab_comp_unit_reader)
795 (build_type_psymtabs_reader): Do not set list_in_scope.
797 2018-07-20 Tom Tromey <tom@tromey.com>
799 * buildsym.c (free_pendings): Remove.
800 (add_symbol_to_list, scoped_free_pendings)
801 (finish_block_internal, buildsym_init): Update.
803 2018-07-20 Tom Tromey <tom@tromey.com>
805 * xcoffread.c (read_xcoff_symtab): Update.
806 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
808 * dbxread.c (process_one_symbol): Update.
809 * coffread.c (coff_symtab_read): Update.
810 * buildsym.h (finish_block): Update.
811 * buildsym.c (finish_block): Remove "listhead" argument.
812 (end_symtab_get_static_block): Update.
814 2018-07-20 Tom Tromey <tom@tromey.com>
816 * buildsym.h (class scoped_free_pendings): Remove constructor.
817 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
819 <m_pending_block_obstack, m_pending_blocks>: New members.
820 (pending_block_obstack, pending_blocks): Remove.
821 (scoped_free_pendings::scoped_free_pendings): Default.
822 (~scoped_free_pendings): Update.
823 (free_pending_blocks): Remove.
824 (finish_block_internal, record_pending_block, make_blockvector)
825 (end_symtab_get_static_block, augment_type_symtab, push_context)
826 (buildsym_init): Update.
828 2018-07-20 Tom Tromey <tom@tromey.com>
830 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
831 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
833 (pending_addrmap, pending_addrmap_obstack)
834 (pending_addrmap_interesting): Remove.
835 (scoped_free_pendings, record_block_range, make_blockvector)
836 (prepare_for_building, reset_symtab_globals, buildsym_init):
839 2018-07-20 Tom Tromey <tom@tromey.com>
841 * xcoffread.c (process_linenos): Update.
842 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
843 * mdebugread.c (psymtab_to_symtab_1): Update.
844 * dwarf2read.c (setup_type_unit_groups)
845 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
846 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
847 * dbxread.c (process_one_symbol): Update.
848 * coffread.c (coff_symtab_read, enter_linenos)
849 (process_coff_symbol): Update.
850 * buildsym.h (current_subfile): Don't declare.
851 (get_current_subfile): Declare.
852 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
854 (start_subfile, free_buildsym_compunit, push_subfile)
855 (prepare_for_building, start_symtab): Update.
856 (get_current_subfile): New function.
858 2018-07-20 Tom Tromey <tom@tromey.com>
860 * coffread.c (coff_symtab_read): Update.
861 * xcoffread.c (read_xcoff_symtab): Update.
862 * dwarf2read.c (new_symbol): Update.
863 (read_func_scope, read_lexical_block_scope): Update.
864 * dbxread.c (process_one_symbol): Update.
865 * buildsym.h (context_stack, context_stack_depth): Don't declare.
866 (outermost_context_p): Remove macro.
867 (outermost_context_p, get_current_context_stack)
868 (get_context_stack_depth): Declare.
869 (pop_context): Return struct context_stack.
870 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
872 (context_stack_size): Remove.
873 (INITIAL_CONTEXT_STACK_SIZE): Remove.
874 (prepare_for_building, end_symtab_get_static_block)
875 (augment_type_symtab, push_context): Update.
876 (pop_context): Return struct context_stack.
877 (outermost_context_p, get_current_context_stack)
878 (get_context_stack_depth): New functions.
879 (buildsym_init): Update.
881 2018-07-20 Tom Tromey <tom@tromey.com>
883 * rust-exp.y: Now a pure parser. Update all rules.
884 (%union): Move earlier.
885 (current_parser, work_obstack): Remove globals.
886 (rust_parser, ~rust_parser): Update.
887 (class rust_parser) <copy_name, concat3, crate_name, super_name,
888 lex_character, lex_number, lex_string, lex_identifier,
889 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
890 convert_name, convert_params_to_expression,
891 convert_ast_to_expression, ast_basic_type, ast_operation,
892 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
893 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
894 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
895 ast_array_type, ast_slice_type, ast_reference_type,
896 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
897 (rust_parse): Update.
898 (rustyyerror, rustyylex): Add parser parameter.
899 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
900 (rust_lex_stringish_test, rust_lex_test_sequence)
901 (rust_lex_test_trailing_dot, rust_lex_test_completion)
902 (rust_lex_test_push_back, rust_lex_tests): Update.
904 2018-07-19 Pedro Alves <palves@redhat.com>
906 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
907 gdb::unique_xmalloc_ptr.
908 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
909 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
910 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
912 * guile/scm-pretty-print.c (ppscm_print_children): Use
913 gdb::unique_xmalloc_ptr instead of cleanups.
914 (gdbscm_apply_val_pretty_printer): Remove cleanups.
915 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
916 gdb::unique_xmalloc_ptr.
917 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
918 Adjust to use gdb::unique_xmalloc_ptr.
919 * guile/scm-utils.c (extract_arg): Adjust.
920 * guile/scm-value.c (gdbscm_value_field): Adjust to use
921 gdb::unique_xmalloc_ptr instead of a cleanup.
923 2018-07-19 Tom Tromey <tom@tromey.com>
925 * utils.c (do_value_free_to_mark)
926 (make_cleanup_value_free_to_mark): Remove.
927 * utils.h (make_cleanup_value_free_to_mark): Remove.
929 2018-07-19 Pedro Alves <palves@redhat.com>
931 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
932 forwarding reference.
934 2018-07-18 Pedro Alves <palves@redhat.com>
936 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
937 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
940 2018-07-18 Pedro Alves <palves@redhat.com>
942 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
944 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
946 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
947 directly instead of a cleanup.
948 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
949 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
950 (vlscm_binop_gdbthrow): New, factored out from ...
951 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
952 (vlscm_rich_compare): Use gdbscm_wrap.
953 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
954 instead of a cleanup.
955 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
957 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
958 Use xfree directly instead of a cleanup.
959 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
960 Adjust to use gdbscm_wrap and scoped_value_mark.
961 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
962 (gdbscm_value_address, gdbscm_value_dereference)
963 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
965 (gdbscm_value_dynamic_type): Use scoped_value_mark.
966 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
968 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
969 gdbscm_wrap and scoped_value_mark.
970 (gdbscm_value_to_string): Use xfree directly instead of a
971 cleanup. Move 'buffer' unique_ptr to TRY scope.
972 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
973 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
975 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
976 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
978 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
981 2018-07-18 Tom de Vries <tdevries@suse.de>
983 * findvar.c (default_read_var_value): Also resolve dynamic type for
984 LOC_OPTIMIZED_OUT vars.
986 2018-07-18 Maciej W. Rozycki <macro@mips.com>
988 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
991 2018-07-17 Tom Tromey <tom@tromey.com>
993 * guile/scm-param.c (pascm_set_func, pascm_show_func)
994 (compute_enum_list, pascm_set_param_value_x)
995 (gdbscm_parameter_value): Update.
996 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
997 (gdbscm_scm_to_host_string): Update.
998 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1000 * guile/scm-cmd.c (cmdscm_add_completion): Update.
1001 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1002 * guile/scm-string.c (gdbscm_scm_to_string): Return
1004 (gdbscm_scm_to_host_string): Likewise.
1006 2018-07-17 Tom Tromey <tom@tromey.com>
1008 * guile/guile.c (gdbscm_eval_from_control_command): Update.
1009 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1010 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1011 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1014 2018-07-17 Tom Tromey <tom@tromey.com>
1016 * guile/scm-param.c (pascm_signal_setshow_error): Update.
1017 * guile/guile-internal.h (gdbscm_exception_message_to_string):
1019 * guile/scm-cmd.c (cmdscm_function): Update.
1020 * guile/scm-pretty-print.c
1021 (ppscm_print_exception_unless_memory_error): Update.
1022 * guile/scm-exception.c (gdbscm_exception_message_to_string):
1023 Return unique_xmalloc_ptr.
1025 2018-07-17 Tom Tromey <tom@tromey.com>
1027 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1030 2018-07-17 Jim Wilson <jimw@sifive.com>
1032 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1033 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
1034 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
1035 unecessary braces after EF_RISCV_RVC test. Delete call to
1036 set_gdbarch_decr_pc_after_break.
1038 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1039 RISCV_LAST_FP_REGNUM + 1.
1040 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1042 2018-07-17 Tom Tromey <tom@tromey.com>
1044 * configure.ac: Remove --disable-gdbcli.
1045 * configure: Rebuild.
1046 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1047 (SUBDIR_CLI_CFLAGS): Remove.
1048 (SFILES): Use SUBDIR_CLI_SRCS.
1049 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1051 2018-07-17 Tom Tromey <tom@tromey.com>
1054 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1056 2018-07-16 Jim Wilson <jimw@sifive.com>
1058 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1060 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1062 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1064 (libunwind_frame_sniffer): Likewise.
1065 (libunwind_frame_prev_register): Likewise.
1066 (libunwind_sigtramp_frame_sniffer): Likewise.
1067 * ia64-tdep.c (ia64_access_reg): Likewise.
1068 (ia64_access_rse_reg): Likewise.
1069 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1070 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1072 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1074 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1076 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1078 * remote-sim.c (gdbsim_target::close,
1079 gdbsim_target::mourn_inferior): Remove unused variables.
1081 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1083 * ia64-tdep.c (ktab_buf): New global.
1084 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1085 (get_kernel_table): Adjust.
1087 2018-07-16 Tom Tromey <tom@tromey.com>
1089 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1090 * dwarf2read.c (using_directives, new_symbol): Use
1091 outermost_context_p.
1092 * dbxread.c (process_one_symbol): Use outermost_context_p.
1093 * coffread.c (coff_symtab_read): Use outermost_context_p.
1095 2018-07-16 Tom Tromey <tom@tromey.com>
1097 * dwarf2read.c (using_directives, read_func_scope)
1098 (read_lexical_block_scope): Update.
1099 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1100 * buildsym.h (local_using_directives, global_using_directives):
1102 (get_local_using_directives, set_local_using_directives)
1103 (get_global_using_directives): Declare.
1104 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1105 m_global_using_directives>: New members.
1106 (finish_block_internal, prepare_for_building)
1107 (reset_symtab_globals, end_symtab_get_static_block)
1108 (push_context): Update.
1109 (get_local_using_directives, set_local_using_directives)
1110 (get_global_using_directives): New functions.
1111 (buildsym_init): Update.
1113 2018-07-16 Tom Tromey <tom@tromey.com>
1115 * xcoffread.c (xcoff_initial_scan): Don't call
1116 free_pending_blocks.
1117 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1118 * buildsym.h (class scoped_free_pendings): Add constructor.
1119 (free_pending_blocks): Don't declare.
1120 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1121 (free_pending_blocks): Now static.
1123 2018-07-16 Tom Tromey <tom@tromey.com>
1125 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1126 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1128 (struct subfile_stack): Remove.
1129 (subfile_stack): Remove.
1130 (push_subfile, pop_subfile, buildsym_init): Update.
1132 2018-07-16 Tom Tromey <tom@tromey.com>
1134 * buildsym.c (push_subfile): Use gdb_assert.
1135 (pop_subfile): Use gdb_assert.
1137 2018-07-16 Tom Tromey <tom@tromey.com>
1139 * buildsym.h (merge_symbol_lists): Remove.
1140 * buildsym.c (merge_symbol_lists): Remove.
1142 2018-07-16 Tom Tromey <tom@tromey.com>
1144 * stabsread.c (scan_file_globals): Update comment.
1145 * stabsread.h (scan_file_globals): Move from buildsym.h.
1146 * buildsym.h (scan_file_globals): Move to stabsread.h.
1148 2018-07-16 Tom Tromey <tom@tromey.com>
1150 * xcoffread.c (xcoff_new_init): Update.
1151 * mipsread.c (mipscoff_new_init): Update.
1152 * mdebugread.c (mdebug_build_psymtabs): Update.
1153 * elfread.c (elf_new_init): Update.
1154 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1155 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1156 * buildsym.h (buildsym_new_init): Don't declare.
1157 * buildsym.c (buildsym_new_init): Remove.
1159 2018-07-16 Tom Tromey <tom@tromey.com>
1161 * stabsread.h (within_function): Move from buildsym.h.
1162 * stabsread.c (start_stabs): Clear within_function.
1163 * coffread.c (coff_start_symtab): Clear within_function.
1164 * buildsym.h (within_function): Move to stabsread.h.
1165 * buildsym.c (prepare_for_building): Update.
1167 2018-07-16 Tom Tromey <tom@tromey.com>
1169 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1170 * dwarf2read.c (dwarf2_start_symtab): Don't set
1171 processing_gcc_compilation.
1172 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1174 2018-07-16 Tom Tromey <tom@tromey.com>
1176 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1177 (next_symbol_text_func): Move from buildsym.h.
1178 * stabsread.c (hashname): Move from buildsym.c.
1179 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1180 (next_symbol_text_func, hashname): Move to stabsread.h.
1181 * buildsym.c: Don't include bcache.h
1182 (hashname): Move to stasbread.c.
1184 2018-07-16 Tom Tromey <tom@tromey.com>
1186 * buildsym.h (context_stack_size): Don't declare.
1187 * buildsym.c (context_stack_size): New global.
1189 2018-07-16 Tom Tromey <tom@tromey.com>
1191 * dbxread.c (processing_acc_compilation): New global.
1192 * buildsym.h (processing_acc_compilation): Don't declare.
1194 2018-07-16 Tom Tromey <tom@tromey.com>
1196 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1197 * dbxread.c (read_ofile_symtab): Update.
1198 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1199 * buildsym.h (last_source_start_addr): Remove.
1200 (set_last_source_start_addr, get_last_source_start_addr):
1202 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1204 (struct buildsym_compunit) <m_last_source_start_addr>: New
1206 (prepare_for_building): Remove start_addr parameter.
1207 (start_symtab, restart_symtab, end_symtab_get_static_block)
1208 (end_symtab_with_blockvector): Update.
1209 (set_last_source_start_addr, get_last_source_start_addr): New
1212 2018-07-16 Tom Tromey <tom@tromey.com>
1214 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1216 (have_line_numbers): Remove.
1217 (record_line, prepare_for_building, end_symtab_get_static_block)
1218 (augment_type_symtab): Update.
1220 2018-07-16 Tom Tromey <tom@tromey.com>
1222 * buildsym.c (~buildsym_compunit): Free the macro table.
1223 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1225 <m_pending_macros>: New member.
1226 (pending_macros): Remove.
1227 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1228 (reset_symtab_globals, end_symtab_get_static_block)
1229 (end_symtab_with_blockvector, augment_type_symtab)
1230 (buildsym_init): Update.
1232 2018-07-16 Tom Tromey <tom@tromey.com>
1234 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1236 (buildsym_compunit::set_last_source_file): New method.
1237 <m_last_source_file>: New member.
1238 (prepare_for_building): Remove "name" parameter.
1239 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1240 (last_source_file): Remove.
1241 (set_last_source_file, get_last_source_file): Update.
1243 2018-07-16 Tom Tromey <tom@tromey.com>
1245 * buildsym.c (prepare_for_building): Add assert.
1247 2018-07-16 Tom Tromey <tom@tromey.com>
1249 * buildsym.c (~buildsym_compunit): Update.
1250 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1251 (start_subfile, patch_subfile_names)
1252 (end_symtab_with_blockvector): Update.
1254 2018-07-16 Tom Tromey <tom@tromey.com>
1256 * buildsym.c (struct buildsym_compunit): Add constructor,
1257 destructor, initializers.
1258 (start_buildsym_compunit): Remove.
1259 (free_buildsym_compunit): Use "delete".
1260 (start_symtab, restart_symtab): Use "new".
1262 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1264 * symfile.c (set_objfile_default_section_offset): Remove struct
1267 2018-07-14 Stafford Horne <shorne@gmail.com>
1269 * (Responsible Maintainers): Add myself as or1k maintainer.
1271 2018-07-13 Tom Tromey <tom@tromey.com>
1273 * symfile.c (set_objfile_default_section_offset): Use extra braces
1276 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1278 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1281 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1283 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1284 unittests/cli-utils-selftests.c
1285 * unittests/cli-utils-selftests.c: New file.
1287 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1289 * NEWS: Mention new commands. Mention change to 'thread apply'.
1291 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1293 * thread.c (thr_try_catch_cmd): New function.
1294 (thread_apply_all_command): Handle qcs flags.
1295 (thread_apply_command): Handle qcs flags.
1296 (taas_command): New function.
1297 (tfaas_command): New function.
1298 (_initialize_thread): Update to setup the new commands 'taas
1299 and 'tfaas'. Change doc string for 'thread apply'.
1301 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1303 * stack.c: (trailing_outermost_frame): New function, mostly
1304 extracted from backtrace_command_1.
1305 (leading_innermost_frame): New function.
1306 (backtrace_command_1): Update to call trailing_outermost_frame.
1307 (frame_apply_command_count): New function.
1308 (frame_apply_level_command): New function.
1309 (frame_apply_all_command): New function.
1310 (frame_apply_command): New function.
1311 (faas_command): New function.
1312 (frame_cmd_list): New variable.
1313 (_initialize_stack): Update to setup the new commands 'frame apply'
1316 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1318 * cli-utils.c (number_or_range_parser::get_number): Only handle
1319 numbers or convenience var as numbers.
1320 (parse_flags): New function.
1321 (parse_flags_qcs): New function.
1322 (number_or_range_parser::finished): Ensure parsing end is detected
1323 before end of string.
1324 * cli-utils.h (parse_flags): New function.
1325 (parse_flags_qcs): New function.
1326 (number_or_range_parser): Remove m_finished bool.
1327 (number_or_range_parser::skip_range): Set m_in_range to false.
1329 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
1331 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1334 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1335 Jan Kratochvil <jan.kratochvil@redhat.com>
1336 Paul Fertser <fercerpav@gmail.com>
1337 Tsutomu Seki <sekiriki@gmail.com>
1338 Pedro Alves <palves@redhat.com>
1340 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1341 'unittests/parse-connection-spec-selftests.c'.
1342 (COMMON_SFILES): Add 'common/netstuff.c'.
1343 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1344 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1345 * common/netstuff.c: New file.
1346 * common/netstuff.h: New file.
1347 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1348 (wait_for_connect): Update comment. New parameter
1349 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1350 Use 'sock' directly instead of 'scb->fd'.
1351 (try_connect): New function, with code from 'net_open'.
1352 (net_open): Rewrite main loop to deal with multiple
1353 sockets/addresses. Handle IPv6-style hostnames; implement
1354 support for IPv6 connections.
1355 * unittests/parse-connection-spec-selftests.c: New file.
1357 2018-07-11 Pedro Alves <palves@redhat.com>
1360 * remote.c (remote_target::remote_detach_pid): Call
1361 set_current_process.
1363 2018-07-11 Pedro Alves <palves@redhat.com>
1365 * h8300-tdep.c (h8300_gdbarch_init): Remove
1366 set_gdbarch_ecoff_reg_to_regnum calls.
1368 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1371 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1372 offsets/sizes for static members of a class/struct.
1374 2018-07-11 Alan Hayward <alan.hayward@arm.com>
1376 * target-descriptions.c (tdesc_register_bitsize): Rename.
1377 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1378 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1379 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1381 2018-07-10 Tom Tromey <tom@tromey.com>
1383 * breakpoint.c (moribund_locations): Now static and a
1385 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1386 (build_bpstat_chain, update_global_location_list)
1387 (breakpoint_retire_moribund): Update.
1388 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1391 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1393 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1394 (riscv_register_reggroup_p): Use new function, remove unneeded
1396 (riscv_push_dummy_call): Extend assert to compare against xlen or
1397 flen based on register type.
1399 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1401 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1403 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1405 * remote.c (show_hardware_watchpoint_limit): New function.
1406 (show_hardware_watchpoint_length_limit): New function.
1407 (show_hardware_breakpoint_limit): New function.
1408 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1409 where appropriate, update help text.
1411 2018-07-09 Tom Tromey <tom@tromey.com>
1413 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1414 (CLIBS): Don't mention NAT_CLIBS.
1416 2018-07-09 Tom Tromey <tom@tromey.com>
1418 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1419 (LIBGDB_OBS, clean mostlyclean): Update.
1420 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1422 2018-07-09 Tom Tromey <tom@tromey.com>
1424 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1425 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1426 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1428 2018-07-09 Tom Tromey <tom@tromey.com>
1430 * Makefile.in (ALLDEPFILES): Remove exec.c.
1431 (COMMON_OBS): Remove exec.o.
1432 (COMMON_SFILES): Add exec.c.
1434 2018-07-09 Tom Tromey <tom@tromey.com>
1436 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1438 2018-07-09 Tom Tromey <tom@tromey.com>
1440 * Makefile.in (clean mostlyclean): Remove stamp-version.
1441 (version.c): Depend on stamp-version.
1442 (stamp-version): New rule, from version.c rule.
1444 2018-07-09 Tom Tromey <tom@tromey.com>
1446 * Makefile.in (init.c): Depend on stamp-init.
1447 (stamp-init): New rule, from init.c rule.
1448 (clean mostlyclean): Remove stamp-init.
1450 2018-07-09 Tom Tromey <tom@tromey.com>
1452 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1453 SUBDIR_GCC_COMPILE_SRCS.
1455 2018-07-09 Tom Tromey <tom@tromey.com>
1457 * Makefile.in (init.c): Remove some unused sed rules.
1459 2018-07-09 Tom Tromey <tom@tromey.com>
1461 * Makefile.in (TSOBS): Remove.
1462 (INIT_FILES): Update.
1463 (LIBGDB_OBS): Update.
1464 (COMMON_SFILES): Add inflow.c.
1465 (SFILES): Remove inflow.c.
1467 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1469 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1471 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1473 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1474 get_saveloc_name, is_signal_frame_name, step_name,
1475 init_remote_name, create_addr_space_name,
1476 destroy_addr_space_name, search_unwind_table_name,
1477 find_dyn_list_name): Constify.
1479 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1481 * darwin-nat.c (darwin_pthread_kill): New function.
1482 (darwin_resume_thread): Use darwin_pthread_kill.
1484 2018-07-05 Tom de Vries <tdevries@suse.de>
1486 * macroexp.c (macro_buffer) <operator=>: New member function.
1488 2018-07-04 Tom Tromey <tom@tromey.com>
1490 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1492 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
1494 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1495 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1496 * maint.c: Likewise.
1499 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1501 * NEWS: Create a new section for the next release branch.
1502 Rename the section of the current branch, now that it has
1505 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1507 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1508 * version.in: Bump version to 8.2.50.DATE-git.
1510 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1511 Pedro Alves <palves@redhat.com>
1513 * linux-nat.c (linux_init_ptrace): Rename to ...
1514 (linux_init_ptrace_procfs): ... this. Call
1515 linux_proc_init_warnings.
1516 (linux_nat_target::post_attach)
1517 (linux_nat_target::post_startup_inferior): Adjust.
1518 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1519 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1521 2018-07-04 Tom de Vries <tdevries@suse.de>
1523 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1525 (read_comp_unit_head): ... here.
1527 2018-07-03 Tom Tromey <tom@tromey.com>
1529 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1530 (stop_tracing, tstatus_command)
1531 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1532 (print_one_static_tracepoint_marker): Update.
1533 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1535 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
1537 (all_tracepoints, static_tracepoints_here): Return std::vector.
1539 2018-07-03 Tom Tromey <tom@tromey.com>
1541 * common/ptid.c (ptid_equal): Remove.
1542 * common/ptid.h (ptid_equal): Don't declare.
1543 * ada-tasks.c: Update.
1544 * breakpoint.c: Update.
1545 * common/agent.c: Update.
1546 * corelow.c: Update.
1547 * darwin-nat-info.c: Update.
1548 * darwin-nat.c: Update.
1550 * dtrace-probe.c: Update.
1551 * dummy-frame.c: Update.
1552 * fbsd-nat.c: Update.
1554 * gdbthread.h: Update.
1555 * gnu-nat.c: Update.
1556 * go32-nat.c: Update.
1557 * inf-loop.c: Update.
1558 * inf-ptrace.c: Update.
1559 * infcall.c: Update.
1563 * linux-fork.c: Update.
1564 * linux-nat.c: Update.
1565 * linux-thread-db.c: Update.
1566 * mi/mi-cmd-var.c: Update.
1567 * mi/mi-interp.c: Update.
1568 * mi/mi-main.c: Update.
1569 * nto-procfs.c: Update.
1570 * ppc-linux-tdep.c: Update.
1572 * python/py-inferior.c: Update.
1573 * python/py-record-btrace.c: Update.
1574 * python/py-record.c: Update.
1575 * ravenscar-thread.c: Update.
1576 * regcache.c: Update.
1577 * remote-sim.c: Update.
1579 * sol-thread.c: Update.
1582 * tui/tui-stack.c: Update.
1584 * windows-nat.c: Update.
1585 * windows-tdep.c: Update.
1587 2018-07-03 Tom Tromey <tom@tromey.com>
1589 * common/ptid.c (ptid_match): Remove.
1590 * common/ptid.h (ptid_match): Don't declare.
1591 * fbsd-nat.c: Update.
1594 * linux-nat.c: Update.
1595 * record-btrace.c: Update.
1596 * regcache.c: Update.
1599 2018-07-03 Tom Tromey <tom@tromey.com>
1601 * common/ptid.c (ptid_tid_p): Remove.
1602 * common/ptid.h (ptid_tid_p): Don't declare.
1603 * sol-thread.c: Update.
1605 2018-07-03 Tom Tromey <tom@tromey.com>
1607 * common/ptid.c (ptid_lwp_p): Remove.
1608 * common/ptid.h (ptid_lwp_p): Don't declare.
1609 * fbsd-nat.c: Update.
1610 * linux-nat.c: Update.
1611 * nat/linux-procfs.c: Update.
1612 * nat/x86-linux-dregs.c: Update.
1613 * sol-thread.c: Update.
1615 2018-07-03 Tom Tromey <tom@tromey.com>
1617 * common/ptid.c (ptid_is_pid): Remove.
1618 * common/ptid.h (ptid_is_pid): Don't declare.
1620 * linux-nat.c: Update.
1621 * mi/mi-interp.c: Update.
1625 2018-07-03 Tom Tromey <tom@tromey.com>
1627 * common/ptid.c (ptid_get_tid): Remove.
1628 * common/ptid.h (ptid_get_tid): Don't declare.
1629 * ada-tasks.c: Update.
1630 * aix-thread.c: Update.
1631 * bsd-uthread.c: Update.
1632 * darwin-nat.c: Update.
1633 * fbsd-nat.c: Update.
1634 * i386-darwin-nat.c: Update.
1636 * linux-tdep.c: Update.
1637 * nto-procfs.c: Update.
1638 * ppc-ravenscar-thread.c: Update.
1639 * python/py-infthread.c: Update.
1640 * ravenscar-thread.c: Update.
1641 * sol-thread.c: Update.
1642 * sparc-ravenscar-thread.c: Update.
1643 * windows-nat.c: Update.
1645 2018-07-03 Tom Tromey <tom@tromey.com>
1647 * common/ptid.c (ptid_get_lwp): Remove.
1648 * common/ptid.h (ptid_get_lwp): Don't declare.
1649 * aarch64-linux-nat.c: Update.
1650 * ada-tasks.c: Update.
1651 * aix-thread.c: Update.
1652 * amd64-linux-nat.c: Update.
1653 * arm-linux-nat.c: Update.
1654 * corelow.c: Update.
1655 * fbsd-nat.c: Update.
1656 * fbsd-tdep.c: Update.
1657 * gnu-nat.c: Update.
1658 * i386-cygwin-tdep.c: Update.
1659 * i386-gnu-nat.c: Update.
1660 * i386-linux-nat.c: Update.
1661 * ia64-linux-nat.c: Update.
1662 * inf-ptrace.c: Update.
1664 * linux-fork.c: Update.
1665 * linux-nat.c: Update.
1666 * linux-tdep.c: Update.
1667 * linux-thread-db.c: Update.
1668 * mips-linux-nat.c: Update.
1669 * nat/aarch64-linux-hw-point.c: Update.
1670 * nat/aarch64-linux.c: Update.
1671 * nat/linux-btrace.c: Update.
1672 * nat/linux-osdata.c: Update.
1673 * nat/linux-procfs.c: Update.
1674 * nat/x86-linux-dregs.c: Update.
1675 * obsd-nat.c: Update.
1676 * ppc-fbsd-nat.c: Update.
1677 * ppc-linux-nat.c: Update.
1679 * python/py-infthread.c: Update.
1680 * ravenscar-thread.c: Update.
1682 * s390-linux-nat.c: Update.
1683 * sol-thread.c: Update.
1684 * sol2-tdep.c: Update.
1685 * spu-linux-nat.c: Update.
1686 * x86-linux-nat.c: Update.
1687 * xtensa-linux-nat.c: Update.
1689 2018-07-03 Tom Tromey <tom@tromey.com>
1691 * common/ptid.c (ptid_get_pid): Remove.
1692 * common/ptid.h (ptid_get_pid): Don't declare.
1693 * aarch64-linux-nat.c: Update.
1694 * ada-lang.c: Update.
1695 * aix-thread.c: Update.
1696 * alpha-bsd-nat.c: Update.
1697 * amd64-fbsd-nat.c: Update.
1698 * amd64-linux-nat.c: Update.
1699 * arm-linux-nat.c: Update.
1700 * arm-nbsd-nat.c: Update.
1702 * break-catch-syscall.c: Update.
1703 * breakpoint.c: Update.
1704 * bsd-uthread.c: Update.
1705 * corelow.c: Update.
1707 * darwin-nat.c: Update.
1708 * fbsd-nat.c: Update.
1709 * fbsd-tdep.c: Update.
1711 * gnu-nat.c: Update.
1712 * hppa-nbsd-nat.c: Update.
1713 * hppa-obsd-nat.c: Update.
1714 * i386-fbsd-nat.c: Update.
1715 * ia64-linux-nat.c: Update.
1716 * inf-ptrace.c: Update.
1718 * inferior.c: Update.
1719 * inferior.h: Update.
1722 * linux-fork.c: Update.
1723 * linux-nat.c: Update.
1724 * linux-tdep.c: Update.
1725 * linux-thread-db.c: Update.
1726 * m68k-bsd-nat.c: Update.
1727 * mi/mi-interp.c: Update.
1728 * mi/mi-main.c: Update.
1729 * mips-linux-nat.c: Update.
1730 * mips-nbsd-nat.c: Update.
1731 * mips64-obsd-nat.c: Update.
1732 * nat/aarch64-linux-hw-point.c: Update.
1733 * nat/aarch64-linux.c: Update.
1734 * nat/linux-btrace.c: Update.
1735 * nat/linux-osdata.c: Update.
1736 * nat/linux-procfs.c: Update.
1737 * nat/x86-linux-dregs.c: Update.
1738 * nto-procfs.c: Update.
1739 * obsd-nat.c: Update.
1740 * ppc-linux-nat.c: Update.
1741 * ppc-nbsd-nat.c: Update.
1742 * ppc-obsd-nat.c: Update.
1743 * proc-service.c: Update.
1745 * python/py-inferior.c: Update.
1746 * python/py-infthread.c: Update.
1747 * ravenscar-thread.c: Update.
1749 * remote-sim.c: Update.
1751 * rs6000-nat.c: Update.
1752 * s390-linux-nat.c: Update.
1753 * sh-nbsd-nat.c: Update.
1754 * sol-thread.c: Update.
1755 * sparc-nat.c: Update.
1756 * sparc64-tdep.c: Update.
1757 * spu-linux-nat.c: Update.
1758 * spu-tdep.c: Update.
1759 * target-debug.h: Update.
1762 * tid-parse.c: Update.
1763 * tracefile-tfile.c: Update.
1764 * vax-bsd-nat.c: Update.
1765 * windows-nat.c: Update.
1766 * x86-linux-nat.c: Update.
1767 * x86-nat.c: Update.
1769 2018-07-03 Tom Tromey <tom@tromey.com>
1771 * common/ptid.c (pid_to_ptid): Remove.
1772 * common/ptid.h (pid_to_ptid): Don't declare.
1773 * aix-thread.c: Update.
1774 * arm-linux-nat.c: Update.
1775 * common/ptid.c: Update.
1776 * common/ptid.h: Update.
1777 * corelow.c: Update.
1779 * darwin-nat.c: Update.
1780 * fbsd-nat.c: Update.
1781 * fork-child.c: Update.
1782 * gnu-nat.c: Update.
1783 * go32-nat.c: Update.
1784 * inf-ptrace.c: Update.
1786 * inferior.c: Update.
1788 * linux-fork.c: Update.
1789 * linux-nat.c: Update.
1790 * nat/aarch64-linux-hw-point.c: Update.
1791 * nat/fork-inferior.c: Update.
1792 * nat/x86-linux-dregs.c: Update.
1793 * nto-procfs.c: Update.
1794 * obsd-nat.c: Update.
1796 * progspace.c: Update.
1798 * rs6000-nat.c: Update.
1799 * s390-linux-nat.c: Update.
1800 * sol-thread.c: Update.
1801 * spu-linux-nat.c: Update.
1804 * tracefile-tfile.c: Update.
1805 * windows-nat.c: Update.
1807 2018-07-03 Tom Tromey <tom@tromey.com>
1809 * common/ptid.h (ptid_build): Don't declare.
1810 * common/ptid.c (ptid_build): Remove.
1811 * aix-thread.c: Update.
1812 * bsd-kvm.c: Update.
1813 * bsd-uthread.c: Update.
1814 * common/agent.c: Update.
1815 * common/ptid.c: Update.
1816 * common/ptid.h: Update.
1817 * corelow.c: Update.
1818 * darwin-nat.c: Update.
1819 * fbsd-nat.c: Update.
1820 * gnu-nat.c: Update.
1821 * linux-fork.c: Update.
1822 * linux-nat.c: Update.
1823 * linux-thread-db.c: Update.
1824 * nat/linux-osdata.c: Update.
1825 * nat/linux-procfs.c: Update.
1826 * nto-procfs.c: Update.
1827 * obsd-nat.c: Update.
1828 * proc-service.c: Update.
1830 * ravenscar-thread.c: Update.
1831 * remote-sim.c: Update.
1833 * sol-thread.c: Update.
1835 * windows-nat.c: Update.
1837 2018-07-03 Tom Tromey <tom@tromey.com>
1839 * infrun.c (follow_exec): Use exit_inferior_silent.
1840 * inferior.c (exit_inferior_num_silent): Remove.
1841 * inferior.h (exit_inferior_num_silent): Don't declare.
1843 2018-07-03 Tom Tromey <tom@tromey.com>
1846 * darwin-nat.c (darwin_attach_pid): Reset inferior and
1847 inferior_ptid on error.
1849 2018-07-02 Maciej W. Rozycki <macro@mips.com>
1850 Simon Marchi <simon.marchi@polymtl.ca>
1853 * disasm.h (gdb_disassembler): Add
1854 `m_disassembler_options_holder'. member
1855 * disasm.c (get_all_disassembler_options): New function.
1856 (gdb_disassembler::gdb_disassembler): Use it.
1857 (gdb_buffered_insn_length_init_dis): Likewise.
1858 (gdb_buffered_insn_length): Adjust accordingly.
1859 (set_disassembler_options): Handle options with arguments.
1860 (show_disassembler_options_sfunc): Likewise. Add a leading new
1861 line if showing options with descriptions.
1862 (disassembler_options_completer): Adapt to using the
1863 `disasm_options_and_args_t' structure.
1864 * mips-tdep.c (mips_disassembler_options): New variable.
1865 (mips_disassembler_options_o32): Likewise.
1866 (mips_disassembler_options_n32): Likewise.
1867 (mips_disassembler_options_n64): Likewise.
1868 (gdb_print_insn_mips): Don't set `disassembler_options'.
1869 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1871 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
1872 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
1873 `gdbarch_disassembler_options_implicit' and
1874 `gdbarch_valid_disassembler_options'.
1875 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
1876 `disasm_options_and_args_t' structure.
1877 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
1879 (valid_disassembler_options): Switch from `disasm_options_t' to
1880 the `disasm_options_and_args_t' structure.
1881 * NEWS: Document `set disassembler-options' support for the MIPS
1883 * gdbarch.h: Regenerate.
1884 * gdbarch.c: Regenerate.
1886 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
1888 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
1890 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1892 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
1893 parameter in call to amd64_target_description.
1894 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
1895 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
1896 (amd64fbsd_init_abi): Likewise.
1897 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
1898 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
1899 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
1900 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
1902 2018-06-29 Pedro Alves <palves@redhat.com>
1904 * gdb/amd64-tdep.h (amd64_create_target_description): Add
1905 "segments" parameter.
1906 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
1907 (_initialize_amd64_tdep): Update call to
1908 amd64_create_target_description.
1909 (amd64_target_description): Add "segments" parameter. Adjust
1910 the implementation to use it.
1911 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
1912 call to amd64_create_target_description.
1913 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
1914 * gdb/arch/amd64.h (amd64_create_target_description): Add
1915 "segments" register.
1916 * gdb/arch/amd64.c (amd64_create_target_description): Add
1917 "segments" parameter. Call create_feature_i386_64bit_segments
1918 only if SEGMENTS is true.
1919 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
1920 call to amd64_create_target_description.
1922 2018-06-29 Pedro Alves <palves@redhat.com>
1924 * thread.c (thread_target_id_str): New, factored out from ...
1925 (print_thread_info_1): ... here. Use it to compute the max
1926 "Target Id" column width.
1928 2018-06-29 Pedro Alves <palves@redhat.com>
1930 * remote.c (remote_target::extra_thread_info): Delete
1931 'display_buf' and 'n' locals. from the cache, regardless of
1932 packet mechanims is in use. Use cache for qThreadExtra and qP
1935 2018-06-29 Pedro Alves <palves@redhat.com>
1937 * blockframe.c (find_pc_sect_containing_function): New function.
1938 * breakpoint.c (print_breakpoint_location): Don't call
1939 find_pc_sect_function.
1940 * linespec.c (create_sals_line_offset): Record the location's
1942 * linespec.c (convert_address_location_to_sals): Fill in sal's
1943 symbol with find_pc_sect_containing_function.
1944 * symtab.c (find_function_start_sal): Rename to ...
1945 (find_function_start_sal_1): ... this.
1946 (find_function_start_sal): Reimplement as wrapper around
1947 find_function_start_sal_1, and use
1948 find_pc_sect_containing_function to fill in the sal's symbol.
1949 (find_function_start_sal(symbol*, bool)): Adjust.
1950 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
1952 (find_pc_sect_containing_function): Declare.
1954 2018-06-29 Pedro Alves <palves@redhat.com>
1956 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
1957 true if the the location has no symbol.
1959 2018-06-28 Tom Tromey <tom@tromey.com>
1961 * NEWS: Mention --enable-codesign.
1962 * silent-rules.mk (ECHO_SIGN): New variable.
1963 * configure.ac: Add --enable-codesign.
1964 * configure: Rebuild.
1965 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
1966 (gdb$(EXEEXT)): Optionally invoke codesign.
1968 2018-06-28 Pedro Alves <palves@redhat.com>
1970 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
1972 (switch_to_thread_no_regs): Adjust comment.
1973 * infcmd.c (stop_pc): Delete.
1974 (post_create_inferior, info_program_command): Replace references
1975 to stop_pc with references to thread_info->suspend.stop_pc.
1976 * inferior.h (stop_pc): Delete declaration.
1977 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
1978 (handle_inferior_event_1, handle_signal_stop)
1979 (process_event_stop_test, keep_going_stepped_thread)
1980 (handle_step_into_function, handle_step_into_function_backward)
1981 (print_stop_location): Replace references to stop_pc with
1982 references to thread_info->suspend.stop_pc.
1983 (struct infcall_suspend_state) <stop_pc>: Delete field.
1984 (save_infcall_suspend_state, restore_infcall_suspend_state):
1985 Remove references to inf_stat->stop_pc.
1986 * linux-fork.c (fork_load_infrun_state): Likewise.
1987 * record-btrace.c (record_btrace_set_replay): Likewise.
1988 * record-full.c (record_full_goto_entry): Likewise.
1989 * remote.c (print_one_stopped_thread): Likewise.
1990 * target.c (target_resume): Extend comment.
1991 * thread.c (set_executing_thread): New.
1992 (set_executing): Use it.
1993 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
1994 Remove references to stop_pc.
1996 2018-06-28 Pedro Alves <palves@redhat.com>
1998 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
1999 Moving fetching stop_pc until after ecs->event_thread is refreshed.
2001 2018-06-28 Tom Tromey <tom@tromey.com>
2003 * coffread.c (coff_symfile_finish): Update.
2004 * xcoffread.c (xcoff_symfile_finish): Update.
2005 * elfread.c (elf_symfile_finish): Update.
2006 * symfile.h (dwarf2_free_objfile): Don't declare.
2007 * dwarf2read.c (_initialize_dwarf2_read): Use
2008 register_objfile_data_with_cleanup.
2009 (dwarf2_free_objfile): Now static. Change signature.
2011 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2013 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2014 option "-o" to add-symbol-file-load to add an offset to each
2015 section's load address.
2016 * symfile.c (set_objfile_default_section_offset): New function.
2018 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2020 * symfile.c (add_symbol_file_command): Make sure that sections
2021 with the same name are sorted in the same order.
2023 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2025 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2026 require the second argument. If omitted, load sections at the
2027 addresses specified in the file.
2029 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2031 * symfile.c (symbol_file_command, symbol_file_add_main_1)
2032 (_initialize_symfile): Add option "-o" to symbol-file to add an
2033 offset to each section of the symbol file.
2035 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2037 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2039 2018-06-27 Tom Tromey <tom@tromey.com>
2041 * stack.c (_initialize_stack): Update "func" help text.
2043 2018-06-27 Tom Tromey <tom@tromey.com>
2045 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2047 (unwind_infopy_str, pyuw_create_unwind_info)
2048 (unwind_infopy_add_saved_register, pyuw_sniffer)
2049 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2051 (struct saved_reg): Add constructor.
2052 <value>: Now a gdbpy_ref<>.
2054 2018-06-27 Tom Tromey <tom@tromey.com>
2056 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2058 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2060 * gdb-gdb.py.in: Format using autopep8.
2062 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2064 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2065 (type_lookup_function): Recognize CORE_ADDR values.
2067 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2069 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2072 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2074 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2077 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2079 * gdb-gdb.py: Move to...
2080 * gdb-gdb.py.in: ... here.
2081 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2082 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2084 (distclean): Remove gdb-gdb.py when cleaning.
2085 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2086 * configure: Re-generate.
2088 2018-06-27 Pedro Alves <palves@redhat.com>
2090 * proc-service.c (get_ps_regcache): New.
2091 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2092 (ps_lsetfpregs): Use it.
2094 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
2097 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2098 (dwarf_decode_lines_1): Adjust.
2100 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2102 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2104 <info_proc>: Likewise.
2106 2018-06-26 Joel Brobecker <brobecker@adacore.com>
2108 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2109 to windows_fetch_one_register, and only handle the case of
2110 fetching one register. Move the code that reloads the context
2111 and iterates over all registers if R is negative to...
2112 (windows_nat_target::fetch_registers): ... here.
2113 (do_windows_store_inferior_registers): Rename to
2114 windows_store_one_register, and only handle the case of storing
2115 one register. Move the code that handles the case where r is
2117 (windows_nat_target::store_registers) ... here.
2119 2018-06-26 Tom Tromey <tom@tromey.com>
2122 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2123 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2125 (rust_internal_print_type): Add podata parameter.
2126 (rust_print_type): Update.
2128 2018-06-26 Tom Tromey <tom@tromey.com>
2130 * typeprint.h (struct print_offset_data) <update, finish,
2131 maybe_print_hole>: New methods.
2132 <indentation>: New constant.
2133 * typeprint.c (print_offset_data::indentation): Define.
2134 (print_offset_data::maybe_print_hole, print_offset_data::update)
2135 (print_offset_data::finish): Move from c-typeprint.c and rename.
2136 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2137 (print_spaces_filtered_with_print_options): Update.
2138 (c_print_type_union_field_offset, maybe_print_hole)
2139 (c_print_type_struct_field_offset): Move to typeprint.c and
2141 (c_type_print_base_struct_union): Update.
2143 2018-06-25 Pedro Alves <palves@redhat.com>
2145 * gdbthread.h (thread_info_ref, delete_thread)
2146 (delete_thread_silent, first_thread_of_inferior)
2147 (any_thread_of_inferior, switch_to_thread)
2148 (enable_thread_stack_temporaries)
2149 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2150 (get_last_thread_stack_temporary)
2151 (value_in_thread_stack_temporaries, can_access_registers_thread):
2152 Spell out "struct thread_info" instead of just "thread_info".
2153 * inferior.h (notice_new_inferior): Likewise.
2155 2018-06-25 Pedro Alves <palves@redhat.com>
2157 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2158 pass thread_info pointer to delete_thread.
2159 (windows_nat_target::detach): Pass inferior pointer to
2161 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2163 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2164 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2165 and pass a thread_info pointer to delete_thread.
2166 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2167 pass thread_info pointer to delete_thread.
2168 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2169 delete_thread_silent call.
2170 * procfs.c (procfs_target::detach): Pass inferior pointer to
2172 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2173 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2174 delete_thread_silent call.
2175 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2176 pass thread_info pointer to delete_thread.
2177 (windows_nat_target::detach): Pass inferior pointer to
2180 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2182 * regcache.c (readable_regcache::read_part): Fix asserts.
2183 (reg_buffer::raw_collect_part): New function.
2184 (regcache::write_part): Fix asserts.
2185 (reg_buffer::raw_supply_part): New function.
2186 (regcache::transfer_regset_register): New helper function.
2187 (regcache::transfer_regset): Call new functions.
2188 (regcache_supply_regset): Use gdb_byte*.
2189 (regcache::supply_regset): Likewise.
2190 (regcache_collect_regset): Likewise.
2191 (regcache::collect_regset): Likewise.
2192 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2193 (reg_buffer::raw_supply_part): Likewise.
2194 (regcache::transfer_regset_register): Likewise.
2195 (regcache::transfer_regset): Use gdb_byte*.
2197 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2199 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2201 2018-06-21 Pedro Alves <palves@redhat.com>
2203 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2204 instead of a ptid_t. All callers adjusted.
2205 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2207 (print_ada_task_info, display_current_task_id, task_command_1):
2209 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2211 (breakpoint_kind): Adjust.
2212 (remove_breakpoints_pid): Rename to ...
2213 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2214 pointer. All callers adjusted.
2215 (bpstat_clear_actions): Use inferior_thread.
2216 (get_bpstat_thread): New.
2217 (bpstat_do_actions): Use it.
2218 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2219 to take a thread_info pointer. All callers adjusted.
2220 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2221 (breakpoint_re_set_thread): Use inferior_thread.
2222 * breakpoint.h (struct inferior): Forward declare.
2223 (bpstat_stop_status): Update.
2224 (remove_breakpoints_pid): Delete.
2225 (remove_breakpoints_inf): New.
2226 * bsd-uthread.c (bsd_uthread_target::wait)
2227 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2228 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2229 (maint_btrace_packet_history_cmd)
2230 (maint_btrace_clear_packet_history_cmd): Adjust.
2231 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2233 * cli/cli-interp.c: Include "inferior.h".
2234 * common/refcounted-object.h (struct
2235 refcounted_object_ref_policy): New.
2236 * compile/compile-object-load.c: Include gdbthread.h.
2237 (store_regs): Use inferior_thread.
2238 * corelow.c (core_target::close): Use current_inferior.
2239 (core_target_open): Adjust to use first_thread_of_inferior and use
2240 the current inferior.
2241 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2242 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2243 <thread>: ... this new field. All references adjusted.
2244 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2245 Take a thread_info pointer instead of a ptid_t.
2246 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2247 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2248 thread_info pointer instead of a ptid_t.
2249 * elfread.c: Include "inferior.h".
2250 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2251 Use inferior_thread.
2252 * eval.c (evaluate_subexp): Likewise.
2253 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2255 * gdb_proc_service.h (struct thread_info): Forward declare.
2256 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2257 <thread>: ... this new field. All references adjusted.
2258 * gdbarch.h, gdbarch.c: Regenerate.
2259 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2260 'thread' parameter. All implementations and callers adjusted.
2261 * gdbthread.h (thread_info) <set_running>: New method.
2262 (delete_thread, delete_thread_silent): Take a thread_info pointer
2264 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2265 (first_thread_of_process): Delete, replaced by ...
2266 (first_thread_of_inferior): ... this new function. All callers
2268 (any_live_thread_of_process): Delete, replaced by ...
2269 (any_live_thread_of_inferior): ... this new function. All callers
2271 (switch_to_thread, switch_to_no_thread): Declare.
2272 (is_executing): Delete.
2273 (enable_thread_stack_temporaries): Update comment.
2274 <enable_thread_stack_temporaries>: Take a thread_info pointer
2275 instead of a ptid_t. Incref the thread.
2276 <~enable_thread_stack_temporaries>: Decref the thread.
2279 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2280 (get_last_thread_stack_temporary)
2281 (value_in_thread_stack_temporaries, can_access_registers_thread):
2282 Take a thread_info pointer instead of a ptid_t. All callers
2284 * infcall.c (get_call_return_value): Use inferior_thread.
2285 (run_inferior_call): Work with thread pointers instead of ptid_t.
2286 (call_function_by_hand_dummy): Work with thread pointers instead
2287 of ptid_t. Use thread_info_ref.
2288 * infcmd.c (proceed_thread_callback): Access thread's state
2290 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2291 access thread's state directly.
2292 (continue_command): Use inferior_thread.
2293 (info_program_command): Use find_thread_ptid and access thread
2295 (proceed_after_attach_callback): Use thread state directly.
2296 (notice_new_inferior): Take a thread_info pointer instead of a
2297 ptid_t. All callers adjusted.
2298 (exit_inferior): Take an inferior pointer instead of a pid. All
2300 (exit_inferior_silent): New.
2301 (detach_inferior): Delete.
2302 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2303 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2304 (detach_inferior_command, kill_inferior_command): Use
2305 find_inferior_id instead of valid_gdb_inferior_id and
2306 gdb_inferior_id_to_pid.
2307 (inferior_command): Use inferior and thread pointers.
2308 * inferior.h (struct thread_info): Forward declare.
2309 (notice_new_inferior): Take a thread_info pointer instead of a
2310 ptid_t. All callers adjusted.
2311 (detach_inferior): Delete declaration.
2312 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2313 instead of a pid. All callers adjusted.
2314 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2315 (valid_gdb_inferior_id): Delete.
2316 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2317 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2318 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2320 <inf>: ... this new field.
2321 <step_ptid>: Delete, replaced by ...
2322 <step_thread>: ... this new field.
2323 (get_displaced_stepping_state): Take an inferior pointer instead
2324 of a pid. All callers adjusted.
2325 (displaced_step_in_progress_any_inferior): Adjust.
2326 (displaced_step_in_progress_thread): Take a thread pointer instead
2327 of a ptid_t. All callers adjusted.
2328 (displaced_step_in_progress, add_displaced_stepping_state): Take
2329 an inferior pointer instead of a pid. All callers adjusted.
2330 (get_displaced_step_closure_by_addr): Adjust.
2331 (remove_displaced_stepping_state): Take an inferior pointer
2332 instead of a pid. All callers adjusted.
2333 (displaced_step_prepare_throw, displaced_step_prepare)
2334 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2335 All callers adjusted.
2336 (start_step_over): Adjust.
2337 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2338 displaced step queue.
2339 (do_target_resume): Adjust.
2340 (fetch_inferior_event): Use inferior_thread.
2341 (context_switch, get_inferior_stop_soon): Take an
2342 execution_control_state pointer instead of a ptid_t. All callers
2344 (switch_to_thread_cleanup): Delete.
2345 (stop_all_threads): Use scoped_restore_current_thread.
2346 * inline-frame.c: Include "gdbthread.h".
2347 (inline_state) <inline_state>: Take a thread pointer instead of a
2348 ptid_t. All callers adjusted.
2349 <ptid>: Delete, replaced by ...
2350 <thread>: ... this new field.
2351 (find_inline_frame_state): Take a thread pointer instead of a
2352 ptid_t. All callers adjusted.
2353 (skip_inline_frames, step_into_inline_frame)
2354 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2355 pointer instead of a ptid_t. All callers adjusted.
2356 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2357 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2358 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2360 * linux-nat.c (get_detach_signal): Likewise.
2361 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2362 (thread_db_notice_clone): Adjust.
2363 (thread_db_find_new_threads_silently)
2364 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2365 a thread pointer instead of a ptid_t. All callers adjusted.
2366 * mi/mi-cmd-var.c: Include "inferior.h".
2367 (mi_cmd_var_update_iter): Update to use thread pointers.
2368 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2370 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2372 (mi_output_running): ... this new function.
2373 (mi_on_resume_1): Adjust to use it.
2374 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2375 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2377 (interrupt_thread_callback): : Adjust to use thread and inferior
2379 * proc-service.c: Include "gdbthread.h".
2380 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2381 * progspace-and-thread.c: Include "inferior.h".
2382 * progspace.c: Include "inferior.h".
2383 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2384 hold a reference to an inferior_object.
2385 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2387 * python/py-inferior.c (struct inferior_object): Give the type a
2388 tag name instead of a typedef.
2389 (python_on_normal_stop): No need to check if the current thread is
2391 (inferior_to_inferior_object): Change return type to
2392 inferior_object. All callers adjusted.
2393 (find_thread_object): Delete, bits factored out to ...
2394 (thread_to_thread_object): ... this new function.
2395 * python/py-infthread.c (create_thread_object): Use
2396 inferior_to_inferior_object.
2397 (thpy_is_stopped): Use thread pointer directly.
2398 (gdbpy_selected_thread): Use inferior_thread.
2399 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2400 field, replaced with ...
2401 <thread>: ... this new field. All users adjusted.
2402 (btpy_insn_or_gap_new): Drop const.
2403 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2405 * python/py-record.c: Include "gdbthread.h".
2406 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2407 a ptid_t. All callers adjusted.
2408 (gdbpy_current_recording): Use inferior_thread.
2409 * python/py-record.h (recpy_record_object) <ptid>: Delete
2410 field, replaced with ...
2411 <thread>: ... this new field. All users adjusted.
2412 (recpy_element_object) <ptid>: Delete
2413 field, replaced with ...
2414 <thread>: ... this new field. All users adjusted.
2415 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2416 a ptid_t. All callers adjusted.
2417 * python/py-threadevent.c: Include "gdbthread.h".
2418 (get_event_thread): Use thread_to_thread_object.
2419 * python/python-internal.h (struct inferior_object): Forward
2421 (find_thread_object, find_inferior_object): Delete declarations.
2422 (thread_to_thread_object, inferior_to_inferior_object): New
2424 * record-btrace.c: Include "inferior.h".
2425 (require_btrace_thread): Use inferior_thread.
2426 (record_btrace_frame_sniffer)
2427 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2428 (get_thread_current_frame): Use scoped_restore_current_thread and
2430 (get_thread_current_frame): Use thread pointer directly.
2431 (record_btrace_replay_at_breakpoint): Use thread's inferior
2433 * record-full.c: Include "inferior.h".
2434 * regcache.c: Include "gdbthread.h".
2435 (get_thread_arch_regcache): Use the inferior's address space
2437 (get_thread_regcache, registers_changed_thread): New.
2438 * regcache.h (get_thread_regcache(thread_info *thread)): New
2440 (registers_changed_thread): New.
2441 (remote_target) <remote_detach_1>: Swap order of parameters.
2442 (remote_add_thread): <remote_add_thread>: Return the new thread.
2443 (get_remote_thread_info(ptid_t)): New overload.
2444 (remote_target::remote_notice_new_inferior): Use thread pointers
2446 (remote_target::process_initial_stop_replies): Use
2447 thread_info::set_running.
2448 (remote_target::remote_detach_1, remote_target::detach)
2449 (extended_remote_target::detach): Adjust.
2450 * stack.c (frame_show_address): Use inferior_thread.
2451 * target-debug.h (target_debug_print_thread_info_pp): New.
2452 * target-delegates.c: Regenerate.
2453 * target.c (default_thread_address_space): Delete.
2454 (memory_xfer_partial_1): Use current_inferior.
2455 (target_detach): Use current_inferior.
2456 (target_thread_address_space): Delete.
2457 (generic_mourn_inferior): Use current_inferior.
2458 * target.h (struct target_ops) <thread_address_space>: Delete.
2459 (target_thread_address_space): Delete.
2460 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2462 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2463 thread pointer instead of a ptid_t. Adjust all callers.
2464 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2465 (first_thread_of_process): Delete, replaced by ...
2466 (first_thread_of_inferior): ... this new function. All callers
2468 (any_thread_of_process): Rename to ...
2469 (any_thread_of_inferior): ... this, and take an inferior pointer.
2470 (any_live_thread_of_process): Rename to ...
2471 (any_live_thread_of_inferior): ... this, and take an inferior
2473 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2474 (value_in_thread_stack_temporaries)
2475 (get_last_thread_stack_temporary): Take a thread pointer instead
2476 of a ptid_t. Adjust all callers.
2477 (thread_info::set_running): New.
2478 (validate_registers_access): Use inferior_thread.
2479 (can_access_registers_ptid): Rename to ...
2480 (can_access_registers_thread): ... this, and take a thread
2482 (print_thread_info_1): Adjust to compare thread pointers instead
2484 (switch_to_no_thread, switch_to_thread): Make extern.
2485 (scoped_restore_current_thread::~scoped_restore_current_thread):
2486 Use m_thread pointer directly.
2487 (scoped_restore_current_thread::scoped_restore_current_thread):
2488 Use inferior_thread.
2489 (thread_command): Use thread pointer directly.
2490 (thread_num_make_value_helper): Use inferior_thread.
2491 * top.c (execute_command): Use inferior_thread.
2492 * tui/tui-interp.c: Include "inferior.h".
2493 * varobj.c (varobj_create): Use inferior_thread.
2494 (value_of_root_1): Use find_thread_global_id instead of
2495 global_thread_id_to_ptid.
2497 2018-06-21 Alan Hayward <alan.hayward@arm.com>
2499 * regcache.c (readable_regcache::read_part): Avoid memcpy when
2501 (regcache::write_part): Likewise.
2502 (readable_regcache::cooked_read_part): Update comment.
2503 (readable_regcache::cooked_write_part): Likewise.
2504 * regcache.h: (readable_regcache::read_part): Likewise.
2505 (regcache::write_part): Likewise.
2507 2018-06-21 Richard Bunt <richard.bunt@arm.com>
2508 Dirk Schubert <dirk.schubert@arm.com>
2510 * aarch64-linux-nat.c (post_attach): New.
2511 (aarch64_linux_nat_target::post_attach): Override post_attach to
2512 record the number of hardware debug registers.
2514 2018-06-20 Tom Tromey <tom@tromey.com>
2516 * python/py-param.c (add_setshow_generic): Make parameters const.
2517 (parmpy_init): Update.
2519 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2521 * regcache.h (regcache_cooked_read_ftype): Rename to...
2522 (register_read_ftype): ...this, change type to function_view.
2523 (class reg_buffer) <save>: Remove src parameter.
2524 (readonly_detached_regcache) <readonly_detached_regcache>: Make
2525 parameter non-const in first overload. Remove src parameter in
2527 * regcache.c (do_cooked_read): Remove.
2528 (readonly_detached_regcache::readonly_detached_regcache): Make
2529 parameter non-const, adjust call to other constructor.
2530 (reg_buffer::save): Remove src parameter.
2531 * frame.c (do_frame_register_read): Remove.
2532 (frame_save_as_regcache): Use lambda function.
2533 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2534 parameter to ppu2spu_data *.
2535 (ppu2spu_sniffer): Use lambda function.
2537 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2539 * record-full.c (record_full_target::insert_breakpoint): Remove
2540 "struct" keyword, add const.
2542 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2544 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2545 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2546 * configure.ac: Remove AC_PREREQ, add missing quoting.
2547 * gnulib/configure.ac: Modernize usage of
2548 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
2549 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2550 (AUTOMAKE_VERSION): Bump to 1.15.1.
2551 * configure: Re-generate.
2552 * config.in: Re-generate.
2553 * aclocal.m4: Re-generate.
2554 * gnulib/aclocal.m4: Re-generate.
2555 * gnulib/config.in: Re-generate.
2556 * gnulib/configure: Re-generate.
2557 * gnulib/import/Makefile.in: Re-generate.
2559 2018-06-19 Pedro Alves <palves@redhat.com>
2561 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2562 (lookup_minimal_symbol_by_pc_section): ... here with
2563 gdb_assert_not_reached added.
2565 2018-06-19 Pedro Alves <palves@redhat.com>
2567 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2568 parameter with a block parameter. Compare location's block symbol
2569 with the frame's block instead of addresses.
2570 (skip_inline_frames): Pass the current block instead of the
2571 frame's address. Break out as soon as we determine the frame
2572 should not be skipped.
2574 2018-06-18 Tom Tromey <tom@tromey.com>
2576 * solib-aix.c (solib_aix_get_section_offsets): Return
2578 (solib_aix_solib_create_inferior_hook): Update.
2580 2018-06-18 Tom Tromey <tom@tromey.com>
2582 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2584 2018-06-18 Tom Tromey <tom@tromey.com>
2586 * solib-frv.c (frv_relocate_main_executable): Use
2588 * solib-dsbt.c (dsbt_relocate_main_executable): Use
2591 2018-06-18 Tom Tromey <tom@tromey.com>
2593 * objfiles.h (inhibit_section_map_updates): Update.
2594 (resume_section_map_updates, resume_section_map_updates_cleanup):
2596 * solib-svr4.c (svr4_handle_solib_event): Update.
2597 * objfiles.c (inhibit_section_map_updates): Return
2598 scoped_restore_tmpl<int>.
2599 (resume_section_map_updates, resume_section_map_updates_cleanup):
2602 2018-06-18 Tom Tromey <tom@tromey.com>
2604 * valprint.h (read_string): Update.
2605 * valprint.c (read_string): Change type of "buffer".
2606 (val_print_string): Update.
2607 * python/py-value.c (valpy_string): Update.
2608 * language.h (struct language_defn) <la_get_string>: Change
2610 (default_get_string, c_get_string): Update.
2611 * language.c (default_get_string): Change type of "buffer".
2612 * guile/scm-value.c (gdbscm_value_to_string): Update.
2613 * c-lang.c (c_get_string): Change type of "buffer".
2615 2018-06-18 Tom Tromey <tom@tromey.com>
2617 * ser-mingw.c (struct pipe_state_destroyer): New.
2618 (pipe_state_up): New typedef.
2619 (cleanup_pipe_state): Remove.
2620 (pipe_windows_open): Use pipe_state_up. Don't release argv.
2622 2018-06-18 Tom Tromey <tom@tromey.com>
2624 * rust-lang.h (rust_yyerror): Don't declare.
2625 * rust-lang.c (rust_language_defn): Update.
2626 * rust-exp.y (yyerror): Now static.
2627 * parse.c (parse_exp_in_context_1): Update.
2628 * p-lang.h (p_yyerror): Don't declare.
2629 * p-lang.c (p_language_defn): Update.
2630 * p-exp.y (yyerror): Now static.
2631 * opencl-lang.c (opencl_language_defn): Update.
2632 * objc-lang.c (objc_language_defn): Update.
2633 * m2-lang.h (m2_yyerror): Don't declare.
2634 * m2-lang.c (m2_language_defn): Update.
2635 * m2-exp.y (yyerror): Now static.
2636 * language.h (struct language_defn) <la_error>: Remove.
2637 * language.c (unk_lang_error): Remove.
2638 (unknown_language_defn, auto_language_defn): Remove.
2639 * go-lang.h (go_yyerror): Don't declare.
2640 * go-lang.c (go_language_defn): Update.
2641 * go-exp.y (yyerror): Now static.
2642 * f-lang.h (f_yyerror): Don't declare.
2643 * f-lang.c (f_language_defn): Update.
2644 * f-exp.y (yyerror): Now static.
2645 * d-lang.h (d_yyerror): Don't declare.
2646 * d-lang.c (d_language_defn): Update.
2647 * d-exp.y (yyerror): Now static.
2648 * c-lang.h (c_yyerror): Don't declare.
2649 * c-lang.c (c_language_defn, cplus_language_defn)
2650 (asm_language_defn, minimal_language_defn): Update.
2651 * c-exp.y (yyerror): Now static.
2652 * ada-lang.h (ada_yyerror): Don't declare.
2653 * ada-lang.c (ada_language_defn): Update.
2654 * ada-exp.y (yyerror): Now static.
2656 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2658 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2659 (store_sveregs_to_thread): Likewise.
2660 (aarch64_linux_fetch_inferior_registers): Check for SVE.
2661 (aarch64_linux_store_inferior_registers): Likewise.
2662 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2664 (aarch64_sve_regs_copy_to_regcache): Likewise.
2665 (aarch64_sve_regs_copy_from_regcache): Likewise.
2666 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2668 (aarch64_sve_regs_copy_to_regcache): Likewise.
2669 (aarch64_sve_regs_copy_from_regcache): Likewise.
2670 (sve_context): Structure from Linux headers.
2671 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2672 (SVE_SIG_ZREG_SIZE): Likewise.
2673 (SVE_SIG_PREG_SIZE): Likewise.
2674 (SVE_SIG_FFR_SIZE): Likewise.
2675 (SVE_SIG_REGS_OFFSET): Likewise.
2676 (SVE_SIG_ZREGS_OFFSET): Likewise.
2677 (SVE_SIG_ZREG_OFFSET): Likewise.
2678 (SVE_SIG_ZREGS_SIZE): Likewise.
2679 (SVE_SIG_PREGS_OFFSET): Likewise.
2680 (SVE_SIG_PREG_OFFSET): Likewise.
2681 (SVE_SIG_PREGS_SIZE): Likewise.
2682 (SVE_SIG_FFR_OFFSET): Likewise.
2683 (SVE_SIG_REGS_SIZE): Likewise.
2684 (SVE_SIG_CONTEXT_SIZE): Likewise.
2685 (SVE_PT_REGS_MASK): Likewise.
2686 (SVE_PT_REGS_FPSIMD): Likewise.
2687 (SVE_PT_REGS_SVE): Likewise.
2688 (SVE_PT_VL_INHERIT): Likewise.
2689 (SVE_PT_VL_ONEXEC): Likewise.
2690 (SVE_PT_REGS_OFFSET): Likewise.
2691 (SVE_PT_FPSIMD_OFFSET): Likewise.
2692 (SVE_PT_FPSIMD_SIZE): Likewise.
2693 (SVE_PT_SVE_ZREG_SIZE): Likewise.
2694 (SVE_PT_SVE_PREG_SIZE): Likewise.
2695 (SVE_PT_SVE_FFR_SIZE): Likewise.
2696 (SVE_PT_SVE_FPSR_SIZE): Likewise.
2697 (SVE_PT_SVE_FPCR_SIZE): Likewise.
2698 (__SVE_SIG_TO_PT): Likewise.
2699 (SVE_PT_SVE_OFFSET): Likewise.
2700 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2701 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2702 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2703 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2704 (SVE_PT_SVE_PREG_OFFSET): Likewise.
2705 (SVE_PT_SVE_PREGS_SIZE): Likewise.
2706 (SVE_PT_SVE_FFR_OFFSET): Likewise.
2707 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2708 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2709 (SVE_PT_SVE_SIZE): Likewise.
2710 (SVE_PT_SIZE): Likewise.
2711 (HAS_SVE_STATE): New define.
2713 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2715 * nat/aarch64-sve-linux-sigcontext.h: New file.
2716 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2718 (SVE_VQ_MIN): Likewise.
2719 (SVE_VQ_MAX): Likewise.
2720 (SVE_VL_MIN): Likewise.
2721 (SVE_VL_MAX): Likewise.
2722 (SVE_NUM_ZREGS): Likewise.
2723 (SVE_NUM_PREGS): Likewise.
2724 (sve_vl_valid): Likewise.
2725 (struct user_sve_header): Likewise.
2727 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
2728 Richard Bunt <Richard.Bunt@arm.com>
2730 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2731 was requested by GDB.
2733 2018-06-15 Tom de Vries <tdevries@suse.de>
2735 * MAINTAINERS (Write After Approval): Add Tom de Vries.
2737 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
2739 * gnulib/update-gnulib.sh: Print expected versions of
2742 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
2744 * arch-utils.c (default_type_align): Use type_length_units.
2745 * gdbtypes.c (type_align): Use type_length_units.
2747 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2749 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2750 of 'define' command.
2752 2018-06-14 Tom de Vries <tdevries@suse.de>
2755 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2756 get_no_prettyformat_print_options.
2758 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
2760 * sparc-nat.h: Include target.h.
2761 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2762 <fetch_registers>: Remove this argument in function call.
2763 <store_registers>: Remove this argument in function call, remove
2765 <low_forget_process>: Call sparc64_forget_process instead of
2766 sparc_forget_process.
2768 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2770 * procfs.c (_initialize_procfs): Use add_inf_child_target.
2771 (procfs_target::make_corefile_notes): Adjust to new
2772 target_read_alloc return type.
2774 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2775 Stephen Roberts <stephen.roberts@arm.com>
2778 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2779 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2780 Move should_notify_stop local into more inner scope.
2782 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2783 Stephen Roberts <stephen.roberts@arm.com>
2786 * infrun.c (resume_1): Add call to mark_async_event_handler.
2788 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2790 * infrun.c (do_target_wait): Change old version of $pc printed.
2792 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
2794 * dwarf2read.c (read_index_from_section): Rename to...
2795 (read_gdb_index_from_section): ... this, update all callers.
2796 (dwarf2_read_index): Rename to...
2797 (dwarf2_read_gdb_index): ... this, update all callers.
2799 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
2801 * gdb/hppa-linux-nat.c
2802 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2803 hppa_linux_nat_target::fetch_registers.
2805 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2807 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2808 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2809 (AARCH64_DWARF_SVE_FFR): Likewise.
2810 (AARCH64_DWARF_SVE_P0): Likewise.
2811 (AARCH64_DWARF_SVE_Z0): Likewise.
2813 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2815 * common/common-regcache.h (raw_compare): New function.
2816 * regcache.c (regcache::raw_compare): Likewise.
2817 * regcache.h (regcache::raw_compare): New declaration.
2819 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2821 * common/common-regcache.h (reg_buffer_common): New structure.
2822 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2823 (reg_buffer::raw_supply): Likewise.
2824 (reg_buffer::raw_supply_integer): Likewise.
2825 (reg_buffer::raw_supply_zeroed): Likewise.
2826 (reg_buffer::raw_collect): Likewise.
2827 (reg_buffer::raw_collect_integer): Likewise.
2828 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2829 (reg_buffer::raw_supply): Likewise.
2830 (reg_buffer::raw_supply_integer): Likewise.
2831 (reg_buffer::raw_supply_zeroed): Likewise.
2832 (reg_buffer::raw_collect): Likewise.
2833 (reg_buffer::raw_collect_integer): Likewise.
2835 2018-06-10 Tom Tromey <tom@tromey.com>
2837 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
2838 (class remote_state) <stop_reply_queue>: Now std::vector.
2839 (remote_state::~remote_state)
2840 (remote_target::stop_reply_queue_length): Update.
2841 (struct queue_iter_param, remove_child_of_pending_fork)
2842 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2843 (check_pending_event_prevents_wildcard_vcont_callback)
2844 (remove_stop_reply_for_inferior)
2845 (remove_stop_reply_of_remote_state)
2846 (remote_notif_remove_once_on_match)
2847 (stop_reply_match_ptid_and_ws)
2848 (remote_kill_child_of_pending_fork): Remove.
2849 (remote_target::remove_new_fork_children)
2850 (remote_target::check_pending_events_prevent_wildcard_vcont)
2851 (remote_target::discard_pending_stop_replies)
2852 (remote_target::discard_pending_stop_replies_in_queue)
2853 (remote_target::remote_notif_remove_queued_reply)
2854 (remote_target::queued_stop_reply)
2855 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2856 (remote_target::wait, remote_target::kill_new_fork_children)
2857 (remote_target::async): Update.
2859 2018-06-10 Tom Tromey <tom@tromey.com>
2861 * record-full.c (record_full_arch_list_cleanups): Remove.
2862 (record_full_message): Use try/catch.
2863 (record_full_wait_cleanups): Remove.
2864 (record_full_wait_1): Use try/catch.
2865 (record_full_restore): Likewise.
2867 2018-06-10 Tom Tromey <tom@tromey.com>
2869 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
2870 declare VEC. Add constructor.
2871 <in_target_beneath>: Now bool.
2872 (record_full_breakpoints): Now a std::vector, static.
2873 (record_full_sync_record_breakpoints)
2874 (record_full_init_record_breakpoints)
2875 (record_full_target::insert_breakpoint)
2876 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
2878 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
2880 * dwarf2read.c (process_cu_includes): Remove struct keyword.
2881 * serial.c (serial_interface_lookup): Remove struct keyword.
2883 2018-06-10 Tom Tromey <tom@tromey.com>
2885 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
2887 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
2889 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
2891 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
2892 "beneath" as a method.
2893 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
2894 Use "beneath" as a method.
2896 2018-06-10 Tom Tromey <tom@tromey.com>
2898 * tracefile.c (struct trace_file_writer_deleter): New.
2899 <operator()>: Rename from trace_file_writer_xfree.
2900 (trace_file_writer_up): New typedef.
2901 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
2903 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2905 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
2906 <m_registers, m_register_status>: Change type to
2908 * regcache.c (reg_buffer::reg_buffer): Use new instead of
2911 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2913 * common/common-regcache.h (enum register_status): Add
2914 underlying type "signed char".
2915 * regcache.h (reg_buffer) <m_register_status>: Change type to
2917 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
2918 register_status instead of signed char.
2919 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
2920 (reg_buffer::get_register_status): Remove cast.
2921 (readable_regcache::raw_read): Remove cast.
2922 (readable_regcache::cooked_read): Remove cast.
2924 2018-06-09 Tom Tromey <tom@tromey.com>
2926 * source.c (reverse_search_command, forward_search_command): Use
2929 2018-06-09 Tom Tromey <tom@tromey.com>
2931 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
2932 (serial_ops_list): Now static, std::vector.
2933 (serial_interface_lookup, serial_add_interface): Update.
2935 2018-06-09 Tom Tromey <tom@tromey.com>
2937 * dwarf2read.c (process_cu_includes): Update.
2938 (process_full_comp_unit): Update.
2939 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
2942 2018-06-08 Paul Koning <paul_koning@dell.com>
2946 * python/python.c (do_start_initialization):
2947 Avoid call to internal Python API.
2948 (init__gdb_module): New function.
2950 2018-06-08 Gary Benson <gbenson@redhat.com>
2952 * linux-thread-db.c (valprint.h): New include.
2953 (struct check_thread_db_info): New structure.
2954 (check_thread_db_on_load, tdb_testinfo): New static globals.
2955 (check_thread_db, check_thread_db_callback): New functions.
2956 (try_thread_db_load_1): Run integrity checks if requested.
2957 (maintenance_check_libthread_db): New function.
2958 (_initialize_thread_db): Register "maint check libthread-db"
2959 and "maint set/show check-libthread-db".
2960 * NEWS: Mention the above new commands.
2962 2018-06-08 Tom Tromey <tom@tromey.com>
2964 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
2967 2018-06-08 Tom Tromey <tom@tromey.com>
2969 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
2971 2018-06-08 Tom Tromey <tom@tromey.com>
2973 * common/btrace-common.h (struct btrace_data): Add constructor,
2974 destructor, move assignment operator.
2975 <empty, clear, fini>: New methods.
2976 <format>: Initialize.
2977 (btrace_data_init, btrace_data_fini, btrace_data_clear)
2978 (btrace_data_empty): Don't declare.
2979 * common/btrace-common.c (btrace_data_init): Remove.
2980 (btrace_data::fini): Rename from btrace_data_fini.
2981 (btrace_data::empty): Rename from btrace_data_empty.
2982 (btrace_data::clear): Rename from btrace_data_clear. Return
2984 * btrace.h (make_cleanup_btrace_data): Don't declare.
2985 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
2986 (parse_xml_btrace): Update.
2987 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
2988 (maint_btrace_clear_packet_history_cmd): Update.
2990 2018-06-07 Pedro Alves <palves@redhat.com>
2992 * target.h (target_ops) <beneath>: Now a method. All references
2994 (class target_stack): New.
2995 * target.c (g_target_stack): New.
2996 (g_current_top_target): Delete.
2997 (current_top_target): Get the top target out of g_target_stack.
2998 (target_stack::push, target_stack::unpush): New.
2999 (push_target, unpush_target): Reimplement.
3000 (target_is_pushed): Reimplement in terms of g_target_stack.
3001 (target_ops::beneath, target_stack::find_beneath): New.
3003 2018-06-07 Pedro Alves <palves@redhat.com>
3005 * target.h (find_target_beneath): Delete declaration.
3006 * target.c (find_target_beneath): Delete definition.
3007 * aix-thread.c: All callers of find_target_beneath adjusted to
3008 call target_ops::beneath instead.
3009 * bsd-uthread.c: Likewise.
3010 * linux-thread-db.c: Likewise.
3011 * ravenscar-thread.c: Likewise.
3012 * sol-thread.c: Likewise.
3013 * spu-multiarch.c: Likewise.
3015 2018-06-07 Pedro Alves <palves@redhat.com>
3017 * target.h (target_ops) <beneath>: Now a method. All references
3019 (target_ops) <m_beneath>: New.
3020 * target.c (target_ops::beneath): New.
3021 * corelow.c: Adjust all references to target_ops::beneath.
3022 * linux-thread-db.c: Likewise.
3023 * make-target-delegates: Likewise.
3024 * record-btrace.c: Likewise.
3025 * record-full.c: Likewise.
3026 * remote.c: Likewise.
3027 * target.c: Likewise.
3028 * target-delegates.c: Regenerate.
3030 2018-06-07 Pedro Alves <palves@redhat.com>
3032 * target.h (target_stack): Delete.
3033 (current_top_target): Declare function.
3034 * target.c (target_stack): Delete.
3035 (g_current_top_target): New.
3036 (current_top_target): New function.
3037 * auxv.c: Use current_top_target instead of target_stack
3039 * avr-tdep.c: Likewise.
3040 * breakpoint.c: Likewise.
3041 * corefile.c: Likewise.
3042 * elfread.c: Likewise.
3044 * exceptions.c: Likewise.
3045 * frame.c: Likewise.
3046 * gdbarch-selftests.c: Likewise.
3047 * gnu-v3-abi.c: Likewise.
3048 * ia64-tdep.c: Likewise.
3049 * ia64-vms-tdep.c: Likewise.
3050 * infcall.c: Likewise.
3051 * infcmd.c: Likewise.
3052 * infrun.c: Likewise.
3053 * linespec.c: Likewise.
3054 * linux-tdep.c: Likewise.
3055 * minsyms.c: Likewise.
3056 * ppc-linux-nat.c: Likewise.
3057 * ppc-linux-tdep.c: Likewise.
3058 * procfs.c: Likewise.
3059 * regcache.c: Likewise.
3060 * remote.c: Likewise.
3061 * rs6000-tdep.c: Likewise.
3062 * s390-linux-nat.c: Likewise.
3063 * s390-tdep.c: Likewise.
3064 * solib-aix.c: Likewise.
3065 * solib-darwin.c: Likewise.
3066 * solib-dsbt.c: Likewise.
3067 * solib-spu.c: Likewise.
3068 * solib-svr4.c: Likewise.
3069 * solib-target.c: Likewise.
3070 * sparc-tdep.c: Likewise.
3071 * sparc64-tdep.c: Likewise.
3072 * spu-tdep.c: Likewise.
3073 * symfile.c: Likewise.
3074 * symtab.c: Likewise.
3075 * target-descriptions.c: Likewise.
3076 * target-memory.c: Likewise.
3077 * target.c: Likewise.
3078 * target.h: Likewise.
3079 * tracefile-tfile.c: Likewise.
3080 * tracepoint.c: Likewise.
3081 * valops.c: Likewise.
3082 * valprint.c: Likewise.
3083 * value.c: Likewise.
3084 * windows-tdep.c: Likewise.
3085 * mi/mi-main.c: Likewise.
3087 2018-06-07 Tom Tromey <tom@tromey.com>
3089 * valprint.h (build_address_symbolic): Declare.
3090 * printcmd.c (print_address_symbolic): Update.
3091 (build_address_symbolic): Change "name" and "filename" to
3093 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3095 * defs.h (build_address_symbolic): Remove declaration.
3097 2018-06-07 Alan Hayward <alan.hayward@arm.com>
3099 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3100 (aarch64_vnv_type): Add function.
3101 (aarch64_pseudo_register_name): Add V regs for SVE.
3102 (aarch64_pseudo_register_type): Likewise.
3103 (aarch64_pseudo_register_reggroup_p): Likewise.
3104 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3105 (aarch64_pseudo_read_value): Add V regs for SVE.
3106 (aarch64_pseudo_write_2): Use V0 offset for SVE
3107 (aarch64_pseudo_write): Add V regs for SVE.
3108 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3110 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3112 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3113 (sve_vl_from_vq): Likewise.
3115 2018-06-05 Tom Tromey <tom@tromey.com>
3117 * cli/cli-cmds.c (show_version): Update.
3118 * top.c (print_gdb_version): Add "interactive" parameter.
3120 * main.c (captured_main_1): Update.
3121 * top.h (print_gdb_version): Add "interactive" parameter and a
3124 2018-06-05 David Malcolm <dmalcolm@redhat.com>
3126 * common/enum-flags.h: Add trailing semicolon to example in
3129 2018-06-05 Tom Tromey <tom@tromey.com>
3132 * NEWS: Add entry about pager.
3133 * utils.c (pagination_disabled_for_command): New global.
3134 (prompt_for_continue): Allow "c" response to prompt.
3135 (reinitialize_more_filter): Clear
3136 pagination_disabled_for_command.
3137 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3139 2018-06-04 Tom Tromey <tom@tromey.com>
3141 * ada-lang.h (ada_lookup_symbol_list): Update.
3142 * ada-lang.c (resolve_subexp): Update.
3143 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3145 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3146 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3147 results parameter to std::vector.
3148 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3150 * ada-exp.y (block_lookup): Update.
3151 (select_possible_type_sym): Change type of syms. Remove nsyms
3153 (write_var_or_type, write_name_assoc): Update.
3155 2018-06-04 Joel Brobecker <brobecker@adacore.com>
3157 * windows-nat.c (windows_nat_target::xfer_partial): Return
3158 TARGET_XFER_E_IO if we need to delegate to the target beneath
3159 but BENEATH is NULL.
3161 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3163 * Makefile.in (config.status): Add configure.nat as a
3166 2018-06-04 Tom Tromey <tom@tromey.com>
3168 * cp-name-parser.y (cpname_state): Add method declarations.
3169 (HANDLE_QUAL): Update.
3170 (cpname_state::d_grab, cpname_state::fill_comp)
3171 (cpname_state::make_operator, cpname_state::make_dtor)
3172 (cpname_state::make_builtin_type, cpname_state::make_name)
3173 (cpname_state::d_qualify, cpname_state::d_int_type)
3174 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3175 (%union): Move earlier.
3177 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3179 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3181 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3183 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3184 (aarch64_pseudo_write_1): Likewise.
3185 (aarch64_pseudo_read_value): Use helper.
3186 (aarch64_pseudo_write): Likewise.
3188 2018-06-04 Pedro Alves <palves@redhat.com>
3190 * darwin-nat.c (darwin_ops): Delete.
3191 (darwin_attach_pid): Use get_native_target.
3193 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3195 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3196 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3198 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3200 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3201 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3202 (aarch64_gdbarch_init): Check for SVE.
3203 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3205 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3207 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3208 * aarch64-tdep.h (aarch64_read_description): Likewise.
3209 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3210 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3211 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3212 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3213 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3215 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3217 * value.c (value_fetch_lazy_bitfield): New.
3218 (value_fetch_lazy_memory): New.
3219 (value_fetch_lazy_register): New.
3220 (value_fetch_lazy): Factor out to smaller functions.
3222 2018-06-01 Tom Tromey <tom@tromey.com>
3224 * cp-name-parser.y (backslashable, represented): Now const.
3226 2018-06-01 Tom Tromey <tom@tromey.com>
3228 * cp-name-parser.y: Include parser-defs.h.
3229 (parser_fprintf): Remove declaration.
3231 2018-06-01 Tom Tromey <tom@tromey.com>
3233 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3235 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3236 (global_result): Remove globals.
3237 (struct cpname_state): New.
3238 (yyparse): Don't declare.
3239 (yylex, yyerror): Move declarations after %union.
3240 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3241 (make_name): Add state parameter.
3243 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3245 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3247 (yylex): Add lvalp, state parameters.
3248 (yyerror): Add state parameter.
3249 (cp_demangled_name_to_comp): Update.
3251 2018-06-01 Tom Tromey <tom@tromey.com>
3253 * cp-name-parser.y (parser_fprintf): Declare.
3254 (GDB_YY_REMAP_PREFIX): Define.
3255 Include yy-remap.h. Don't redefine yy* identifiers.
3257 2018-06-01 Tom Tromey <tom@tromey.com>
3259 * python/py-type.c (typy_legacy_template_argument): Update.
3260 * cp-support.h (cp_demangled_name_to_comp): Update.
3261 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3262 parameter to be a "std::string *".
3265 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3267 * ada-lex.l: Include "diagnostics.h" instead of
3268 "common/diagnostics.h".
3269 * unittests/environ-selftests.c: Likewise.
3270 * common/diagnostics.h: Moved to ../include.
3272 2018-06-01 Joel Brobecker <brobecker@adacore.com>
3274 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3275 to language_mode_manual while calling breakpoint_re_set_one.
3277 2018-06-01 Tom Tromey <tom@tromey.com>
3279 * valops.c (value_cast_structs, destructor_name_p): Update.
3280 * symtab.c (gdb_mangle_name): Update.
3281 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3283 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3284 (pascal_object_print_value_fields, pascal_object_print_value):
3286 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3287 * linespec.c (find_methods): Update.
3288 * gdbtypes.h (type_name_no_tag): Remove.
3289 (type_name_or_error): Rename from type_name_no_tag_or_error.
3290 * gdbtypes.c (type_name_no_tag): Remove.
3291 (type_name_or_error): Rename from type_name_no_tag_or_error.
3292 (lookup_struct_elt_type, check_typedef): Update.
3293 * expprint.c (print_subexp_standard): Update.
3294 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3295 * d-namespace.c (d_lookup_nested_symbol): Update.
3296 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3297 (cp_print_class_member): Update.
3298 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3299 * completer.c (add_struct_fields): Update.
3300 * c-typeprint.c (cp_type_print_derivation_info)
3301 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3303 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3304 (ada_prefer_type, ada_is_exception_sym): Update.
3306 2018-06-01 Tom Tromey <tom@tromey.com>
3308 * valops.c (enum_constant_from_type, value_namespace_elt)
3309 (value_maybe_namespace_elt): Update.
3310 * valarith.c (find_size_for_pointer_math): Update.
3311 * target-descriptions.c (make_gdb_type): Update.
3312 * symmisc.c (print_symbol): Update.
3313 * stabsread.c (define_symbol, read_type)
3314 (complain_about_struct_wipeout, add_undefined_type)
3315 (cleanup_undefined_types_1): Update.
3316 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3317 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3318 (rust_internal_print_type, rust_composite_type)
3319 (rust_evaluate_funcall, rust_evaluate_subexp)
3320 (rust_inclusive_range_type_p): Update.
3321 * python/py-type.c (typy_get_tag): Update.
3322 * p-typeprint.c (pascal_type_print_base): Update.
3323 * mdebugread.c (parse_symbol, parse_type): Update.
3324 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3326 * guile/scm-type.c (gdbscm_type_tag): Update.
3327 * go-lang.c (sixg_string_p): Update.
3328 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3330 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3331 (TYPE_TAG_NAME): Remove.
3332 * gdbtypes.c (type_name_no_tag): Simplify.
3333 (check_typedef, check_types_equal, recursive_dump_type)
3334 (copy_type_recursive, arch_composite_type): Update.
3335 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3336 in summary mode when needed.
3337 * eval.c (evaluate_funcall): Update.
3338 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3339 (process_structure_scope, read_enumeration_type)
3340 (read_namespace_type, read_module_type, determine_prefix): Update.
3341 * cp-support.c (inspect_type): Update.
3342 * coffread.c (process_coff_symbol, decode_base_type): Update.
3343 * c-varobj.c (c_is_path_expr_parent): Update.
3344 * c-typeprint.c (c_type_print_base_struct_union): Update.
3345 (c_type_print_base_1): Update. Print struct/class/union/enum in
3346 summary when using C language.
3347 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3348 (gen_maybe_namespace_elt): Update.
3349 * ada-lang.c (ada_type_name): Simplify.
3350 (empty_record, ada_template_to_fixed_record_type_1)
3351 (template_to_static_fixed_type)
3352 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3354 2018-06-01 Tom Tromey <tom@tromey.com>
3356 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3358 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3359 (c_print_type): Update.
3360 (c_print_type): New overload.
3361 (c_type_print_varspec_prefix, c_type_print_args)
3362 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3363 (c_type_print_base_struct_union, c_type_print_base_1)
3364 (cp_type_print_method_args): Add "language" parameter.
3365 (c_type_print_base): Update.
3366 * c-lang.h (c_print_type): Add new overload.
3368 2018-06-01 Tom Tromey <tom@tromey.com>
3370 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3371 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3373 2018-06-01 Alan Hayward <alan.hayward@arm.com>
3375 * aarch64-tdep.c (aarch64_sve_register_names): New const
3377 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3378 (AARCH64_SVE_Z_REGS_NUM): New define.
3379 (AARCH64_SVE_P_REGS_NUM): Likewise.
3380 (AARCH64_SVE_NUM_REGS): Likewise.
3382 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
3384 * nat/linux-ptrace.h [__alpha__]
3385 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3388 2018-05-31 Maciej W. Rozycki <macro@mips.com>
3390 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3391 the endianness selected.
3392 * NEWS: Document `set endian auto' mode operation update.
3394 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3396 * Makefile.in: Add new header.
3397 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3398 (sve_vl_from_vg): Likewise.
3399 (sve_vq_from_vl): Likewise.
3400 (sve_vl_from_vq): Likewise.
3401 (sve_vq_from_vg): Likewise.
3402 (sve_vg_from_vq): Likewise.
3403 * configure.nat: Add new c file.
3404 * nat/aarch64-sve-linux-ptrace.c: New file.
3405 * nat/aarch64-sve-linux-ptrace.h: New file.
3407 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3409 * aarch64-linux-nat.c (aarch64_linux_read_description):
3411 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3413 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3414 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3415 (aarch64_gdbarch_init): Add parmeter zero.
3416 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3417 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3418 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3420 * doc/gdb.texinfo: Describe SVE feature
3421 * features/aarch64-sve.c: New file.
3423 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
3426 * gdbarch.sh (significant_addr_bit): Default to zero when
3427 not set by target architecture.
3428 * gdbarch.c: Re-generated.
3429 * utils.c (address_significant): Update.
3431 2018-05-30 Joel Brobecker <brobecker@adacore.com>
3433 * stack.c (func_command): Remove trailing newline in call to error.
3435 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3437 * regcache.h (regcache_raw_collect): Remove, update callers to
3438 use regcache::raw_collect.
3439 * regcache.c (regcache_raw_collect): Remove.
3441 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3443 * regcache.h (regcache_raw_supply): Remove, update callers to
3444 use detached_regcache::raw_supply.
3445 * regcache.c (regcache_raw_supply): Remove.
3447 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3449 * regcache.h (regcache_cooked_write_part): Remove, update
3450 callers to use regcache::cooked_write_part.
3451 * regcache.c (regcache_cooked_write_part): Remove.
3453 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3455 * regcache.h (regcache_cooked_read_part): Remove, update callers
3456 to use readable_regcache::cooked_read_part.
3457 * regcache.c (regcache_cooked_read_part): Remove.
3459 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3461 * regcache.h (regcache_cooked_read_value): Remove, update
3462 callers to use readable_regcache::cooked_read_value.
3463 * regcache.c (regcache_cooked_read_value): Remove.
3465 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3467 * regcache.h (regcache_cooked_write): Remove, update callers to
3468 use regcache::cooked_write.
3469 * regcache.c (regcache_cooked_write): Remove.
3471 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3473 * regcache.h (regcache_invalidate): Remove, update callers to
3474 use detached_regcache::invalidate instead.
3475 * regcache.c (regcache_invalidate): Remove.
3477 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3479 * regcache.h (regcache_raw_write_part): Remove, update callers
3480 to use regcache::raw_write_part instead.
3481 * regcache.c (regcache_raw_write_part): Remove.
3483 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3485 * regcache.h (regcache_raw_read_part): Remove, update callers to
3486 use readable_regcache::raw_read_part instead.
3487 * regcache.c (regcache_raw_read_part): Remove.
3489 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3491 * regcache.h (regcache_cooked_read): Remove, update callers to
3492 use readable_regcache::cooked_read instead.
3493 * regcache.c (regcache_cooked_read): Remove.
3495 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3497 * regcache.h (regcache_raw_write): Remove, update callers to use
3498 regcache::raw_write instead.
3499 * regcache.c (regcache_raw_write): Remove.
3501 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3503 * regcache.h (regcache_raw_read): Remove, update callers to use
3504 readable_regcache::raw_read instead.
3505 * regcache.c (regcache_raw_read): Remove.
3507 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3509 * regcache.h (regcache_raw_update): Remove, update callers to
3510 use readable_regcache::raw_update instead.
3511 * regcache.c (regcache_raw_update): Remove.
3513 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3515 * regcache.h (regcache_register_status): Remove, update callers
3516 to use reg_buffer::get_register_status directly instead.
3517 * regcache.c (regcache_register_status): Remove.
3519 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3521 * regcache.h (regcache_get_ptid): Remove, update all callers to
3522 call regcache::ptid instead.
3523 * regcache.c (regcache_get_ptid): Remove.
3525 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3527 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3529 2018-05-30 Pedro Alves <palves@redhat.com>
3531 * common/common-exceptions.h (exception_rethrow): Use
3534 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
3536 * breakpoint.c (print_solib_event, check_status_catch_solib):
3537 Remove struct keyword in range-based for loops.
3538 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3539 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3541 * linespec.c (find_superclass_methods, search_minsyms_for_name):
3543 * symfile.c (addr_info_make_relative): Likewise.
3544 * thread.c (value_in_thread_stack_temporaries): Likewise.
3546 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
3549 * valops.c (value_struct_elt_for_reference): Call check_typedef on
3550 aggregate type to get its real type before accessing it.
3552 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
3554 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3555 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3556 * coff-pe-read.c (add_pe_forwarded_sym): Replace
3557 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3558 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3559 * jit.c (jit_breakpoint_re_set_internal): Likewise.
3560 * printcmd.c (info_address_command): Likewise.
3562 2018-05-29 Tom Tromey <tom@tromey.com>
3564 * windows-nat.c (handle_exception): Update fall-through comment.
3566 2018-05-29 Tom Tromey <tom@tromey.com>
3568 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
3569 (struct program_space) <added_solibs>: Now a std::vector.
3570 * breakpoint.c (print_solib_event): Update.
3571 (check_status_catch_solib): Update.
3572 * progspace.c (clear_program_space_solib_cache): Update.
3573 * solib.c (update_solib_list): Update.
3575 2018-05-29 Tom Tromey <tom@tromey.com>
3577 * python/py-type.c (typy_richcompare): Update.
3578 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3579 * gdbtypes.h (types_deeply_equal): Return bool.
3580 (types_equal): Likewise.
3581 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
3583 (check_types_equal): Change worklist to std::vector. Return
3585 (struct type_equality_entry): Add constructor.
3586 (compare_maybe_null_strings): Return bool.
3587 (check_types_worklist): Return bool. Change worklist to
3589 (types_deeply_equal): Use std::vector.
3590 (types_equal): Return bool.
3591 (compare_maybe_null_strings): Simplify.
3593 2018-05-29 Tom Tromey <tom@tromey.com>
3595 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
3597 2018-05-29 Tom Tromey <tom@tromey.com>
3599 * objc-lang.h: Don't include cp-support.h.
3600 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
3603 2018-05-27 Tom Tromey <tom@tromey.com>
3605 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3607 2018-05-25 Tom Tromey <tom@tromey.com>
3609 * value.c (value::location): Initialize.
3611 2018-05-25 Tom Tromey <tom@tromey.com>
3613 * dbxread.c (init_bincl_list): Remove.
3614 (bincl_list): Now a std::vector.
3615 (bincls_allocated, next_bincl): Remove.
3616 (free_bincl_list, do_free_bincl_list_cleanup)
3617 (make_cleanup_free_bincl_list): Remove.
3618 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3620 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3621 (struct header_file_location): Add constructor.
3622 (add_bincl_to_list): Remove.
3624 2018-05-25 Tom Tromey <tom@tromey.com>
3626 * tui/tui.c (tui_enable): Update.
3627 * mi/mi-interp.c (mi_interp::init): Update.
3628 * interps.h (class interp) <name>: New method.
3629 <m_name>: Rename from name.
3630 (~scoped_restore_interp): Update.
3631 * interps.c (interp::interp): Update.
3632 (interp_add, interp_set, interp_lookup_existing)
3633 (current_interp_named_p): Update.
3635 2018-05-25 Tom Tromey <tom@tromey.com>
3637 * interps.c (interp_name): Remove.
3638 * mi/mi-interp.c (mi_interp::init): Update.
3639 * interps.h (interp_name): Remove.
3640 (~scoped_restore_interp): Update.
3641 * tui/tui.c (tui_enable): Update.
3643 2018-05-25 Tom Tromey <tom@tromey.com>
3645 * utils.c (fputs_maybe_filtered): Update.
3646 * linespec.c (decode_line_full): Update.
3647 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3648 (mi_print_breakpoint_for_event, mi_solib_loaded)
3649 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3650 (mi_user_selected_context_changed): Update.
3651 * mi/mi-main.c (mi_execute_command): Update.
3652 * cli/cli-script.c (execute_control_command): Update.
3653 * python/python.c (execute_gdb_command): Update.
3654 * solib.c (info_sharedlibrary_command): Update.
3655 * interps.c (interp_ui_out): Remove.
3656 * interps.h (interp_ui_out): Remove.
3658 2018-05-25 Tom Tromey <tom@tromey.com>
3660 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3661 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3662 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3664 2018-05-25 Tom Tromey <tom@tromey.com>
3666 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3667 * interps.c (interp_exec): Use scoped_restore.
3669 2018-05-25 Tom Tromey <tom@tromey.com>
3671 * remote.c (remote_target::remote_file_get): Use
3673 (remote_target::remote_file_put): Likewise.
3675 2018-05-25 Tom Tromey <tom@tromey.com>
3677 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3679 (get_pe_section_index, add_pe_exported_sym): Update.
3680 (read_pe_exported_syms): Use gdb::def_vector.
3682 2018-05-25 Tom Tromey <tom@tromey.com>
3684 * frame.c (remove_prev_frame): Remove.
3685 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3687 2018-05-25 Maciej W. Rozycki <macro@mips.com>
3689 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3691 * mips-linux-nat.c (supply_fpregset): Always call
3692 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3693 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3694 `mips_fill_fpregset'.
3695 * mips-linux-tdep.c (mips_supply_fpregset)
3696 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3697 (mips_fill_fpregset_wrapper): Remove functions.
3698 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3699 (mips_linux_fpregset): Remove variable.
3700 (mips_linux_iterate_over_regset_sections): Use
3701 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3702 (mips_linux_o32_sigframe_init): Remove comment.
3704 2018-05-25 Pedro Alves <palves@redhat.com>
3706 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3707 (struct readahead_cache, struct packet_reg, struct
3708 remote_arch_state, class remote_state): Move higher up in the
3710 (remote_target::m_remote_state): Now an object instead of a pointer.
3711 (remote_target::get_remote_state): Adjust.
3713 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3715 * stack.c (select_and_print_frame): Delete.
3716 (struct function_bounds): Move struct within function.
3717 (func_command): Most content moved into new function
3718 find_frame_for_function, use new function, print result, add
3720 (find_frame_for_function): New function, now returns a result.
3722 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3724 * stack.c (iterate_over_block_arg_vars): Fix comment.
3725 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3727 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3731 (scoped_restore_selected_frame::scoped_restore_selected_frame):
3733 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3735 * frame.h (class scoped_restore_selected_frame): New class.
3736 * stack.c (print_frame_local_vars): Remove catching and rethrowing
3737 of any exception, use scoped_restore_selected_frame to restore the
3740 2018-05-24 Pedro Alves <palves@redhat.com>
3742 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3745 2018-05-23 Tom Tromey <tom@tromey.com>
3747 * complaints.c (struct complaints): Remove.
3748 (symfile_complaint_book): Remove.
3749 (series): New global.
3750 (complaint_internal): Update.
3751 (clear_complaints): Update.
3753 2018-05-23 Tom Tromey <tom@tromey.com>
3755 * complaints.c (counters): New global.
3756 (struct complain): Remove.
3757 (struct complaints) <root>: Remove.
3758 (complaint_sentinel): Remove.
3759 (symfile_complaint_book): Update.
3760 (find_complaint) Remove.
3761 (complaint_internal, clear_complaints): Update.
3763 2018-05-23 Tom Tromey <tom@tromey.com>
3765 * complaints.c (struct complain) <file, line>: Remove.
3766 (find_complaint): Remove file, line parameters.
3767 (complaint_internal): Update.
3769 2018-05-23 Tom Tromey <tom@tromey.com>
3771 * complaints.c (vcomplaint): Remove.
3772 (complaint_internal) Merge in contents of vcomplaint.
3774 2018-05-23 Tom Tromey <tom@tromey.com>
3776 * complaints.c (struct complaints) <explanation>: Remove.
3777 (symfile_explanations): Remove.
3778 (symfile_complaint_book): Update.
3779 (vcomplaint): Update.
3780 (struct explanation): Remove.
3782 2018-05-23 Tom Tromey <tom@tromey.com>
3784 * complaints.c (symfile_complaints): Remove.
3785 (complaint_internal): Remove "complaints" parameter.
3786 (clear_complaints, vcomplaint): Remove "c" parameter.
3787 (get_complaints): Remove.
3788 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3789 (dwarf2_debug_line_missing_file_complaint)
3790 (dwarf2_debug_line_missing_end_sequence_complaint)
3791 (dwarf2_complex_location_expr_complaint)
3792 (dwarf2_const_value_length_mismatch_complaint)
3793 (dwarf2_section_buffer_overflow_complaint)
3794 (dwarf2_macro_malformed_definition_complaint)
3795 (dwarf2_invalid_attrib_class_complaint)
3796 (create_addrmap_from_index, dw2_symtab_iter_next)
3797 (dw2_expand_marked_cus)
3798 (dw2_debug_names_iterator::find_vec_in_debug_names)
3799 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3800 (create_debug_type_hash_table, init_cutu_and_read_dies)
3801 (partial_die_parent_scope, add_partial_enumeration)
3802 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3803 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3804 (read_import_statement, read_file_scope, create_dwo_cu_reader)
3805 (create_cus_hash_table, create_dwp_hash_table)
3806 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3807 (dwarf2_rnglists_process, dwarf2_ranges_process)
3808 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3809 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3810 (handle_struct_member_die, process_structure_scope)
3811 (read_array_type, read_common_block, read_module_type)
3812 (read_tag_pointer_type, read_typedef, read_base_type)
3813 (read_subrange_type, load_partial_dies, partial_die_info::read)
3814 (partial_die_info::read, partial_die_info::read)
3815 (partial_die_info::read, read_checked_initial_length_and_offset)
3816 (dwarf2_string_attr, read_formatted_entries)
3817 (dwarf_decode_line_header)
3818 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3819 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3820 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3821 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3822 (get_signatured_type, get_DW_AT_signature_type)
3823 (decode_locdesc, file_file_name, consume_improper_spaces)
3824 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3825 (dwarf_decode_macro_bytes, dwarf_decode_macros)
3826 (dwarf2_symbol_mark_computed, set_die_type)
3827 (read_attribute_value): Update.
3828 * stap-probe.c (handle_stap_probe, get_stap_base_address):
3830 * dbxread.c (unknown_symtype_complaint)
3831 (lbrac_mismatch_complaint, repeated_header_complaint)
3832 (set_namestring, function_outside_compilation_unit_complaint)
3833 (read_dbx_symtab, process_one_symbol): Update.
3834 * gdbtypes.c (stub_noname_complaint): Update.
3835 * windows-nat.c (handle_unload_dll): Update.
3836 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3837 (decode_base_type): Update.
3838 * xcoffread.c (bf_notfound_complaint, ef_complaint)
3839 (eb_complaint, record_include_begin, record_include_end)
3840 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3841 (process_xcoff_symbol, read_symbol)
3842 (function_outside_compilation_unit_complaint)
3843 (scan_xcoff_symtab): Update.
3844 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3845 * buildsym.c (finish_block_internal, make_blockvector)
3846 (end_symtab_get_static_block, augment_type_symtab): Update.
3847 * dtrace-probe.c (dtrace_process_dof)
3848 (dtrace_static_probe_ops::get_probes): Update.
3849 * complaints.h (struct complaint): Don't declare.
3850 (symfile_complaints): Remove.
3851 (complaint_internal): Remove "complaints" parameter.
3852 (complaint): Likewise.
3853 (clear_complaints): Likewise.
3854 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3855 (reread_symbols): Update.
3856 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3857 (dwarf2_frame_cache, decode_frame_entry): Update.
3858 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3859 * objc-lang.c (lookup_objc_class, lookup_child_selector)
3860 (info_selectors_command): Update.
3861 * macrotab.c (macro_include, check_for_redefinition)
3862 (macro_undef): Update.
3863 * objfiles.c (filter_overlapping_sections): Update.
3864 * stabsread.c (invalid_cpp_abbrev_complaint)
3865 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3866 (define_symbol, error_type, read_type, rs6000_builtin_type)
3867 (stabs_method_name_from_physname, read_member_functions)
3868 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3869 (attach_fields_to_type, complain_about_struct_wipeout)
3870 (read_range_type, read_args, common_block_start)
3871 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
3873 * mdebugread.c (index_complaint, unknown_ext_complaint)
3874 (basic_type_complaint, bad_tag_guess_complaint)
3875 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
3876 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
3877 (parse_procedure, parse_lines)
3878 (function_outside_compilation_unit_complaint)
3879 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
3880 (bad_tag_guess_complaint, reg_value_complaint): Update.
3881 * cp-support.c (demangled_name_complaint): Update.
3882 * macroscope.c (sal_macro_scope): Update.
3883 * dwarf-index-write.c (class debug_names): Update.
3885 2018-05-23 Tom Tromey <tom@tromey.com>
3887 * complaints.c (clear_complaints): Remove "noisy" parameter.
3888 * complaints.h (clear_complaints): Update.
3889 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3890 (reread_symbols): Update.
3892 2018-05-23 Tom Tromey <tom@tromey.com>
3894 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
3896 (vcomplaint, clear_complaints): Update.
3897 (symfile_explanations): Remove some messages.
3899 2018-05-23 Tom Tromey <tom@tromey.com>
3901 * complaints.c (internal_complaint): Remove.
3902 * complaints.h (internal_complaint): Remove.
3904 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3906 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
3908 2018-05-22 Pedro Alves <palves@redhat.com>
3910 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
3911 (remote_fileio_badfd, remote_fileio_return_errno)
3912 (remote_fileio_return_success, remote_fileio_func_open)
3913 (remote_fileio_func_open, remote_fileio_func_close)
3914 (remote_fileio_func_read, remote_fileio_func_write)
3915 (remote_fileio_func_lseek, remote_fileio_func_rename)
3916 (remote_fileio_func_unlink, remote_fileio_func_stat)
3917 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
3918 (remote_fileio_func_isatty, remote_fileio_func_system): Add
3919 remote_target parameter.
3920 (remote_fio_func_map) <func>: Add remote_target parameter.
3921 (do_remote_fileio_request, remote_fileio_request):
3922 * remote-fileio.h (remote_fileio_request):
3923 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
3924 remote_target parameter.
3925 (remote_notif_process, handle_notification): Adjust to pass down
3927 (remote_notif_state_allocate): Add remote_target parameter. Save
3929 * remote-notif.h (struct remote_target): Forward declare.
3930 (struct notif_client) <parse, ack, can_get_pending_events>: Add
3931 remote_target parameter.
3932 (struct remote_notif_state) <remote>: New field.
3933 (remote_notif_ack, remote_notif_parse): Add remote_target
3935 (remote_notif_state_allocate, remote_notif_state_allocate): Add
3936 remote_target parameter.
3937 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
3938 (threads_listing_context, rmt_thread_action, protocol_feature)
3939 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
3940 (packet_result, struct threads_listing_context, remote_state):
3941 Move definitions and declarations higher up.
3942 (remote_target) <~remote_target>: Declare.
3943 (remote_download_command_source, remote_file_put, remote_file_get)
3944 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
3945 (remote_hostio_pread_vFile, remote_hostio_send_command)
3946 (remote_hostio_set_filesystem, remote_hostio_open)
3947 (remote_hostio_close, remote_hostio_unlink, remote_state)
3948 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
3949 (get_memory_write_packet_size, get_memory_read_packet_size)
3950 (append_pending_thread_resumptions, remote_detach_1)
3951 (append_resumption, remote_resume_with_vcont)
3952 (add_current_inferior_and_thread, wait_ns, wait_as)
3953 (process_stop_reply, remote_notice_new_inferior)
3954 (process_initial_stop_replies, remote_add_thread)
3955 (btrace_sync_conf, remote_btrace_maybe_reopen)
3956 (remove_new_fork_children, kill_new_fork_children)
3957 (discard_pending_stop_replies, stop_reply_queue_length)
3958 (check_pending_events_prevent_wildcard_vcont)
3959 (discard_pending_stop_replies_in_queue, stop_reply)
3960 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
3961 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
3962 (remote_interrupt_as, remote_interrupt_ns)
3963 (remote_get_noisy_reply, remote_query_attached)
3964 (remote_add_inferior, remote_current_thread, get_current_thread)
3965 (set_thread, set_general_thread, set_continue_thread)
3966 (set_general_process, write_ptid)
3967 (remote_unpack_thread_info_response, remote_get_threadinfo)
3968 (parse_threadlist_response, remote_get_threadlist)
3969 (remote_threadlist_iterator, remote_get_threads_with_ql)
3970 (remote_get_threads_with_qxfer)
3971 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
3972 (get_offsets, remote_check_symbols, remote_supported_packet)
3973 (remote_query_supported, remote_packet_size)
3974 (remote_serial_quit_handler, remote_detach_pid)
3975 (remote_vcont_probe, remote_resume_with_hc)
3976 (send_interrupt_sequence, interrupt_query)
3977 (remote_notif_get_pending_events, fetch_register_using_p)
3978 (send_g_packet, process_g_packet, fetch_registers_using_g)
3979 (store_register_using_P, store_registers_using_G)
3980 (set_remote_traceframe, check_binary_download)
3981 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
3982 (remote_xfer_live_readonly_partial, remote_read_bytes)
3983 (remote_send_printf, remote_flash_write, readchar)
3984 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
3985 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
3986 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
3987 (extended_remote_disable_randomization, extended_remote_run)
3988 (send_environment_packet, extended_remote_environment_support)
3989 (extended_remote_set_inferior_cwd, remote_write_qxfer)
3990 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
3991 (packet_command): Now methods of ...
3992 (remote_target): ... this class.
3993 (m_remote_state) <remote_target>: New field.
3994 (struct remote_state) <stop_reply_queue,
3995 remote_async_inferior_event_token, wait_forever_enabled_p>: New
3997 (remote_state::remote_state): Allocate stop_reply_queue.
3998 (remote_state): Delete global.
3999 (get_remote_state_raw): Delete.
4000 (remote_target::get_remote_state): Allocate m_remote_state on
4002 (get_current_remote_target): New.
4003 (remote_ops, extended_remote_ops): Delete.
4004 (wait_forever_enabled_p, remote_async_inferior_event_token):
4005 Delete, moved to struct remote_state.
4006 (remote_target::close): Delete self. Destruction bits split to
4008 (remote_target::~remote_target): ... this.
4009 (show_memory_packet_size): Adjust to use
4010 get_current_remote_target.
4011 (struct protocol_feature) <func>: Add remote_target parameter.
4012 All callers adjusted.
4013 (curr_quit_handler_target): New.
4014 (remote_serial_quit_handler): Reimplement.
4015 (remote_target::open_1): Adjust to use get_current_remote_target.
4016 Heap-allocate remote_target/extended_remote_target instances.
4017 (vcont_builder::vcont_builder): Add remote_target parameter, and
4018 save it in m_remote. All callers adjusted.
4019 (vcont_builder::m_remote): New field.
4020 (vcont_builder::restart, vcont_builder::flush)
4021 (vcont_builder::push_action): Use it.
4022 (remote_target::commit_resume): Use it.
4023 (struct queue_iter_param) <remote>: New field.
4024 (remote_target::remove_new_fork_children): Fill in 'remote' field.
4025 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4026 (check_pending_event_prevents_wildcard_vcont_callback)
4027 (remote_target::check_pending_events_prevent_wildcard_vcont)
4028 (remote_target::discard_pending_stop_replies)
4029 (remote_target::discard_pending_stop_replies_in_queue)
4030 (remote_target::remote_notif_remove_queued_reply): Fill in
4032 (remote_notif_get_pending_events): New.
4033 (remote_target::readchar, remote_target::remote_serial_write):
4034 Save/restore curr_quit_handler_target.
4036 (kill_new_fork_children): Fill in 'remote' field.
4037 (packet_command): Use get_current_remote_target, defer to
4038 remote_target method of same name.
4039 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4040 parameter, and save it in m_remote. All callers adjusted.
4041 (scoped_remote_fd::release): Use m_remote.
4042 (scoped_remote_fd::m_remote): New field.
4043 (remote_file_put, remote_file_get, remote_file_delete): Use
4044 get_current_remote_target, defer to remote_target method of same
4046 (remote_btrace_reset): Add remote_state paremeter. Update all
4048 (remote_async_inferior_event_handler). Pass down 'data'.
4049 (remote_new_objfile): Use get_current_remote_target.
4050 (remote_target::vcont_r_supported): New.
4051 (set_range_stepping): Use get_current_remote_target and
4052 remote_target::vcont_r_supported.
4053 (_initialize_remote): Don't allocate 'remote_state' and
4054 'stop_reply_queue' globals.
4055 * remote.h (struct remote_target): Forward declare.
4056 (getpkt, putpkt, remote_notif_get_pending_events): Add
4057 'remote_target' parameter.
4059 2018-05-22 Pedro Alves <palves@redhat.com>
4061 * remote.c (vcont_builder): Now a class. Make all data members
4063 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4065 (vcont_builder_restart): Rename to ...
4066 (vcont_builder::restart): ... this.
4067 (vcont_builder_flush): Rename to ...
4068 (vcont_builder::flush): ... this.
4069 (vcont_builder_push_action): Rename to ...
4070 (vcont_builder::push_action): ... this.
4071 (remote_target::commit_resume): Adjust.
4073 2018-05-22 Pedro Alves <palves@redhat.com>
4075 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4076 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4077 (get_fixed_memory_packet_size): New.
4078 (get_memory_packet_size): Use it.
4079 (set_memory_packet_size): Don't override the config size with
4080 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4081 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4082 Don't refer to get_memory_packet_size if not connected to a remote
4083 target. Show "(default)" if configured size is 0.
4085 2018-05-22 Pedro Alves <palves@redhat.com>
4087 * remote.c (remote_target::mourn_inferior): Move
4088 discard_pending_stop_replies call here from ...
4089 (_initialize_remote): ... here.
4091 2018-05-22 Pedro Alves <palves@redhat.com>
4093 * remote.c (compare_section_command): Remove set_general_process
4096 2018-05-22 Pedro Alves <palves@redhat.com>
4098 * remote.c (struct packet_reg, struct remote_arch_state):
4099 Move higher up in the file.
4100 (remote_state) <m_arch_states>: Store remote_arch_state values
4101 instead of remote_arch_state pointers.
4102 (remote_state::get_remote_arch_state): Adjust.
4104 2018-05-22 Pedro Alves <palves@redhat.com>
4106 * remote.c: Include <unordered_map>.
4107 (remote_state): Now a class.
4108 (remote_state) <get_remote_arch_state>: Declare method.
4109 <get_remote_arch_state>: New field.
4110 (remote_arch_state) <remote_arch_state>: Declare ctor.
4111 <regs>: Now a unique_ptr.
4112 (remote_gdbarch_data_handle): Delete.
4113 (get_remote_arch_state): Delete.
4114 (remote_state::get_remote_arch_state): New.
4115 (get_remote_state): Adjust to call remote_state's
4116 get_remote_arch_state method.
4117 (init_remote_state): Delete, bits factored out to ...
4118 (remote_arch_state::remote_arch_state): ... this new method.
4119 (get_remote_packet_size, get_memory_packet_size)
4120 (process_g_packet, remote_target::fetch_registers)
4121 (remote_target::prepare_to_store, store_registers_using_G)
4122 (remote_target::store_registers, remote_target::get_trace_status):
4123 Adjust to call remote_state's method.
4124 (_initialize_remote): Remove reference to
4125 remote_gdbarch_data_handle.
4127 2018-05-22 Pedro Alves <palves@redhat.com>
4129 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4130 pread>: New method declarations.
4131 (remote_target::open_1): Adjust.
4132 (readahead_cache_invalidate): Rename to ...
4133 (readahead_cache::invalidate): ... this, and adjust to be a class
4135 (readahead_cache_invalidate_fd): Rename to ...
4136 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4138 (remote_hostio_pwrite): Adjust.
4139 (remote_hostio_pread_from_cache): Rename to ...
4140 (readahead_cache::pread): ... this, and adjust to be a class
4142 (remote_hostio_close): Adjust.
4144 2018-05-22 Pedro Alves <palves@redhat.com>
4146 * remote.c (remote_hostio_close_cleanup): Delete.
4147 (class scoped_remote_fd): New.
4148 (remote_file_put, remote_file_get): Use it.
4150 2018-05-22 Pedro Alves <palves@redhat.com>
4152 (struct vCont_action_support): Use bool and initialize all fields.
4153 (struct readahead_cache): Initialize all fields.
4154 (remote_state): Use bool and initialize all fields.
4155 (remote_state::remote_state, remote_state::~remote_state): New.
4156 (new_remote_state): Delete.
4157 (_initialize_remote): Use new to allocate remote_state.
4159 2018-05-22 Pedro Alves <palves@redhat.com>
4163 * c-exp.y: Include "c-support.h".
4164 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4165 of tolower. Use c_ident_is_alpha to scan names.
4166 * c-lang.c: Include "c-support.h".
4167 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4168 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4169 * c-support.h: New file, with bits factored out from ...
4170 * cp-name-parser.y: ... this file.
4171 Include "c-support.h".
4172 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4173 c-support.h and renamed.
4174 (symbol_end, yylex): Adjust.
4176 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4178 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4179 parameter type to CORE_ADDR.
4180 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4181 parameter type in declaration to CORE_ADDR.
4182 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4183 target_auxv_search to get AT_HWCAP and use the result to get the
4185 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4186 to CORE_ADDR. Remove the cast of the return value to unsigned
4187 long. Fix error predicate of target_auxv_search.
4188 (ppc_linux_nat_target::read_description): Change the type of the
4189 hwcap variable to CORE_ADDR.
4191 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4193 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4194 if the size of fpscr is larger than 32 bits.
4196 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4198 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4199 (ppc32_linux_vsxregmap): New global.
4200 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4201 regcache_supply_regset, and regcache_collect_regset.
4202 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4203 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4204 (fetch_vsx_register, store_vsx_register): Remove.
4205 (fetch_vsx_registers): Add regno parameter. Get regset using
4206 ppc_linux_vsxregset. Use regset to supply registers.
4207 (store_vsx_registers): Add regno parameter. Get regset using
4208 ppc_linux_vsxregset. Use regset to collect registers.
4209 (fetch_register): Call fetch_vsx_registers instead of
4211 (store_register): Call store_vsx_registers instead of
4213 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4214 new regno parameter.
4215 (store_ppc_registers): Call store_vsx_registers with -1 for the
4216 new regno parameter.
4217 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4218 (ppc_collect_vsxregset): Remove.
4220 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4222 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4224 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4225 for vector register offset fields.
4226 (ppc64_fbsd_reg_offsets): Likewise.
4227 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4228 to vector register offset fields.
4229 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4230 to vector register offset fields.
4231 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4232 vector register offset fields.
4233 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4234 initializers for vector register offset fields.
4235 (rs6000_aix64_reg_offsets): Likewise.
4236 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4237 (ppc_supply_vrregset): Remove.
4238 (ppc_collect_vrregset): Remove.
4239 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4240 (ppc_linux_vrregset) : New function.
4241 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4242 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4243 (ppc32_linux_vrregset): Remove.
4244 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4245 and use result instead of ppc32_linux_vrregset.
4246 (ppc32_linux_reg_offsets): Remove initializers for vector register
4248 (ppc64_linux_reg_offsets): Likewise.
4249 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4250 * ppc-linux-nat.c: Include regset.h.
4251 (gdb_vrregset_t): Adjust comment to account for little-endian
4253 (supply_vrregset, fill_vrregset): Remove.
4254 (fetch_altivec_register, store_altivec_register): Remove.
4255 (fetch_altivec_registers): Add regno parameter. Get regset using
4256 ppc_linux_vrregset. Use regset to supply registers.
4257 (store_altivec_registers): Add regno parameter. Get regset using
4258 ppc_linux_vrregset. Use regset to collect registers.
4259 (fetch_register): Call fetch_altivec_registers instead of
4260 fetch_altivec_register.
4261 (store_register): Call store_altivec_registers instead of
4262 store_altivec_register.
4263 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4264 the new regno parameter.
4265 (store_ppc_registers): Call store_altivec_registers with -1 for
4266 the new regno parameter.
4268 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4270 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4271 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4272 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4273 (gdb_vrregset_t): Change array type size to
4274 PPC_LINUX_SIZEOF_VRREGSET.
4275 (gdb_vsxregset_t): Change array type size to
4276 PPC_LINUX_SIZEOF_VSXREGSET.
4277 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4278 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4279 PPC_LINUX_SIZEOF_VSXREGSET.
4281 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4283 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4284 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4286 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4287 ppc_linux_target_wordsize with tid.
4288 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4290 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4291 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4292 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4293 tid parameter. Remove static specifier.
4294 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4295 (ppc_linux_target_wordsize): New declaration.
4297 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4299 * arch/ppc-linux-common.c: New file.
4300 * arch/ppc-linux-common.h: New file.
4301 * arch/ppc-linux-tdesc.h: New file.
4302 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4303 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4304 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4305 arch/ppc-linux-tdesc.h.
4306 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4307 arch/ppc-linux-tdesc.h.
4308 (ppc_linux_nat_target::read_description): Remove target
4309 description matching code. Fill a ppc_linux_features struct and
4310 call ppc_linux_match_description with it. Move comment about ISA
4311 2.05 to ppc-linux-common.c.
4312 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4313 arch/ppc-linux-tdesc.h.
4314 (ppc_linux_core_read_description): Remove target description
4315 matching code. Fill a ppc_linux_features struct and call
4316 ppc_linux_match_description with it.
4317 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4318 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4319 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4320 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4321 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4322 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4323 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4324 (tdesc_powerpc_e500l): Remove.
4326 2018-05-22 Joel Brobecker <brobecker@adacore.com>
4328 * ada-lang.c (catch_assert_command): Pass empty string instead
4329 of NULL for excep_string argument.
4331 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4333 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4334 the width of the requested register exceeds the width of the
4337 2018-05-21 Tom Tromey <tom@tromey.com>
4339 * printcmd.c (output_command): Remove.
4340 (output_command_const): Rename to output_command.
4341 * valprint.h (output_command): Rename from output_command_const.
4342 * tracepoint.c (trace_dump_actions): Call output_command.
4344 2018-05-21 Tom Tromey <tom@tromey.com>
4346 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4347 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4348 * ada-lang.h (create_ada_exception_catchpoint): Update.
4349 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4351 (create_excep_cond_exprs, ~ada_catchpoint)
4352 (should_stop_exception, print_one_exception)
4353 (print_mention_exception, print_recreate_exception): Update.
4354 (ada_get_next_arg): Remove.
4355 (catch_ada_exception_command_split): Use std::string. Change type
4356 of "excep_string", "cond_string".
4357 (catch_ada_exception_command): Update.
4358 (create_ada_exception_catchpoint): Change type of excep_string.
4359 (ada_exception_sal): Remove excep_string parameter.
4360 (~ada_catchpoint): Remove.
4362 2018-05-21 Tom Tromey <tom@tromey.com>
4364 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4367 2018-05-21 Tom Tromey <tom@tromey.com>
4369 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4370 Return unique_xmalloc_ptr.
4371 (print_it_exception): Update.
4373 2018-05-21 Tom Tromey <tom@tromey.com>
4375 * tracepoint.c (trace_dump_actions): Use std::string.
4377 2018-05-21 Tom Tromey <tom@tromey.com>
4379 * symfile.c (reread_symbols): Use std::string for original_name.
4381 2018-05-21 Tom Tromey <tom@tromey.com>
4383 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4384 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4387 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4389 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4391 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4392 * objfiles.c (get_objfile_bfd_data): Allocate
4393 objfile_per_bfd_storage with obstack_new when allocating on
4396 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4398 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4400 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4401 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4402 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4403 (add_pending): Likewise.
4404 (parse_symbol): Likewise.
4405 (parse_partial_symbols): Likewise.
4406 (psymtab_to_symtab_1): Likewise.
4407 (new_psymtab): Likewise.
4408 (elfmdebug_build_psymtabs): Likewise.
4409 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4410 * objfiles.c (get_objfile_bfd_data): Likewise.
4411 (objfile_register_static_link): Likewise.
4412 * psymtab.c (allocate_psymtab): Likewise.
4413 * stabsread.c (read_member_functions): Likewise.
4414 * xcoffread.c (xcoff_end_psymtab): Likewise.
4416 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4418 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4419 compiler supports std::is_trivially_constructible.
4420 * common/poison.h: Include obstack.h.
4421 (IsMallocable): Define to is_trivially_constructible if the
4422 compiler supports it, define to true_type otherwise.
4426 (XOBNEWVEC): Redefine.
4427 * gdb_obstack.h (obstack_zalloc): New.
4428 (OBSTACK_ZALLOC): Redefine.
4429 (obstack_calloc): New.
4430 (OBSTACK_CALLOC): Redefine.
4432 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4433 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4435 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4436 obstack_calloc/obstack_zalloc.
4437 (gdbarch_obstack_zalloc): Remove.
4438 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4440 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4442 * stack.c (backtrace_command_1): Remove useless variable int i.
4444 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4446 * stack.c (print_frame_info): Fix comment.
4448 2018-05-18 Tom Tromey <tom@tromey.com>
4450 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4451 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4452 (~dwarf2_per_objfile): Update
4453 (dwarf2_get_dwz_file): Use new.
4454 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4457 2018-05-18 Tom Tromey <tom@tromey.com>
4459 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4461 * dwarf2read.c (struct dwp_file): Add constructor and
4463 (open_and_init_dwp_file): Return a unique_ptr.
4464 (dwarf2_per_objfile, create_dwp_hash_table)
4465 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4466 (lookup_dwo_unit_in_dwp): Update.
4467 (open_and_init_dwp_file, get_dwp_file): Update.
4469 2018-05-18 Tom Tromey <tom@tromey.com>
4471 * dwarf2read.c (dwarf2_per_objfile): Update.
4472 (struct mapped_index): Add initializers.
4473 (dwarf2_read_index): Use new.
4474 (dw2_symtab_iter_init): Update.
4475 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4478 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4480 * dwarf2read.c (mapped_index) <total_size>: Remove.
4482 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4484 * unittests/format_pieces-selftests.c (test_format_specifier):
4487 2018-05-18 Tom Tromey <tom@tromey.com>
4489 * c-typeprint.c (maybe_print_hole): New function.
4490 (c_print_type_struct_field_offset): Update.
4491 (c_type_print_base_struct_union): Call maybe_print_hole.
4493 2018-05-17 Keith Seitz <keiths@redhat.com>
4495 * breakpoint.c (build_bpstat_chain): New function, moved from
4497 (bpstat_stop_status): Add optional parameter, `stop_chain'.
4498 If no stop chain is passed, call build_bpstat_chain to build it.
4499 * breakpoint.h (build_bpstat_chain): Declare.
4500 (bpstat_stop_status): Move documentation here from breakpoint.c.
4501 * infrun.c (handle_signal_stop): Before eliding inlined frames,
4502 build the stop chain and pass it to skip_inline_frames.
4503 Pass this stop chain to bpstat_stop_status.
4504 * inline-frame.c: Include breakpoint.h.
4505 (stopped_by_user_bp_inline_frame): New function.
4506 (skip_inline_frames): Add parameter `stop_chain'.
4507 Move documention to inline-frame.h.
4508 If non-NULL, use stopped_by_user_bp_inline_frame to determine
4509 whether the frame should be elided.
4510 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4511 Add moved documentation and update for new parameter.
4513 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4516 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4517 unittests/format_pieces-selftests.c.
4518 * common/format.h (format_piece) <operator==>: New.
4519 (format_pieces) <operator[]>: Remove.
4520 * common/format.c (format_pieces::format_pieces): Handle \e.
4521 * unittests/format_pieces-selftests.c: New.
4523 2018-05-17 Tom Tromey <tom@tromey.com>
4526 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4527 (dw2_instantiate_symtab): Add skip_partial parameter.
4528 (dw2_find_last_source_symtab, dw2_map_expand_apply)
4529 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4530 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4531 (dw2_expand_symtabs_matching_one)
4532 (dw2_find_pc_sect_compunit_symtab)
4533 (dw2_debug_names_lookup_symbol)
4534 (dw2_debug_names_expand_symtabs_for_function): Update.
4535 (init_cutu_and_read_dies): Add skip_partial parameter.
4536 (process_psymtab_comp_unit, build_type_psymtabs_1)
4537 (process_skeletonless_type_unit, load_partial_comp_unit)
4538 (psymtab_to_symtab_1): Update.
4539 (load_full_comp_unit): Add skip_partial parameter.
4540 (process_imported_unit_die, dwarf2_read_addr_index)
4541 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4542 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4543 (read_signatured_type): Update.
4545 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4547 * value.c (release_value): Remove unused variable.
4548 (record_latest_value): Likewise.
4549 (access_value_history): Likewise.
4550 (preserve_values): Likewise.
4552 2018-05-17 Tom Tromey <tom@tromey.com>
4554 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4557 2018-05-16 Maciej W. Rozycki <macro@mips.com>
4560 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4561 Also handle registers whose width is not a multiple of
4563 (linux_nat_trad_target::store_register): Likewise.
4565 2018-05-16 Tom Tromey <tom@tromey.com>
4567 * gdbcore.h (core_bfd): Redefine.
4568 * corelow.c (core_target::close): Update.
4569 (core_target_open): Update.
4570 * progspace.h (struct program_space) <cbfd>: Now a
4573 2018-05-16 Tom Tromey <tom@tromey.com>
4576 * symfile-add-flags.h (enum symfile_add_flags)
4577 <SYMFILE_NOT_FILENAME>: New constant.
4578 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
4579 objfile name from BFD.
4580 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4581 * minidebug.c (find_separate_debug_file_in_section): Put
4582 ".gnu_debugdata" into BFD's file name.
4584 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
4586 * regcache.c (regcache_read_ftype, regcache_write_ftype):
4589 2018-05-15 Tamar Christina <tamar.christina@arm.com>
4592 * aarch64-tdep.c (aarch64_analyze_prologue,
4593 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4594 Indicate not interested in errors.
4596 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4598 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4599 Supply the MIPS_ZERO_REGNUM register.
4601 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4603 * mips-tdep.c (mask_address_var): Make variable static.
4605 2018-05-14 Tom Tromey <tom@tromey.com>
4607 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4609 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
4611 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4612 FXSAVE_ADDR for the mxcsr register.
4614 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
4616 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4618 2018-05-11 Pedro Alves <palves@redhat.com>
4620 * corelow.c (core_target) <core_target>: No longer inline.
4621 Initialize m_core_gdbarch, m_core_vec and build the section table
4623 <~core_target>: New.
4624 <core_gdbarch, get_core_register_section>: New methods.
4625 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4626 factored out from ...
4627 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4629 (sniff_core_bfd): Add gdbarch parameter.
4630 (core_close): Delete, merged into ...
4631 (core_target::close): ... here. Delete self.
4632 (core_close_cleanup): Delete.
4633 (core_target_open): Allocate a core_target on the heap. Use a
4634 unique_ptr instead of a cleanup. Bits moved into the core_target
4635 ctor. Adjust to use core_target methods instead of globals.
4636 (get_core_register_section): Rename to ...
4637 (core_target::get_core_register_section): ... this and adjust.
4638 (struct get_core_registers_cb_data): New.
4639 (get_core_registers_cb): Use it. Use bool.
4640 (core_target::fetch_registers, core_target::files_info)
4641 (core_target::xfer_partial, core_target::read_description)
4642 (core_target::pid_to, core_target::thread_name): Adjust to
4643 reference class fields instead of globals.
4644 * target.h (struct target_ops_deleter, target_ops_up): New.
4646 2018-05-11 Pedro Alves <palves@redhat.com>
4648 * corefile.c (core_file_command): Move to corelow.c.
4649 * corelow.c (the_core_target): Delete.
4650 (core_file_command): Moved from corefile.c. Check exec_bfd
4651 instead of the_core_target. Use target_detach instead of calling
4652 into the_core_target directly.
4653 (maybe_say_no_core_file_now): New.
4654 (core_target::detach): Use it.
4655 (_initialize_corelow): Remove references to the_core_target.
4656 * gdbcore.h (the_core_target): Delete.
4658 2018-05-11 Tom Tromey <tromey@redhat.com>
4659 Pedro Alves <palves@redhat.com>
4661 * corefile.c (core_bfd): Remove.
4662 * gdbcore.h (core_bfd): Now a macro.
4663 * progspace.h (struct program_space) <cbfd>: New field.
4665 2018-05-11 Tom Tromey <tom@tromey.com>
4667 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4670 2018-05-10 Tom Tromey <tom@tromey.com>
4672 * configure: Rebuild.
4673 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4675 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4678 * regformats/regdat.sh: Adjust script, following the addition
4679 of the new expedite_regs parameter to init_target_desc.
4681 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
4684 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4685 set_gdbarch_significant_addr_bit.
4686 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4687 set_gdbarch_significant_addr_bit.
4688 * utils.c (address_significant): Update to sign extend addr.
4690 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
4692 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4693 (xtensa_linux_init_abi): Limit tdep->num_regs by
4694 tdep->num_nopriv_regs.
4695 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4696 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4699 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
4701 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4703 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4705 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4706 (I387_MXCSR_INIT_VAL): New constant.
4707 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4708 buffer if it was supplied by the inferior.
4709 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4710 (i387_xsave_get_clear_bv): New function.
4711 (i387_supply_xsave): Only read x87 control registers from the
4712 xsave buffer if the feature is enabled, and the state will have
4713 been written, otherwise, provide a suitable default.
4714 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4715 including x87 control registers. Update control registers if they
4716 have changed from the default value, and mark features as enabled
4718 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4720 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4722 * spu-tdep.c (info_spu_event_command): Fix output formatting.
4724 2018-05-07 Tom Tromey <tom@tromey.com>
4726 * configure: Rebuild.
4727 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4729 2018-05-07 Tom Tromey <tom@tromey.com>
4732 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4733 bit. Use correct value for VDIV.
4735 2018-05-04 Tom Tromey <tom@tromey.com>
4737 * configure: Rebuild.
4738 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4740 2018-05-04 Tom Tromey <tom@tromey.com>
4742 * linux-record.c (record_linux_system_call) <case
4743 RECORD_SYS_RECVFROM>: Add "break".
4745 2018-05-04 Tom Tromey <tom@tromey.com>
4747 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4748 Add missing "break".
4749 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4750 Add missing "break".
4752 2018-05-04 Tom Tromey <tom@tromey.com>
4754 * rs6000-tdep.c (ppc_process_record_op4)
4755 (ppc_process_record_op63): Add fall-through comment.
4757 2018-05-04 Tom Tromey <tom@tromey.com>
4759 * i386-tdep.c (i386_process_record): Add fall-through comment.
4761 2018-05-04 Tom Tromey <tom@tromey.com>
4763 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4766 2018-05-04 Tom Tromey <tom@tromey.com>
4768 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4769 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4770 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4772 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4774 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4777 2018-05-04 Tom Tromey <tom@tromey.com>
4779 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4781 2018-05-04 Tom Tromey <tom@tromey.com>
4783 * s390-tdep.c (s390_process_record): Fix fall-through comments.
4784 * xcoffread.c (scan_xcoff_symtab): Move comment later.
4785 * symfile.c (section_is_mapped): Fix fall-through comment.
4786 * stabsread.c (define_symbol, read_member_functions): Fix
4787 fall-through comment.
4788 * s390-linux-tdep.c (s390_process_record): Fix fall-through
4790 * remote.c (remote_wait_as): Fix fall-through comment.
4791 * p-exp.y (yylex): Fix fall-through comment.
4792 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4794 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4795 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4796 * jv-exp.y (yylex): Fix fall-through comment.
4797 * go-exp.y (lex_one_token): Fix fall-through comment.
4798 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4799 fall-through comment.
4800 * f-exp.y (yylex): Fix fall-through comment.
4801 * dwarf2read.c (process_die): Fix fall-through comments.
4802 * dbxread.c (process_one_symbol): Fix fall-through comment.
4803 * d-exp.y (lex_one_token): Fix fall-through comment.
4804 * cp-name-parser.y (yylex): Fix fall-through comment.
4805 * coffread.c (coff_symtab_read): Fix fall-through comment.
4806 * c-exp.y (lex_one_token): Fix fall-through comment.
4807 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4809 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4812 2018-05-04 Tom Tromey <tom@tromey.com>
4815 * NEWS: Mention gdb.execute change.
4816 * gdbcmd.h (execute_control_command): Don't declare.
4817 * python/python.c (execute_gdb_command): Use read_command_lines_1,
4818 execute_control_commands, execute_control_commands_to_string.
4819 * cli/cli-script.h (execute_control_commands)
4820 (execute_control_commands_to_string): Declare.
4821 (execute_control_command): Add from_tty parameter.
4822 * cli/cli-script.c (execute_control_commands)
4823 (execute_control_commands_to_string): New functions.
4824 (execute_user_command): Use execute_control_commands.
4825 (execute_control_command_1): Add "from_tty" parameter. Update.
4826 (execute_control_command): Likewise.
4828 2018-05-04 Tom Tromey <tom@tromey.com>
4831 * NEWS: Mention that breakpoint commands are writable.
4832 * python/py-breakpoint.c (bppy_set_commands): New function.
4833 (breakpoint_object_getset) <"commands">: Use it.
4835 2018-05-04 Tom Tromey <tom@tromey.com>
4837 * tracepoint.c (actions_command): Update.
4838 * mi/mi-cmd-break.c (mi_command_line_array)
4839 (mi_command_line_array_cnt, mi_command_line_array_ptr)
4840 (mi_read_next_line): Remove.
4841 (mi_cmd_break_commands): Update.
4842 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4844 * cli/cli-script.c (get_command_line): Update.
4845 (process_next_line): Use function_view. Constify.
4846 (recurse_read_control_structure, read_command_lines)
4847 (read_command_lines_1): Change argument types to function_view.
4848 (do_define_command, document_command): Update.
4849 * breakpoint.h (check_tracepoint_command): Don't declare.
4850 * breakpoint.c (check_tracepoint_command): Remove.
4851 (commands_command_1, create_tracepoint_from_upload): Update.
4853 2018-05-04 Tom Tromey <tom@tromey.com>
4856 * cli/cli-script.h (enum command_control_type) <define_control>:
4858 * cli/cli-script.c (multi_line_command_p): Handle define_control.
4859 (build_command_line, execute_control_command_1)
4860 (process_next_line): Likewise.
4861 (do_define_command): New function, extracted from define_command.
4862 (define_command): Use it.
4864 2018-05-04 Tom Tromey <tom@tromey.com>
4866 * tracepoint.c (actions_command): Update.
4867 * cli/cli-script.h (read_command_lines): Update.
4868 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4869 (MAX_TMPBUF): Remove define.
4870 (define_command): Use string_printf.
4871 (document_command): Likewise.
4872 * breakpoint.c (commands_command_1): Update.
4874 2018-05-04 Tom Tromey <tom@tromey.com>
4876 * top.c (execute_command): Update.
4877 * cli/cli-script.h (print_command_lines): Now varargs.
4878 * cli/cli-script.c (print_command_lines): Now varargs.
4879 (execute_control_command_1) <case while_control, case if_control>:
4882 2018-05-04 Tom Tromey <tom@tromey.com>
4884 * tracepoint.c (all_tracepoint_actions): Rename from
4885 all_tracepoint_actions_and_cleanup. Change return type.
4886 (actions_command, encode_actions_1, encode_actions)
4887 (trace_dump_actions, tdump_command): Update.
4888 * remote.c (remote_download_command_source): Update.
4889 * python/python.c (gdbpy_eval_from_control_command)
4890 (python_command, python_interactive_command): Update.
4891 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
4892 * guile/guile.c (guile_command)
4893 (gdbscm_eval_from_control_command, guile_command): Update.
4894 * compile/compile.c (compile_code_command)
4895 (compile_print_command, compile_to_object): Update.
4896 * cli/cli-script.h (struct command_lines_deleter): New.
4897 (counted_command_line): New typedef.
4898 (struct command_line): Add constructor, destructor.
4899 <body_list>: Remove.
4900 <body_list_0, body_list_1>: New members.
4901 (command_line_up): Remove typedef.
4902 (read_command_lines, read_command_lines_1, get_command_line):
4904 (copy_command_lines): Don't declare.
4905 * cli/cli-script.c (build_command_line): Use "new".
4906 (get_command_line): Return counted_command_line.
4907 (print_command_lines, execute_user_command)
4908 (execute_control_command_1, while_command, if_command): Update.
4909 (realloc_body_list): Remove.
4910 (process_next_line, recurse_read_control_structure): Update.
4911 (read_command_lines, read_command_lines_1): Return counted_command_line.
4912 (free_command_lines): Use "delete".
4913 (copy_command_lines): Remove.
4914 (define_command, document_command, show_user_1): Update.
4915 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
4916 a counted_command_line.
4917 * breakpoint.h (counted_command_line): Remove typedef.
4918 (breakpoint_set_commands): Update.
4919 * breakpoint.c (check_no_tracepoint_commands)
4920 (validate_commands_for_breakpoint): Update.
4921 (breakpoint_set_commands): Change commands to be a
4922 counted_command_line.
4923 (commands_command_1, update_dprintf_command_list)
4924 (create_tracepoint_from_upload): Update.
4926 2018-05-04 Tom Tromey <tom@tromey.com>
4928 * cli/cli-decode.h (cmd_list_element): New constructor.
4929 (~cmd_list_element): New destructor.
4930 (struct cmd_list_element): Add initializers.
4931 * cli/cli-decode.c (do_add_cmd): Use "new".
4932 (delete_cmd): Use "delete".
4934 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4935 Pedro Alves <palves@redhat.com>
4937 PR breakpoints/19806 and support for PR external/20207.
4938 * NEWS: Mention Aarch64 watchpoint improvements.
4939 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
4940 watchpoints and PR external/20207 watchpoints.
4941 * nat/aarch64-linux-hw-point.c
4942 (kernel_supports_any_contiguous_range): New.
4943 (aarch64_watchpoint_offset): New.
4944 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
4945 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
4946 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
4947 (aarch64_align_watchpoint): New parameters aligned_offset_p and
4948 next_addr_orig_p. Support PR external/20207 watchpoints.
4949 (aarch64_downgrade_regs): New.
4950 (aarch64_dr_state_insert_one_point): New parameters offset and
4952 (aarch64_dr_state_remove_one_point): Likewise.
4953 (aarch64_handle_breakpoint): Update caller.
4954 (aarch64_handle_aligned_watchpoint): Likewise.
4955 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
4957 (aarch64_linux_set_debug_regs): Remove const from state. Call
4958 aarch64_downgrade_regs.
4959 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
4960 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
4961 (DR_CONTROL_MASK): ... this.
4962 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
4963 (unsigned int aarch64_watchpoint_offset): New prototype.
4964 (aarch64_linux_set_debug_regs): Remove const from state.
4965 * utils.c (align_up, align_down): Move to ...
4966 * common/common-utils.c (align_up, align_down): ... here.
4967 * utils.h (align_up, align_down): Move to ...
4968 * common/common-utils.h (align_up, align_down): ... here.
4970 2018-05-04 Joel Brobecker <brobecker@adacore.com>
4972 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
4973 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
4974 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
4975 Re-implement to match the ABI as summarized in GCC's
4976 gcc/config/sparc/sparc.c. All callers updated.
4977 (sparc32_store_arguments): Remove assertion.
4979 2018-05-04 Tom Tromey <tom@tromey.com>
4981 * printcmd.c: Don't include tui.h.
4982 (decode_format): Use skip_spaces.
4984 2018-05-04 Tom Tromey <tom@tromey.com>
4987 * printcmd.c (last_count): New global.
4988 (x_command): Use saved count when repeating.
4990 2018-05-04 Tom Tromey <tom@tromey.com>
4992 * nto-procfs.c (do_closedir_cleanup): Remove.
4993 (procfs_pidlist): Use gdb_dir_up.
4994 * procfs.c (do_closedir_cleanup): Remove.
4995 (proc_update_threads): Use gdb_dir_up.
4996 * common/filestuff.h (struct gdb_dir_deleter): New.
4997 (gdb_dir_up): New typedef.
4999 2018-05-04 Tom Tromey <tom@tromey.com>
5001 * ada-lang.c (print_mention_exception): Use std::string.
5003 2018-05-04 Tom Tromey <tom@tromey.com>
5005 * ada-lang.c (create_excep_cond_exprs): Update.
5006 (ada_exception_catchpoint_cond_string): Use std::string.
5008 2018-05-04 Tom Tromey <tom@tromey.com>
5010 * ada-lang.c (xget_renaming_scope): Return std::string.
5011 (old_renaming_is_invisible): Update.
5013 2018-05-04 Tom Tromey <tom@tromey.com>
5015 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5016 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5018 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
5020 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5022 2018-05-04 Tom Tromey <tom@tromey.com>
5024 * remote.c (remote_query_supported_append): Change type.
5025 (remote_check_symbols): Update.
5027 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
5030 * configure.ac: Prepend libpython.
5031 * python/python-config.py: Likewise.
5032 * configure: Regenerate.
5034 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
5036 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5038 2018-05-03 Pedro Alves <palves@redhat.com>
5041 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5042 override. Write 'true' instead of '1'.
5043 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5046 2018-05-02 Pedro Alves <palves@redhat.com>
5048 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5049 add_inf_child_target.
5050 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5051 add_inf_child_target.
5052 * aix-thread.c (aix_thread_target_info): New.
5053 (aix_thread_target) <shortname, longname, doc>: Delete.
5055 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5056 add_inf_child_target.
5057 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5058 add_inf_child_target.
5059 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5060 add_inf_child_target.
5061 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5062 add_inf_child_target.
5063 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5064 add_inf_child_target.
5065 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5066 add_inf_child_target.
5067 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5068 add_inf_child_target.
5069 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5070 add_inf_child_target.
5071 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5072 add_inf_child_target.
5073 * bfd-target.c (target_bfd_target_info): New.
5074 (target_bfd) <shortname, longname, doc>: Delete.
5076 * bsd-kvm.c (bsd_kvm_target_info): New.
5077 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5079 (bsd_kvm_target::open): Rename to ...
5080 (bsd_kvm_target_open): ... this. Adjust.
5081 * bsd-uthread.c (bsd_uthread_target_info): New.
5082 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5084 * corefile.c (core_file_command): Adjust.
5085 * corelow.c (core_target_info): New.
5086 (core_target) <shortname, longname, doc>: Delete.
5088 (core_target::open): Rename to ...
5089 (core_target_open): ... this. Adjust.
5090 * ctf.c (ctf_target_info): New.
5091 (ctf_target) <shortname, longname, doc>: Delete.
5093 (ctf_target::open): Rename to ...
5094 (ctf_target_open): ... this.
5095 (_initialize_ctf): Adjust.
5096 * exec.c (exec_target_info): New.
5097 (exec_target) <shortname, longname, doc>: Delete.
5099 (exec_target::open): Rename to ...
5100 (exec_target_open): ... this.
5101 * gdbcore.h (core_target_open): Declare.
5102 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5103 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5104 add_inf_child_target.
5105 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5106 add_inf_child_target.
5107 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5108 add_inf_child_target.
5109 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5110 add_inf_child_target.
5111 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5112 add_inf_child_target.
5113 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5114 add_inf_child_target.
5115 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5116 add_inf_child_target.
5117 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5118 add_inf_child_target.
5119 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5120 add_inf_child_target.
5121 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5122 add_inf_child_target.
5123 * inf-child.c (inf_child_target_info): New.
5124 (inf_child_target::info): New.
5125 (inf_child_open_target): Remove 'target' parameter. Use
5126 get_native_target instead.
5127 (inf_child_target::open): Delete.
5128 (add_inf_child_target): New.
5129 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5132 (add_inf_child_target): Declare.
5133 (inf_child_open_target): Declare.
5134 * linux-thread-db.c (thread_db_target_info): New.
5135 (thread_db_target) <shortname, longname, doc>: Delete.
5137 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5138 add_inf_child_target.
5139 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5140 add_inf_child_target.
5141 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5142 add_inf_child_target.
5143 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5144 add_inf_child_target.
5145 * make-target-delegates (print_class): Adjust.
5146 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5147 add_inf_child_target.
5148 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5149 add_inf_child_target.
5150 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5151 add_inf_child_target.
5152 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5153 add_inf_child_target.
5154 * nto-procfs.c (nto_native_target_info): New.
5155 (nto_procfs_target_native) <shortname, longname, doc>:
5158 (nto_procfs_target_info): New.
5159 (nto_procfs_target_procfs) <shortname, longname, doc>:
5162 (init_procfs_targets): Adjust.
5163 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5164 add_inf_child_target.
5165 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5166 add_inf_child_target.
5167 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5168 add_inf_child_target.
5169 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5170 add_inf_child_target.
5171 * ravenscar-thread.c (ravenscar_target_info): New.
5172 (ravenscar_thread_target) <shortname, longname, doc>:
5175 * record-btrace.c (record_btrace_target_info):
5176 (record_btrace_target) <shortname, longname, doc>: Delete.
5178 (record_btrace_target::open): Rename to ...
5179 (record_btrace_target_open): ... this. Adjust.
5180 * record-full.c (record_longname, record_doc): New.
5181 (record_full_base_target) <shortname, longname, doc>: Delete.
5183 (record_full_target_info): New.
5184 (record_full_target): <shortname>: Delete.
5186 (record_full_core_open_1, record_full_open_1): Update comments.
5187 (record_full_base_target::open): Rename to ...
5188 (record_full_open): ... this.
5189 (cmd_record_full_restore): Update.
5190 (_initialize_record_full): Update.
5191 * remote-sim.c (remote_sim_target_info): New.
5192 (gdbsim_target) <shortname, longname, doc>: Delete.
5194 (gdbsim_target::open): Rename to ...
5195 (gdbsim_target_open): ... this.
5196 (_initialize_remote_sim): Adjust.
5197 * remote.c (remote_doc): New.
5198 (remote_target_info): New.
5199 (remote_target) <shortname, longname, doc>: Delete.
5201 (extended_remote_target_info): New.
5202 (extended_remote_target) <shortname, longname, doc>: Delete.
5204 (remote_target::open_1): Make static. Adjust.
5205 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5206 * s390-linux-nat.c (_initialize_s390_nat): Use
5207 add_inf_child_target.
5208 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5209 add_inf_child_target.
5210 * sol-thread.c (thread_db_target_info): New.
5211 (sol_thread_target) <shortname, longname, doc>: Delete.
5213 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5214 add_inf_child_target.
5215 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5216 add_inf_child_target.
5217 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5218 add_inf_child_target.
5219 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5220 add_inf_child_target.
5221 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5222 add_inf_child_target.
5223 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5224 add_inf_child_target.
5225 * spu-linux-nat.c (_initialize_spu_nat): Use
5226 add_inf_child_target.
5227 * spu-multiarch.c (spu_multiarch_target_info): New.
5228 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5230 * target-delegates.c: Regenerate.
5231 * target.c: Include <unordered_map>.
5232 (target_ops_p): Delete.
5233 (DEF_VEC_P(target_ops_p)): Delete.
5234 (target_factories): New.
5235 (test_target_info): New.
5236 (test_target_ops::info): New.
5237 (open_target): Adjust to use target_factories.
5238 (add_target_with_completer): Rename to ...
5239 (add_target): ... this. Change prototype. Register target_info
5240 and open callback in target_factories. Register target_info in
5241 command context instead of target_ops.
5242 (add_target): Delete old implementation.
5243 (add_deprecated_target_alias): Change prototype. Adjust.
5244 (the_native_target): New.
5245 (set_native_target, get_native_target): New.
5246 (find_default_run_target): Use the_native_target.
5247 (find_attach_target, find_run_target): Simplify.
5248 (target_ops::open): Delete.
5249 (dummy_target_info): New.
5250 (dummy_target::shortname, dummy_target::longname)
5251 (dummy_target::doc): Delete.
5252 (dummy_target::info): New.
5253 (debug_target::shortname, debug_target::longname)
5254 (debug_target::doc): Delete.
5255 (debug_target::info): New.
5256 * target.h (struct target_info): New.
5257 (target_ops::~target_ops): Add comment.
5258 (target_ops::info): New.
5259 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5260 longer virtual. Implement in terms of target_info.
5261 (set_native_target, get_native_target): Declare.
5262 (target_open_ftype): New.
5263 (add_target, add_target_with_completer)
5264 (add_deprecated_target_alias): Change prototype.
5265 (test_target) <shortname, longname, doc>: Delete.
5267 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5268 add_inf_child_target.
5269 * tracefile-tfile.c (tfile_target_info): New.
5270 (tfile_target) <shortname, longname, doc>: Delete.
5272 (tfile_target::open): Rename to ...
5273 (tfile_target_open): ... this.
5274 (_initialize_tracefile_tfile): Adjust.
5275 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5276 add_inf_child_target.
5277 * windows-nat.c (_initialize_windows_nat): Use
5278 add_inf_child_target.
5279 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5280 add_inf_child_target.
5282 2018-05-02 Pedro Alves <palves@redhat.com>
5284 * linux-nat.h (linux_nat_target) <low_new_thread,
5285 low_delete_thread, low_new_fork, low_forget_process,
5286 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5287 New virtual methods.
5288 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5289 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5290 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5291 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5292 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5294 * linux-fork.c (delete_fork): Adjust to call low method.
5295 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5296 (linux_nat_new_fork, linux_nat_forget_process_hook)
5297 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5298 (linux_nat_status_is_event):
5299 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5300 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5302 (sigtrap_is_event): Rename to ...
5303 (linux_nat_target::low_status_is_event): ... this.
5304 (linux_nat_set_status_is_event): Delete.
5305 (save_stop_reason, linux_nat_wait_1)
5306 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5308 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5309 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5310 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5311 (linux_nat_set_prepare_to_resume): Delete.
5312 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5313 low virtual methods.
5314 * amd64-linux-nat.c: Likewise.
5315 * arm-linux-nat.c: Likewise.
5316 * i386-linux-nat.c: Likewise.
5317 * ia64-linux-nat.c: Likewise.
5318 * mips-linux-nat.c: Likewise.
5319 * ppc-linux-nat.c: Likewise.
5320 * s390-linux-nat.c: Likewise.
5321 * sparc64-linux-nat.c: Likewise.
5322 * x86-linux-nat.c: Likewise.
5323 * x86-linux-nat.h: Include "nat/x86-linux.h".
5324 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5325 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5328 2018-05-02 Pedro Alves <palves@redhat.com>
5330 * target.h (target_ops)
5331 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5332 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5333 stopped_by_watchpoint, have_continuable_watchpoint,
5334 stopped_data_address, watchpoint_addr_within_range,
5335 can_accel_watchpoint_condition, can_run, thread_alive,
5336 has_all_memory, has_memory, has_stack, has_registers,
5337 has_execution, can_async_p, is_async_p, supports_non_stop,
5338 always_non_stop_p, can_execute_reverse, supports_multi_process,
5339 supports_enable_disable_tracepoint,
5340 supports_disable_randomization, supports_string_tracing,
5341 supports_evaluation_of_breakpoint_conditions,
5342 can_run_breakpoint_commands, filesystem_is_local,
5343 can_download_tracepoint, get_trace_state_variable_value,
5344 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5345 record_is_replaying, record_will_replay,
5346 augmented_libraries_svr4_read>: Adjust to return bool.
5347 * aarch64-linux-nat.c: All implementations adjusted.
5348 * aix-thread.c: All implementations adjusted.
5349 * arm-linux-nat.c: All implementations adjusted.
5350 * breakpoint.c: All implementations adjusted.
5351 * bsd-kvm.c: All implementations adjusted.
5352 * bsd-uthread.c: All implementations adjusted.
5353 * corelow.c: All implementations adjusted.
5354 * ctf.c: All implementations adjusted.
5355 * darwin-nat.c: All implementations adjusted.
5356 * darwin-nat.h: All implementations adjusted.
5357 * exec.c: All implementations adjusted.
5358 * fbsd-nat.c: All implementations adjusted.
5359 * fbsd-nat.h: All implementations adjusted.
5360 * gnu-nat.c: All implementations adjusted.
5361 * gnu-nat.h: All implementations adjusted.
5362 * go32-nat.c: All implementations adjusted.
5363 * ia64-linux-nat.c: All implementations adjusted.
5364 * inf-child.c: All implementations adjusted.
5365 * inf-child.h: All implementations adjusted.
5366 * inf-ptrace.c: All implementations adjusted.
5367 * inf-ptrace.h: All implementations adjusted.
5368 * linux-nat.c: All implementations adjusted.
5369 * linux-nat.h: All implementations adjusted.
5370 * mips-linux-nat.c: All implementations adjusted.
5371 * nto-procfs.c: All implementations adjusted.
5372 * ppc-linux-nat.c: All implementations adjusted.
5373 * procfs.c: All implementations adjusted.
5374 * ravenscar-thread.c: All implementations adjusted.
5375 * record-btrace.c: All implementations adjusted.
5376 * record-full.c: All implementations adjusted.
5377 * remote-sim.c: All implementations adjusted.
5378 * remote.c: All implementations adjusted.
5379 * s390-linux-nat.c: All implementations adjusted.
5380 * sol-thread.c: All implementations adjusted.
5381 * spu-multiarch.c: All implementations adjusted.
5382 * target-delegates.c: All implementations adjusted.
5383 * target.c: All implementations adjusted.
5384 * target.h: All implementations adjusted.
5385 * tracefile-tfile.c: All implementations adjusted.
5386 * tracefile.c: All implementations adjusted.
5387 * tracefile.h: All implementations adjusted.
5388 * windows-nat.c: All implementations adjusted.
5389 * x86-linux-nat.h: All implementations adjusted.
5390 * x86-nat.h: All implementations adjusted.
5392 2018-05-02 Pedro Alves <palves@redhat.com>
5394 * make-target-delegates (scan_target_h): Don't trim lines here.
5395 Replace sequences of tabs and/or whitespace with a single
5397 (top level, parsing methods): Trim each line before processing it
5400 2018-05-02 Pedro Alves <palves@redhat.com>
5401 John Baldwin <jhb@freebsd.org>
5403 * target.h (enum strata) <debug_stratum>: New.
5404 (struct target_ops) <all delegation methods>: Replace by C++
5405 virtual methods, and drop "to_" prefix. All references updated
5407 <to_shortname, to_longname, to_doc, to_data,
5408 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5409 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5410 virtual methods. All references updated throughout.
5411 <can_attach, supports_terminal_ours, can_create_inferior,
5412 get_thread_control_capabilities, attach_no_wait>: New
5414 <insert_breakpoint, remove_breakpoint>: Now
5415 TARGET_DEFAULT_NORETURN methods.
5416 <info_proc>: Now returns bool.
5418 (OPS_MAGIC): Delete.
5419 (current_target): Delete. All references replaced by references
5421 (target_stack): ... this. New.
5422 (target_shortname, target_longname): Adjust.
5423 (target_can_run): Now a function declaration.
5424 (default_child_has_all_memory, default_child_has_memory)
5425 (default_child_has_stack, default_child_has_registers)
5426 (default_child_has_execution): Remove target_ops parameter.
5427 (complete_target_initialization): Delete.
5428 (memory_breakpoint_target): New template class.
5429 (test_target_ops): Refactor as a C++ class with virtual methods.
5430 * make-target-delegates (NAME_PART): Tighten.
5431 (POINTER_PART, CP_SYMBOL): New.
5432 (SIMPLE_RETURN_PART): Reimplement.
5433 (VEC_RETURN_PART): Expect less.
5434 (RETURN_PART, VIRTUAL_PART): New.
5435 (METHOD): Adjust to C++ virtual methods.
5436 (scan_target_h): Remove reference to C99.
5437 (dname): Output "target_ops::" prefix.
5438 (write_function_header): Adjust to output a C++ class method.
5439 (write_declaration): New.
5440 (write_delegator): Adjust to output a C++ class method.
5441 (tdname): Output "dummy_target::" prefix.
5442 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5444 (tdefault_names, debug_names): Delete.
5445 (return_types, tdefaults, styles, argtypes_array): New.
5446 (top level): All methods are delegators.
5448 (top level): Print dummy_target and debug_target classes.
5449 * target-delegates.c: Regenerate.
5450 * target-debug.h (target_debug_print_enum_info_proc_what)
5451 (target_debug_print_thread_control_capabilities)
5452 (target_debug_print_thread_info_p): New.
5453 * target.c (dummy_target): Delete.
5454 (the_dummy_target, the_debug_target): New.
5455 (target_stack): Now extern.
5456 (set_targetdebug): Push/unpush debug target.
5457 (default_child_has_all_memory, default_child_has_memory)
5458 (default_child_has_stack, default_child_has_registers)
5459 (default_child_has_execution): Remove target_ops parameter.
5460 (complete_target_initialization): Delete.
5461 (add_target_with_completer): No longer call
5462 complete_target_initialization.
5463 (target_supports_terminal_ours): Use regular delegation.
5464 (update_current_target): Delete.
5465 (push_target): No longer check magic number. Don't call
5466 update_current_target.
5467 (unpush_target): Don't call update_current_target.
5468 (target_is_pushed): No longer check magic number.
5469 (target_require_runnable): Skip for all stratums over
5471 (target_ops::info_proc): New.
5472 (target_info_proc): Use find_target_at and
5473 find_default_run_target.
5474 (target_supports_disable_randomization): Use regular delegation.
5475 (target_get_osdata): Use find_target_at.
5476 (target_ops::open, target_ops::close, target_ops::can_attach)
5477 (target_ops::attach, target_ops::can_create_inferior)
5478 (target_ops::create_inferior, target_ops::can_run)
5479 (target_can_run): New.
5480 (default_fileio_target): Use regular delegation.
5481 (target_ops::fileio_open, target_ops::fileio_pwrite)
5482 (target_ops::fileio_pread, target_ops::fileio_fstat)
5483 (target_ops::fileio_close, target_ops::fileio_unlink)
5484 (target_ops::fileio_readlink): New.
5485 (target_fileio_open_1, target_fileio_unlink)
5486 (target_fileio_readlink): Always call the target method. Handle
5488 (return_zero, return_zero_has_execution): Delete.
5489 (init_dummy_target): Delete.
5490 (dummy_target::dummy_target, dummy_target::shortname)
5491 (dummy_target::longname, dummy_target::doc)
5492 (debug_target::debug_target, debug_target::shortname)
5493 (debug_target::longname, debug_target::doc): New.
5494 (target_supports_delete_record): Use regular delegation.
5495 (setup_target_debug): Delete.
5496 (maintenance_print_target_stack): Skip debug_stratum.
5497 (initialize_targets): Instantiate the_dummy_target and
5499 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
5501 (target_auxv_search, fprint_target_auxv): Adjust.
5502 (info_auxv_command): Adjust to use target_stack.
5503 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5504 * exceptions.c (print_flush): Handle a NULL target_stack.
5505 * regcache.c (target_ops_no_register): Refactor as class with
5508 * exec.c (exec_target): New class.
5509 (exec_ops): Now an exec_target.
5510 (exec_open, exec_close_1, exec_get_section_table)
5511 (exec_xfer_partial, exec_files_info, exec_has_memory)
5512 (exec_make_note_section): Refactor as exec_target methods.
5513 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5515 (exec_target::find_memory_regions): New.
5516 (_initialize_exec): Don't call init_exec_ops.
5517 * gdbcore.h (exec_file_clear): Delete.
5519 * corefile.c (core_target): Delete.
5520 (core_file_command): Adjust.
5521 * corelow.c (core_target): New class.
5522 (the_core_target): New.
5523 (core_close): Remove target_ops parameter.
5524 (core_close_cleanup): Adjust.
5525 (core_target::close): New.
5526 (core_open, core_detach, get_core_registers, core_files_info)
5527 (core_xfer_partial, core_thread_alive, core_read_description)
5528 (core_pid_to_str, core_thread_name, core_has_memory)
5529 (core_has_stack, core_has_registers, core_info_proc): Rework as
5530 core_target methods.
5531 (ignore, core_remove_breakpoint, init_core_ops): Delete.
5532 (_initialize_corelow): Initialize the_core_target.
5533 * gdbcore.h (core_target): Delete.
5534 (the_core_target): New.
5536 * ctf.c: (ctf_target): New class.
5537 (ctf_ops): Now a ctf_target.
5538 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5539 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5540 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5542 (init_ctf_ops): Delete.
5543 (_initialize_ctf): Don't call it.
5544 * tracefile-tfile.c (tfile_target): New class.
5545 (tfile_ops): Now a tfile_target.
5546 (tfile_open, tfile_close, tfile_files_info)
5547 (tfile_get_tracepoint_status, tfile_trace_find)
5548 (tfile_fetch_registers, tfile_xfer_partial)
5549 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5550 Refactor as tfile_target methods.
5551 (tfile_xfer_partial_features): Remove target_ops parameter.
5552 (init_tfile_ops): Delete.
5553 (_initialize_tracefile_tfile): Don't call it.
5554 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5555 (tracefile_has_stack, tracefile_has_registers)
5556 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5557 tracefile_target methods.
5558 (init_tracefile_ops): Delete.
5559 (tracefile_target::tracefile_target): New.
5560 * tracefile.h: Include "target.h".
5561 (tracefile_target): New class.
5562 (init_tracefile_ops): Delete.
5564 * spu-multiarch.c (spu_multiarch_target): New class.
5565 (spu_ops): Now a spu_multiarch_target.
5566 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5567 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5568 (spu_search_memory, spu_mourn_inferior): Refactor as
5569 spu_multiarch_target methods.
5570 (init_spu_ops): Delete.
5571 (_initialize_spu_multiarch): Remove references to init_spu_ops,
5572 complete_target_initialization.
5574 * ravenscar-thread.c (ravenscar_thread_target): New class.
5575 (ravenscar_ops): Now a ravenscar_thread_target.
5576 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5577 (ravenscar_thread_alive, ravenscar_pid_to_str)
5578 (ravenscar_fetch_registers, ravenscar_store_registers)
5579 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5580 (ravenscar_stopped_by_hw_breakpoint)
5581 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5582 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5583 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5585 (init_ravenscar_thread_ops): Delete.
5586 (_initialize_ravenscar): Remove references to
5587 init_ravenscar_thread_ops and complete_target_initialization.
5589 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5590 (bsd_uthread_target): New class.
5591 (bsd_uthread_ops): Now a bsd_uthread_target.
5592 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5593 (bsd_uthread_close, bsd_uthread_mourn_inferior)
5594 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5595 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5596 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5597 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5598 (bsd_uthread_target): Delete function.
5599 (_initialize_bsd_uthread): Remove reference to
5600 complete_target_initialization.
5602 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
5603 (target_bfd): ... this new class.
5604 (target_bfd_xfer_partial, target_bfd_get_section_table)
5605 (target_bfd_close): Refactor as target_bfd methods.
5606 (target_bfd::~target_bfd): New.
5607 (target_bfd_reopen): Adjust.
5608 (target_bfd::close): New.
5610 * record-btrace.c (record_btrace_target): New class.
5611 (record_btrace_ops): Now a record_btrace_target.
5612 (record_btrace_open, record_btrace_stop_recording)
5613 (record_btrace_disconnect, record_btrace_close)
5614 (record_btrace_async, record_btrace_info)
5615 (record_btrace_insn_history, record_btrace_insn_history_range)
5616 (record_btrace_insn_history_from, record_btrace_call_history)
5617 (record_btrace_call_history_range)
5618 (record_btrace_call_history_from, record_btrace_record_method)
5619 (record_btrace_is_replaying, record_btrace_will_replay)
5620 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5621 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5622 (record_btrace_store_registers, record_btrace_prepare_to_store)
5623 (record_btrace_to_get_unwinder)
5624 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5625 (record_btrace_commit_resume, record_btrace_wait)
5626 (record_btrace_stop, record_btrace_can_execute_reverse)
5627 (record_btrace_stopped_by_sw_breakpoint)
5628 (record_btrace_supports_stopped_by_sw_breakpoint)
5629 (record_btrace_stopped_by_hw_breakpoint)
5630 (record_btrace_supports_stopped_by_hw_breakpoint)
5631 (record_btrace_update_thread_list, record_btrace_thread_alive)
5632 (record_btrace_goto_begin, record_btrace_goto_end)
5633 (record_btrace_goto, record_btrace_stop_replaying_all)
5634 (record_btrace_execution_direction)
5635 (record_btrace_prepare_to_generate_core)
5636 (record_btrace_done_generating_core): Refactor as
5637 record_btrace_target methods.
5638 (init_record_btrace_ops): Delete.
5639 (_initialize_record_btrace): Remove reference to
5640 init_record_btrace_ops.
5641 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5642 the execution_direction global.
5643 (record_full_base_target, record_full_target)
5644 (record_full_core_target): New classes.
5645 (record_full_ops): Now a record_full_target.
5646 (record_full_core_ops): Now a record_full_core_target.
5647 (record_full_target::detach, record_full_target::disconnect)
5648 (record_full_core_target::disconnect)
5649 (record_full_target::mourn_inferior, record_full_target::kill):
5651 (record_full_open, record_full_close, record_full_async): Refactor
5652 as methods of the record_full_base_target class.
5653 (record_full_resume, record_full_commit_resume): Refactor
5654 as methods of the record_full_target class.
5655 (record_full_wait, record_full_stopped_by_watchpoint)
5656 (record_full_stopped_data_address)
5657 (record_full_stopped_by_sw_breakpoint)
5658 (record_full_supports_stopped_by_sw_breakpoint)
5659 (record_full_stopped_by_hw_breakpoint)
5660 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5661 methods of the record_full_base_target class.
5662 (record_full_store_registers, record_full_xfer_partial)
5663 (record_full_insert_breakpoint, record_full_remove_breakpoint):
5664 Refactor as methods of the record_full_target class.
5665 (record_full_can_execute_reverse, record_full_get_bookmark)
5666 (record_full_goto_bookmark, record_full_execution_direction)
5667 (record_full_record_method, record_full_info, record_full_delete)
5668 (record_full_is_replaying, record_full_will_replay)
5669 (record_full_goto_begin, record_full_goto_end, record_full_goto)
5670 (record_full_stop_replaying): Refactor as methods of the
5671 record_full_base_target class.
5672 (record_full_core_resume, record_full_core_kill)
5673 (record_full_core_fetch_registers)
5674 (record_full_core_prepare_to_store)
5675 (record_full_core_store_registers, record_full_core_xfer_partial)
5676 (record_full_core_insert_breakpoint)
5677 (record_full_core_remove_breakpoint)
5678 (record_full_core_has_execution): Refactor
5679 as methods of the record_full_core_target class.
5680 (record_full_base_target::supports_delete_record): New.
5681 (init_record_full_ops): Delete.
5682 (init_record_full_core_ops): Delete.
5683 (record_full_save): Refactor as method of the
5684 record_full_base_target class.
5685 (_initialize_record_full): Remove references to
5686 init_record_full_ops and init_record_full_core_ops.
5688 * remote.c (remote_target, extended_remote_target): New classes.
5689 (remote_ops): Now a remote_target.
5690 (extended_remote_ops): Now an extended_remote_target.
5691 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5692 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5693 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5694 (remote_pass_signals, remote_set_syscall_catchpoint)
5695 (remote_program_signals, )
5696 (remote_thread_always_alive): Remove target_ops parameter.
5697 (remote_thread_alive, remote_thread_name)
5698 (remote_update_thread_list, remote_threads_extra_info)
5699 (remote_static_tracepoint_marker_at)
5700 (remote_static_tracepoint_markers_by_strid)
5701 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5702 (remote_open): Refactor as methods of remote_target.
5703 (extended_remote_open, extended_remote_detach)
5704 (extended_remote_attach, extended_remote_post_attach):
5705 (extended_remote_supports_disable_randomization)
5706 (extended_remote_create_inferior): : Refactor as method of
5707 extended_remote_target.
5708 (remote_set_permissions, remote_open_1, remote_detach)
5709 (remote_follow_fork, remote_follow_exec, remote_disconnect)
5710 (remote_resume, remote_commit_resume, remote_stop)
5711 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5712 (remote_terminal_ours, remote_wait, remote_fetch_registers)
5713 (remote_prepare_to_store, remote_store_registers)
5714 (remote_flash_erase, remote_flash_done, remote_files_info)
5715 (remote_kill, remote_mourn, remote_insert_breakpoint)
5716 (remote_remove_breakpoint, remote_insert_watchpoint)
5717 (remote_watchpoint_addr_within_range)
5718 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5719 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5720 (remote_supports_stopped_by_sw_breakpoint)
5721 (remote_stopped_by_hw_breakpoint)
5722 (remote_supports_stopped_by_hw_breakpoint)
5723 (remote_stopped_by_watchpoint, remote_stopped_data_address)
5724 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5725 (remote_verify_memory): Refactor as methods of remote_target.
5726 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5728 (remote_xfer_partial, remote_get_memory_xfer_limit)
5729 (remote_search_memory, remote_rcmd, remote_memory_map)
5730 (remote_pid_to_str, remote_get_thread_local_address)
5731 (remote_get_tib_address, remote_read_description): Refactor as
5732 methods of remote_target.
5733 (remote_target::fileio_open, remote_target::fileio_pwrite)
5734 (remote_target::fileio_pread, remote_target::fileio_close): New.
5735 (remote_hostio_readlink, remote_hostio_fstat)
5736 (remote_filesystem_is_local, remote_can_execute_reverse)
5737 (remote_supports_non_stop, remote_supports_disable_randomization)
5738 (remote_supports_multi_process, remote_supports_cond_breakpoints)
5739 (remote_supports_enable_disable_tracepoint)
5740 (remote_supports_string_tracing)
5741 (remote_can_run_breakpoint_commands, remote_trace_init)
5742 (remote_download_tracepoint, remote_can_download_tracepoint)
5743 (remote_download_trace_state_variable, remote_enable_tracepoint)
5744 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5745 (remote_trace_start, remote_get_trace_status)
5746 (remote_get_tracepoint_status, remote_trace_stop)
5747 (remote_trace_find, remote_get_trace_state_variable_value)
5748 (remote_save_trace_data, remote_get_raw_trace_data)
5749 (remote_set_disconnected_tracing, remote_core_of_thread)
5750 (remote_set_circular_trace_buffer, remote_traceframe_info)
5751 (remote_get_min_fast_tracepoint_insn_len)
5752 (remote_set_trace_buffer_size, remote_set_trace_notes)
5753 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5754 (remote_disable_btrace, remote_teardown_btrace)
5755 (remote_read_btrace, remote_btrace_conf)
5756 (remote_augmented_libraries_svr4_read, remote_load)
5757 (remote_pid_to_exec_file, remote_can_do_single_step)
5758 (remote_execution_direction, remote_thread_handle_to_thread_info):
5759 Refactor as methods of remote_target.
5760 (init_remote_ops, init_extended_remote_ops): Delete.
5761 (remote_can_async_p, remote_is_async_p, remote_async)
5762 (remote_thread_events, remote_upload_tracepoints)
5763 (remote_upload_trace_state_variables): Refactor as methods of
5765 (_initialize_remote): Remove references to init_remote_ops and
5766 init_extended_remote_ops.
5768 * remote-sim.c (gdbsim_target): New class.
5769 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5770 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5771 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5772 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5773 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5774 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5775 Refactor as methods of gdbsim_target.
5776 (gdbsim_ops): Now a gdbsim_target.
5777 (init_gdbsim_ops): Delete.
5778 (gdbsim_cntrl_c): Adjust.
5779 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5781 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5782 (the_amd64_linux_nat_target): New.
5783 (amd64_linux_fetch_inferior_registers)
5784 (amd64_linux_store_inferior_registers): Refactor as methods of
5785 amd64_linux_nat_target.
5786 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
5787 * i386-linux-nat.c: Don't include "linux-nat.h".
5788 (i386_linux_nat_target): New class.
5789 (the_i386_linux_nat_target): New.
5790 (i386_linux_fetch_inferior_registers)
5791 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5792 as methods of i386_linux_nat_target.
5793 (_initialize_i386_linux_nat): Adjust. Set linux_target.
5794 * inf-child.c (inf_child_ops): Delete.
5795 (inf_child_fetch_inferior_registers)
5796 (inf_child_store_inferior_registers): Delete.
5797 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5798 methods of inf_child_target.
5799 (inf_child_target::supports_terminal_ours)
5800 (inf_child_target::terminal_init)
5801 (inf_child_target::terminal_inferior)
5802 (inf_child_target::terminal_ours_for_output)
5803 (inf_child_target::terminal_ours, inf_child_target::interrupt)
5804 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5806 (inf_child_open, inf_child_disconnect, inf_child_close)
5807 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5808 (inf_child_post_startup_inferior, inf_child_can_run)
5809 (inf_child_pid_to_exec_file): Refactor as methods of
5811 (inf_child_follow_fork): Delete.
5812 (inf_child_target::can_create_inferior)
5813 (inf_child_target::can_attach): New.
5814 (inf_child_target::has_all_memory, inf_child_target::has_memory)
5815 (inf_child_target::has_stack, inf_child_target::has_registers)
5816 (inf_child_target::has_execution): New.
5817 (inf_child_fileio_open, inf_child_fileio_pwrite)
5818 (inf_child_fileio_pread, inf_child_fileio_fstat)
5819 (inf_child_fileio_close, inf_child_fileio_unlink)
5820 (inf_child_fileio_readlink, inf_child_use_agent)
5821 (inf_child_can_use_agent): Refactor as methods of
5823 (return_zero, inf_child_target): Delete.
5824 (inf_child_target::inf_child_target): New.
5825 * inf-child.h: Include "target.h".
5826 (inf_child_target): Delete function prototype.
5827 (inf_child_target): New class.
5828 (inf_child_open_target, inf_child_mourn_inferior)
5829 (inf_child_maybe_unpush_target): Delete.
5830 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5831 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5832 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5833 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5834 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5835 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5836 (inf_ptrace_wait, inf_ptrace_xfer_partial)
5837 (inf_ptrace_thread_alive, inf_ptrace_files_info)
5838 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5839 methods of inf_ptrace_target.
5840 (inf_ptrace_target): Delete function.
5841 * inf-ptrace.h: Include "inf-child.h".
5842 (inf_ptrace_target): Delete function declaration.
5843 (inf_ptrace_target): New class.
5844 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5845 * linux-nat.c (linux_target): New.
5846 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5847 (linux_nat_target::~linux_nat_target): New.
5848 (linux_child_post_attach, linux_child_post_startup_inferior)
5849 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5850 (linux_child_remove_fork_catchpoint)
5851 (linux_child_insert_vfork_catchpoint)
5852 (linux_child_remove_vfork_catchpoint)
5853 (linux_child_insert_exec_catchpoint)
5854 (linux_child_remove_exec_catchpoint)
5855 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5856 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5857 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5858 (linux_nat_stopped_data_address)
5859 (linux_nat_stopped_by_sw_breakpoint)
5860 (linux_nat_supports_stopped_by_sw_breakpoint)
5861 (linux_nat_stopped_by_hw_breakpoint)
5862 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5863 (linux_nat_kill, linux_nat_mourn_inferior)
5864 (linux_nat_xfer_partial, linux_nat_thread_alive)
5865 (linux_nat_update_thread_list, linux_nat_pid_to_str)
5866 (linux_nat_thread_name, linux_child_pid_to_exec_file)
5867 (linux_child_static_tracepoint_markers_by_strid)
5868 (linux_nat_is_async_p, linux_nat_can_async_p)
5869 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5870 (linux_nat_supports_multi_process)
5871 (linux_nat_supports_disable_randomization, linux_nat_async)
5872 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
5873 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
5874 (linux_nat_fileio_open, linux_nat_fileio_readlink)
5875 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
5876 methods of linux_nat_target.
5877 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
5878 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
5880 (check_stopped_by_watchpoint): Adjust.
5881 (linux_xfer_partial): Delete.
5882 (linux_target_install_ops, linux_target, linux_nat_add_target):
5884 (linux_nat_target::linux_nat_target): New.
5885 * linux-nat.h: Include "inf-ptrace.h".
5886 (linux_nat_target): New.
5887 (linux_target, linux_target_install_ops, linux_nat_add_target):
5888 Delete function declarations.
5889 (linux_target): Declare global.
5890 * linux-thread-db.c (thread_db_target): New.
5891 (thread_db_target::thread_db_target): New.
5892 (thread_db_ops): Delete.
5893 (the_thread_db_target): New.
5894 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
5895 (thread_db_update_thread_list, thread_db_pid_to_str)
5896 (thread_db_extra_thread_info)
5897 (thread_db_thread_handle_to_thread_info)
5898 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
5899 (thread_db_resume): Refactor as methods of thread_db_target.
5900 (init_thread_db_ops): Delete.
5901 (_initialize_thread_db): Remove reference to init_thread_db_ops.
5902 * x86-linux-nat.c: Don't include "linux-nat.h".
5903 (super_post_startup_inferior): Delete.
5904 (x86_linux_nat_target::~x86_linux_nat_target): New.
5905 (x86_linux_child_post_startup_inferior)
5906 (x86_linux_read_description, x86_linux_enable_btrace)
5907 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
5908 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
5909 methods of x86_linux_nat_target.
5910 (x86_linux_create_target): Delete. Bits folded ...
5911 (x86_linux_add_target): ... here. Now takes a linux_nat_target
5913 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
5914 (x86_linux_nat_target): New class.
5915 (x86_linux_create_target): Delete.
5916 (x86_linux_add_target): Now takes a linux_nat_target pointer.
5917 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
5918 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
5919 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
5920 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
5921 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
5923 (x86_use_watchpoints): Delete.
5924 * x86-nat.h: Include "breakpoint.h" and "target.h".
5925 (x86_use_watchpoints): Delete.
5926 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
5927 (x86_stopped_by_watchpoint, x86_stopped_data_address)
5928 (x86_insert_watchpoint, x86_remove_watchpoint)
5929 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
5930 (x86_stopped_by_hw_breakpoint): New declarations.
5931 (x86_nat_target): New template class.
5933 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
5934 (the_ppc_linux_nat_target): New.
5935 (ppc_linux_fetch_inferior_registers)
5936 (ppc_linux_can_use_hw_breakpoint)
5937 (ppc_linux_region_ok_for_hw_watchpoint)
5938 (ppc_linux_ranged_break_num_registers)
5939 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
5940 (ppc_linux_insert_mask_watchpoint)
5941 (ppc_linux_remove_mask_watchpoint)
5942 (ppc_linux_can_accel_watchpoint_condition)
5943 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
5944 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
5945 (ppc_linux_watchpoint_addr_within_range)
5946 (ppc_linux_masked_watch_num_registers)
5947 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
5948 (ppc_linux_read_description): Refactor as methods of
5949 ppc_linux_nat_target.
5950 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
5952 * procfs.c (procfs_xfer_partial): Delete forward declaration.
5953 (procfs_target): New class.
5954 (the_procfs_target): New.
5955 (procfs_target): Delete function.
5956 (procfs_auxv_parse, procfs_attach, procfs_detach)
5957 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
5958 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
5959 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
5960 (procfs_create_inferior, procfs_update_thread_list)
5961 (procfs_thread_alive, procfs_pid_to_str)
5962 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
5963 (procfs_stopped_data_address, procfs_insert_watchpoint)
5964 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
5965 (proc_find_memory_regions, procfs_info_proc)
5966 (procfs_make_note_section): Refactor as methods of procfs_target.
5967 (_initialize_procfs): Adjust.
5968 * sol-thread.c (sol_thread_target): New class.
5969 (sol_thread_ops): Now a sol_thread_target.
5970 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
5971 (sol_thread_fetch_registers, sol_thread_store_registers)
5972 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
5973 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
5974 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
5975 (init_sol_thread_ops): Delete.
5976 (_initialize_sol_thread): Adjust. Remove references to
5977 init_sol_thread_ops and complete_target_initialization.
5979 * windows-nat.c (windows_nat_target): New class.
5980 (windows_fetch_inferior_registers)
5981 (windows_store_inferior_registers, windows_resume, windows_wait)
5982 (windows_attach, windows_detach, windows_pid_to_exec_file)
5983 (windows_files_info, windows_create_inferior)
5984 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
5985 (windows_close, windows_pid_to_str, windows_xfer_partial)
5986 (windows_get_tib_address, windows_get_ada_task_ptid)
5987 (windows_thread_name, windows_thread_alive): Refactor as
5988 windows_nat_target methods.
5989 (do_initial_windows_stuff): Adjust.
5990 (windows_target): Delete function.
5991 (_initialize_windows_nat): Adjust.
5993 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
5994 (darwin_mourn_inferior, darwin_kill_inferior)
5995 (darwin_create_inferior, darwin_attach, darwin_detach)
5996 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
5997 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
5998 (darwin_supports_multi_process): Refactor as darwin_nat_target
6000 (darwin_resume_to, darwin_files_info): Delete.
6001 (_initialize_darwin_inferior): Rename to ...
6002 (_initialize_darwin_nat): ... this. Adjust to C++ification.
6003 * darwin-nat.h: Include "inf-child.h".
6004 (darwin_nat_target): New class.
6005 (darwin_complete_target): Delete.
6006 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6007 (darwin_target): New.
6008 (i386_darwin_fetch_inferior_registers)
6009 (i386_darwin_store_inferior_registers): Refactor as methods of
6011 (darwin_complete_target): Delete, with ...
6012 (_initialize_i386_darwin_nat): ... bits factored out here.
6014 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6015 (the_alpha_linux_nat_target): New.
6016 (alpha_linux_register_u_offset): Refactor as
6017 alpha_linux_nat_target method.
6018 (_initialize_alpha_linux_nat): Adjust.
6019 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6020 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6021 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6022 methods of linux_nat_trad_target.
6023 (linux_trad_target): Delete.
6024 * linux-nat-trad.h (linux_trad_target): Delete function.
6025 (linux_nat_trad_target): New class.
6026 * mips-linux-nat.c (mips_linux_nat_target): New class.
6027 (super_fetch_registers, super_store_registers, super_close):
6029 (the_mips_linux_nat_target): New.
6030 (mips64_linux_regsets_fetch_registers)
6031 (mips64_linux_regsets_store_registers)
6032 (mips64_linux_fetch_registers, mips64_linux_store_registers)
6033 (mips_linux_register_u_offset, mips_linux_read_description)
6034 (mips_linux_can_use_hw_breakpoint)
6035 (mips_linux_stopped_by_watchpoint)
6036 (mips_linux_stopped_data_address)
6037 (mips_linux_region_ok_for_hw_watchpoint)
6038 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6039 (mips_linux_close): Refactor as methods of mips_linux_nat.
6040 (_initialize_mips_linux_nat): Adjust to C++ification.
6042 * aix-thread.c (aix_thread_target): New class.
6043 (aix_thread_ops): Now an aix_thread_target.
6044 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6045 (aix_thread_fetch_registers, aix_thread_store_registers)
6046 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6047 (aix_thread_thread_alive, aix_thread_pid_to_str)
6048 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6049 Refactor as methods of aix_thread_target.
6050 (init_aix_thread_ops): Delete.
6051 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6052 and complete_target_initialization.
6053 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6054 (rs6000_nat_target): New class.
6055 (the_rs6000_nat_target): New.
6056 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6057 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6058 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6059 (super_create_inferior): Delete.
6060 (_initialize_rs6000_nat): Adjust to C++ification.
6062 * arm-linux-nat.c (arm_linux_nat_target): New class.
6063 (the_arm_linux_nat_target): New.
6064 (arm_linux_fetch_inferior_registers)
6065 (arm_linux_store_inferior_registers, arm_linux_read_description)
6066 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6067 (arm_linux_remove_hw_breakpoint)
6068 (arm_linux_region_ok_for_hw_watchpoint)
6069 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6070 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6071 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6072 arm_linux_nat_target.
6073 (_initialize_arm_linux_nat): Adjust to C++ification.
6075 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6076 (the_aarch64_linux_nat_target): New.
6077 (aarch64_linux_fetch_inferior_registers)
6078 (aarch64_linux_store_inferior_registers)
6079 (aarch64_linux_child_post_startup_inferior)
6080 (aarch64_linux_read_description)
6081 (aarch64_linux_can_use_hw_breakpoint)
6082 (aarch64_linux_insert_hw_breakpoint)
6083 (aarch64_linux_remove_hw_breakpoint)
6084 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6085 (aarch64_linux_region_ok_for_hw_watchpoint)
6086 (aarch64_linux_stopped_data_address)
6087 (aarch64_linux_stopped_by_watchpoint)
6088 (aarch64_linux_watchpoint_addr_within_range)
6089 (aarch64_linux_can_do_single_step): Refactor as methods of
6090 aarch64_linux_nat_target.
6091 (super_post_startup_inferior): Delete.
6092 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6094 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6095 (the_hppa_linux_nat_target): New.
6096 (hppa_linux_fetch_inferior_registers)
6097 (hppa_linux_store_inferior_registers): Refactor as methods of
6098 hppa_linux_nat_target.
6099 (_initialize_hppa_linux_nat): Adjust to C++ification.
6101 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6102 (the_ia64_linux_nat_target): New.
6103 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6104 (ia64_linux_stopped_data_address)
6105 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6106 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6107 ia64_linux_nat_target methods.
6108 (super_xfer_partial): Delete.
6109 (_initialize_ia64_linux_nat): Adjust to C++ification.
6111 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6112 (the_m32r_linux_nat_target): New.
6113 (m32r_linux_fetch_inferior_registers)
6114 (m32r_linux_store_inferior_registers): Refactor as
6115 m32r_linux_nat_target methods.
6116 (_initialize_m32r_linux_nat): Adjust to C++ification.
6118 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6119 (the_m68k_linux_nat_target): New.
6120 (m68k_linux_fetch_inferior_registers)
6121 (m68k_linux_store_inferior_registers): Refactor as
6122 m68k_linux_nat_target methods.
6123 (_initialize_m68k_linux_nat): Adjust to C++ification.
6125 * s390-linux-nat.c (s390_linux_nat_target): New class.
6126 (the_s390_linux_nat_target): New.
6127 (s390_linux_fetch_inferior_registers)
6128 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6129 (s390_insert_watchpoint, s390_remove_watchpoint)
6130 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6131 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6132 (s390_auxv_parse, s390_read_description): Refactor as methods of
6133 s390_linux_nat_target.
6134 (_initialize_s390_nat): Adjust to C++ification.
6136 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6137 (the_sparc_linux_nat_target): New.
6138 (_initialize_sparc_linux_nat): Adjust to C++ification.
6139 * sparc-nat.c (sparc_fetch_inferior_registers)
6140 (sparc_store_inferior_registers): Remove target_ops parameter.
6141 * sparc-nat.h (sparc_fetch_inferior_registers)
6142 (sparc_store_inferior_registers): Remove target_ops parameter.
6143 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6144 (the_sparc64_linux_nat_target): New.
6145 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6147 * spu-linux-nat.c (spu_linux_nat_target): New class.
6148 (the_spu_linux_nat_target): New.
6149 (spu_child_post_startup_inferior, spu_child_post_attach)
6150 (spu_child_wait, spu_fetch_inferior_registers)
6151 (spu_store_inferior_registers, spu_xfer_partial)
6152 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6154 (_initialize_spu_nat): Adjust to C++ification.
6156 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6157 (the_tilegx_linux_nat_target): New.
6158 (fetch_inferior_registers, store_inferior_registers):
6159 Refactor as methods.
6160 (_initialize_tile_linux_nat): Adjust to C++ification.
6162 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6163 (the_xtensa_linux_nat_target): New.
6164 (xtensa_linux_fetch_inferior_registers)
6165 (xtensa_linux_store_inferior_registers): Refactor as
6166 xtensa_linux_nat_target methods.
6167 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6169 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6170 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6171 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6172 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6173 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6174 (fbsd_stopped_by_sw_breakpoint)
6175 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6176 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6177 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6178 (fbsd_post_startup_inferior, fbsd_post_attach)
6179 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6180 (fbsd_set_syscall_catchpoint)
6181 (super_xfer_partial, super_resume, super_wait)
6182 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6183 (fbsd_handle_debug_trap): Remove target_ops parameter.
6184 (fbsd_nat_add_target): Delete.
6185 * fbsd-nat.h: Include "inf-ptrace.h".
6186 (fbsd_nat_add_target): Delete.
6187 (USE_SIGTRAP_SIGINFO): Define.
6188 (fbsd_nat_target): New class.
6190 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6191 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6192 (amd64bsd_target): Delete.
6193 * amd64-bsd-nat.h: New file.
6194 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6196 (amd64_fbsd_nat_target): New class.
6197 (the_amd64_fbsd_nat_target): New.
6198 (amd64fbsd_read_description): Refactor as method of
6199 amd64_fbsd_nat_target.
6200 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6201 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6202 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6203 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6204 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6205 (i386bsd_target): Delete.
6206 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6207 (i386bsd_fetch_inferior_registers)
6208 (i386bsd_store_inferior_registers): Declare.
6209 (i386_bsd_nat_target): New class.
6210 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6211 (the_i386_fbsd_nat_target): New.
6212 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6213 i386_fbsd_nat_target methods.
6214 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6215 (_initialize_i386fbsd_nat): Adjust to C++ification.
6216 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6217 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6218 (_initialize_x86_bsd_nat): Adjust to C++ification.
6219 * x86-bsd-nat.h: Include "x86-nat.h".
6220 (x86bsd_target): Delete declaration.
6221 (x86bsd_nat_target): New class.
6223 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6224 (the_aarch64_fbsd_nat_target): New.
6225 (aarch64_fbsd_fetch_inferior_registers)
6226 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6227 aarch64_fbsd_nat_target.
6228 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6229 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6230 (the_alpha_bsd_nat_target): New.
6231 (alphabsd_fetch_inferior_registers)
6232 (alphabsd_store_inferior_registers): Refactor as
6233 alpha_bsd_nat_target methods.
6234 (_initialize_alphabsd_nat): Refactor as methods of
6235 alpha_bsd_nat_target.
6236 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6237 (the_amd64_nbsd_nat_target): New.
6238 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6239 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6240 (the_amd64_obsd_nat_target): New.
6241 (_initialize_amd64obsd_nat): Adjust to C++ification.
6242 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6243 (the_arm_fbsd_nat_target): New.
6244 (arm_fbsd_fetch_inferior_registers)
6245 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6246 (_initialize_arm_fbsd_nat): Refactor as methods of
6247 arm_fbsd_nat_target.
6248 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6249 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6250 (the_arm_netbsd_nat_target): New.
6251 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6252 arm_netbsd_nat_target.
6253 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6254 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6255 (the_hppa_nbsd_nat_target): New.
6256 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6257 hppa_nbsd_nat_target methods.
6258 (_initialize_hppanbsd_nat): Adjust to C++ification.
6259 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6260 (the_hppa_obsd_nat_target): New.
6261 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6262 methods of hppa_obsd_nat_target.
6263 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6265 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6266 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6268 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6269 (_initialize_i386obsd_nat): Use add_target.
6270 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6271 (the_m68k_bsd_nat_target): New.
6272 (m68kbsd_fetch_inferior_registers)
6273 (m68kbsd_store_inferior_registers): Refactor as methods of
6274 m68k_bsd_nat_target.
6275 (_initialize_m68kbsd_nat): Adjust to C++ification.
6276 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6277 (the_mips_fbsd_nat_target): New.
6278 (mips_fbsd_fetch_inferior_registers)
6279 (mips_fbsd_store_inferior_registers): Refactor as methods of
6280 mips_fbsd_nat_target.
6281 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6283 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6284 (the_mips_nbsd_nat_target): New.
6285 (mipsnbsd_fetch_inferior_registers)
6286 (mipsnbsd_store_inferior_registers): Refactor as methods of
6287 mips_nbsd_nat_target.
6288 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6289 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6290 (the_mips64_obsd_nat_target): New.
6291 (mips64obsd_fetch_inferior_registers)
6292 (mips64obsd_store_inferior_registers): Refactor as methods of
6293 mips64_obsd_nat_target.
6294 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6296 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6298 * nbsd-nat.h: Include "inf-ptrace.h".
6299 (nbsd_nat_target): New class.
6300 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6301 (obsd_wait): Refactor as methods of obsd_nat_target.
6302 (obsd_add_target): Delete.
6303 * obsd-nat.h: Include "inf-ptrace.h".
6304 (obsd_nat_target): New class.
6305 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6306 (the_ppc_fbsd_nat_target): New.
6307 (ppcfbsd_fetch_inferior_registers)
6308 (ppcfbsd_store_inferior_registers): Refactor as methods of
6309 ppc_fbsd_nat_target.
6310 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6312 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6313 (the_ppc_nbsd_nat_target): New.
6314 (ppcnbsd_fetch_inferior_registers)
6315 (ppcnbsd_store_inferior_registers): Refactor as methods of
6316 ppc_nbsd_nat_target.
6317 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6318 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6319 (the_ppc_obsd_nat_target): New.
6320 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6321 methods of ppc_obsd_nat_target.
6322 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6324 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6325 (the_sh_nbsd_nat_target): New.
6326 (shnbsd_fetch_inferior_registers)
6327 (shnbsd_store_inferior_registers): Refactor as methods of
6329 (_initialize_shnbsd_nat): Adjust to C++ification.
6330 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6331 (inf_ptrace_xfer_partial): Delete.
6332 (sparc_xfer_partial, sparc_target): Delete.
6333 * sparc-nat.h (sparc_fetch_inferior_registers)
6334 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6335 (sparc_target): Delete function declaration.
6336 (sparc_target): New template class.
6337 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6338 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6339 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6340 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6342 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6343 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6344 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6345 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6347 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6348 (the_vax_bsd_nat_target): New.
6349 (vaxbsd_fetch_inferior_registers)
6350 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6352 (_initialize_vaxbsd_nat): Adjust to C++ification.
6354 * bsd-kvm.c (bsd_kvm_target): New class.
6355 (bsd_kvm_ops): Now a bsd_kvm_target.
6356 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6357 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6358 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6360 (bsd_kvm_return_one): Delete.
6361 (bsd_kvm_add_target): Adjust to C++ification.
6363 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6364 (nto_procfs_target_procfs): New classes.
6365 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6366 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6367 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6368 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6369 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6370 (procfs_remove_hw_breakpoint, procfs_resume)
6371 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6372 (procfs_kill_inferior, procfs_store_registers)
6373 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6374 as methods of nto_procfs_target.
6375 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6376 (nto_native_ops): Delete.
6377 (procfs_open, procfs_native_open): Delete.
6378 (nto_native_ops): Now an nto_procfs_target_native.
6379 (init_procfs_targets): Adjust to C++ification.
6380 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6381 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6382 Refactor as methods of nto_procfs_target.
6384 * go32-nat.c (go32_nat_target): New class.
6385 (the_go32_nat_target): New.
6386 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6387 (go32_store_registers, go32_xfer_partial, go32_files_info)
6388 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6389 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6390 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6391 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6392 (go32_target): Delete.
6393 (_initialize_go32_nat): Adjust to C++ification.
6395 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6396 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6397 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6398 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6400 (gnu_target): Delete.
6401 * gnu-nat.h (gnu_target): Delete.
6402 (gnu_nat_target): New class.
6403 * i386-gnu-nat.c (gnu_base_target): New.
6404 (i386_gnu_nat_target): New class.
6405 (the_i386_gnu_nat_target): New.
6406 (_initialize_i386gnu_nat): Adjust to C++ification.
6408 2018-05-02 Pedro Alves <palves@redhat.com>
6410 * bfd-target.c (target_bfd_xclose): Rename to ...
6411 (target_bfd_close): ... this.
6412 (target_bfd_reopen): Adjust.
6413 * target.c (target_close): Remove references to to_xclose.
6414 * target.h (target_ops::to_xclose): Delete.
6415 (target_ops::to_close): Update comments.
6417 2018-05-02 Pedro Alves <palves@redhat.com>
6419 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6421 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6422 * inf-ptrace.c (inf_ptrace_register_u_offset)
6423 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6424 (inf_ptrace_store_register, inf_ptrace_store_registers)
6425 (inf_ptrace_trad_target): Move to ...
6426 * linux-nat-trad.c: ... this new file.
6427 * linux-nat-trad.h: New file.
6428 * linux-nat.c (linux_target_install_ops): Make extern.
6429 (linux_trad_target): Delete.
6430 * linux-nat.h (linux_trad_target): Delete declaration.
6431 (linux_target_install_ops): Declare.
6432 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6435 2018-05-02 Pedro Alves <palves@redhat.com>
6437 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6438 procfs_target/add_target here.
6439 * procfs.c (procfs_target): Make static.
6440 (_initialize_procfs): Call add_target here.
6441 * procfs.h (struct target_ops): Remove forward declaration.
6442 (procfs_target): Remove declaration.
6443 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6445 2018-05-02 Pedro Alves <palves@redhat.com>
6447 * procfs.c (procfs_stopped_by_watchpoint)
6448 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6449 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6451 (procfs_use_watchpoints): Delete, move contents...
6452 (procfs_target): ... here.
6453 * procfs.h (procfs_use_watchpoints): Delete declaration.
6454 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6455 procfs_use_watchpoints.
6456 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6457 procfs_use_watchpoints.
6459 2018-05-02 Tom Tromey <tom@tromey.com>
6462 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6463 and var_zuinteger_unlimited.
6464 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6465 and PARAM_ZUINTEGER_UNLIMITED.
6466 (set_parameter_value): Handle var_zuinteger and
6467 var_zuinteger_unlimited.
6468 (add_setshow_generic): Likewise.
6469 (parmpy_init): Likewise.
6471 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6474 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6475 pointer is not null before dereferencing it.
6477 2018-04-30 Tom Tromey <tom@tromey.com>
6479 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6482 2018-04-30 Tom Tromey <tom@tromey.com>
6484 * breakpoint.c (mention): Remove use of is_mi_like_p.
6485 (print_mention_ranged_breakpoint): Likewise.
6486 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6489 2018-04-30 Tom Tromey <tom@tromey.com>
6491 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6493 2018-04-30 Tom Tromey <tom@tromey.com>
6495 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6496 (info_spu_event_command): Remove some uses of is_mi_like_p.
6498 2018-04-30 Tom Tromey <tom@tromey.com>
6500 * python/py-framefilter.c (py_print_single_arg)
6501 (enumerate_locals, py_print_args, py_print_frame): Remove some
6502 uses of is_mi_like_p.
6504 2018-04-30 Tom Tromey <tom@tromey.com>
6507 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6508 * ui-out.h (ui_out::is_mi_like_p): Now const.
6509 (ui_out::do_is_mi_like_p): Now const.
6510 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6512 2018-04-30 Tom Tromey <tom@tromey.com>
6514 * varobj.c (varobj_set_visualizer): Use new_reference.
6515 * python/python.c (gdbpy_decode_line): Use new_reference.
6516 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6519 2018-04-30 Tom Tromey <tom@tromey.com>
6521 * varobj.c (install_new_value): Use new_reference.
6522 * value.h (value_incref): Return void. Swap intro comment with
6524 * value.c (set_value_parent): Use new_reference.
6525 (value_incref): Return void. Update intro comment.
6526 (release_value): Use new_reference.
6527 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6529 2018-04-30 Tom Tromey <tom@tromey.com>
6531 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6532 * gdb_bfd.h (new_bfd_ref): Remove.
6533 (gdb_bfd_open): Update comment.
6534 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6535 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6536 (gdb_bfd_fdopenr): Use new_reference.
6537 * exec.c (exec_file_attach): Use new_reference.
6539 2018-04-30 Tom Tromey <tom@tromey.com>
6541 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6544 2018-04-30 Tom Tromey <tom@tromey.com>
6546 * jit.c (jit_read_code_entry): Use type_align.
6547 * i386-tdep.c (i386_gdbarch_init): Don't call
6548 set_gdbarch_long_long_align_bit.
6549 * gdbarch.sh: Remove long_long_align_bit.
6550 * gdbarch.c, gdbarch.h: Rebuild.
6551 * arc-tdep.c (arc_type_align): New function.
6552 (arc_gdbarch_init): Use arc_type_align. Don't call
6553 set_gdbarch_long_long_align_bit.
6555 2018-04-30 Tom Tromey <tom@tromey.com>
6557 * rust-lang.c (rust_type_alignment): Remove.
6558 (rust_composite_type): Use type_align.
6560 2018-04-30 Tom Tromey <tom@tromey.com>
6562 * NEWS: Mention Type.align.
6563 * python/py-type.c (typy_get_alignof): New function.
6564 (type_object_getset): Add "alignof".
6566 2018-04-30 Tom Tromey <tom@tromey.com>
6570 * std-operator.def (UNOP_ALIGNOF): New operator.
6571 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6573 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6574 * c-lang.c (c_op_print_tab): Add alignof.
6575 * c-exp.y (ALIGNOF): New token.
6576 (exp): Add "ALIGNOF" production.
6577 (ident_tokens): Add _Alignof and alignof.
6579 2018-04-30 Tom Tromey <tom@tromey.com>
6581 * i386-tdep.c (i386_type_align): New function.
6582 (i386_gdbarch_init): Update.
6583 * gdbarch.sh (type_align): New method.
6584 * gdbarch.c, gdbarch.h: Rebuild.
6585 * arch-utils.h (default_type_align): Declare.
6586 * arch-utils.c (default_type_align): New function.
6587 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6588 (struct type) <align_log2>: New field.
6589 <instance_flags>: Now a bitfield.
6590 (TYPE_RAW_ALIGN): New macro.
6591 (type_align, type_raw_align, set_type_align): Declare.
6592 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6594 * dwarf2read.c (quirk_rust_enum): Set type alignment.
6595 (get_alignment, maybe_set_alignment): New functions.
6596 (read_structure_type, read_enumeration_type, read_array_type)
6597 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6598 (read_subrange_type, read_base_type): Set type alignment.
6600 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
6602 * dwarf2read.c (read_index_from_section): Use bool.
6604 2018-04-29 Fabian Groffen <grobian@gentoo.org>
6607 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6610 2018-04-29 John Reiser <jreiser@BitWagon.com>
6613 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6614 last step, and do it atomically.
6616 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
6618 * compile/compile-c-types.c (convert_int, convert_float):
6621 2018-04-27 Tom Tromey <tom@tromey.com>
6624 * rust-lang.c (rust_inclusive_range_type_p): New function.
6625 (rust_range): Handle inclusive ranges.
6626 (rust_compute_range): Likewise.
6627 * rust-exp.y (struct rust_op) <inclusive>: New field.
6628 (DOTDOTEQ): New constant.
6629 (range_expr): Add "..=" productions.
6630 (operator_tokens): Add "..=" token.
6631 (ast_range): Add "inclusive" parameter.
6632 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6634 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6636 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6637 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6639 * expprint.c (print_subexp_standard): Handle new bounds values.
6640 (dump_subexp_body_standard): Likewise.
6642 2018-04-27 Tom Tromey <tom@tromey.com>
6644 * configure: Rebuild.
6645 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6646 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6648 (class symbol_needs_eval_context): Likewise.
6649 * dwarf2read.c (mock_mapped_index::symbol_name_count)
6650 (mock_mapped_index::symbol_name_at): Use "override". Remove
6652 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6654 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6655 * aarch64-tdep.c (instruction_reader::read): Use "override".
6656 (instruction_reader_test::read): Likewise.
6657 * arm-tdep.c (instruction_reader::read): Use "override".
6658 (instruction_reader_thumb::read): Likewise.
6660 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
6663 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6664 instead of remote_send.
6665 (remote_send): Remove.
6667 2018-04-26 Pedro Alves <palves@redhat.com>
6669 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6670 find_function_start_sal instead of find_pc_line.
6672 2018-04-26 Pedro Alves <palves@redhat.com>
6674 * breakpoint.c (set_breakpoint_location_function): Handle
6676 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6677 * elfread.c (elf_symtab_read): Give data symbols with
6678 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6679 (elf_rel_plt_read): Update comment.
6680 * linespec.c (convert_linespec_to_sals): Handle
6682 (minsym_found): Handle mst_data_gnu_ifunc.
6683 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6684 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6685 * parse.c (find_minsym_type_and_address): Handle
6687 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6688 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6689 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6691 <mst_data_gnu_ifunc>: New enumerator.
6693 2018-04-26 Pedro Alves <palves@redhat.com>
6695 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6696 (lookup_minimal_symbol_by_pc_section): ... this. Replace
6697 'want_trampoline' parameter by a lookup_msym_prefer parameter.
6699 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6700 (lookup_minimal_symbol_by_pc): Adjust.
6701 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6702 (lookup_solib_trampoline_symbol_by_pc): Adjust.
6703 * minsyms.h (lookup_msym_prefer): New enum.
6704 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6705 parameter by a lookup_msym_prefer parameter.
6707 2018-04-26 Pedro Alves <palves@redhat.com>
6709 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6710 ends in "@plt" instead of looking at the symbol's section.
6712 2018-04-26 Pedro Alves <palves@redhat.com>
6714 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
6716 (find_pc_partial_function_gnu_ifunc): Rename to ...
6717 (find_pc_partial_function): ... this, and remove references to
6719 (find_pc_partial_function): Delete old implementation.
6720 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6722 2018-04-26 Pedro Alves <palves@redhat.com>
6724 * linespec.c (struct bound_minimal_symbol_search_key): New.
6725 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
6726 skip first line if we found a GNU ifunc minimal symbol by name.
6727 (compare_msymbols): Change parameters to work with a destructured
6729 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6732 2018-04-26 Pedro Alves <palves@redhat.com>
6734 * breakpoint.c (set_breakpoint_location_function): Don't resolve
6735 ifunc targets here. Instead, if we have an ifunc minsym, use its
6737 (add_location_to_breakpoint): Store the minsym and the objfile in
6738 the breakpoint location.
6739 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6740 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6741 Record the minsym in the sal.
6742 * symtab.h (symtab_and_line) <msymbol>: New field.
6744 2018-04-26 Pedro Alves <palves@redhat.com>
6746 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6747 unless we actually resolved the ifunc.
6749 2018-04-26 Pedro Alves <palves@redhat.com>
6751 * c-exp.y (variable production): Prefer ifunc minsyms over
6752 regular function symbols.
6753 * symtab.c (find_gnu_ifunc): New function.
6754 * minsyms.h (lookup_msym_prefer): New enum.
6755 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6756 parameter by a lookup_msym_prefer parameter.
6757 * symtab.h (find_gnu_ifunc): New declaration.
6759 2018-04-26 Pedro Alves <palves@redhat.com>
6761 * blockframe.c (find_gnu_ifunc_target_type): New function.
6762 (find_function_type): New.
6763 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6764 return a value with a memory address.
6765 (eval_call): For calls to GNU ifunc functions, try to find the
6766 type of the target function from the type that the resolver
6768 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6770 * infcall.c (find_function_return_type): Delete.
6771 (find_function_addr): Add 'function_type' parameter. For calls to
6772 GNU ifunc functions, try to find the type of the target function
6773 from the type that the resolver returns, and return it via
6775 (call_function_by_hand_dummy): Adjust to use the function type
6776 returned by find_function_addr.
6777 (find_function_addr): Add 'function_type' parameter and move
6779 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6782 2018-04-26 Pedro Alves <palves@redhat.com>
6784 * c-exp.y (variable production): Skip finding an alias for ifunc
6787 2018-04-26 Pedro Alves <palves@redhat.com>
6789 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6791 2018-04-25 Pedro Alves <palves@redhat.com>
6793 * infcmd.c (kill_command): Print the pid as string, not the whole
6794 thread's ptid. Add comment. s/has been killed/killed/ in output
6796 * remote.c (remote_detach_1): Print the pid as string, not the
6797 whole thread's ptid.
6799 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6800 Sergio Durigan Junior <sergiodj@redhat.com>
6801 Pedro Alves <palves@redhat.com>
6803 * infcmd.c (kill_command): Print message when inferior has
6805 * inferior.c (print_inferior_events): Remove 'static'. Set as
6807 (add_inferior): Improve message printed when
6808 'print_inferior_events' is on.
6809 (exit_inferior): Remove message printed when
6810 'print_inferior_events' is on.
6811 (detach_inferior): Improve message printed when
6812 'print_inferior_events' is on.
6813 (initialize_inferiors): Use 'add_inferior_silent' to set
6814 'current_inferior_'.
6815 * inferior.h (print_inferior_events): Declare here as
6817 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6818 '[Detaching...]' messages when 'print_inferior_events' is on.
6819 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
6820 as prefix/suffix for messages. Remove periods. Fix erroneous
6821 'Detaching after fork from child...', replace it by '... from
6823 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6824 prefix/suffix when printing 'Detaching...' messages. Print
6825 them when 'print_inferior_events' is on.
6826 * remote.c (remote_detach_1): Print message when detaching
6827 from inferior and '!is_fork_parent'.
6829 2018-04-24 Tom Tromey <tom@tromey.com>
6831 * cli-out.h: Reindent.
6833 2018-04-24 Tom Tromey <tom@tromey.com>
6835 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6836 (cli_ui_out::do_field_string): Use fputs_filtered.
6837 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6839 2018-04-23 Tom Tromey <tom@tromey.com>
6841 * guile/scm-frame.c (gdbscm_frame_read_var): Use
6842 gdb::unique_xmalloc_ptr.
6844 2018-04-23 Tom Tromey <tom@tromey.com>
6846 * configure: Rebuild.
6848 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
6851 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6852 prepare_for_testing. Set normal_bp to r_debug_state if target
6855 2018-04-21 Pedro Alves <palves@redhat.com>
6856 Rajendra SY <rajendra.sy@gmail.com>
6858 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6859 * remote.c (extended_remote_attach): In all-stop mode, mark the
6860 thread as executing.
6862 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6864 * thread.c (thread_apply_all_command): Fix comment.
6865 (thread_command): Fix comment.
6867 2018-04-10 Alan Hayward <alan.hayward@arm.com>
6869 * common/tdesc.h (tdesc_create_feature): Remove xml filename
6871 * features/aarch64-core.c (create_feature_aarch64_core):
6873 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
6875 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
6877 * features/i386/32bit-avx512.c
6878 (create_feature_i386_32bit_avx512): Likewise.
6879 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
6881 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
6883 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
6885 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
6887 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
6889 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
6891 * features/i386/64bit-avx512.c
6892 (create_feature_i386_64bit_avx512): Likewise.
6893 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
6895 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
6897 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
6899 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
6901 * features/i386/64bit-segments.c
6902 (create_feature_i386_64bit_segments): Likewise.
6903 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
6905 * features/i386/x32-core.c
6906 (create_feature_i386_x32_core): Likewise.
6907 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
6908 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
6909 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
6910 * target-descriptions.c: In generated code, don't pass xml
6913 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6915 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
6916 (print_xml_feature::visit_post): Likewise.
6917 (print_xml_feature::visit): Likewise.
6918 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
6919 (print_xml_feature): Add new class.
6920 * regformats/regdat.sh: Null xmltarget on feature targets.
6921 * target-descriptions.c (struct target_desc): Add xmltarget.
6922 (maintenance_check_tdesc_xml_convert): Add unittest function.
6923 (tdesc_get_features_xml): Add function to get xml.
6924 (maintenance_check_xml_descriptions): Test xml generation.
6925 * xml-tdesc.c (string_read_description_xml): Add function.
6926 * xml-tdesc.h (string_read_description_xml): Add declaration.
6928 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6930 * features/Makefile: Add feature marker to targets with new style
6931 target descriptions.
6932 * regformats/aarch64.dat: Regenerate.
6933 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
6934 * regformats/i386/amd64-avx-linux.dat: Likewise.
6935 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
6936 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
6937 * regformats/i386/amd64-linux.dat: Likewise.
6938 * regformats/i386/amd64-mpx-linux.dat: Likewise.
6939 * regformats/i386/amd64.dat: Likewise.
6940 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
6941 * regformats/i386/i386-avx-linux.dat: Likewise.
6942 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
6943 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
6944 * regformats/i386/i386-linux.dat: Likewise.
6945 * regformats/i386/i386-mmx-linux.dat: Likewise.
6946 * regformats/i386/i386-mpx-linux.dat: Likewise.
6947 * regformats/i386/i386.dat: Likewise.
6948 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
6949 * regformats/i386/x32-avx-linux.dat: Likewise.
6950 * regformats/i386/x32-linux.dat: Likewise.
6951 * regformats/tic6x-c62x-linux.dat: Likewise.
6952 * regformats/tic6x-c64x-linux.dat: Likewise.
6953 * regformats/tic6x-c64xp-linux.dat: Likewise.
6954 * regformats/regdat.sh: Parse feature marker.
6956 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6958 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
6959 (tdesc_osabi_name): Likewise.
6960 * target-descriptions.c (tdesc_architecture_name): Add new
6962 (tdesc_osabi_name): Likewise.
6964 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6966 * common/tdesc.c (tdesc_predefined_type): Move to here.
6967 (tdesc_named_type): Likewise.
6968 (tdesc_create_vector): Likewise.
6969 (tdesc_create_struct): Likewise.
6970 (tdesc_set_struct_size): Likewise.
6971 (tdesc_create_union): Likewise.
6972 (tdesc_create_flags): Likewise.
6973 (tdesc_create_enum): Likewise.
6974 (tdesc_add_field): Likewise.
6975 (tdesc_add_typed_bitfield): Likewise.
6976 (tdesc_add_bitfield): Likewise.
6977 (tdesc_add_flag): Likewise.
6978 (tdesc_add_enum_value): Likewise.
6979 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
6980 (struct tdesc_type_vector): Likewise.
6981 (struct tdesc_type_field): Likewise.
6982 (struct tdesc_type_with_fields): Likewise.
6983 (tdesc_create_enum): Add declaration.
6984 (tdesc_add_typed_bitfield): Likewise.
6985 (tdesc_add_enum_value): Likewise.
6986 * target-descriptions.c (tdesc_type_field): Move from here.
6987 (tdesc_type_builtin): Likewise.
6988 (tdesc_type_vector): Likewise.
6989 (tdesc_type_with_fields): Likewise.
6990 (tdesc_predefined_types): Likewise.
6991 (tdesc_named_type): Likewise.
6992 (tdesc_create_vector): Likewise.
6993 (tdesc_create_struct): Likewise.
6994 (tdesc_set_struct_size): Likewise.
6995 (tdesc_create_union): Likewise.
6996 (tdesc_create_flags): Likewise.
6997 (tdesc_create_enum): Likewise.
6998 (tdesc_add_field): Likewise.
6999 (tdesc_add_typed_bitfield): Likewise.
7000 (tdesc_add_bitfield): Likewise.
7001 (tdesc_add_flag): Likewise.
7002 (tdesc_add_enum_value): Likewise.
7003 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7004 (tdesc_add_typed_bitfield): Likewise.
7005 (tdesc_add_enum_value): Likewise.
7007 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7009 * common/tdesc.c (tdesc_feature::accept): Move to here.
7010 (tdesc_feature::operator==): Likewise.
7011 (tdesc_create_reg): Likewise.
7012 * common/tdesc.h (tdesc_type_kind): Likewise.
7013 (struct tdesc_type): Likewise.
7014 (struct tdesc_feature): Likewise.
7015 * regformats/regdat.sh: Create a feature.
7016 * target-descriptions.c (tdesc_type_kind): Move from here.
7017 (tdesc_type): Likewise.
7018 (tdesc_type_up): Likewise.
7019 (tdesc_feature): Likewise.
7020 (tdesc_create_reg): Likewise.
7022 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7024 * Makefile.in: Add arch/tdesc.c
7025 * common/tdesc.c: New file.
7026 * common/tdesc.h (tdesc_element_visitor): Move to here.
7027 (tdesc_element): Likewise.
7028 (tdesc_reg): Likewise.
7029 (tdesc_reg_up): Likewise.
7030 * regformats/regdef.h (reg): Add offset to constructors.
7031 * target-descriptions.c (tdesc_element_visitor): Move from here.
7032 (tdesc_element): Likewise.
7033 (tdesc_reg): Likewise.
7034 (tdesc_reg_up): Likewise.
7036 2018-04-17 Tom Tromey <tom@tromey.com>
7038 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7041 2018-04-17 Tom Tromey <tom@tromey.com>
7043 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7045 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
7047 * symtab.c (print_symbol_info): Skip printing filename and line
7048 number when `last' is NULL.
7049 (symtab_symbol_info): Use empty string instead of NULL for first
7050 invocation of print_symbol_info.
7051 (rbreak_command): Pass NULL to `last' parameter of
7054 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
7056 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7059 2018-04-16 Pedro Alves <palves@redhat.com>
7061 * MAINTAINERS (sh): Remove.
7062 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7063 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7064 (ALLDEPFILES): Remove sh64-tdep.c.
7065 * NEWS: Mentions that support for SH-5/SH64 is removed.
7066 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7067 (sh*-*-openbsd*): Ditto.
7068 (sh64-*-elf*): Remove.
7070 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7071 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7072 * sh-tdep.c: No longer include "sh64-tdep.h".
7073 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7074 * sh64-tdep.c, sh64-tdep.h: Remove files.
7076 2018-04-16 Pedro Alves <palves@redhat.com>
7078 * MAINTAINERS: Remove m88k.
7079 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7080 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7081 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7082 * NEWS: Mention that support for m88k was removed.
7083 * configure.host (m88*-*-*): Remove support.
7084 * configure.nat (m88k-*-*): Remove support.
7085 * configure.tgt (m88*-*-openbsd*): Remove.
7086 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7088 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7090 * configure.tgt (x86_tobjs): New variable.
7091 (amd64_tobjs, i386_tobjs): Use it.
7093 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7095 * symtab.c (print_symbol_info): Precede the symbol definition by
7096 the line number when available.
7097 * NEWS: Advertise this enhancement.
7099 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7101 * NEWS (New options): announce set/show record btrace cpu.
7102 * btrace.c: Include record-btrace.h.
7103 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7104 the vendor is unknown.
7105 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7106 Maybe overwrite the btrace configuration's cpu.
7107 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7108 (btrace_fetch): Add cpu parameter. Update callers.
7109 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7110 Maybe overwrite the btrace configuration's cpu. Skip enabling
7111 errata workarounds if the vendor is unknown.
7112 * python/py-record-btrace.c: Include record-btrace.h.
7113 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7114 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7115 * record-btrace.c (record_btrace_cpu_state_kind): New.
7116 (record_btrace_cpu): New.
7117 (set_record_btrace_cpu_cmdlist): New.
7118 (record_btrace_get_cpu): New.
7119 (require_btrace_thread, record_btrace_info)
7120 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7121 (cmd_set_record_btrace_cpu_none): New.
7122 (cmd_set_record_btrace_cpu_auto): New.
7123 (cmd_set_record_btrace_cpu): New.
7124 (cmd_show_record_btrace_cpu): New.
7125 (_initialize_record_btrace): Initialize set/show record btrace cpu
7127 * record-btrace.h (record_btrace_get_cpu): New.
7129 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7131 * record.c (set_record_command): Fix typo in message.
7133 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7135 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7137 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7139 * infrun.c (process_event_stop_test): Call
7140 gdbarch_in_indirect_branch_thunk.
7141 * gdbarch.sh (in_indirect_branch_thunk): New.
7142 * gdbarch.c: Regenerated.
7143 * gdbarch.h: Regenerated.
7146 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7147 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7148 (ALLDEPFILES): Add x86-tdep.c.
7149 * arch-utils.h (default_in_indirect_branch_thunk): New.
7150 * arch-utils.c (default_in_indirect_branch_thunk): New.
7151 * i386-tdep: Include x86-tdep.h.
7152 (i386_in_indirect_branch_thunk): New.
7153 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7155 * amd64-tdep: Include x86-tdep.h.
7156 (amd64_in_indirect_branch_thunk): New.
7157 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7159 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7162 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7163 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7164 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7167 2018-04-12 Tom Tromey <tom@tromey.com>
7169 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7170 (rust_evaluate_subexp): Likewise.
7172 2018-04-12 Pedro Alves <palves@redhat.com>
7174 * procfs.c (procfs_detach): Make forward declaration's prototype
7175 match definition's protototype.
7176 (proc_get_LDT_entry): Remove stale do_cleanups call.
7178 2018-04-12 Pedro Alves <palves@redhat.com>
7180 * target.h (target_ops::to_has_exited): Delete.
7181 (target_has_exited): Delete.
7182 * target-delegates.c: Regenerate.
7184 2018-04-11 Pedro Alves <palves@redhat.com>
7186 * target.c (fileio_fh_t::t): Add comment.
7187 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7188 (target_fileio_close): Handle a NULL target.
7189 (invalidate_fileio_fh): New.
7190 (target_close): Call it.
7191 * remote.c (remote_hostio_send_command): No longer check whether
7192 remote_desc is open.
7194 2018-04-11 Pedro Alves <palves@redhat.com>
7196 * target.c (fileio_fh_t): Make it a named struct instead of a
7198 (fileio_fh_t::is_closed): New method.
7199 (DEF_VEC_O (fileio_fh_t)): Remove.
7200 (fileio_fhandles): Now a std::vector.
7201 (is_closed_fileio_fh): Delete.
7202 (acquire_fileio_fd): Adjust. Rename parameters.
7203 (release_fileio_fd): Adjust.
7204 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7205 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7206 (target_fileio_close): Adjust.
7208 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7210 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7213 2018-04-10 Pedro Alves <palves@redhat.com>
7215 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7216 (scoped_finish_thread_state): New class.
7217 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7219 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7220 (fetch_inferior_event, normal_stop): Likewise.
7221 * thread.c (finish_thread_state_cleanup): Delete.
7223 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7224 Pedro Alves <palves@redhat.com>
7226 * value.c: Include "selftest.h" and "common/array-view.h".
7227 (struct range) <operator ==>: New.
7228 (test_ranges_contain): New.
7229 (check_ranges_vector): New.
7230 (test_insert_into_bit_range_vector): New.
7231 (_initialize_values): Register selftests.
7232 * common/array-view.h (operator==, operator!=): New.
7234 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7236 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7238 * inline-frame.c: Include <algorithm>.
7239 (struct inline_state): Add constructor.
7240 (inline_state_s): Remove.
7241 (DEF_VEC_O(inline_state_s)): Remove.
7242 (inline_states): Change type to std::vector.
7243 (find_inline_frame_state): Adjust to std::vector.
7244 (allocate_inline_frame_state): Remove.
7245 (clear_inline_frame_state): Adjust to std::vector.
7246 (skip_inline_frames): Adjust to std::vector.
7248 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7250 * tracepoint.h (struct trace_state_variable): Add constructor.
7251 <name>: Change type to std::string.
7252 * tracepoint.c (tsv_s): Remove.
7253 (DEF_VEC_O(tsv_s)): Remove.
7254 (tvariables): Change to std::vector.
7255 (create_trace_state_variable): Adjust to std::vector.
7256 (find_trace_state_variable): Likewise.
7257 (find_trace_state_variable_by_number): Likewise.
7258 (delete_trace_state_variable): Likewise.
7259 (trace_variable_command): Adjust to std::string.
7260 (delete_trace_variable_command): Likewise.
7261 (tvariables_info_1): Adjust to std::vector.
7262 (save_trace_state_variables): Likewise.
7263 (start_tracing): Likewise.
7264 (merge_uploaded_trace_state_variables): Adjust to std::vector
7266 * target.h (struct target_ops)
7267 <to_download_trace_state_variable>: Pass reference to
7268 trace_state_variable.
7269 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7270 * target-delegates.c: Re-generate.
7271 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7272 (mi_tsv_deleted): Likewise.
7273 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7274 * remote.c (remote_download_trace_state_variable): Change
7275 pointer to reference and adjust.
7276 * make-target-delegates (parse_argtypes): Handle references.
7277 (write_function_header): Likewise.
7278 (munge_type): Likewise.
7280 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7282 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7283 string_view-selftests.c.
7284 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7286 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7287 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7288 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7289 * unittests/basic_string_view/element_access/char/1.cc:
7291 * unittests/basic_string_view/element_access/char/empty.cc:
7293 * unittests/basic_string_view/element_access/char/front_back.cc:
7295 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7296 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7298 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7300 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7302 * unittests/basic_string_view/operations/compare/char/1.cc:
7304 * unittests/basic_string_view/operations/compare/char/13650.cc:
7306 * unittests/basic_string_view/operations/copy/char/1.cc:
7308 * unittests/basic_string_view/operations/data/char/1.cc:
7310 * unittests/basic_string_view/operations/find/char/1.cc:
7312 * unittests/basic_string_view/operations/find/char/2.cc:
7314 * unittests/basic_string_view/operations/find/char/3.cc:
7316 * unittests/basic_string_view/operations/find/char/4.cc:
7318 * unittests/basic_string_view/operations/rfind/char/1.cc:
7320 * unittests/basic_string_view/operations/rfind/char/2.cc:
7322 * unittests/basic_string_view/operations/rfind/char/3.cc:
7324 * unittests/basic_string_view/operations/substr/char/1.cc:
7326 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7327 * unittests/string_view-selftests.c: New file.
7329 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7331 * unittests/basic_string_view/capacity/1.cc: New file.
7332 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7333 * unittests/basic_string_view/cons/char/1.cc: New file.
7334 * unittests/basic_string_view/cons/char/2.cc: New file.
7335 * unittests/basic_string_view/cons/char/3.cc: New file.
7336 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7337 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7338 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7339 * unittests/basic_string_view/element_access/char/1.cc: New file.
7340 * unittests/basic_string_view/element_access/char/2.cc: New file.
7341 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7342 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7343 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7344 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7345 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7346 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7347 * unittests/basic_string_view/include.cc: New file.
7348 * unittests/basic_string_view/inserters/char/1.cc: New file.
7349 * unittests/basic_string_view/inserters/char/2.cc: New file.
7350 * unittests/basic_string_view/inserters/char/3.cc: New file.
7351 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7352 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7353 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7354 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7355 * unittests/basic_string_view/literals/types.cc: New file.
7356 * unittests/basic_string_view/literals/values.cc: New file.
7357 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7358 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7359 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7360 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7361 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7362 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7363 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7364 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7365 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7366 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7367 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7368 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7369 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7370 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7371 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7372 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7373 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7374 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7375 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7376 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7377 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7378 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7379 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7380 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7381 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7382 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7383 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7384 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7385 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7386 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7387 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7388 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7389 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7390 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7391 * unittests/basic_string_view/operators/char/2.cc: New file.
7392 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7393 * unittests/basic_string_view/range_access/char/1.cc: New file.
7394 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7395 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7396 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7397 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7398 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7399 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7400 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7401 * unittests/basic_string_view/typedefs.cc: New file.
7402 * unittests/basic_string_view/types/1.cc: New file.
7404 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7406 * common/gdb_string_view.h: Remove libstdc++ implementation
7407 details, adjust to gdb reality.
7408 * common/gdb_string_view.tcc: Likewise.
7409 * cli/cli-script.c (struct string_view): Remove.
7410 (user_args) <m_args>: Change element type to gdb::string_view.
7411 (user_args::insert_args): Adjust.
7413 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7415 * common/gdb_string_view.h: New file.
7416 * common/gdb_string_view.tcc: New file.
7418 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7420 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7421 * configure: Re-generate.
7423 2018-04-09 Pedro Alves <palves@redhat.com>
7425 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7426 (set_target_gdbarch): Call
7427 gdb::observers::architecture_changed.notify instead of
7428 observer_notify_architecture_changed.
7430 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7432 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7433 (do_restore_current_traceframe_cleanup): Remove.
7434 (restore_current_traceframe_cleanup_dtor): Remove.
7435 (make_cleanup_restore_current_traceframe): Remove.
7436 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7438 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7439 * infrun.c (fetch_inferior_event): Use
7440 scoped_restore_current_traceframe.
7442 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7444 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7446 <n_allocated_type_units>: Remove.
7447 <all_type_units>: Change to std::vector.
7448 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7449 to std::vector change.
7450 (dwarf2_per_objfile::get_cutu): Likewise.
7451 (dwarf2_per_objfile::get_tu): Likewise.
7452 (create_signatured_type_table_from_index): Likewise.
7453 (create_signatured_type_table_from_debug_names): Likewise.
7454 (dw2_symtab_iter_next): Likewise.
7455 (dw2_print_stats): Likewise.
7456 (dw2_expand_all_symtabs): Likewise.
7457 (dw2_expand_marked_cus): Likewise.
7458 (dw2_debug_names_iterator::next): Likewise.
7459 (dwarf2_initialize_objfile): Likewise.
7460 (add_signatured_type_cu_to_table): Likewise.
7461 (create_all_type_units): Likewise.
7462 (add_type_unit): Likewise.
7463 (struct tu_abbrev_offset): Add constructor.
7464 (build_type_psymtabs_1): Adjust to std::vector change.
7465 (print_tu_stats): Likewise.
7466 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7467 (write_debug_names): Likewise.
7469 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7471 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7472 Make an std::vector.
7473 <n_comp_units>: Remove.
7474 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7475 to std::vector change.
7476 (dwarf2_per_objfile::get_cutu): Likewise.
7477 (dwarf2_per_objfile::get_cu): Likewise.
7478 (create_cus_from_index): Likewise.
7479 (create_addrmap_from_index): Likewise.
7480 (create_addrmap_from_aranges): Likewise.
7481 (dwarf2_read_index): Likewise.
7482 (dw2_find_last_source_symtab): Likewise.
7483 (dw2_map_symtabs_matching_filename): Likewise.
7484 (dw2_symtab_iter_next): Likewise.
7485 (dw2_print_stats): Likewise.
7486 (dw2_expand_all_symtabs): Likewise.
7487 (dw2_expand_symtabs_with_fullname): Likewise.
7488 (dw2_expand_marked_cus): Likewise.
7489 (dw2_map_symbol_filenames): Likewise.
7490 (create_cus_from_debug_names): Likewise.
7491 (dwarf2_read_debug_names): Likewise.
7492 (dw2_debug_names_iterator::next): Likewise.
7493 (dwarf2_initialize_objfile): Likewise.
7494 (set_partial_user): Likewise.
7495 (dwarf2_build_psymtabs_hard): Likewise.
7496 (read_comp_units_from_section): Remove arguments, adjust to
7498 (create_all_comp_units): Adjust to std::vector and
7499 read_comp_units_from_section changes.
7500 (dwarf2_find_containing_comp_unit): Adjust to std::vector
7502 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7503 (psyms_seen_size): Likewise.
7504 (write_gdbindex): Likewise.
7505 (write_debug_names): Likewise.
7507 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7509 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7510 with dwarf2_per_objfile.
7511 (create_cus_from_index): Likewise.
7512 (create_signatured_type_table_from_index): Likewise.
7513 (dwarf2_read_index): Likewise.
7514 (dwarf2_initialize_objfile): Likewise.
7515 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
7516 per_cu rather than get_dwarf2_per_objfile.
7518 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7520 * dwarf2read.h (struct signatured_type): Forward declare.
7521 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7523 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7524 (dw2_get_cutu): ...this.
7525 (dwarf2_per_objfile::get_cu): Rename from...
7526 (dw2_get_cu): ...this.
7527 (dwarf2_per_objfile::get_tu): New.
7528 (create_addrmap_from_index): Adjust.
7529 (create_addrmap_from_aranges): Adjust.
7530 (dw2_find_last_source_symtab): Adjust.
7531 (dw2_map_symtabs_matching_filename): Adjust.
7532 (dw2_symtab_iter_next): Adjust.
7533 (dw2_print_stats): Adjust.
7534 (dw2_expand_all_symtabs): Adjust.
7535 (dw2_expand_symtabs_with_fullname): Adjust.
7536 (dw2_expand_marked_cus): Adjust.
7537 (dw_expand_symtabs_matching_file_matcher): Adjust.
7538 (dw2_map_symbol_filenames): Adjust.
7539 (dw2_debug_names_iterator::next): Adjust.
7540 (dwarf2_initialize_objfile): Adjust.
7541 (set_partial_user): Adjust.
7542 (dwarf2_build_psymtabs_hard): Adjust.
7544 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7546 * dwarf2read.c (create_signatured_type_table_from_debug_names):
7547 Remove unused variables.
7548 (dw2_map_symtabs_matching_filename): Likewise.
7549 (dwarf2_record_block_ranges): Likewise.
7550 (dwarf2_read_addr_index): Likewise.
7551 (follow_die_offset): Likewise.
7553 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7555 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7556 to symbol_file_add_main.
7558 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7561 * mi/mi-console.c (do_fputc_async_safe): New.
7562 (mi_console_file::write_async_safe): New.
7563 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7564 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7566 * ui-file.c (ui_file::putstrn): Adjust call to
7567 fputstrn_unfiltered.
7568 * utils.c (printchar): Replace do_fputs and do_fprintf
7569 parameters by do_fputc.
7570 (fputstr_filtered): Adjust call to printchar.
7571 (fputstr_unfiltered): Likewise.
7572 (fputstrn_filtered): Likewise.
7573 (fputstrn_unfiltered): Add do_fputc parameter, pass to
7575 * utils.h (do_fputc_ftype): New typedef.
7576 (fputstrn_unfiltered): Add do_fputc parameter.
7578 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7580 * regformats/i386/i386-avx.dat: Remove.
7582 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7585 * amd64-tdep.c (amd64_none_init_abi): New function.
7586 (amd64_x32_none_init_abi): New function.
7587 (_initialize_amd64_tdep): Register handlers for x86-64 and
7588 x64_32 with GDB_OSABI_NONE.
7589 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7590 GDB_OSABI_NONE osabi.
7592 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7595 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7597 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7598 * osabi.c (gdb_osabi_names): Add "unknown" entry.
7600 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7602 * common/byte-vector.h (char_vector): New type.
7603 * target.h (target_read_alloc): Return
7604 gdb::optional<byte_vector>.
7605 (target_read_stralloc): Return gdb::optional<char_vector>.
7606 (target_get_osdata): Return gdb::optional<char_vector>.
7607 * target.c (target_read_alloc_1): Templatize. Replacement
7608 manual memory management with vector.
7609 (target_read_alloc): Change return type, adjust.
7610 (target_read_stralloc): Change return type, adjust.
7611 (target_get_osdata): Change return type, adjust.
7612 * auxv.c (struct auxv_info) <length>: Remove.
7613 <data>: Change type to gdb::optional<byte_vector>.
7614 (auxv_inferior_data_cleanup): Free auxv_info with delete.
7615 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7616 (target_auxv_search): Adjust.
7617 (fprint_target_auxv): Adjust.
7618 * avr-tdep.c (avr_io_reg_read_command): Adjust.
7619 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7620 (linux_make_corefile_notes): Adjust.
7621 * osdata.c (get_osdata): Adjust.
7622 * remote.c (remote_get_threads_with_qxfer): Adjust.
7623 (remote_memory_map): Adjust.
7624 (remote_traceframe_info): Adjust.
7625 (btrace_read_config): Adjust.
7626 (remote_read_btrace): Adjust.
7627 (remote_pid_to_exec_file): Adjust.
7628 * solib-aix.c (solib_aix_get_library_list): Adjust.
7629 * solib-dsbt.c (decode_loadmap): Don't free buf.
7630 (dsbt_get_initial_loadmaps): Adjust.
7631 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7632 * solib-target.c (solib_target_current_sos): Adjust.
7633 * tracepoint.c (sdata_make_value): Adjust.
7634 * xml-support.c (xinclude_start_include): Adjust.
7635 (xml_fetch_content_from_file): Adjust.
7636 * xml-support.h (xml_fetch_another): Change return type.
7637 (xml_fetch_content_from_file): Change return type.
7638 * xml-syscall.c (xml_init_syscalls_info): Adjust.
7639 * xml-tdesc.c (file_read_description_xml): Adjust.
7640 (fetch_available_features_from_target): Change return type.
7641 (target_fetch_description_xml): Adjust.
7642 (target_read_description_xml): Adjust.
7644 2018-04-06 Tom Tromey <tom@tromey.com>
7646 * value.c (~value): Update.
7647 (struct value) <contents>: Now unique_xmalloc_ptr.
7648 (value_contents_bits_eq, allocate_value_contents)
7649 (value_contents_raw, value_contents_all_raw)
7650 (value_contents_for_printing, value_contents_for_printing_const)
7651 (set_value_enclosing_type): Update.
7653 2018-04-06 Tom Tromey <tom@tromey.com>
7655 * value.c (range_s): Remove typedef, VEC.
7656 (struct range): Add operator<.
7657 (range_lessthan): Remove.
7658 (ranges_contain): Change type.
7660 (struct value) <unavailable, optimized_out>: Now std::vector.
7661 (value_entirely_available)
7662 (value_entirely_covered_by_range_vector)
7663 (value_entirely_unavailable, value_entirely_optimized_out):
7665 (insert_into_bit_range_vector): Change argument type.
7666 (find_first_range_overlap): Likewise.
7667 (struct ranges_and_idx, value_contents_bits_eq)
7668 (require_not_optimized_out, require_available): Update.
7669 (ranges_copy_adjusted): Change argument types.
7670 (value_optimized_out, value_copy, value_fetch_lazy): Update.
7672 2018-04-06 Tom Tromey <tom@tromey.com>
7674 * value.c (~value): Update.
7675 (struct value) <parent>: Now a value_ref_ptr.
7676 (value_parent, set_value_parent, value_address, value_copy):
7679 2018-04-06 Tom Tromey <tom@tromey.com>
7681 * value.c (struct value): Add constructor, destructor, and member
7683 (allocate_value_lazy, value_decref): Update.
7685 2018-04-06 Tom Tromey <tom@tromey.com>
7687 * value.c (struct value) <released, next>: Remove.
7688 (all_values): Now a std::vector.
7689 (allocate_value_lazy): Update.
7690 (value_next): Remove.
7691 (value_mark, value_free_to_mark, release_value)
7692 (value_release_to_mark): Update.
7694 2018-04-06 Tom Tromey <tom@tromey.com>
7696 * value.h (fetch_subexp_value, value_release_to_mark): Update.
7697 (free_value_chain): Remove.
7698 * value.c (free_value_chain): Remove.
7699 (value_release_to_mark): Return a std::vector.
7700 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7702 (check_condition): Update.
7703 * eval.c (fetch_subexp_value): Change "val_chain" to a
7705 * breakpoint.c (update_watchpoint): Update.
7706 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7708 2018-04-06 Tom Tromey <tom@tromey.com>
7710 * value.h (free_all_values): Remove.
7711 * value.c (free_all_values): Remove.
7713 2018-04-06 Tom Tromey <tom@tromey.com>
7715 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7716 (value_history_chain, value_history_count): Remove.
7717 (value_history): New global.
7718 (record_latest_value, access_value_history, show_values)
7719 (preserve_values): Update.
7721 2018-04-06 Tom Tromey <tom@tromey.com>
7723 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7724 * varobj.c (varobj_set_display_format, varobj_set_value)
7725 (install_default_visualizer, construct_visualizer)
7726 (install_new_value, ~varobj, varobj_get_value_type)
7727 (my_value_of_variable, varobj_editable_p): Update.
7728 * c-varobj.c (c_describe_child, c_value_of_variable)
7729 (cplus_number_of_children, cplus_describe_child): Update.
7730 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7731 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7732 (ada_value_of_variable, ada_value_is_changeable_p): Update.
7734 2018-04-06 Tom Tromey <tom@tromey.com>
7736 * printcmd.c (last_examine_address): Change type to
7738 (do_examine, x_command): Update.
7740 2018-04-06 Tom Tromey <tom@tromey.com>
7742 * value.c (release_value): Update.
7743 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7744 (struct bpstats) <val>: Now a value_ref_ptr.
7745 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7746 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7747 (~watchpoint, print_it_watchpoint, watch_command_1)
7748 (invalidate_bp_value_on_memory_change): Update.
7750 2018-04-06 Tom Tromey <tom@tromey.com>
7752 * varobj.c (varobj_clear_saved_item)
7753 (update_dynamic_varobj_children, install_new_value, ~varobj):
7755 * value.h (value_incref): Move declaration earlier.
7756 (value_decref): Rename from value_free.
7757 (struct value_ref_policy): New.
7758 (value_ref_ptr): New typedef.
7759 (struct value_deleter): Remove.
7760 (gdb_value_up): Remove typedef.
7761 (release_value): Change return type.
7762 (release_value_or_incref): Remove.
7763 * value.c (set_value_parent): Update.
7764 (value_incref): Change return type.
7765 (value_decref): Rename from value_free.
7766 (value_free_to_mark, free_all_values, free_value_chain): Update.
7767 (release_value): Return value_ref_ptr.
7768 (release_value_or_incref): Remove.
7769 (record_latest_value, set_internalvar, clear_internalvar):
7771 * stack.c (info_frame_command): Don't call value_free.
7772 * python/py-value.c (valpy_dealloc, valpy_new)
7773 (value_to_value_object): Update.
7774 * printcmd.c (do_examine): Update.
7775 * opencl-lang.c (lval_func_free_closure): Update.
7776 * mi/mi-main.c (register_changed_p): Don't call value_free.
7777 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7778 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7779 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7781 * guile/scm-value.c (vlscm_free_value_smob)
7782 (vlscm_scm_from_value): Update.
7783 * frame.c (frame_register_unwind, frame_unwind_register_signed)
7784 (frame_unwind_register_unsigned, get_frame_register_bytes)
7785 (put_frame_register_bytes): Don't call value_free.
7786 * findvar.c (address_from_register): Don't call value_free.
7787 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7788 * dwarf2loc.c (entry_data_value_free_closure)
7789 (value_of_dwarf_reg_entry, free_pieced_value_closure)
7790 (dwarf2_evaluate_loc_desc_full): Update.
7791 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7792 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7793 (~watchpoint, watch_command_1)
7794 (invalidate_bp_value_on_memory_change): Update.
7795 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7797 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
7800 * warning.m4: Add -Wno-error=deprecated-register.
7801 * configure: Re-generate.
7803 2018-04-05 Tom Tromey <tom@tromey.com>
7805 * linespec.h: Remove include of "vec.h".
7807 2018-04-05 Tom Tromey <tom@tromey.com>
7809 * linespec.c (typep): Remove typedef.
7810 (find_methods, find_superclass_methods): Take a std::vector.
7811 (find_method): Use std::vector.
7813 2018-04-05 Tom Tromey <tom@tromey.com>
7815 * utils.c (compare_strings): Remove.
7816 * utils.h (compare_strings): Remove.
7817 * objc-lang.h (find_imps): Update.
7818 * objc-lang.c (find_methods): Take a std::vector.
7819 (uniquify_strings, find_imps): Likewise.
7820 * linespec.c (find_methods): Take a std::vector.
7821 (decode_objc): Use std::vector.
7822 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7824 (find_method, find_function_symbols): Use std::vector.
7826 2018-04-05 Tom Tromey <tom@tromey.com>
7828 * completer.c (completion_tracker::completion_tracker): Remove
7830 (completion_tracker::discard_completions): Likewise.
7831 * breakpoint.c (ambiguous_names_p): Remove cast.
7832 * ada-lang.c (_initialize_ada_language): Remove cast.
7833 * utils.h (streq): Update.
7834 (streq_hash): Add new declaration.
7835 * utils.c (streq): Return bool.
7836 (streq_hash): New function.
7838 2018-04-05 Tom Tromey <tom@tromey.com>
7840 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7841 Remove a string copy.
7843 2018-04-05 Tom Tromey <tom@tromey.com>
7845 * linespec.c (filter_results): Use std::vector.
7846 (decode_line_2, decode_line_full): Update.
7848 2018-04-05 Tom Tromey <tom@tromey.com>
7850 * linespec.c (canonical_to_fullform): Return std::string.
7851 (filter_results): Update.
7852 (struct decode_line_2_item): Add constructor.
7853 <fullform, displayform>: Now std::string.
7854 (decode_line_2_compare_items): Now a std::sort comparator.
7855 (decode_line_2): Update.
7857 2018-04-05 Tom Tromey <tom@tromey.com>
7859 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7860 (unexpected_linespec_error): Update.
7861 (linespec_parse_basic, parse_linespec): Update.
7863 2018-04-05 Tom Tromey <tom@tromey.com>
7865 * linespec.c (linespec_parse_basic): Reindent.
7867 2018-04-05 Tom Tromey <tom@tromey.com>
7869 * minsyms.h (iterate_over_minimal_symbols): Update.
7870 * minsyms.c (iterate_over_minimal_symbols): Take a
7872 * linespec.c (struct collect_minsyms): Remove.
7873 (compare_msyms): Now a std::sort comparator.
7874 (add_minsym): Add parameters.
7875 (search_minsyms_for_name): Update. Use std::vector.
7877 2018-04-03 Tom Tromey <tom@tromey.com>
7879 * mipsread.c (read_alphacoff_dynamic_symtab): Use
7882 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7884 * MAINTAINERS (Write After Approval): Add Weimin Pan.
7886 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7889 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
7890 printing static type.
7892 2018-04-01 Tom Tromey <tom@tromey.com>
7894 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
7895 (rs6000_xfer_shared_libraries): Update.
7897 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
7899 * common/gdb_vecs.h (char_ptr): Remove.
7900 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
7902 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7904 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
7906 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
7908 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7910 * tracepoint.h (struct uploaded_tp): Initialize fields.
7911 <actions, step_actions, cmd_strings>: Change type to
7912 std::vector<char *>.
7913 * tracepoint.c (get_uploaded_tp): Allocate with new.
7914 (free_uploaded_tps): Free with delete.
7915 (parse_tracepoint_definition): Adjust to std::vector change.
7916 * breakpoint.c (read_uploaded_action): Likewise.
7917 (create_tracepoint_from_upload): Likewise.
7918 * ctf.c (ctf_write_uploaded_tp): Likewise.
7919 (SET_ARRAY_FIELD): Likewise.
7920 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
7922 2018-03-30 Tom Tromey <tom@tromey.com>
7924 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
7926 (svr4_keep_data_in_core): Update.
7927 (svr4_read_so_list): Update.
7929 2018-03-30 Tom Tromey <tom@tromey.com>
7931 * windows-nat.c (handle_output_debug_string, handle_exception):
7933 * target.h (target_read_string): Update.
7934 * target.c (target_read_string): Change "string" to
7936 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
7938 * solib-frv.c (frv_current_sos): Update.
7939 * solib-dsbt.c (dsbt_current_sos): Update.
7940 * solib-darwin.c (darwin_current_sos): Update.
7941 * linux-thread-db.c (inferior_has_bug): Update.
7942 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
7943 Update. Remove alloca.
7944 * ada-lang.c (ada_main_name): Update.
7946 2018-03-30 Tom Tromey <tom@tromey.com>
7948 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
7949 (struct dwo_file_deleter): New.
7950 (dwo_file_up): New typedef.
7951 (open_and_init_dwo_file): Use dwo_file_up.
7952 (free_dwo_file_cleanup): Remove.
7954 2018-03-30 Tom Tromey <tom@tromey.com>
7956 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
7957 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
7959 2018-03-30 Tom Tromey <tom@tromey.com>
7961 * dwarf2read.c (class free_cached_comp_units): New class.
7962 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
7963 (free_cached_comp_units): Remove function.
7965 2018-03-30 Tom Tromey <tom@tromey.com>
7967 * utils.h (make_cleanup_unpush_target): Remove.
7968 * inf-ptrace.c (struct target_unpusher): New.
7969 (target_unpush_up) New typedef.
7970 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
7972 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
7974 2018-03-27 Tom Tromey <tom@tromey.com>
7976 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
7978 2018-03-27 Pedro Alves <palves@redhat.com>
7979 Tom Tromey <tom@tromey.com>
7981 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
7982 destructor. Now a class.
7983 (gdb_readline_wrapper_cleanup): Remove function.
7984 (gdb_readline_wrapper): Remove cleanups.
7986 2018-03-27 Tom Tromey <tom@tromey.com>
7988 * typeprint.h (struct type_print_options) <local_typedefs,
7989 global_typedefs>: Remove "struct" keyword.
7990 (class typedef_hash_table): New class.
7991 (recursively_update_typedef_hash, add_template_parameters)
7992 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
7993 (find_typedef_in_hash): Don't declare.
7994 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
7995 (typedef_hash_table::recursively_update): Rename from
7996 recursively_update_typedef_hash. Now a member.
7997 (typedef_hash_table::add_template_parameters): Rename from
7998 add_template_parameters. Now a member.
7999 (typedef_hash_table::typedef_hash_table): Now a constructor;
8000 rename from create_typedef_hash.
8001 (typedef_hash_table::~typedef_hash_table): Now a destructor;
8002 rename from free_typedef_hash.
8003 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8004 (do_free_global_table): Remove.
8005 (typedef_hash_table::typedef_hash_table): New constructor; renamed
8006 from copy_type_recursive.
8007 (create_global_typedef_table): Remove.
8008 (typedef_hash_table::find_global_typedef): Now a member of
8010 (typedef_hash_table::find_typedef): Rename from
8011 find_typedef_in_hash; now a member.
8012 (whatis_exp): Update.
8013 * extension.h (struct ext_lang_type_printers): Add constructor and
8015 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8017 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8018 Now a constructor; rename from start_ext_lang_type_printers.
8019 (ext_lang_type_printers): Now a destructor; rename from
8020 free_ext_lang_type_printers.
8021 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8023 (c_type_print_base_struct_union): Update. Remove cleanups.
8025 2018-03-27 Tom Tromey <tom@tromey.com>
8027 * dwarf-index-write.c: Include <cmath>.
8029 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8031 * NEWS: Add entry describing new "set|show varsize-limit" command.
8032 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8034 * printcmd.c (_initialize_printcmd): Add "set var" alias of
8037 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
8039 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8041 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8042 * dwarf-index-common.c: New file.
8043 * dwarf-index-common.h: New file.
8044 * dwarf-index-write.c: New file.
8045 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8046 (struct dwarf2_section_info): Move from here.
8047 (dwarf2_section_info_def): Likewise.
8048 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8049 (offset_type): Likewise.
8050 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8051 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8052 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8053 (byte_swap): Likewise.
8054 (MAYBE_SWAP): Likewise.
8055 (dwarf2_per_cu_ptr): Likewise.
8056 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8057 (struct tu_stats): Likewise.
8058 (struct dwarf2_per_objfile): Likewise.
8059 (struct dwarf2_per_cu_data): Likewise.
8060 (struct signatured_type): Likewise.
8061 (sig_type_ptr): Likewise.
8062 (DEF_VEC_P (sig_type_ptr)): Likewise.
8063 (INDEX4_SUFFIX): Likewise.
8064 (INDEX5_SUFFIX): Likewise.
8065 (DEBUG_STR_SUFFIX): Likewise.
8066 (dwarf2_read_section): Make non-static.
8067 (mapped_index_string_hash): Move from here.
8068 (dwarf5_djb_hash): Likewise.
8069 (file_write): Likewise.
8070 (class data_buf): Likewise.
8071 (struct symtab_index_entry): Likewise.
8072 (struct mapped_symtab): Likewise.
8073 (find_slot): Likewise.
8074 (hash_expand): Likewise.
8075 (add_index_entry): Likewise.
8076 (uniquify_cu_indices): Likewise.
8077 (class c_str_view): Likewise.
8078 (class c_str_view_hasher): Likewise.
8079 (class vector_hasher): Likewise.
8080 (write_hash_table): Likewise.
8081 (psym_index_map): Likewise.
8082 (struct addrmap_index_data): Likewise.
8083 (add_address_entry): Likewise.
8084 (add_address_entry_worker): Likewise.
8085 (write_address_map): Likewise.
8086 (symbol_kind): Likewise.
8087 (write_psymbols): Likewise.
8088 (struct signatured_type_index_data): Likewise.
8089 (write_one_signatured_type): Likewise.
8090 (recursively_count_psymbols): Likewise.
8091 (recursively_write_psymbols): Likewise.
8092 (class debug_names): Likewise.
8093 (check_dwarf64_offsets): Likewise.
8094 (psyms_seen_size): Likewise.
8095 (write_gdbindex): Likewise.
8096 (write_debug_names): Likewise.
8097 (assert_file_size): Likewise.
8098 (write_psymtabs_to_index): Likewise.
8099 (save_gdb_index_command): Likewise.
8100 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8102 * dwarf2read.h: New file.
8104 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8107 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8108 symbol name if the CU's language stores symbol names in linkage
8110 * language.h (struct language_defn)
8111 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8112 all instances of this struct.
8114 2018-03-26 Tom Tromey <tom@tromey.com>
8116 * stack.c (backtrace_command_1): Remove verbose code.
8118 2018-03-26 Tom Tromey <tom@tromey.com>
8120 * python/py-framefilter.c (py_print_type): Don't catch
8121 exceptions. Return void.
8122 (py_print_value): Likewise.
8123 (py_print_single_arg): Likewise.
8124 (enumerate_args): Don't catch exceptions.
8125 (py_print_args): Likewise.
8126 (py_print_frame): Likewise.
8127 (gdbpy_apply_frame_filter): Catch exceptions here.
8129 2018-03-26 Tom Tromey <tom@tromey.com>
8131 * stack.c (_initialize_stack): Remove trailing newlines from help
8132 text. Add "Usage" line to "backtrace" help.
8134 2018-03-26 Tom Tromey <tom@tromey.com>
8137 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8139 2018-03-26 Tom Tromey <tom@tromey.com>
8141 * python/py-framefilter.c (py_print_single_arg): Return
8142 EXT_LANG_BT_ERROR from catch.
8144 2018-03-26 Tom Tromey <tom@tromey.com>
8147 * stack.c (backtrace_command_1): Move some code into no-filters
8150 2018-03-26 Tom Tromey <tom@tromey.com>
8152 * python/py-framefilter.c (throw_quit_or_print_exception): New
8154 (gdbpy_apply_frame_filter): Use it.
8156 2018-03-26 Tom Tromey <tom@tromey.com>
8159 * python/py-framefilter.c (py_print_type, py_print_value)
8160 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8163 2018-03-26 Tom Tromey <tom@tromey.com>
8165 * python/py-framefilter.c (enumerate_args): Use
8166 gdb::unique_xmalloc_ptr.
8168 2018-03-26 Tom Tromey <tom@tromey.com>
8170 * python/py-framefilter.c (py_print_frame): Return
8172 (gdbpy_apply_frame_filter): Update comment.
8173 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8175 <EXT_LANG_BT_NO_FILTERS>: Change value.
8177 2018-03-26 Tom Tromey <tom@tromey.com>
8180 * stack.c (backtrace_command): Parse "hide" argument.
8181 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8182 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8185 2018-03-26 Tom Tromey <tom@tromey.com>
8187 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8189 (backtrace_command): Remove "fulltrace", add "flags".
8191 2018-03-26 Tom Tromey <tom@tromey.com>
8193 * stack.c (backtrace_command): Rewrite command line parsing.
8195 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8197 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8199 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8201 * filename-seen-cache.h: Add include guard.
8203 2018-03-26 Keith Seitz <keiths@redhat.com>
8205 * symfile.c (place_section): Remove "struct" from section_addr_info
8207 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8208 "struct" keyword from section_addr_info.
8210 2018-03-26 Alan Hayward <alan.hayward@arm.com>
8212 * regformats/regdef.h (reg): Add constructors.
8214 2018-03-25 Pedro Alves <palves@redhat.com>
8216 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8217 if then/else bodies in var_func_name extraction.
8219 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
8221 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8222 lookup_minimal_symbol() to find symbol entry.
8223 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8225 2018-03-23 Keith Seitz <keiths@redhat.com>
8228 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8229 nested type definitions for C++, too.
8231 2018-03-23 Tom Tromey <tom@tromey.com>
8233 * machoread.c (struct oso_el): Add a constructor. Don't define as
8235 (macho_register_oso): Remove.
8236 (macho_symtab_read): Take a std::vector.
8237 (oso_el_compare_name): Now a std::sort comparator.
8238 (macho_symfile_read_all_oso): Take a std::vector.
8239 (macho_symfile_read): Use std::vector. Remove cleanups.
8241 2018-03-22 Tom Tromey <tom@tromey.com>
8243 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8244 (record_full_goto_bookmark): Use std::string.
8246 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8249 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8252 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8254 * rs6000-tdep.c (store_insn_p): New function.
8255 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8256 and cr_reg to their unshifted values. Use store_insn_p to
8257 match LR saves using either R1 or fdata->alloca_reg. Use
8258 store_insn_p to match CR saves. Set alloca_reg_offset
8259 when alloca_reg and framep are set. Remove lr_reg shift
8260 when assigning to fdata->lr_register.
8262 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8264 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8265 command line args instead of emitting a warning.
8267 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8269 * tracepoint.h (struct static_tracepoint_marker): Initialize
8270 fields, define default constructor, move constructor and move
8271 assignment, disable the rest.
8272 <str_id, extra>: Make std::string.
8273 (release_static_tracepoint_marker): Remove.
8274 (free_current_marker): Remove.
8275 * tracepoint.c (free_current_marker): Remove.
8276 (parse_static_tracepoint_marker_definition): Adjust to
8277 std::string, use new hex2str overload.
8278 (release_static_tracepoint_marker): Remove.
8279 (print_one_static_tracepoint_marker): Get marker by reference
8280 and adjust to std::string.
8281 (info_static_tracepoint_markers_command): Adjust to std::vector
8283 * target.h (static_tracepoint_marker_p): Remove typedef.
8284 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8285 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8287 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8289 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8290 (target_debug_print_std_vector_static_tracepoint_marker): New.
8291 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8293 (target_debug_print_static_tracepoint_marker_p): ... this.
8294 * target-delegates.c: Re-generate.
8295 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8297 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8298 (decode_static_tracepoint_spec): Adjust to std::vector.
8299 (tracepoint_print_one_detail): Adjust to std::string.
8300 (strace_marker_decode_location): Adjust to std::string.
8301 (update_static_tracepoint): Adjust to std::string, remove call
8302 to release_static_tracepoint_marker.
8303 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8304 Adjust to std::vector.
8305 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8306 (remote_static_tracepoint_markers_by_strid): Adjust to
8308 * common/rsp-low.h (hex2str): New overload with explicit count
8310 * common/rsp-low.c (hex2str): New overload with explicit count
8312 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8313 (_initialize_rsp_low_selftests): Add test_hex2str test.
8314 * unittests/tracepoint-selftests.c
8315 (test_parse_static_tracepoint_marker_definition): Adjust to
8318 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8320 * tracepoint.c (parse_static_tracepoint_marker_definition):
8321 Consider case where the definition is followed by more
8323 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8324 tracepoint-selftests.c.
8325 * unittests/tracepoint-selftests.c: New.
8327 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8329 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8332 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8334 * symtab.c (find_pc_sect_line): fixed indentation.
8336 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8338 * symtab.c (find_pc_sect_line): now uses binary search.
8340 2018-03-19 Tom Tromey <tom@tromey.com>
8342 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8345 2018-03-19 Pedro Alves <palves@redhat.com>
8346 Tom Tromey <tom@tromey.com>
8348 * unittests/observable-selftests.c: New file.
8349 * common/observable.h: New file.
8350 * observable.h: New file.
8351 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8352 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8353 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8354 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8355 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8356 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8357 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8358 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8359 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8360 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8361 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8362 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8363 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8364 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8365 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8366 tui/tui-interp.c, valops.c: Update all users.
8367 * tui/tui-hooks.c (tui_bp_created_observer)
8368 (tui_bp_deleted_observer, tui_bp_modified_observer)
8369 (tui_inferior_exit_observer, tui_before_prompt_observer)
8370 (tui_normal_stop_observer, tui_register_changed_observer):
8372 (tui_observers_token): New global.
8373 (attach_or_detach, tui_attach_detach_observers): New functions.
8374 (tui_install_hooks, tui_remove_hooks): Use
8375 tui_attach_detach_observers.
8376 * record-btrace.c (record_btrace_thread_observer): Remove.
8377 (record_btrace_thread_observer_token): New global.
8378 * observer.sh: Remove.
8379 * observer.c: Rename to observable.c.
8380 * observable.c (namespace gdb_observers): Define new objects.
8381 (observer_debug): Move into gdb_observers namespace.
8382 (struct observer, struct observer_list, xalloc_observer_list_node)
8383 (xfree_observer_list_node, generic_observer_attach)
8384 (generic_observer_detach, generic_observer_notify): Remove.
8385 (_initialize_observer): Update.
8386 Don't include observer.inc.
8387 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8388 (clean mostlyclean): Likewise.
8389 (observer.h, observer.inc): Remove targets.
8390 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8391 (COMMON_SFILES): Use observable.c, not observer.c.
8392 * .gitignore: Remove observer.h.
8394 2018-03-18 Tom Tromey <tom@tromey.com>
8396 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8398 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8400 2018-03-17 Tom Tromey <tom@tromey.com>
8402 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8404 2018-03-17 Tom Tromey <tom@tromey.com>
8406 * target.c (class scoped_target_fd): New.
8407 (target_fileio_close_cleanup): Remove.
8408 (target_fileio_read_alloc_1): Use scoped_target_fd.
8410 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8412 * silent-rules.mk: New.
8413 * Makefile.in: Include silent-rules.mk
8414 (srcdir, VPATH, top_srcdir): Move up.
8415 (COMPILE): Add ECHO_CXX.
8416 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8417 (init.c): Add ECHO_INIT_C.
8418 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8419 (version.c): Add ECHO_GEN.
8420 (printcmd.o): Add ECHO_CXX.
8421 (target-float.o): Add ECHO_CXX.
8422 (ada-exp.o): Add ECHO_CXX.
8423 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8424 (insight$(EXEEXT)): Add ECHO_CXXLD.
8425 * gnulib/configure.ac: Add AM_SILENT_RULES.
8426 * gnulib/aclocal.m4: Re-generate.
8427 * gnulib/configure: Re-generate.
8428 * gnulib/import/Makefile.in: Re-generate.
8430 2018-03-16 Tom Tromey <tom@tromey.com>
8432 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8433 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8434 * utils.c (do_free_section_addr_info)
8435 (make_cleanup_free_section_addr_info): Remove.
8436 * symfile.h (struct other_sections): Add constructor.
8437 (struct section_addr_info): Remove.
8438 (section_addr_info): New typedef.
8439 (struct sym_fns) <sym_offsets>: Change type of parameter.
8440 (build_section_addr_info_from_objfile)
8441 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8442 (default_symfile_offsets, symbol_file_add)
8443 (symbol_file_add_from_bfd)
8444 (build_section_addr_info_from_section_table): Update.
8445 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8446 * symfile.c (alloc_section_addr_info): Remove.
8447 (build_section_addr_info_from_section_table): Change return type.
8449 (build_section_addr_info_from_bfd)
8450 (build_section_addr_info_from_objfile): Likewise.
8451 (free_section_addr_info): Remove.
8452 (relative_addr_info_to_section_offsets): Change type of "addrs".
8453 (addrs_section_compar): Now a std::sort comparator.
8454 (addrs_section_sort): Change return type.
8455 (addr_info_make_relative): Change type of "addrs". Update.
8456 (default_symfile_offsets, syms_from_objfile_1)
8457 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8458 (symbol_file_add_separate): Update.
8459 (symbol_file_add): Change type of "addrs". Update.
8460 (add_symbol_file_command): Update. Remove cleanups.
8461 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8463 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8464 * solib.c (solib_read_symbols): Update.
8465 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8466 * machoread.c (macho_symfile_offsets): Update.
8467 * jit.c (jit_bfd_try_read_symtab): Update.
8469 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8471 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8472 unittests/utils-selftests.c.
8473 * unittests/utils-selftests.c: New file.
8475 2018-03-14 Tom Tromey <tom@tromey.com>
8478 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8481 2018-03-14 Tom Tromey <tom@tromey.com>
8484 * printcmd.c (printf_pointer): Allow "-" in format.
8486 2018-03-14 Tom Tromey <tom@tromey.com>
8488 * printcmd.c (_initialize_printcmd): Add usage to printf.
8490 2018-03-14 Yao Qi <qiyao@sourceware.org>
8492 * MAINTAINERS: Update my email address.
8494 2018-03-13 Tom Tromey <tom@tromey.com>
8496 * machoread.c (macho_check_dsym): Change filenamep to a
8498 (macho_symfile_read): Update.
8499 * symfile.c (load_command): Use std::string.
8501 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
8503 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8504 to error message string.
8505 (riscv_register_name): Use xsnprintf instead of sprintf.
8506 (riscv_insn::fetch_instruction): Use gdb_assert instead of
8508 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8510 (riscv_push_dummy_call): Likewise.
8512 2018-03-12 Tom Tromey <tom@tromey.com>
8514 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8515 Use gdb::byte_vector.
8516 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8518 2018-03-12 Yao Qi <yao.qi@linaro.org>
8520 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8521 parameter type to readable_regcache.
8522 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8525 2018-03-11 Tom Tromey <tom@tromey.com>
8527 * dwarf2read.c (struct nextfield): Add initializers.
8528 (struct nextfnfield): Remove.
8529 (struct fnfieldlist): Add initializers. Remove "length" and
8530 "head", use std::vector.
8531 (struct decl_field_list): Remove.
8532 (struct field_info): Add initializers.
8533 <fields, baseclasses>: Now std::vector.
8534 <nbaseclasses, nfnfields, typedef_field_list_count,
8535 nested_types_list_count>: Remove.
8536 (dwarf2_add_field, dwarf2_add_type_defn)
8537 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8538 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8539 (process_structure_scope): Update.
8541 2018-03-11 Tom Tromey <tom@tromey.com>
8543 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8544 for use by std::sort.
8545 (build_type_psymtabs_1): Use std::vector.
8547 2018-03-09 Eli Zaretskii <eliz@gnu.org>
8549 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8550 and LIBMPFR in the printed configuration.
8552 2018-03-08 Tom Tromey <tom@tromey.com>
8554 * source.c (get_filename_and_charpos): Use scoped_fd.
8555 * nto-procfs.c (procfs_open_1): Use scoped_fd.
8556 (procfs_pidlist): Likewise.
8557 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8558 (iterate_over_mappings): Likewise.
8560 2018-03-08 Tom Tromey <tom@tromey.com>
8562 * infcall.c (struct call_return_meta_info)
8563 <stack_temporaries_enabled>: Remove.
8564 (get_call_return_value, call_function_by_hand_dummy): Update.
8565 * thread.c (disable_thread_stack_temporaries): Remove.
8566 (enable_thread_stack_temporaries): Remove.
8567 (thread_stack_temporaries_enabled_p): Return bool.
8568 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8569 (get_last_thread_stack_temporary): Update.
8570 * eval.c (evaluate_subexp): Update.
8571 * gdbthread.h (class enable_thread_stack_temporaries): Now a
8572 class, not a function.
8573 (value_ptr, value_vec): Remove typedefs.
8574 (class thread_info) <stack_temporaries_enabled>: Now bool.
8575 <stack_temporaries>: Now a std::vector.
8576 (thread_stack_temporaries_enabled_p)
8577 (value_in_thread_stack_temporaries): Return bool.
8579 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
8581 * remote.c (putpkt_binary): Fix omitted bytes reporting.
8582 (getpkt_or_notif_sane_1): Likewise.
8584 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8586 * build-id.c (build_id_to_debug_bfd): Use std::string.
8588 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8590 * build-id.c (find_separate_debug_file_by_buildid): Return
8592 * build-id.h (find_separate_debug_file_by_buildid): Return
8594 * coffread.c (coff_symfile_read): Adjust to std::string.
8595 * elfread.c (elf_symfile_read): Adjust to std::string.
8596 * symfile.c (separate_debug_file_exists): Change parameter to
8598 (find_separate_debug_file): Return std::string.
8599 (find_separate_debug_file_by_debuglink): Return std::string.
8600 * symfile.h (find_separate_debug_file_by_debuglink): Return
8603 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8605 * common/xml-utils.c (xml_escape_text): Move code to...
8606 (xml_escape_text_append): ... this new function.
8607 * common/xml-utils.h (xml_escape_text_append): New declaration.
8608 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8610 (_initialize_xml_utils): register test_xml_escape_text_append as
8613 2018-03-07 Alan Hayward <alan.hayward@arm.com>
8615 * defs.h: Remove MAX_REGISTER_SIZE.
8616 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8618 * python/py-unwind.c (pyuw_sniffer): Likewise.
8620 2018-03-07 Tom Tromey <tom@tromey.com>
8622 * linux-tdep.c (linux_info_proc): Update.
8623 * target.h (struct target_ops) <to_fileio_readlink>: Return
8625 (target_fileio_readlink): Return optional<string>.
8626 * remote.c (remote_hostio_readlink): Return optional<string>.
8627 * inf-child.c (inf_child_fileio_readlink): Return
8629 * target.c (target_fileio_readlink): Return optional<string>.
8631 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
8633 * regcache.c (cooked_read_test): Add riscv to the list of
8634 architectures that have a save_reggroup.
8636 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
8638 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8639 value is not a dynamic class object.
8641 2018-03-06 Tom Tromey <tom@tromey.com>
8643 * rust-exp.y: Formatting fixes.
8645 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8647 * riscv-tdep.c (riscv_register_name): Remove target description
8649 (riscv_gdbarch_init): Remove target description check.
8651 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8653 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8655 * riscv-tdep.h: Likewise.
8657 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8659 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8660 (riscv_pseudo_register_write): Delete.
8661 (riscv_gdbarch_init): Remove all use of pseudo registers.
8663 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8665 * record-btrace.c (btrace_print_lines): Replace cleanup
8666 parameter with RAII equivalents.
8667 (btrace_insn_history): Replace cleanup with RAII equivalents.
8668 * ui-out.h (make_cleanup_ui_out_list_begin_end,
8669 make_cleanup_ui_out_tuple_begin_end): Remove.
8670 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8671 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8672 make_cleanup_ui_out_list_begin_end): Remove.
8674 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8676 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8677 parameter types to std::vector. Use bool.
8678 (record_btrace_wait): Replace VEC(tp_t) with
8679 std::vector<thread_info *>.
8680 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8682 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8684 * record-btrace.c (record_btrace_disable_callback): Remove.
8685 (struct scoped_btrace_disable): New.
8686 (record_btrace_open): Use scoped_btrace_disable.
8688 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8690 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8691 reading values from registers.
8693 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8695 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8698 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8700 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8701 change parameter type. Use GDB's print functions, and use
8702 core_addr_to_string where appropriate.
8703 (riscv_push_dummy_call): Use core_addr_to_string where
8704 appropriate, update call to riscv_print_arg_location, and reindent
8706 (riscv_return_value): Update call to riscv_print_arg_location.
8708 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8709 Tim Newsome <tim@sifive.com>
8710 Albert Ou <a0u@eecs.berkeley.edu>
8711 Darius Rad <darius@bluespec.com>
8713 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8714 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8715 (ALLDEPFILES): Add riscv-tdep.c
8716 * configure.tgt: Add riscv support.
8717 * riscv-tdep.c: New file.
8718 * riscv-tdep.h: New file.
8719 * NEWS: Mention new target.
8720 * MAINTAINERS: Add entry for riscv.
8722 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8724 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8725 fields within aggregates.
8727 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
8729 * record-btrace.c (btrace_print_lines): Change type of flags to
8730 gdb_disassembly_flags.
8732 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8734 * fbsd-nat.c: Include "inf-ptrace.h".
8735 (USE_SIGTRAP_SIGINFO): Conditionally define.
8736 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8737 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8738 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8740 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8742 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8744 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8745 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8746 "supports_stopped_by_hw_breakpoint" target methods.
8748 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8750 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8751 * fbsd-nat.c (debug_fbsd_nat): New variable.
8752 (show_fbsd_nat_debug): New function.
8753 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8754 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8756 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8758 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8759 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8761 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8762 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8765 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8767 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8768 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8770 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8772 * charset.c (struct charset_vector): New.
8773 (charsets): Change type to charset_vector.
8774 (find_charset_names): Adjust.
8776 (_initialize_charset): Adjust.
8778 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8780 * progspace.h (struct program_space) <deleted_solibs>: Change
8781 type to std::vector<std::string>.
8782 * progspace.c (clear_program_space_solib_cache): Adjust.
8783 * breakpoint.c (print_solib_event): Adjust.
8784 (check_status_catch_solib): Adjust.
8785 * solib.c (update_solib_list): Adjust.
8786 * ui-out.h (class ui_out) <field_string>: New overload.
8787 * ui-out.c (ui_out::field_string): New overload.
8789 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8791 * progspace.h (struct program_space): Add constructor and
8792 destructor, initialize fields.
8793 (add_program_space): Remove.
8794 * progspace.c (add_program_space): Rename to...
8795 (program_space::program_space): ... this.
8796 (release_program_space): Rename to...
8797 (program_space::~program_space): ... this.
8798 (delete_program_space): Use delete to delete program_space.
8799 (initialize_progspace): Use new to allocate program_space.
8800 * inferior.c (add_inferior_with_spaces): Likewise.
8801 (clone_inferior_command): Likewise.
8802 * infrun.c (follow_fork_inferior): Likewise.
8803 (handle_vfork_child_exec_or_exit): Likewise.
8805 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8807 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8808 (delim_string_to_char_ptr_vec): Return std::vector of
8809 gdb::unique_xmalloc_ptr.
8810 (dirnames_to_char_ptr_vec_append): Take std::vector of
8811 gdb::unique_xmalloc_ptr.
8812 (dirnames_to_char_ptr_vec): Return std::vector of
8813 gdb::unique_xmalloc_ptr.
8814 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8815 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8816 (delim_string_to_char_ptr_vec): Return an std::vector of
8817 gdb::unique_xmalloc_ptr, adjust the code.
8818 (dirnames_to_char_ptr_vec_append): Take an std::vector of
8819 gdb::unique_xmalloc_ptr, adjust the code.
8820 (dirnames_to_char_ptr_vec): Return an std::vector of
8821 gdb::unique_xmalloc_ptr, adjust the code.
8822 * auto-load.c (auto_load_safe_path_vec): Change type to
8823 std::vector of gdb::unique_xmalloc_ptr.
8824 (auto_load_expand_dir_vars): Return an std::vector of
8825 gdb::unique_xmalloc_ptr, adjust the code.
8826 (auto_load_safe_path_vec_update): Adjust.
8827 (filename_is_in_auto_load_safe_path_vec): Adjust.
8828 (auto_load_objfile_script_1): Adjust.
8829 * build-id.c (build_id_to_debug_bfd): Adjust.
8830 * linux-thread-db.c (thread_db_load_search): Adjust.
8831 * source.c (add_path): Adjust.
8833 * symfile.c (find_separate_debug_file): Adjust.
8834 * utils.c (do_free_char_ptr_vec): Remove.
8835 (make_cleanup_free_char_ptr_vec): Remove.
8837 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
8840 * common/pathstuff.c: Conditionally include "<windows.h>".
8842 2018-03-01 Georg Sauthoff <mail@georg.so>
8845 * gcore.in: Quote variables and switch interpreter to bash.
8847 2018-03-01 Tom Tromey <tom@tromey.com>
8849 * dwarf2read.c (alloc_discriminant_info): Fix default_index
8850 assertion. Add assertion for discriminant_index.
8851 (quirk_rust_enum): Use correct base type name in univariant case.
8853 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
8855 * record.c (get_call_history_modifiers): Return a
8857 (cmd_record_call_history): Adjust.
8858 * record-btrace.c (record_btrace_call_history): Adjust.
8859 (record_btrace_call_history_range): Adjust.
8860 (record_btrace_call_history_from): Adjust.
8861 * target-debug.h (target_debug_print_record_print_flags): New.
8862 * target-delegates.c: Re-generate.
8863 * target.c (target_call_history): Change flags type.
8864 (target_call_history_from): Likewise.
8865 (target_call_history_range): Likewise.
8866 * target.h (struct target_ops) <target_call_history>: Likewise.
8867 (target_call_history_from): Likewise.
8868 (target_call_history_range): Likewise.
8870 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8871 Simon Marchi <simon.marchi@polymtl.ca>
8873 * common/common-utils.c: Include "sys/stat.h".
8874 (is_regular_file): Move here from "source.c"; change return
8876 * common/common-utils.h (is_regular_file): New prototype.
8877 * common/pathstuff.c (contains_dir_separator): New function.
8878 * common/pathstuff.h (contains_dir_separator): New prototype.
8879 * source.c: Don't include "sys/stat.h".
8880 (is_regular_file): Move to "common/common-utils.c".
8882 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8884 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
8885 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
8886 * auto-load.c: Include "common/pathstuff.h".
8887 * common/common-def.h (current_directory): Move here.
8888 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
8890 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
8892 * common/pathstuff.c: New file.
8893 * common/pathstuff.h: New file.
8894 * compile/compile.c: Include "common/pathstuff.h".
8895 * defs.h (current_directory): Move to "common/common-defs.h".
8896 * dwarf2read.c: Include "common/pathstuff.h".
8898 * guile/scm-safe-call.c: Likewise.
8899 * linux-thread-db.c: Likewise.
8901 * nto-tdep.c: Likewise.
8902 * objfiles.c: Likewise.
8903 * source.c: Likewise.
8904 * symtab.c: Likewise.
8905 * utils.c: Include "common/pathstuff.h".
8906 (gdb_realpath): Move to "common/pathstuff.c".
8907 (gdb_realpath_keepfile): Likewise.
8908 (gdb_abspath): Likewise.
8909 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
8910 (gdb_realpath_keepfile): Likewise.
8911 (gdb_abspath): Likewise.
8913 2018-02-28 John Baldwin <jhb@FreeBSD.org>
8915 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
8916 wildcard process pid for super_resume for kernels with a
8919 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
8921 * compile/compile.c (get_args): Add additional comments
8922 explaining function.
8924 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
8925 Tom Tromey <tom@tromey.com>
8927 * target.h (memory_write_request_s): Remove typedef. Don't define
8929 (target_write_memory_blocks): Change argument to std::vector.
8930 (struct memory_write_request): Add constructor.
8931 * target-memory.c (compare_block_starting_address): Return bool.
8932 Change argument types.
8933 (claim_memory): Change arguments to use std::vector.
8934 (split_regular_and_flash_blocks, blocks_to_erase)
8935 (compute_garbled_blocks): Likewise.
8936 (cleanup_request_data, cleanup_write_requests_vector): Remove.
8937 (target_write_memory_blocks): Change argument to std::vector.
8938 * symfile.c (struct load_section_data): Add constructor and
8939 destructor. Use std::vector for "requests".
8940 (struct load_progress_data): Add initializers.
8941 (load_section_callback): Update. Use "new".
8942 (clear_memory_write_data): Remove.
8943 (generic_load): Update.
8945 2018-02-27 Alan Hayward <alan.hayward@arm.com>
8947 * arch/aarch64.h: Use common/tdesc.h.
8949 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8951 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
8952 architecture with a 64-bit ABI.
8954 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8956 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
8957 ahead of target description loading.
8959 2018-02-26 Tom Tromey <tom@tromey.com>
8961 * stack.c (backtrace_command_1): Update.
8962 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
8964 * python/py-framefilter.c (py_print_frame)
8965 (gdbpy_apply_frame_filter): Change type of "flags".
8966 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
8968 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
8969 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
8970 * extension.h (enum frame_filter_flag): Rename from
8972 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
8973 (apply_ext_lang_frame_filter): Change type of "flags".
8974 * extension.c (apply_ext_lang_frame_filter): Change type of
8976 * extension-priv.h (struct extension_language_ops)
8977 <apply_frame_filter>: Change type of "flags".
8979 2018-02-26 Tom Tromey <tom@tromey.com>
8982 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
8983 off-by-one in py_end computation.
8984 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
8986 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
8989 2018-02-26 Tom Tromey <tom@tromey.com>
8991 * dwarf2read.c (struct variant_field): New.
8992 (struct nextfield) <variant>: New field.
8993 (dwarf2_add_field): Handle DW_TAG_variant_part.
8994 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
8995 discriminated union.
8996 (read_structure_type): Handle DW_TAG_variant_part.
8997 (handle_struct_member_die): New function, extracted from
8998 process_structure_scope. Handle DW_TAG_variant.
8999 (process_structure_scope): Handle discriminated unions. Call
9000 handle_struct_member_die.
9002 2018-02-26 Tom Tromey <tom@tromey.com>
9004 * rust-lang.h (rust_last_path_segment): Declare.
9005 * rust-lang.c (rust_last_path_segment): Now public. Change
9007 (struct disr_info): Remove.
9008 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9009 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9010 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9011 (rust_enum_p, rust_enum_variant): New function.
9012 (rust_underscore_fields): Remove "offset" parameter.
9013 (rust_print_enum): New function.
9014 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9015 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9016 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
9018 (rust_internal_print_type): New function, from rust_print_type.
9020 (rust_print_type): Call rust_internal_print_type.
9021 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9022 Update enum handling.
9023 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9024 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9025 (rust_union_quirks): New functions.
9026 (process_full_comp_unit, process_full_type_unit): Call
9028 (process_structure_scope): Update rust_unions if necessary.
9030 2018-02-26 Tom Tromey <tom@tromey.com>
9032 * value.h (value_union_variant): Declare.
9033 * valops.c (value_union_variant): New function.
9034 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9035 (struct discriminant_info): New.
9036 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9038 (struct main_type) <flag_discriminated_union>: New field.
9040 2018-02-26 Tom Tromey <tom@tromey.com>
9042 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9043 unittests/unpack-selftests.c.
9044 * unittests/unpack-selftests.c: New file.
9045 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9047 2018-02-26 Yao Qi <yao.qi@linaro.org>
9049 * dwarf2read.c (struct partial_die_info) <read>: New method.
9050 (read_partial_die): Remove the declaration.
9051 (load_partial_dies): Update.
9052 (partial_die_info::partial_die_info):
9053 (read_partial_die): Change it to partial_die_info::read.
9055 2018-02-26 Yao Qi <yao.qi@linaro.org>
9057 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9058 (fixup_partial_die): Remove declaration.
9059 (scan_partial_symbols): Update.
9060 (partial_die_parent_scope): Likewise.
9061 (partial_die_full_name): Likewise.
9062 (fixup_partial_die): Change it to partial_die_info::fixup.
9064 2018-02-26 Yao Qi <yao.qi@linaro.org>
9066 * dwarf2read.c (read_partial_die): Update the declaration.
9067 (load_partial_dies): Caller update.
9068 (read_partial_die): Remove one argument abbrev_len.
9070 2018-02-26 Yao Qi <yao.qi@linaro.org>
9072 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9073 assignment operator.
9074 (load_partial_dies): Use ctor and copy ctor.
9075 (read_partial_die): Update.
9076 (dwarf2_cu::find_partial_die): Use ctor.
9078 2018-02-26 Yao Qi <yao.qi@linaro.org>
9080 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9081 (find_partial_die_in_comp_unit): Change it to
9082 dwarf2_cu::find_partial_die.
9083 (find_partial_die): Update.
9085 2018-02-26 Yao Qi <yao.qi@linaro.org>
9087 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9090 2018-02-26 Yao Qi <yao.qi@linaro.org>
9092 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9094 2018-02-26 Alan Hayward <alan.hayward@arm.com>
9096 * arch/amd64.h: Use common/tdesc.h.
9097 * arch/i386.c: Likewise.
9098 * arch/i386.h: Likewise.
9099 * arch/tic6x.c: Likewise.
9100 * arch/tdesc.h: Move file from here...
9101 * common/tdesc.h: ...to here.
9102 * features/aarch64-core.c: Regenerate.
9103 * features/aarch64-fpu.c: Regenerate.
9104 * features/i386/32bit-avx.c: Regenerate.
9105 * features/i386/32bit-avx512.c: Regenerate.
9106 * features/i386/32bit-core.c: Regenerate.
9107 * features/i386/32bit-linux.c: Regenerate.
9108 * features/i386/32bit-mpx.c: Regenerate.
9109 * features/i386/32bit-pkeys.c: Regenerate.
9110 * features/i386/32bit-sse.c: Regenerate.
9111 * features/i386/64bit-avx.c: Regenerate.
9112 * features/i386/64bit-avx512.c: Regenerate.
9113 * features/i386/64bit-core.c: Regenerate.
9114 * features/i386/64bit-linux.c: Regenerate.
9115 * features/i386/64bit-mpx.c: Regenerate.
9116 * features/i386/64bit-pkeys.c: Regenerate.
9117 * features/i386/64bit-segments.c: Regenerate.
9118 * features/i386/64bit-sse.c: Regenerate.
9119 * features/i386/x32-core.c: Regenerate.
9120 * features/tic6x-c6xp.c: Regenerate.
9121 * features/tic6x-core.c: Regenerate.
9122 * features/tic6x-gp.c: Regenerate.
9123 * target-descriptions.c: Use common/tdesc.h.
9124 * target-descriptions.h: Likewise.
9126 2018-02-24 Tom Tromey <tom@tromey.com>
9128 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9129 (try_thread_db_load_from_dir, thread_db_load_search): Use
9131 (info_auto_load_libthread_db_compare): Return bool. Change
9133 (info_auto_load_libthread_db): Use std::vector, std::string.
9136 2018-02-24 Tom Tromey <tom@tromey.com>
9138 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9140 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9142 * gdbarch.c: Rebuild.
9143 * gdbarch.h: Rebuild.
9144 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9145 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9146 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9149 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9151 * gdbtypes.h (sect_offset): Change type to uint64_t.
9152 (sect_offset_str): New function.
9153 * dwarf2read.c (create_addrmap_from_aranges): Use
9155 (error_check_comp_unit_head): Likewise.
9156 (create_debug_type_hash_table): Likewise.
9157 (read_cutu_die_from_dwo): Likewise.
9158 (init_cutu_and_read_dies): Likewise.
9159 (init_cutu_and_read_dies_no_follow): Likewise.
9160 (process_psymtab_comp_unit_reader): Likewise.
9161 (partial_die_parent_scope): Likewise.
9162 (peek_die_abbrev): Likewise.
9163 (process_queue): Likewise.
9164 (dwarf2_physname): Likewise.
9165 (read_namespace_alias): Likewise.
9166 (read_import_statement): Likewise.
9167 (create_dwo_cu_reader): Likewise.
9168 (create_cus_hash_table): Likewise.
9169 (lookup_dwo_cutu): Likewise.
9170 (inherit_abstract_dies): Likewise.
9171 (read_func_scope): Likewise.
9172 (read_call_site_scope): Likewise.
9173 (dwarf2_add_member_fn): Likewise.
9174 (read_common_block): Likewise.
9175 (read_module_type): Likewise.
9176 (read_typedef): Likewise.
9177 (read_subrange_type): Likewise.
9178 (load_partial_dies): Likewise.
9179 (read_partial_die): Likewise.
9180 (find_partial_die): Likewise.
9181 (read_str_index): Likewise.
9182 (dwarf2_string_attr): Likewise.
9183 (build_error_marker_type): Likewise.
9184 (lookup_die_type): Likewise.
9185 (dump_die_shallow): Likewise.
9186 (follow_die_ref): Likewise.
9187 (dwarf2_fetch_die_loc_sect_off): Likewise.
9188 (dwarf2_fetch_constant_bytes): Likewise.
9189 (follow_die_sig): Likewise.
9190 (get_signatured_type): Likewise.
9191 (get_DW_AT_signature_type): Likewise.
9192 (dwarf2_find_containing_comp_unit): Likewise.
9193 (set_die_type): Likewise.
9195 2018-02-21 John Baldwin <jhb@FreeBSD.org>
9197 * arch/aarch64.c: Include "common-defs.h".
9198 * arch/amd64.c: Likewise.
9199 * arch/i386.c: Likewise.
9201 2018-02-21 Tom Tromey <tom@tromey.com>
9203 * value.h: (extract_field_op): Update.
9204 * eval.c (extract_field_op): Return a const char *.
9205 * expression.h (parse_expression_for_completion): Update.
9206 * completer.c (complete_expression): Update.
9207 (add_struct_fields): Make fieldname const.
9208 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9209 (mark_completion_tag, parse_exp_in_context_1): Update.
9210 (parse_expression_for_completion): Change "name" to
9211 unique_xmalloc_ptr*.
9213 2018-02-21 Tom Tromey <tom@tromey.com>
9215 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9217 2018-02-21 Yao Qi <yao.qi@linaro.org>
9219 * avr-tdep.c (avr_read_pc): Change parameter type to
9221 * gdbarch.sh (read_pc): Likewise.
9222 * gdbarch.c: Re-generated.
9223 * gdbarch.h: Re-generated.
9224 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9226 * ia64-tdep.c (ia64_read_pc): Likewise.
9227 * mips-tdep.c (mips_read_pc): Likewise.
9228 * spu-tdep.c (spu_read_pc): Likewise.
9230 2018-02-21 Yao Qi <yao.qi@linaro.org>
9232 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9233 * regcache-dump.c: New file.
9234 * regcache.c: Move register_dump to regcache-dump.c.
9235 (maintenance_print_registers): Likewise.
9236 (maintenance_print_raw_registers): Likewise.
9237 (maintenance_print_cooked_registers): Likewise.
9238 (maintenance_print_register_groups): Likewise.
9239 (maintenance_print_remote_registers): Likewise.
9240 (_initialize_regcache): Likewise.
9241 * regcache.h (register_dump): Moved from regcache.c.
9243 2018-02-21 Yao Qi <yao.qi@linaro.org>
9245 * regcache.c (regcache::regcache): Update.
9246 (regcache::invalidate): Move it to detached_regcache::invalidate.
9247 (get_thread_arch_aspace_regcache): Update.
9248 (regcache::raw_update): Update.
9249 (regcache::cooked_read): Remove some code.
9250 (regcache::cooked_read_value): Likewise.
9251 (regcache::raw_write): Remove assert on m_readonly_p.
9252 (regcache::raw_supply_integer): Move it to
9253 detached_regcache::raw_supply_integer.
9254 (regcache::raw_supply_zeroed): Likewise.
9255 * regcache.h (detached_regcache) <raw_supply_integer>: New
9257 <raw_supply_zeroed, invalidate>: Likewise.
9258 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9259 <invalidate>: Likewise.
9260 <m_readonly_p>: Removed.
9262 2018-02-21 Yao Qi <yao.qi@linaro.org>
9264 * infcmd.c (get_return_value): Let stop_regs point to
9265 get_current_regcache.
9266 * regcache.c (regcache::regcache): Remove.
9267 (register_dump_reg_buffer): New class.
9268 (regcache_print): Adjust.
9269 * regcache.h (regcache): Remove constructors.
9271 2018-02-21 Yao Qi <yao.qi@linaro.org>
9273 * regcache.c (class register_dump): New class.
9274 (register_dump_regcache, register_dump_none): New class.
9275 (register_dump_remote, register_dump_groups): New class.
9276 (regcache_print): Update.
9277 * regcache.h (regcache_dump_what): Move it to regcache.c.
9278 (regcache) <dump>: Remove.
9280 2018-02-21 Yao Qi <yao.qi@linaro.org>
9282 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9284 (jit_unwind_reg_set_impl): Call raw_supply.
9285 (jit_frame_sniffer): Use reg_buffer_rw.
9286 * record-full.c (record_full_core_regbuf): Change its type.
9287 (record_full_core_open_1): Use reg_buffer_rw.
9288 (record_full_close): Likewise.
9289 (record_full_core_fetch_registers): Use regcache->raw_supply.
9290 (record_full_core_store_registers): Likewise.
9291 * regcache.c (regcache::get_register_status): Move it to
9293 (regcache_raw_set_cached_value): Remove.
9294 (regcache::raw_set_cached_value): Remove.
9295 (regcache::raw_write): Call raw_supply.
9296 (regcache::raw_supply): Move it to reg_buffer_rw.
9297 * regcache.h (regcache_raw_set_cached_value): Remove.
9298 (reg_buffer_rw): New class.
9300 2018-02-21 Yao Qi <yao.qi@linaro.org>
9302 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9303 readonly_detached_regcache.
9304 (dummy_frame_prev_register): Use regcache->cooked_read.
9305 * frame.c (frame_save_as_regcache): Change return type.
9306 (frame_pop): Update.
9307 * frame.h (frame_save_as_regcache): Update declaration.
9308 * inferior.h (get_infcall_suspend_state_regcache): Update
9310 * infrun.c (infcall_suspend_state) <registers>: use
9311 readonly_detached_regcache.
9312 (save_infcall_suspend_state): Don't use regcache_dup.
9313 (get_infcall_suspend_state_regcache): Change return type.
9314 * linux-fork.c (struct fork_info) <savedregs>: Change to
9315 readonly_detached_regcache.
9317 (fork_save_infrun_state): Don't use regcache_dup.
9318 (info_checkpoints_command): Adjust.
9319 * mi/mi-main.c (register_changed_p): Update declaration.
9320 (mi_cmd_data_list_changed_registers): Use
9321 readonly_detached_regcache.
9322 (register_changed_p): Change parameter type to
9323 readonly_detached_regcache.
9324 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9325 readonly_detached_regcache.
9326 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9327 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9329 (regcache::save): Move it to reg_buffer.
9330 (regcache::restore): Change parameter type.
9331 (regcache_dup): Remove.
9332 * regcache.h (reg_buffer) <save>: New method.
9333 (readonly_detached_regcache): New class.
9334 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9335 readonly_detached_regcache.
9336 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9338 2018-02-21 Yao Qi <yao.qi@linaro.org>
9340 * frame.c (frame_save_as_regcache): Use regcache method save.
9341 (frame_pop): Use regcache method restore.
9342 * infrun.c (restore_infcall_suspend_state): Likewise.
9343 * linux-fork.c (fork_load_infrun_state): Likewise.
9344 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9346 * regcache.c (regcache_save): Remove.
9347 (regcache::restore): More asserts.
9348 (regcache_cpy): Remove.
9349 * regcache.h (regcache_save): Remove the declaration.
9350 (regcache::restore): Move from private to public.
9351 Remove the friend declaration of regcache_cpy.
9352 (regcache_cpy): Remove declaration.
9354 2018-02-21 Yao Qi <yao.qi@linaro.org>
9356 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9357 parameter type to 'readable_regcache *'.
9358 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9359 * arm-tdep.c (arm_neon_quad_read): Likewise.
9360 (arm_pseudo_read): Likewise.
9361 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9362 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9363 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9364 * gdbarch.c: Re-generated.
9365 * gdbarch.h: Re-generated.
9366 * gdbarch.sh (pseudo_register_read): Change parameter type to
9367 'readable_regcache *'.
9368 (pseudo_register_read_value): Likewise.
9369 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9370 (h8300_pseudo_register_read): Likewise.
9371 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9372 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9373 (i386_pseudo_register_read_into_value): Likewise.
9374 (i386_pseudo_register_read_value): Likewise.
9375 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9377 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9378 * m32c-tdep.c (m32c_raw_read): Likewise.
9379 (m32c_read_flg): Likewise.
9380 (m32c_banked_register): Likewise.
9381 (m32c_banked_read): Likewise.
9382 (m32c_sb_read): Likewise.
9383 (m32c_part_read): Likewise.
9384 (m32c_cat_read): Likewise.
9385 (m32c_r3r2r1r0_read): Likewise.
9386 (m32c_pseudo_register_read): Likewise.
9387 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9388 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9389 (mep_pseudo_cr64_read): Likewise.
9390 (mep_pseudo_register_read): Likewise.
9391 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9392 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9393 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9394 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9395 (regcache::cooked_read): Likewise.
9396 (regcache::cooked_read_value): Likewise.
9397 (regcache_cooked_read_signed):
9398 (regcache::cooked_read): Likewise.
9399 * regcache.h (readable_regcache): New class.
9400 (regcache): Inherit readable_regcache. Move some methods to
9402 * rl78-tdep.c (rl78_pseudo_register_read): Change
9403 parameter type to 'readable_regcache *'.
9404 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9405 (e500_pseudo_register_read): Change parameter type to
9406 'readable_regcache *'.
9407 (dfp_pseudo_register_read): Likewise.
9408 (vsx_pseudo_register_read): Likewise.
9409 (efpr_pseudo_register_read): Likewise.
9410 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9411 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9412 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9413 (sh64_pseudo_register_read): Likewise.
9414 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9415 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9416 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9417 (spu_pseudo_register_read): Likewise.
9418 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9419 (xtensa_pseudo_register_read): Likewise.
9421 2018-02-21 Yao Qi <yao.qi@linaro.org>
9423 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9424 (regcache::arch): Move it to reg_buffer::arch.
9425 (regcache::register_buffer): Likewise.
9426 (regcache::assert_regnum): Likewise.
9427 (regcache::num_raw_registers): Likewise.
9428 * regcache.h (reg_buffer): New class.
9429 (regcache): Inherit reg_buffer.
9431 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9433 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9434 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9436 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9438 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9440 2018-02-19 Alan Hayward <alan.hayward@arm.com>
9442 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9443 (SFILES): Remove common/*.c files.
9444 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9445 * common/common.host: Add common reference.
9446 * configure.ac: Likewise.
9447 * configure: Regenerate.
9449 2018-02-16 Yao Qi <yao.qi@linaro.org>
9451 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9452 (block_initialize_namespace): Use new.
9453 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9454 (dwarf2_free_objfile): Use delete.
9455 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9456 (copy_type_recursive): Use new.
9457 * gdb_obstack.h (allocate_on_obstack): New.
9459 2018-02-15 Yao Qi <yao.qi@linaro.org>
9462 * inferior.c (exit_inferior_1): Reset inf->control.
9464 2018-02-15 Joel Brobecker <brobecker@adacore.com>
9466 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9469 2018-02-14 Pedro Alves <palves@redhat.com>
9471 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9472 frame_cleanup_after_sniffer on exception.
9474 2018-02-14 Tom Tromey <tom@tromey.com>
9476 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9478 (solib_bfd_open): Make pathname const.
9479 * solib.c (solib_bfd_open): Make pathname const.
9480 * solib-spu.c (spu_bfd_fopen): Make name const.
9481 (spu_bfd_open): Make pathname const.
9482 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9483 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9485 2018-02-14 Tom Tromey <tom@tromey.com>
9487 * symfile.c (symfile_bfd_open): Update.
9488 * source.h (openp, source_full_path_of, find_and_open_source):
9489 Change argument type to unique_xmalloc_ptr.
9490 * source.c (openp): Take a unique_xmalloc_ptr.
9491 (source_full_path_of, find_and_open_source): Likewise.
9492 (open_source_file, symtab_to_fullname): Update.
9493 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9495 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9496 (exec_file_find): Update.
9497 * psymtab.c (psymtab_to_fullname): Update.
9498 * nto-tdep.h (nto_find_and_open_solib): Update.
9499 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9501 * exec.c (exec_file_attach): Update.
9502 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9503 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9505 2018-02-14 Tom Tromey <tom@tromey.com>
9507 * solib.c: Include source.h.
9508 * nto-tdep.c: Include source.h.
9509 * mi/mi-cmd-env.c: Include source.h.
9510 * infcmd.c: Include source.h.
9511 * exec.c: Include source.h.
9512 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9513 (add_path, directory_switch, source_path, init_source_path): Move
9515 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9516 (add_path, directory_switch, source_path, init_source_path):
9519 2018-02-14 Tom Tromey <tom@tromey.com>
9521 * solist.h (exec_file_find, solib_find): Return
9523 (solib_bfd_fopen): Take a const char *.
9524 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9525 (exec_file_find, solib_find): Likewise.
9526 (solib_bfd_fopen): Do not take ownership of "pathname".
9527 (solib_bfd_open): Use unique_xmalloc_ptr.
9528 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9529 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9530 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9531 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9533 2018-02-14 Joel Brobecker <brobecker@adacore.com>
9535 * ada-lang.c (name_match_type_from_name): Remove reference to
9536 ada_name_for_lookup in function's documentation.
9537 * ada-lang.h (ada_name_for_lookup): Delete declaration.
9539 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9541 * defs.h (enum openp_flags): New enum.
9542 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9543 Move to enum openp_flags.
9544 (openp_flags): New enum flags.
9545 (openp): Change parameter type to openp_flags.
9546 * source.c (openp): Change parameter type to openp_flags.
9547 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9548 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9550 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9552 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9555 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
9557 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9559 (class dwarf2_queue_guard): ...the destructor of this new class.
9560 (dw2_do_instantiate_symtab): Create instance of the new class
9561 dwarf2_queue_guard, remove cleanup.
9563 2018-02-09 Tom Tromey <tom@tromey.com>
9565 * source.c (find_source_lines): Don't reference past the end of
9568 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9570 * remote.c (remote_btrace_maybe_reopen): Change error message.
9571 * btrace.c (btrace_enable): Likewise.
9572 (parse_xml_btrace): Likewise.
9573 (parse_xml_btrace_conf): Likewise.
9575 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9577 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9578 (linux_enable_pt, linux_enable_bts): Call
9579 diagnose_perf_event_open_fail.
9581 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9583 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9584 Remove parameter and change return type. Update callers. Move it.
9585 (linux_enable_bts, linux_enable_pt): Improve error message.
9586 (linux_enable_pt): Remove zero buffer size check.
9587 (linux_enable_btrace): Improve error messages. Remove NULL return
9590 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9592 * btrace.c (btrace_enable): Remove target_supports_btrace call.
9593 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9594 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9595 (linux_supports_pt, linux_supports_btrace): Remove.
9596 (linux_enable_bts): Call cpu_supports_bts.
9597 * nat/linux-btrace.h (linux_supports_btrace): Remove.
9598 * remote.c (remote_supports_btrace): Remove.
9599 (init_remote_ops): Remove remote_supports_btrace.
9600 * target-delegates.c: Regenerated.
9601 * target.c (target_supports_btrace): Remove.
9602 * target.h (target_ops) <to_supports_btrace>: Remove
9603 (target_supports_btrace): Remove.
9604 * x86-linux-nat.c (x86_linux_create_target): Remove
9605 linux_supports_btrace.
9607 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9609 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9611 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9612 exception and use message in own exception.
9614 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9616 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9617 (perf_event_pt_event_type): Use gdb_file_up.
9618 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9619 scoped_fd, and scoped_mmap.
9621 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9623 * common/scoped_mmap.h: New.
9624 * unittests/scoped_mmap-selftest.c: New.
9625 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9626 unittests/scoped_mmap-selftest.c.
9628 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9630 * common/scoped_fd.h: New.
9631 * unittests/scoped_fd-selftest.c: New.
9632 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9633 unittests/scoped_fd-selftest.c.
9635 2018-02-09 Tom Tromey <tom@tromey.com>
9637 * auto-load.c (auto_load_section_scripts): Use
9638 gdb::unique_xmalloc_ptr.
9640 2018-02-09 Tom Tromey <tom@tromey.com>
9642 * auto-load.c (execute_script_contents): Use std::string.
9644 2018-02-09 Joel Brobecker <brobecker@adacore.com>
9646 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9647 Python function, rather than a new command.
9649 2018-02-08 Tom Tromey <tom@tromey.com>
9651 * solib.c (solib_find_1): Use std::string.
9652 (solib_bfd_fopen): Use unique_xmalloc_ptr.
9654 2018-02-08 Tom Tromey <tom@tromey.com>
9656 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9658 2018-02-08 Tom Tromey <tom@tromey.com>
9660 * source.c (find_source_lines): Use gdb::def_vector.
9662 2018-02-08 Tom Tromey <tom@tromey.com>
9664 * macrocmd.c (struct temporary_macro_definition): New.
9665 (macro_define_command): Use temporary_macro_definition. Remove
9667 (free_macro_definition_ptr): Remove.
9669 2018-02-08 Tom Tromey <tom@tromey.com>
9671 * macroexp.c (maybe_expand): Use std::string.
9673 2018-02-08 Tom Tromey <tom@tromey.com>
9675 * macroexp.c (struct macro_buffer): Add initializers for some
9677 (init_buffer, init_shared_buffer, free_buffer)
9678 (free_buffer_return_text): Remove.
9679 (macro_buffer): New constructors.
9680 (~macro_buffer): New destructor.
9681 (macro_buffer::set_shared): New method.
9682 (macro_buffer::resize_buffer, macro_buffer::appendc)
9683 (macro_buffer::appendmem): Now methods, not free functions.
9684 (set_token, append_tokens_without_splicing, stringify)
9685 (macro_stringify): Update.
9686 (gather_arguments): Change return type. Remove argc_p argument,
9687 add args_ptr argument. Use std::vector.
9688 (substitute_args): Remove argc argument. Accept std::vector.
9689 (expand): Update. Use std::vector.
9690 (scan, macro_expand, macro_expand_next): Update.
9692 2018-02-08 Tom Tromey <tom@tromey.com>
9694 * symtab.c (default_collect_symbol_completion_matches_break_on):
9695 Use unique_xmalloc_ptr.
9696 * macroscope.h: (sal_macro_scope, user_macro_scope)
9697 (default_macro_scope): Return unique_xmalloc_ptr.
9698 * macroscope.c (sal_macro_scope, user_macro_scope)
9699 (default_macro_scope): Return unique_xmalloc_ptr.
9700 * macroexp.h (macro_expand, macro_expand_once): Return
9702 * macroexp.c (macro_expand, macro_expand_once): Return
9704 * macrocmd.c (macro_expand_command, macro_expand_once_command)
9705 (info_macro_command, info_macros_command): Use
9707 * compile/compile-c-support.c (write_macro_definitions): Use
9709 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9711 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
9713 * value.c (value_static_field): Assign field type instead of
9714 containing type when returning an optimized out value.
9716 2018-02-06 Yao Qi <yao.qi@linaro.org>
9718 * ft32-tdep.c (ft32_read_pc): Remove.
9719 (ft32_write_pc): Remove.
9720 (ft32_gdbarch_init): Update.
9721 * m32r-tdep.c (m32r_read_pc): Remove.
9722 (m32r_gdbarch_init): Update.
9723 * mep-tdep.c (mep_read_pc): Remove.
9724 (mep_gdbarch_init): Update.
9725 * microblaze-tdep.c (microblaze_write_pc): Remove.
9726 (microblaze_gdbarch_init): Update.
9727 * mn10300-tdep.c (mn10300_read_pc): Remove.
9728 (mn10300_write_pc): Remove.
9729 (mn10300_gdbarch_init): Update.
9730 * moxie-tdep.c (moxie_read_pc): Remove.
9731 (moxie_write_pc): Remove.
9732 (moxie_gdbarch_init): Update.
9734 2018-02-06 Yao Qi <yao.qi@linaro.org>
9736 * expprint.c (print_subexp_standard): Handle
9737 OP_F77_UNDETERMINED_ARGLIST.
9738 (dump_subexp_body_standard): Likewise.
9740 2018-02-05 Alan Hayward <alan.hayward@arm.com>
9742 * target-descriptions.c (tdesc_element_visitor) Add empty
9744 (tdesc_type): Move make_gdb_type from here.
9745 (tdesc_type_builtin): Likewise.
9746 (tdesc_type_vector): Likewise.
9747 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9748 (make_gdb_type_struct): Move from tdesc_type_with_fields.
9749 (make_gdb_type_union): Likewise.
9750 (make_gdb_type_flags): Likewise.
9751 (make_gdb_type_enum): Likewise.
9752 (make_gdb_type): New function.
9753 (tdesc_register_type): Use static make_gdb_type.
9755 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
9757 * infcmd.c (default_print_one_register_info): Align natural-format
9758 column values consistently one under another.
9759 (pad_to_column): New function.
9761 2018-02-05 Joel Brobecker <brobecker@adacore.com>
9763 * dwarf2read.c (dwarf2_physname): Move commment.
9765 2018-02-01 Leszek Swirski <leszeks@google.com>
9767 * varobj.c (varobj_formatted_print_options): Allow recursive
9768 pretty printing if pretty printing is enabled.
9770 2018-02-01 Leszek Swirski <leszeks@google.com>
9772 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9773 names after a structop as a filename.
9775 2018-02-01 Yao Qi <yao.qi@linaro.org>
9777 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9778 (arm_record_coproc_data_proc): Likewise.
9780 2018-02-01 Yao Qi <yao.qi@linaro.org>
9782 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9784 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
9786 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9787 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9789 2018-01-31 Pedro Alves <palves@redhat.com>
9791 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9792 * inflow.c (child_terminal_save_inferior): Wrap reference to
9793 tcgetpgrp in HAVE_TERMIOS_H.
9794 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9796 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9797 always iterate over all inferiors.
9798 (gdbsim_cntrl_c): Adjust.
9799 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9801 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9803 * gdbtypes.c (lookup_array_range_type): Make sure the array's
9804 index type is objfile-owned if the element type is as well.
9806 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9810 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
9812 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9813 "features/s390x-linux64.c".
9814 (_initialize_s390_linux_tdep): Remove initialization of tdescs
9815 s390_linux32 and s390x_linux64.
9816 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9818 * s390-tdep.c: Include "features/s390-linux32.c" and
9819 "features/s390x-linux64.c".
9820 (s390_tdesc_valid): Add check for tdesc_has_registers.
9821 (s390_gdbarch_init): Make sure there is always a valid tdesc.
9822 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9823 tdesc_s390x_linux64.
9824 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9825 tdesc_s390x_linux64 to...
9826 * s390-tdep.h: ...here.
9828 2018-01-30 Pedro Alves <palves@redhat.com>
9831 * config.in, configure: Regenerate.
9832 * configure.ac: Check for getpgid.
9833 * go32-nat.c (go32_pass_ctrlc): New.
9834 (go32_target): Install it.
9835 * inf-child.c (inf_child_target): Install
9836 child_terminal_save_inferior, child_pass_ctrlc and
9838 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9839 (inf_ptrace_target): No longer install it.
9840 * infcmd.c (interrupt_target_1): Adjust.
9841 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9842 (child_interrupt): Declare.
9843 (inferior::terminal_state): New.
9844 * inflow.c (struct terminal_info): Update comments.
9845 (inferior_process_group): Delete.
9846 (terminal_is_ours): Delete.
9847 (gdb_tty_state): New.
9848 (child_terminal_init): Adjust.
9849 (is_gdb_terminal, sharing_input_terminal_1)
9850 (sharing_input_terminal): New functions.
9851 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
9852 Set the process's actual process group in the foreground if
9853 possible. Handle is_ours_for_output/is_ours distinction. Don't
9854 mark terminal as the inferior's if not sharing GDB's terminal.
9855 Don't check attach_flag.
9856 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9857 pass down a target_terminal_state.
9858 (child_terminal_save_inferior): New, factored out from ...
9859 (child_terminal_ours_1): ... this. Handle
9860 target_terminal_state::is_ours_for_output.
9861 (child_interrupt, child_pass_ctrlc): New.
9862 (inflow_inferior_exit): Clear the inferior's terminal_state.
9863 (copy_terminal_info): Copy the inferior's terminal state.
9864 (_initialize_inflow): Remove reference to terminal_is_ours.
9865 * inflow.h (inferior_process_group): Delete.
9866 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9867 * procfs.c (procfs_target): Don't install procfs_interrupt.
9868 (procfs_interrupt): Delete.
9869 * remote.c (remote_serial_quit_handler): Adjust.
9870 (remote_interrupt): Remove ptid parameter. Adjust.
9871 * target-delegates.c: Regenerate.
9872 * target.c: Include "terminal.h".
9873 (target_terminal::terminal_state): Rename to ...
9874 (target_terminal::m_terminal_state): ... this.
9875 (target_terminal::init): Adjust.
9876 (target_terminal::inferior): Adjust to per-inferior
9878 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
9879 (target_terminal::ours, target_terminal::ours_for_output): Use
9880 target_terminal_is_ours_kind.
9881 (target_interrupt): Remove ptid parameter. Adjust.
9882 (default_target_pass_ctrlc): Adjust.
9883 * target.h (target_ops::to_terminal_save_inferior): New field.
9884 (target_ops::to_interrupt): Remove ptid_t parameter.
9885 (target_interrupt): Remove ptid_t parameter. Update comment.
9886 (target_pass_ctrlc): Update comment.
9887 * target/target.h (target_terminal_state): New scoped enum,
9889 (target_terminal::terminal_state): ... here.
9890 (target_terminal::inferior): Update comments.
9891 (target_terminal::restore_inferior): New.
9892 (target_terminal::is_inferior, target_terminal::is_ours)
9893 (target_terminal::is_ours_for_output): Adjust.
9894 (target_terminal::scoped_restore_terminal_state): Adjust to
9895 rename, and call restore_inferior() instead of inferior().
9896 (target_terminal::scoped_restore_terminal_state::m_state): Change
9898 (target_terminal::terminal_state): Rename to ...
9899 (target_terminal::m_terminal_state): ... this and change type.
9901 2018-01-30 Pedro Alves <palves@redhat.com>
9903 * linux-nat.c (wait_for_signal): New function.
9904 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
9906 (async_terminal_is_ours)
9907 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
9908 (linux_nat_add_target): Don't override
9909 to_terminal_inferior/to_terminal_ours.
9911 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
9913 * remote.c (remote_follow_fork): Don't call "detach_inferior".
9915 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
9917 * dwarf2read.c (free_dwo_files): Add forward-declaration.
9918 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
9919 dwarf2_per_objfile_free here.
9920 (dwarf2_per_objfile_free): Remove.
9921 (_initialize_dwarf2_read): Don't register
9922 dwarf2_per_objfile_free as a registry cleanup.
9924 2018-01-27 Eli Zaretskii <eliz@gnu.org>
9926 Avoid compilation errors in MinGW native builds
9928 The error is triggered by including python-internal.h, and the
9931 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
9932 from build-gnulib/import/math.h:27,
9933 from d:/usr/Python26/include/pyport.h:235,
9934 from d:/usr/Python26/include/Python.h:58,
9935 from python/python-internal.h:94,
9936 from python/py-arch.c:24:
9937 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
9941 This happens because Python headers define 'hypot' to expand t
9942 '_hypot' in the Windows builds.
9943 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
9944 'hypoth'. This avoids a compilation error.
9946 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9948 * MAINTAINERS (Write After Approval): Fix ordering.
9950 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9952 * MAINTAINERS (Write After Approval): Add Alan Hayward.
9954 2018-01-26 Alan Modra <amodra@gmail.com>
9956 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
9957 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
9958 Remove nop. Make const. Comment.
9959 (powerpc32_plt_stub_so_2): New.
9960 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
9961 Correct count. Update uses.
9962 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
9963 Move common code reading PLT entry word. Correct
9964 powerpc32_plt_stub PLT address calculation.
9965 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
9966 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
9967 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
9968 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
9969 (ppc64_standard_linkage8): Likewise.
9970 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
9971 Correct insns description.
9972 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
9974 2018-01-24 Pedro Alves <palves@redhat.com>
9976 GCC PR libstdc++/83906
9977 * gdbtypes.c (operator==(const dynamic_prop &,
9978 const dynamic_prop &)): New.
9979 (operator==(const range_bounds &, const range_bounds &)): New.
9980 (check_types_equal): Use them instead of memcmp.
9981 * gdbtypes.h (operator==(const dynamic_prop &,
9982 const dynamic_prop &)): Declare.
9983 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
9984 (operator==(const range_bounds &, const range_bounds &)): Declare.
9985 (operator!=(const range_bounds &, const range_bounds &)): Declare.
9987 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9989 * s390-linux-tdep.c (s390_record_address_mask)
9990 (s390_record_calc_disp_common, s390_record_calc_disp)
9991 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9992 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9993 (s390_process_record): Move to s390-tdep.c.
9994 (s390_linux_init_abi_any): Adjust.
9995 * s390-tdep.c (s390_record_address_mask)
9996 (s390_record_calc_disp_common, s390_record_calc_disp)
9997 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9998 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9999 (s390_process_record): Moved from s390-linux-tdep.c
10000 (s390_gdbarch_init): Adjust.
10002 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10004 * s390-linux-nat.c (s390-tdep.h): New include.
10005 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10006 (HFILES_NO_SRCDIR): Add s390-tdep.h.
10007 (ALLDEPFILES): Add s390-tdep.c.
10008 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10009 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10010 * s390-tdep.h: ...this. New file.
10011 * s390-linux-tdep.c (s390-tdep.h): New include.
10012 (_initialize_s390_tdep): Rename to...
10013 (_initialize_s390_linux_tdep): ...this and adjust.
10014 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10015 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10017 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10018 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10019 (s390_is_partial_instruction, s390_software_single_step)
10020 (is_non_branch_ril, s390_displaced_step_copy_insn)
10021 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10022 (s390_prologue_data, s390_addr, s390_store, s390_load)
10023 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10024 (s390_register_call_saved, s390_guess_tracepoint_registers)
10025 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10026 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10027 (s390_pseudo_register_name, s390_pseudo_register_type)
10028 (s390_pseudo_register_read, s390_pseudo_register_write)
10029 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10030 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10031 (s390_addr_bits_remove, s390_address_class_type_flags)
10032 (s390_address_class_type_flags_to_name)
10033 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10034 (s390_function_arg_float, s390_function_arg_vector)
10035 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10036 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10037 (s390_frame_align, s390_register_return_value, s390_return_value)
10038 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10039 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10040 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10041 (s390_trad_frame_prev_register, s390_unwind_cache)
10042 (s390_prologue_frame_unwind_cache)
10043 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10044 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10045 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10046 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10047 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10048 (s390_frame_base_address, s390_local_base_address)
10049 (s390_frame_base, s390_gcc_target_options)
10050 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10051 (s390_validate_reg_range, s390_tdesc_valid)
10052 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10053 * s390-tdep.c: ...this. New file.
10055 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10057 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10058 (s390_process_record, s390_gdbarch_tdep_alloc)
10059 (s390_linux_init_abi_any): Use/set new hook.
10061 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10063 * s390-linux-tdep.c (osabi.h): New include.
10064 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10065 (s390_linux_init_abi_any): New functions.
10066 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10068 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10070 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10071 tdesc_has_registers check
10073 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10075 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10076 (s390_validate_reg_range): New macro.
10077 (s390_gdbarch_init): Adjust.
10079 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10081 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10082 (s390_gdbarch_tdep_alloc): Adjust.
10083 (s390_gdbarch_init): Adjust.
10085 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10087 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10088 <have_tdb>: Change type to bool.
10089 (s390_gdbarch_tdep_alloc): Adjust.
10090 (s390_gdbarch_init): Adjust.
10092 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10094 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10095 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10096 (s390_gdbarch_tdep_alloc): New function.
10097 (s390_gdbarch_init): Allocate tdep at start and use its fields
10098 instead of separate variables.
10100 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10102 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10103 when looking for cached gdbarch and add comment for remaining.
10105 2018-01-22 Pedro Alves <palves@redhat.com>
10106 Sergio Durigan Junior <sergiodj@redhat.com>
10108 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10111 2018-01-22 Maciej W. Rozycki <macro@mips.com>
10113 * MAINTAINERS: Update my company e-mail address.
10115 2018-01-22 Yao Qi <yao.qi@linaro.org>
10117 * regcache.c (cooked_write_test): New function.
10118 (_initialize_regcache): Register the test.
10120 2018-01-22 Yao Qi <yao.qi@linaro.org>
10122 * ia64-tdep.c (ia64_pseudo_register_read): Call
10123 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10124 * m32c-tdep.c (m32c_cat_read): Likewise.
10125 (m32c_r3r2r1r0_read): Likewise.
10126 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10127 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10129 2018-01-22 Yao Qi <yao.qi@linaro.org>
10131 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10132 method raw_read instead of regcache_raw_read.
10133 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10134 * arm-tdep.c (arm_neon_quad_read): Likewise.
10135 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10136 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10137 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10138 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10139 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10140 (i386_pseudo_register_read_into_value): Likewise.
10141 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10142 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10143 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10144 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10145 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10146 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10147 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10148 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10149 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10151 2018-01-22 Yao Qi <yao.qi@linaro.org>
10153 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10154 * configure.tgt: Remove target mt.
10155 * mt-tdep.c: Remove.
10156 * regcache.c (cooked_read_test): Remove the check for mt.
10158 2018-01-22 Yao Qi <yao.qi@linaro.org>
10160 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10161 instead of gdbarch_pseudo_register_read_value.
10163 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10165 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10168 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10170 * linespec.c (create_sals_line_offset): Remove code that preserved
10171 the symtab_and_line's line number.
10173 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10175 * varobj.c (varobj_create): Don't set valid_block when creating a
10178 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10180 * varobj.c (varobj_create): Remove out of date comment.
10182 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10185 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10186 updating innermost block.
10187 * parse.c (innermost_block_tracker::update): Take extra type
10188 parameter, and check types match before updating innermost block.
10189 (write_dollar_variable): Update innermost block for registers.
10190 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10191 (innermost_block_tracker::innermost_block_tracker): Initialise
10193 (innermost_block_tracker::reset): Take type parameter.
10194 (innermost_block_tracker::update): Take type parameter, and pass
10195 type through as needed.
10196 (innermost_block_tracker::m_types): New member.
10197 * varobj.c (varobj_create): Pass type when reseting innermost
10200 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10202 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10203 * ada-lang.c (resolve_subexp): Likewise.
10204 * breakpoint.c (set_breakpoint_condition) Likewise.
10205 (watch_command_1) Likewise.
10206 * c-exp.y (variable): Likewise.
10207 * d-exp.y (PrimaryExpression): Likewise.
10208 * f-exp.y (variable): Likewise.
10209 * go-exp.y (variable): Likewise.
10210 * m2-exp.y (variable): Likewise.
10211 * objfiles.c (objfile::~objfile): Likewise.
10212 * p-exp.y (variable): Likewise.
10213 * parse.c (innermost_block): Change type.
10214 * parser-defs.h (class innermost_block_tracker): New.
10215 (innermost_block): Change to innermost_block_tracker.
10216 * printcmd.c (display_command): Switch to innermost_block API.
10217 (do_one_display): Likewise.
10218 * rust-exp.y (do_one_display): Likewise.
10219 * symfile.c (clear_symtab_users): Likewise.
10220 * varobj.c (varobj_create): Switch to innermost_block API, replace
10221 use of innermost_block with block stored on varobj object.
10223 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10225 * expression.h (innermost_block): Remove declaration.
10226 * varobj.c: Add 'parser-defs.h' include.
10228 2018-01-19 Tom Tromey <tom@tromey.com>
10230 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10231 symbols in the static and global blocks.
10233 2018-01-19 James Clarke <jrtc27@jrtc27.com>
10235 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10236 gdb_ptrace.h, and move including gdb_wait.h ...
10237 * nat/linux-ptrace.h: ... to here.
10239 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10241 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10242 inf_ptrace_detach_success.
10243 (inf_ptrace_detach_success): Add inferior parameter, use it
10244 instead of inferior_ptid, pass it to detach_inferior.
10245 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10247 * inferior.c (detach_inferior): Add overload that takes an
10249 * inferior.h (detach_inferior): Likewise.
10250 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10251 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10252 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10254 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10256 * target.h (struct target_ops) <to_detach>: Add inferior
10258 (target_detach): Likewise.
10259 * target.c (dispose_inferior): Pass inferior down.
10260 (target_detach): Pass inferior down. Assert that it is equal to
10261 the current inferior.
10262 * aix-thread.c (aix_thread_detach): Pass inferior down.
10263 * corefile.c (core_file_command): Pass current_inferior() down.
10264 * corelow.c (core_detach): Add inferior parameter.
10265 * darwin-nat.c (darwin_detach): Likewise.
10266 * gnu-nat.c (gnu_detach): Likewise.
10267 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10268 * infcmd.c (detach_command): Pass current_inferior() down to
10270 * infrun.c (follow_fork_inferior): Pass parent_inf to
10272 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10274 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10275 * linux-thread-db.c (thread_db_detach): Likewise.
10276 * nto-procfs.c (procfs_detach): Likewise.
10277 * procfs.c (procfs_detach): Likewise.
10278 * record.c (record_detach): Likewise.
10279 * record.h (struct inferior): Forward-declare.
10280 (record_detach): Add inferior parameter.
10281 * remote-sim.c (gdbsim_detach): Likewise.
10282 * remote.c (remote_detach_1): Likewise.
10283 (remote_detach): Likewise.
10284 (extended_remote_detach): Likewise.
10285 * sol-thread.c (sol_thread_detach): Likewise.
10286 * target-debug.h (target_debug_print_inferior_p): New macro.
10287 * target-delegates.c: Re-generate.
10288 * top.c (kill_or_detach): Pass inferior down to target_detach.
10289 * windows-nat.c (windows_detach): Add inferior parameter.
10291 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10293 * target.h (struct target_ops) <to_detach>: Remove args
10295 (target_detach): Likewise.
10296 * target.c (dispose_inferior): Adjust.
10297 (target_detach): Remove args parameter, adjust.
10298 * aix-thread.c (aix_thread_detach): Adjust.
10299 * corefile.c (core_file_command): Adjust.
10300 * corelow.c (core_detach): Adjust.
10301 * darwin-nat.c (darwin_detach): Adjust.
10302 * gnu-nat.c (gnu_detach): Adjust.
10303 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10304 * infcmd.c (detach_command): Adjust
10305 * infrun.c (follow_fork_inferior): Adjust.
10306 (handle_vfork_child_exec_or_exit): Adjust.
10307 * linux-fork.c (linux_fork_detach): Remove args parameter.
10308 * linux-fork.h (linux_fork_detach): Likewise.
10309 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10310 * linux-thread-db.c (thread_db_detach): Likewise.
10311 * nto-procfs.c (procfs_detach): Likewise.
10312 * procfs.c (procfs_detach): Likewise.
10313 (do_detach): Remove signo parameter.
10314 * record.c (record_detach): Remove args parameter.
10315 * record.h (record_detach): Likewise.
10316 * remote-sim.c (gdbsim_detach): Likewise.
10317 * remote.c (remote_detach_1): Likewise.
10318 (remote_detach): Likewise.
10319 (extended_remote_detach): Likewise.
10320 * sol-thread.c (sol_thread_detach): Likewise.
10321 * target-delegates.c: Re-generate.
10322 * top.c (struct qt_args) <args>: Remove field.
10323 (kill_or_detach): Don't pass args.
10324 (quit_force): Don't set args.
10325 * windows-nat.c (windows_detach): Remove args parameter.
10327 2018-01-19 Yao Qi <yao.qi@linaro.org>
10329 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10330 (arm_linux_init_abi): Install it.
10332 2018-01-19 Yao Qi <yao.qi@linaro.org>
10334 * osabi.c (gdb_osabi_names): Extend the regexp for
10335 arm-linux-gnueabihf.
10337 2018-01-18 Yao Qi <yao.qi@linaro.org>
10339 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10341 (abbrev_table::add_abbrev): Update.
10342 (abbrev_table::lookup_abbrev): Update.
10344 2018-01-18 Yao Qi <yao.qi@linaro.org>
10346 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10348 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10350 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10353 2018-01-17 Tom Tromey <tom@tromey.com>
10355 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10357 2018-01-17 Tom Tromey <tom@tromey.com>
10359 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10360 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10361 (create_array_type_with_stride): Update.
10362 * dwarf2read.c (set_die_type): Update.
10364 2018-01-17 Tom Tromey <tom@tromey.com>
10366 * dwarf2read.c (delayed_method_info): Remove typedef.
10367 (dwarf2_cu::method_info): Now a std::vector.
10368 (add_to_method_list): Update.
10369 (free_delayed_list): Remove.
10370 (compute_delayed_physnames): Update.
10371 (process_full_comp_unit, process_full_type_unit): Clear the method
10372 list. Remove cleanups.
10373 (psymtab_include_file_name): Add name_holder parameter. Use
10374 unique_xmalloc_ptr.
10375 (dwarf_decode_lines): Update.
10377 2018-01-17 Tom Tromey <tom@tromey.com>
10378 Simon Marchi <simon.marchi@ericsson.com>
10380 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10381 (dwarf2_per_objfile::free_cached_comp_units)
10382 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10383 (init_cutu_and_read_dies_no_follow): Update.
10384 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10385 (dwarf2_cu::~dwarf2_cu): New.
10386 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10387 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10389 2018-01-17 Tom Tromey <tom@tromey.com>
10390 Simon Marchi <simon.marchi@ericsson.com>
10392 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10393 (struct die_reader_specs) <abbrev_table>: New member.
10394 (struct abbrev_table): Add constructor.
10395 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10396 <abbrev_obstack>: Now an auto_obstack.
10397 (abbrev_table_up): New typedef.
10398 (init_cu_die_reader): Add abbrev_table parameter.
10399 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10400 Add result_dwo_abbrev_table.
10401 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10402 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10404 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10406 (skip_children): Update.
10407 (abbrev_table::alloc_abbrev): Rename from
10408 abbrev_table_alloc_abbrev.
10409 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10410 (abbrev_table::lookup_abbrev): Rename from
10411 abbrev_table_lookup_abbrev.
10412 (abbrev_table_read_table): Return abbrev_table_up.
10413 (abbrev_table_free, abbrev_table_free_cleanup)
10414 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10415 (load_partial_dies): Update.
10417 2018-01-17 Tom Tromey <tom@tromey.com>
10419 * dwarf2read.c (dwarf2_compute_name): Update comment.
10420 (read_func_scope, read_variable): Update.
10421 (new_symbol): Remove.
10422 (new_symbol_full): Rename to new_symbol.
10424 2018-01-17 Mike Gulick <mgulick@mathworks.com>
10427 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10428 a warning instead of throwing an error, set section size to 0 and return
10430 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10432 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10434 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10436 (linux_ptrace_attach_fail_reason_string): Likewise.
10437 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10439 (linux_ptrace_attach_fail_reason_string): Likewise.
10440 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10442 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10444 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10446 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10449 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10450 checking for fs_base/gs_base fields in struct user_regs_struct.
10451 * configure: Regenerate.
10453 2018-01-17 Yao Qi <yao.qi@linaro.org>
10455 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10457 (aarch64_linux_init_abi): Install it to gdbarch hook
10458 gcc_target_options.
10460 2018-01-15 Pedro Alves <palves@redhat.com>
10462 * common/signals-state-save-restore.c
10463 (save_original_signals_state): Fix typos.
10465 2017-01-12 Tom Tromey <tom@tromey.com>
10466 Sergio Durigan Junior <sergiodj@redhat.com>
10468 * Makefile.in (install-only): Install gdb-add-index.
10470 2018-01-12 John Baldwin <jhb@FreeBSD.org>
10472 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10474 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10476 * infrun.c (keep_going_pass_signal): Clear step-over info when
10477 insert_breakpoints fails.
10479 2018-01-11 Pedro Alves <palves@redhat.com>
10482 * infrun.c (resume): Rename to ...
10483 (resume_1): ... this.
10484 (resume): Reimplement as wrapper around resume_1.
10486 2018-01-11 Pedro Alves <palves@redhat.com>
10489 * remote.c (remote_parse_stop_reply): Default to the last-set
10490 general thread instead of to 'magic_null_ptid'.
10492 2018-01-10 Pedro Alves <palves@redhat.com>
10494 * language.h (language_get_symbol_name_matcher): Rename ...
10495 (get_symbol_name_matcher): ... this.
10496 * language.c (language_get_symbol_name_matcher): Ditto.
10497 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10500 2018-01-10 Pedro Alves <palves@redhat.com>
10504 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10505 Adjust to use language_get_symbol_name_matcher instead of
10506 language_defn::la_get_symbol_name_matcher.
10507 * language.c (language_get_symbol_name_matcher): If in Ada mode
10508 and the lookup name is a verbatim match, return Ada's matcher.
10509 * language.h (language_get_symbol_name_matcher): Adjust comment.
10510 (ada_lookup_name_info::verbatim_p):: New method.
10512 2018-01-10 Pedro Alves <palves@redhat.com>
10515 * ada-lang.c (ada_collect_symbol_completion_matches): If the
10516 minsym's language is language_auto or language_cplus, pass down
10517 language_ada instead.
10518 * symtab.c (compare_symbol_name): Don't frob symbol language here.
10520 2018-01-10 Pedro Alves <palves@redhat.com>
10523 * minsyms.c (linkage_name_str): New function.
10524 (iterate_over_minimal_symbols): Use it.
10526 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10528 * NEWS: Document that 'info proc' now works on FreeBSD.
10530 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10532 * configure.ac: Check for kinfo_getfile in libutil.
10533 * configure: Regenerate.
10534 * config.in: Regenerate.
10535 * fbsd-nat.c: Include "fbsd-tdep.h".
10536 (fbsd_fetch_cmdline): New.
10537 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10538 rather than calling error.
10539 (fbsd_info_proc): New.
10540 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10541 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10542 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10544 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10546 * fbsd-nat.c (struct free_deleter): Remove.
10547 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10549 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10551 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10552 NULL for an empty pathname.
10554 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10556 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10557 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10558 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10559 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10560 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10561 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10562 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10563 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10564 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10565 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10566 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10567 (fbsd_core_fetch_timeval, fbsd_print_sigset)
10568 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10569 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
10570 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10572 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
10574 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10575 (gnu_xfer_auxv): New function.
10576 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10577 TARGET_OBJECT_AUXV.
10579 2018-01-08 Yao Qi <yao.qi@linaro.org>
10580 Simon Marchi <simon.marchi@ericsson.com>
10582 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10584 (COMMON_OBS): Remove selftest.o.
10585 * configure.ac: Append selftest-arch.c and common/selftest.c to
10586 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
10587 * configure: Re-generated.
10588 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10590 (maintenance_info_selftests): Likewise.
10592 2018-01-08 Xavier Roirand <roirand@adacore.com>
10594 * ada-valprint.c (val_print_packed_array_elements): Use
10595 proper number of elements when printing an array indexed
10596 by an enumeration type.
10598 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10600 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10601 (dw2_get_file_names_reader): Adjust.
10602 (lookup_dwo_signatured_type): Adjust.
10603 (lookup_dwp_signatured_type): Adjust.
10604 (lookup_signatured_type): Adjust.
10605 (create_type_unit_group): Adjust.
10606 (get_type_unit_group): Adjust.
10607 (process_psymtab_comp_unit_reader): Adjust.
10608 (build_type_psymtabs_reader): Adjust.
10609 (scan_partial_symbols): Adjust.
10610 (add_partial_symbol): Adjust.
10611 (add_partial_subprogram): Adjust.
10612 (peek_die_abbrev): Adjust.
10613 (fixup_go_packaging): Adjust.
10614 (process_imported_unit_die): Adjust.
10615 (dwarf2_compute_name): Adjust.
10616 (dwarf2_physname): Adjust.
10617 (read_import_statement): Adjust.
10618 (handle_DW_AT_stmt_list): Adjust.
10619 (read_file_scope): Adjust.
10620 (read_func_scope): Adjust.
10621 (read_lexical_block_scope): Adjust.
10622 (read_call_site_scope): Adjust.
10623 (read_variable): Adjust.
10624 (dwarf2_rnglists_process): Adjust.
10625 (dwarf2_ranges_process): Adjust.
10626 (dwarf2_ranges_read): Adjust.
10627 (dwarf2_get_pc_bounds): Adjust.
10628 (dwarf2_record_block_ranges): Adjust.
10629 (dwarf2_add_field): Adjust.
10630 (dwarf2_add_member_fn): Adjust.
10631 (read_structure_type): Adjust.
10632 (process_structure_scope): Adjust.
10633 (read_enumeration_type): Adjust.
10634 (read_array_type): Adjust.
10635 (mark_common_block_symbol_computed): Adjust.
10636 (read_common_block): Adjust.
10637 (read_namespace_type): Adjust.
10638 (read_namespace): Adjust.
10639 (read_module_type): Adjust.
10640 (read_tag_pointer_type): Adjust.
10641 (read_tag_ptr_to_member_type): Adjust.
10642 (read_tag_string_type): Adjust.
10643 (read_subroutine_type): Adjust.
10644 (read_typedef): Adjust.
10645 (read_base_type): Adjust.
10646 (attr_to_dynamic_prop): Adjust.
10647 (read_subrange_type): Adjust.
10648 (read_unspecified_type): Adjust.
10649 (dwarf2_read_abbrevs): Adjust.
10650 (load_partial_dies): Adjust.
10651 (read_partial_die): Adjust.
10652 (find_partial_die): Adjust.
10653 (guess_partial_die_structure_name): Adjust.
10654 (fixup_partial_die): Adjust.
10655 (read_attribute_value): Adjust.
10656 (read_addr_index): Adjust.
10657 (read_addr_index_from_leb128): Adjust.
10658 (read_str_index): Adjust.
10659 (dwarf2_string_attr): Adjust.
10660 (get_debug_line_section): Adjust.
10661 (dwarf_decode_line_header): Adjust.
10662 (lnp_state_machine::check_line_address): Adjust.
10663 (dwarf_decode_lines_1): Adjust.
10664 (dwarf_decode_lines): Adjust.
10665 (dwarf2_start_symtab): Adjust.
10666 (var_decode_location): Adjust.
10667 (new_symbol_full): Adjust.
10668 (dwarf2_const_value_data): Adjust.
10669 (dwarf2_const_value_attr): Adjust.
10670 (dwarf2_const_value): Adjust.
10671 (die_type): Adjust.
10672 (die_containing_type): Adjust.
10673 (build_error_marker_type): Adjust.
10674 (lookup_die_type): Adjust.
10675 (guess_full_die_structure_name): Adjust.
10676 (anonymous_struct_prefix): Adjust.
10677 (determine_prefix): Adjust.
10678 (dwarf2_name): Adjust.
10679 (follow_die_ref_or_sig): Adjust.
10680 (follow_die_offset): Adjust.
10681 (follow_die_ref): Adjust.
10682 (follow_die_sig_1): Adjust.
10683 (follow_die_sig): Adjust.
10684 (get_signatured_type): Adjust.
10685 (get_DW_AT_signature_type): Adjust.
10686 (decode_locdesc): Adjust.
10687 (dwarf_decode_macros): Adjust.
10688 (cu_debug_loc_section): Adjust.
10689 (fill_in_loclist_baton): Adjust.
10690 (dwarf2_symbol_mark_computed): Adjust.
10691 (init_one_comp_unit): Don't assign
10692 dwarf2_cu::dwarf2_per_objfile.
10693 (set_die_type): Adjust.
10695 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10697 * dwarf2read.c (struct mapped_debug_names): Add constructor.
10698 <dwarf2_per_objfile>: New field.
10699 (dwarf2_per_objfile): Remove global.
10700 (get_dwarf2_per_objfile): New function.
10701 (set_dwarf2_per_objfile): New function.
10702 (dwarf2_build_psymtabs_hard): Change objfile parameter to
10703 dwarf2_per_objfile.
10704 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10705 (read_abbrev_offset): Likewise.
10706 (read_indirect_string): Likewise.
10707 (read_indirect_line_string): Likewise.
10708 (read_indirect_string_at_offset): Likewise.
10709 (read_indirect_string_from_dwz): Likewise.
10710 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10711 dwarf2_per_objfile.
10712 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10713 (create_all_comp_units): Change objfile parameter to
10714 dwarf2_per_objfile.
10715 (create_all_type_units): Likewise.
10716 (process_queue): Add dwarf2_per_objfile parameter.
10717 (read_and_check_comp_unit_head): Likewise.
10718 (lookup_dwo_unit_in_dwp): Likewise.
10719 (get_dwp_file): Likewise.
10720 (process_cu_includes): Likewise.
10721 (struct free_dwo_file_cleanup_data): New struct.
10722 (dwarf2_has_info): Use get_dwarf2_per_objfile and
10723 set_dwarf2_per_objfile.
10724 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10725 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10726 context, adjust calls.
10727 (dw2_instantiate_symtab): Likewise.
10728 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10729 (dw2_get_cu): Likewise.
10730 (create_cu_from_index_list): Change objfile parameter to
10731 dwarf2_per_objfile.
10732 (create_cus_from_index_list): Get dwarf2_per_objfile from
10733 context, adjust calls.
10734 (create_cus_from_index): Likewise.
10735 (create_signatured_type_table_from_index): Change objfile
10736 parameter to dwarf2_per_objfile.
10737 (create_signatured_type_table_from_debug_names): Change objfile
10738 parameter to dwarf2_per_objfile.
10739 (create_addrmap_from_index): Likewise.
10740 (create_addrmap_from_aranges): Likewise.
10741 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10742 (dw2_setup): Remove.
10743 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10745 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10746 get_dwarf2_per_objfile.
10747 (dw2_forget_cached_source_info): Likewise.
10748 (dw2_map_symtabs_matching_filename): Likewise.
10749 (struct dw2_symtab_iterator) <index>: Remove.
10750 <dwarf2_per_objfile>: New field.
10751 (dw2_symtab_iter_init): Replace index parameter with
10752 dwarf2_per_objfile.
10753 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10754 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10755 (dw2_print_stats): Likewise.
10756 (dw2_dump): Likewise.
10757 (dw2_expand_symtabs_for_function): Likewise.
10758 (dw2_expand_all_symtabs): Likewise.
10759 (dw2_expand_symtabs_with_fullname): Likewise.
10760 (dw2_expand_marked_cus): Replace index and objfile parameters
10761 with dwarf2_per_objfile.
10762 (dw_expand_symtabs_matching_file_matcher): Add
10763 dwarf2_per_objfile parameter and adjust calls.
10764 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10766 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10767 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10769 (create_cus_from_debug_names_list): Replace objfile parameter
10770 with dwarf2_per_objfile and adjust calls.
10771 (create_cus_from_debug_names): Likewise.
10772 (dwarf2_read_debug_names): Likewise.
10773 (mapped_debug_names::namei_to_name): Adjust call.
10774 (dw2_debug_names_iterator::next): Likewise.
10775 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10776 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10777 (dw2_debug_names_dump): Likewise.
10778 (dw2_debug_names_expand_symtabs_for_function): Likewise.
10779 (dw2_debug_names_expand_symtabs_matching): Likewise.
10780 (dwarf2_initialize_objfile): Likewise.
10781 (dwarf2_build_psymtabs): Likewise.
10782 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10784 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10785 (read_and_check_comp_unit_head): Likewise.
10786 (read_abbrev_offset): Likewise.
10787 (create_debug_type_hash_table): Likewise.
10788 (create_debug_types_hash_table): Likewise.
10789 (create_all_type_units): Replace objfile parameter with
10790 dwarf2_per_objfile.
10791 (add_type_unit): Add dwarf2_per_objfile parameter.
10792 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10793 with dwarf2_per_objfile.
10794 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10795 (lookup_dwp_signatured_type): Likewise.
10796 (lookup_signatured_type): Likewise.
10797 (read_cutu_die_from_dwo): Likewise.
10798 (init_tu_and_read_dwo_dies): Likewise.
10799 (init_cutu_and_read_dies): Likewise.
10800 (init_cutu_and_read_dies_no_follow): Likewise.
10801 (allocate_type_unit_groups_table): Add objfile parameter.
10802 (create_type_unit_group): Use dwarf2_per_objfile from cu.
10803 (get_type_unit_group): Likewise.
10804 (process_psymtab_comp_unit): Update call.
10805 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10806 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10807 (print_tu_stats): Likewise.
10808 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10809 in void* parameter.
10810 (build_type_psymtabs): Change objfile parameter to
10811 dwarf2_per_objfile.
10812 (process_skeletonless_type_unit): Use dwarf2_per_objfile
10813 passed in void* parameter.
10814 (process_skeletonless_type_units): Change objfile parameter to
10815 dwarf2_per_objfile.
10816 (set_partial_user): Likewise.
10817 (dwarf2_build_psymtabs_hard): Likewise.
10818 (read_comp_units_from_section): Likewise.
10819 (create_all_comp_units): Likewise.
10820 (scan_partial_symbols): Update calls.
10821 (add_partial_symbol): Likewise.
10822 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10823 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10824 (process_queue): Add dwarf2_per_objfile parameter.
10825 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10826 (compute_compunit_symtab_includes): Likewise.
10827 (process_cu_includes): Add dwarf2_per_objfile parameter.
10828 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10829 (process_full_type_unit): Likewise.
10830 (process_imported_unit_die): Update call.
10831 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10832 (read_file_scope): Likewise.
10833 (allocate_dwo_file_hash_table): Add objfile parameter.
10834 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10835 (create_cus_hash_table): Likewise.
10836 (create_dwp_hash_table): Likewise.
10837 (create_dwo_unit_in_dwp_v1): Likewise.
10838 (create_dwp_v2_section): Likewise.
10839 (create_dwo_unit_in_dwp_v2): Likewise.
10840 (lookup_dwo_unit_in_dwp): Likewise.
10841 (try_open_dwop_file): Likewise.
10842 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10843 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10844 cleanup to include a reference to dwarf2_per_objfile.
10845 (open_dwp_file): Add dwarf2_per_objfile parameter.
10846 (open_and_init_dwp_file): Likewise.
10847 (get_dwp_file): Likewise.
10848 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10849 (queue_and_load_all_dwo_tus): Update call.
10850 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10852 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10853 (dwarf2_ranges_process): Likewise.
10854 (dwarf2_get_pc_bounds): Likewise.
10855 (mark_common_block_symbol_computed): Likewise.
10856 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10857 (dwarf2_read_abbrevs): Update call.
10858 (read_partial_die): Use dwarf2_per_objfile from cu.
10859 (find_partial_die): Likewise.
10860 (fixup_partial_die): Likewise.
10861 (read_attribute_value): Likewise.
10862 (read_indirect_string_at_offset_from): Add objfile parameter.
10863 (read_indirect_string_at_offset): Add dwarf2_per_objfile
10865 (read_indirect_string_from_dwz): Add objfile parameter.
10866 (read_indirect_string): Add objfile parameter.
10867 (read_addr_index_1): Add dwarf2_per_objfile parameter.
10868 (read_addr_index): Use dwarf2_per_objfile from cu.
10869 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10871 (read_str_index): Use dwarf2_per_objfile from cu.
10872 (get_debug_line_section): Likewise.
10873 (read_formatted_entries): Add dwarf2_per_objfile parameter.
10874 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
10875 (new_symbol_full): Use dwarf2_per_objfile from cu.
10876 (build_error_marker_type): Likewise.
10877 (lookup_die_type): Likewise.
10878 (determine_prefix): Likewise.
10879 (follow_die_offset): Likewise.
10880 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
10881 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
10882 (dwarf2_fetch_die_type_sect_off): Likewise.
10883 (dwarf2_get_die_type): Likewise.
10884 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
10885 (get_signatured_type): Likewise.
10886 (get_DW_AT_signature_type): Likewise.
10887 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
10888 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
10889 (cu_debug_loc_section): Likewise.
10890 (fill_in_loclist_baton): Likewise.
10891 (dwarf2_symbol_mark_computed): Likewise.
10892 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10893 dwarf2_per_objfile.
10894 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
10896 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10897 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
10898 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
10899 (set_die_type): Use dwarf2_free_objfile from cu.
10900 (get_die_type_at_offset): Likewise.
10901 (dwarf2_per_objfile_free): Don't assign global variable.
10902 (debug_names) <constructor>: Add dwarf2_per_objfile
10903 parameter, update m_debugstrlookup construction.
10904 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
10906 <m_dwarf2_per_objfile>: New field.
10907 <lookup>: Use m_dwarf2_per_objfile.
10908 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
10909 (psyms_seen_size): Likewise.
10910 (write_gdbindex): Replace objfile parameter with
10911 dwarf2_per_objfile.
10912 (write_debug_names): Likewise.
10913 (write_psymtabs_to_index): Likewise.
10914 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
10917 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10919 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
10920 <dwarf2_per_objfile>: New field.
10921 (struct dwarf2_per_cu_data) <objfile>: Remove.
10922 <dwarf2_per_objfile>: New field.
10923 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
10925 (create_signatured_type_table_from_index): Likewise.
10926 (create_debug_type_hash_table): Likewise.
10927 (fill_in_sig_entry_from_dwo_entry): Likewise.
10928 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
10929 (create_type_unit_group): Assign dwarf2_per_objfile instead of
10931 (create_partial_symtab): Access objfile through
10932 dwarf2_per_objfile.
10933 (process_psymtab_comp_unit_reader): Likewise.
10934 (read_comp_units_from_section): Likewise.
10935 (scan_partial_symbols): Likewise.
10936 (add_partial_symbol): Likewise.
10937 (add_partial_subprogram): Likewise.
10938 (peek_die_abbrev): Likewise.
10939 (fixup_go_packaging): Likewise.
10940 (process_full_comp_unit): Likewise.
10941 (process_full_type_unit): Likewise.
10942 (process_imported_unit_die): Likewise.
10943 (dwarf2_compute_name): Likewise.
10944 (dwarf2_physname): Likewise.
10945 (read_import_statement): Likewise.
10946 (create_cus_hash_table): Assign dwarf2_physname instead of
10948 (read_func_scope): Access objfile through dwarf2_per_objfile.
10949 (read_lexical_block_scope): Likewise.
10950 (read_call_site_scope): Likewise.
10951 (read_variable): Likewise.
10952 (dwarf2_rnglists_process): Likewise.
10953 (dwarf2_ranges_process): Likewise.
10954 (dwarf2_ranges_read): Likewise.
10955 (dwarf2_record_block_ranges): Likewise.
10956 (dwarf2_add_field): Likewise.
10957 (dwarf2_add_member_fn): Likewise.
10958 (read_structure_type): Likewise.
10959 (process_structure_scope): Likewise.
10960 (read_enumeration_type): Likewise.
10961 (read_array_type): Likewise.
10962 (read_common_block): Likewise.
10963 (read_namespace_type): Likewise.
10964 (read_namespace): Likewise.
10965 (read_module_type): Likewise.
10966 (read_tag_pointer_type): Likewise.
10967 (read_tag_ptr_to_member_type): Likewise.
10968 (read_tag_string_type): Likewise.
10969 (read_subroutine_type): Likewise.
10970 (read_typedef): Likewise.
10971 (read_base_type): Likewise.
10972 (attr_to_dynamic_prop): Likewise.
10973 (read_subrange_type): Likewise.
10974 (read_unspecified_type): Likewise.
10975 (load_partial_dies): Likewise.
10976 (read_partial_die): Likewise.
10977 (find_partial_die): Likewise.
10978 (guess_partial_die_structure_name): Likewise.
10979 (fixup_partial_die): Likewise.
10980 (read_attribute_value): Likewise.
10981 (read_addr_index_from_leb128): Likewise.
10982 (dwarf2_read_addr_index): Likewise.
10983 (dwarf2_string_attr): Likewise.
10984 (lnp_state_machine::check_line_address): Likewise.
10985 (dwarf_decode_lines_1): Likewise.
10986 (dwarf_decode_lines): Likewise.
10987 (dwarf2_start_symtab): Likewise.
10988 (var_decode_location): Likewise.
10989 (new_symbol_full): Likewise.
10990 (dwarf2_const_value_data): Likewise.
10991 (dwarf2_const_value_attr): Likewise.
10992 (dwarf2_const_value): Likewise.
10993 (die_type): Likewise.
10994 (die_containing_type): Likewise.
10995 (lookup_die_type): Likewise.
10996 (guess_full_die_structure_name): Likewise.
10997 (anonymous_struct_prefix): Likewise.
10998 (dwarf2_name): Likewise.
10999 (follow_die_ref_or_sig): Likewise.
11000 (follow_die_offset): Likewise.
11001 (follow_die_ref): Likewise.
11002 (dwarf2_fetch_die_loc_sect_off): Likewise.
11003 (dwarf2_fetch_constant_bytes): Likewise.
11004 (dwarf2_fetch_die_type_sect_off): Likewise.
11005 (dwarf2_get_die_type): Likewise.
11006 (follow_die_sig): Likewise.
11007 (decode_locdesc): Likewise.
11008 (dwarf2_per_cu_objfile): Likewise.
11009 (dwarf2_per_cu_text_offset): Likewise.
11010 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11012 (set_die_type): Access objfile through
11013 dwarf2_per_objfile.
11015 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11017 * valprint.c (converted_character_d): Remove typedef.
11018 (DEF_VEC_O (converted_character_d)): Remove.
11019 (count_next_character): Use std::vector.
11020 (print_converted_chars_to_obstack): Likewise.
11021 (generic_printstr): Likewise.
11023 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11025 * xml-support.h (struct gdb_xml_value): Add constructor.
11026 <value>: Change type to unique_xmalloc_ptr.
11027 (gdb_xml_value_s): Remove typedef.
11028 (DEF_VEC_O (gdb_xml_value_s)): Remove.
11029 (gdb_xml_element_start_handler): Change parameter type to
11031 (xml_find_attribute): Likewise.
11032 * xml-support.c (xml_find_attribute): Change parameter type to
11033 std::vector and adjust.
11034 (gdb_xml_values_cleanup): Remove.
11035 (gdb_xml_parser::start_element): Adjust to std::vector.
11036 (xinclude_start_include): Change paraeter type to std::vector
11038 * btrace.c (check_xml_btrace_version): Likewise.
11039 (parse_xml_btrace_block): Likewise.
11040 (parse_xml_btrace_pt_config_cpu): Likewise.
11041 (parse_xml_btrace_pt): Likewise.
11042 (parse_xml_btrace_conf_bts): Likewise.
11043 (parse_xml_btrace_conf_pt): Likewise.
11044 * memory-map.c (memory_map_start_memory): Likewise.
11045 (memory_map_start_property): Likewise.
11046 * osdata.c (osdata_start_osdata): Likewise.
11047 (osdata_start_item): Likewise.
11048 (osdata_start_column): Likewise.
11049 * remote.c (start_thread): Likewise.
11050 * solib-aix.c (library_list_start_library): Likewise.
11051 (library_list_start_list): Likewise.
11052 * solib-svr4.c (library_list_start_library): Likewise.
11053 (svr4_library_list_start_list): Likewise.
11054 * solib-target.c (library_list_start_segment): Likewise.
11055 (library_list_start_section): Likewise.
11056 (library_list_start_library): Likewise.
11057 (library_list_start_list): Likewise.
11058 * tracepoint.c (traceframe_info_start_memory): Likewise.
11059 (traceframe_info_start_tvar): Likewise.
11060 * xml-syscall.c (syscall_start_syscall): Likewise.
11061 * xml-tdesc.c (tdesc_start_target): Likewise.
11062 (tdesc_start_feature): Likewise.
11063 (tdesc_start_reg): Likewise.
11064 (tdesc_start_union): Likewise.
11065 (tdesc_start_struct): Likewise.
11066 (tdesc_start_flags): Likewise.
11067 (tdesc_start_enum): Likewise.
11068 (tdesc_start_field): Likewise.
11069 (tdesc_start_enum_value): Likewise.
11070 (tdesc_start_vector): Likewise.
11072 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11074 * extension.h (struct xmethod_worker) <clone>: Remove.
11075 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11077 (python_xmethod_worker::clone): Remove.
11078 * valops.c (find_overload_match): Use std::move instead of
11081 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11083 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11084 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11085 <free_xmethod_worker_data>: Remove.
11086 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11087 <get_xmethod_arg_types>: Remove.
11088 <get_xmethod_result_type>: Remove.
11089 <invoke_xmethod>: Remove.
11090 * extension.c (new_xmethod_worker): Remove.
11091 (clone_xmethod_worker): Remove.
11092 (get_matching_xmethod_workers): Return void, pass std::vector by
11094 (get_xmethod_arg_types): Rename to...
11095 (xmethod_worker::get_arg_types): ... this, and adjust.
11096 (get_xmethod_result_type): Rename to...
11097 (xmethod_worker::get_result_type): ... this, and adjust.
11098 (invoke_xmethod): Remove.
11099 (free_xmethod_worker): Remove.
11100 (free_xmethod_worker_vec): Remove.
11101 * extension.h (enum ext_lang_rc): Move here from
11103 (struct xmethod_worker): Add constructor and destructor.
11106 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11107 virtual pure methods.
11108 <get_arg_types, get_result_type>: New methods.
11109 (xmethod_worker_ptr): Remove typedef.
11110 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11111 (xmethod_worker_vec): Remove typedef.
11112 (xmethod_worker_up): New typedef.
11113 (invoke_xmethod): Remove.
11114 (clone_xmethod_worker): Remove.
11115 (free_xmethod_worker): Remove.
11116 (free_xmethod_worker_vec): Remove.
11117 (get_xmethod_arg_types): Remove.
11118 (get_xmethod_result_type): Remove.
11119 * valops.c (find_method_list): Use std::vector, don't use
11120 intermediate vector.
11121 (value_find_oload_method_list): Use std::vector.
11122 (find_overload_match): Use std::vector.
11123 (find_oload_champ): Use std::vector.
11124 * value.c (value_free): Use operator delete.
11125 (value_of_xmethod): Rename to...
11126 (value_from_xmethod): ... this. Don't assign
11127 xmethod_worker::value, take rvalue-reference.
11128 (result_type_of_xmethod): Adjust.
11129 (call_xmethod): Adjust.
11130 * value.h: Include extension.h.
11131 (struct xmethod_worker): Don't forward-declare.
11132 (value_of_xmethod): Rename to...
11133 (value_from_xmethod): ... this, take rvalue-reference.
11134 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11135 (struct python_xmethod_worker): ... this, add constructor and
11137 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11138 (gdbpy_free_xmethod_worker_data): Rename to...
11139 (python_xmethod_worker::~python_xmethod_worker): ... this and
11141 (gdbpy_clone_xmethod_worker_data): Rename to...
11142 (python_xmethod_worker::clone): ... this and adjust.
11143 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11145 (gdbpy_get_xmethod_arg_types): Rename to...
11146 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11147 (gdbpy_get_xmethod_result_type): Rename to...
11148 (python_xmethod_worker::do_get_result_type): ... this and
11150 (gdbpy_invoke_xmethod): Rename to...
11151 (python_xmethod_worker::invoke): ... this and adjust.
11152 (new_python_xmethod_worker): Rename to...
11153 (python_xmethod_worker::python_xmethod_worker): ... this and
11155 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11157 (gdbpy_free_xmethod_worker_data): Remove.
11158 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11159 (gdbpy_get_xmethod_arg_types): Remove.
11160 (gdbpy_get_xmethod_result_type): Remove.
11161 (gdbpy_invoke_xmethod): Remove.
11162 * python/python.c (python_extension_ops): Remove obsolete
11165 2018-01-05 Pedro Alves <palves@redhat.com>
11168 * common/signals-state-save-restore.c
11169 (save_original_signals_state): New parameter 'quiet'. Warn if we
11170 find a custom handler preinstalled, instead of internal erroring.
11171 But only warn if !quiet.
11172 * common/signals-state-save-restore.h
11173 (save_original_signals_state): New parameter 'quiet'.
11174 * main.c (captured_main_1): Move save_original_signals_state call
11175 after option handling, and pass QUIET.
11177 2018-01-05 Pedro Alves <palves@redhat.com>
11179 * spu-tdep.c (spu_catch_start): Pass
11180 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11182 2018-01-05 Pedro Alves <palves@redhat.com>
11185 * ada-lang.c (literal_symbol_name_matcher): New function.
11186 (ada_get_symbol_name_matcher): Use it for
11187 symbol_name_match_type::SEARCH_NAME.
11188 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11189 it down instead of assuming symbol_name_match_type::FULL.
11190 * block.h (block_lookup_symbol): New parameter 'match_type'.
11191 * c-valprint.c (print_unpacked_pointer): Use
11192 lookup_symbol_search_name instead of lookup_symbol.
11193 * compile/compile-object-load.c (get_out_value_type): Pass down
11194 symbol_name_match_type::SEARCH_NAME.
11195 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11196 symbol_name_match_type::FULL.
11197 * cp-support.c (cp_get_symbol_name_matcher): Handle
11198 symbol_name_match_type::SEARCH_NAME.
11199 * infrun.c (insert_exception_resume_breakpoint): Use
11200 lookup_symbol_search_name.
11201 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11202 * psymtab.c (maintenance_check_psymtabs): Use
11203 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11204 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11205 SYMBOL_SEARCH_NAME.
11206 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11207 if symbol_name_match_type::SEARCH_NAME.
11208 (lookup_symbol_in_language): Pass down
11209 symbol_name_match_type::FULL.
11210 (lookup_symbol_search_name): New.
11211 (lookup_language_this): Pass down
11212 symbol_name_match_type::SEARCH_NAME.
11213 (lookup_symbol_aux, lookup_local_symbol): New parameter
11214 'match_type'. Pass it down.
11215 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11216 (lookup_symbol_search_name): New declaration.
11217 (lookup_symbol_in_block): New 'match_type' parameter.
11219 2018-01-05 Pedro Alves <palves@redhat.com>
11222 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11224 (ada_lookup_symbol): Reimplement in terms of
11225 ada_lookup_symbol_list, bits factored out from
11226 ada_lookup_encoded_symbol.
11228 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11230 * ada-exp.y (write_object_renaming): When subscripting an array
11231 using a symbol as the index, pass the block in call to
11232 ada_lookup_encoded_symbol when looking that symbol up.
11234 2018-01-05 Jerome Guitton <guitton@adacore.com>
11236 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11239 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11241 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11242 the case where VALUE_LVAL (val0) is not lval_memory.
11244 2018-01-05 Xavier Roirand <roirand@adacore.com>
11246 * ada-valprint.c (print_optional_low_bound): Handle
11247 character-indexed array printing like boolean-indexed array
11250 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11252 * NEWS: Create a new section for the next release branch.
11253 Rename the section of the current branch, now that it has
11256 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11258 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11259 * version.in: Bump version to 8.1.50.DATE-git.
11261 2018-01-03 Xavier Roirand <roirand@adacore.com>
11263 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11265 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11267 (default_exception_support_info) <catch_handlers_sym>: Add field.
11268 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11269 (ada_exception_name_addr_1): Add "catch handlers" handling.
11270 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11271 Update all callers.
11272 (create_excep_cond_exprs) <ex>: Add parameter.
11273 (re_set_exception): Update create_excep_cond_exprs call.
11274 (print_it_exception, print_one_exception, print_mention_exception)
11275 (print_recreate_exception): Add "catch handler" handling.
11276 (allocate_location_catch_handlers, re_set_catch_handlers)
11277 (check_status_catch_handlers, print_it_catch_handlers)
11278 (print_one_catch_handlers, print_mention_catch_handlers)
11279 (print_recreate_catch_handlers): New function.
11280 (catch_handlers_breakpoint_ops): New variable.
11281 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11282 Add parameter. Add "catch handler" handling.
11283 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11284 Add "catch handler" handling.
11285 (ada_exception_catchpoint_cond_string): Add "catch handler"
11287 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11289 (catch_ada_handlers_command): New function.
11290 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11291 operations structure.
11292 (_initialize_ada_language): Add "catch handlers" command entry.
11293 * NEWS: Document "catch handlers" feature.
11295 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11297 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11298 account when creating the array type of the slice.
11299 (ada_value_slice): Likewise.
11301 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11303 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11305 (create_array_type_with_stride): Add byte_stride_prop parameter.
11306 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11307 New parameter. Update all callers in this file.
11308 (array_type_has_dynamic_stride): New function.
11309 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11310 of arrays with dynamic byte strides.
11311 * dwarf2read.c (read_array_type): Add support for dynamic
11312 DW_AT_byte_stride attributes.
11314 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11316 * dwarf2read.c (read_unspecified_type): Treat
11317 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11319 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11321 Update copyright year range in all GDB files.
11323 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11325 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11326 and gdb/testsuite/gdb.base/step-line.c.
11328 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11330 * copyright.py (main): Dump the contents of
11331 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11332 even if BY_HAND is empty.
11334 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11336 * top.c (print_gdb_version): Update Copyright year in version
11339 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11341 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11343 For older changes see ChangeLog-2017.
11349 version-control: never