1 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
3 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
4 * dwarf-index-cache.c (create_dir_and_check): Likewise.
5 (test_mkdir_recursive): Likewise.
6 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
8 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
10 * valarith.c (value_subscripted_rvalue): If an array is not in
11 memory, and we don't know the upper bound, then we can't know that
12 the requested element exists or not.
14 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
16 * target.c (str_comma_list_concat_elem): Fix typo in comment.
17 (target_options_to_string): Add comment.
19 2018-08-08 Tom Tromey <tom@tromey.com>
21 * unittests/scoped_mmap-selftests.c: Check result of "write".
23 2018-08-08 Jim Wilson <jimw@sifive.com>
25 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
26 (decode_register_index_short): New.
27 (decode_j_type_insn, decode_cj_type_insn): New.
28 (decode_b_type_insn, decode_cb_type_insn): New.
29 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
30 local xlen. Check xlen when decoding ambiguous compressed insns. In
31 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
32 is_c_sw_insn instead of is_sw_insn.
33 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
34 (riscv_software_single_step): New.
35 * riscv-tdep.h (riscv_software_single_step): Declare.
37 * riscv-tdep.c (riscv_isa_xlen): Drop static.
38 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
40 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
43 * target.c (dispose_inferior): Don't dispose of inferiors that are
46 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
48 * remote.c (remote_target::download_tracepoint): Change char* to
51 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
53 * target.h (target_options_to_string): Return an std::string.
54 * target.c (str_comma_list_concat_elem): Return void, use
56 (do_option): Likewise.
57 (target_options_to_string): Return an std::string.
58 * linux-nat.c (linux_nat_target::wait): Adjust.
59 * target-debug.h (target_debug_print_options): Adjust.
61 2018-08-07 Tom Tromey <tom@tromey.com>
63 * Makefile.in (CPPFLAGS): New variable.
64 (INTERNAL_CPPFLAGS): Use it.
66 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
68 * NEWS: Mention the index cache.
70 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
72 * common/pathstuff.h (get_standard_cache_dir): New.
73 * common/pathstuff.c (get_standard_cache_dir): New.
74 * build-id.h (build_id_to_string): New.
75 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
76 DEBUG_STR_SUFFIX): Move to here.
77 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
78 DEBUG_STR_SUFFIX): Move from there.
79 (write_psymtabs_to_index): Make non-static, add basename
80 parameter. Write to temporary files, rename when done.
81 (save_gdb_index_command): Adjust call to
82 write_psymtabs_to_index.
83 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
85 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
86 (get_gdb_index_contents_from_cache): New.
87 (get_gdb_index_contents_from_cache_dwz): New.
88 (dwarf2_initialize_objfile): Read index from cache.
89 (dwarf2_build_psymtabs): Save to index.
90 * dwarf-index-cache.h: New file.
91 * dwarf-index-cache.c: New file.
92 * dwarf-index-write.h: New file.
94 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
96 * gnulib/aclocal.m4: Re-generate.
97 * gnulib/config.in: Re-generate.
98 * gnulib/configure: Re-generate.
99 * gnulib/import/Makefile.am: Re-generate.
100 * gnulib/import/Makefile.in: Re-generate.
101 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
102 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
103 * gnulib/import/m4/mkdir.m4: New file.
104 * gnulib/import/mkdir.c: New file.
105 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
108 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
110 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
111 * common/scoped_mmap.c: New file.
112 * common/scoped_mmap.h (destroy): New method.
113 (~scoped_mmap, reset): Use destroy.
114 (scoped_mmap): New move constructor.
115 (mmap_file): New declaration.
116 * unittests/scoped_mmap-selftests.c (test_normal,
117 test_invalid_filename, run_tests): New functions.
118 (_initialize_scoped_mmap_selftests): Register selftest.
120 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
122 * dwarf2read.c (read_gdb_index_from_section): Rename to...
123 (read_gdb_index_from_buffer): ... this. Remove section
124 parameter, add buffer parameter.
125 (get_gdb_index_contents_ftype,
126 get_gdb_index_contents_dwz_ftype): New typedefs.
127 (dwarf2_read_gdb_index): Add callback parameters to get the
129 (get_gdb_index_contents_from_section): New.
130 (dwarf2_initialize_objfile): Update call to
131 dwarf2_read_gdb_index.
133 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
135 * common/filestuff.h (gdb_fopen_cloexec): New overload.
136 (gdb_open_cloexec): Likewise.
137 * nat/linux-osdata.c (command_from_pid): Use string_printf.
138 (commandline_from_pid): Likewise.
139 (linux_xfer_osdata_threads): Likewise.
140 (linux_xfer_osdata_fds): Likewise.
141 * ada-lang.c (is_package_name): Likewise.
142 * auxv.c (procfs_xfer_auxv): Likewise.
143 * breakpoint.c (print_one_breakpoint_location): Use
145 (print_one_catch_solib): Use string_printf.
146 * coff-pe-read.c (add_pe_exported_sym): Likewise.
147 (add_pe_forwarded_sym): Likewise.
148 * dwarf2read.c (create_type_unit_group): Likewise.
149 (build_error_marker_type): Likewise.
150 * infcall.c (get_function_name): Likewise.
151 * valprint.c (print_converted_chars_to_obstack): Likewise.
152 * xtensa-tdep.c (xtensa_register_type): Likewise.
154 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
156 * remote.c (remote_target::download_tracepoint): Fix format
159 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
161 * tracefile.c: Include common/byte-vector.h.
162 (trace_save): Change type of buf to gdb::byte_vector. Initialize
163 with trace_regblock_size if needed. Update uses of buf.
165 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
167 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
168 std::vector<unsigned char>.
169 * tracepoint.c (collection_list::collection_list): Remove
170 m_regs_mask initializer from initializer list. Resize
171 m_regs_mask using the largest remote register number.
172 (collection_list::add_remote_register): Remove size check on
173 m_regs_mask. Use at to access element.
174 (collection_list::stringify): Change type of temp_buf to
175 gdb::char_vector. Update uses of temp_buf. Resize if needed to
176 stringify the register mask. Use pack_hex_byte for the register
179 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
181 * tracepoint.h (class collection_list) <add_register>: Remove.
182 <add_remote_register, add_ax_registers, add_local_register>:
184 <add_memrange>: Add scope parameter.
185 * tracepoint.c (encode_actions_1): Likewise.
186 (collection_list::add_register): Rename to ...
187 (collection_list::add_remote_register): ... this. Update
189 (collection_list::add_ax_registers, add_local_register): New
191 (collection_list::add_memrange): Add scope parameter. Call
192 add_local_register instead of add_register.
193 (finalize_tracepoint_aexpr): New function.
194 (collection_list::collect_symbol): Update calls to add_memrange.
195 Call add_local_register instead of add_register. Call
196 add_ax_registers. Call finalize_tracepoint_aexpr.
197 (encode_actions_1): Get remote regnos for $reg action. Call
198 add_remote_register, add_ax_registers, and add_local_register.
199 Update call to add_memrange. Call finalize_tracepoint_aexpr.
200 (validate_actionline): Call finalize_tracepoint_aexpr.
202 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
204 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
205 Replace array buf with gdb::char_vector buf, of size
206 get_remote_packet_size (). Replace references to buf and
207 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
208 and xsnprintf with snprintf. Raise errors if the buffer is too
211 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
213 * remote.c (remote_target::download_tracepoint): Fix the has_more
214 predicate in the QTDP action list iteration.
216 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
218 * remote.c (remote_target::download_tracepoint): Fix indentation
221 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
223 * proc-api.c (_initialize_proc_api): Remove c, unused.
224 * procfs.c (procfs_init_inferior): Remove signals, unused.
225 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
228 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
229 Andrew Burgess <andrew.burgess@embecosm.com>
231 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
232 'W_STOPCODE (0)' as this could be ambiguous.
234 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
236 * ser-tcp.c (net_open): Fix thinko when deciding whether to
237 disable TCP's Nagle algorithm (use "ai_protocol" instead of
240 2018-08-02 Tom Tromey <tom@tromey.com>
243 * dwarf2read.c (read_func_scope): Set symtab on template parameter
245 (process_structure_scope): Likewise.
247 2018-08-02 Xavier Roirand <roirand@adacore.com>
250 * darwin-nat.c (darwin_kill_inferior): Fix handling of
253 2018-08-02 Tom Tromey <tom@tromey.com>
255 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
256 (darwin_suspend_inferior, darwin_resume_inferior)
257 (darwin_decode_notify_message, darwin_resume_inferior_threads)
258 (darwin_check_new_threads): Check result of get_darwin_inferior.
260 2018-07-31 Joel Brobecker <brobecker@adacore.com>
264 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
266 * varobj.c (varobj_get_path_expr_parent): Report an error if
267 parent is a dynamic varobj.
269 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
271 * gnulib/aclocal.m4: Re-generate.
272 * gnulib/config.in: Re-generate.
273 * gnulib/configure: Re-generate.
274 * gnulib/import/Makefile.in: Re-generate.
275 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
276 * gnulib/import/m4/onceonly.m4: Re-generate.
278 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
280 * target-descriptions.c (struct xml_test_tdesc): New.
281 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
282 (record_xml_tdesc): Update.
283 (maintenance_check_xml_descriptions): Update.
284 * target-descriptions.h (record_xml_tdesc): Update comment.
286 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
288 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
289 checking array bounds are defined.
291 2018-07-30 Tom Tromey <tom@tromey.com>
293 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
294 irreflexivity violation.
296 2018-07-30 Tom Tromey <tom@tromey.com>
298 * cli/cli-decode.c (lookup_cmd): Remove lint code.
299 * value.c (unpack_long): Remove lint code.
300 * valops.c (value_ind): Remove lint code.
301 * valarith.c (value_x_binop, value_x_unop, value_equal)
302 (value_pos): Remove lint code.
304 2018-07-28 Tom de Vries <tdevries@suse.de>
306 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
307 with undefined upper bound as <optimized out>.
309 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
311 * gcore.in: Rename variable "name" to "prefix". Expand
314 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
316 * windows-nat.c (windows_nat_target::create_inferior): Update to
317 call close() in global namespace.
319 2018-07-26 Tom Tromey <tom@tromey.com>
321 * dwarf-index-write.c (add_address_entry): Don't add objfile
323 * dbxread.c (find_stab_function): Rename from
324 find_stab_function_addr. Return a bound_minimal_symbol.
325 (read_dbx_symtab): Use raw_text_low, raw_text_high.
326 Don't add objfile offsets.
327 (end_psymtab): Use raw_text_low, raw_text_high,
328 MSYMBOL_VALUE_RAW_ADDRESS.
329 (read_ofile_symtab): Update.
330 (process_one_symbol): Update.
331 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
333 (dw2_relocate): Remove.
334 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
336 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
338 (process_psymtab_comp_unit_reader, add_partial_symbol)
339 (add_partial_subprogram, dwarf2_ranges_read): Update.
340 (load_partial_dies): Update.
341 (add_address_entry): Don't add objfile offsets.
342 (dwarf2_build_include_psymtabs): Update.
343 (create_addrmap_from_aranges): Don't add objfile offsets.
344 (dw2_find_pc_sect_compunit_symtab): Update.
345 * mdebugread.c (parse_symbol): Don't add objfile offsets.
346 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
348 (parse_partial_symbols): Don't add objfile offsets. Use
349 raw_text_low, raw_text_high. Update.
350 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
351 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
352 or call 'relocate' quick function. Clear psymbol_map.
353 * psympriv.h (struct partial_symbol) <address>: Add section
355 <set_unrelocated_address>: Rename from set_address.
356 <raw_text_low, raw_text_high>: New methods.
357 <text_low, text_high>: Add objfile parameter.
358 (add_psymbol_to_bcache): Add 'section' parameter. Call
359 set_unrelocated_address.
360 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
361 (find_pc_psymbol): Update.
362 (fixup_psymbol_section, relocate_psymtabs): Remove.
363 (dump_psymtab, psym_functions): Update.
364 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
366 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
367 (start_psymtab_common): Update.
368 * symfile-debug.c (debug_qf_relocate): Remove.
369 (debug_sym_quick_functions): Update.
370 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
371 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
374 2018-07-26 Tom Tromey <tromey@redhat.com>
376 * dbxread.c (end_psymtab): Use text_high_valid and
378 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
379 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
380 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
382 <text_low_valid, text_high_valid>: New fields.
383 <set_text_low, set_text_high>: Update.
384 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
386 2018-07-26 Tom Tromey <tom@tromey.com>
388 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
390 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
391 textlow and texthigh fields.
392 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
394 * mdebugread.c (parse_lines, parse_partial_symbols)
395 (psymtab_to_symtab_1): Update.
396 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
397 Rename fields. Update comment. Now private.
398 <text_low, text_high, set_text_low, set_text_high>: New methods.
399 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
400 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
401 (start_psymtab_common, maintenance_info_psymtabs)
402 (maintenance_check_psymtabs): Update.
403 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
405 (scan_xcoff_symtab): Update.
407 2018-07-26 Tom Tromey <tromey@redhat.com>
409 * psympriv.h (struct partial_symbol) <unrelocated_address,
410 address, set_address>: New methods.
411 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
412 (fixup_psymbol_section, relocate_psymtabs): Update.
413 (print_partial_symbols): Add 'objfile' parameter. Update.
414 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
417 2018-07-26 Tom Tromey <tom@tromey.com>
419 * dwarf-index-write.c (write_psymbols, debug_names::insert)
420 (debug_names::write_psymbols): Update.
421 * psympriv.h (struct partial_symbol): Derive from
423 <obj_section>: New method.
424 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
425 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
426 (find_pc_sect_psymbol, fixup_psymbol_section)
427 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
428 (print_partial_symbols, recursively_search_psymtabs)
429 (compare_psymbols, psymbol_hash, psymbol_compare)
430 (add_psymbol_to_bcache, maintenance_check_psymtabs)
431 (psymbol_name_matches, psym_fill_psymbol_map): Update.
433 2018-07-26 Tom Tromey <tromey@redhat.com>
435 * dbxread.c (end_psymtab): Remove dead code.
437 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
439 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
440 DWARF unwinders are disabled.
441 * dwarf2-frame.c: Add dwarf2read.h include.
442 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
444 (dwarf2_frame_unwinders_enabled_p): Define.
445 (show_dwarf_unwinders_enabled_p): New function.
446 (_initialize_dwarf2_frame): Register switch to control DWARF
448 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
449 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
450 (show_dwarf_cmdlist): Remove static keyword.
451 * dwarf2read.h (set_dwarf_cmdlist): Declare.
452 (show_dwarf_cmdlist): Declare.
453 * NEWS: Document new feature.
455 2018-07-26 Tom de Vries <tdevries@suse.de>
458 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
460 2018-07-26 Tom de Vries <tdevries@suse.de>
462 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
463 DW_AT_count can't be translated to a dynamic prop.
465 2018-07-25 Tom de Vries <tdevries@suse.de>
467 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
470 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
472 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
474 2018-07-25 Joel Brobecker <brobecker@adacore.com>
476 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
478 2018-07-24 Keith Seitz <keiths@redhat.comt
481 * dwarf2read.c (dw2_add_symbol_to_list): New function.
482 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
483 instead of add_symbol_to_list.
484 (read_file_scope): Call prepare_one_comp_unit before reading
487 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
489 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
491 2018-07-24 Tom Tromey <tom@tromey.com>
493 * utils.c (malloc, realloc, free): Don't declare.
494 * configure, config.in: Rebuild.
495 * configure.ac: Don't check for declarations of free, malloc, or
498 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
500 * aarch64-linux-nat.c
501 (aarch64_linux_nat_target::stopped_data_address): Remove unused
503 * arm-linux-nat.c (fetch_regs): Likewise.
504 (store_regs): Likewise.
505 (fetch_vfp_regs): Likewise.
506 (store_vfp_regs): Likewise.
507 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
508 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
509 (arm_linux_nat_target::insert_watchpoint): Likewise.
510 (arm_linux_nat_target::remove_watchpoint): Likewise.
511 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
513 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
515 * ppc-linux-nat.c (fetch_register): Likewise.
516 (fetch_all_gp_regs): Likewise.
517 (fetch_ppc_registers): Likewise.
518 (store_all_gp_regs): Likewise.
519 (store_ppc_registers): Likewise.
520 (hwdebug_insert_point): Likewise.
521 (can_use_watchpoint_cond_accel): Likewise.
522 * remote-sim.c (gdb_os_write_stdout): Likewise.
524 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
525 Tom Tromey <tom@tromey.com>
527 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
529 * configure: Rebuild.
531 2018-07-22 Tom Tromey <tom@tromey.com>
533 * regformats/regdat.sh: Define xmltarget_${name} inside
534 #ifndef IN_PROCESS_AGENT.
536 2018-07-22 Tom Tromey <tom@tromey.com>
538 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
540 2018-07-22 Tom Tromey <tom@tromey.com>
542 * symfile.c (reread_symbols): Notify iter, not objfile.
544 2018-07-22 Tom Tromey <tom@tromey.com>
546 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
548 (ravenscar_thread_target::prepare_to_store): Likewise.
550 2018-07-22 Tom Tromey <tom@tromey.com>
552 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
553 unused variable. Call value_fetch_lazy when needed.
554 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
555 Remove unused variable. Call value_fetch_lazy when needed.
557 2018-07-22 Tom Tromey <tom@tromey.com>
559 * m32c-tdep.c (mark_dma): Return void.
560 (make_regs): Remove unused declarations.
562 2018-07-22 Tom Tromey <tom@tromey.com>
564 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
565 cmdscm_get_valid_command_smob_arg_unsafe for effect.
566 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
567 bkscm_get_valid_block_smob_arg_unsafe for effect.
569 2018-07-22 Tom Tromey <tom@tromey.com>
571 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
574 2018-07-22 Tom Tromey <tom@tromey.com>
576 * windows-nat.c (saved_context): Conditionally define.
577 * remote.c (remote_target::remote_btrace_maybe_reopen):
578 Conditionally declare "warned".
579 * inflow.c (sigquit_ours): Conditionally define.
580 (new_tty): Move "tty" declaration inside #if.
581 * guile/guile.c (guile_datadir): Conditionally define.
582 * charset.c (set_be_le_names): Move some declarations inside #if.
583 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
585 (parse_xml_btrace_conf): Likewise.
587 2018-07-22 Tom Tromey <tom@tromey.com>
589 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
591 2018-07-22 Tom Tromey <tom@tromey.com>
593 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
594 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
595 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
596 * buildsym-legacy.c (get_macro_table): Remove unused variable.
597 * stack.c (frame_apply_level_command): Remove unused variable.
598 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
599 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
600 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
602 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
603 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
604 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
606 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
607 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
609 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
610 Remove unused variable.
611 * cli/cli-script.c (recurse_read_control_structure): Remove unused
613 * common/tdesc.c (print_xml_feature::visit): Remove unused
615 * compile/compile-object-load.c (store_regs): Remove unused
617 * complaints.c (clear_complaints): Remove unused variable.
618 * corelow.c (core_target_open): Remove unused variable.
619 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
621 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
623 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
625 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
627 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
629 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
631 * ia64-tdep.c (examine_prologue): Remove unused variable.
632 * infcall.c (run_inferior_call): Remove unused variable.
633 * inferior.c (exit_inferior): Remove unused variable.
634 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
635 * linespec.c (decode_line_2): Remove unused variable.
636 * linux-nat.c (super_close): Remove.
637 * linux-tdep.c (linux_info_proc): Remove unused variable.
638 * mi/mi-main.c (mi_execute_command): Remove unused variable.
639 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
640 Remove unused variable.
641 * parse.c (find_minsym_type_and_address): Remove unused variable.
642 * printcmd.c (info_symbol_command, printf_floating): Remove unused
644 * python/py-breakpoint.c (bppy_set_commands): Remove unused
646 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
648 * record-btrace.c (record_btrace_target::store_registers): Remove
650 (cmd_show_record_btrace_cpu): Remove unused variable.
651 * riscv-tdep.c (riscv_register_reggroup_p)
652 (riscv_push_dummy_call, riscv_return_value): Remove unused
654 * rust-exp.y (literal): Remove unused variable.
655 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
657 <STRUCTOP_ANONYMOUS>: Likewise.
658 * s390-linux-tdep.c (s390_linux_init_abi_31)
659 (s390_linux_init_abi_64): Remove unused variable.
660 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
661 (file_select_thread, net_windows_open, _initialize_ser_windows):
662 Remove unused variables.
663 * symtab.c (find_pc_sect_line): Remove unused variable.
664 * target-memory.c (compute_garbled_blocks): Remove unused
666 (target_write_memory_blocks): Remove unused variable.
667 * target.c (target_stack::unpush): Remove unused variables.
668 * tracepoint.c (start_tracing, all_tracepoint_actions)
669 (merge_uploaded_trace_state_variables)
670 (print_one_static_tracepoint_marker): Remove unused variable.
671 * unittests/basic_string_view/element_access/char/1.cc (test01):
672 Remove unused variable.
673 * windows-nat.c (windows_continue, windows_add_all_dlls)
674 (do_initial_windows_stuff, windows_nat_target::create_inferior):
675 Remove unused variables.
677 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
679 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
680 attr_profile in HAVE_ELF.
681 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
684 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
686 * frame.c (frame_register_unwind): Change parameter name.
687 (frame_unwind_register): Likewise.
688 (frame_unwind_register_value): Likewise.
689 (frame_unwind_register_signed): Likewise.
690 (frame_unwind_register_unsigned): Likewise.
691 * frame.h (frame_register_unwind): Likewise.
692 (frame_unwind_register): Likewise.
693 (frame_unwind_register_value): Likewise.
694 (frame_unwind_register_signed): Likewise.
695 (frame_unwind_register_unsigned): Likewise.
696 (frame_unwind_arch): Likewise.
698 2018-07-20 Maciej W. Rozycki <macro@mips.com>
700 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
703 2018-07-20 Maciej W. Rozycki <macro@mips.com>
705 * mips-linux-nat.c (mips_linux_nat_target::read_description):
706 Call `get_ptrace_pid' rather than extracting the ptrace PID by
709 2018-07-20 Keith Seitz <keiths@redhat.com>
711 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
712 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
713 m_compunit_symtab, m_language>: Add "m_" prefix.
715 * buildsym.c: Update all uses.
717 2018-07-20 Tom Tromey <tom@tromey.com>
719 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
720 * buildsym.h (record_line_ftype): Remove typedef.
722 2018-07-20 Tom Tromey <tom@tromey.com>
724 * buildsym-legacy.h (augment_type_symtab): Don't declare.
725 (end_expandable_symtab): Likewise.
726 (end_symtab_get_static_block): Likewise.
727 (end_symtab_from_static_block): Likewise.
728 * buildsym-legacy.c (augment_type_symtab): Remove.
729 (end_expandable_symtab): Remove.
730 (end_symtab_get_static_block): Remove.
731 (end_symtab_from_static_block): Remove.
733 2018-07-20 Tom Tromey <tom@tromey.com>
735 * dwarf2read.c: Include buildsym.h.
736 (struct dwarf2_cu) <builder>: New method.
737 (fixup_go_packaging): Update.
738 (process_full_comp_unit, process_full_type_unit): Update. Don't
739 use scoped_free_pendings.
740 (using_directives): Add "cu" parameter, remove "language".
741 (read_import_statement, setup_type_unit_groups, )
742 (read_func_scope, read_lexical_block_scope)
743 (dwarf2_record_block_ranges, read_namespace): Update.
744 (lnp_state_machine::lnp_state_machine): Add cu parameter.
745 (lnp_state_machine::handle_end_sequence): Update.
746 (class lnp_state_machine) <m_cu>: New member.
747 <m_record_line_callback>: Remove.
748 <m_currently_recording_lines>: New member.
749 (lnp_state_machine::handle_set_file): Update.
750 (noop_record_line): Remove.
751 (dwarf_record_line_p): Add cu parameter.
752 (dwarf_record_line_1, dwarf_finish_line): Likewise.
753 (lnp_state_machine::record_line)
754 (lnp_state_machine::lnp_state_machine)
755 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
756 (dwarf_decode_lines): Update.
757 (dwarf2_start_subfile): Add cu parameter.
758 (dwarf2_start_symtab, new_symbol): Update.
759 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
760 Remove dwarf2_per_objfile parameter.
761 (dwarf_decode_macros): Update.
763 2018-07-20 Tom Tromey <tom@tromey.com>
765 * stabsread.c (define_symbol): Update.
766 * buildsym-legacy.h (get_buildsym_compunit): Declare.
767 * dwarf2read.c (new_symbol): Update.
768 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
769 * cp-namespace.c: Include buildsym.h.
770 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
771 * buildsym-legacy.c (get_buildsym_compunit): New function.
773 2018-07-20 Tom Tromey <tom@tromey.com>
775 * xcoffread.c: Include buildsym-legacy.h.
776 * windows-nat.c: Include buildsym-legacy.h.
777 * stabsread.c: Include buildsym-legacy.h.
778 * mdebugread.c: Include buildsym-legacy.h.
779 * buildsym-legacy.h: New file.
780 * buildsym-legacy.c: New file, from buildsym.c.
781 * go32-nat.c: Include buildsym-legacy.h.
782 * dwarf2read.c: Include buildsym-legacy.h.
783 * dbxread.c: Include buildsym-legacy.h.
784 * cp-namespace.c: Include buildsym-legacy.h.
785 * coffread.c: Include buildsym-legacy.h.
786 * buildsym.h: Move some contents to buildsym-legacy.h.
787 * buildsym.c: Include buildsym-legacy.h. Move many functions to
789 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
791 2018-07-20 Tom Tromey <tom@tromey.com>
793 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
794 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
795 (buildsym_compunit::buildsym_compunit)
796 (buildsym_compunit::~buildsym_compunit)
797 (buildsym_compunit::get_macro_table): Define.
799 2018-07-20 Tom Tromey <tom@tromey.com>
801 * buildsym.c (reset_symtab_globals): Remove.
802 (buildsym_compunit::end_symtab_from_static_block): Update.
803 (buildsym_compunit::augment_type_symtab): Update.
804 (end_symtab_from_static_block): Call free_buildsym_compunit.
805 (augment_type_symtab, end_symtab, end_expandable_symtab):
808 2018-07-20 Tom Tromey <tom@tromey.com>
810 * arch-utils.c: Do not include buildsym.h.
811 * mipsread.c: Do not include buildsym.h.
812 * machoread.c: Do not include buildsym.h.
813 * elfread.c: Do not include buildsym.h.
815 2018-07-20 Tom Tromey <tom@tromey.com>
817 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
819 (buildsym_compunit): Add new constructor.
820 (struct buildsym_compunit) <get_last_source_file, finish_block,
821 record_block_range, start_subfile, patch_subfile_names,
822 push_subfile, pop_subfile, record_line, get_compunit_symtab,
823 set_last_source_start_addr, get_last_source_start_addr,
824 get_local_using_directives, set_local_using_directives,
825 get_global_using_directives, outermost_context_p,
826 get_current_context_stack, get_context_stack_depth,
827 get_current_subfile, get_local_symbols, get_file_symbols,
828 get_global_symbols, record_debugformat, record_producer,
829 push_context, pop_context, end_symtab_get_static_block,
830 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
832 <record_pending_block, finish_block_internal, make_blockvector,
833 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
837 2018-05-22 Tom Tromey <tom@tromey.com>
839 * buildsym.c (record_pending_block): Move earlier. Remove objfile
841 (finish_block_internal): Update.
843 2018-07-20 Tom Tromey <tom@tromey.com>
845 * buildsym.c (record_pending_block): Move earlier. Remove objfile
847 (finish_block_internal): Update.
849 2018-07-20 Tom Tromey <tom@tromey.com>
851 * buildsym.h (EXTERN): Don't define or undef.
852 * buildsym.c (EXTERN): Don't define.
854 2018-07-20 Tom Tromey <tom@tromey.com>
856 * buildsym.c: Remove TODO comment.
858 2018-07-20 Tom Tromey <tom@tromey.com>
860 * coffread.c (coff_symtab_read): Update.
861 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
862 (xcoff_new_init): Update.
863 * mipsread.c (mipscoff_new_init): Update.
864 * mdebugread.c (mdebug_build_psymtabs): Update.
865 * elfread.c (elf_new_init): Update.
866 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
868 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
869 (coffstab_build_psymtabs, elfstab_build_psymtabs)
870 (stabsect_build_psymtabs): Update.
871 * buildsym.h (buildsym_init): Don't declare.
872 * buildsym.c: Update comment.
873 (prepare_for_building): Remove.
874 (start_symtab, restart_symtab): Update.
875 (reset_symtab_globals): Update comment.
876 (buildsym_init): Remove.
878 2018-07-20 Tom Tromey <tom@tromey.com>
880 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
881 * stabsread.c (patch_block_stabs, define_symbol, read_type)
882 (read_enum_type, common_block_start, common_block_end)
883 (cleanup_undefined_types_1, finish_global_stabs): Update.
884 * mdebugread.c (psymtab_to_symtab_1): Update.
885 * dwarf2read.c (fixup_go_packaging, read_func_scope)
886 (read_lexical_block_scope, new_symbol): Update.
887 * dbxread.c (process_one_symbol): Update.
888 * coffread.c (coff_symtab_read, process_coff_symbol)
889 (coff_read_enum_type): Update.
890 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
892 (get_local_symbols, get_file_symbols, get_global_symbols): New
894 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
896 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
897 (~scoped_free_pendings): Update.
898 (finish_block, prepare_for_building, reset_symtab_globals)
899 (end_symtab_get_static_block, end_symtab_with_blockvector)
900 (augment_type_symtab, push_context): Update.
901 (get_local_symbols, get_file_symbols, get_global_symbols): New
903 (buildsym_init): Update.
905 2018-07-20 Tom Tromey <tom@tromey.com>
907 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
908 (process_full_type_unit): Likewise.
909 (dwarf2_start_symtab): Set list_in_scope.
911 2018-07-20 Tom Tromey <tom@tromey.com>
913 * dwarf2read.c (process_psymtab_comp_unit_reader)
914 (build_type_psymtabs_reader): Do not set list_in_scope.
916 2018-07-20 Tom Tromey <tom@tromey.com>
918 * buildsym.c (free_pendings): Remove.
919 (add_symbol_to_list, scoped_free_pendings)
920 (finish_block_internal, buildsym_init): Update.
922 2018-07-20 Tom Tromey <tom@tromey.com>
924 * xcoffread.c (read_xcoff_symtab): Update.
925 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
927 * dbxread.c (process_one_symbol): Update.
928 * coffread.c (coff_symtab_read): Update.
929 * buildsym.h (finish_block): Update.
930 * buildsym.c (finish_block): Remove "listhead" argument.
931 (end_symtab_get_static_block): Update.
933 2018-07-20 Tom Tromey <tom@tromey.com>
935 * buildsym.h (class scoped_free_pendings): Remove constructor.
936 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
938 <m_pending_block_obstack, m_pending_blocks>: New members.
939 (pending_block_obstack, pending_blocks): Remove.
940 (scoped_free_pendings::scoped_free_pendings): Default.
941 (~scoped_free_pendings): Update.
942 (free_pending_blocks): Remove.
943 (finish_block_internal, record_pending_block, make_blockvector)
944 (end_symtab_get_static_block, augment_type_symtab, push_context)
945 (buildsym_init): Update.
947 2018-07-20 Tom Tromey <tom@tromey.com>
949 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
950 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
952 (pending_addrmap, pending_addrmap_obstack)
953 (pending_addrmap_interesting): Remove.
954 (scoped_free_pendings, record_block_range, make_blockvector)
955 (prepare_for_building, reset_symtab_globals, buildsym_init):
958 2018-07-20 Tom Tromey <tom@tromey.com>
960 * xcoffread.c (process_linenos): Update.
961 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
962 * mdebugread.c (psymtab_to_symtab_1): Update.
963 * dwarf2read.c (setup_type_unit_groups)
964 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
965 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
966 * dbxread.c (process_one_symbol): Update.
967 * coffread.c (coff_symtab_read, enter_linenos)
968 (process_coff_symbol): Update.
969 * buildsym.h (current_subfile): Don't declare.
970 (get_current_subfile): Declare.
971 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
973 (start_subfile, free_buildsym_compunit, push_subfile)
974 (prepare_for_building, start_symtab): Update.
975 (get_current_subfile): New function.
977 2018-07-20 Tom Tromey <tom@tromey.com>
979 * coffread.c (coff_symtab_read): Update.
980 * xcoffread.c (read_xcoff_symtab): Update.
981 * dwarf2read.c (new_symbol): Update.
982 (read_func_scope, read_lexical_block_scope): Update.
983 * dbxread.c (process_one_symbol): Update.
984 * buildsym.h (context_stack, context_stack_depth): Don't declare.
985 (outermost_context_p): Remove macro.
986 (outermost_context_p, get_current_context_stack)
987 (get_context_stack_depth): Declare.
988 (pop_context): Return struct context_stack.
989 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
991 (context_stack_size): Remove.
992 (INITIAL_CONTEXT_STACK_SIZE): Remove.
993 (prepare_for_building, end_symtab_get_static_block)
994 (augment_type_symtab, push_context): Update.
995 (pop_context): Return struct context_stack.
996 (outermost_context_p, get_current_context_stack)
997 (get_context_stack_depth): New functions.
998 (buildsym_init): Update.
1000 2018-07-20 Tom Tromey <tom@tromey.com>
1002 * rust-exp.y: Now a pure parser. Update all rules.
1003 (%union): Move earlier.
1004 (current_parser, work_obstack): Remove globals.
1005 (rust_parser, ~rust_parser): Update.
1006 (class rust_parser) <copy_name, concat3, crate_name, super_name,
1007 lex_character, lex_number, lex_string, lex_identifier,
1008 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1009 convert_name, convert_params_to_expression,
1010 convert_ast_to_expression, ast_basic_type, ast_operation,
1011 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1012 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1013 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1014 ast_array_type, ast_slice_type, ast_reference_type,
1015 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1016 (rust_parse): Update.
1017 (rustyyerror, rustyylex): Add parser parameter.
1018 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1019 (rust_lex_stringish_test, rust_lex_test_sequence)
1020 (rust_lex_test_trailing_dot, rust_lex_test_completion)
1021 (rust_lex_test_push_back, rust_lex_tests): Update.
1023 2018-07-19 Pedro Alves <palves@redhat.com>
1025 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1026 gdb::unique_xmalloc_ptr.
1027 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1028 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1029 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1030 copy-initialization.
1031 * guile/scm-pretty-print.c (ppscm_print_children): Use
1032 gdb::unique_xmalloc_ptr instead of cleanups.
1033 (gdbscm_apply_val_pretty_printer): Remove cleanups.
1034 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1035 gdb::unique_xmalloc_ptr.
1036 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1037 Adjust to use gdb::unique_xmalloc_ptr.
1038 * guile/scm-utils.c (extract_arg): Adjust.
1039 * guile/scm-value.c (gdbscm_value_field): Adjust to use
1040 gdb::unique_xmalloc_ptr instead of a cleanup.
1042 2018-07-19 Tom Tromey <tom@tromey.com>
1044 * utils.c (do_value_free_to_mark)
1045 (make_cleanup_value_free_to_mark): Remove.
1046 * utils.h (make_cleanup_value_free_to_mark): Remove.
1048 2018-07-19 Pedro Alves <palves@redhat.com>
1050 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1051 forwarding reference.
1053 2018-07-18 Pedro Alves <palves@redhat.com>
1055 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1056 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
1059 2018-07-18 Pedro Alves <palves@redhat.com>
1061 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1063 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1065 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1066 directly instead of a cleanup.
1067 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1068 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
1069 (vlscm_binop_gdbthrow): New, factored out from ...
1070 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
1071 (vlscm_rich_compare): Use gdbscm_wrap.
1072 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1073 instead of a cleanup.
1074 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1076 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1077 Use xfree directly instead of a cleanup.
1078 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1079 Adjust to use gdbscm_wrap and scoped_value_mark.
1080 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1081 (gdbscm_value_address, gdbscm_value_dereference)
1082 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1084 (gdbscm_value_dynamic_type): Use scoped_value_mark.
1085 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1087 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1088 gdbscm_wrap and scoped_value_mark.
1089 (gdbscm_value_to_string): Use xfree directly instead of a
1090 cleanup. Move 'buffer' unique_ptr to TRY scope.
1091 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1092 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
1094 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1095 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1097 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1100 2018-07-18 Tom de Vries <tdevries@suse.de>
1102 * findvar.c (default_read_var_value): Also resolve dynamic type for
1103 LOC_OPTIMIZED_OUT vars.
1105 2018-07-18 Maciej W. Rozycki <macro@mips.com>
1107 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1110 2018-07-17 Tom Tromey <tom@tromey.com>
1112 * guile/scm-param.c (pascm_set_func, pascm_show_func)
1113 (compute_enum_list, pascm_set_param_value_x)
1114 (gdbscm_parameter_value): Update.
1115 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1116 (gdbscm_scm_to_host_string): Update.
1117 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1119 * guile/scm-cmd.c (cmdscm_add_completion): Update.
1120 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1121 * guile/scm-string.c (gdbscm_scm_to_string): Return
1123 (gdbscm_scm_to_host_string): Likewise.
1125 2018-07-17 Tom Tromey <tom@tromey.com>
1127 * guile/guile.c (gdbscm_eval_from_control_command): Update.
1128 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1129 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1130 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1133 2018-07-17 Tom Tromey <tom@tromey.com>
1135 * guile/scm-param.c (pascm_signal_setshow_error): Update.
1136 * guile/guile-internal.h (gdbscm_exception_message_to_string):
1138 * guile/scm-cmd.c (cmdscm_function): Update.
1139 * guile/scm-pretty-print.c
1140 (ppscm_print_exception_unless_memory_error): Update.
1141 * guile/scm-exception.c (gdbscm_exception_message_to_string):
1142 Return unique_xmalloc_ptr.
1144 2018-07-17 Tom Tromey <tom@tromey.com>
1146 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1149 2018-07-17 Jim Wilson <jimw@sifive.com>
1151 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1152 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
1153 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
1154 unecessary braces after EF_RISCV_RVC test. Delete call to
1155 set_gdbarch_decr_pc_after_break.
1157 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1158 RISCV_LAST_FP_REGNUM + 1.
1159 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1161 2018-07-17 Tom Tromey <tom@tromey.com>
1163 * configure.ac: Remove --disable-gdbcli.
1164 * configure: Rebuild.
1165 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1166 (SUBDIR_CLI_CFLAGS): Remove.
1167 (SFILES): Use SUBDIR_CLI_SRCS.
1168 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1170 2018-07-17 Tom Tromey <tom@tromey.com>
1173 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1175 2018-07-16 Jim Wilson <jimw@sifive.com>
1177 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1179 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1181 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1183 (libunwind_frame_sniffer): Likewise.
1184 (libunwind_frame_prev_register): Likewise.
1185 (libunwind_sigtramp_frame_sniffer): Likewise.
1186 * ia64-tdep.c (ia64_access_reg): Likewise.
1187 (ia64_access_rse_reg): Likewise.
1188 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1189 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1191 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1193 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1195 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1197 * remote-sim.c (gdbsim_target::close,
1198 gdbsim_target::mourn_inferior): Remove unused variables.
1200 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1202 * ia64-tdep.c (ktab_buf): New global.
1203 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1204 (get_kernel_table): Adjust.
1206 2018-07-16 Tom Tromey <tom@tromey.com>
1208 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1209 * dwarf2read.c (using_directives, new_symbol): Use
1210 outermost_context_p.
1211 * dbxread.c (process_one_symbol): Use outermost_context_p.
1212 * coffread.c (coff_symtab_read): Use outermost_context_p.
1214 2018-07-16 Tom Tromey <tom@tromey.com>
1216 * dwarf2read.c (using_directives, read_func_scope)
1217 (read_lexical_block_scope): Update.
1218 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1219 * buildsym.h (local_using_directives, global_using_directives):
1221 (get_local_using_directives, set_local_using_directives)
1222 (get_global_using_directives): Declare.
1223 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1224 m_global_using_directives>: New members.
1225 (finish_block_internal, prepare_for_building)
1226 (reset_symtab_globals, end_symtab_get_static_block)
1227 (push_context): Update.
1228 (get_local_using_directives, set_local_using_directives)
1229 (get_global_using_directives): New functions.
1230 (buildsym_init): Update.
1232 2018-07-16 Tom Tromey <tom@tromey.com>
1234 * xcoffread.c (xcoff_initial_scan): Don't call
1235 free_pending_blocks.
1236 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1237 * buildsym.h (class scoped_free_pendings): Add constructor.
1238 (free_pending_blocks): Don't declare.
1239 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1240 (free_pending_blocks): Now static.
1242 2018-07-16 Tom Tromey <tom@tromey.com>
1244 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1245 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1247 (struct subfile_stack): Remove.
1248 (subfile_stack): Remove.
1249 (push_subfile, pop_subfile, buildsym_init): Update.
1251 2018-07-16 Tom Tromey <tom@tromey.com>
1253 * buildsym.c (push_subfile): Use gdb_assert.
1254 (pop_subfile): Use gdb_assert.
1256 2018-07-16 Tom Tromey <tom@tromey.com>
1258 * buildsym.h (merge_symbol_lists): Remove.
1259 * buildsym.c (merge_symbol_lists): Remove.
1261 2018-07-16 Tom Tromey <tom@tromey.com>
1263 * stabsread.c (scan_file_globals): Update comment.
1264 * stabsread.h (scan_file_globals): Move from buildsym.h.
1265 * buildsym.h (scan_file_globals): Move to stabsread.h.
1267 2018-07-16 Tom Tromey <tom@tromey.com>
1269 * xcoffread.c (xcoff_new_init): Update.
1270 * mipsread.c (mipscoff_new_init): Update.
1271 * mdebugread.c (mdebug_build_psymtabs): Update.
1272 * elfread.c (elf_new_init): Update.
1273 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1274 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1275 * buildsym.h (buildsym_new_init): Don't declare.
1276 * buildsym.c (buildsym_new_init): Remove.
1278 2018-07-16 Tom Tromey <tom@tromey.com>
1280 * stabsread.h (within_function): Move from buildsym.h.
1281 * stabsread.c (start_stabs): Clear within_function.
1282 * coffread.c (coff_start_symtab): Clear within_function.
1283 * buildsym.h (within_function): Move to stabsread.h.
1284 * buildsym.c (prepare_for_building): Update.
1286 2018-07-16 Tom Tromey <tom@tromey.com>
1288 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1289 * dwarf2read.c (dwarf2_start_symtab): Don't set
1290 processing_gcc_compilation.
1291 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1293 2018-07-16 Tom Tromey <tom@tromey.com>
1295 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1296 (next_symbol_text_func): Move from buildsym.h.
1297 * stabsread.c (hashname): Move from buildsym.c.
1298 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1299 (next_symbol_text_func, hashname): Move to stabsread.h.
1300 * buildsym.c: Don't include bcache.h
1301 (hashname): Move to stasbread.c.
1303 2018-07-16 Tom Tromey <tom@tromey.com>
1305 * buildsym.h (context_stack_size): Don't declare.
1306 * buildsym.c (context_stack_size): New global.
1308 2018-07-16 Tom Tromey <tom@tromey.com>
1310 * dbxread.c (processing_acc_compilation): New global.
1311 * buildsym.h (processing_acc_compilation): Don't declare.
1313 2018-07-16 Tom Tromey <tom@tromey.com>
1315 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1316 * dbxread.c (read_ofile_symtab): Update.
1317 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1318 * buildsym.h (last_source_start_addr): Remove.
1319 (set_last_source_start_addr, get_last_source_start_addr):
1321 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1323 (struct buildsym_compunit) <m_last_source_start_addr>: New
1325 (prepare_for_building): Remove start_addr parameter.
1326 (start_symtab, restart_symtab, end_symtab_get_static_block)
1327 (end_symtab_with_blockvector): Update.
1328 (set_last_source_start_addr, get_last_source_start_addr): New
1331 2018-07-16 Tom Tromey <tom@tromey.com>
1333 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1335 (have_line_numbers): Remove.
1336 (record_line, prepare_for_building, end_symtab_get_static_block)
1337 (augment_type_symtab): Update.
1339 2018-07-16 Tom Tromey <tom@tromey.com>
1341 * buildsym.c (~buildsym_compunit): Free the macro table.
1342 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1344 <m_pending_macros>: New member.
1345 (pending_macros): Remove.
1346 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1347 (reset_symtab_globals, end_symtab_get_static_block)
1348 (end_symtab_with_blockvector, augment_type_symtab)
1349 (buildsym_init): Update.
1351 2018-07-16 Tom Tromey <tom@tromey.com>
1353 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1355 (buildsym_compunit::set_last_source_file): New method.
1356 <m_last_source_file>: New member.
1357 (prepare_for_building): Remove "name" parameter.
1358 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1359 (last_source_file): Remove.
1360 (set_last_source_file, get_last_source_file): Update.
1362 2018-07-16 Tom Tromey <tom@tromey.com>
1364 * buildsym.c (prepare_for_building): Add assert.
1366 2018-07-16 Tom Tromey <tom@tromey.com>
1368 * buildsym.c (~buildsym_compunit): Update.
1369 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1370 (start_subfile, patch_subfile_names)
1371 (end_symtab_with_blockvector): Update.
1373 2018-07-16 Tom Tromey <tom@tromey.com>
1375 * buildsym.c (struct buildsym_compunit): Add constructor,
1376 destructor, initializers.
1377 (start_buildsym_compunit): Remove.
1378 (free_buildsym_compunit): Use "delete".
1379 (start_symtab, restart_symtab): Use "new".
1381 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1383 * symfile.c (set_objfile_default_section_offset): Remove struct
1386 2018-07-14 Stafford Horne <shorne@gmail.com>
1388 * (Responsible Maintainers): Add myself as or1k maintainer.
1390 2018-07-13 Tom Tromey <tom@tromey.com>
1392 * symfile.c (set_objfile_default_section_offset): Use extra braces
1395 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1397 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1400 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1402 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1403 unittests/cli-utils-selftests.c
1404 * unittests/cli-utils-selftests.c: New file.
1406 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1408 * NEWS: Mention new commands. Mention change to 'thread apply'.
1410 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1412 * thread.c (thr_try_catch_cmd): New function.
1413 (thread_apply_all_command): Handle qcs flags.
1414 (thread_apply_command): Handle qcs flags.
1415 (taas_command): New function.
1416 (tfaas_command): New function.
1417 (_initialize_thread): Update to setup the new commands 'taas
1418 and 'tfaas'. Change doc string for 'thread apply'.
1420 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1422 * stack.c: (trailing_outermost_frame): New function, mostly
1423 extracted from backtrace_command_1.
1424 (leading_innermost_frame): New function.
1425 (backtrace_command_1): Update to call trailing_outermost_frame.
1426 (frame_apply_command_count): New function.
1427 (frame_apply_level_command): New function.
1428 (frame_apply_all_command): New function.
1429 (frame_apply_command): New function.
1430 (faas_command): New function.
1431 (frame_cmd_list): New variable.
1432 (_initialize_stack): Update to setup the new commands 'frame apply'
1435 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1437 * cli-utils.c (number_or_range_parser::get_number): Only handle
1438 numbers or convenience var as numbers.
1439 (parse_flags): New function.
1440 (parse_flags_qcs): New function.
1441 (number_or_range_parser::finished): Ensure parsing end is detected
1442 before end of string.
1443 * cli-utils.h (parse_flags): New function.
1444 (parse_flags_qcs): New function.
1445 (number_or_range_parser): Remove m_finished bool.
1446 (number_or_range_parser::skip_range): Set m_in_range to false.
1448 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
1450 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1453 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1454 Jan Kratochvil <jan.kratochvil@redhat.com>
1455 Paul Fertser <fercerpav@gmail.com>
1456 Tsutomu Seki <sekiriki@gmail.com>
1457 Pedro Alves <palves@redhat.com>
1459 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1460 'unittests/parse-connection-spec-selftests.c'.
1461 (COMMON_SFILES): Add 'common/netstuff.c'.
1462 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1463 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1464 * common/netstuff.c: New file.
1465 * common/netstuff.h: New file.
1466 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1467 (wait_for_connect): Update comment. New parameter
1468 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1469 Use 'sock' directly instead of 'scb->fd'.
1470 (try_connect): New function, with code from 'net_open'.
1471 (net_open): Rewrite main loop to deal with multiple
1472 sockets/addresses. Handle IPv6-style hostnames; implement
1473 support for IPv6 connections.
1474 * unittests/parse-connection-spec-selftests.c: New file.
1476 2018-07-11 Pedro Alves <palves@redhat.com>
1479 * remote.c (remote_target::remote_detach_pid): Call
1480 set_current_process.
1482 2018-07-11 Pedro Alves <palves@redhat.com>
1484 * h8300-tdep.c (h8300_gdbarch_init): Remove
1485 set_gdbarch_ecoff_reg_to_regnum calls.
1487 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1490 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1491 offsets/sizes for static members of a class/struct.
1493 2018-07-11 Alan Hayward <alan.hayward@arm.com>
1495 * target-descriptions.c (tdesc_register_bitsize): Rename.
1496 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1497 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1498 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1500 2018-07-10 Tom Tromey <tom@tromey.com>
1502 * breakpoint.c (moribund_locations): Now static and a
1504 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1505 (build_bpstat_chain, update_global_location_list)
1506 (breakpoint_retire_moribund): Update.
1507 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1510 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1512 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1513 (riscv_register_reggroup_p): Use new function, remove unneeded
1515 (riscv_push_dummy_call): Extend assert to compare against xlen or
1516 flen based on register type.
1518 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1520 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1522 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1524 * remote.c (show_hardware_watchpoint_limit): New function.
1525 (show_hardware_watchpoint_length_limit): New function.
1526 (show_hardware_breakpoint_limit): New function.
1527 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1528 where appropriate, update help text.
1530 2018-07-09 Tom Tromey <tom@tromey.com>
1532 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1533 (CLIBS): Don't mention NAT_CLIBS.
1535 2018-07-09 Tom Tromey <tom@tromey.com>
1537 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1538 (LIBGDB_OBS, clean mostlyclean): Update.
1539 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1541 2018-07-09 Tom Tromey <tom@tromey.com>
1543 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1544 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1545 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1547 2018-07-09 Tom Tromey <tom@tromey.com>
1549 * Makefile.in (ALLDEPFILES): Remove exec.c.
1550 (COMMON_OBS): Remove exec.o.
1551 (COMMON_SFILES): Add exec.c.
1553 2018-07-09 Tom Tromey <tom@tromey.com>
1555 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1557 2018-07-09 Tom Tromey <tom@tromey.com>
1559 * Makefile.in (clean mostlyclean): Remove stamp-version.
1560 (version.c): Depend on stamp-version.
1561 (stamp-version): New rule, from version.c rule.
1563 2018-07-09 Tom Tromey <tom@tromey.com>
1565 * Makefile.in (init.c): Depend on stamp-init.
1566 (stamp-init): New rule, from init.c rule.
1567 (clean mostlyclean): Remove stamp-init.
1569 2018-07-09 Tom Tromey <tom@tromey.com>
1571 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1572 SUBDIR_GCC_COMPILE_SRCS.
1574 2018-07-09 Tom Tromey <tom@tromey.com>
1576 * Makefile.in (init.c): Remove some unused sed rules.
1578 2018-07-09 Tom Tromey <tom@tromey.com>
1580 * Makefile.in (TSOBS): Remove.
1581 (INIT_FILES): Update.
1582 (LIBGDB_OBS): Update.
1583 (COMMON_SFILES): Add inflow.c.
1584 (SFILES): Remove inflow.c.
1586 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1588 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1590 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1592 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1593 get_saveloc_name, is_signal_frame_name, step_name,
1594 init_remote_name, create_addr_space_name,
1595 destroy_addr_space_name, search_unwind_table_name,
1596 find_dyn_list_name): Constify.
1598 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1600 * darwin-nat.c (darwin_pthread_kill): New function.
1601 (darwin_resume_thread): Use darwin_pthread_kill.
1603 2018-07-05 Tom de Vries <tdevries@suse.de>
1605 * macroexp.c (macro_buffer) <operator=>: New member function.
1607 2018-07-04 Tom Tromey <tom@tromey.com>
1609 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1611 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
1613 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1614 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1615 * maint.c: Likewise.
1618 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1620 * NEWS: Create a new section for the next release branch.
1621 Rename the section of the current branch, now that it has
1624 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1626 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1627 * version.in: Bump version to 8.2.50.DATE-git.
1629 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1630 Pedro Alves <palves@redhat.com>
1632 * linux-nat.c (linux_init_ptrace): Rename to ...
1633 (linux_init_ptrace_procfs): ... this. Call
1634 linux_proc_init_warnings.
1635 (linux_nat_target::post_attach)
1636 (linux_nat_target::post_startup_inferior): Adjust.
1637 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1638 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1640 2018-07-04 Tom de Vries <tdevries@suse.de>
1642 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1644 (read_comp_unit_head): ... here.
1646 2018-07-03 Tom Tromey <tom@tromey.com>
1648 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1649 (stop_tracing, tstatus_command)
1650 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1651 (print_one_static_tracepoint_marker): Update.
1652 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1654 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
1656 (all_tracepoints, static_tracepoints_here): Return std::vector.
1658 2018-07-03 Tom Tromey <tom@tromey.com>
1660 * common/ptid.c (ptid_equal): Remove.
1661 * common/ptid.h (ptid_equal): Don't declare.
1662 * ada-tasks.c: Update.
1663 * breakpoint.c: Update.
1664 * common/agent.c: Update.
1665 * corelow.c: Update.
1666 * darwin-nat-info.c: Update.
1667 * darwin-nat.c: Update.
1669 * dtrace-probe.c: Update.
1670 * dummy-frame.c: Update.
1671 * fbsd-nat.c: Update.
1673 * gdbthread.h: Update.
1674 * gnu-nat.c: Update.
1675 * go32-nat.c: Update.
1676 * inf-loop.c: Update.
1677 * inf-ptrace.c: Update.
1678 * infcall.c: Update.
1682 * linux-fork.c: Update.
1683 * linux-nat.c: Update.
1684 * linux-thread-db.c: Update.
1685 * mi/mi-cmd-var.c: Update.
1686 * mi/mi-interp.c: Update.
1687 * mi/mi-main.c: Update.
1688 * nto-procfs.c: Update.
1689 * ppc-linux-tdep.c: Update.
1691 * python/py-inferior.c: Update.
1692 * python/py-record-btrace.c: Update.
1693 * python/py-record.c: Update.
1694 * ravenscar-thread.c: Update.
1695 * regcache.c: Update.
1696 * remote-sim.c: Update.
1698 * sol-thread.c: Update.
1701 * tui/tui-stack.c: Update.
1703 * windows-nat.c: Update.
1704 * windows-tdep.c: Update.
1706 2018-07-03 Tom Tromey <tom@tromey.com>
1708 * common/ptid.c (ptid_match): Remove.
1709 * common/ptid.h (ptid_match): Don't declare.
1710 * fbsd-nat.c: Update.
1713 * linux-nat.c: Update.
1714 * record-btrace.c: Update.
1715 * regcache.c: Update.
1718 2018-07-03 Tom Tromey <tom@tromey.com>
1720 * common/ptid.c (ptid_tid_p): Remove.
1721 * common/ptid.h (ptid_tid_p): Don't declare.
1722 * sol-thread.c: Update.
1724 2018-07-03 Tom Tromey <tom@tromey.com>
1726 * common/ptid.c (ptid_lwp_p): Remove.
1727 * common/ptid.h (ptid_lwp_p): Don't declare.
1728 * fbsd-nat.c: Update.
1729 * linux-nat.c: Update.
1730 * nat/linux-procfs.c: Update.
1731 * nat/x86-linux-dregs.c: Update.
1732 * sol-thread.c: Update.
1734 2018-07-03 Tom Tromey <tom@tromey.com>
1736 * common/ptid.c (ptid_is_pid): Remove.
1737 * common/ptid.h (ptid_is_pid): Don't declare.
1739 * linux-nat.c: Update.
1740 * mi/mi-interp.c: Update.
1744 2018-07-03 Tom Tromey <tom@tromey.com>
1746 * common/ptid.c (ptid_get_tid): Remove.
1747 * common/ptid.h (ptid_get_tid): Don't declare.
1748 * ada-tasks.c: Update.
1749 * aix-thread.c: Update.
1750 * bsd-uthread.c: Update.
1751 * darwin-nat.c: Update.
1752 * fbsd-nat.c: Update.
1753 * i386-darwin-nat.c: Update.
1755 * linux-tdep.c: Update.
1756 * nto-procfs.c: Update.
1757 * ppc-ravenscar-thread.c: Update.
1758 * python/py-infthread.c: Update.
1759 * ravenscar-thread.c: Update.
1760 * sol-thread.c: Update.
1761 * sparc-ravenscar-thread.c: Update.
1762 * windows-nat.c: Update.
1764 2018-07-03 Tom Tromey <tom@tromey.com>
1766 * common/ptid.c (ptid_get_lwp): Remove.
1767 * common/ptid.h (ptid_get_lwp): Don't declare.
1768 * aarch64-linux-nat.c: Update.
1769 * ada-tasks.c: Update.
1770 * aix-thread.c: Update.
1771 * amd64-linux-nat.c: Update.
1772 * arm-linux-nat.c: Update.
1773 * corelow.c: Update.
1774 * fbsd-nat.c: Update.
1775 * fbsd-tdep.c: Update.
1776 * gnu-nat.c: Update.
1777 * i386-cygwin-tdep.c: Update.
1778 * i386-gnu-nat.c: Update.
1779 * i386-linux-nat.c: Update.
1780 * ia64-linux-nat.c: Update.
1781 * inf-ptrace.c: Update.
1783 * linux-fork.c: Update.
1784 * linux-nat.c: Update.
1785 * linux-tdep.c: Update.
1786 * linux-thread-db.c: Update.
1787 * mips-linux-nat.c: Update.
1788 * nat/aarch64-linux-hw-point.c: Update.
1789 * nat/aarch64-linux.c: Update.
1790 * nat/linux-btrace.c: Update.
1791 * nat/linux-osdata.c: Update.
1792 * nat/linux-procfs.c: Update.
1793 * nat/x86-linux-dregs.c: Update.
1794 * obsd-nat.c: Update.
1795 * ppc-fbsd-nat.c: Update.
1796 * ppc-linux-nat.c: Update.
1798 * python/py-infthread.c: Update.
1799 * ravenscar-thread.c: Update.
1801 * s390-linux-nat.c: Update.
1802 * sol-thread.c: Update.
1803 * sol2-tdep.c: Update.
1804 * spu-linux-nat.c: Update.
1805 * x86-linux-nat.c: Update.
1806 * xtensa-linux-nat.c: Update.
1808 2018-07-03 Tom Tromey <tom@tromey.com>
1810 * common/ptid.c (ptid_get_pid): Remove.
1811 * common/ptid.h (ptid_get_pid): Don't declare.
1812 * aarch64-linux-nat.c: Update.
1813 * ada-lang.c: Update.
1814 * aix-thread.c: Update.
1815 * alpha-bsd-nat.c: Update.
1816 * amd64-fbsd-nat.c: Update.
1817 * amd64-linux-nat.c: Update.
1818 * arm-linux-nat.c: Update.
1819 * arm-nbsd-nat.c: Update.
1821 * break-catch-syscall.c: Update.
1822 * breakpoint.c: Update.
1823 * bsd-uthread.c: Update.
1824 * corelow.c: Update.
1826 * darwin-nat.c: Update.
1827 * fbsd-nat.c: Update.
1828 * fbsd-tdep.c: Update.
1830 * gnu-nat.c: Update.
1831 * hppa-nbsd-nat.c: Update.
1832 * hppa-obsd-nat.c: Update.
1833 * i386-fbsd-nat.c: Update.
1834 * ia64-linux-nat.c: Update.
1835 * inf-ptrace.c: Update.
1837 * inferior.c: Update.
1838 * inferior.h: Update.
1841 * linux-fork.c: Update.
1842 * linux-nat.c: Update.
1843 * linux-tdep.c: Update.
1844 * linux-thread-db.c: Update.
1845 * m68k-bsd-nat.c: Update.
1846 * mi/mi-interp.c: Update.
1847 * mi/mi-main.c: Update.
1848 * mips-linux-nat.c: Update.
1849 * mips-nbsd-nat.c: Update.
1850 * mips64-obsd-nat.c: Update.
1851 * nat/aarch64-linux-hw-point.c: Update.
1852 * nat/aarch64-linux.c: Update.
1853 * nat/linux-btrace.c: Update.
1854 * nat/linux-osdata.c: Update.
1855 * nat/linux-procfs.c: Update.
1856 * nat/x86-linux-dregs.c: Update.
1857 * nto-procfs.c: Update.
1858 * obsd-nat.c: Update.
1859 * ppc-linux-nat.c: Update.
1860 * ppc-nbsd-nat.c: Update.
1861 * ppc-obsd-nat.c: Update.
1862 * proc-service.c: Update.
1864 * python/py-inferior.c: Update.
1865 * python/py-infthread.c: Update.
1866 * ravenscar-thread.c: Update.
1868 * remote-sim.c: Update.
1870 * rs6000-nat.c: Update.
1871 * s390-linux-nat.c: Update.
1872 * sh-nbsd-nat.c: Update.
1873 * sol-thread.c: Update.
1874 * sparc-nat.c: Update.
1875 * sparc64-tdep.c: Update.
1876 * spu-linux-nat.c: Update.
1877 * spu-tdep.c: Update.
1878 * target-debug.h: Update.
1881 * tid-parse.c: Update.
1882 * tracefile-tfile.c: Update.
1883 * vax-bsd-nat.c: Update.
1884 * windows-nat.c: Update.
1885 * x86-linux-nat.c: Update.
1886 * x86-nat.c: Update.
1888 2018-07-03 Tom Tromey <tom@tromey.com>
1890 * common/ptid.c (pid_to_ptid): Remove.
1891 * common/ptid.h (pid_to_ptid): Don't declare.
1892 * aix-thread.c: Update.
1893 * arm-linux-nat.c: Update.
1894 * common/ptid.c: Update.
1895 * common/ptid.h: Update.
1896 * corelow.c: Update.
1898 * darwin-nat.c: Update.
1899 * fbsd-nat.c: Update.
1900 * fork-child.c: Update.
1901 * gnu-nat.c: Update.
1902 * go32-nat.c: Update.
1903 * inf-ptrace.c: Update.
1905 * inferior.c: Update.
1907 * linux-fork.c: Update.
1908 * linux-nat.c: Update.
1909 * nat/aarch64-linux-hw-point.c: Update.
1910 * nat/fork-inferior.c: Update.
1911 * nat/x86-linux-dregs.c: Update.
1912 * nto-procfs.c: Update.
1913 * obsd-nat.c: Update.
1915 * progspace.c: Update.
1917 * rs6000-nat.c: Update.
1918 * s390-linux-nat.c: Update.
1919 * sol-thread.c: Update.
1920 * spu-linux-nat.c: Update.
1923 * tracefile-tfile.c: Update.
1924 * windows-nat.c: Update.
1926 2018-07-03 Tom Tromey <tom@tromey.com>
1928 * common/ptid.h (ptid_build): Don't declare.
1929 * common/ptid.c (ptid_build): Remove.
1930 * aix-thread.c: Update.
1931 * bsd-kvm.c: Update.
1932 * bsd-uthread.c: Update.
1933 * common/agent.c: Update.
1934 * common/ptid.c: Update.
1935 * common/ptid.h: Update.
1936 * corelow.c: Update.
1937 * darwin-nat.c: Update.
1938 * fbsd-nat.c: Update.
1939 * gnu-nat.c: Update.
1940 * linux-fork.c: Update.
1941 * linux-nat.c: Update.
1942 * linux-thread-db.c: Update.
1943 * nat/linux-osdata.c: Update.
1944 * nat/linux-procfs.c: Update.
1945 * nto-procfs.c: Update.
1946 * obsd-nat.c: Update.
1947 * proc-service.c: Update.
1949 * ravenscar-thread.c: Update.
1950 * remote-sim.c: Update.
1952 * sol-thread.c: Update.
1954 * windows-nat.c: Update.
1956 2018-07-03 Tom Tromey <tom@tromey.com>
1958 * infrun.c (follow_exec): Use exit_inferior_silent.
1959 * inferior.c (exit_inferior_num_silent): Remove.
1960 * inferior.h (exit_inferior_num_silent): Don't declare.
1962 2018-07-03 Tom Tromey <tom@tromey.com>
1965 * darwin-nat.c (darwin_attach_pid): Reset inferior and
1966 inferior_ptid on error.
1968 2018-07-02 Maciej W. Rozycki <macro@mips.com>
1969 Simon Marchi <simon.marchi@polymtl.ca>
1972 * disasm.h (gdb_disassembler): Add
1973 `m_disassembler_options_holder'. member
1974 * disasm.c (get_all_disassembler_options): New function.
1975 (gdb_disassembler::gdb_disassembler): Use it.
1976 (gdb_buffered_insn_length_init_dis): Likewise.
1977 (gdb_buffered_insn_length): Adjust accordingly.
1978 (set_disassembler_options): Handle options with arguments.
1979 (show_disassembler_options_sfunc): Likewise. Add a leading new
1980 line if showing options with descriptions.
1981 (disassembler_options_completer): Adapt to using the
1982 `disasm_options_and_args_t' structure.
1983 * mips-tdep.c (mips_disassembler_options): New variable.
1984 (mips_disassembler_options_o32): Likewise.
1985 (mips_disassembler_options_n32): Likewise.
1986 (mips_disassembler_options_n64): Likewise.
1987 (gdb_print_insn_mips): Don't set `disassembler_options'.
1988 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1990 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
1991 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
1992 `gdbarch_disassembler_options_implicit' and
1993 `gdbarch_valid_disassembler_options'.
1994 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
1995 `disasm_options_and_args_t' structure.
1996 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
1998 (valid_disassembler_options): Switch from `disasm_options_t' to
1999 the `disasm_options_and_args_t' structure.
2000 * NEWS: Document `set disassembler-options' support for the MIPS
2002 * gdbarch.h: Regenerate.
2003 * gdbarch.c: Regenerate.
2005 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
2007 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2009 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2011 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2012 parameter in call to amd64_target_description.
2013 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2014 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2015 (amd64fbsd_init_abi): Likewise.
2016 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2017 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2018 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2019 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2021 2018-06-29 Pedro Alves <palves@redhat.com>
2023 * gdb/amd64-tdep.h (amd64_create_target_description): Add
2024 "segments" parameter.
2025 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2026 (_initialize_amd64_tdep): Update call to
2027 amd64_create_target_description.
2028 (amd64_target_description): Add "segments" parameter. Adjust
2029 the implementation to use it.
2030 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2031 call to amd64_create_target_description.
2032 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2033 * gdb/arch/amd64.h (amd64_create_target_description): Add
2034 "segments" register.
2035 * gdb/arch/amd64.c (amd64_create_target_description): Add
2036 "segments" parameter. Call create_feature_i386_64bit_segments
2037 only if SEGMENTS is true.
2038 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2039 call to amd64_create_target_description.
2041 2018-06-29 Pedro Alves <palves@redhat.com>
2043 * thread.c (thread_target_id_str): New, factored out from ...
2044 (print_thread_info_1): ... here. Use it to compute the max
2045 "Target Id" column width.
2047 2018-06-29 Pedro Alves <palves@redhat.com>
2049 * remote.c (remote_target::extra_thread_info): Delete
2050 'display_buf' and 'n' locals. from the cache, regardless of
2051 packet mechanims is in use. Use cache for qThreadExtra and qP
2054 2018-06-29 Pedro Alves <palves@redhat.com>
2056 * blockframe.c (find_pc_sect_containing_function): New function.
2057 * breakpoint.c (print_breakpoint_location): Don't call
2058 find_pc_sect_function.
2059 * linespec.c (create_sals_line_offset): Record the location's
2061 * linespec.c (convert_address_location_to_sals): Fill in sal's
2062 symbol with find_pc_sect_containing_function.
2063 * symtab.c (find_function_start_sal): Rename to ...
2064 (find_function_start_sal_1): ... this.
2065 (find_function_start_sal): Reimplement as wrapper around
2066 find_function_start_sal_1, and use
2067 find_pc_sect_containing_function to fill in the sal's symbol.
2068 (find_function_start_sal(symbol*, bool)): Adjust.
2069 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2071 (find_pc_sect_containing_function): Declare.
2073 2018-06-29 Pedro Alves <palves@redhat.com>
2075 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2076 true if the the location has no symbol.
2078 2018-06-28 Tom Tromey <tom@tromey.com>
2080 * NEWS: Mention --enable-codesign.
2081 * silent-rules.mk (ECHO_SIGN): New variable.
2082 * configure.ac: Add --enable-codesign.
2083 * configure: Rebuild.
2084 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2085 (gdb$(EXEEXT)): Optionally invoke codesign.
2087 2018-06-28 Pedro Alves <palves@redhat.com>
2089 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2091 (switch_to_thread_no_regs): Adjust comment.
2092 * infcmd.c (stop_pc): Delete.
2093 (post_create_inferior, info_program_command): Replace references
2094 to stop_pc with references to thread_info->suspend.stop_pc.
2095 * inferior.h (stop_pc): Delete declaration.
2096 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2097 (handle_inferior_event_1, handle_signal_stop)
2098 (process_event_stop_test, keep_going_stepped_thread)
2099 (handle_step_into_function, handle_step_into_function_backward)
2100 (print_stop_location): Replace references to stop_pc with
2101 references to thread_info->suspend.stop_pc.
2102 (struct infcall_suspend_state) <stop_pc>: Delete field.
2103 (save_infcall_suspend_state, restore_infcall_suspend_state):
2104 Remove references to inf_stat->stop_pc.
2105 * linux-fork.c (fork_load_infrun_state): Likewise.
2106 * record-btrace.c (record_btrace_set_replay): Likewise.
2107 * record-full.c (record_full_goto_entry): Likewise.
2108 * remote.c (print_one_stopped_thread): Likewise.
2109 * target.c (target_resume): Extend comment.
2110 * thread.c (set_executing_thread): New.
2111 (set_executing): Use it.
2112 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2113 Remove references to stop_pc.
2115 2018-06-28 Pedro Alves <palves@redhat.com>
2117 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2118 Moving fetching stop_pc until after ecs->event_thread is refreshed.
2120 2018-06-28 Tom Tromey <tom@tromey.com>
2122 * coffread.c (coff_symfile_finish): Update.
2123 * xcoffread.c (xcoff_symfile_finish): Update.
2124 * elfread.c (elf_symfile_finish): Update.
2125 * symfile.h (dwarf2_free_objfile): Don't declare.
2126 * dwarf2read.c (_initialize_dwarf2_read): Use
2127 register_objfile_data_with_cleanup.
2128 (dwarf2_free_objfile): Now static. Change signature.
2130 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2132 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2133 option "-o" to add-symbol-file-load to add an offset to each
2134 section's load address.
2135 * symfile.c (set_objfile_default_section_offset): New function.
2137 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2139 * symfile.c (add_symbol_file_command): Make sure that sections
2140 with the same name are sorted in the same order.
2142 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2144 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2145 require the second argument. If omitted, load sections at the
2146 addresses specified in the file.
2148 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2150 * symfile.c (symbol_file_command, symbol_file_add_main_1)
2151 (_initialize_symfile): Add option "-o" to symbol-file to add an
2152 offset to each section of the symbol file.
2154 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2156 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2158 2018-06-27 Tom Tromey <tom@tromey.com>
2160 * stack.c (_initialize_stack): Update "func" help text.
2162 2018-06-27 Tom Tromey <tom@tromey.com>
2164 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2166 (unwind_infopy_str, pyuw_create_unwind_info)
2167 (unwind_infopy_add_saved_register, pyuw_sniffer)
2168 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2170 (struct saved_reg): Add constructor.
2171 <value>: Now a gdbpy_ref<>.
2173 2018-06-27 Tom Tromey <tom@tromey.com>
2175 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2177 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2179 * gdb-gdb.py.in: Format using autopep8.
2181 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2183 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2184 (type_lookup_function): Recognize CORE_ADDR values.
2186 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2188 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2191 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2193 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2196 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2198 * gdb-gdb.py: Move to...
2199 * gdb-gdb.py.in: ... here.
2200 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2201 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2203 (distclean): Remove gdb-gdb.py when cleaning.
2204 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2205 * configure: Re-generate.
2207 2018-06-27 Pedro Alves <palves@redhat.com>
2209 * proc-service.c (get_ps_regcache): New.
2210 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2211 (ps_lsetfpregs): Use it.
2213 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
2216 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2217 (dwarf_decode_lines_1): Adjust.
2219 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2221 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2223 <info_proc>: Likewise.
2225 2018-06-26 Joel Brobecker <brobecker@adacore.com>
2227 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2228 to windows_fetch_one_register, and only handle the case of
2229 fetching one register. Move the code that reloads the context
2230 and iterates over all registers if R is negative to...
2231 (windows_nat_target::fetch_registers): ... here.
2232 (do_windows_store_inferior_registers): Rename to
2233 windows_store_one_register, and only handle the case of storing
2234 one register. Move the code that handles the case where r is
2236 (windows_nat_target::store_registers) ... here.
2238 2018-06-26 Tom Tromey <tom@tromey.com>
2241 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2242 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2244 (rust_internal_print_type): Add podata parameter.
2245 (rust_print_type): Update.
2247 2018-06-26 Tom Tromey <tom@tromey.com>
2249 * typeprint.h (struct print_offset_data) <update, finish,
2250 maybe_print_hole>: New methods.
2251 <indentation>: New constant.
2252 * typeprint.c (print_offset_data::indentation): Define.
2253 (print_offset_data::maybe_print_hole, print_offset_data::update)
2254 (print_offset_data::finish): Move from c-typeprint.c and rename.
2255 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2256 (print_spaces_filtered_with_print_options): Update.
2257 (c_print_type_union_field_offset, maybe_print_hole)
2258 (c_print_type_struct_field_offset): Move to typeprint.c and
2260 (c_type_print_base_struct_union): Update.
2262 2018-06-25 Pedro Alves <palves@redhat.com>
2264 * gdbthread.h (thread_info_ref, delete_thread)
2265 (delete_thread_silent, first_thread_of_inferior)
2266 (any_thread_of_inferior, switch_to_thread)
2267 (enable_thread_stack_temporaries)
2268 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2269 (get_last_thread_stack_temporary)
2270 (value_in_thread_stack_temporaries, can_access_registers_thread):
2271 Spell out "struct thread_info" instead of just "thread_info".
2272 * inferior.h (notice_new_inferior): Likewise.
2274 2018-06-25 Pedro Alves <palves@redhat.com>
2276 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2277 pass thread_info pointer to delete_thread.
2278 (windows_nat_target::detach): Pass inferior pointer to
2280 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2282 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2283 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2284 and pass a thread_info pointer to delete_thread.
2285 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2286 pass thread_info pointer to delete_thread.
2287 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2288 delete_thread_silent call.
2289 * procfs.c (procfs_target::detach): Pass inferior pointer to
2291 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2292 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2293 delete_thread_silent call.
2294 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2295 pass thread_info pointer to delete_thread.
2296 (windows_nat_target::detach): Pass inferior pointer to
2299 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2301 * regcache.c (readable_regcache::read_part): Fix asserts.
2302 (reg_buffer::raw_collect_part): New function.
2303 (regcache::write_part): Fix asserts.
2304 (reg_buffer::raw_supply_part): New function.
2305 (regcache::transfer_regset_register): New helper function.
2306 (regcache::transfer_regset): Call new functions.
2307 (regcache_supply_regset): Use gdb_byte*.
2308 (regcache::supply_regset): Likewise.
2309 (regcache_collect_regset): Likewise.
2310 (regcache::collect_regset): Likewise.
2311 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2312 (reg_buffer::raw_supply_part): Likewise.
2313 (regcache::transfer_regset_register): Likewise.
2314 (regcache::transfer_regset): Use gdb_byte*.
2316 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2318 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2320 2018-06-21 Pedro Alves <palves@redhat.com>
2322 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2323 instead of a ptid_t. All callers adjusted.
2324 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2326 (print_ada_task_info, display_current_task_id, task_command_1):
2328 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2330 (breakpoint_kind): Adjust.
2331 (remove_breakpoints_pid): Rename to ...
2332 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2333 pointer. All callers adjusted.
2334 (bpstat_clear_actions): Use inferior_thread.
2335 (get_bpstat_thread): New.
2336 (bpstat_do_actions): Use it.
2337 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2338 to take a thread_info pointer. All callers adjusted.
2339 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2340 (breakpoint_re_set_thread): Use inferior_thread.
2341 * breakpoint.h (struct inferior): Forward declare.
2342 (bpstat_stop_status): Update.
2343 (remove_breakpoints_pid): Delete.
2344 (remove_breakpoints_inf): New.
2345 * bsd-uthread.c (bsd_uthread_target::wait)
2346 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2347 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2348 (maint_btrace_packet_history_cmd)
2349 (maint_btrace_clear_packet_history_cmd): Adjust.
2350 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2352 * cli/cli-interp.c: Include "inferior.h".
2353 * common/refcounted-object.h (struct
2354 refcounted_object_ref_policy): New.
2355 * compile/compile-object-load.c: Include gdbthread.h.
2356 (store_regs): Use inferior_thread.
2357 * corelow.c (core_target::close): Use current_inferior.
2358 (core_target_open): Adjust to use first_thread_of_inferior and use
2359 the current inferior.
2360 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2361 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2362 <thread>: ... this new field. All references adjusted.
2363 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2364 Take a thread_info pointer instead of a ptid_t.
2365 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2366 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2367 thread_info pointer instead of a ptid_t.
2368 * elfread.c: Include "inferior.h".
2369 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2370 Use inferior_thread.
2371 * eval.c (evaluate_subexp): Likewise.
2372 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2374 * gdb_proc_service.h (struct thread_info): Forward declare.
2375 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2376 <thread>: ... this new field. All references adjusted.
2377 * gdbarch.h, gdbarch.c: Regenerate.
2378 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2379 'thread' parameter. All implementations and callers adjusted.
2380 * gdbthread.h (thread_info) <set_running>: New method.
2381 (delete_thread, delete_thread_silent): Take a thread_info pointer
2383 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2384 (first_thread_of_process): Delete, replaced by ...
2385 (first_thread_of_inferior): ... this new function. All callers
2387 (any_live_thread_of_process): Delete, replaced by ...
2388 (any_live_thread_of_inferior): ... this new function. All callers
2390 (switch_to_thread, switch_to_no_thread): Declare.
2391 (is_executing): Delete.
2392 (enable_thread_stack_temporaries): Update comment.
2393 <enable_thread_stack_temporaries>: Take a thread_info pointer
2394 instead of a ptid_t. Incref the thread.
2395 <~enable_thread_stack_temporaries>: Decref the thread.
2398 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2399 (get_last_thread_stack_temporary)
2400 (value_in_thread_stack_temporaries, can_access_registers_thread):
2401 Take a thread_info pointer instead of a ptid_t. All callers
2403 * infcall.c (get_call_return_value): Use inferior_thread.
2404 (run_inferior_call): Work with thread pointers instead of ptid_t.
2405 (call_function_by_hand_dummy): Work with thread pointers instead
2406 of ptid_t. Use thread_info_ref.
2407 * infcmd.c (proceed_thread_callback): Access thread's state
2409 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2410 access thread's state directly.
2411 (continue_command): Use inferior_thread.
2412 (info_program_command): Use find_thread_ptid and access thread
2414 (proceed_after_attach_callback): Use thread state directly.
2415 (notice_new_inferior): Take a thread_info pointer instead of a
2416 ptid_t. All callers adjusted.
2417 (exit_inferior): Take an inferior pointer instead of a pid. All
2419 (exit_inferior_silent): New.
2420 (detach_inferior): Delete.
2421 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2422 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2423 (detach_inferior_command, kill_inferior_command): Use
2424 find_inferior_id instead of valid_gdb_inferior_id and
2425 gdb_inferior_id_to_pid.
2426 (inferior_command): Use inferior and thread pointers.
2427 * inferior.h (struct thread_info): Forward declare.
2428 (notice_new_inferior): Take a thread_info pointer instead of a
2429 ptid_t. All callers adjusted.
2430 (detach_inferior): Delete declaration.
2431 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2432 instead of a pid. All callers adjusted.
2433 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2434 (valid_gdb_inferior_id): Delete.
2435 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2436 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2437 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2439 <inf>: ... this new field.
2440 <step_ptid>: Delete, replaced by ...
2441 <step_thread>: ... this new field.
2442 (get_displaced_stepping_state): Take an inferior pointer instead
2443 of a pid. All callers adjusted.
2444 (displaced_step_in_progress_any_inferior): Adjust.
2445 (displaced_step_in_progress_thread): Take a thread pointer instead
2446 of a ptid_t. All callers adjusted.
2447 (displaced_step_in_progress, add_displaced_stepping_state): Take
2448 an inferior pointer instead of a pid. All callers adjusted.
2449 (get_displaced_step_closure_by_addr): Adjust.
2450 (remove_displaced_stepping_state): Take an inferior pointer
2451 instead of a pid. All callers adjusted.
2452 (displaced_step_prepare_throw, displaced_step_prepare)
2453 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2454 All callers adjusted.
2455 (start_step_over): Adjust.
2456 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2457 displaced step queue.
2458 (do_target_resume): Adjust.
2459 (fetch_inferior_event): Use inferior_thread.
2460 (context_switch, get_inferior_stop_soon): Take an
2461 execution_control_state pointer instead of a ptid_t. All callers
2463 (switch_to_thread_cleanup): Delete.
2464 (stop_all_threads): Use scoped_restore_current_thread.
2465 * inline-frame.c: Include "gdbthread.h".
2466 (inline_state) <inline_state>: Take a thread pointer instead of a
2467 ptid_t. All callers adjusted.
2468 <ptid>: Delete, replaced by ...
2469 <thread>: ... this new field.
2470 (find_inline_frame_state): Take a thread pointer instead of a
2471 ptid_t. All callers adjusted.
2472 (skip_inline_frames, step_into_inline_frame)
2473 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2474 pointer instead of a ptid_t. All callers adjusted.
2475 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2476 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2477 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2479 * linux-nat.c (get_detach_signal): Likewise.
2480 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2481 (thread_db_notice_clone): Adjust.
2482 (thread_db_find_new_threads_silently)
2483 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2484 a thread pointer instead of a ptid_t. All callers adjusted.
2485 * mi/mi-cmd-var.c: Include "inferior.h".
2486 (mi_cmd_var_update_iter): Update to use thread pointers.
2487 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2489 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2491 (mi_output_running): ... this new function.
2492 (mi_on_resume_1): Adjust to use it.
2493 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2494 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2496 (interrupt_thread_callback): : Adjust to use thread and inferior
2498 * proc-service.c: Include "gdbthread.h".
2499 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2500 * progspace-and-thread.c: Include "inferior.h".
2501 * progspace.c: Include "inferior.h".
2502 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2503 hold a reference to an inferior_object.
2504 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2506 * python/py-inferior.c (struct inferior_object): Give the type a
2507 tag name instead of a typedef.
2508 (python_on_normal_stop): No need to check if the current thread is
2510 (inferior_to_inferior_object): Change return type to
2511 inferior_object. All callers adjusted.
2512 (find_thread_object): Delete, bits factored out to ...
2513 (thread_to_thread_object): ... this new function.
2514 * python/py-infthread.c (create_thread_object): Use
2515 inferior_to_inferior_object.
2516 (thpy_is_stopped): Use thread pointer directly.
2517 (gdbpy_selected_thread): Use inferior_thread.
2518 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2519 field, replaced with ...
2520 <thread>: ... this new field. All users adjusted.
2521 (btpy_insn_or_gap_new): Drop const.
2522 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2524 * python/py-record.c: Include "gdbthread.h".
2525 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2526 a ptid_t. All callers adjusted.
2527 (gdbpy_current_recording): Use inferior_thread.
2528 * python/py-record.h (recpy_record_object) <ptid>: Delete
2529 field, replaced with ...
2530 <thread>: ... this new field. All users adjusted.
2531 (recpy_element_object) <ptid>: Delete
2532 field, replaced with ...
2533 <thread>: ... this new field. All users adjusted.
2534 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2535 a ptid_t. All callers adjusted.
2536 * python/py-threadevent.c: Include "gdbthread.h".
2537 (get_event_thread): Use thread_to_thread_object.
2538 * python/python-internal.h (struct inferior_object): Forward
2540 (find_thread_object, find_inferior_object): Delete declarations.
2541 (thread_to_thread_object, inferior_to_inferior_object): New
2543 * record-btrace.c: Include "inferior.h".
2544 (require_btrace_thread): Use inferior_thread.
2545 (record_btrace_frame_sniffer)
2546 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2547 (get_thread_current_frame): Use scoped_restore_current_thread and
2549 (get_thread_current_frame): Use thread pointer directly.
2550 (record_btrace_replay_at_breakpoint): Use thread's inferior
2552 * record-full.c: Include "inferior.h".
2553 * regcache.c: Include "gdbthread.h".
2554 (get_thread_arch_regcache): Use the inferior's address space
2556 (get_thread_regcache, registers_changed_thread): New.
2557 * regcache.h (get_thread_regcache(thread_info *thread)): New
2559 (registers_changed_thread): New.
2560 (remote_target) <remote_detach_1>: Swap order of parameters.
2561 (remote_add_thread): <remote_add_thread>: Return the new thread.
2562 (get_remote_thread_info(ptid_t)): New overload.
2563 (remote_target::remote_notice_new_inferior): Use thread pointers
2565 (remote_target::process_initial_stop_replies): Use
2566 thread_info::set_running.
2567 (remote_target::remote_detach_1, remote_target::detach)
2568 (extended_remote_target::detach): Adjust.
2569 * stack.c (frame_show_address): Use inferior_thread.
2570 * target-debug.h (target_debug_print_thread_info_pp): New.
2571 * target-delegates.c: Regenerate.
2572 * target.c (default_thread_address_space): Delete.
2573 (memory_xfer_partial_1): Use current_inferior.
2574 (target_detach): Use current_inferior.
2575 (target_thread_address_space): Delete.
2576 (generic_mourn_inferior): Use current_inferior.
2577 * target.h (struct target_ops) <thread_address_space>: Delete.
2578 (target_thread_address_space): Delete.
2579 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2581 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2582 thread pointer instead of a ptid_t. Adjust all callers.
2583 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2584 (first_thread_of_process): Delete, replaced by ...
2585 (first_thread_of_inferior): ... this new function. All callers
2587 (any_thread_of_process): Rename to ...
2588 (any_thread_of_inferior): ... this, and take an inferior pointer.
2589 (any_live_thread_of_process): Rename to ...
2590 (any_live_thread_of_inferior): ... this, and take an inferior
2592 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2593 (value_in_thread_stack_temporaries)
2594 (get_last_thread_stack_temporary): Take a thread pointer instead
2595 of a ptid_t. Adjust all callers.
2596 (thread_info::set_running): New.
2597 (validate_registers_access): Use inferior_thread.
2598 (can_access_registers_ptid): Rename to ...
2599 (can_access_registers_thread): ... this, and take a thread
2601 (print_thread_info_1): Adjust to compare thread pointers instead
2603 (switch_to_no_thread, switch_to_thread): Make extern.
2604 (scoped_restore_current_thread::~scoped_restore_current_thread):
2605 Use m_thread pointer directly.
2606 (scoped_restore_current_thread::scoped_restore_current_thread):
2607 Use inferior_thread.
2608 (thread_command): Use thread pointer directly.
2609 (thread_num_make_value_helper): Use inferior_thread.
2610 * top.c (execute_command): Use inferior_thread.
2611 * tui/tui-interp.c: Include "inferior.h".
2612 * varobj.c (varobj_create): Use inferior_thread.
2613 (value_of_root_1): Use find_thread_global_id instead of
2614 global_thread_id_to_ptid.
2616 2018-06-21 Alan Hayward <alan.hayward@arm.com>
2618 * regcache.c (readable_regcache::read_part): Avoid memcpy when
2620 (regcache::write_part): Likewise.
2621 (readable_regcache::cooked_read_part): Update comment.
2622 (readable_regcache::cooked_write_part): Likewise.
2623 * regcache.h: (readable_regcache::read_part): Likewise.
2624 (regcache::write_part): Likewise.
2626 2018-06-21 Richard Bunt <richard.bunt@arm.com>
2627 Dirk Schubert <dirk.schubert@arm.com>
2629 * aarch64-linux-nat.c (post_attach): New.
2630 (aarch64_linux_nat_target::post_attach): Override post_attach to
2631 record the number of hardware debug registers.
2633 2018-06-20 Tom Tromey <tom@tromey.com>
2635 * python/py-param.c (add_setshow_generic): Make parameters const.
2636 (parmpy_init): Update.
2638 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2640 * regcache.h (regcache_cooked_read_ftype): Rename to...
2641 (register_read_ftype): ...this, change type to function_view.
2642 (class reg_buffer) <save>: Remove src parameter.
2643 (readonly_detached_regcache) <readonly_detached_regcache>: Make
2644 parameter non-const in first overload. Remove src parameter in
2646 * regcache.c (do_cooked_read): Remove.
2647 (readonly_detached_regcache::readonly_detached_regcache): Make
2648 parameter non-const, adjust call to other constructor.
2649 (reg_buffer::save): Remove src parameter.
2650 * frame.c (do_frame_register_read): Remove.
2651 (frame_save_as_regcache): Use lambda function.
2652 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2653 parameter to ppu2spu_data *.
2654 (ppu2spu_sniffer): Use lambda function.
2656 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2658 * record-full.c (record_full_target::insert_breakpoint): Remove
2659 "struct" keyword, add const.
2661 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2663 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2664 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2665 * configure.ac: Remove AC_PREREQ, add missing quoting.
2666 * gnulib/configure.ac: Modernize usage of
2667 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
2668 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2669 (AUTOMAKE_VERSION): Bump to 1.15.1.
2670 * configure: Re-generate.
2671 * config.in: Re-generate.
2672 * aclocal.m4: Re-generate.
2673 * gnulib/aclocal.m4: Re-generate.
2674 * gnulib/config.in: Re-generate.
2675 * gnulib/configure: Re-generate.
2676 * gnulib/import/Makefile.in: Re-generate.
2678 2018-06-19 Pedro Alves <palves@redhat.com>
2680 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2681 (lookup_minimal_symbol_by_pc_section): ... here with
2682 gdb_assert_not_reached added.
2684 2018-06-19 Pedro Alves <palves@redhat.com>
2686 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2687 parameter with a block parameter. Compare location's block symbol
2688 with the frame's block instead of addresses.
2689 (skip_inline_frames): Pass the current block instead of the
2690 frame's address. Break out as soon as we determine the frame
2691 should not be skipped.
2693 2018-06-18 Tom Tromey <tom@tromey.com>
2695 * solib-aix.c (solib_aix_get_section_offsets): Return
2697 (solib_aix_solib_create_inferior_hook): Update.
2699 2018-06-18 Tom Tromey <tom@tromey.com>
2701 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2703 2018-06-18 Tom Tromey <tom@tromey.com>
2705 * solib-frv.c (frv_relocate_main_executable): Use
2707 * solib-dsbt.c (dsbt_relocate_main_executable): Use
2710 2018-06-18 Tom Tromey <tom@tromey.com>
2712 * objfiles.h (inhibit_section_map_updates): Update.
2713 (resume_section_map_updates, resume_section_map_updates_cleanup):
2715 * solib-svr4.c (svr4_handle_solib_event): Update.
2716 * objfiles.c (inhibit_section_map_updates): Return
2717 scoped_restore_tmpl<int>.
2718 (resume_section_map_updates, resume_section_map_updates_cleanup):
2721 2018-06-18 Tom Tromey <tom@tromey.com>
2723 * valprint.h (read_string): Update.
2724 * valprint.c (read_string): Change type of "buffer".
2725 (val_print_string): Update.
2726 * python/py-value.c (valpy_string): Update.
2727 * language.h (struct language_defn) <la_get_string>: Change
2729 (default_get_string, c_get_string): Update.
2730 * language.c (default_get_string): Change type of "buffer".
2731 * guile/scm-value.c (gdbscm_value_to_string): Update.
2732 * c-lang.c (c_get_string): Change type of "buffer".
2734 2018-06-18 Tom Tromey <tom@tromey.com>
2736 * ser-mingw.c (struct pipe_state_destroyer): New.
2737 (pipe_state_up): New typedef.
2738 (cleanup_pipe_state): Remove.
2739 (pipe_windows_open): Use pipe_state_up. Don't release argv.
2741 2018-06-18 Tom Tromey <tom@tromey.com>
2743 * rust-lang.h (rust_yyerror): Don't declare.
2744 * rust-lang.c (rust_language_defn): Update.
2745 * rust-exp.y (yyerror): Now static.
2746 * parse.c (parse_exp_in_context_1): Update.
2747 * p-lang.h (p_yyerror): Don't declare.
2748 * p-lang.c (p_language_defn): Update.
2749 * p-exp.y (yyerror): Now static.
2750 * opencl-lang.c (opencl_language_defn): Update.
2751 * objc-lang.c (objc_language_defn): Update.
2752 * m2-lang.h (m2_yyerror): Don't declare.
2753 * m2-lang.c (m2_language_defn): Update.
2754 * m2-exp.y (yyerror): Now static.
2755 * language.h (struct language_defn) <la_error>: Remove.
2756 * language.c (unk_lang_error): Remove.
2757 (unknown_language_defn, auto_language_defn): Remove.
2758 * go-lang.h (go_yyerror): Don't declare.
2759 * go-lang.c (go_language_defn): Update.
2760 * go-exp.y (yyerror): Now static.
2761 * f-lang.h (f_yyerror): Don't declare.
2762 * f-lang.c (f_language_defn): Update.
2763 * f-exp.y (yyerror): Now static.
2764 * d-lang.h (d_yyerror): Don't declare.
2765 * d-lang.c (d_language_defn): Update.
2766 * d-exp.y (yyerror): Now static.
2767 * c-lang.h (c_yyerror): Don't declare.
2768 * c-lang.c (c_language_defn, cplus_language_defn)
2769 (asm_language_defn, minimal_language_defn): Update.
2770 * c-exp.y (yyerror): Now static.
2771 * ada-lang.h (ada_yyerror): Don't declare.
2772 * ada-lang.c (ada_language_defn): Update.
2773 * ada-exp.y (yyerror): Now static.
2775 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2777 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2778 (store_sveregs_to_thread): Likewise.
2779 (aarch64_linux_fetch_inferior_registers): Check for SVE.
2780 (aarch64_linux_store_inferior_registers): Likewise.
2781 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2783 (aarch64_sve_regs_copy_to_regcache): Likewise.
2784 (aarch64_sve_regs_copy_from_regcache): Likewise.
2785 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2787 (aarch64_sve_regs_copy_to_regcache): Likewise.
2788 (aarch64_sve_regs_copy_from_regcache): Likewise.
2789 (sve_context): Structure from Linux headers.
2790 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2791 (SVE_SIG_ZREG_SIZE): Likewise.
2792 (SVE_SIG_PREG_SIZE): Likewise.
2793 (SVE_SIG_FFR_SIZE): Likewise.
2794 (SVE_SIG_REGS_OFFSET): Likewise.
2795 (SVE_SIG_ZREGS_OFFSET): Likewise.
2796 (SVE_SIG_ZREG_OFFSET): Likewise.
2797 (SVE_SIG_ZREGS_SIZE): Likewise.
2798 (SVE_SIG_PREGS_OFFSET): Likewise.
2799 (SVE_SIG_PREG_OFFSET): Likewise.
2800 (SVE_SIG_PREGS_SIZE): Likewise.
2801 (SVE_SIG_FFR_OFFSET): Likewise.
2802 (SVE_SIG_REGS_SIZE): Likewise.
2803 (SVE_SIG_CONTEXT_SIZE): Likewise.
2804 (SVE_PT_REGS_MASK): Likewise.
2805 (SVE_PT_REGS_FPSIMD): Likewise.
2806 (SVE_PT_REGS_SVE): Likewise.
2807 (SVE_PT_VL_INHERIT): Likewise.
2808 (SVE_PT_VL_ONEXEC): Likewise.
2809 (SVE_PT_REGS_OFFSET): Likewise.
2810 (SVE_PT_FPSIMD_OFFSET): Likewise.
2811 (SVE_PT_FPSIMD_SIZE): Likewise.
2812 (SVE_PT_SVE_ZREG_SIZE): Likewise.
2813 (SVE_PT_SVE_PREG_SIZE): Likewise.
2814 (SVE_PT_SVE_FFR_SIZE): Likewise.
2815 (SVE_PT_SVE_FPSR_SIZE): Likewise.
2816 (SVE_PT_SVE_FPCR_SIZE): Likewise.
2817 (__SVE_SIG_TO_PT): Likewise.
2818 (SVE_PT_SVE_OFFSET): Likewise.
2819 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2820 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2821 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2822 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2823 (SVE_PT_SVE_PREG_OFFSET): Likewise.
2824 (SVE_PT_SVE_PREGS_SIZE): Likewise.
2825 (SVE_PT_SVE_FFR_OFFSET): Likewise.
2826 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2827 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2828 (SVE_PT_SVE_SIZE): Likewise.
2829 (SVE_PT_SIZE): Likewise.
2830 (HAS_SVE_STATE): New define.
2832 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2834 * nat/aarch64-sve-linux-sigcontext.h: New file.
2835 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2837 (SVE_VQ_MIN): Likewise.
2838 (SVE_VQ_MAX): Likewise.
2839 (SVE_VL_MIN): Likewise.
2840 (SVE_VL_MAX): Likewise.
2841 (SVE_NUM_ZREGS): Likewise.
2842 (SVE_NUM_PREGS): Likewise.
2843 (sve_vl_valid): Likewise.
2844 (struct user_sve_header): Likewise.
2846 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
2847 Richard Bunt <Richard.Bunt@arm.com>
2849 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2850 was requested by GDB.
2852 2018-06-15 Tom de Vries <tdevries@suse.de>
2854 * MAINTAINERS (Write After Approval): Add Tom de Vries.
2856 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
2858 * gnulib/update-gnulib.sh: Print expected versions of
2861 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
2863 * arch-utils.c (default_type_align): Use type_length_units.
2864 * gdbtypes.c (type_align): Use type_length_units.
2866 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2868 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2869 of 'define' command.
2871 2018-06-14 Tom de Vries <tdevries@suse.de>
2874 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2875 get_no_prettyformat_print_options.
2877 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
2879 * sparc-nat.h: Include target.h.
2880 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2881 <fetch_registers>: Remove this argument in function call.
2882 <store_registers>: Remove this argument in function call, remove
2884 <low_forget_process>: Call sparc64_forget_process instead of
2885 sparc_forget_process.
2887 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2889 * procfs.c (_initialize_procfs): Use add_inf_child_target.
2890 (procfs_target::make_corefile_notes): Adjust to new
2891 target_read_alloc return type.
2893 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2894 Stephen Roberts <stephen.roberts@arm.com>
2897 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2898 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2899 Move should_notify_stop local into more inner scope.
2901 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2902 Stephen Roberts <stephen.roberts@arm.com>
2905 * infrun.c (resume_1): Add call to mark_async_event_handler.
2907 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2909 * infrun.c (do_target_wait): Change old version of $pc printed.
2911 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
2913 * dwarf2read.c (read_index_from_section): Rename to...
2914 (read_gdb_index_from_section): ... this, update all callers.
2915 (dwarf2_read_index): Rename to...
2916 (dwarf2_read_gdb_index): ... this, update all callers.
2918 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
2920 * gdb/hppa-linux-nat.c
2921 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2922 hppa_linux_nat_target::fetch_registers.
2924 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2926 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2927 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2928 (AARCH64_DWARF_SVE_FFR): Likewise.
2929 (AARCH64_DWARF_SVE_P0): Likewise.
2930 (AARCH64_DWARF_SVE_Z0): Likewise.
2932 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2934 * common/common-regcache.h (raw_compare): New function.
2935 * regcache.c (regcache::raw_compare): Likewise.
2936 * regcache.h (regcache::raw_compare): New declaration.
2938 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2940 * common/common-regcache.h (reg_buffer_common): New structure.
2941 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2942 (reg_buffer::raw_supply): Likewise.
2943 (reg_buffer::raw_supply_integer): Likewise.
2944 (reg_buffer::raw_supply_zeroed): Likewise.
2945 (reg_buffer::raw_collect): Likewise.
2946 (reg_buffer::raw_collect_integer): Likewise.
2947 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2948 (reg_buffer::raw_supply): Likewise.
2949 (reg_buffer::raw_supply_integer): Likewise.
2950 (reg_buffer::raw_supply_zeroed): Likewise.
2951 (reg_buffer::raw_collect): Likewise.
2952 (reg_buffer::raw_collect_integer): Likewise.
2954 2018-06-10 Tom Tromey <tom@tromey.com>
2956 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
2957 (class remote_state) <stop_reply_queue>: Now std::vector.
2958 (remote_state::~remote_state)
2959 (remote_target::stop_reply_queue_length): Update.
2960 (struct queue_iter_param, remove_child_of_pending_fork)
2961 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2962 (check_pending_event_prevents_wildcard_vcont_callback)
2963 (remove_stop_reply_for_inferior)
2964 (remove_stop_reply_of_remote_state)
2965 (remote_notif_remove_once_on_match)
2966 (stop_reply_match_ptid_and_ws)
2967 (remote_kill_child_of_pending_fork): Remove.
2968 (remote_target::remove_new_fork_children)
2969 (remote_target::check_pending_events_prevent_wildcard_vcont)
2970 (remote_target::discard_pending_stop_replies)
2971 (remote_target::discard_pending_stop_replies_in_queue)
2972 (remote_target::remote_notif_remove_queued_reply)
2973 (remote_target::queued_stop_reply)
2974 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2975 (remote_target::wait, remote_target::kill_new_fork_children)
2976 (remote_target::async): Update.
2978 2018-06-10 Tom Tromey <tom@tromey.com>
2980 * record-full.c (record_full_arch_list_cleanups): Remove.
2981 (record_full_message): Use try/catch.
2982 (record_full_wait_cleanups): Remove.
2983 (record_full_wait_1): Use try/catch.
2984 (record_full_restore): Likewise.
2986 2018-06-10 Tom Tromey <tom@tromey.com>
2988 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
2989 declare VEC. Add constructor.
2990 <in_target_beneath>: Now bool.
2991 (record_full_breakpoints): Now a std::vector, static.
2992 (record_full_sync_record_breakpoints)
2993 (record_full_init_record_breakpoints)
2994 (record_full_target::insert_breakpoint)
2995 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
2997 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
2999 * dwarf2read.c (process_cu_includes): Remove struct keyword.
3000 * serial.c (serial_interface_lookup): Remove struct keyword.
3002 2018-06-10 Tom Tromey <tom@tromey.com>
3004 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3006 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3008 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3010 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3011 "beneath" as a method.
3012 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3013 Use "beneath" as a method.
3015 2018-06-10 Tom Tromey <tom@tromey.com>
3017 * tracefile.c (struct trace_file_writer_deleter): New.
3018 <operator()>: Rename from trace_file_writer_xfree.
3019 (trace_file_writer_up): New typedef.
3020 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3022 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3024 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3025 <m_registers, m_register_status>: Change type to
3027 * regcache.c (reg_buffer::reg_buffer): Use new instead of
3030 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3032 * common/common-regcache.h (enum register_status): Add
3033 underlying type "signed char".
3034 * regcache.h (reg_buffer) <m_register_status>: Change type to
3036 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3037 register_status instead of signed char.
3038 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3039 (reg_buffer::get_register_status): Remove cast.
3040 (readable_regcache::raw_read): Remove cast.
3041 (readable_regcache::cooked_read): Remove cast.
3043 2018-06-09 Tom Tromey <tom@tromey.com>
3045 * source.c (reverse_search_command, forward_search_command): Use
3048 2018-06-09 Tom Tromey <tom@tromey.com>
3050 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
3051 (serial_ops_list): Now static, std::vector.
3052 (serial_interface_lookup, serial_add_interface): Update.
3054 2018-06-09 Tom Tromey <tom@tromey.com>
3056 * dwarf2read.c (process_cu_includes): Update.
3057 (process_full_comp_unit): Update.
3058 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3061 2018-06-08 Paul Koning <paul_koning@dell.com>
3065 * python/python.c (do_start_initialization):
3066 Avoid call to internal Python API.
3067 (init__gdb_module): New function.
3069 2018-06-08 Gary Benson <gbenson@redhat.com>
3071 * linux-thread-db.c (valprint.h): New include.
3072 (struct check_thread_db_info): New structure.
3073 (check_thread_db_on_load, tdb_testinfo): New static globals.
3074 (check_thread_db, check_thread_db_callback): New functions.
3075 (try_thread_db_load_1): Run integrity checks if requested.
3076 (maintenance_check_libthread_db): New function.
3077 (_initialize_thread_db): Register "maint check libthread-db"
3078 and "maint set/show check-libthread-db".
3079 * NEWS: Mention the above new commands.
3081 2018-06-08 Tom Tromey <tom@tromey.com>
3083 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3086 2018-06-08 Tom Tromey <tom@tromey.com>
3088 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3090 2018-06-08 Tom Tromey <tom@tromey.com>
3092 * common/btrace-common.h (struct btrace_data): Add constructor,
3093 destructor, move assignment operator.
3094 <empty, clear, fini>: New methods.
3095 <format>: Initialize.
3096 (btrace_data_init, btrace_data_fini, btrace_data_clear)
3097 (btrace_data_empty): Don't declare.
3098 * common/btrace-common.c (btrace_data_init): Remove.
3099 (btrace_data::fini): Rename from btrace_data_fini.
3100 (btrace_data::empty): Rename from btrace_data_empty.
3101 (btrace_data::clear): Rename from btrace_data_clear. Return
3103 * btrace.h (make_cleanup_btrace_data): Don't declare.
3104 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3105 (parse_xml_btrace): Update.
3106 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3107 (maint_btrace_clear_packet_history_cmd): Update.
3109 2018-06-07 Pedro Alves <palves@redhat.com>
3111 * target.h (target_ops) <beneath>: Now a method. All references
3113 (class target_stack): New.
3114 * target.c (g_target_stack): New.
3115 (g_current_top_target): Delete.
3116 (current_top_target): Get the top target out of g_target_stack.
3117 (target_stack::push, target_stack::unpush): New.
3118 (push_target, unpush_target): Reimplement.
3119 (target_is_pushed): Reimplement in terms of g_target_stack.
3120 (target_ops::beneath, target_stack::find_beneath): New.
3122 2018-06-07 Pedro Alves <palves@redhat.com>
3124 * target.h (find_target_beneath): Delete declaration.
3125 * target.c (find_target_beneath): Delete definition.
3126 * aix-thread.c: All callers of find_target_beneath adjusted to
3127 call target_ops::beneath instead.
3128 * bsd-uthread.c: Likewise.
3129 * linux-thread-db.c: Likewise.
3130 * ravenscar-thread.c: Likewise.
3131 * sol-thread.c: Likewise.
3132 * spu-multiarch.c: Likewise.
3134 2018-06-07 Pedro Alves <palves@redhat.com>
3136 * target.h (target_ops) <beneath>: Now a method. All references
3138 (target_ops) <m_beneath>: New.
3139 * target.c (target_ops::beneath): New.
3140 * corelow.c: Adjust all references to target_ops::beneath.
3141 * linux-thread-db.c: Likewise.
3142 * make-target-delegates: Likewise.
3143 * record-btrace.c: Likewise.
3144 * record-full.c: Likewise.
3145 * remote.c: Likewise.
3146 * target.c: Likewise.
3147 * target-delegates.c: Regenerate.
3149 2018-06-07 Pedro Alves <palves@redhat.com>
3151 * target.h (target_stack): Delete.
3152 (current_top_target): Declare function.
3153 * target.c (target_stack): Delete.
3154 (g_current_top_target): New.
3155 (current_top_target): New function.
3156 * auxv.c: Use current_top_target instead of target_stack
3158 * avr-tdep.c: Likewise.
3159 * breakpoint.c: Likewise.
3160 * corefile.c: Likewise.
3161 * elfread.c: Likewise.
3163 * exceptions.c: Likewise.
3164 * frame.c: Likewise.
3165 * gdbarch-selftests.c: Likewise.
3166 * gnu-v3-abi.c: Likewise.
3167 * ia64-tdep.c: Likewise.
3168 * ia64-vms-tdep.c: Likewise.
3169 * infcall.c: Likewise.
3170 * infcmd.c: Likewise.
3171 * infrun.c: Likewise.
3172 * linespec.c: Likewise.
3173 * linux-tdep.c: Likewise.
3174 * minsyms.c: Likewise.
3175 * ppc-linux-nat.c: Likewise.
3176 * ppc-linux-tdep.c: Likewise.
3177 * procfs.c: Likewise.
3178 * regcache.c: Likewise.
3179 * remote.c: Likewise.
3180 * rs6000-tdep.c: Likewise.
3181 * s390-linux-nat.c: Likewise.
3182 * s390-tdep.c: Likewise.
3183 * solib-aix.c: Likewise.
3184 * solib-darwin.c: Likewise.
3185 * solib-dsbt.c: Likewise.
3186 * solib-spu.c: Likewise.
3187 * solib-svr4.c: Likewise.
3188 * solib-target.c: Likewise.
3189 * sparc-tdep.c: Likewise.
3190 * sparc64-tdep.c: Likewise.
3191 * spu-tdep.c: Likewise.
3192 * symfile.c: Likewise.
3193 * symtab.c: Likewise.
3194 * target-descriptions.c: Likewise.
3195 * target-memory.c: Likewise.
3196 * target.c: Likewise.
3197 * target.h: Likewise.
3198 * tracefile-tfile.c: Likewise.
3199 * tracepoint.c: Likewise.
3200 * valops.c: Likewise.
3201 * valprint.c: Likewise.
3202 * value.c: Likewise.
3203 * windows-tdep.c: Likewise.
3204 * mi/mi-main.c: Likewise.
3206 2018-06-07 Tom Tromey <tom@tromey.com>
3208 * valprint.h (build_address_symbolic): Declare.
3209 * printcmd.c (print_address_symbolic): Update.
3210 (build_address_symbolic): Change "name" and "filename" to
3212 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3214 * defs.h (build_address_symbolic): Remove declaration.
3216 2018-06-07 Alan Hayward <alan.hayward@arm.com>
3218 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3219 (aarch64_vnv_type): Add function.
3220 (aarch64_pseudo_register_name): Add V regs for SVE.
3221 (aarch64_pseudo_register_type): Likewise.
3222 (aarch64_pseudo_register_reggroup_p): Likewise.
3223 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3224 (aarch64_pseudo_read_value): Add V regs for SVE.
3225 (aarch64_pseudo_write_2): Use V0 offset for SVE
3226 (aarch64_pseudo_write): Add V regs for SVE.
3227 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3229 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3231 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3232 (sve_vl_from_vq): Likewise.
3234 2018-06-05 Tom Tromey <tom@tromey.com>
3236 * cli/cli-cmds.c (show_version): Update.
3237 * top.c (print_gdb_version): Add "interactive" parameter.
3239 * main.c (captured_main_1): Update.
3240 * top.h (print_gdb_version): Add "interactive" parameter and a
3243 2018-06-05 David Malcolm <dmalcolm@redhat.com>
3245 * common/enum-flags.h: Add trailing semicolon to example in
3248 2018-06-05 Tom Tromey <tom@tromey.com>
3251 * NEWS: Add entry about pager.
3252 * utils.c (pagination_disabled_for_command): New global.
3253 (prompt_for_continue): Allow "c" response to prompt.
3254 (reinitialize_more_filter): Clear
3255 pagination_disabled_for_command.
3256 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3258 2018-06-04 Tom Tromey <tom@tromey.com>
3260 * ada-lang.h (ada_lookup_symbol_list): Update.
3261 * ada-lang.c (resolve_subexp): Update.
3262 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3264 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3265 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3266 results parameter to std::vector.
3267 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3269 * ada-exp.y (block_lookup): Update.
3270 (select_possible_type_sym): Change type of syms. Remove nsyms
3272 (write_var_or_type, write_name_assoc): Update.
3274 2018-06-04 Joel Brobecker <brobecker@adacore.com>
3276 * windows-nat.c (windows_nat_target::xfer_partial): Return
3277 TARGET_XFER_E_IO if we need to delegate to the target beneath
3278 but BENEATH is NULL.
3280 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3282 * Makefile.in (config.status): Add configure.nat as a
3285 2018-06-04 Tom Tromey <tom@tromey.com>
3287 * cp-name-parser.y (cpname_state): Add method declarations.
3288 (HANDLE_QUAL): Update.
3289 (cpname_state::d_grab, cpname_state::fill_comp)
3290 (cpname_state::make_operator, cpname_state::make_dtor)
3291 (cpname_state::make_builtin_type, cpname_state::make_name)
3292 (cpname_state::d_qualify, cpname_state::d_int_type)
3293 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3294 (%union): Move earlier.
3296 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3298 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3300 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3302 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3303 (aarch64_pseudo_write_1): Likewise.
3304 (aarch64_pseudo_read_value): Use helper.
3305 (aarch64_pseudo_write): Likewise.
3307 2018-06-04 Pedro Alves <palves@redhat.com>
3309 * darwin-nat.c (darwin_ops): Delete.
3310 (darwin_attach_pid): Use get_native_target.
3312 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3314 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3315 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3317 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3319 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3320 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3321 (aarch64_gdbarch_init): Check for SVE.
3322 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3324 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3326 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3327 * aarch64-tdep.h (aarch64_read_description): Likewise.
3328 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3329 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3330 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3331 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3332 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3334 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3336 * value.c (value_fetch_lazy_bitfield): New.
3337 (value_fetch_lazy_memory): New.
3338 (value_fetch_lazy_register): New.
3339 (value_fetch_lazy): Factor out to smaller functions.
3341 2018-06-01 Tom Tromey <tom@tromey.com>
3343 * cp-name-parser.y (backslashable, represented): Now const.
3345 2018-06-01 Tom Tromey <tom@tromey.com>
3347 * cp-name-parser.y: Include parser-defs.h.
3348 (parser_fprintf): Remove declaration.
3350 2018-06-01 Tom Tromey <tom@tromey.com>
3352 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3354 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3355 (global_result): Remove globals.
3356 (struct cpname_state): New.
3357 (yyparse): Don't declare.
3358 (yylex, yyerror): Move declarations after %union.
3359 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3360 (make_name): Add state parameter.
3362 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3364 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3366 (yylex): Add lvalp, state parameters.
3367 (yyerror): Add state parameter.
3368 (cp_demangled_name_to_comp): Update.
3370 2018-06-01 Tom Tromey <tom@tromey.com>
3372 * cp-name-parser.y (parser_fprintf): Declare.
3373 (GDB_YY_REMAP_PREFIX): Define.
3374 Include yy-remap.h. Don't redefine yy* identifiers.
3376 2018-06-01 Tom Tromey <tom@tromey.com>
3378 * python/py-type.c (typy_legacy_template_argument): Update.
3379 * cp-support.h (cp_demangled_name_to_comp): Update.
3380 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3381 parameter to be a "std::string *".
3384 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3386 * ada-lex.l: Include "diagnostics.h" instead of
3387 "common/diagnostics.h".
3388 * unittests/environ-selftests.c: Likewise.
3389 * common/diagnostics.h: Moved to ../include.
3391 2018-06-01 Joel Brobecker <brobecker@adacore.com>
3393 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3394 to language_mode_manual while calling breakpoint_re_set_one.
3396 2018-06-01 Tom Tromey <tom@tromey.com>
3398 * valops.c (value_cast_structs, destructor_name_p): Update.
3399 * symtab.c (gdb_mangle_name): Update.
3400 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3402 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3403 (pascal_object_print_value_fields, pascal_object_print_value):
3405 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3406 * linespec.c (find_methods): Update.
3407 * gdbtypes.h (type_name_no_tag): Remove.
3408 (type_name_or_error): Rename from type_name_no_tag_or_error.
3409 * gdbtypes.c (type_name_no_tag): Remove.
3410 (type_name_or_error): Rename from type_name_no_tag_or_error.
3411 (lookup_struct_elt_type, check_typedef): Update.
3412 * expprint.c (print_subexp_standard): Update.
3413 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3414 * d-namespace.c (d_lookup_nested_symbol): Update.
3415 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3416 (cp_print_class_member): Update.
3417 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3418 * completer.c (add_struct_fields): Update.
3419 * c-typeprint.c (cp_type_print_derivation_info)
3420 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3422 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3423 (ada_prefer_type, ada_is_exception_sym): Update.
3425 2018-06-01 Tom Tromey <tom@tromey.com>
3427 * valops.c (enum_constant_from_type, value_namespace_elt)
3428 (value_maybe_namespace_elt): Update.
3429 * valarith.c (find_size_for_pointer_math): Update.
3430 * target-descriptions.c (make_gdb_type): Update.
3431 * symmisc.c (print_symbol): Update.
3432 * stabsread.c (define_symbol, read_type)
3433 (complain_about_struct_wipeout, add_undefined_type)
3434 (cleanup_undefined_types_1): Update.
3435 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3436 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3437 (rust_internal_print_type, rust_composite_type)
3438 (rust_evaluate_funcall, rust_evaluate_subexp)
3439 (rust_inclusive_range_type_p): Update.
3440 * python/py-type.c (typy_get_tag): Update.
3441 * p-typeprint.c (pascal_type_print_base): Update.
3442 * mdebugread.c (parse_symbol, parse_type): Update.
3443 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3445 * guile/scm-type.c (gdbscm_type_tag): Update.
3446 * go-lang.c (sixg_string_p): Update.
3447 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3449 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3450 (TYPE_TAG_NAME): Remove.
3451 * gdbtypes.c (type_name_no_tag): Simplify.
3452 (check_typedef, check_types_equal, recursive_dump_type)
3453 (copy_type_recursive, arch_composite_type): Update.
3454 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3455 in summary mode when needed.
3456 * eval.c (evaluate_funcall): Update.
3457 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3458 (process_structure_scope, read_enumeration_type)
3459 (read_namespace_type, read_module_type, determine_prefix): Update.
3460 * cp-support.c (inspect_type): Update.
3461 * coffread.c (process_coff_symbol, decode_base_type): Update.
3462 * c-varobj.c (c_is_path_expr_parent): Update.
3463 * c-typeprint.c (c_type_print_base_struct_union): Update.
3464 (c_type_print_base_1): Update. Print struct/class/union/enum in
3465 summary when using C language.
3466 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3467 (gen_maybe_namespace_elt): Update.
3468 * ada-lang.c (ada_type_name): Simplify.
3469 (empty_record, ada_template_to_fixed_record_type_1)
3470 (template_to_static_fixed_type)
3471 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3473 2018-06-01 Tom Tromey <tom@tromey.com>
3475 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3477 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3478 (c_print_type): Update.
3479 (c_print_type): New overload.
3480 (c_type_print_varspec_prefix, c_type_print_args)
3481 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3482 (c_type_print_base_struct_union, c_type_print_base_1)
3483 (cp_type_print_method_args): Add "language" parameter.
3484 (c_type_print_base): Update.
3485 * c-lang.h (c_print_type): Add new overload.
3487 2018-06-01 Tom Tromey <tom@tromey.com>
3489 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3490 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3492 2018-06-01 Alan Hayward <alan.hayward@arm.com>
3494 * aarch64-tdep.c (aarch64_sve_register_names): New const
3496 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3497 (AARCH64_SVE_Z_REGS_NUM): New define.
3498 (AARCH64_SVE_P_REGS_NUM): Likewise.
3499 (AARCH64_SVE_NUM_REGS): Likewise.
3501 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
3503 * nat/linux-ptrace.h [__alpha__]
3504 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3507 2018-05-31 Maciej W. Rozycki <macro@mips.com>
3509 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3510 the endianness selected.
3511 * NEWS: Document `set endian auto' mode operation update.
3513 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3515 * Makefile.in: Add new header.
3516 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3517 (sve_vl_from_vg): Likewise.
3518 (sve_vq_from_vl): Likewise.
3519 (sve_vl_from_vq): Likewise.
3520 (sve_vq_from_vg): Likewise.
3521 (sve_vg_from_vq): Likewise.
3522 * configure.nat: Add new c file.
3523 * nat/aarch64-sve-linux-ptrace.c: New file.
3524 * nat/aarch64-sve-linux-ptrace.h: New file.
3526 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3528 * aarch64-linux-nat.c (aarch64_linux_read_description):
3530 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3532 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3533 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3534 (aarch64_gdbarch_init): Add parmeter zero.
3535 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3536 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3537 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3539 * doc/gdb.texinfo: Describe SVE feature
3540 * features/aarch64-sve.c: New file.
3542 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
3545 * gdbarch.sh (significant_addr_bit): Default to zero when
3546 not set by target architecture.
3547 * gdbarch.c: Re-generated.
3548 * utils.c (address_significant): Update.
3550 2018-05-30 Joel Brobecker <brobecker@adacore.com>
3552 * stack.c (func_command): Remove trailing newline in call to error.
3554 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3556 * regcache.h (regcache_raw_collect): Remove, update callers to
3557 use regcache::raw_collect.
3558 * regcache.c (regcache_raw_collect): Remove.
3560 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3562 * regcache.h (regcache_raw_supply): Remove, update callers to
3563 use detached_regcache::raw_supply.
3564 * regcache.c (regcache_raw_supply): Remove.
3566 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3568 * regcache.h (regcache_cooked_write_part): Remove, update
3569 callers to use regcache::cooked_write_part.
3570 * regcache.c (regcache_cooked_write_part): Remove.
3572 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3574 * regcache.h (regcache_cooked_read_part): Remove, update callers
3575 to use readable_regcache::cooked_read_part.
3576 * regcache.c (regcache_cooked_read_part): Remove.
3578 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3580 * regcache.h (regcache_cooked_read_value): Remove, update
3581 callers to use readable_regcache::cooked_read_value.
3582 * regcache.c (regcache_cooked_read_value): Remove.
3584 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3586 * regcache.h (regcache_cooked_write): Remove, update callers to
3587 use regcache::cooked_write.
3588 * regcache.c (regcache_cooked_write): Remove.
3590 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3592 * regcache.h (regcache_invalidate): Remove, update callers to
3593 use detached_regcache::invalidate instead.
3594 * regcache.c (regcache_invalidate): Remove.
3596 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3598 * regcache.h (regcache_raw_write_part): Remove, update callers
3599 to use regcache::raw_write_part instead.
3600 * regcache.c (regcache_raw_write_part): Remove.
3602 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3604 * regcache.h (regcache_raw_read_part): Remove, update callers to
3605 use readable_regcache::raw_read_part instead.
3606 * regcache.c (regcache_raw_read_part): Remove.
3608 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3610 * regcache.h (regcache_cooked_read): Remove, update callers to
3611 use readable_regcache::cooked_read instead.
3612 * regcache.c (regcache_cooked_read): Remove.
3614 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3616 * regcache.h (regcache_raw_write): Remove, update callers to use
3617 regcache::raw_write instead.
3618 * regcache.c (regcache_raw_write): Remove.
3620 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3622 * regcache.h (regcache_raw_read): Remove, update callers to use
3623 readable_regcache::raw_read instead.
3624 * regcache.c (regcache_raw_read): Remove.
3626 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3628 * regcache.h (regcache_raw_update): Remove, update callers to
3629 use readable_regcache::raw_update instead.
3630 * regcache.c (regcache_raw_update): Remove.
3632 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3634 * regcache.h (regcache_register_status): Remove, update callers
3635 to use reg_buffer::get_register_status directly instead.
3636 * regcache.c (regcache_register_status): Remove.
3638 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3640 * regcache.h (regcache_get_ptid): Remove, update all callers to
3641 call regcache::ptid instead.
3642 * regcache.c (regcache_get_ptid): Remove.
3644 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3646 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3648 2018-05-30 Pedro Alves <palves@redhat.com>
3650 * common/common-exceptions.h (exception_rethrow): Use
3653 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
3655 * breakpoint.c (print_solib_event, check_status_catch_solib):
3656 Remove struct keyword in range-based for loops.
3657 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3658 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3660 * linespec.c (find_superclass_methods, search_minsyms_for_name):
3662 * symfile.c (addr_info_make_relative): Likewise.
3663 * thread.c (value_in_thread_stack_temporaries): Likewise.
3665 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
3668 * valops.c (value_struct_elt_for_reference): Call check_typedef on
3669 aggregate type to get its real type before accessing it.
3671 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
3673 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3674 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3675 * coff-pe-read.c (add_pe_forwarded_sym): Replace
3676 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3677 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3678 * jit.c (jit_breakpoint_re_set_internal): Likewise.
3679 * printcmd.c (info_address_command): Likewise.
3681 2018-05-29 Tom Tromey <tom@tromey.com>
3683 * windows-nat.c (handle_exception): Update fall-through comment.
3685 2018-05-29 Tom Tromey <tom@tromey.com>
3687 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
3688 (struct program_space) <added_solibs>: Now a std::vector.
3689 * breakpoint.c (print_solib_event): Update.
3690 (check_status_catch_solib): Update.
3691 * progspace.c (clear_program_space_solib_cache): Update.
3692 * solib.c (update_solib_list): Update.
3694 2018-05-29 Tom Tromey <tom@tromey.com>
3696 * python/py-type.c (typy_richcompare): Update.
3697 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3698 * gdbtypes.h (types_deeply_equal): Return bool.
3699 (types_equal): Likewise.
3700 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
3702 (check_types_equal): Change worklist to std::vector. Return
3704 (struct type_equality_entry): Add constructor.
3705 (compare_maybe_null_strings): Return bool.
3706 (check_types_worklist): Return bool. Change worklist to
3708 (types_deeply_equal): Use std::vector.
3709 (types_equal): Return bool.
3710 (compare_maybe_null_strings): Simplify.
3712 2018-05-29 Tom Tromey <tom@tromey.com>
3714 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
3716 2018-05-29 Tom Tromey <tom@tromey.com>
3718 * objc-lang.h: Don't include cp-support.h.
3719 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
3722 2018-05-27 Tom Tromey <tom@tromey.com>
3724 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3726 2018-05-25 Tom Tromey <tom@tromey.com>
3728 * value.c (value::location): Initialize.
3730 2018-05-25 Tom Tromey <tom@tromey.com>
3732 * dbxread.c (init_bincl_list): Remove.
3733 (bincl_list): Now a std::vector.
3734 (bincls_allocated, next_bincl): Remove.
3735 (free_bincl_list, do_free_bincl_list_cleanup)
3736 (make_cleanup_free_bincl_list): Remove.
3737 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3739 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3740 (struct header_file_location): Add constructor.
3741 (add_bincl_to_list): Remove.
3743 2018-05-25 Tom Tromey <tom@tromey.com>
3745 * tui/tui.c (tui_enable): Update.
3746 * mi/mi-interp.c (mi_interp::init): Update.
3747 * interps.h (class interp) <name>: New method.
3748 <m_name>: Rename from name.
3749 (~scoped_restore_interp): Update.
3750 * interps.c (interp::interp): Update.
3751 (interp_add, interp_set, interp_lookup_existing)
3752 (current_interp_named_p): Update.
3754 2018-05-25 Tom Tromey <tom@tromey.com>
3756 * interps.c (interp_name): Remove.
3757 * mi/mi-interp.c (mi_interp::init): Update.
3758 * interps.h (interp_name): Remove.
3759 (~scoped_restore_interp): Update.
3760 * tui/tui.c (tui_enable): Update.
3762 2018-05-25 Tom Tromey <tom@tromey.com>
3764 * utils.c (fputs_maybe_filtered): Update.
3765 * linespec.c (decode_line_full): Update.
3766 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3767 (mi_print_breakpoint_for_event, mi_solib_loaded)
3768 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3769 (mi_user_selected_context_changed): Update.
3770 * mi/mi-main.c (mi_execute_command): Update.
3771 * cli/cli-script.c (execute_control_command): Update.
3772 * python/python.c (execute_gdb_command): Update.
3773 * solib.c (info_sharedlibrary_command): Update.
3774 * interps.c (interp_ui_out): Remove.
3775 * interps.h (interp_ui_out): Remove.
3777 2018-05-25 Tom Tromey <tom@tromey.com>
3779 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3780 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3781 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3783 2018-05-25 Tom Tromey <tom@tromey.com>
3785 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3786 * interps.c (interp_exec): Use scoped_restore.
3788 2018-05-25 Tom Tromey <tom@tromey.com>
3790 * remote.c (remote_target::remote_file_get): Use
3792 (remote_target::remote_file_put): Likewise.
3794 2018-05-25 Tom Tromey <tom@tromey.com>
3796 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3798 (get_pe_section_index, add_pe_exported_sym): Update.
3799 (read_pe_exported_syms): Use gdb::def_vector.
3801 2018-05-25 Tom Tromey <tom@tromey.com>
3803 * frame.c (remove_prev_frame): Remove.
3804 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3806 2018-05-25 Maciej W. Rozycki <macro@mips.com>
3808 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3810 * mips-linux-nat.c (supply_fpregset): Always call
3811 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3812 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3813 `mips_fill_fpregset'.
3814 * mips-linux-tdep.c (mips_supply_fpregset)
3815 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3816 (mips_fill_fpregset_wrapper): Remove functions.
3817 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3818 (mips_linux_fpregset): Remove variable.
3819 (mips_linux_iterate_over_regset_sections): Use
3820 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3821 (mips_linux_o32_sigframe_init): Remove comment.
3823 2018-05-25 Pedro Alves <palves@redhat.com>
3825 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3826 (struct readahead_cache, struct packet_reg, struct
3827 remote_arch_state, class remote_state): Move higher up in the
3829 (remote_target::m_remote_state): Now an object instead of a pointer.
3830 (remote_target::get_remote_state): Adjust.
3832 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3834 * stack.c (select_and_print_frame): Delete.
3835 (struct function_bounds): Move struct within function.
3836 (func_command): Most content moved into new function
3837 find_frame_for_function, use new function, print result, add
3839 (find_frame_for_function): New function, now returns a result.
3841 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3843 * stack.c (iterate_over_block_arg_vars): Fix comment.
3844 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3846 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3850 (scoped_restore_selected_frame::scoped_restore_selected_frame):
3852 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3854 * frame.h (class scoped_restore_selected_frame): New class.
3855 * stack.c (print_frame_local_vars): Remove catching and rethrowing
3856 of any exception, use scoped_restore_selected_frame to restore the
3859 2018-05-24 Pedro Alves <palves@redhat.com>
3861 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3864 2018-05-23 Tom Tromey <tom@tromey.com>
3866 * complaints.c (struct complaints): Remove.
3867 (symfile_complaint_book): Remove.
3868 (series): New global.
3869 (complaint_internal): Update.
3870 (clear_complaints): Update.
3872 2018-05-23 Tom Tromey <tom@tromey.com>
3874 * complaints.c (counters): New global.
3875 (struct complain): Remove.
3876 (struct complaints) <root>: Remove.
3877 (complaint_sentinel): Remove.
3878 (symfile_complaint_book): Update.
3879 (find_complaint) Remove.
3880 (complaint_internal, clear_complaints): Update.
3882 2018-05-23 Tom Tromey <tom@tromey.com>
3884 * complaints.c (struct complain) <file, line>: Remove.
3885 (find_complaint): Remove file, line parameters.
3886 (complaint_internal): Update.
3888 2018-05-23 Tom Tromey <tom@tromey.com>
3890 * complaints.c (vcomplaint): Remove.
3891 (complaint_internal) Merge in contents of vcomplaint.
3893 2018-05-23 Tom Tromey <tom@tromey.com>
3895 * complaints.c (struct complaints) <explanation>: Remove.
3896 (symfile_explanations): Remove.
3897 (symfile_complaint_book): Update.
3898 (vcomplaint): Update.
3899 (struct explanation): Remove.
3901 2018-05-23 Tom Tromey <tom@tromey.com>
3903 * complaints.c (symfile_complaints): Remove.
3904 (complaint_internal): Remove "complaints" parameter.
3905 (clear_complaints, vcomplaint): Remove "c" parameter.
3906 (get_complaints): Remove.
3907 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3908 (dwarf2_debug_line_missing_file_complaint)
3909 (dwarf2_debug_line_missing_end_sequence_complaint)
3910 (dwarf2_complex_location_expr_complaint)
3911 (dwarf2_const_value_length_mismatch_complaint)
3912 (dwarf2_section_buffer_overflow_complaint)
3913 (dwarf2_macro_malformed_definition_complaint)
3914 (dwarf2_invalid_attrib_class_complaint)
3915 (create_addrmap_from_index, dw2_symtab_iter_next)
3916 (dw2_expand_marked_cus)
3917 (dw2_debug_names_iterator::find_vec_in_debug_names)
3918 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3919 (create_debug_type_hash_table, init_cutu_and_read_dies)
3920 (partial_die_parent_scope, add_partial_enumeration)
3921 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3922 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3923 (read_import_statement, read_file_scope, create_dwo_cu_reader)
3924 (create_cus_hash_table, create_dwp_hash_table)
3925 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3926 (dwarf2_rnglists_process, dwarf2_ranges_process)
3927 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3928 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3929 (handle_struct_member_die, process_structure_scope)
3930 (read_array_type, read_common_block, read_module_type)
3931 (read_tag_pointer_type, read_typedef, read_base_type)
3932 (read_subrange_type, load_partial_dies, partial_die_info::read)
3933 (partial_die_info::read, partial_die_info::read)
3934 (partial_die_info::read, read_checked_initial_length_and_offset)
3935 (dwarf2_string_attr, read_formatted_entries)
3936 (dwarf_decode_line_header)
3937 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3938 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3939 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3940 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3941 (get_signatured_type, get_DW_AT_signature_type)
3942 (decode_locdesc, file_file_name, consume_improper_spaces)
3943 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3944 (dwarf_decode_macro_bytes, dwarf_decode_macros)
3945 (dwarf2_symbol_mark_computed, set_die_type)
3946 (read_attribute_value): Update.
3947 * stap-probe.c (handle_stap_probe, get_stap_base_address):
3949 * dbxread.c (unknown_symtype_complaint)
3950 (lbrac_mismatch_complaint, repeated_header_complaint)
3951 (set_namestring, function_outside_compilation_unit_complaint)
3952 (read_dbx_symtab, process_one_symbol): Update.
3953 * gdbtypes.c (stub_noname_complaint): Update.
3954 * windows-nat.c (handle_unload_dll): Update.
3955 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3956 (decode_base_type): Update.
3957 * xcoffread.c (bf_notfound_complaint, ef_complaint)
3958 (eb_complaint, record_include_begin, record_include_end)
3959 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3960 (process_xcoff_symbol, read_symbol)
3961 (function_outside_compilation_unit_complaint)
3962 (scan_xcoff_symtab): Update.
3963 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3964 * buildsym.c (finish_block_internal, make_blockvector)
3965 (end_symtab_get_static_block, augment_type_symtab): Update.
3966 * dtrace-probe.c (dtrace_process_dof)
3967 (dtrace_static_probe_ops::get_probes): Update.
3968 * complaints.h (struct complaint): Don't declare.
3969 (symfile_complaints): Remove.
3970 (complaint_internal): Remove "complaints" parameter.
3971 (complaint): Likewise.
3972 (clear_complaints): Likewise.
3973 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3974 (reread_symbols): Update.
3975 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3976 (dwarf2_frame_cache, decode_frame_entry): Update.
3977 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3978 * objc-lang.c (lookup_objc_class, lookup_child_selector)
3979 (info_selectors_command): Update.
3980 * macrotab.c (macro_include, check_for_redefinition)
3981 (macro_undef): Update.
3982 * objfiles.c (filter_overlapping_sections): Update.
3983 * stabsread.c (invalid_cpp_abbrev_complaint)
3984 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3985 (define_symbol, error_type, read_type, rs6000_builtin_type)
3986 (stabs_method_name_from_physname, read_member_functions)
3987 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3988 (attach_fields_to_type, complain_about_struct_wipeout)
3989 (read_range_type, read_args, common_block_start)
3990 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
3992 * mdebugread.c (index_complaint, unknown_ext_complaint)
3993 (basic_type_complaint, bad_tag_guess_complaint)
3994 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
3995 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
3996 (parse_procedure, parse_lines)
3997 (function_outside_compilation_unit_complaint)
3998 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
3999 (bad_tag_guess_complaint, reg_value_complaint): Update.
4000 * cp-support.c (demangled_name_complaint): Update.
4001 * macroscope.c (sal_macro_scope): Update.
4002 * dwarf-index-write.c (class debug_names): Update.
4004 2018-05-23 Tom Tromey <tom@tromey.com>
4006 * complaints.c (clear_complaints): Remove "noisy" parameter.
4007 * complaints.h (clear_complaints): Update.
4008 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4009 (reread_symbols): Update.
4011 2018-05-23 Tom Tromey <tom@tromey.com>
4013 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4015 (vcomplaint, clear_complaints): Update.
4016 (symfile_explanations): Remove some messages.
4018 2018-05-23 Tom Tromey <tom@tromey.com>
4020 * complaints.c (internal_complaint): Remove.
4021 * complaints.h (internal_complaint): Remove.
4023 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4025 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4027 2018-05-22 Pedro Alves <palves@redhat.com>
4029 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4030 (remote_fileio_badfd, remote_fileio_return_errno)
4031 (remote_fileio_return_success, remote_fileio_func_open)
4032 (remote_fileio_func_open, remote_fileio_func_close)
4033 (remote_fileio_func_read, remote_fileio_func_write)
4034 (remote_fileio_func_lseek, remote_fileio_func_rename)
4035 (remote_fileio_func_unlink, remote_fileio_func_stat)
4036 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4037 (remote_fileio_func_isatty, remote_fileio_func_system): Add
4038 remote_target parameter.
4039 (remote_fio_func_map) <func>: Add remote_target parameter.
4040 (do_remote_fileio_request, remote_fileio_request):
4041 * remote-fileio.h (remote_fileio_request):
4042 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4043 remote_target parameter.
4044 (remote_notif_process, handle_notification): Adjust to pass down
4046 (remote_notif_state_allocate): Add remote_target parameter. Save
4048 * remote-notif.h (struct remote_target): Forward declare.
4049 (struct notif_client) <parse, ack, can_get_pending_events>: Add
4050 remote_target parameter.
4051 (struct remote_notif_state) <remote>: New field.
4052 (remote_notif_ack, remote_notif_parse): Add remote_target
4054 (remote_notif_state_allocate, remote_notif_state_allocate): Add
4055 remote_target parameter.
4056 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4057 (threads_listing_context, rmt_thread_action, protocol_feature)
4058 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4059 (packet_result, struct threads_listing_context, remote_state):
4060 Move definitions and declarations higher up.
4061 (remote_target) <~remote_target>: Declare.
4062 (remote_download_command_source, remote_file_put, remote_file_get)
4063 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4064 (remote_hostio_pread_vFile, remote_hostio_send_command)
4065 (remote_hostio_set_filesystem, remote_hostio_open)
4066 (remote_hostio_close, remote_hostio_unlink, remote_state)
4067 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4068 (get_memory_write_packet_size, get_memory_read_packet_size)
4069 (append_pending_thread_resumptions, remote_detach_1)
4070 (append_resumption, remote_resume_with_vcont)
4071 (add_current_inferior_and_thread, wait_ns, wait_as)
4072 (process_stop_reply, remote_notice_new_inferior)
4073 (process_initial_stop_replies, remote_add_thread)
4074 (btrace_sync_conf, remote_btrace_maybe_reopen)
4075 (remove_new_fork_children, kill_new_fork_children)
4076 (discard_pending_stop_replies, stop_reply_queue_length)
4077 (check_pending_events_prevent_wildcard_vcont)
4078 (discard_pending_stop_replies_in_queue, stop_reply)
4079 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4080 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4081 (remote_interrupt_as, remote_interrupt_ns)
4082 (remote_get_noisy_reply, remote_query_attached)
4083 (remote_add_inferior, remote_current_thread, get_current_thread)
4084 (set_thread, set_general_thread, set_continue_thread)
4085 (set_general_process, write_ptid)
4086 (remote_unpack_thread_info_response, remote_get_threadinfo)
4087 (parse_threadlist_response, remote_get_threadlist)
4088 (remote_threadlist_iterator, remote_get_threads_with_ql)
4089 (remote_get_threads_with_qxfer)
4090 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4091 (get_offsets, remote_check_symbols, remote_supported_packet)
4092 (remote_query_supported, remote_packet_size)
4093 (remote_serial_quit_handler, remote_detach_pid)
4094 (remote_vcont_probe, remote_resume_with_hc)
4095 (send_interrupt_sequence, interrupt_query)
4096 (remote_notif_get_pending_events, fetch_register_using_p)
4097 (send_g_packet, process_g_packet, fetch_registers_using_g)
4098 (store_register_using_P, store_registers_using_G)
4099 (set_remote_traceframe, check_binary_download)
4100 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4101 (remote_xfer_live_readonly_partial, remote_read_bytes)
4102 (remote_send_printf, remote_flash_write, readchar)
4103 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4104 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4105 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4106 (extended_remote_disable_randomization, extended_remote_run)
4107 (send_environment_packet, extended_remote_environment_support)
4108 (extended_remote_set_inferior_cwd, remote_write_qxfer)
4109 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4110 (packet_command): Now methods of ...
4111 (remote_target): ... this class.
4112 (m_remote_state) <remote_target>: New field.
4113 (struct remote_state) <stop_reply_queue,
4114 remote_async_inferior_event_token, wait_forever_enabled_p>: New
4116 (remote_state::remote_state): Allocate stop_reply_queue.
4117 (remote_state): Delete global.
4118 (get_remote_state_raw): Delete.
4119 (remote_target::get_remote_state): Allocate m_remote_state on
4121 (get_current_remote_target): New.
4122 (remote_ops, extended_remote_ops): Delete.
4123 (wait_forever_enabled_p, remote_async_inferior_event_token):
4124 Delete, moved to struct remote_state.
4125 (remote_target::close): Delete self. Destruction bits split to
4127 (remote_target::~remote_target): ... this.
4128 (show_memory_packet_size): Adjust to use
4129 get_current_remote_target.
4130 (struct protocol_feature) <func>: Add remote_target parameter.
4131 All callers adjusted.
4132 (curr_quit_handler_target): New.
4133 (remote_serial_quit_handler): Reimplement.
4134 (remote_target::open_1): Adjust to use get_current_remote_target.
4135 Heap-allocate remote_target/extended_remote_target instances.
4136 (vcont_builder::vcont_builder): Add remote_target parameter, and
4137 save it in m_remote. All callers adjusted.
4138 (vcont_builder::m_remote): New field.
4139 (vcont_builder::restart, vcont_builder::flush)
4140 (vcont_builder::push_action): Use it.
4141 (remote_target::commit_resume): Use it.
4142 (struct queue_iter_param) <remote>: New field.
4143 (remote_target::remove_new_fork_children): Fill in 'remote' field.
4144 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4145 (check_pending_event_prevents_wildcard_vcont_callback)
4146 (remote_target::check_pending_events_prevent_wildcard_vcont)
4147 (remote_target::discard_pending_stop_replies)
4148 (remote_target::discard_pending_stop_replies_in_queue)
4149 (remote_target::remote_notif_remove_queued_reply): Fill in
4151 (remote_notif_get_pending_events): New.
4152 (remote_target::readchar, remote_target::remote_serial_write):
4153 Save/restore curr_quit_handler_target.
4155 (kill_new_fork_children): Fill in 'remote' field.
4156 (packet_command): Use get_current_remote_target, defer to
4157 remote_target method of same name.
4158 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4159 parameter, and save it in m_remote. All callers adjusted.
4160 (scoped_remote_fd::release): Use m_remote.
4161 (scoped_remote_fd::m_remote): New field.
4162 (remote_file_put, remote_file_get, remote_file_delete): Use
4163 get_current_remote_target, defer to remote_target method of same
4165 (remote_btrace_reset): Add remote_state paremeter. Update all
4167 (remote_async_inferior_event_handler). Pass down 'data'.
4168 (remote_new_objfile): Use get_current_remote_target.
4169 (remote_target::vcont_r_supported): New.
4170 (set_range_stepping): Use get_current_remote_target and
4171 remote_target::vcont_r_supported.
4172 (_initialize_remote): Don't allocate 'remote_state' and
4173 'stop_reply_queue' globals.
4174 * remote.h (struct remote_target): Forward declare.
4175 (getpkt, putpkt, remote_notif_get_pending_events): Add
4176 'remote_target' parameter.
4178 2018-05-22 Pedro Alves <palves@redhat.com>
4180 * remote.c (vcont_builder): Now a class. Make all data members
4182 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4184 (vcont_builder_restart): Rename to ...
4185 (vcont_builder::restart): ... this.
4186 (vcont_builder_flush): Rename to ...
4187 (vcont_builder::flush): ... this.
4188 (vcont_builder_push_action): Rename to ...
4189 (vcont_builder::push_action): ... this.
4190 (remote_target::commit_resume): Adjust.
4192 2018-05-22 Pedro Alves <palves@redhat.com>
4194 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4195 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4196 (get_fixed_memory_packet_size): New.
4197 (get_memory_packet_size): Use it.
4198 (set_memory_packet_size): Don't override the config size with
4199 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4200 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4201 Don't refer to get_memory_packet_size if not connected to a remote
4202 target. Show "(default)" if configured size is 0.
4204 2018-05-22 Pedro Alves <palves@redhat.com>
4206 * remote.c (remote_target::mourn_inferior): Move
4207 discard_pending_stop_replies call here from ...
4208 (_initialize_remote): ... here.
4210 2018-05-22 Pedro Alves <palves@redhat.com>
4212 * remote.c (compare_section_command): Remove set_general_process
4215 2018-05-22 Pedro Alves <palves@redhat.com>
4217 * remote.c (struct packet_reg, struct remote_arch_state):
4218 Move higher up in the file.
4219 (remote_state) <m_arch_states>: Store remote_arch_state values
4220 instead of remote_arch_state pointers.
4221 (remote_state::get_remote_arch_state): Adjust.
4223 2018-05-22 Pedro Alves <palves@redhat.com>
4225 * remote.c: Include <unordered_map>.
4226 (remote_state): Now a class.
4227 (remote_state) <get_remote_arch_state>: Declare method.
4228 <get_remote_arch_state>: New field.
4229 (remote_arch_state) <remote_arch_state>: Declare ctor.
4230 <regs>: Now a unique_ptr.
4231 (remote_gdbarch_data_handle): Delete.
4232 (get_remote_arch_state): Delete.
4233 (remote_state::get_remote_arch_state): New.
4234 (get_remote_state): Adjust to call remote_state's
4235 get_remote_arch_state method.
4236 (init_remote_state): Delete, bits factored out to ...
4237 (remote_arch_state::remote_arch_state): ... this new method.
4238 (get_remote_packet_size, get_memory_packet_size)
4239 (process_g_packet, remote_target::fetch_registers)
4240 (remote_target::prepare_to_store, store_registers_using_G)
4241 (remote_target::store_registers, remote_target::get_trace_status):
4242 Adjust to call remote_state's method.
4243 (_initialize_remote): Remove reference to
4244 remote_gdbarch_data_handle.
4246 2018-05-22 Pedro Alves <palves@redhat.com>
4248 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4249 pread>: New method declarations.
4250 (remote_target::open_1): Adjust.
4251 (readahead_cache_invalidate): Rename to ...
4252 (readahead_cache::invalidate): ... this, and adjust to be a class
4254 (readahead_cache_invalidate_fd): Rename to ...
4255 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4257 (remote_hostio_pwrite): Adjust.
4258 (remote_hostio_pread_from_cache): Rename to ...
4259 (readahead_cache::pread): ... this, and adjust to be a class
4261 (remote_hostio_close): Adjust.
4263 2018-05-22 Pedro Alves <palves@redhat.com>
4265 * remote.c (remote_hostio_close_cleanup): Delete.
4266 (class scoped_remote_fd): New.
4267 (remote_file_put, remote_file_get): Use it.
4269 2018-05-22 Pedro Alves <palves@redhat.com>
4271 (struct vCont_action_support): Use bool and initialize all fields.
4272 (struct readahead_cache): Initialize all fields.
4273 (remote_state): Use bool and initialize all fields.
4274 (remote_state::remote_state, remote_state::~remote_state): New.
4275 (new_remote_state): Delete.
4276 (_initialize_remote): Use new to allocate remote_state.
4278 2018-05-22 Pedro Alves <palves@redhat.com>
4282 * c-exp.y: Include "c-support.h".
4283 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4284 of tolower. Use c_ident_is_alpha to scan names.
4285 * c-lang.c: Include "c-support.h".
4286 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4287 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4288 * c-support.h: New file, with bits factored out from ...
4289 * cp-name-parser.y: ... this file.
4290 Include "c-support.h".
4291 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4292 c-support.h and renamed.
4293 (symbol_end, yylex): Adjust.
4295 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4297 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4298 parameter type to CORE_ADDR.
4299 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4300 parameter type in declaration to CORE_ADDR.
4301 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4302 target_auxv_search to get AT_HWCAP and use the result to get the
4304 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4305 to CORE_ADDR. Remove the cast of the return value to unsigned
4306 long. Fix error predicate of target_auxv_search.
4307 (ppc_linux_nat_target::read_description): Change the type of the
4308 hwcap variable to CORE_ADDR.
4310 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4312 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4313 if the size of fpscr is larger than 32 bits.
4315 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4317 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4318 (ppc32_linux_vsxregmap): New global.
4319 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4320 regcache_supply_regset, and regcache_collect_regset.
4321 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4322 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4323 (fetch_vsx_register, store_vsx_register): Remove.
4324 (fetch_vsx_registers): Add regno parameter. Get regset using
4325 ppc_linux_vsxregset. Use regset to supply registers.
4326 (store_vsx_registers): Add regno parameter. Get regset using
4327 ppc_linux_vsxregset. Use regset to collect registers.
4328 (fetch_register): Call fetch_vsx_registers instead of
4330 (store_register): Call store_vsx_registers instead of
4332 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4333 new regno parameter.
4334 (store_ppc_registers): Call store_vsx_registers with -1 for the
4335 new regno parameter.
4336 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4337 (ppc_collect_vsxregset): Remove.
4339 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4341 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4343 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4344 for vector register offset fields.
4345 (ppc64_fbsd_reg_offsets): Likewise.
4346 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4347 to vector register offset fields.
4348 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4349 to vector register offset fields.
4350 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4351 vector register offset fields.
4352 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4353 initializers for vector register offset fields.
4354 (rs6000_aix64_reg_offsets): Likewise.
4355 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4356 (ppc_supply_vrregset): Remove.
4357 (ppc_collect_vrregset): Remove.
4358 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4359 (ppc_linux_vrregset) : New function.
4360 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4361 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4362 (ppc32_linux_vrregset): Remove.
4363 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4364 and use result instead of ppc32_linux_vrregset.
4365 (ppc32_linux_reg_offsets): Remove initializers for vector register
4367 (ppc64_linux_reg_offsets): Likewise.
4368 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4369 * ppc-linux-nat.c: Include regset.h.
4370 (gdb_vrregset_t): Adjust comment to account for little-endian
4372 (supply_vrregset, fill_vrregset): Remove.
4373 (fetch_altivec_register, store_altivec_register): Remove.
4374 (fetch_altivec_registers): Add regno parameter. Get regset using
4375 ppc_linux_vrregset. Use regset to supply registers.
4376 (store_altivec_registers): Add regno parameter. Get regset using
4377 ppc_linux_vrregset. Use regset to collect registers.
4378 (fetch_register): Call fetch_altivec_registers instead of
4379 fetch_altivec_register.
4380 (store_register): Call store_altivec_registers instead of
4381 store_altivec_register.
4382 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4383 the new regno parameter.
4384 (store_ppc_registers): Call store_altivec_registers with -1 for
4385 the new regno parameter.
4387 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4389 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4390 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4391 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4392 (gdb_vrregset_t): Change array type size to
4393 PPC_LINUX_SIZEOF_VRREGSET.
4394 (gdb_vsxregset_t): Change array type size to
4395 PPC_LINUX_SIZEOF_VSXREGSET.
4396 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4397 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4398 PPC_LINUX_SIZEOF_VSXREGSET.
4400 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4402 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4403 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4405 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4406 ppc_linux_target_wordsize with tid.
4407 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4409 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4410 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4411 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4412 tid parameter. Remove static specifier.
4413 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4414 (ppc_linux_target_wordsize): New declaration.
4416 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4418 * arch/ppc-linux-common.c: New file.
4419 * arch/ppc-linux-common.h: New file.
4420 * arch/ppc-linux-tdesc.h: New file.
4421 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4422 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4423 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4424 arch/ppc-linux-tdesc.h.
4425 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4426 arch/ppc-linux-tdesc.h.
4427 (ppc_linux_nat_target::read_description): Remove target
4428 description matching code. Fill a ppc_linux_features struct and
4429 call ppc_linux_match_description with it. Move comment about ISA
4430 2.05 to ppc-linux-common.c.
4431 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4432 arch/ppc-linux-tdesc.h.
4433 (ppc_linux_core_read_description): Remove target description
4434 matching code. Fill a ppc_linux_features struct and call
4435 ppc_linux_match_description with it.
4436 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4437 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4438 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4439 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4440 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4441 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4442 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4443 (tdesc_powerpc_e500l): Remove.
4445 2018-05-22 Joel Brobecker <brobecker@adacore.com>
4447 * ada-lang.c (catch_assert_command): Pass empty string instead
4448 of NULL for excep_string argument.
4450 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4452 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4453 the width of the requested register exceeds the width of the
4456 2018-05-21 Tom Tromey <tom@tromey.com>
4458 * printcmd.c (output_command): Remove.
4459 (output_command_const): Rename to output_command.
4460 * valprint.h (output_command): Rename from output_command_const.
4461 * tracepoint.c (trace_dump_actions): Call output_command.
4463 2018-05-21 Tom Tromey <tom@tromey.com>
4465 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4466 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4467 * ada-lang.h (create_ada_exception_catchpoint): Update.
4468 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4470 (create_excep_cond_exprs, ~ada_catchpoint)
4471 (should_stop_exception, print_one_exception)
4472 (print_mention_exception, print_recreate_exception): Update.
4473 (ada_get_next_arg): Remove.
4474 (catch_ada_exception_command_split): Use std::string. Change type
4475 of "excep_string", "cond_string".
4476 (catch_ada_exception_command): Update.
4477 (create_ada_exception_catchpoint): Change type of excep_string.
4478 (ada_exception_sal): Remove excep_string parameter.
4479 (~ada_catchpoint): Remove.
4481 2018-05-21 Tom Tromey <tom@tromey.com>
4483 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4486 2018-05-21 Tom Tromey <tom@tromey.com>
4488 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4489 Return unique_xmalloc_ptr.
4490 (print_it_exception): Update.
4492 2018-05-21 Tom Tromey <tom@tromey.com>
4494 * tracepoint.c (trace_dump_actions): Use std::string.
4496 2018-05-21 Tom Tromey <tom@tromey.com>
4498 * symfile.c (reread_symbols): Use std::string for original_name.
4500 2018-05-21 Tom Tromey <tom@tromey.com>
4502 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4503 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4506 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4508 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4510 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4511 * objfiles.c (get_objfile_bfd_data): Allocate
4512 objfile_per_bfd_storage with obstack_new when allocating on
4515 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4517 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4519 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4520 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4521 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4522 (add_pending): Likewise.
4523 (parse_symbol): Likewise.
4524 (parse_partial_symbols): Likewise.
4525 (psymtab_to_symtab_1): Likewise.
4526 (new_psymtab): Likewise.
4527 (elfmdebug_build_psymtabs): Likewise.
4528 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4529 * objfiles.c (get_objfile_bfd_data): Likewise.
4530 (objfile_register_static_link): Likewise.
4531 * psymtab.c (allocate_psymtab): Likewise.
4532 * stabsread.c (read_member_functions): Likewise.
4533 * xcoffread.c (xcoff_end_psymtab): Likewise.
4535 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4537 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4538 compiler supports std::is_trivially_constructible.
4539 * common/poison.h: Include obstack.h.
4540 (IsMallocable): Define to is_trivially_constructible if the
4541 compiler supports it, define to true_type otherwise.
4545 (XOBNEWVEC): Redefine.
4546 * gdb_obstack.h (obstack_zalloc): New.
4547 (OBSTACK_ZALLOC): Redefine.
4548 (obstack_calloc): New.
4549 (OBSTACK_CALLOC): Redefine.
4551 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4552 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4554 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4555 obstack_calloc/obstack_zalloc.
4556 (gdbarch_obstack_zalloc): Remove.
4557 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4559 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4561 * stack.c (backtrace_command_1): Remove useless variable int i.
4563 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4565 * stack.c (print_frame_info): Fix comment.
4567 2018-05-18 Tom Tromey <tom@tromey.com>
4569 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4570 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4571 (~dwarf2_per_objfile): Update
4572 (dwarf2_get_dwz_file): Use new.
4573 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4576 2018-05-18 Tom Tromey <tom@tromey.com>
4578 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4580 * dwarf2read.c (struct dwp_file): Add constructor and
4582 (open_and_init_dwp_file): Return a unique_ptr.
4583 (dwarf2_per_objfile, create_dwp_hash_table)
4584 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4585 (lookup_dwo_unit_in_dwp): Update.
4586 (open_and_init_dwp_file, get_dwp_file): Update.
4588 2018-05-18 Tom Tromey <tom@tromey.com>
4590 * dwarf2read.c (dwarf2_per_objfile): Update.
4591 (struct mapped_index): Add initializers.
4592 (dwarf2_read_index): Use new.
4593 (dw2_symtab_iter_init): Update.
4594 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4597 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4599 * dwarf2read.c (mapped_index) <total_size>: Remove.
4601 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4603 * unittests/format_pieces-selftests.c (test_format_specifier):
4606 2018-05-18 Tom Tromey <tom@tromey.com>
4608 * c-typeprint.c (maybe_print_hole): New function.
4609 (c_print_type_struct_field_offset): Update.
4610 (c_type_print_base_struct_union): Call maybe_print_hole.
4612 2018-05-17 Keith Seitz <keiths@redhat.com>
4614 * breakpoint.c (build_bpstat_chain): New function, moved from
4616 (bpstat_stop_status): Add optional parameter, `stop_chain'.
4617 If no stop chain is passed, call build_bpstat_chain to build it.
4618 * breakpoint.h (build_bpstat_chain): Declare.
4619 (bpstat_stop_status): Move documentation here from breakpoint.c.
4620 * infrun.c (handle_signal_stop): Before eliding inlined frames,
4621 build the stop chain and pass it to skip_inline_frames.
4622 Pass this stop chain to bpstat_stop_status.
4623 * inline-frame.c: Include breakpoint.h.
4624 (stopped_by_user_bp_inline_frame): New function.
4625 (skip_inline_frames): Add parameter `stop_chain'.
4626 Move documention to inline-frame.h.
4627 If non-NULL, use stopped_by_user_bp_inline_frame to determine
4628 whether the frame should be elided.
4629 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4630 Add moved documentation and update for new parameter.
4632 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4635 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4636 unittests/format_pieces-selftests.c.
4637 * common/format.h (format_piece) <operator==>: New.
4638 (format_pieces) <operator[]>: Remove.
4639 * common/format.c (format_pieces::format_pieces): Handle \e.
4640 * unittests/format_pieces-selftests.c: New.
4642 2018-05-17 Tom Tromey <tom@tromey.com>
4645 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4646 (dw2_instantiate_symtab): Add skip_partial parameter.
4647 (dw2_find_last_source_symtab, dw2_map_expand_apply)
4648 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4649 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4650 (dw2_expand_symtabs_matching_one)
4651 (dw2_find_pc_sect_compunit_symtab)
4652 (dw2_debug_names_lookup_symbol)
4653 (dw2_debug_names_expand_symtabs_for_function): Update.
4654 (init_cutu_and_read_dies): Add skip_partial parameter.
4655 (process_psymtab_comp_unit, build_type_psymtabs_1)
4656 (process_skeletonless_type_unit, load_partial_comp_unit)
4657 (psymtab_to_symtab_1): Update.
4658 (load_full_comp_unit): Add skip_partial parameter.
4659 (process_imported_unit_die, dwarf2_read_addr_index)
4660 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4661 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4662 (read_signatured_type): Update.
4664 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4666 * value.c (release_value): Remove unused variable.
4667 (record_latest_value): Likewise.
4668 (access_value_history): Likewise.
4669 (preserve_values): Likewise.
4671 2018-05-17 Tom Tromey <tom@tromey.com>
4673 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4676 2018-05-16 Maciej W. Rozycki <macro@mips.com>
4679 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4680 Also handle registers whose width is not a multiple of
4682 (linux_nat_trad_target::store_register): Likewise.
4684 2018-05-16 Tom Tromey <tom@tromey.com>
4686 * gdbcore.h (core_bfd): Redefine.
4687 * corelow.c (core_target::close): Update.
4688 (core_target_open): Update.
4689 * progspace.h (struct program_space) <cbfd>: Now a
4692 2018-05-16 Tom Tromey <tom@tromey.com>
4695 * symfile-add-flags.h (enum symfile_add_flags)
4696 <SYMFILE_NOT_FILENAME>: New constant.
4697 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
4698 objfile name from BFD.
4699 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4700 * minidebug.c (find_separate_debug_file_in_section): Put
4701 ".gnu_debugdata" into BFD's file name.
4703 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
4705 * regcache.c (regcache_read_ftype, regcache_write_ftype):
4708 2018-05-15 Tamar Christina <tamar.christina@arm.com>
4711 * aarch64-tdep.c (aarch64_analyze_prologue,
4712 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4713 Indicate not interested in errors.
4715 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4717 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4718 Supply the MIPS_ZERO_REGNUM register.
4720 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4722 * mips-tdep.c (mask_address_var): Make variable static.
4724 2018-05-14 Tom Tromey <tom@tromey.com>
4726 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4728 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
4730 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4731 FXSAVE_ADDR for the mxcsr register.
4733 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
4735 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4737 2018-05-11 Pedro Alves <palves@redhat.com>
4739 * corelow.c (core_target) <core_target>: No longer inline.
4740 Initialize m_core_gdbarch, m_core_vec and build the section table
4742 <~core_target>: New.
4743 <core_gdbarch, get_core_register_section>: New methods.
4744 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4745 factored out from ...
4746 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4748 (sniff_core_bfd): Add gdbarch parameter.
4749 (core_close): Delete, merged into ...
4750 (core_target::close): ... here. Delete self.
4751 (core_close_cleanup): Delete.
4752 (core_target_open): Allocate a core_target on the heap. Use a
4753 unique_ptr instead of a cleanup. Bits moved into the core_target
4754 ctor. Adjust to use core_target methods instead of globals.
4755 (get_core_register_section): Rename to ...
4756 (core_target::get_core_register_section): ... this and adjust.
4757 (struct get_core_registers_cb_data): New.
4758 (get_core_registers_cb): Use it. Use bool.
4759 (core_target::fetch_registers, core_target::files_info)
4760 (core_target::xfer_partial, core_target::read_description)
4761 (core_target::pid_to, core_target::thread_name): Adjust to
4762 reference class fields instead of globals.
4763 * target.h (struct target_ops_deleter, target_ops_up): New.
4765 2018-05-11 Pedro Alves <palves@redhat.com>
4767 * corefile.c (core_file_command): Move to corelow.c.
4768 * corelow.c (the_core_target): Delete.
4769 (core_file_command): Moved from corefile.c. Check exec_bfd
4770 instead of the_core_target. Use target_detach instead of calling
4771 into the_core_target directly.
4772 (maybe_say_no_core_file_now): New.
4773 (core_target::detach): Use it.
4774 (_initialize_corelow): Remove references to the_core_target.
4775 * gdbcore.h (the_core_target): Delete.
4777 2018-05-11 Tom Tromey <tromey@redhat.com>
4778 Pedro Alves <palves@redhat.com>
4780 * corefile.c (core_bfd): Remove.
4781 * gdbcore.h (core_bfd): Now a macro.
4782 * progspace.h (struct program_space) <cbfd>: New field.
4784 2018-05-11 Tom Tromey <tom@tromey.com>
4786 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4789 2018-05-10 Tom Tromey <tom@tromey.com>
4791 * configure: Rebuild.
4792 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4794 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4797 * regformats/regdat.sh: Adjust script, following the addition
4798 of the new expedite_regs parameter to init_target_desc.
4800 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
4803 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4804 set_gdbarch_significant_addr_bit.
4805 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4806 set_gdbarch_significant_addr_bit.
4807 * utils.c (address_significant): Update to sign extend addr.
4809 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
4811 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4812 (xtensa_linux_init_abi): Limit tdep->num_regs by
4813 tdep->num_nopriv_regs.
4814 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4815 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4818 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
4820 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4822 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4824 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4825 (I387_MXCSR_INIT_VAL): New constant.
4826 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4827 buffer if it was supplied by the inferior.
4828 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4829 (i387_xsave_get_clear_bv): New function.
4830 (i387_supply_xsave): Only read x87 control registers from the
4831 xsave buffer if the feature is enabled, and the state will have
4832 been written, otherwise, provide a suitable default.
4833 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4834 including x87 control registers. Update control registers if they
4835 have changed from the default value, and mark features as enabled
4837 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4839 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4841 * spu-tdep.c (info_spu_event_command): Fix output formatting.
4843 2018-05-07 Tom Tromey <tom@tromey.com>
4845 * configure: Rebuild.
4846 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4848 2018-05-07 Tom Tromey <tom@tromey.com>
4851 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4852 bit. Use correct value for VDIV.
4854 2018-05-04 Tom Tromey <tom@tromey.com>
4856 * configure: Rebuild.
4857 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4859 2018-05-04 Tom Tromey <tom@tromey.com>
4861 * linux-record.c (record_linux_system_call) <case
4862 RECORD_SYS_RECVFROM>: Add "break".
4864 2018-05-04 Tom Tromey <tom@tromey.com>
4866 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4867 Add missing "break".
4868 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4869 Add missing "break".
4871 2018-05-04 Tom Tromey <tom@tromey.com>
4873 * rs6000-tdep.c (ppc_process_record_op4)
4874 (ppc_process_record_op63): Add fall-through comment.
4876 2018-05-04 Tom Tromey <tom@tromey.com>
4878 * i386-tdep.c (i386_process_record): Add fall-through comment.
4880 2018-05-04 Tom Tromey <tom@tromey.com>
4882 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4885 2018-05-04 Tom Tromey <tom@tromey.com>
4887 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4888 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4889 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4891 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4893 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4896 2018-05-04 Tom Tromey <tom@tromey.com>
4898 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4900 2018-05-04 Tom Tromey <tom@tromey.com>
4902 * s390-tdep.c (s390_process_record): Fix fall-through comments.
4903 * xcoffread.c (scan_xcoff_symtab): Move comment later.
4904 * symfile.c (section_is_mapped): Fix fall-through comment.
4905 * stabsread.c (define_symbol, read_member_functions): Fix
4906 fall-through comment.
4907 * s390-linux-tdep.c (s390_process_record): Fix fall-through
4909 * remote.c (remote_wait_as): Fix fall-through comment.
4910 * p-exp.y (yylex): Fix fall-through comment.
4911 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4913 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4914 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4915 * jv-exp.y (yylex): Fix fall-through comment.
4916 * go-exp.y (lex_one_token): Fix fall-through comment.
4917 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4918 fall-through comment.
4919 * f-exp.y (yylex): Fix fall-through comment.
4920 * dwarf2read.c (process_die): Fix fall-through comments.
4921 * dbxread.c (process_one_symbol): Fix fall-through comment.
4922 * d-exp.y (lex_one_token): Fix fall-through comment.
4923 * cp-name-parser.y (yylex): Fix fall-through comment.
4924 * coffread.c (coff_symtab_read): Fix fall-through comment.
4925 * c-exp.y (lex_one_token): Fix fall-through comment.
4926 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4928 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4931 2018-05-04 Tom Tromey <tom@tromey.com>
4934 * NEWS: Mention gdb.execute change.
4935 * gdbcmd.h (execute_control_command): Don't declare.
4936 * python/python.c (execute_gdb_command): Use read_command_lines_1,
4937 execute_control_commands, execute_control_commands_to_string.
4938 * cli/cli-script.h (execute_control_commands)
4939 (execute_control_commands_to_string): Declare.
4940 (execute_control_command): Add from_tty parameter.
4941 * cli/cli-script.c (execute_control_commands)
4942 (execute_control_commands_to_string): New functions.
4943 (execute_user_command): Use execute_control_commands.
4944 (execute_control_command_1): Add "from_tty" parameter. Update.
4945 (execute_control_command): Likewise.
4947 2018-05-04 Tom Tromey <tom@tromey.com>
4950 * NEWS: Mention that breakpoint commands are writable.
4951 * python/py-breakpoint.c (bppy_set_commands): New function.
4952 (breakpoint_object_getset) <"commands">: Use it.
4954 2018-05-04 Tom Tromey <tom@tromey.com>
4956 * tracepoint.c (actions_command): Update.
4957 * mi/mi-cmd-break.c (mi_command_line_array)
4958 (mi_command_line_array_cnt, mi_command_line_array_ptr)
4959 (mi_read_next_line): Remove.
4960 (mi_cmd_break_commands): Update.
4961 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4963 * cli/cli-script.c (get_command_line): Update.
4964 (process_next_line): Use function_view. Constify.
4965 (recurse_read_control_structure, read_command_lines)
4966 (read_command_lines_1): Change argument types to function_view.
4967 (do_define_command, document_command): Update.
4968 * breakpoint.h (check_tracepoint_command): Don't declare.
4969 * breakpoint.c (check_tracepoint_command): Remove.
4970 (commands_command_1, create_tracepoint_from_upload): Update.
4972 2018-05-04 Tom Tromey <tom@tromey.com>
4975 * cli/cli-script.h (enum command_control_type) <define_control>:
4977 * cli/cli-script.c (multi_line_command_p): Handle define_control.
4978 (build_command_line, execute_control_command_1)
4979 (process_next_line): Likewise.
4980 (do_define_command): New function, extracted from define_command.
4981 (define_command): Use it.
4983 2018-05-04 Tom Tromey <tom@tromey.com>
4985 * tracepoint.c (actions_command): Update.
4986 * cli/cli-script.h (read_command_lines): Update.
4987 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4988 (MAX_TMPBUF): Remove define.
4989 (define_command): Use string_printf.
4990 (document_command): Likewise.
4991 * breakpoint.c (commands_command_1): Update.
4993 2018-05-04 Tom Tromey <tom@tromey.com>
4995 * top.c (execute_command): Update.
4996 * cli/cli-script.h (print_command_lines): Now varargs.
4997 * cli/cli-script.c (print_command_lines): Now varargs.
4998 (execute_control_command_1) <case while_control, case if_control>:
5001 2018-05-04 Tom Tromey <tom@tromey.com>
5003 * tracepoint.c (all_tracepoint_actions): Rename from
5004 all_tracepoint_actions_and_cleanup. Change return type.
5005 (actions_command, encode_actions_1, encode_actions)
5006 (trace_dump_actions, tdump_command): Update.
5007 * remote.c (remote_download_command_source): Update.
5008 * python/python.c (gdbpy_eval_from_control_command)
5009 (python_command, python_interactive_command): Update.
5010 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5011 * guile/guile.c (guile_command)
5012 (gdbscm_eval_from_control_command, guile_command): Update.
5013 * compile/compile.c (compile_code_command)
5014 (compile_print_command, compile_to_object): Update.
5015 * cli/cli-script.h (struct command_lines_deleter): New.
5016 (counted_command_line): New typedef.
5017 (struct command_line): Add constructor, destructor.
5018 <body_list>: Remove.
5019 <body_list_0, body_list_1>: New members.
5020 (command_line_up): Remove typedef.
5021 (read_command_lines, read_command_lines_1, get_command_line):
5023 (copy_command_lines): Don't declare.
5024 * cli/cli-script.c (build_command_line): Use "new".
5025 (get_command_line): Return counted_command_line.
5026 (print_command_lines, execute_user_command)
5027 (execute_control_command_1, while_command, if_command): Update.
5028 (realloc_body_list): Remove.
5029 (process_next_line, recurse_read_control_structure): Update.
5030 (read_command_lines, read_command_lines_1): Return counted_command_line.
5031 (free_command_lines): Use "delete".
5032 (copy_command_lines): Remove.
5033 (define_command, document_command, show_user_1): Update.
5034 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5035 a counted_command_line.
5036 * breakpoint.h (counted_command_line): Remove typedef.
5037 (breakpoint_set_commands): Update.
5038 * breakpoint.c (check_no_tracepoint_commands)
5039 (validate_commands_for_breakpoint): Update.
5040 (breakpoint_set_commands): Change commands to be a
5041 counted_command_line.
5042 (commands_command_1, update_dprintf_command_list)
5043 (create_tracepoint_from_upload): Update.
5045 2018-05-04 Tom Tromey <tom@tromey.com>
5047 * cli/cli-decode.h (cmd_list_element): New constructor.
5048 (~cmd_list_element): New destructor.
5049 (struct cmd_list_element): Add initializers.
5050 * cli/cli-decode.c (do_add_cmd): Use "new".
5051 (delete_cmd): Use "delete".
5053 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5054 Pedro Alves <palves@redhat.com>
5056 PR breakpoints/19806 and support for PR external/20207.
5057 * NEWS: Mention Aarch64 watchpoint improvements.
5058 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5059 watchpoints and PR external/20207 watchpoints.
5060 * nat/aarch64-linux-hw-point.c
5061 (kernel_supports_any_contiguous_range): New.
5062 (aarch64_watchpoint_offset): New.
5063 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5064 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5065 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5066 (aarch64_align_watchpoint): New parameters aligned_offset_p and
5067 next_addr_orig_p. Support PR external/20207 watchpoints.
5068 (aarch64_downgrade_regs): New.
5069 (aarch64_dr_state_insert_one_point): New parameters offset and
5071 (aarch64_dr_state_remove_one_point): Likewise.
5072 (aarch64_handle_breakpoint): Update caller.
5073 (aarch64_handle_aligned_watchpoint): Likewise.
5074 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5076 (aarch64_linux_set_debug_regs): Remove const from state. Call
5077 aarch64_downgrade_regs.
5078 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5079 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5080 (DR_CONTROL_MASK): ... this.
5081 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5082 (unsigned int aarch64_watchpoint_offset): New prototype.
5083 (aarch64_linux_set_debug_regs): Remove const from state.
5084 * utils.c (align_up, align_down): Move to ...
5085 * common/common-utils.c (align_up, align_down): ... here.
5086 * utils.h (align_up, align_down): Move to ...
5087 * common/common-utils.h (align_up, align_down): ... here.
5089 2018-05-04 Joel Brobecker <brobecker@adacore.com>
5091 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5092 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5093 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5094 Re-implement to match the ABI as summarized in GCC's
5095 gcc/config/sparc/sparc.c. All callers updated.
5096 (sparc32_store_arguments): Remove assertion.
5098 2018-05-04 Tom Tromey <tom@tromey.com>
5100 * printcmd.c: Don't include tui.h.
5101 (decode_format): Use skip_spaces.
5103 2018-05-04 Tom Tromey <tom@tromey.com>
5106 * printcmd.c (last_count): New global.
5107 (x_command): Use saved count when repeating.
5109 2018-05-04 Tom Tromey <tom@tromey.com>
5111 * nto-procfs.c (do_closedir_cleanup): Remove.
5112 (procfs_pidlist): Use gdb_dir_up.
5113 * procfs.c (do_closedir_cleanup): Remove.
5114 (proc_update_threads): Use gdb_dir_up.
5115 * common/filestuff.h (struct gdb_dir_deleter): New.
5116 (gdb_dir_up): New typedef.
5118 2018-05-04 Tom Tromey <tom@tromey.com>
5120 * ada-lang.c (print_mention_exception): Use std::string.
5122 2018-05-04 Tom Tromey <tom@tromey.com>
5124 * ada-lang.c (create_excep_cond_exprs): Update.
5125 (ada_exception_catchpoint_cond_string): Use std::string.
5127 2018-05-04 Tom Tromey <tom@tromey.com>
5129 * ada-lang.c (xget_renaming_scope): Return std::string.
5130 (old_renaming_is_invisible): Update.
5132 2018-05-04 Tom Tromey <tom@tromey.com>
5134 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5135 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5137 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
5139 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5141 2018-05-04 Tom Tromey <tom@tromey.com>
5143 * remote.c (remote_query_supported_append): Change type.
5144 (remote_check_symbols): Update.
5146 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
5149 * configure.ac: Prepend libpython.
5150 * python/python-config.py: Likewise.
5151 * configure: Regenerate.
5153 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
5155 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5157 2018-05-03 Pedro Alves <palves@redhat.com>
5160 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5161 override. Write 'true' instead of '1'.
5162 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5165 2018-05-02 Pedro Alves <palves@redhat.com>
5167 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5168 add_inf_child_target.
5169 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5170 add_inf_child_target.
5171 * aix-thread.c (aix_thread_target_info): New.
5172 (aix_thread_target) <shortname, longname, doc>: Delete.
5174 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5175 add_inf_child_target.
5176 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5177 add_inf_child_target.
5178 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5179 add_inf_child_target.
5180 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5181 add_inf_child_target.
5182 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5183 add_inf_child_target.
5184 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5185 add_inf_child_target.
5186 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5187 add_inf_child_target.
5188 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5189 add_inf_child_target.
5190 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5191 add_inf_child_target.
5192 * bfd-target.c (target_bfd_target_info): New.
5193 (target_bfd) <shortname, longname, doc>: Delete.
5195 * bsd-kvm.c (bsd_kvm_target_info): New.
5196 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5198 (bsd_kvm_target::open): Rename to ...
5199 (bsd_kvm_target_open): ... this. Adjust.
5200 * bsd-uthread.c (bsd_uthread_target_info): New.
5201 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5203 * corefile.c (core_file_command): Adjust.
5204 * corelow.c (core_target_info): New.
5205 (core_target) <shortname, longname, doc>: Delete.
5207 (core_target::open): Rename to ...
5208 (core_target_open): ... this. Adjust.
5209 * ctf.c (ctf_target_info): New.
5210 (ctf_target) <shortname, longname, doc>: Delete.
5212 (ctf_target::open): Rename to ...
5213 (ctf_target_open): ... this.
5214 (_initialize_ctf): Adjust.
5215 * exec.c (exec_target_info): New.
5216 (exec_target) <shortname, longname, doc>: Delete.
5218 (exec_target::open): Rename to ...
5219 (exec_target_open): ... this.
5220 * gdbcore.h (core_target_open): Declare.
5221 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5222 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5223 add_inf_child_target.
5224 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5225 add_inf_child_target.
5226 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5227 add_inf_child_target.
5228 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5229 add_inf_child_target.
5230 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5231 add_inf_child_target.
5232 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5233 add_inf_child_target.
5234 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5235 add_inf_child_target.
5236 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5237 add_inf_child_target.
5238 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5239 add_inf_child_target.
5240 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5241 add_inf_child_target.
5242 * inf-child.c (inf_child_target_info): New.
5243 (inf_child_target::info): New.
5244 (inf_child_open_target): Remove 'target' parameter. Use
5245 get_native_target instead.
5246 (inf_child_target::open): Delete.
5247 (add_inf_child_target): New.
5248 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5251 (add_inf_child_target): Declare.
5252 (inf_child_open_target): Declare.
5253 * linux-thread-db.c (thread_db_target_info): New.
5254 (thread_db_target) <shortname, longname, doc>: Delete.
5256 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5257 add_inf_child_target.
5258 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5259 add_inf_child_target.
5260 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5261 add_inf_child_target.
5262 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5263 add_inf_child_target.
5264 * make-target-delegates (print_class): Adjust.
5265 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5266 add_inf_child_target.
5267 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5268 add_inf_child_target.
5269 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5270 add_inf_child_target.
5271 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5272 add_inf_child_target.
5273 * nto-procfs.c (nto_native_target_info): New.
5274 (nto_procfs_target_native) <shortname, longname, doc>:
5277 (nto_procfs_target_info): New.
5278 (nto_procfs_target_procfs) <shortname, longname, doc>:
5281 (init_procfs_targets): Adjust.
5282 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5283 add_inf_child_target.
5284 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5285 add_inf_child_target.
5286 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5287 add_inf_child_target.
5288 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5289 add_inf_child_target.
5290 * ravenscar-thread.c (ravenscar_target_info): New.
5291 (ravenscar_thread_target) <shortname, longname, doc>:
5294 * record-btrace.c (record_btrace_target_info):
5295 (record_btrace_target) <shortname, longname, doc>: Delete.
5297 (record_btrace_target::open): Rename to ...
5298 (record_btrace_target_open): ... this. Adjust.
5299 * record-full.c (record_longname, record_doc): New.
5300 (record_full_base_target) <shortname, longname, doc>: Delete.
5302 (record_full_target_info): New.
5303 (record_full_target): <shortname>: Delete.
5305 (record_full_core_open_1, record_full_open_1): Update comments.
5306 (record_full_base_target::open): Rename to ...
5307 (record_full_open): ... this.
5308 (cmd_record_full_restore): Update.
5309 (_initialize_record_full): Update.
5310 * remote-sim.c (remote_sim_target_info): New.
5311 (gdbsim_target) <shortname, longname, doc>: Delete.
5313 (gdbsim_target::open): Rename to ...
5314 (gdbsim_target_open): ... this.
5315 (_initialize_remote_sim): Adjust.
5316 * remote.c (remote_doc): New.
5317 (remote_target_info): New.
5318 (remote_target) <shortname, longname, doc>: Delete.
5320 (extended_remote_target_info): New.
5321 (extended_remote_target) <shortname, longname, doc>: Delete.
5323 (remote_target::open_1): Make static. Adjust.
5324 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5325 * s390-linux-nat.c (_initialize_s390_nat): Use
5326 add_inf_child_target.
5327 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5328 add_inf_child_target.
5329 * sol-thread.c (thread_db_target_info): New.
5330 (sol_thread_target) <shortname, longname, doc>: Delete.
5332 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5333 add_inf_child_target.
5334 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5335 add_inf_child_target.
5336 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5337 add_inf_child_target.
5338 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5339 add_inf_child_target.
5340 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5341 add_inf_child_target.
5342 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5343 add_inf_child_target.
5344 * spu-linux-nat.c (_initialize_spu_nat): Use
5345 add_inf_child_target.
5346 * spu-multiarch.c (spu_multiarch_target_info): New.
5347 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5349 * target-delegates.c: Regenerate.
5350 * target.c: Include <unordered_map>.
5351 (target_ops_p): Delete.
5352 (DEF_VEC_P(target_ops_p)): Delete.
5353 (target_factories): New.
5354 (test_target_info): New.
5355 (test_target_ops::info): New.
5356 (open_target): Adjust to use target_factories.
5357 (add_target_with_completer): Rename to ...
5358 (add_target): ... this. Change prototype. Register target_info
5359 and open callback in target_factories. Register target_info in
5360 command context instead of target_ops.
5361 (add_target): Delete old implementation.
5362 (add_deprecated_target_alias): Change prototype. Adjust.
5363 (the_native_target): New.
5364 (set_native_target, get_native_target): New.
5365 (find_default_run_target): Use the_native_target.
5366 (find_attach_target, find_run_target): Simplify.
5367 (target_ops::open): Delete.
5368 (dummy_target_info): New.
5369 (dummy_target::shortname, dummy_target::longname)
5370 (dummy_target::doc): Delete.
5371 (dummy_target::info): New.
5372 (debug_target::shortname, debug_target::longname)
5373 (debug_target::doc): Delete.
5374 (debug_target::info): New.
5375 * target.h (struct target_info): New.
5376 (target_ops::~target_ops): Add comment.
5377 (target_ops::info): New.
5378 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5379 longer virtual. Implement in terms of target_info.
5380 (set_native_target, get_native_target): Declare.
5381 (target_open_ftype): New.
5382 (add_target, add_target_with_completer)
5383 (add_deprecated_target_alias): Change prototype.
5384 (test_target) <shortname, longname, doc>: Delete.
5386 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5387 add_inf_child_target.
5388 * tracefile-tfile.c (tfile_target_info): New.
5389 (tfile_target) <shortname, longname, doc>: Delete.
5391 (tfile_target::open): Rename to ...
5392 (tfile_target_open): ... this.
5393 (_initialize_tracefile_tfile): Adjust.
5394 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5395 add_inf_child_target.
5396 * windows-nat.c (_initialize_windows_nat): Use
5397 add_inf_child_target.
5398 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5399 add_inf_child_target.
5401 2018-05-02 Pedro Alves <palves@redhat.com>
5403 * linux-nat.h (linux_nat_target) <low_new_thread,
5404 low_delete_thread, low_new_fork, low_forget_process,
5405 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5406 New virtual methods.
5407 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5408 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5409 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5410 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5411 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5413 * linux-fork.c (delete_fork): Adjust to call low method.
5414 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5415 (linux_nat_new_fork, linux_nat_forget_process_hook)
5416 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5417 (linux_nat_status_is_event):
5418 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5419 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5421 (sigtrap_is_event): Rename to ...
5422 (linux_nat_target::low_status_is_event): ... this.
5423 (linux_nat_set_status_is_event): Delete.
5424 (save_stop_reason, linux_nat_wait_1)
5425 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5427 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5428 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5429 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5430 (linux_nat_set_prepare_to_resume): Delete.
5431 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5432 low virtual methods.
5433 * amd64-linux-nat.c: Likewise.
5434 * arm-linux-nat.c: Likewise.
5435 * i386-linux-nat.c: Likewise.
5436 * ia64-linux-nat.c: Likewise.
5437 * mips-linux-nat.c: Likewise.
5438 * ppc-linux-nat.c: Likewise.
5439 * s390-linux-nat.c: Likewise.
5440 * sparc64-linux-nat.c: Likewise.
5441 * x86-linux-nat.c: Likewise.
5442 * x86-linux-nat.h: Include "nat/x86-linux.h".
5443 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5444 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5447 2018-05-02 Pedro Alves <palves@redhat.com>
5449 * target.h (target_ops)
5450 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5451 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5452 stopped_by_watchpoint, have_continuable_watchpoint,
5453 stopped_data_address, watchpoint_addr_within_range,
5454 can_accel_watchpoint_condition, can_run, thread_alive,
5455 has_all_memory, has_memory, has_stack, has_registers,
5456 has_execution, can_async_p, is_async_p, supports_non_stop,
5457 always_non_stop_p, can_execute_reverse, supports_multi_process,
5458 supports_enable_disable_tracepoint,
5459 supports_disable_randomization, supports_string_tracing,
5460 supports_evaluation_of_breakpoint_conditions,
5461 can_run_breakpoint_commands, filesystem_is_local,
5462 can_download_tracepoint, get_trace_state_variable_value,
5463 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5464 record_is_replaying, record_will_replay,
5465 augmented_libraries_svr4_read>: Adjust to return bool.
5466 * aarch64-linux-nat.c: All implementations adjusted.
5467 * aix-thread.c: All implementations adjusted.
5468 * arm-linux-nat.c: All implementations adjusted.
5469 * breakpoint.c: All implementations adjusted.
5470 * bsd-kvm.c: All implementations adjusted.
5471 * bsd-uthread.c: All implementations adjusted.
5472 * corelow.c: All implementations adjusted.
5473 * ctf.c: All implementations adjusted.
5474 * darwin-nat.c: All implementations adjusted.
5475 * darwin-nat.h: All implementations adjusted.
5476 * exec.c: All implementations adjusted.
5477 * fbsd-nat.c: All implementations adjusted.
5478 * fbsd-nat.h: All implementations adjusted.
5479 * gnu-nat.c: All implementations adjusted.
5480 * gnu-nat.h: All implementations adjusted.
5481 * go32-nat.c: All implementations adjusted.
5482 * ia64-linux-nat.c: All implementations adjusted.
5483 * inf-child.c: All implementations adjusted.
5484 * inf-child.h: All implementations adjusted.
5485 * inf-ptrace.c: All implementations adjusted.
5486 * inf-ptrace.h: All implementations adjusted.
5487 * linux-nat.c: All implementations adjusted.
5488 * linux-nat.h: All implementations adjusted.
5489 * mips-linux-nat.c: All implementations adjusted.
5490 * nto-procfs.c: All implementations adjusted.
5491 * ppc-linux-nat.c: All implementations adjusted.
5492 * procfs.c: All implementations adjusted.
5493 * ravenscar-thread.c: All implementations adjusted.
5494 * record-btrace.c: All implementations adjusted.
5495 * record-full.c: All implementations adjusted.
5496 * remote-sim.c: All implementations adjusted.
5497 * remote.c: All implementations adjusted.
5498 * s390-linux-nat.c: All implementations adjusted.
5499 * sol-thread.c: All implementations adjusted.
5500 * spu-multiarch.c: All implementations adjusted.
5501 * target-delegates.c: All implementations adjusted.
5502 * target.c: All implementations adjusted.
5503 * target.h: All implementations adjusted.
5504 * tracefile-tfile.c: All implementations adjusted.
5505 * tracefile.c: All implementations adjusted.
5506 * tracefile.h: All implementations adjusted.
5507 * windows-nat.c: All implementations adjusted.
5508 * x86-linux-nat.h: All implementations adjusted.
5509 * x86-nat.h: All implementations adjusted.
5511 2018-05-02 Pedro Alves <palves@redhat.com>
5513 * make-target-delegates (scan_target_h): Don't trim lines here.
5514 Replace sequences of tabs and/or whitespace with a single
5516 (top level, parsing methods): Trim each line before processing it
5519 2018-05-02 Pedro Alves <palves@redhat.com>
5520 John Baldwin <jhb@freebsd.org>
5522 * target.h (enum strata) <debug_stratum>: New.
5523 (struct target_ops) <all delegation methods>: Replace by C++
5524 virtual methods, and drop "to_" prefix. All references updated
5526 <to_shortname, to_longname, to_doc, to_data,
5527 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5528 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5529 virtual methods. All references updated throughout.
5530 <can_attach, supports_terminal_ours, can_create_inferior,
5531 get_thread_control_capabilities, attach_no_wait>: New
5533 <insert_breakpoint, remove_breakpoint>: Now
5534 TARGET_DEFAULT_NORETURN methods.
5535 <info_proc>: Now returns bool.
5537 (OPS_MAGIC): Delete.
5538 (current_target): Delete. All references replaced by references
5540 (target_stack): ... this. New.
5541 (target_shortname, target_longname): Adjust.
5542 (target_can_run): Now a function declaration.
5543 (default_child_has_all_memory, default_child_has_memory)
5544 (default_child_has_stack, default_child_has_registers)
5545 (default_child_has_execution): Remove target_ops parameter.
5546 (complete_target_initialization): Delete.
5547 (memory_breakpoint_target): New template class.
5548 (test_target_ops): Refactor as a C++ class with virtual methods.
5549 * make-target-delegates (NAME_PART): Tighten.
5550 (POINTER_PART, CP_SYMBOL): New.
5551 (SIMPLE_RETURN_PART): Reimplement.
5552 (VEC_RETURN_PART): Expect less.
5553 (RETURN_PART, VIRTUAL_PART): New.
5554 (METHOD): Adjust to C++ virtual methods.
5555 (scan_target_h): Remove reference to C99.
5556 (dname): Output "target_ops::" prefix.
5557 (write_function_header): Adjust to output a C++ class method.
5558 (write_declaration): New.
5559 (write_delegator): Adjust to output a C++ class method.
5560 (tdname): Output "dummy_target::" prefix.
5561 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5563 (tdefault_names, debug_names): Delete.
5564 (return_types, tdefaults, styles, argtypes_array): New.
5565 (top level): All methods are delegators.
5567 (top level): Print dummy_target and debug_target classes.
5568 * target-delegates.c: Regenerate.
5569 * target-debug.h (target_debug_print_enum_info_proc_what)
5570 (target_debug_print_thread_control_capabilities)
5571 (target_debug_print_thread_info_p): New.
5572 * target.c (dummy_target): Delete.
5573 (the_dummy_target, the_debug_target): New.
5574 (target_stack): Now extern.
5575 (set_targetdebug): Push/unpush debug target.
5576 (default_child_has_all_memory, default_child_has_memory)
5577 (default_child_has_stack, default_child_has_registers)
5578 (default_child_has_execution): Remove target_ops parameter.
5579 (complete_target_initialization): Delete.
5580 (add_target_with_completer): No longer call
5581 complete_target_initialization.
5582 (target_supports_terminal_ours): Use regular delegation.
5583 (update_current_target): Delete.
5584 (push_target): No longer check magic number. Don't call
5585 update_current_target.
5586 (unpush_target): Don't call update_current_target.
5587 (target_is_pushed): No longer check magic number.
5588 (target_require_runnable): Skip for all stratums over
5590 (target_ops::info_proc): New.
5591 (target_info_proc): Use find_target_at and
5592 find_default_run_target.
5593 (target_supports_disable_randomization): Use regular delegation.
5594 (target_get_osdata): Use find_target_at.
5595 (target_ops::open, target_ops::close, target_ops::can_attach)
5596 (target_ops::attach, target_ops::can_create_inferior)
5597 (target_ops::create_inferior, target_ops::can_run)
5598 (target_can_run): New.
5599 (default_fileio_target): Use regular delegation.
5600 (target_ops::fileio_open, target_ops::fileio_pwrite)
5601 (target_ops::fileio_pread, target_ops::fileio_fstat)
5602 (target_ops::fileio_close, target_ops::fileio_unlink)
5603 (target_ops::fileio_readlink): New.
5604 (target_fileio_open_1, target_fileio_unlink)
5605 (target_fileio_readlink): Always call the target method. Handle
5607 (return_zero, return_zero_has_execution): Delete.
5608 (init_dummy_target): Delete.
5609 (dummy_target::dummy_target, dummy_target::shortname)
5610 (dummy_target::longname, dummy_target::doc)
5611 (debug_target::debug_target, debug_target::shortname)
5612 (debug_target::longname, debug_target::doc): New.
5613 (target_supports_delete_record): Use regular delegation.
5614 (setup_target_debug): Delete.
5615 (maintenance_print_target_stack): Skip debug_stratum.
5616 (initialize_targets): Instantiate the_dummy_target and
5618 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
5620 (target_auxv_search, fprint_target_auxv): Adjust.
5621 (info_auxv_command): Adjust to use target_stack.
5622 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5623 * exceptions.c (print_flush): Handle a NULL target_stack.
5624 * regcache.c (target_ops_no_register): Refactor as class with
5627 * exec.c (exec_target): New class.
5628 (exec_ops): Now an exec_target.
5629 (exec_open, exec_close_1, exec_get_section_table)
5630 (exec_xfer_partial, exec_files_info, exec_has_memory)
5631 (exec_make_note_section): Refactor as exec_target methods.
5632 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5634 (exec_target::find_memory_regions): New.
5635 (_initialize_exec): Don't call init_exec_ops.
5636 * gdbcore.h (exec_file_clear): Delete.
5638 * corefile.c (core_target): Delete.
5639 (core_file_command): Adjust.
5640 * corelow.c (core_target): New class.
5641 (the_core_target): New.
5642 (core_close): Remove target_ops parameter.
5643 (core_close_cleanup): Adjust.
5644 (core_target::close): New.
5645 (core_open, core_detach, get_core_registers, core_files_info)
5646 (core_xfer_partial, core_thread_alive, core_read_description)
5647 (core_pid_to_str, core_thread_name, core_has_memory)
5648 (core_has_stack, core_has_registers, core_info_proc): Rework as
5649 core_target methods.
5650 (ignore, core_remove_breakpoint, init_core_ops): Delete.
5651 (_initialize_corelow): Initialize the_core_target.
5652 * gdbcore.h (core_target): Delete.
5653 (the_core_target): New.
5655 * ctf.c: (ctf_target): New class.
5656 (ctf_ops): Now a ctf_target.
5657 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5658 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5659 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5661 (init_ctf_ops): Delete.
5662 (_initialize_ctf): Don't call it.
5663 * tracefile-tfile.c (tfile_target): New class.
5664 (tfile_ops): Now a tfile_target.
5665 (tfile_open, tfile_close, tfile_files_info)
5666 (tfile_get_tracepoint_status, tfile_trace_find)
5667 (tfile_fetch_registers, tfile_xfer_partial)
5668 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5669 Refactor as tfile_target methods.
5670 (tfile_xfer_partial_features): Remove target_ops parameter.
5671 (init_tfile_ops): Delete.
5672 (_initialize_tracefile_tfile): Don't call it.
5673 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5674 (tracefile_has_stack, tracefile_has_registers)
5675 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5676 tracefile_target methods.
5677 (init_tracefile_ops): Delete.
5678 (tracefile_target::tracefile_target): New.
5679 * tracefile.h: Include "target.h".
5680 (tracefile_target): New class.
5681 (init_tracefile_ops): Delete.
5683 * spu-multiarch.c (spu_multiarch_target): New class.
5684 (spu_ops): Now a spu_multiarch_target.
5685 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5686 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5687 (spu_search_memory, spu_mourn_inferior): Refactor as
5688 spu_multiarch_target methods.
5689 (init_spu_ops): Delete.
5690 (_initialize_spu_multiarch): Remove references to init_spu_ops,
5691 complete_target_initialization.
5693 * ravenscar-thread.c (ravenscar_thread_target): New class.
5694 (ravenscar_ops): Now a ravenscar_thread_target.
5695 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5696 (ravenscar_thread_alive, ravenscar_pid_to_str)
5697 (ravenscar_fetch_registers, ravenscar_store_registers)
5698 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5699 (ravenscar_stopped_by_hw_breakpoint)
5700 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5701 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5702 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5704 (init_ravenscar_thread_ops): Delete.
5705 (_initialize_ravenscar): Remove references to
5706 init_ravenscar_thread_ops and complete_target_initialization.
5708 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5709 (bsd_uthread_target): New class.
5710 (bsd_uthread_ops): Now a bsd_uthread_target.
5711 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5712 (bsd_uthread_close, bsd_uthread_mourn_inferior)
5713 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5714 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5715 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5716 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5717 (bsd_uthread_target): Delete function.
5718 (_initialize_bsd_uthread): Remove reference to
5719 complete_target_initialization.
5721 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
5722 (target_bfd): ... this new class.
5723 (target_bfd_xfer_partial, target_bfd_get_section_table)
5724 (target_bfd_close): Refactor as target_bfd methods.
5725 (target_bfd::~target_bfd): New.
5726 (target_bfd_reopen): Adjust.
5727 (target_bfd::close): New.
5729 * record-btrace.c (record_btrace_target): New class.
5730 (record_btrace_ops): Now a record_btrace_target.
5731 (record_btrace_open, record_btrace_stop_recording)
5732 (record_btrace_disconnect, record_btrace_close)
5733 (record_btrace_async, record_btrace_info)
5734 (record_btrace_insn_history, record_btrace_insn_history_range)
5735 (record_btrace_insn_history_from, record_btrace_call_history)
5736 (record_btrace_call_history_range)
5737 (record_btrace_call_history_from, record_btrace_record_method)
5738 (record_btrace_is_replaying, record_btrace_will_replay)
5739 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5740 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5741 (record_btrace_store_registers, record_btrace_prepare_to_store)
5742 (record_btrace_to_get_unwinder)
5743 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5744 (record_btrace_commit_resume, record_btrace_wait)
5745 (record_btrace_stop, record_btrace_can_execute_reverse)
5746 (record_btrace_stopped_by_sw_breakpoint)
5747 (record_btrace_supports_stopped_by_sw_breakpoint)
5748 (record_btrace_stopped_by_hw_breakpoint)
5749 (record_btrace_supports_stopped_by_hw_breakpoint)
5750 (record_btrace_update_thread_list, record_btrace_thread_alive)
5751 (record_btrace_goto_begin, record_btrace_goto_end)
5752 (record_btrace_goto, record_btrace_stop_replaying_all)
5753 (record_btrace_execution_direction)
5754 (record_btrace_prepare_to_generate_core)
5755 (record_btrace_done_generating_core): Refactor as
5756 record_btrace_target methods.
5757 (init_record_btrace_ops): Delete.
5758 (_initialize_record_btrace): Remove reference to
5759 init_record_btrace_ops.
5760 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5761 the execution_direction global.
5762 (record_full_base_target, record_full_target)
5763 (record_full_core_target): New classes.
5764 (record_full_ops): Now a record_full_target.
5765 (record_full_core_ops): Now a record_full_core_target.
5766 (record_full_target::detach, record_full_target::disconnect)
5767 (record_full_core_target::disconnect)
5768 (record_full_target::mourn_inferior, record_full_target::kill):
5770 (record_full_open, record_full_close, record_full_async): Refactor
5771 as methods of the record_full_base_target class.
5772 (record_full_resume, record_full_commit_resume): Refactor
5773 as methods of the record_full_target class.
5774 (record_full_wait, record_full_stopped_by_watchpoint)
5775 (record_full_stopped_data_address)
5776 (record_full_stopped_by_sw_breakpoint)
5777 (record_full_supports_stopped_by_sw_breakpoint)
5778 (record_full_stopped_by_hw_breakpoint)
5779 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5780 methods of the record_full_base_target class.
5781 (record_full_store_registers, record_full_xfer_partial)
5782 (record_full_insert_breakpoint, record_full_remove_breakpoint):
5783 Refactor as methods of the record_full_target class.
5784 (record_full_can_execute_reverse, record_full_get_bookmark)
5785 (record_full_goto_bookmark, record_full_execution_direction)
5786 (record_full_record_method, record_full_info, record_full_delete)
5787 (record_full_is_replaying, record_full_will_replay)
5788 (record_full_goto_begin, record_full_goto_end, record_full_goto)
5789 (record_full_stop_replaying): Refactor as methods of the
5790 record_full_base_target class.
5791 (record_full_core_resume, record_full_core_kill)
5792 (record_full_core_fetch_registers)
5793 (record_full_core_prepare_to_store)
5794 (record_full_core_store_registers, record_full_core_xfer_partial)
5795 (record_full_core_insert_breakpoint)
5796 (record_full_core_remove_breakpoint)
5797 (record_full_core_has_execution): Refactor
5798 as methods of the record_full_core_target class.
5799 (record_full_base_target::supports_delete_record): New.
5800 (init_record_full_ops): Delete.
5801 (init_record_full_core_ops): Delete.
5802 (record_full_save): Refactor as method of the
5803 record_full_base_target class.
5804 (_initialize_record_full): Remove references to
5805 init_record_full_ops and init_record_full_core_ops.
5807 * remote.c (remote_target, extended_remote_target): New classes.
5808 (remote_ops): Now a remote_target.
5809 (extended_remote_ops): Now an extended_remote_target.
5810 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5811 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5812 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5813 (remote_pass_signals, remote_set_syscall_catchpoint)
5814 (remote_program_signals, )
5815 (remote_thread_always_alive): Remove target_ops parameter.
5816 (remote_thread_alive, remote_thread_name)
5817 (remote_update_thread_list, remote_threads_extra_info)
5818 (remote_static_tracepoint_marker_at)
5819 (remote_static_tracepoint_markers_by_strid)
5820 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5821 (remote_open): Refactor as methods of remote_target.
5822 (extended_remote_open, extended_remote_detach)
5823 (extended_remote_attach, extended_remote_post_attach):
5824 (extended_remote_supports_disable_randomization)
5825 (extended_remote_create_inferior): : Refactor as method of
5826 extended_remote_target.
5827 (remote_set_permissions, remote_open_1, remote_detach)
5828 (remote_follow_fork, remote_follow_exec, remote_disconnect)
5829 (remote_resume, remote_commit_resume, remote_stop)
5830 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5831 (remote_terminal_ours, remote_wait, remote_fetch_registers)
5832 (remote_prepare_to_store, remote_store_registers)
5833 (remote_flash_erase, remote_flash_done, remote_files_info)
5834 (remote_kill, remote_mourn, remote_insert_breakpoint)
5835 (remote_remove_breakpoint, remote_insert_watchpoint)
5836 (remote_watchpoint_addr_within_range)
5837 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5838 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5839 (remote_supports_stopped_by_sw_breakpoint)
5840 (remote_stopped_by_hw_breakpoint)
5841 (remote_supports_stopped_by_hw_breakpoint)
5842 (remote_stopped_by_watchpoint, remote_stopped_data_address)
5843 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5844 (remote_verify_memory): Refactor as methods of remote_target.
5845 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5847 (remote_xfer_partial, remote_get_memory_xfer_limit)
5848 (remote_search_memory, remote_rcmd, remote_memory_map)
5849 (remote_pid_to_str, remote_get_thread_local_address)
5850 (remote_get_tib_address, remote_read_description): Refactor as
5851 methods of remote_target.
5852 (remote_target::fileio_open, remote_target::fileio_pwrite)
5853 (remote_target::fileio_pread, remote_target::fileio_close): New.
5854 (remote_hostio_readlink, remote_hostio_fstat)
5855 (remote_filesystem_is_local, remote_can_execute_reverse)
5856 (remote_supports_non_stop, remote_supports_disable_randomization)
5857 (remote_supports_multi_process, remote_supports_cond_breakpoints)
5858 (remote_supports_enable_disable_tracepoint)
5859 (remote_supports_string_tracing)
5860 (remote_can_run_breakpoint_commands, remote_trace_init)
5861 (remote_download_tracepoint, remote_can_download_tracepoint)
5862 (remote_download_trace_state_variable, remote_enable_tracepoint)
5863 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5864 (remote_trace_start, remote_get_trace_status)
5865 (remote_get_tracepoint_status, remote_trace_stop)
5866 (remote_trace_find, remote_get_trace_state_variable_value)
5867 (remote_save_trace_data, remote_get_raw_trace_data)
5868 (remote_set_disconnected_tracing, remote_core_of_thread)
5869 (remote_set_circular_trace_buffer, remote_traceframe_info)
5870 (remote_get_min_fast_tracepoint_insn_len)
5871 (remote_set_trace_buffer_size, remote_set_trace_notes)
5872 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5873 (remote_disable_btrace, remote_teardown_btrace)
5874 (remote_read_btrace, remote_btrace_conf)
5875 (remote_augmented_libraries_svr4_read, remote_load)
5876 (remote_pid_to_exec_file, remote_can_do_single_step)
5877 (remote_execution_direction, remote_thread_handle_to_thread_info):
5878 Refactor as methods of remote_target.
5879 (init_remote_ops, init_extended_remote_ops): Delete.
5880 (remote_can_async_p, remote_is_async_p, remote_async)
5881 (remote_thread_events, remote_upload_tracepoints)
5882 (remote_upload_trace_state_variables): Refactor as methods of
5884 (_initialize_remote): Remove references to init_remote_ops and
5885 init_extended_remote_ops.
5887 * remote-sim.c (gdbsim_target): New class.
5888 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5889 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5890 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5891 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5892 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5893 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5894 Refactor as methods of gdbsim_target.
5895 (gdbsim_ops): Now a gdbsim_target.
5896 (init_gdbsim_ops): Delete.
5897 (gdbsim_cntrl_c): Adjust.
5898 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5900 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5901 (the_amd64_linux_nat_target): New.
5902 (amd64_linux_fetch_inferior_registers)
5903 (amd64_linux_store_inferior_registers): Refactor as methods of
5904 amd64_linux_nat_target.
5905 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
5906 * i386-linux-nat.c: Don't include "linux-nat.h".
5907 (i386_linux_nat_target): New class.
5908 (the_i386_linux_nat_target): New.
5909 (i386_linux_fetch_inferior_registers)
5910 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5911 as methods of i386_linux_nat_target.
5912 (_initialize_i386_linux_nat): Adjust. Set linux_target.
5913 * inf-child.c (inf_child_ops): Delete.
5914 (inf_child_fetch_inferior_registers)
5915 (inf_child_store_inferior_registers): Delete.
5916 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5917 methods of inf_child_target.
5918 (inf_child_target::supports_terminal_ours)
5919 (inf_child_target::terminal_init)
5920 (inf_child_target::terminal_inferior)
5921 (inf_child_target::terminal_ours_for_output)
5922 (inf_child_target::terminal_ours, inf_child_target::interrupt)
5923 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5925 (inf_child_open, inf_child_disconnect, inf_child_close)
5926 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5927 (inf_child_post_startup_inferior, inf_child_can_run)
5928 (inf_child_pid_to_exec_file): Refactor as methods of
5930 (inf_child_follow_fork): Delete.
5931 (inf_child_target::can_create_inferior)
5932 (inf_child_target::can_attach): New.
5933 (inf_child_target::has_all_memory, inf_child_target::has_memory)
5934 (inf_child_target::has_stack, inf_child_target::has_registers)
5935 (inf_child_target::has_execution): New.
5936 (inf_child_fileio_open, inf_child_fileio_pwrite)
5937 (inf_child_fileio_pread, inf_child_fileio_fstat)
5938 (inf_child_fileio_close, inf_child_fileio_unlink)
5939 (inf_child_fileio_readlink, inf_child_use_agent)
5940 (inf_child_can_use_agent): Refactor as methods of
5942 (return_zero, inf_child_target): Delete.
5943 (inf_child_target::inf_child_target): New.
5944 * inf-child.h: Include "target.h".
5945 (inf_child_target): Delete function prototype.
5946 (inf_child_target): New class.
5947 (inf_child_open_target, inf_child_mourn_inferior)
5948 (inf_child_maybe_unpush_target): Delete.
5949 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5950 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5951 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5952 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5953 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5954 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5955 (inf_ptrace_wait, inf_ptrace_xfer_partial)
5956 (inf_ptrace_thread_alive, inf_ptrace_files_info)
5957 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5958 methods of inf_ptrace_target.
5959 (inf_ptrace_target): Delete function.
5960 * inf-ptrace.h: Include "inf-child.h".
5961 (inf_ptrace_target): Delete function declaration.
5962 (inf_ptrace_target): New class.
5963 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5964 * linux-nat.c (linux_target): New.
5965 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5966 (linux_nat_target::~linux_nat_target): New.
5967 (linux_child_post_attach, linux_child_post_startup_inferior)
5968 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5969 (linux_child_remove_fork_catchpoint)
5970 (linux_child_insert_vfork_catchpoint)
5971 (linux_child_remove_vfork_catchpoint)
5972 (linux_child_insert_exec_catchpoint)
5973 (linux_child_remove_exec_catchpoint)
5974 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5975 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5976 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5977 (linux_nat_stopped_data_address)
5978 (linux_nat_stopped_by_sw_breakpoint)
5979 (linux_nat_supports_stopped_by_sw_breakpoint)
5980 (linux_nat_stopped_by_hw_breakpoint)
5981 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5982 (linux_nat_kill, linux_nat_mourn_inferior)
5983 (linux_nat_xfer_partial, linux_nat_thread_alive)
5984 (linux_nat_update_thread_list, linux_nat_pid_to_str)
5985 (linux_nat_thread_name, linux_child_pid_to_exec_file)
5986 (linux_child_static_tracepoint_markers_by_strid)
5987 (linux_nat_is_async_p, linux_nat_can_async_p)
5988 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5989 (linux_nat_supports_multi_process)
5990 (linux_nat_supports_disable_randomization, linux_nat_async)
5991 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
5992 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
5993 (linux_nat_fileio_open, linux_nat_fileio_readlink)
5994 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
5995 methods of linux_nat_target.
5996 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
5997 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
5999 (check_stopped_by_watchpoint): Adjust.
6000 (linux_xfer_partial): Delete.
6001 (linux_target_install_ops, linux_target, linux_nat_add_target):
6003 (linux_nat_target::linux_nat_target): New.
6004 * linux-nat.h: Include "inf-ptrace.h".
6005 (linux_nat_target): New.
6006 (linux_target, linux_target_install_ops, linux_nat_add_target):
6007 Delete function declarations.
6008 (linux_target): Declare global.
6009 * linux-thread-db.c (thread_db_target): New.
6010 (thread_db_target::thread_db_target): New.
6011 (thread_db_ops): Delete.
6012 (the_thread_db_target): New.
6013 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6014 (thread_db_update_thread_list, thread_db_pid_to_str)
6015 (thread_db_extra_thread_info)
6016 (thread_db_thread_handle_to_thread_info)
6017 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6018 (thread_db_resume): Refactor as methods of thread_db_target.
6019 (init_thread_db_ops): Delete.
6020 (_initialize_thread_db): Remove reference to init_thread_db_ops.
6021 * x86-linux-nat.c: Don't include "linux-nat.h".
6022 (super_post_startup_inferior): Delete.
6023 (x86_linux_nat_target::~x86_linux_nat_target): New.
6024 (x86_linux_child_post_startup_inferior)
6025 (x86_linux_read_description, x86_linux_enable_btrace)
6026 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6027 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6028 methods of x86_linux_nat_target.
6029 (x86_linux_create_target): Delete. Bits folded ...
6030 (x86_linux_add_target): ... here. Now takes a linux_nat_target
6032 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6033 (x86_linux_nat_target): New class.
6034 (x86_linux_create_target): Delete.
6035 (x86_linux_add_target): Now takes a linux_nat_target pointer.
6036 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6037 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6038 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6039 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6040 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6042 (x86_use_watchpoints): Delete.
6043 * x86-nat.h: Include "breakpoint.h" and "target.h".
6044 (x86_use_watchpoints): Delete.
6045 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6046 (x86_stopped_by_watchpoint, x86_stopped_data_address)
6047 (x86_insert_watchpoint, x86_remove_watchpoint)
6048 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6049 (x86_stopped_by_hw_breakpoint): New declarations.
6050 (x86_nat_target): New template class.
6052 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6053 (the_ppc_linux_nat_target): New.
6054 (ppc_linux_fetch_inferior_registers)
6055 (ppc_linux_can_use_hw_breakpoint)
6056 (ppc_linux_region_ok_for_hw_watchpoint)
6057 (ppc_linux_ranged_break_num_registers)
6058 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6059 (ppc_linux_insert_mask_watchpoint)
6060 (ppc_linux_remove_mask_watchpoint)
6061 (ppc_linux_can_accel_watchpoint_condition)
6062 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6063 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6064 (ppc_linux_watchpoint_addr_within_range)
6065 (ppc_linux_masked_watch_num_registers)
6066 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6067 (ppc_linux_read_description): Refactor as methods of
6068 ppc_linux_nat_target.
6069 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
6071 * procfs.c (procfs_xfer_partial): Delete forward declaration.
6072 (procfs_target): New class.
6073 (the_procfs_target): New.
6074 (procfs_target): Delete function.
6075 (procfs_auxv_parse, procfs_attach, procfs_detach)
6076 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6077 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6078 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6079 (procfs_create_inferior, procfs_update_thread_list)
6080 (procfs_thread_alive, procfs_pid_to_str)
6081 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6082 (procfs_stopped_data_address, procfs_insert_watchpoint)
6083 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6084 (proc_find_memory_regions, procfs_info_proc)
6085 (procfs_make_note_section): Refactor as methods of procfs_target.
6086 (_initialize_procfs): Adjust.
6087 * sol-thread.c (sol_thread_target): New class.
6088 (sol_thread_ops): Now a sol_thread_target.
6089 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6090 (sol_thread_fetch_registers, sol_thread_store_registers)
6091 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6092 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6093 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6094 (init_sol_thread_ops): Delete.
6095 (_initialize_sol_thread): Adjust. Remove references to
6096 init_sol_thread_ops and complete_target_initialization.
6098 * windows-nat.c (windows_nat_target): New class.
6099 (windows_fetch_inferior_registers)
6100 (windows_store_inferior_registers, windows_resume, windows_wait)
6101 (windows_attach, windows_detach, windows_pid_to_exec_file)
6102 (windows_files_info, windows_create_inferior)
6103 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6104 (windows_close, windows_pid_to_str, windows_xfer_partial)
6105 (windows_get_tib_address, windows_get_ada_task_ptid)
6106 (windows_thread_name, windows_thread_alive): Refactor as
6107 windows_nat_target methods.
6108 (do_initial_windows_stuff): Adjust.
6109 (windows_target): Delete function.
6110 (_initialize_windows_nat): Adjust.
6112 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6113 (darwin_mourn_inferior, darwin_kill_inferior)
6114 (darwin_create_inferior, darwin_attach, darwin_detach)
6115 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6116 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6117 (darwin_supports_multi_process): Refactor as darwin_nat_target
6119 (darwin_resume_to, darwin_files_info): Delete.
6120 (_initialize_darwin_inferior): Rename to ...
6121 (_initialize_darwin_nat): ... this. Adjust to C++ification.
6122 * darwin-nat.h: Include "inf-child.h".
6123 (darwin_nat_target): New class.
6124 (darwin_complete_target): Delete.
6125 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6126 (darwin_target): New.
6127 (i386_darwin_fetch_inferior_registers)
6128 (i386_darwin_store_inferior_registers): Refactor as methods of
6130 (darwin_complete_target): Delete, with ...
6131 (_initialize_i386_darwin_nat): ... bits factored out here.
6133 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6134 (the_alpha_linux_nat_target): New.
6135 (alpha_linux_register_u_offset): Refactor as
6136 alpha_linux_nat_target method.
6137 (_initialize_alpha_linux_nat): Adjust.
6138 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6139 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6140 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6141 methods of linux_nat_trad_target.
6142 (linux_trad_target): Delete.
6143 * linux-nat-trad.h (linux_trad_target): Delete function.
6144 (linux_nat_trad_target): New class.
6145 * mips-linux-nat.c (mips_linux_nat_target): New class.
6146 (super_fetch_registers, super_store_registers, super_close):
6148 (the_mips_linux_nat_target): New.
6149 (mips64_linux_regsets_fetch_registers)
6150 (mips64_linux_regsets_store_registers)
6151 (mips64_linux_fetch_registers, mips64_linux_store_registers)
6152 (mips_linux_register_u_offset, mips_linux_read_description)
6153 (mips_linux_can_use_hw_breakpoint)
6154 (mips_linux_stopped_by_watchpoint)
6155 (mips_linux_stopped_data_address)
6156 (mips_linux_region_ok_for_hw_watchpoint)
6157 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6158 (mips_linux_close): Refactor as methods of mips_linux_nat.
6159 (_initialize_mips_linux_nat): Adjust to C++ification.
6161 * aix-thread.c (aix_thread_target): New class.
6162 (aix_thread_ops): Now an aix_thread_target.
6163 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6164 (aix_thread_fetch_registers, aix_thread_store_registers)
6165 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6166 (aix_thread_thread_alive, aix_thread_pid_to_str)
6167 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6168 Refactor as methods of aix_thread_target.
6169 (init_aix_thread_ops): Delete.
6170 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6171 and complete_target_initialization.
6172 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6173 (rs6000_nat_target): New class.
6174 (the_rs6000_nat_target): New.
6175 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6176 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6177 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6178 (super_create_inferior): Delete.
6179 (_initialize_rs6000_nat): Adjust to C++ification.
6181 * arm-linux-nat.c (arm_linux_nat_target): New class.
6182 (the_arm_linux_nat_target): New.
6183 (arm_linux_fetch_inferior_registers)
6184 (arm_linux_store_inferior_registers, arm_linux_read_description)
6185 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6186 (arm_linux_remove_hw_breakpoint)
6187 (arm_linux_region_ok_for_hw_watchpoint)
6188 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6189 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6190 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6191 arm_linux_nat_target.
6192 (_initialize_arm_linux_nat): Adjust to C++ification.
6194 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6195 (the_aarch64_linux_nat_target): New.
6196 (aarch64_linux_fetch_inferior_registers)
6197 (aarch64_linux_store_inferior_registers)
6198 (aarch64_linux_child_post_startup_inferior)
6199 (aarch64_linux_read_description)
6200 (aarch64_linux_can_use_hw_breakpoint)
6201 (aarch64_linux_insert_hw_breakpoint)
6202 (aarch64_linux_remove_hw_breakpoint)
6203 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6204 (aarch64_linux_region_ok_for_hw_watchpoint)
6205 (aarch64_linux_stopped_data_address)
6206 (aarch64_linux_stopped_by_watchpoint)
6207 (aarch64_linux_watchpoint_addr_within_range)
6208 (aarch64_linux_can_do_single_step): Refactor as methods of
6209 aarch64_linux_nat_target.
6210 (super_post_startup_inferior): Delete.
6211 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6213 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6214 (the_hppa_linux_nat_target): New.
6215 (hppa_linux_fetch_inferior_registers)
6216 (hppa_linux_store_inferior_registers): Refactor as methods of
6217 hppa_linux_nat_target.
6218 (_initialize_hppa_linux_nat): Adjust to C++ification.
6220 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6221 (the_ia64_linux_nat_target): New.
6222 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6223 (ia64_linux_stopped_data_address)
6224 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6225 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6226 ia64_linux_nat_target methods.
6227 (super_xfer_partial): Delete.
6228 (_initialize_ia64_linux_nat): Adjust to C++ification.
6230 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6231 (the_m32r_linux_nat_target): New.
6232 (m32r_linux_fetch_inferior_registers)
6233 (m32r_linux_store_inferior_registers): Refactor as
6234 m32r_linux_nat_target methods.
6235 (_initialize_m32r_linux_nat): Adjust to C++ification.
6237 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6238 (the_m68k_linux_nat_target): New.
6239 (m68k_linux_fetch_inferior_registers)
6240 (m68k_linux_store_inferior_registers): Refactor as
6241 m68k_linux_nat_target methods.
6242 (_initialize_m68k_linux_nat): Adjust to C++ification.
6244 * s390-linux-nat.c (s390_linux_nat_target): New class.
6245 (the_s390_linux_nat_target): New.
6246 (s390_linux_fetch_inferior_registers)
6247 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6248 (s390_insert_watchpoint, s390_remove_watchpoint)
6249 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6250 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6251 (s390_auxv_parse, s390_read_description): Refactor as methods of
6252 s390_linux_nat_target.
6253 (_initialize_s390_nat): Adjust to C++ification.
6255 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6256 (the_sparc_linux_nat_target): New.
6257 (_initialize_sparc_linux_nat): Adjust to C++ification.
6258 * sparc-nat.c (sparc_fetch_inferior_registers)
6259 (sparc_store_inferior_registers): Remove target_ops parameter.
6260 * sparc-nat.h (sparc_fetch_inferior_registers)
6261 (sparc_store_inferior_registers): Remove target_ops parameter.
6262 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6263 (the_sparc64_linux_nat_target): New.
6264 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6266 * spu-linux-nat.c (spu_linux_nat_target): New class.
6267 (the_spu_linux_nat_target): New.
6268 (spu_child_post_startup_inferior, spu_child_post_attach)
6269 (spu_child_wait, spu_fetch_inferior_registers)
6270 (spu_store_inferior_registers, spu_xfer_partial)
6271 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6273 (_initialize_spu_nat): Adjust to C++ification.
6275 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6276 (the_tilegx_linux_nat_target): New.
6277 (fetch_inferior_registers, store_inferior_registers):
6278 Refactor as methods.
6279 (_initialize_tile_linux_nat): Adjust to C++ification.
6281 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6282 (the_xtensa_linux_nat_target): New.
6283 (xtensa_linux_fetch_inferior_registers)
6284 (xtensa_linux_store_inferior_registers): Refactor as
6285 xtensa_linux_nat_target methods.
6286 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6288 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6289 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6290 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6291 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6292 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6293 (fbsd_stopped_by_sw_breakpoint)
6294 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6295 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6296 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6297 (fbsd_post_startup_inferior, fbsd_post_attach)
6298 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6299 (fbsd_set_syscall_catchpoint)
6300 (super_xfer_partial, super_resume, super_wait)
6301 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6302 (fbsd_handle_debug_trap): Remove target_ops parameter.
6303 (fbsd_nat_add_target): Delete.
6304 * fbsd-nat.h: Include "inf-ptrace.h".
6305 (fbsd_nat_add_target): Delete.
6306 (USE_SIGTRAP_SIGINFO): Define.
6307 (fbsd_nat_target): New class.
6309 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6310 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6311 (amd64bsd_target): Delete.
6312 * amd64-bsd-nat.h: New file.
6313 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6315 (amd64_fbsd_nat_target): New class.
6316 (the_amd64_fbsd_nat_target): New.
6317 (amd64fbsd_read_description): Refactor as method of
6318 amd64_fbsd_nat_target.
6319 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6320 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6321 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6322 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6323 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6324 (i386bsd_target): Delete.
6325 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6326 (i386bsd_fetch_inferior_registers)
6327 (i386bsd_store_inferior_registers): Declare.
6328 (i386_bsd_nat_target): New class.
6329 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6330 (the_i386_fbsd_nat_target): New.
6331 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6332 i386_fbsd_nat_target methods.
6333 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6334 (_initialize_i386fbsd_nat): Adjust to C++ification.
6335 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6336 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6337 (_initialize_x86_bsd_nat): Adjust to C++ification.
6338 * x86-bsd-nat.h: Include "x86-nat.h".
6339 (x86bsd_target): Delete declaration.
6340 (x86bsd_nat_target): New class.
6342 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6343 (the_aarch64_fbsd_nat_target): New.
6344 (aarch64_fbsd_fetch_inferior_registers)
6345 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6346 aarch64_fbsd_nat_target.
6347 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6348 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6349 (the_alpha_bsd_nat_target): New.
6350 (alphabsd_fetch_inferior_registers)
6351 (alphabsd_store_inferior_registers): Refactor as
6352 alpha_bsd_nat_target methods.
6353 (_initialize_alphabsd_nat): Refactor as methods of
6354 alpha_bsd_nat_target.
6355 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6356 (the_amd64_nbsd_nat_target): New.
6357 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6358 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6359 (the_amd64_obsd_nat_target): New.
6360 (_initialize_amd64obsd_nat): Adjust to C++ification.
6361 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6362 (the_arm_fbsd_nat_target): New.
6363 (arm_fbsd_fetch_inferior_registers)
6364 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6365 (_initialize_arm_fbsd_nat): Refactor as methods of
6366 arm_fbsd_nat_target.
6367 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6368 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6369 (the_arm_netbsd_nat_target): New.
6370 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6371 arm_netbsd_nat_target.
6372 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6373 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6374 (the_hppa_nbsd_nat_target): New.
6375 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6376 hppa_nbsd_nat_target methods.
6377 (_initialize_hppanbsd_nat): Adjust to C++ification.
6378 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6379 (the_hppa_obsd_nat_target): New.
6380 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6381 methods of hppa_obsd_nat_target.
6382 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6384 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6385 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6387 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6388 (_initialize_i386obsd_nat): Use add_target.
6389 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6390 (the_m68k_bsd_nat_target): New.
6391 (m68kbsd_fetch_inferior_registers)
6392 (m68kbsd_store_inferior_registers): Refactor as methods of
6393 m68k_bsd_nat_target.
6394 (_initialize_m68kbsd_nat): Adjust to C++ification.
6395 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6396 (the_mips_fbsd_nat_target): New.
6397 (mips_fbsd_fetch_inferior_registers)
6398 (mips_fbsd_store_inferior_registers): Refactor as methods of
6399 mips_fbsd_nat_target.
6400 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6402 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6403 (the_mips_nbsd_nat_target): New.
6404 (mipsnbsd_fetch_inferior_registers)
6405 (mipsnbsd_store_inferior_registers): Refactor as methods of
6406 mips_nbsd_nat_target.
6407 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6408 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6409 (the_mips64_obsd_nat_target): New.
6410 (mips64obsd_fetch_inferior_registers)
6411 (mips64obsd_store_inferior_registers): Refactor as methods of
6412 mips64_obsd_nat_target.
6413 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6415 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6417 * nbsd-nat.h: Include "inf-ptrace.h".
6418 (nbsd_nat_target): New class.
6419 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6420 (obsd_wait): Refactor as methods of obsd_nat_target.
6421 (obsd_add_target): Delete.
6422 * obsd-nat.h: Include "inf-ptrace.h".
6423 (obsd_nat_target): New class.
6424 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6425 (the_ppc_fbsd_nat_target): New.
6426 (ppcfbsd_fetch_inferior_registers)
6427 (ppcfbsd_store_inferior_registers): Refactor as methods of
6428 ppc_fbsd_nat_target.
6429 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6431 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6432 (the_ppc_nbsd_nat_target): New.
6433 (ppcnbsd_fetch_inferior_registers)
6434 (ppcnbsd_store_inferior_registers): Refactor as methods of
6435 ppc_nbsd_nat_target.
6436 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6437 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6438 (the_ppc_obsd_nat_target): New.
6439 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6440 methods of ppc_obsd_nat_target.
6441 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6443 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6444 (the_sh_nbsd_nat_target): New.
6445 (shnbsd_fetch_inferior_registers)
6446 (shnbsd_store_inferior_registers): Refactor as methods of
6448 (_initialize_shnbsd_nat): Adjust to C++ification.
6449 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6450 (inf_ptrace_xfer_partial): Delete.
6451 (sparc_xfer_partial, sparc_target): Delete.
6452 * sparc-nat.h (sparc_fetch_inferior_registers)
6453 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6454 (sparc_target): Delete function declaration.
6455 (sparc_target): New template class.
6456 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6457 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6458 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6459 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6461 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6462 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6463 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6464 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6466 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6467 (the_vax_bsd_nat_target): New.
6468 (vaxbsd_fetch_inferior_registers)
6469 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6471 (_initialize_vaxbsd_nat): Adjust to C++ification.
6473 * bsd-kvm.c (bsd_kvm_target): New class.
6474 (bsd_kvm_ops): Now a bsd_kvm_target.
6475 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6476 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6477 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6479 (bsd_kvm_return_one): Delete.
6480 (bsd_kvm_add_target): Adjust to C++ification.
6482 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6483 (nto_procfs_target_procfs): New classes.
6484 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6485 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6486 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6487 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6488 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6489 (procfs_remove_hw_breakpoint, procfs_resume)
6490 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6491 (procfs_kill_inferior, procfs_store_registers)
6492 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6493 as methods of nto_procfs_target.
6494 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6495 (nto_native_ops): Delete.
6496 (procfs_open, procfs_native_open): Delete.
6497 (nto_native_ops): Now an nto_procfs_target_native.
6498 (init_procfs_targets): Adjust to C++ification.
6499 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6500 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6501 Refactor as methods of nto_procfs_target.
6503 * go32-nat.c (go32_nat_target): New class.
6504 (the_go32_nat_target): New.
6505 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6506 (go32_store_registers, go32_xfer_partial, go32_files_info)
6507 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6508 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6509 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6510 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6511 (go32_target): Delete.
6512 (_initialize_go32_nat): Adjust to C++ification.
6514 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6515 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6516 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6517 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6519 (gnu_target): Delete.
6520 * gnu-nat.h (gnu_target): Delete.
6521 (gnu_nat_target): New class.
6522 * i386-gnu-nat.c (gnu_base_target): New.
6523 (i386_gnu_nat_target): New class.
6524 (the_i386_gnu_nat_target): New.
6525 (_initialize_i386gnu_nat): Adjust to C++ification.
6527 2018-05-02 Pedro Alves <palves@redhat.com>
6529 * bfd-target.c (target_bfd_xclose): Rename to ...
6530 (target_bfd_close): ... this.
6531 (target_bfd_reopen): Adjust.
6532 * target.c (target_close): Remove references to to_xclose.
6533 * target.h (target_ops::to_xclose): Delete.
6534 (target_ops::to_close): Update comments.
6536 2018-05-02 Pedro Alves <palves@redhat.com>
6538 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6540 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6541 * inf-ptrace.c (inf_ptrace_register_u_offset)
6542 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6543 (inf_ptrace_store_register, inf_ptrace_store_registers)
6544 (inf_ptrace_trad_target): Move to ...
6545 * linux-nat-trad.c: ... this new file.
6546 * linux-nat-trad.h: New file.
6547 * linux-nat.c (linux_target_install_ops): Make extern.
6548 (linux_trad_target): Delete.
6549 * linux-nat.h (linux_trad_target): Delete declaration.
6550 (linux_target_install_ops): Declare.
6551 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6554 2018-05-02 Pedro Alves <palves@redhat.com>
6556 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6557 procfs_target/add_target here.
6558 * procfs.c (procfs_target): Make static.
6559 (_initialize_procfs): Call add_target here.
6560 * procfs.h (struct target_ops): Remove forward declaration.
6561 (procfs_target): Remove declaration.
6562 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6564 2018-05-02 Pedro Alves <palves@redhat.com>
6566 * procfs.c (procfs_stopped_by_watchpoint)
6567 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6568 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6570 (procfs_use_watchpoints): Delete, move contents...
6571 (procfs_target): ... here.
6572 * procfs.h (procfs_use_watchpoints): Delete declaration.
6573 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6574 procfs_use_watchpoints.
6575 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6576 procfs_use_watchpoints.
6578 2018-05-02 Tom Tromey <tom@tromey.com>
6581 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6582 and var_zuinteger_unlimited.
6583 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6584 and PARAM_ZUINTEGER_UNLIMITED.
6585 (set_parameter_value): Handle var_zuinteger and
6586 var_zuinteger_unlimited.
6587 (add_setshow_generic): Likewise.
6588 (parmpy_init): Likewise.
6590 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6593 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6594 pointer is not null before dereferencing it.
6596 2018-04-30 Tom Tromey <tom@tromey.com>
6598 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6601 2018-04-30 Tom Tromey <tom@tromey.com>
6603 * breakpoint.c (mention): Remove use of is_mi_like_p.
6604 (print_mention_ranged_breakpoint): Likewise.
6605 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6608 2018-04-30 Tom Tromey <tom@tromey.com>
6610 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6612 2018-04-30 Tom Tromey <tom@tromey.com>
6614 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6615 (info_spu_event_command): Remove some uses of is_mi_like_p.
6617 2018-04-30 Tom Tromey <tom@tromey.com>
6619 * python/py-framefilter.c (py_print_single_arg)
6620 (enumerate_locals, py_print_args, py_print_frame): Remove some
6621 uses of is_mi_like_p.
6623 2018-04-30 Tom Tromey <tom@tromey.com>
6626 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6627 * ui-out.h (ui_out::is_mi_like_p): Now const.
6628 (ui_out::do_is_mi_like_p): Now const.
6629 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6631 2018-04-30 Tom Tromey <tom@tromey.com>
6633 * varobj.c (varobj_set_visualizer): Use new_reference.
6634 * python/python.c (gdbpy_decode_line): Use new_reference.
6635 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6638 2018-04-30 Tom Tromey <tom@tromey.com>
6640 * varobj.c (install_new_value): Use new_reference.
6641 * value.h (value_incref): Return void. Swap intro comment with
6643 * value.c (set_value_parent): Use new_reference.
6644 (value_incref): Return void. Update intro comment.
6645 (release_value): Use new_reference.
6646 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6648 2018-04-30 Tom Tromey <tom@tromey.com>
6650 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6651 * gdb_bfd.h (new_bfd_ref): Remove.
6652 (gdb_bfd_open): Update comment.
6653 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6654 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6655 (gdb_bfd_fdopenr): Use new_reference.
6656 * exec.c (exec_file_attach): Use new_reference.
6658 2018-04-30 Tom Tromey <tom@tromey.com>
6660 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6663 2018-04-30 Tom Tromey <tom@tromey.com>
6665 * jit.c (jit_read_code_entry): Use type_align.
6666 * i386-tdep.c (i386_gdbarch_init): Don't call
6667 set_gdbarch_long_long_align_bit.
6668 * gdbarch.sh: Remove long_long_align_bit.
6669 * gdbarch.c, gdbarch.h: Rebuild.
6670 * arc-tdep.c (arc_type_align): New function.
6671 (arc_gdbarch_init): Use arc_type_align. Don't call
6672 set_gdbarch_long_long_align_bit.
6674 2018-04-30 Tom Tromey <tom@tromey.com>
6676 * rust-lang.c (rust_type_alignment): Remove.
6677 (rust_composite_type): Use type_align.
6679 2018-04-30 Tom Tromey <tom@tromey.com>
6681 * NEWS: Mention Type.align.
6682 * python/py-type.c (typy_get_alignof): New function.
6683 (type_object_getset): Add "alignof".
6685 2018-04-30 Tom Tromey <tom@tromey.com>
6689 * std-operator.def (UNOP_ALIGNOF): New operator.
6690 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6692 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6693 * c-lang.c (c_op_print_tab): Add alignof.
6694 * c-exp.y (ALIGNOF): New token.
6695 (exp): Add "ALIGNOF" production.
6696 (ident_tokens): Add _Alignof and alignof.
6698 2018-04-30 Tom Tromey <tom@tromey.com>
6700 * i386-tdep.c (i386_type_align): New function.
6701 (i386_gdbarch_init): Update.
6702 * gdbarch.sh (type_align): New method.
6703 * gdbarch.c, gdbarch.h: Rebuild.
6704 * arch-utils.h (default_type_align): Declare.
6705 * arch-utils.c (default_type_align): New function.
6706 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6707 (struct type) <align_log2>: New field.
6708 <instance_flags>: Now a bitfield.
6709 (TYPE_RAW_ALIGN): New macro.
6710 (type_align, type_raw_align, set_type_align): Declare.
6711 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6713 * dwarf2read.c (quirk_rust_enum): Set type alignment.
6714 (get_alignment, maybe_set_alignment): New functions.
6715 (read_structure_type, read_enumeration_type, read_array_type)
6716 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6717 (read_subrange_type, read_base_type): Set type alignment.
6719 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
6721 * dwarf2read.c (read_index_from_section): Use bool.
6723 2018-04-29 Fabian Groffen <grobian@gentoo.org>
6726 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6729 2018-04-29 John Reiser <jreiser@BitWagon.com>
6732 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6733 last step, and do it atomically.
6735 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
6737 * compile/compile-c-types.c (convert_int, convert_float):
6740 2018-04-27 Tom Tromey <tom@tromey.com>
6743 * rust-lang.c (rust_inclusive_range_type_p): New function.
6744 (rust_range): Handle inclusive ranges.
6745 (rust_compute_range): Likewise.
6746 * rust-exp.y (struct rust_op) <inclusive>: New field.
6747 (DOTDOTEQ): New constant.
6748 (range_expr): Add "..=" productions.
6749 (operator_tokens): Add "..=" token.
6750 (ast_range): Add "inclusive" parameter.
6751 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6753 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6755 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6756 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6758 * expprint.c (print_subexp_standard): Handle new bounds values.
6759 (dump_subexp_body_standard): Likewise.
6761 2018-04-27 Tom Tromey <tom@tromey.com>
6763 * configure: Rebuild.
6764 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6765 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6767 (class symbol_needs_eval_context): Likewise.
6768 * dwarf2read.c (mock_mapped_index::symbol_name_count)
6769 (mock_mapped_index::symbol_name_at): Use "override". Remove
6771 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6773 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6774 * aarch64-tdep.c (instruction_reader::read): Use "override".
6775 (instruction_reader_test::read): Likewise.
6776 * arm-tdep.c (instruction_reader::read): Use "override".
6777 (instruction_reader_thumb::read): Likewise.
6779 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
6782 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6783 instead of remote_send.
6784 (remote_send): Remove.
6786 2018-04-26 Pedro Alves <palves@redhat.com>
6788 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6789 find_function_start_sal instead of find_pc_line.
6791 2018-04-26 Pedro Alves <palves@redhat.com>
6793 * breakpoint.c (set_breakpoint_location_function): Handle
6795 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6796 * elfread.c (elf_symtab_read): Give data symbols with
6797 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6798 (elf_rel_plt_read): Update comment.
6799 * linespec.c (convert_linespec_to_sals): Handle
6801 (minsym_found): Handle mst_data_gnu_ifunc.
6802 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6803 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6804 * parse.c (find_minsym_type_and_address): Handle
6806 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6807 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6808 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6810 <mst_data_gnu_ifunc>: New enumerator.
6812 2018-04-26 Pedro Alves <palves@redhat.com>
6814 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6815 (lookup_minimal_symbol_by_pc_section): ... this. Replace
6816 'want_trampoline' parameter by a lookup_msym_prefer parameter.
6818 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6819 (lookup_minimal_symbol_by_pc): Adjust.
6820 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6821 (lookup_solib_trampoline_symbol_by_pc): Adjust.
6822 * minsyms.h (lookup_msym_prefer): New enum.
6823 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6824 parameter by a lookup_msym_prefer parameter.
6826 2018-04-26 Pedro Alves <palves@redhat.com>
6828 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6829 ends in "@plt" instead of looking at the symbol's section.
6831 2018-04-26 Pedro Alves <palves@redhat.com>
6833 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
6835 (find_pc_partial_function_gnu_ifunc): Rename to ...
6836 (find_pc_partial_function): ... this, and remove references to
6838 (find_pc_partial_function): Delete old implementation.
6839 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6841 2018-04-26 Pedro Alves <palves@redhat.com>
6843 * linespec.c (struct bound_minimal_symbol_search_key): New.
6844 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
6845 skip first line if we found a GNU ifunc minimal symbol by name.
6846 (compare_msymbols): Change parameters to work with a destructured
6848 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6851 2018-04-26 Pedro Alves <palves@redhat.com>
6853 * breakpoint.c (set_breakpoint_location_function): Don't resolve
6854 ifunc targets here. Instead, if we have an ifunc minsym, use its
6856 (add_location_to_breakpoint): Store the minsym and the objfile in
6857 the breakpoint location.
6858 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6859 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6860 Record the minsym in the sal.
6861 * symtab.h (symtab_and_line) <msymbol>: New field.
6863 2018-04-26 Pedro Alves <palves@redhat.com>
6865 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6866 unless we actually resolved the ifunc.
6868 2018-04-26 Pedro Alves <palves@redhat.com>
6870 * c-exp.y (variable production): Prefer ifunc minsyms over
6871 regular function symbols.
6872 * symtab.c (find_gnu_ifunc): New function.
6873 * minsyms.h (lookup_msym_prefer): New enum.
6874 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6875 parameter by a lookup_msym_prefer parameter.
6876 * symtab.h (find_gnu_ifunc): New declaration.
6878 2018-04-26 Pedro Alves <palves@redhat.com>
6880 * blockframe.c (find_gnu_ifunc_target_type): New function.
6881 (find_function_type): New.
6882 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6883 return a value with a memory address.
6884 (eval_call): For calls to GNU ifunc functions, try to find the
6885 type of the target function from the type that the resolver
6887 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6889 * infcall.c (find_function_return_type): Delete.
6890 (find_function_addr): Add 'function_type' parameter. For calls to
6891 GNU ifunc functions, try to find the type of the target function
6892 from the type that the resolver returns, and return it via
6894 (call_function_by_hand_dummy): Adjust to use the function type
6895 returned by find_function_addr.
6896 (find_function_addr): Add 'function_type' parameter and move
6898 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6901 2018-04-26 Pedro Alves <palves@redhat.com>
6903 * c-exp.y (variable production): Skip finding an alias for ifunc
6906 2018-04-26 Pedro Alves <palves@redhat.com>
6908 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6910 2018-04-25 Pedro Alves <palves@redhat.com>
6912 * infcmd.c (kill_command): Print the pid as string, not the whole
6913 thread's ptid. Add comment. s/has been killed/killed/ in output
6915 * remote.c (remote_detach_1): Print the pid as string, not the
6916 whole thread's ptid.
6918 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6919 Sergio Durigan Junior <sergiodj@redhat.com>
6920 Pedro Alves <palves@redhat.com>
6922 * infcmd.c (kill_command): Print message when inferior has
6924 * inferior.c (print_inferior_events): Remove 'static'. Set as
6926 (add_inferior): Improve message printed when
6927 'print_inferior_events' is on.
6928 (exit_inferior): Remove message printed when
6929 'print_inferior_events' is on.
6930 (detach_inferior): Improve message printed when
6931 'print_inferior_events' is on.
6932 (initialize_inferiors): Use 'add_inferior_silent' to set
6933 'current_inferior_'.
6934 * inferior.h (print_inferior_events): Declare here as
6936 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6937 '[Detaching...]' messages when 'print_inferior_events' is on.
6938 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
6939 as prefix/suffix for messages. Remove periods. Fix erroneous
6940 'Detaching after fork from child...', replace it by '... from
6942 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6943 prefix/suffix when printing 'Detaching...' messages. Print
6944 them when 'print_inferior_events' is on.
6945 * remote.c (remote_detach_1): Print message when detaching
6946 from inferior and '!is_fork_parent'.
6948 2018-04-24 Tom Tromey <tom@tromey.com>
6950 * cli-out.h: Reindent.
6952 2018-04-24 Tom Tromey <tom@tromey.com>
6954 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6955 (cli_ui_out::do_field_string): Use fputs_filtered.
6956 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6958 2018-04-23 Tom Tromey <tom@tromey.com>
6960 * guile/scm-frame.c (gdbscm_frame_read_var): Use
6961 gdb::unique_xmalloc_ptr.
6963 2018-04-23 Tom Tromey <tom@tromey.com>
6965 * configure: Rebuild.
6967 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
6970 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6971 prepare_for_testing. Set normal_bp to r_debug_state if target
6974 2018-04-21 Pedro Alves <palves@redhat.com>
6975 Rajendra SY <rajendra.sy@gmail.com>
6977 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6978 * remote.c (extended_remote_attach): In all-stop mode, mark the
6979 thread as executing.
6981 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6983 * thread.c (thread_apply_all_command): Fix comment.
6984 (thread_command): Fix comment.
6986 2018-04-10 Alan Hayward <alan.hayward@arm.com>
6988 * common/tdesc.h (tdesc_create_feature): Remove xml filename
6990 * features/aarch64-core.c (create_feature_aarch64_core):
6992 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
6994 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
6996 * features/i386/32bit-avx512.c
6997 (create_feature_i386_32bit_avx512): Likewise.
6998 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7000 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7002 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7004 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7006 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7008 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7010 * features/i386/64bit-avx512.c
7011 (create_feature_i386_64bit_avx512): Likewise.
7012 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7014 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7016 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7018 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7020 * features/i386/64bit-segments.c
7021 (create_feature_i386_64bit_segments): Likewise.
7022 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7024 * features/i386/x32-core.c
7025 (create_feature_i386_x32_core): Likewise.
7026 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7027 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7028 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7029 * target-descriptions.c: In generated code, don't pass xml
7032 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7034 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7035 (print_xml_feature::visit_post): Likewise.
7036 (print_xml_feature::visit): Likewise.
7037 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7038 (print_xml_feature): Add new class.
7039 * regformats/regdat.sh: Null xmltarget on feature targets.
7040 * target-descriptions.c (struct target_desc): Add xmltarget.
7041 (maintenance_check_tdesc_xml_convert): Add unittest function.
7042 (tdesc_get_features_xml): Add function to get xml.
7043 (maintenance_check_xml_descriptions): Test xml generation.
7044 * xml-tdesc.c (string_read_description_xml): Add function.
7045 * xml-tdesc.h (string_read_description_xml): Add declaration.
7047 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7049 * features/Makefile: Add feature marker to targets with new style
7050 target descriptions.
7051 * regformats/aarch64.dat: Regenerate.
7052 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7053 * regformats/i386/amd64-avx-linux.dat: Likewise.
7054 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7055 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7056 * regformats/i386/amd64-linux.dat: Likewise.
7057 * regformats/i386/amd64-mpx-linux.dat: Likewise.
7058 * regformats/i386/amd64.dat: Likewise.
7059 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7060 * regformats/i386/i386-avx-linux.dat: Likewise.
7061 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7062 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7063 * regformats/i386/i386-linux.dat: Likewise.
7064 * regformats/i386/i386-mmx-linux.dat: Likewise.
7065 * regformats/i386/i386-mpx-linux.dat: Likewise.
7066 * regformats/i386/i386.dat: Likewise.
7067 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7068 * regformats/i386/x32-avx-linux.dat: Likewise.
7069 * regformats/i386/x32-linux.dat: Likewise.
7070 * regformats/tic6x-c62x-linux.dat: Likewise.
7071 * regformats/tic6x-c64x-linux.dat: Likewise.
7072 * regformats/tic6x-c64xp-linux.dat: Likewise.
7073 * regformats/regdat.sh: Parse feature marker.
7075 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7077 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7078 (tdesc_osabi_name): Likewise.
7079 * target-descriptions.c (tdesc_architecture_name): Add new
7081 (tdesc_osabi_name): Likewise.
7083 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7085 * common/tdesc.c (tdesc_predefined_type): Move to here.
7086 (tdesc_named_type): Likewise.
7087 (tdesc_create_vector): Likewise.
7088 (tdesc_create_struct): Likewise.
7089 (tdesc_set_struct_size): Likewise.
7090 (tdesc_create_union): Likewise.
7091 (tdesc_create_flags): Likewise.
7092 (tdesc_create_enum): Likewise.
7093 (tdesc_add_field): Likewise.
7094 (tdesc_add_typed_bitfield): Likewise.
7095 (tdesc_add_bitfield): Likewise.
7096 (tdesc_add_flag): Likewise.
7097 (tdesc_add_enum_value): Likewise.
7098 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7099 (struct tdesc_type_vector): Likewise.
7100 (struct tdesc_type_field): Likewise.
7101 (struct tdesc_type_with_fields): Likewise.
7102 (tdesc_create_enum): Add declaration.
7103 (tdesc_add_typed_bitfield): Likewise.
7104 (tdesc_add_enum_value): Likewise.
7105 * target-descriptions.c (tdesc_type_field): Move from here.
7106 (tdesc_type_builtin): Likewise.
7107 (tdesc_type_vector): Likewise.
7108 (tdesc_type_with_fields): Likewise.
7109 (tdesc_predefined_types): Likewise.
7110 (tdesc_named_type): Likewise.
7111 (tdesc_create_vector): Likewise.
7112 (tdesc_create_struct): Likewise.
7113 (tdesc_set_struct_size): Likewise.
7114 (tdesc_create_union): Likewise.
7115 (tdesc_create_flags): Likewise.
7116 (tdesc_create_enum): Likewise.
7117 (tdesc_add_field): Likewise.
7118 (tdesc_add_typed_bitfield): Likewise.
7119 (tdesc_add_bitfield): Likewise.
7120 (tdesc_add_flag): Likewise.
7121 (tdesc_add_enum_value): Likewise.
7122 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7123 (tdesc_add_typed_bitfield): Likewise.
7124 (tdesc_add_enum_value): Likewise.
7126 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7128 * common/tdesc.c (tdesc_feature::accept): Move to here.
7129 (tdesc_feature::operator==): Likewise.
7130 (tdesc_create_reg): Likewise.
7131 * common/tdesc.h (tdesc_type_kind): Likewise.
7132 (struct tdesc_type): Likewise.
7133 (struct tdesc_feature): Likewise.
7134 * regformats/regdat.sh: Create a feature.
7135 * target-descriptions.c (tdesc_type_kind): Move from here.
7136 (tdesc_type): Likewise.
7137 (tdesc_type_up): Likewise.
7138 (tdesc_feature): Likewise.
7139 (tdesc_create_reg): Likewise.
7141 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7143 * Makefile.in: Add arch/tdesc.c
7144 * common/tdesc.c: New file.
7145 * common/tdesc.h (tdesc_element_visitor): Move to here.
7146 (tdesc_element): Likewise.
7147 (tdesc_reg): Likewise.
7148 (tdesc_reg_up): Likewise.
7149 * regformats/regdef.h (reg): Add offset to constructors.
7150 * target-descriptions.c (tdesc_element_visitor): Move from here.
7151 (tdesc_element): Likewise.
7152 (tdesc_reg): Likewise.
7153 (tdesc_reg_up): Likewise.
7155 2018-04-17 Tom Tromey <tom@tromey.com>
7157 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7160 2018-04-17 Tom Tromey <tom@tromey.com>
7162 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7164 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
7166 * symtab.c (print_symbol_info): Skip printing filename and line
7167 number when `last' is NULL.
7168 (symtab_symbol_info): Use empty string instead of NULL for first
7169 invocation of print_symbol_info.
7170 (rbreak_command): Pass NULL to `last' parameter of
7173 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
7175 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7178 2018-04-16 Pedro Alves <palves@redhat.com>
7180 * MAINTAINERS (sh): Remove.
7181 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7182 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7183 (ALLDEPFILES): Remove sh64-tdep.c.
7184 * NEWS: Mentions that support for SH-5/SH64 is removed.
7185 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7186 (sh*-*-openbsd*): Ditto.
7187 (sh64-*-elf*): Remove.
7189 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7190 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7191 * sh-tdep.c: No longer include "sh64-tdep.h".
7192 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7193 * sh64-tdep.c, sh64-tdep.h: Remove files.
7195 2018-04-16 Pedro Alves <palves@redhat.com>
7197 * MAINTAINERS: Remove m88k.
7198 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7199 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7200 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7201 * NEWS: Mention that support for m88k was removed.
7202 * configure.host (m88*-*-*): Remove support.
7203 * configure.nat (m88k-*-*): Remove support.
7204 * configure.tgt (m88*-*-openbsd*): Remove.
7205 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7207 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7209 * configure.tgt (x86_tobjs): New variable.
7210 (amd64_tobjs, i386_tobjs): Use it.
7212 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7214 * symtab.c (print_symbol_info): Precede the symbol definition by
7215 the line number when available.
7216 * NEWS: Advertise this enhancement.
7218 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7220 * NEWS (New options): announce set/show record btrace cpu.
7221 * btrace.c: Include record-btrace.h.
7222 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7223 the vendor is unknown.
7224 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7225 Maybe overwrite the btrace configuration's cpu.
7226 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7227 (btrace_fetch): Add cpu parameter. Update callers.
7228 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7229 Maybe overwrite the btrace configuration's cpu. Skip enabling
7230 errata workarounds if the vendor is unknown.
7231 * python/py-record-btrace.c: Include record-btrace.h.
7232 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7233 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7234 * record-btrace.c (record_btrace_cpu_state_kind): New.
7235 (record_btrace_cpu): New.
7236 (set_record_btrace_cpu_cmdlist): New.
7237 (record_btrace_get_cpu): New.
7238 (require_btrace_thread, record_btrace_info)
7239 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7240 (cmd_set_record_btrace_cpu_none): New.
7241 (cmd_set_record_btrace_cpu_auto): New.
7242 (cmd_set_record_btrace_cpu): New.
7243 (cmd_show_record_btrace_cpu): New.
7244 (_initialize_record_btrace): Initialize set/show record btrace cpu
7246 * record-btrace.h (record_btrace_get_cpu): New.
7248 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7250 * record.c (set_record_command): Fix typo in message.
7252 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7254 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7256 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7258 * infrun.c (process_event_stop_test): Call
7259 gdbarch_in_indirect_branch_thunk.
7260 * gdbarch.sh (in_indirect_branch_thunk): New.
7261 * gdbarch.c: Regenerated.
7262 * gdbarch.h: Regenerated.
7265 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7266 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7267 (ALLDEPFILES): Add x86-tdep.c.
7268 * arch-utils.h (default_in_indirect_branch_thunk): New.
7269 * arch-utils.c (default_in_indirect_branch_thunk): New.
7270 * i386-tdep: Include x86-tdep.h.
7271 (i386_in_indirect_branch_thunk): New.
7272 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7274 * amd64-tdep: Include x86-tdep.h.
7275 (amd64_in_indirect_branch_thunk): New.
7276 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7278 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7281 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7282 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7283 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7286 2018-04-12 Tom Tromey <tom@tromey.com>
7288 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7289 (rust_evaluate_subexp): Likewise.
7291 2018-04-12 Pedro Alves <palves@redhat.com>
7293 * procfs.c (procfs_detach): Make forward declaration's prototype
7294 match definition's protototype.
7295 (proc_get_LDT_entry): Remove stale do_cleanups call.
7297 2018-04-12 Pedro Alves <palves@redhat.com>
7299 * target.h (target_ops::to_has_exited): Delete.
7300 (target_has_exited): Delete.
7301 * target-delegates.c: Regenerate.
7303 2018-04-11 Pedro Alves <palves@redhat.com>
7305 * target.c (fileio_fh_t::t): Add comment.
7306 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7307 (target_fileio_close): Handle a NULL target.
7308 (invalidate_fileio_fh): New.
7309 (target_close): Call it.
7310 * remote.c (remote_hostio_send_command): No longer check whether
7311 remote_desc is open.
7313 2018-04-11 Pedro Alves <palves@redhat.com>
7315 * target.c (fileio_fh_t): Make it a named struct instead of a
7317 (fileio_fh_t::is_closed): New method.
7318 (DEF_VEC_O (fileio_fh_t)): Remove.
7319 (fileio_fhandles): Now a std::vector.
7320 (is_closed_fileio_fh): Delete.
7321 (acquire_fileio_fd): Adjust. Rename parameters.
7322 (release_fileio_fd): Adjust.
7323 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7324 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7325 (target_fileio_close): Adjust.
7327 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7329 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7332 2018-04-10 Pedro Alves <palves@redhat.com>
7334 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7335 (scoped_finish_thread_state): New class.
7336 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7338 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7339 (fetch_inferior_event, normal_stop): Likewise.
7340 * thread.c (finish_thread_state_cleanup): Delete.
7342 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7343 Pedro Alves <palves@redhat.com>
7345 * value.c: Include "selftest.h" and "common/array-view.h".
7346 (struct range) <operator ==>: New.
7347 (test_ranges_contain): New.
7348 (check_ranges_vector): New.
7349 (test_insert_into_bit_range_vector): New.
7350 (_initialize_values): Register selftests.
7351 * common/array-view.h (operator==, operator!=): New.
7353 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7355 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7357 * inline-frame.c: Include <algorithm>.
7358 (struct inline_state): Add constructor.
7359 (inline_state_s): Remove.
7360 (DEF_VEC_O(inline_state_s)): Remove.
7361 (inline_states): Change type to std::vector.
7362 (find_inline_frame_state): Adjust to std::vector.
7363 (allocate_inline_frame_state): Remove.
7364 (clear_inline_frame_state): Adjust to std::vector.
7365 (skip_inline_frames): Adjust to std::vector.
7367 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7369 * tracepoint.h (struct trace_state_variable): Add constructor.
7370 <name>: Change type to std::string.
7371 * tracepoint.c (tsv_s): Remove.
7372 (DEF_VEC_O(tsv_s)): Remove.
7373 (tvariables): Change to std::vector.
7374 (create_trace_state_variable): Adjust to std::vector.
7375 (find_trace_state_variable): Likewise.
7376 (find_trace_state_variable_by_number): Likewise.
7377 (delete_trace_state_variable): Likewise.
7378 (trace_variable_command): Adjust to std::string.
7379 (delete_trace_variable_command): Likewise.
7380 (tvariables_info_1): Adjust to std::vector.
7381 (save_trace_state_variables): Likewise.
7382 (start_tracing): Likewise.
7383 (merge_uploaded_trace_state_variables): Adjust to std::vector
7385 * target.h (struct target_ops)
7386 <to_download_trace_state_variable>: Pass reference to
7387 trace_state_variable.
7388 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7389 * target-delegates.c: Re-generate.
7390 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7391 (mi_tsv_deleted): Likewise.
7392 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7393 * remote.c (remote_download_trace_state_variable): Change
7394 pointer to reference and adjust.
7395 * make-target-delegates (parse_argtypes): Handle references.
7396 (write_function_header): Likewise.
7397 (munge_type): Likewise.
7399 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7401 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7402 string_view-selftests.c.
7403 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7405 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7406 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7407 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7408 * unittests/basic_string_view/element_access/char/1.cc:
7410 * unittests/basic_string_view/element_access/char/empty.cc:
7412 * unittests/basic_string_view/element_access/char/front_back.cc:
7414 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7415 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7417 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7419 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7421 * unittests/basic_string_view/operations/compare/char/1.cc:
7423 * unittests/basic_string_view/operations/compare/char/13650.cc:
7425 * unittests/basic_string_view/operations/copy/char/1.cc:
7427 * unittests/basic_string_view/operations/data/char/1.cc:
7429 * unittests/basic_string_view/operations/find/char/1.cc:
7431 * unittests/basic_string_view/operations/find/char/2.cc:
7433 * unittests/basic_string_view/operations/find/char/3.cc:
7435 * unittests/basic_string_view/operations/find/char/4.cc:
7437 * unittests/basic_string_view/operations/rfind/char/1.cc:
7439 * unittests/basic_string_view/operations/rfind/char/2.cc:
7441 * unittests/basic_string_view/operations/rfind/char/3.cc:
7443 * unittests/basic_string_view/operations/substr/char/1.cc:
7445 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7446 * unittests/string_view-selftests.c: New file.
7448 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7450 * unittests/basic_string_view/capacity/1.cc: New file.
7451 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7452 * unittests/basic_string_view/cons/char/1.cc: New file.
7453 * unittests/basic_string_view/cons/char/2.cc: New file.
7454 * unittests/basic_string_view/cons/char/3.cc: New file.
7455 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7456 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7457 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7458 * unittests/basic_string_view/element_access/char/1.cc: New file.
7459 * unittests/basic_string_view/element_access/char/2.cc: New file.
7460 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7461 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7462 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7463 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7464 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7465 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7466 * unittests/basic_string_view/include.cc: New file.
7467 * unittests/basic_string_view/inserters/char/1.cc: New file.
7468 * unittests/basic_string_view/inserters/char/2.cc: New file.
7469 * unittests/basic_string_view/inserters/char/3.cc: New file.
7470 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7471 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7472 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7473 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7474 * unittests/basic_string_view/literals/types.cc: New file.
7475 * unittests/basic_string_view/literals/values.cc: New file.
7476 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7477 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7478 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7479 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7480 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7481 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7482 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7483 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7484 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7485 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7486 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7487 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7488 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7489 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7490 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7491 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7492 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7493 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7494 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7495 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7496 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7497 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7498 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7499 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7500 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7501 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7502 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7503 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7504 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7505 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7506 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7507 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7508 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7509 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7510 * unittests/basic_string_view/operators/char/2.cc: New file.
7511 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7512 * unittests/basic_string_view/range_access/char/1.cc: New file.
7513 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7514 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7515 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7516 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7517 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7518 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7519 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7520 * unittests/basic_string_view/typedefs.cc: New file.
7521 * unittests/basic_string_view/types/1.cc: New file.
7523 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7525 * common/gdb_string_view.h: Remove libstdc++ implementation
7526 details, adjust to gdb reality.
7527 * common/gdb_string_view.tcc: Likewise.
7528 * cli/cli-script.c (struct string_view): Remove.
7529 (user_args) <m_args>: Change element type to gdb::string_view.
7530 (user_args::insert_args): Adjust.
7532 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7534 * common/gdb_string_view.h: New file.
7535 * common/gdb_string_view.tcc: New file.
7537 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7539 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7540 * configure: Re-generate.
7542 2018-04-09 Pedro Alves <palves@redhat.com>
7544 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7545 (set_target_gdbarch): Call
7546 gdb::observers::architecture_changed.notify instead of
7547 observer_notify_architecture_changed.
7549 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7551 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7552 (do_restore_current_traceframe_cleanup): Remove.
7553 (restore_current_traceframe_cleanup_dtor): Remove.
7554 (make_cleanup_restore_current_traceframe): Remove.
7555 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7557 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7558 * infrun.c (fetch_inferior_event): Use
7559 scoped_restore_current_traceframe.
7561 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7563 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7565 <n_allocated_type_units>: Remove.
7566 <all_type_units>: Change to std::vector.
7567 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7568 to std::vector change.
7569 (dwarf2_per_objfile::get_cutu): Likewise.
7570 (dwarf2_per_objfile::get_tu): Likewise.
7571 (create_signatured_type_table_from_index): Likewise.
7572 (create_signatured_type_table_from_debug_names): Likewise.
7573 (dw2_symtab_iter_next): Likewise.
7574 (dw2_print_stats): Likewise.
7575 (dw2_expand_all_symtabs): Likewise.
7576 (dw2_expand_marked_cus): Likewise.
7577 (dw2_debug_names_iterator::next): Likewise.
7578 (dwarf2_initialize_objfile): Likewise.
7579 (add_signatured_type_cu_to_table): Likewise.
7580 (create_all_type_units): Likewise.
7581 (add_type_unit): Likewise.
7582 (struct tu_abbrev_offset): Add constructor.
7583 (build_type_psymtabs_1): Adjust to std::vector change.
7584 (print_tu_stats): Likewise.
7585 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7586 (write_debug_names): Likewise.
7588 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7590 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7591 Make an std::vector.
7592 <n_comp_units>: Remove.
7593 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7594 to std::vector change.
7595 (dwarf2_per_objfile::get_cutu): Likewise.
7596 (dwarf2_per_objfile::get_cu): Likewise.
7597 (create_cus_from_index): Likewise.
7598 (create_addrmap_from_index): Likewise.
7599 (create_addrmap_from_aranges): Likewise.
7600 (dwarf2_read_index): Likewise.
7601 (dw2_find_last_source_symtab): Likewise.
7602 (dw2_map_symtabs_matching_filename): Likewise.
7603 (dw2_symtab_iter_next): Likewise.
7604 (dw2_print_stats): Likewise.
7605 (dw2_expand_all_symtabs): Likewise.
7606 (dw2_expand_symtabs_with_fullname): Likewise.
7607 (dw2_expand_marked_cus): Likewise.
7608 (dw2_map_symbol_filenames): Likewise.
7609 (create_cus_from_debug_names): Likewise.
7610 (dwarf2_read_debug_names): Likewise.
7611 (dw2_debug_names_iterator::next): Likewise.
7612 (dwarf2_initialize_objfile): Likewise.
7613 (set_partial_user): Likewise.
7614 (dwarf2_build_psymtabs_hard): Likewise.
7615 (read_comp_units_from_section): Remove arguments, adjust to
7617 (create_all_comp_units): Adjust to std::vector and
7618 read_comp_units_from_section changes.
7619 (dwarf2_find_containing_comp_unit): Adjust to std::vector
7621 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7622 (psyms_seen_size): Likewise.
7623 (write_gdbindex): Likewise.
7624 (write_debug_names): Likewise.
7626 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7628 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7629 with dwarf2_per_objfile.
7630 (create_cus_from_index): Likewise.
7631 (create_signatured_type_table_from_index): Likewise.
7632 (dwarf2_read_index): Likewise.
7633 (dwarf2_initialize_objfile): Likewise.
7634 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
7635 per_cu rather than get_dwarf2_per_objfile.
7637 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7639 * dwarf2read.h (struct signatured_type): Forward declare.
7640 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7642 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7643 (dw2_get_cutu): ...this.
7644 (dwarf2_per_objfile::get_cu): Rename from...
7645 (dw2_get_cu): ...this.
7646 (dwarf2_per_objfile::get_tu): New.
7647 (create_addrmap_from_index): Adjust.
7648 (create_addrmap_from_aranges): Adjust.
7649 (dw2_find_last_source_symtab): Adjust.
7650 (dw2_map_symtabs_matching_filename): Adjust.
7651 (dw2_symtab_iter_next): Adjust.
7652 (dw2_print_stats): Adjust.
7653 (dw2_expand_all_symtabs): Adjust.
7654 (dw2_expand_symtabs_with_fullname): Adjust.
7655 (dw2_expand_marked_cus): Adjust.
7656 (dw_expand_symtabs_matching_file_matcher): Adjust.
7657 (dw2_map_symbol_filenames): Adjust.
7658 (dw2_debug_names_iterator::next): Adjust.
7659 (dwarf2_initialize_objfile): Adjust.
7660 (set_partial_user): Adjust.
7661 (dwarf2_build_psymtabs_hard): Adjust.
7663 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7665 * dwarf2read.c (create_signatured_type_table_from_debug_names):
7666 Remove unused variables.
7667 (dw2_map_symtabs_matching_filename): Likewise.
7668 (dwarf2_record_block_ranges): Likewise.
7669 (dwarf2_read_addr_index): Likewise.
7670 (follow_die_offset): Likewise.
7672 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7674 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7675 to symbol_file_add_main.
7677 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7680 * mi/mi-console.c (do_fputc_async_safe): New.
7681 (mi_console_file::write_async_safe): New.
7682 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7683 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7685 * ui-file.c (ui_file::putstrn): Adjust call to
7686 fputstrn_unfiltered.
7687 * utils.c (printchar): Replace do_fputs and do_fprintf
7688 parameters by do_fputc.
7689 (fputstr_filtered): Adjust call to printchar.
7690 (fputstr_unfiltered): Likewise.
7691 (fputstrn_filtered): Likewise.
7692 (fputstrn_unfiltered): Add do_fputc parameter, pass to
7694 * utils.h (do_fputc_ftype): New typedef.
7695 (fputstrn_unfiltered): Add do_fputc parameter.
7697 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7699 * regformats/i386/i386-avx.dat: Remove.
7701 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7704 * amd64-tdep.c (amd64_none_init_abi): New function.
7705 (amd64_x32_none_init_abi): New function.
7706 (_initialize_amd64_tdep): Register handlers for x86-64 and
7707 x64_32 with GDB_OSABI_NONE.
7708 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7709 GDB_OSABI_NONE osabi.
7711 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7714 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7716 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7717 * osabi.c (gdb_osabi_names): Add "unknown" entry.
7719 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7721 * common/byte-vector.h (char_vector): New type.
7722 * target.h (target_read_alloc): Return
7723 gdb::optional<byte_vector>.
7724 (target_read_stralloc): Return gdb::optional<char_vector>.
7725 (target_get_osdata): Return gdb::optional<char_vector>.
7726 * target.c (target_read_alloc_1): Templatize. Replacement
7727 manual memory management with vector.
7728 (target_read_alloc): Change return type, adjust.
7729 (target_read_stralloc): Change return type, adjust.
7730 (target_get_osdata): Change return type, adjust.
7731 * auxv.c (struct auxv_info) <length>: Remove.
7732 <data>: Change type to gdb::optional<byte_vector>.
7733 (auxv_inferior_data_cleanup): Free auxv_info with delete.
7734 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7735 (target_auxv_search): Adjust.
7736 (fprint_target_auxv): Adjust.
7737 * avr-tdep.c (avr_io_reg_read_command): Adjust.
7738 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7739 (linux_make_corefile_notes): Adjust.
7740 * osdata.c (get_osdata): Adjust.
7741 * remote.c (remote_get_threads_with_qxfer): Adjust.
7742 (remote_memory_map): Adjust.
7743 (remote_traceframe_info): Adjust.
7744 (btrace_read_config): Adjust.
7745 (remote_read_btrace): Adjust.
7746 (remote_pid_to_exec_file): Adjust.
7747 * solib-aix.c (solib_aix_get_library_list): Adjust.
7748 * solib-dsbt.c (decode_loadmap): Don't free buf.
7749 (dsbt_get_initial_loadmaps): Adjust.
7750 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7751 * solib-target.c (solib_target_current_sos): Adjust.
7752 * tracepoint.c (sdata_make_value): Adjust.
7753 * xml-support.c (xinclude_start_include): Adjust.
7754 (xml_fetch_content_from_file): Adjust.
7755 * xml-support.h (xml_fetch_another): Change return type.
7756 (xml_fetch_content_from_file): Change return type.
7757 * xml-syscall.c (xml_init_syscalls_info): Adjust.
7758 * xml-tdesc.c (file_read_description_xml): Adjust.
7759 (fetch_available_features_from_target): Change return type.
7760 (target_fetch_description_xml): Adjust.
7761 (target_read_description_xml): Adjust.
7763 2018-04-06 Tom Tromey <tom@tromey.com>
7765 * value.c (~value): Update.
7766 (struct value) <contents>: Now unique_xmalloc_ptr.
7767 (value_contents_bits_eq, allocate_value_contents)
7768 (value_contents_raw, value_contents_all_raw)
7769 (value_contents_for_printing, value_contents_for_printing_const)
7770 (set_value_enclosing_type): Update.
7772 2018-04-06 Tom Tromey <tom@tromey.com>
7774 * value.c (range_s): Remove typedef, VEC.
7775 (struct range): Add operator<.
7776 (range_lessthan): Remove.
7777 (ranges_contain): Change type.
7779 (struct value) <unavailable, optimized_out>: Now std::vector.
7780 (value_entirely_available)
7781 (value_entirely_covered_by_range_vector)
7782 (value_entirely_unavailable, value_entirely_optimized_out):
7784 (insert_into_bit_range_vector): Change argument type.
7785 (find_first_range_overlap): Likewise.
7786 (struct ranges_and_idx, value_contents_bits_eq)
7787 (require_not_optimized_out, require_available): Update.
7788 (ranges_copy_adjusted): Change argument types.
7789 (value_optimized_out, value_copy, value_fetch_lazy): Update.
7791 2018-04-06 Tom Tromey <tom@tromey.com>
7793 * value.c (~value): Update.
7794 (struct value) <parent>: Now a value_ref_ptr.
7795 (value_parent, set_value_parent, value_address, value_copy):
7798 2018-04-06 Tom Tromey <tom@tromey.com>
7800 * value.c (struct value): Add constructor, destructor, and member
7802 (allocate_value_lazy, value_decref): Update.
7804 2018-04-06 Tom Tromey <tom@tromey.com>
7806 * value.c (struct value) <released, next>: Remove.
7807 (all_values): Now a std::vector.
7808 (allocate_value_lazy): Update.
7809 (value_next): Remove.
7810 (value_mark, value_free_to_mark, release_value)
7811 (value_release_to_mark): Update.
7813 2018-04-06 Tom Tromey <tom@tromey.com>
7815 * value.h (fetch_subexp_value, value_release_to_mark): Update.
7816 (free_value_chain): Remove.
7817 * value.c (free_value_chain): Remove.
7818 (value_release_to_mark): Return a std::vector.
7819 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7821 (check_condition): Update.
7822 * eval.c (fetch_subexp_value): Change "val_chain" to a
7824 * breakpoint.c (update_watchpoint): Update.
7825 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7827 2018-04-06 Tom Tromey <tom@tromey.com>
7829 * value.h (free_all_values): Remove.
7830 * value.c (free_all_values): Remove.
7832 2018-04-06 Tom Tromey <tom@tromey.com>
7834 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7835 (value_history_chain, value_history_count): Remove.
7836 (value_history): New global.
7837 (record_latest_value, access_value_history, show_values)
7838 (preserve_values): Update.
7840 2018-04-06 Tom Tromey <tom@tromey.com>
7842 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7843 * varobj.c (varobj_set_display_format, varobj_set_value)
7844 (install_default_visualizer, construct_visualizer)
7845 (install_new_value, ~varobj, varobj_get_value_type)
7846 (my_value_of_variable, varobj_editable_p): Update.
7847 * c-varobj.c (c_describe_child, c_value_of_variable)
7848 (cplus_number_of_children, cplus_describe_child): Update.
7849 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7850 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7851 (ada_value_of_variable, ada_value_is_changeable_p): Update.
7853 2018-04-06 Tom Tromey <tom@tromey.com>
7855 * printcmd.c (last_examine_address): Change type to
7857 (do_examine, x_command): Update.
7859 2018-04-06 Tom Tromey <tom@tromey.com>
7861 * value.c (release_value): Update.
7862 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7863 (struct bpstats) <val>: Now a value_ref_ptr.
7864 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7865 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7866 (~watchpoint, print_it_watchpoint, watch_command_1)
7867 (invalidate_bp_value_on_memory_change): Update.
7869 2018-04-06 Tom Tromey <tom@tromey.com>
7871 * varobj.c (varobj_clear_saved_item)
7872 (update_dynamic_varobj_children, install_new_value, ~varobj):
7874 * value.h (value_incref): Move declaration earlier.
7875 (value_decref): Rename from value_free.
7876 (struct value_ref_policy): New.
7877 (value_ref_ptr): New typedef.
7878 (struct value_deleter): Remove.
7879 (gdb_value_up): Remove typedef.
7880 (release_value): Change return type.
7881 (release_value_or_incref): Remove.
7882 * value.c (set_value_parent): Update.
7883 (value_incref): Change return type.
7884 (value_decref): Rename from value_free.
7885 (value_free_to_mark, free_all_values, free_value_chain): Update.
7886 (release_value): Return value_ref_ptr.
7887 (release_value_or_incref): Remove.
7888 (record_latest_value, set_internalvar, clear_internalvar):
7890 * stack.c (info_frame_command): Don't call value_free.
7891 * python/py-value.c (valpy_dealloc, valpy_new)
7892 (value_to_value_object): Update.
7893 * printcmd.c (do_examine): Update.
7894 * opencl-lang.c (lval_func_free_closure): Update.
7895 * mi/mi-main.c (register_changed_p): Don't call value_free.
7896 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7897 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7898 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7900 * guile/scm-value.c (vlscm_free_value_smob)
7901 (vlscm_scm_from_value): Update.
7902 * frame.c (frame_register_unwind, frame_unwind_register_signed)
7903 (frame_unwind_register_unsigned, get_frame_register_bytes)
7904 (put_frame_register_bytes): Don't call value_free.
7905 * findvar.c (address_from_register): Don't call value_free.
7906 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7907 * dwarf2loc.c (entry_data_value_free_closure)
7908 (value_of_dwarf_reg_entry, free_pieced_value_closure)
7909 (dwarf2_evaluate_loc_desc_full): Update.
7910 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7911 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7912 (~watchpoint, watch_command_1)
7913 (invalidate_bp_value_on_memory_change): Update.
7914 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7916 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
7919 * warning.m4: Add -Wno-error=deprecated-register.
7920 * configure: Re-generate.
7922 2018-04-05 Tom Tromey <tom@tromey.com>
7924 * linespec.h: Remove include of "vec.h".
7926 2018-04-05 Tom Tromey <tom@tromey.com>
7928 * linespec.c (typep): Remove typedef.
7929 (find_methods, find_superclass_methods): Take a std::vector.
7930 (find_method): Use std::vector.
7932 2018-04-05 Tom Tromey <tom@tromey.com>
7934 * utils.c (compare_strings): Remove.
7935 * utils.h (compare_strings): Remove.
7936 * objc-lang.h (find_imps): Update.
7937 * objc-lang.c (find_methods): Take a std::vector.
7938 (uniquify_strings, find_imps): Likewise.
7939 * linespec.c (find_methods): Take a std::vector.
7940 (decode_objc): Use std::vector.
7941 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7943 (find_method, find_function_symbols): Use std::vector.
7945 2018-04-05 Tom Tromey <tom@tromey.com>
7947 * completer.c (completion_tracker::completion_tracker): Remove
7949 (completion_tracker::discard_completions): Likewise.
7950 * breakpoint.c (ambiguous_names_p): Remove cast.
7951 * ada-lang.c (_initialize_ada_language): Remove cast.
7952 * utils.h (streq): Update.
7953 (streq_hash): Add new declaration.
7954 * utils.c (streq): Return bool.
7955 (streq_hash): New function.
7957 2018-04-05 Tom Tromey <tom@tromey.com>
7959 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7960 Remove a string copy.
7962 2018-04-05 Tom Tromey <tom@tromey.com>
7964 * linespec.c (filter_results): Use std::vector.
7965 (decode_line_2, decode_line_full): Update.
7967 2018-04-05 Tom Tromey <tom@tromey.com>
7969 * linespec.c (canonical_to_fullform): Return std::string.
7970 (filter_results): Update.
7971 (struct decode_line_2_item): Add constructor.
7972 <fullform, displayform>: Now std::string.
7973 (decode_line_2_compare_items): Now a std::sort comparator.
7974 (decode_line_2): Update.
7976 2018-04-05 Tom Tromey <tom@tromey.com>
7978 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7979 (unexpected_linespec_error): Update.
7980 (linespec_parse_basic, parse_linespec): Update.
7982 2018-04-05 Tom Tromey <tom@tromey.com>
7984 * linespec.c (linespec_parse_basic): Reindent.
7986 2018-04-05 Tom Tromey <tom@tromey.com>
7988 * minsyms.h (iterate_over_minimal_symbols): Update.
7989 * minsyms.c (iterate_over_minimal_symbols): Take a
7991 * linespec.c (struct collect_minsyms): Remove.
7992 (compare_msyms): Now a std::sort comparator.
7993 (add_minsym): Add parameters.
7994 (search_minsyms_for_name): Update. Use std::vector.
7996 2018-04-03 Tom Tromey <tom@tromey.com>
7998 * mipsread.c (read_alphacoff_dynamic_symtab): Use
8001 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8003 * MAINTAINERS (Write After Approval): Add Weimin Pan.
8005 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8008 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
8009 printing static type.
8011 2018-04-01 Tom Tromey <tom@tromey.com>
8013 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8014 (rs6000_xfer_shared_libraries): Update.
8016 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
8018 * common/gdb_vecs.h (char_ptr): Remove.
8019 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8021 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8023 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8025 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8027 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8029 * tracepoint.h (struct uploaded_tp): Initialize fields.
8030 <actions, step_actions, cmd_strings>: Change type to
8031 std::vector<char *>.
8032 * tracepoint.c (get_uploaded_tp): Allocate with new.
8033 (free_uploaded_tps): Free with delete.
8034 (parse_tracepoint_definition): Adjust to std::vector change.
8035 * breakpoint.c (read_uploaded_action): Likewise.
8036 (create_tracepoint_from_upload): Likewise.
8037 * ctf.c (ctf_write_uploaded_tp): Likewise.
8038 (SET_ARRAY_FIELD): Likewise.
8039 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8041 2018-03-30 Tom Tromey <tom@tromey.com>
8043 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
8045 (svr4_keep_data_in_core): Update.
8046 (svr4_read_so_list): Update.
8048 2018-03-30 Tom Tromey <tom@tromey.com>
8050 * windows-nat.c (handle_output_debug_string, handle_exception):
8052 * target.h (target_read_string): Update.
8053 * target.c (target_read_string): Change "string" to
8055 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8057 * solib-frv.c (frv_current_sos): Update.
8058 * solib-dsbt.c (dsbt_current_sos): Update.
8059 * solib-darwin.c (darwin_current_sos): Update.
8060 * linux-thread-db.c (inferior_has_bug): Update.
8061 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8062 Update. Remove alloca.
8063 * ada-lang.c (ada_main_name): Update.
8065 2018-03-30 Tom Tromey <tom@tromey.com>
8067 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8068 (struct dwo_file_deleter): New.
8069 (dwo_file_up): New typedef.
8070 (open_and_init_dwo_file): Use dwo_file_up.
8071 (free_dwo_file_cleanup): Remove.
8073 2018-03-30 Tom Tromey <tom@tromey.com>
8075 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8076 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8078 2018-03-30 Tom Tromey <tom@tromey.com>
8080 * dwarf2read.c (class free_cached_comp_units): New class.
8081 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8082 (free_cached_comp_units): Remove function.
8084 2018-03-30 Tom Tromey <tom@tromey.com>
8086 * utils.h (make_cleanup_unpush_target): Remove.
8087 * inf-ptrace.c (struct target_unpusher): New.
8088 (target_unpush_up) New typedef.
8089 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8091 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8093 2018-03-27 Tom Tromey <tom@tromey.com>
8095 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8097 2018-03-27 Pedro Alves <palves@redhat.com>
8098 Tom Tromey <tom@tromey.com>
8100 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8101 destructor. Now a class.
8102 (gdb_readline_wrapper_cleanup): Remove function.
8103 (gdb_readline_wrapper): Remove cleanups.
8105 2018-03-27 Tom Tromey <tom@tromey.com>
8107 * typeprint.h (struct type_print_options) <local_typedefs,
8108 global_typedefs>: Remove "struct" keyword.
8109 (class typedef_hash_table): New class.
8110 (recursively_update_typedef_hash, add_template_parameters)
8111 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8112 (find_typedef_in_hash): Don't declare.
8113 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8114 (typedef_hash_table::recursively_update): Rename from
8115 recursively_update_typedef_hash. Now a member.
8116 (typedef_hash_table::add_template_parameters): Rename from
8117 add_template_parameters. Now a member.
8118 (typedef_hash_table::typedef_hash_table): Now a constructor;
8119 rename from create_typedef_hash.
8120 (typedef_hash_table::~typedef_hash_table): Now a destructor;
8121 rename from free_typedef_hash.
8122 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8123 (do_free_global_table): Remove.
8124 (typedef_hash_table::typedef_hash_table): New constructor; renamed
8125 from copy_type_recursive.
8126 (create_global_typedef_table): Remove.
8127 (typedef_hash_table::find_global_typedef): Now a member of
8129 (typedef_hash_table::find_typedef): Rename from
8130 find_typedef_in_hash; now a member.
8131 (whatis_exp): Update.
8132 * extension.h (struct ext_lang_type_printers): Add constructor and
8134 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8136 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8137 Now a constructor; rename from start_ext_lang_type_printers.
8138 (ext_lang_type_printers): Now a destructor; rename from
8139 free_ext_lang_type_printers.
8140 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8142 (c_type_print_base_struct_union): Update. Remove cleanups.
8144 2018-03-27 Tom Tromey <tom@tromey.com>
8146 * dwarf-index-write.c: Include <cmath>.
8148 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8150 * NEWS: Add entry describing new "set|show varsize-limit" command.
8151 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8153 * printcmd.c (_initialize_printcmd): Add "set var" alias of
8156 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
8158 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8160 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8161 * dwarf-index-common.c: New file.
8162 * dwarf-index-common.h: New file.
8163 * dwarf-index-write.c: New file.
8164 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8165 (struct dwarf2_section_info): Move from here.
8166 (dwarf2_section_info_def): Likewise.
8167 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8168 (offset_type): Likewise.
8169 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8170 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8171 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8172 (byte_swap): Likewise.
8173 (MAYBE_SWAP): Likewise.
8174 (dwarf2_per_cu_ptr): Likewise.
8175 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8176 (struct tu_stats): Likewise.
8177 (struct dwarf2_per_objfile): Likewise.
8178 (struct dwarf2_per_cu_data): Likewise.
8179 (struct signatured_type): Likewise.
8180 (sig_type_ptr): Likewise.
8181 (DEF_VEC_P (sig_type_ptr)): Likewise.
8182 (INDEX4_SUFFIX): Likewise.
8183 (INDEX5_SUFFIX): Likewise.
8184 (DEBUG_STR_SUFFIX): Likewise.
8185 (dwarf2_read_section): Make non-static.
8186 (mapped_index_string_hash): Move from here.
8187 (dwarf5_djb_hash): Likewise.
8188 (file_write): Likewise.
8189 (class data_buf): Likewise.
8190 (struct symtab_index_entry): Likewise.
8191 (struct mapped_symtab): Likewise.
8192 (find_slot): Likewise.
8193 (hash_expand): Likewise.
8194 (add_index_entry): Likewise.
8195 (uniquify_cu_indices): Likewise.
8196 (class c_str_view): Likewise.
8197 (class c_str_view_hasher): Likewise.
8198 (class vector_hasher): Likewise.
8199 (write_hash_table): Likewise.
8200 (psym_index_map): Likewise.
8201 (struct addrmap_index_data): Likewise.
8202 (add_address_entry): Likewise.
8203 (add_address_entry_worker): Likewise.
8204 (write_address_map): Likewise.
8205 (symbol_kind): Likewise.
8206 (write_psymbols): Likewise.
8207 (struct signatured_type_index_data): Likewise.
8208 (write_one_signatured_type): Likewise.
8209 (recursively_count_psymbols): Likewise.
8210 (recursively_write_psymbols): Likewise.
8211 (class debug_names): Likewise.
8212 (check_dwarf64_offsets): Likewise.
8213 (psyms_seen_size): Likewise.
8214 (write_gdbindex): Likewise.
8215 (write_debug_names): Likewise.
8216 (assert_file_size): Likewise.
8217 (write_psymtabs_to_index): Likewise.
8218 (save_gdb_index_command): Likewise.
8219 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8221 * dwarf2read.h: New file.
8223 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8226 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8227 symbol name if the CU's language stores symbol names in linkage
8229 * language.h (struct language_defn)
8230 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8231 all instances of this struct.
8233 2018-03-26 Tom Tromey <tom@tromey.com>
8235 * stack.c (backtrace_command_1): Remove verbose code.
8237 2018-03-26 Tom Tromey <tom@tromey.com>
8239 * python/py-framefilter.c (py_print_type): Don't catch
8240 exceptions. Return void.
8241 (py_print_value): Likewise.
8242 (py_print_single_arg): Likewise.
8243 (enumerate_args): Don't catch exceptions.
8244 (py_print_args): Likewise.
8245 (py_print_frame): Likewise.
8246 (gdbpy_apply_frame_filter): Catch exceptions here.
8248 2018-03-26 Tom Tromey <tom@tromey.com>
8250 * stack.c (_initialize_stack): Remove trailing newlines from help
8251 text. Add "Usage" line to "backtrace" help.
8253 2018-03-26 Tom Tromey <tom@tromey.com>
8256 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8258 2018-03-26 Tom Tromey <tom@tromey.com>
8260 * python/py-framefilter.c (py_print_single_arg): Return
8261 EXT_LANG_BT_ERROR from catch.
8263 2018-03-26 Tom Tromey <tom@tromey.com>
8266 * stack.c (backtrace_command_1): Move some code into no-filters
8269 2018-03-26 Tom Tromey <tom@tromey.com>
8271 * python/py-framefilter.c (throw_quit_or_print_exception): New
8273 (gdbpy_apply_frame_filter): Use it.
8275 2018-03-26 Tom Tromey <tom@tromey.com>
8278 * python/py-framefilter.c (py_print_type, py_print_value)
8279 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8282 2018-03-26 Tom Tromey <tom@tromey.com>
8284 * python/py-framefilter.c (enumerate_args): Use
8285 gdb::unique_xmalloc_ptr.
8287 2018-03-26 Tom Tromey <tom@tromey.com>
8289 * python/py-framefilter.c (py_print_frame): Return
8291 (gdbpy_apply_frame_filter): Update comment.
8292 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8294 <EXT_LANG_BT_NO_FILTERS>: Change value.
8296 2018-03-26 Tom Tromey <tom@tromey.com>
8299 * stack.c (backtrace_command): Parse "hide" argument.
8300 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8301 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8304 2018-03-26 Tom Tromey <tom@tromey.com>
8306 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8308 (backtrace_command): Remove "fulltrace", add "flags".
8310 2018-03-26 Tom Tromey <tom@tromey.com>
8312 * stack.c (backtrace_command): Rewrite command line parsing.
8314 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8316 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8318 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8320 * filename-seen-cache.h: Add include guard.
8322 2018-03-26 Keith Seitz <keiths@redhat.com>
8324 * symfile.c (place_section): Remove "struct" from section_addr_info
8326 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8327 "struct" keyword from section_addr_info.
8329 2018-03-26 Alan Hayward <alan.hayward@arm.com>
8331 * regformats/regdef.h (reg): Add constructors.
8333 2018-03-25 Pedro Alves <palves@redhat.com>
8335 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8336 if then/else bodies in var_func_name extraction.
8338 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
8340 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8341 lookup_minimal_symbol() to find symbol entry.
8342 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8344 2018-03-23 Keith Seitz <keiths@redhat.com>
8347 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8348 nested type definitions for C++, too.
8350 2018-03-23 Tom Tromey <tom@tromey.com>
8352 * machoread.c (struct oso_el): Add a constructor. Don't define as
8354 (macho_register_oso): Remove.
8355 (macho_symtab_read): Take a std::vector.
8356 (oso_el_compare_name): Now a std::sort comparator.
8357 (macho_symfile_read_all_oso): Take a std::vector.
8358 (macho_symfile_read): Use std::vector. Remove cleanups.
8360 2018-03-22 Tom Tromey <tom@tromey.com>
8362 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8363 (record_full_goto_bookmark): Use std::string.
8365 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8368 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8371 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8373 * rs6000-tdep.c (store_insn_p): New function.
8374 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8375 and cr_reg to their unshifted values. Use store_insn_p to
8376 match LR saves using either R1 or fdata->alloca_reg. Use
8377 store_insn_p to match CR saves. Set alloca_reg_offset
8378 when alloca_reg and framep are set. Remove lr_reg shift
8379 when assigning to fdata->lr_register.
8381 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8383 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8384 command line args instead of emitting a warning.
8386 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8388 * tracepoint.h (struct static_tracepoint_marker): Initialize
8389 fields, define default constructor, move constructor and move
8390 assignment, disable the rest.
8391 <str_id, extra>: Make std::string.
8392 (release_static_tracepoint_marker): Remove.
8393 (free_current_marker): Remove.
8394 * tracepoint.c (free_current_marker): Remove.
8395 (parse_static_tracepoint_marker_definition): Adjust to
8396 std::string, use new hex2str overload.
8397 (release_static_tracepoint_marker): Remove.
8398 (print_one_static_tracepoint_marker): Get marker by reference
8399 and adjust to std::string.
8400 (info_static_tracepoint_markers_command): Adjust to std::vector
8402 * target.h (static_tracepoint_marker_p): Remove typedef.
8403 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8404 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8406 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8408 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8409 (target_debug_print_std_vector_static_tracepoint_marker): New.
8410 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8412 (target_debug_print_static_tracepoint_marker_p): ... this.
8413 * target-delegates.c: Re-generate.
8414 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8416 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8417 (decode_static_tracepoint_spec): Adjust to std::vector.
8418 (tracepoint_print_one_detail): Adjust to std::string.
8419 (strace_marker_decode_location): Adjust to std::string.
8420 (update_static_tracepoint): Adjust to std::string, remove call
8421 to release_static_tracepoint_marker.
8422 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8423 Adjust to std::vector.
8424 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8425 (remote_static_tracepoint_markers_by_strid): Adjust to
8427 * common/rsp-low.h (hex2str): New overload with explicit count
8429 * common/rsp-low.c (hex2str): New overload with explicit count
8431 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8432 (_initialize_rsp_low_selftests): Add test_hex2str test.
8433 * unittests/tracepoint-selftests.c
8434 (test_parse_static_tracepoint_marker_definition): Adjust to
8437 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8439 * tracepoint.c (parse_static_tracepoint_marker_definition):
8440 Consider case where the definition is followed by more
8442 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8443 tracepoint-selftests.c.
8444 * unittests/tracepoint-selftests.c: New.
8446 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8448 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8451 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8453 * symtab.c (find_pc_sect_line): fixed indentation.
8455 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8457 * symtab.c (find_pc_sect_line): now uses binary search.
8459 2018-03-19 Tom Tromey <tom@tromey.com>
8461 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8464 2018-03-19 Pedro Alves <palves@redhat.com>
8465 Tom Tromey <tom@tromey.com>
8467 * unittests/observable-selftests.c: New file.
8468 * common/observable.h: New file.
8469 * observable.h: New file.
8470 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8471 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8472 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8473 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8474 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8475 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8476 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8477 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8478 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8479 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8480 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8481 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8482 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8483 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8484 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8485 tui/tui-interp.c, valops.c: Update all users.
8486 * tui/tui-hooks.c (tui_bp_created_observer)
8487 (tui_bp_deleted_observer, tui_bp_modified_observer)
8488 (tui_inferior_exit_observer, tui_before_prompt_observer)
8489 (tui_normal_stop_observer, tui_register_changed_observer):
8491 (tui_observers_token): New global.
8492 (attach_or_detach, tui_attach_detach_observers): New functions.
8493 (tui_install_hooks, tui_remove_hooks): Use
8494 tui_attach_detach_observers.
8495 * record-btrace.c (record_btrace_thread_observer): Remove.
8496 (record_btrace_thread_observer_token): New global.
8497 * observer.sh: Remove.
8498 * observer.c: Rename to observable.c.
8499 * observable.c (namespace gdb_observers): Define new objects.
8500 (observer_debug): Move into gdb_observers namespace.
8501 (struct observer, struct observer_list, xalloc_observer_list_node)
8502 (xfree_observer_list_node, generic_observer_attach)
8503 (generic_observer_detach, generic_observer_notify): Remove.
8504 (_initialize_observer): Update.
8505 Don't include observer.inc.
8506 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8507 (clean mostlyclean): Likewise.
8508 (observer.h, observer.inc): Remove targets.
8509 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8510 (COMMON_SFILES): Use observable.c, not observer.c.
8511 * .gitignore: Remove observer.h.
8513 2018-03-18 Tom Tromey <tom@tromey.com>
8515 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8517 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8519 2018-03-17 Tom Tromey <tom@tromey.com>
8521 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8523 2018-03-17 Tom Tromey <tom@tromey.com>
8525 * target.c (class scoped_target_fd): New.
8526 (target_fileio_close_cleanup): Remove.
8527 (target_fileio_read_alloc_1): Use scoped_target_fd.
8529 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8531 * silent-rules.mk: New.
8532 * Makefile.in: Include silent-rules.mk
8533 (srcdir, VPATH, top_srcdir): Move up.
8534 (COMPILE): Add ECHO_CXX.
8535 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8536 (init.c): Add ECHO_INIT_C.
8537 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8538 (version.c): Add ECHO_GEN.
8539 (printcmd.o): Add ECHO_CXX.
8540 (target-float.o): Add ECHO_CXX.
8541 (ada-exp.o): Add ECHO_CXX.
8542 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8543 (insight$(EXEEXT)): Add ECHO_CXXLD.
8544 * gnulib/configure.ac: Add AM_SILENT_RULES.
8545 * gnulib/aclocal.m4: Re-generate.
8546 * gnulib/configure: Re-generate.
8547 * gnulib/import/Makefile.in: Re-generate.
8549 2018-03-16 Tom Tromey <tom@tromey.com>
8551 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8552 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8553 * utils.c (do_free_section_addr_info)
8554 (make_cleanup_free_section_addr_info): Remove.
8555 * symfile.h (struct other_sections): Add constructor.
8556 (struct section_addr_info): Remove.
8557 (section_addr_info): New typedef.
8558 (struct sym_fns) <sym_offsets>: Change type of parameter.
8559 (build_section_addr_info_from_objfile)
8560 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8561 (default_symfile_offsets, symbol_file_add)
8562 (symbol_file_add_from_bfd)
8563 (build_section_addr_info_from_section_table): Update.
8564 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8565 * symfile.c (alloc_section_addr_info): Remove.
8566 (build_section_addr_info_from_section_table): Change return type.
8568 (build_section_addr_info_from_bfd)
8569 (build_section_addr_info_from_objfile): Likewise.
8570 (free_section_addr_info): Remove.
8571 (relative_addr_info_to_section_offsets): Change type of "addrs".
8572 (addrs_section_compar): Now a std::sort comparator.
8573 (addrs_section_sort): Change return type.
8574 (addr_info_make_relative): Change type of "addrs". Update.
8575 (default_symfile_offsets, syms_from_objfile_1)
8576 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8577 (symbol_file_add_separate): Update.
8578 (symbol_file_add): Change type of "addrs". Update.
8579 (add_symbol_file_command): Update. Remove cleanups.
8580 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8582 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8583 * solib.c (solib_read_symbols): Update.
8584 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8585 * machoread.c (macho_symfile_offsets): Update.
8586 * jit.c (jit_bfd_try_read_symtab): Update.
8588 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8590 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8591 unittests/utils-selftests.c.
8592 * unittests/utils-selftests.c: New file.
8594 2018-03-14 Tom Tromey <tom@tromey.com>
8597 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8600 2018-03-14 Tom Tromey <tom@tromey.com>
8603 * printcmd.c (printf_pointer): Allow "-" in format.
8605 2018-03-14 Tom Tromey <tom@tromey.com>
8607 * printcmd.c (_initialize_printcmd): Add usage to printf.
8609 2018-03-14 Yao Qi <qiyao@sourceware.org>
8611 * MAINTAINERS: Update my email address.
8613 2018-03-13 Tom Tromey <tom@tromey.com>
8615 * machoread.c (macho_check_dsym): Change filenamep to a
8617 (macho_symfile_read): Update.
8618 * symfile.c (load_command): Use std::string.
8620 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
8622 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8623 to error message string.
8624 (riscv_register_name): Use xsnprintf instead of sprintf.
8625 (riscv_insn::fetch_instruction): Use gdb_assert instead of
8627 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8629 (riscv_push_dummy_call): Likewise.
8631 2018-03-12 Tom Tromey <tom@tromey.com>
8633 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8634 Use gdb::byte_vector.
8635 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8637 2018-03-12 Yao Qi <yao.qi@linaro.org>
8639 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8640 parameter type to readable_regcache.
8641 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8644 2018-03-11 Tom Tromey <tom@tromey.com>
8646 * dwarf2read.c (struct nextfield): Add initializers.
8647 (struct nextfnfield): Remove.
8648 (struct fnfieldlist): Add initializers. Remove "length" and
8649 "head", use std::vector.
8650 (struct decl_field_list): Remove.
8651 (struct field_info): Add initializers.
8652 <fields, baseclasses>: Now std::vector.
8653 <nbaseclasses, nfnfields, typedef_field_list_count,
8654 nested_types_list_count>: Remove.
8655 (dwarf2_add_field, dwarf2_add_type_defn)
8656 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8657 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8658 (process_structure_scope): Update.
8660 2018-03-11 Tom Tromey <tom@tromey.com>
8662 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8663 for use by std::sort.
8664 (build_type_psymtabs_1): Use std::vector.
8666 2018-03-09 Eli Zaretskii <eliz@gnu.org>
8668 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8669 and LIBMPFR in the printed configuration.
8671 2018-03-08 Tom Tromey <tom@tromey.com>
8673 * source.c (get_filename_and_charpos): Use scoped_fd.
8674 * nto-procfs.c (procfs_open_1): Use scoped_fd.
8675 (procfs_pidlist): Likewise.
8676 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8677 (iterate_over_mappings): Likewise.
8679 2018-03-08 Tom Tromey <tom@tromey.com>
8681 * infcall.c (struct call_return_meta_info)
8682 <stack_temporaries_enabled>: Remove.
8683 (get_call_return_value, call_function_by_hand_dummy): Update.
8684 * thread.c (disable_thread_stack_temporaries): Remove.
8685 (enable_thread_stack_temporaries): Remove.
8686 (thread_stack_temporaries_enabled_p): Return bool.
8687 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8688 (get_last_thread_stack_temporary): Update.
8689 * eval.c (evaluate_subexp): Update.
8690 * gdbthread.h (class enable_thread_stack_temporaries): Now a
8691 class, not a function.
8692 (value_ptr, value_vec): Remove typedefs.
8693 (class thread_info) <stack_temporaries_enabled>: Now bool.
8694 <stack_temporaries>: Now a std::vector.
8695 (thread_stack_temporaries_enabled_p)
8696 (value_in_thread_stack_temporaries): Return bool.
8698 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
8700 * remote.c (putpkt_binary): Fix omitted bytes reporting.
8701 (getpkt_or_notif_sane_1): Likewise.
8703 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8705 * build-id.c (build_id_to_debug_bfd): Use std::string.
8707 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8709 * build-id.c (find_separate_debug_file_by_buildid): Return
8711 * build-id.h (find_separate_debug_file_by_buildid): Return
8713 * coffread.c (coff_symfile_read): Adjust to std::string.
8714 * elfread.c (elf_symfile_read): Adjust to std::string.
8715 * symfile.c (separate_debug_file_exists): Change parameter to
8717 (find_separate_debug_file): Return std::string.
8718 (find_separate_debug_file_by_debuglink): Return std::string.
8719 * symfile.h (find_separate_debug_file_by_debuglink): Return
8722 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8724 * common/xml-utils.c (xml_escape_text): Move code to...
8725 (xml_escape_text_append): ... this new function.
8726 * common/xml-utils.h (xml_escape_text_append): New declaration.
8727 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8729 (_initialize_xml_utils): register test_xml_escape_text_append as
8732 2018-03-07 Alan Hayward <alan.hayward@arm.com>
8734 * defs.h: Remove MAX_REGISTER_SIZE.
8735 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8737 * python/py-unwind.c (pyuw_sniffer): Likewise.
8739 2018-03-07 Tom Tromey <tom@tromey.com>
8741 * linux-tdep.c (linux_info_proc): Update.
8742 * target.h (struct target_ops) <to_fileio_readlink>: Return
8744 (target_fileio_readlink): Return optional<string>.
8745 * remote.c (remote_hostio_readlink): Return optional<string>.
8746 * inf-child.c (inf_child_fileio_readlink): Return
8748 * target.c (target_fileio_readlink): Return optional<string>.
8750 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
8752 * regcache.c (cooked_read_test): Add riscv to the list of
8753 architectures that have a save_reggroup.
8755 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
8757 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8758 value is not a dynamic class object.
8760 2018-03-06 Tom Tromey <tom@tromey.com>
8762 * rust-exp.y: Formatting fixes.
8764 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8766 * riscv-tdep.c (riscv_register_name): Remove target description
8768 (riscv_gdbarch_init): Remove target description check.
8770 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8772 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8774 * riscv-tdep.h: Likewise.
8776 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8778 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8779 (riscv_pseudo_register_write): Delete.
8780 (riscv_gdbarch_init): Remove all use of pseudo registers.
8782 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8784 * record-btrace.c (btrace_print_lines): Replace cleanup
8785 parameter with RAII equivalents.
8786 (btrace_insn_history): Replace cleanup with RAII equivalents.
8787 * ui-out.h (make_cleanup_ui_out_list_begin_end,
8788 make_cleanup_ui_out_tuple_begin_end): Remove.
8789 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8790 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8791 make_cleanup_ui_out_list_begin_end): Remove.
8793 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8795 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8796 parameter types to std::vector. Use bool.
8797 (record_btrace_wait): Replace VEC(tp_t) with
8798 std::vector<thread_info *>.
8799 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8801 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8803 * record-btrace.c (record_btrace_disable_callback): Remove.
8804 (struct scoped_btrace_disable): New.
8805 (record_btrace_open): Use scoped_btrace_disable.
8807 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8809 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8810 reading values from registers.
8812 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8814 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8817 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8819 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8820 change parameter type. Use GDB's print functions, and use
8821 core_addr_to_string where appropriate.
8822 (riscv_push_dummy_call): Use core_addr_to_string where
8823 appropriate, update call to riscv_print_arg_location, and reindent
8825 (riscv_return_value): Update call to riscv_print_arg_location.
8827 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8828 Tim Newsome <tim@sifive.com>
8829 Albert Ou <a0u@eecs.berkeley.edu>
8830 Darius Rad <darius@bluespec.com>
8832 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8833 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8834 (ALLDEPFILES): Add riscv-tdep.c
8835 * configure.tgt: Add riscv support.
8836 * riscv-tdep.c: New file.
8837 * riscv-tdep.h: New file.
8838 * NEWS: Mention new target.
8839 * MAINTAINERS: Add entry for riscv.
8841 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8843 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8844 fields within aggregates.
8846 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
8848 * record-btrace.c (btrace_print_lines): Change type of flags to
8849 gdb_disassembly_flags.
8851 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8853 * fbsd-nat.c: Include "inf-ptrace.h".
8854 (USE_SIGTRAP_SIGINFO): Conditionally define.
8855 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8856 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8857 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8859 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8861 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8863 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8864 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8865 "supports_stopped_by_hw_breakpoint" target methods.
8867 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8869 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8870 * fbsd-nat.c (debug_fbsd_nat): New variable.
8871 (show_fbsd_nat_debug): New function.
8872 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8873 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8875 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8877 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8878 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8880 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8881 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8884 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8886 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8887 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8889 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8891 * charset.c (struct charset_vector): New.
8892 (charsets): Change type to charset_vector.
8893 (find_charset_names): Adjust.
8895 (_initialize_charset): Adjust.
8897 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8899 * progspace.h (struct program_space) <deleted_solibs>: Change
8900 type to std::vector<std::string>.
8901 * progspace.c (clear_program_space_solib_cache): Adjust.
8902 * breakpoint.c (print_solib_event): Adjust.
8903 (check_status_catch_solib): Adjust.
8904 * solib.c (update_solib_list): Adjust.
8905 * ui-out.h (class ui_out) <field_string>: New overload.
8906 * ui-out.c (ui_out::field_string): New overload.
8908 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8910 * progspace.h (struct program_space): Add constructor and
8911 destructor, initialize fields.
8912 (add_program_space): Remove.
8913 * progspace.c (add_program_space): Rename to...
8914 (program_space::program_space): ... this.
8915 (release_program_space): Rename to...
8916 (program_space::~program_space): ... this.
8917 (delete_program_space): Use delete to delete program_space.
8918 (initialize_progspace): Use new to allocate program_space.
8919 * inferior.c (add_inferior_with_spaces): Likewise.
8920 (clone_inferior_command): Likewise.
8921 * infrun.c (follow_fork_inferior): Likewise.
8922 (handle_vfork_child_exec_or_exit): Likewise.
8924 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8926 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8927 (delim_string_to_char_ptr_vec): Return std::vector of
8928 gdb::unique_xmalloc_ptr.
8929 (dirnames_to_char_ptr_vec_append): Take std::vector of
8930 gdb::unique_xmalloc_ptr.
8931 (dirnames_to_char_ptr_vec): Return std::vector of
8932 gdb::unique_xmalloc_ptr.
8933 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8934 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8935 (delim_string_to_char_ptr_vec): Return an std::vector of
8936 gdb::unique_xmalloc_ptr, adjust the code.
8937 (dirnames_to_char_ptr_vec_append): Take an std::vector of
8938 gdb::unique_xmalloc_ptr, adjust the code.
8939 (dirnames_to_char_ptr_vec): Return an std::vector of
8940 gdb::unique_xmalloc_ptr, adjust the code.
8941 * auto-load.c (auto_load_safe_path_vec): Change type to
8942 std::vector of gdb::unique_xmalloc_ptr.
8943 (auto_load_expand_dir_vars): Return an std::vector of
8944 gdb::unique_xmalloc_ptr, adjust the code.
8945 (auto_load_safe_path_vec_update): Adjust.
8946 (filename_is_in_auto_load_safe_path_vec): Adjust.
8947 (auto_load_objfile_script_1): Adjust.
8948 * build-id.c (build_id_to_debug_bfd): Adjust.
8949 * linux-thread-db.c (thread_db_load_search): Adjust.
8950 * source.c (add_path): Adjust.
8952 * symfile.c (find_separate_debug_file): Adjust.
8953 * utils.c (do_free_char_ptr_vec): Remove.
8954 (make_cleanup_free_char_ptr_vec): Remove.
8956 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
8959 * common/pathstuff.c: Conditionally include "<windows.h>".
8961 2018-03-01 Georg Sauthoff <mail@georg.so>
8964 * gcore.in: Quote variables and switch interpreter to bash.
8966 2018-03-01 Tom Tromey <tom@tromey.com>
8968 * dwarf2read.c (alloc_discriminant_info): Fix default_index
8969 assertion. Add assertion for discriminant_index.
8970 (quirk_rust_enum): Use correct base type name in univariant case.
8972 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
8974 * record.c (get_call_history_modifiers): Return a
8976 (cmd_record_call_history): Adjust.
8977 * record-btrace.c (record_btrace_call_history): Adjust.
8978 (record_btrace_call_history_range): Adjust.
8979 (record_btrace_call_history_from): Adjust.
8980 * target-debug.h (target_debug_print_record_print_flags): New.
8981 * target-delegates.c: Re-generate.
8982 * target.c (target_call_history): Change flags type.
8983 (target_call_history_from): Likewise.
8984 (target_call_history_range): Likewise.
8985 * target.h (struct target_ops) <target_call_history>: Likewise.
8986 (target_call_history_from): Likewise.
8987 (target_call_history_range): Likewise.
8989 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8990 Simon Marchi <simon.marchi@polymtl.ca>
8992 * common/common-utils.c: Include "sys/stat.h".
8993 (is_regular_file): Move here from "source.c"; change return
8995 * common/common-utils.h (is_regular_file): New prototype.
8996 * common/pathstuff.c (contains_dir_separator): New function.
8997 * common/pathstuff.h (contains_dir_separator): New prototype.
8998 * source.c: Don't include "sys/stat.h".
8999 (is_regular_file): Move to "common/common-utils.c".
9001 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9003 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9004 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9005 * auto-load.c: Include "common/pathstuff.h".
9006 * common/common-def.h (current_directory): Move here.
9007 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9009 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9011 * common/pathstuff.c: New file.
9012 * common/pathstuff.h: New file.
9013 * compile/compile.c: Include "common/pathstuff.h".
9014 * defs.h (current_directory): Move to "common/common-defs.h".
9015 * dwarf2read.c: Include "common/pathstuff.h".
9017 * guile/scm-safe-call.c: Likewise.
9018 * linux-thread-db.c: Likewise.
9020 * nto-tdep.c: Likewise.
9021 * objfiles.c: Likewise.
9022 * source.c: Likewise.
9023 * symtab.c: Likewise.
9024 * utils.c: Include "common/pathstuff.h".
9025 (gdb_realpath): Move to "common/pathstuff.c".
9026 (gdb_realpath_keepfile): Likewise.
9027 (gdb_abspath): Likewise.
9028 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9029 (gdb_realpath_keepfile): Likewise.
9030 (gdb_abspath): Likewise.
9032 2018-02-28 John Baldwin <jhb@FreeBSD.org>
9034 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9035 wildcard process pid for super_resume for kernels with a
9038 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
9040 * compile/compile.c (get_args): Add additional comments
9041 explaining function.
9043 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
9044 Tom Tromey <tom@tromey.com>
9046 * target.h (memory_write_request_s): Remove typedef. Don't define
9048 (target_write_memory_blocks): Change argument to std::vector.
9049 (struct memory_write_request): Add constructor.
9050 * target-memory.c (compare_block_starting_address): Return bool.
9051 Change argument types.
9052 (claim_memory): Change arguments to use std::vector.
9053 (split_regular_and_flash_blocks, blocks_to_erase)
9054 (compute_garbled_blocks): Likewise.
9055 (cleanup_request_data, cleanup_write_requests_vector): Remove.
9056 (target_write_memory_blocks): Change argument to std::vector.
9057 * symfile.c (struct load_section_data): Add constructor and
9058 destructor. Use std::vector for "requests".
9059 (struct load_progress_data): Add initializers.
9060 (load_section_callback): Update. Use "new".
9061 (clear_memory_write_data): Remove.
9062 (generic_load): Update.
9064 2018-02-27 Alan Hayward <alan.hayward@arm.com>
9066 * arch/aarch64.h: Use common/tdesc.h.
9068 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9070 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9071 architecture with a 64-bit ABI.
9073 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9075 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9076 ahead of target description loading.
9078 2018-02-26 Tom Tromey <tom@tromey.com>
9080 * stack.c (backtrace_command_1): Update.
9081 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9083 * python/py-framefilter.c (py_print_frame)
9084 (gdbpy_apply_frame_filter): Change type of "flags".
9085 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9087 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9088 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9089 * extension.h (enum frame_filter_flag): Rename from
9091 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9092 (apply_ext_lang_frame_filter): Change type of "flags".
9093 * extension.c (apply_ext_lang_frame_filter): Change type of
9095 * extension-priv.h (struct extension_language_ops)
9096 <apply_frame_filter>: Change type of "flags".
9098 2018-02-26 Tom Tromey <tom@tromey.com>
9101 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
9102 off-by-one in py_end computation.
9103 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9105 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9108 2018-02-26 Tom Tromey <tom@tromey.com>
9110 * dwarf2read.c (struct variant_field): New.
9111 (struct nextfield) <variant>: New field.
9112 (dwarf2_add_field): Handle DW_TAG_variant_part.
9113 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9114 discriminated union.
9115 (read_structure_type): Handle DW_TAG_variant_part.
9116 (handle_struct_member_die): New function, extracted from
9117 process_structure_scope. Handle DW_TAG_variant.
9118 (process_structure_scope): Handle discriminated unions. Call
9119 handle_struct_member_die.
9121 2018-02-26 Tom Tromey <tom@tromey.com>
9123 * rust-lang.h (rust_last_path_segment): Declare.
9124 * rust-lang.c (rust_last_path_segment): Now public. Change
9126 (struct disr_info): Remove.
9127 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9128 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9129 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9130 (rust_enum_p, rust_enum_variant): New function.
9131 (rust_underscore_fields): Remove "offset" parameter.
9132 (rust_print_enum): New function.
9133 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9134 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9135 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
9137 (rust_internal_print_type): New function, from rust_print_type.
9139 (rust_print_type): Call rust_internal_print_type.
9140 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9141 Update enum handling.
9142 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9143 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9144 (rust_union_quirks): New functions.
9145 (process_full_comp_unit, process_full_type_unit): Call
9147 (process_structure_scope): Update rust_unions if necessary.
9149 2018-02-26 Tom Tromey <tom@tromey.com>
9151 * value.h (value_union_variant): Declare.
9152 * valops.c (value_union_variant): New function.
9153 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9154 (struct discriminant_info): New.
9155 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9157 (struct main_type) <flag_discriminated_union>: New field.
9159 2018-02-26 Tom Tromey <tom@tromey.com>
9161 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9162 unittests/unpack-selftests.c.
9163 * unittests/unpack-selftests.c: New file.
9164 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9166 2018-02-26 Yao Qi <yao.qi@linaro.org>
9168 * dwarf2read.c (struct partial_die_info) <read>: New method.
9169 (read_partial_die): Remove the declaration.
9170 (load_partial_dies): Update.
9171 (partial_die_info::partial_die_info):
9172 (read_partial_die): Change it to partial_die_info::read.
9174 2018-02-26 Yao Qi <yao.qi@linaro.org>
9176 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9177 (fixup_partial_die): Remove declaration.
9178 (scan_partial_symbols): Update.
9179 (partial_die_parent_scope): Likewise.
9180 (partial_die_full_name): Likewise.
9181 (fixup_partial_die): Change it to partial_die_info::fixup.
9183 2018-02-26 Yao Qi <yao.qi@linaro.org>
9185 * dwarf2read.c (read_partial_die): Update the declaration.
9186 (load_partial_dies): Caller update.
9187 (read_partial_die): Remove one argument abbrev_len.
9189 2018-02-26 Yao Qi <yao.qi@linaro.org>
9191 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9192 assignment operator.
9193 (load_partial_dies): Use ctor and copy ctor.
9194 (read_partial_die): Update.
9195 (dwarf2_cu::find_partial_die): Use ctor.
9197 2018-02-26 Yao Qi <yao.qi@linaro.org>
9199 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9200 (find_partial_die_in_comp_unit): Change it to
9201 dwarf2_cu::find_partial_die.
9202 (find_partial_die): Update.
9204 2018-02-26 Yao Qi <yao.qi@linaro.org>
9206 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9209 2018-02-26 Yao Qi <yao.qi@linaro.org>
9211 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9213 2018-02-26 Alan Hayward <alan.hayward@arm.com>
9215 * arch/amd64.h: Use common/tdesc.h.
9216 * arch/i386.c: Likewise.
9217 * arch/i386.h: Likewise.
9218 * arch/tic6x.c: Likewise.
9219 * arch/tdesc.h: Move file from here...
9220 * common/tdesc.h: ...to here.
9221 * features/aarch64-core.c: Regenerate.
9222 * features/aarch64-fpu.c: Regenerate.
9223 * features/i386/32bit-avx.c: Regenerate.
9224 * features/i386/32bit-avx512.c: Regenerate.
9225 * features/i386/32bit-core.c: Regenerate.
9226 * features/i386/32bit-linux.c: Regenerate.
9227 * features/i386/32bit-mpx.c: Regenerate.
9228 * features/i386/32bit-pkeys.c: Regenerate.
9229 * features/i386/32bit-sse.c: Regenerate.
9230 * features/i386/64bit-avx.c: Regenerate.
9231 * features/i386/64bit-avx512.c: Regenerate.
9232 * features/i386/64bit-core.c: Regenerate.
9233 * features/i386/64bit-linux.c: Regenerate.
9234 * features/i386/64bit-mpx.c: Regenerate.
9235 * features/i386/64bit-pkeys.c: Regenerate.
9236 * features/i386/64bit-segments.c: Regenerate.
9237 * features/i386/64bit-sse.c: Regenerate.
9238 * features/i386/x32-core.c: Regenerate.
9239 * features/tic6x-c6xp.c: Regenerate.
9240 * features/tic6x-core.c: Regenerate.
9241 * features/tic6x-gp.c: Regenerate.
9242 * target-descriptions.c: Use common/tdesc.h.
9243 * target-descriptions.h: Likewise.
9245 2018-02-24 Tom Tromey <tom@tromey.com>
9247 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9248 (try_thread_db_load_from_dir, thread_db_load_search): Use
9250 (info_auto_load_libthread_db_compare): Return bool. Change
9252 (info_auto_load_libthread_db): Use std::vector, std::string.
9255 2018-02-24 Tom Tromey <tom@tromey.com>
9257 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9259 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9261 * gdbarch.c: Rebuild.
9262 * gdbarch.h: Rebuild.
9263 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9264 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9265 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9268 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9270 * gdbtypes.h (sect_offset): Change type to uint64_t.
9271 (sect_offset_str): New function.
9272 * dwarf2read.c (create_addrmap_from_aranges): Use
9274 (error_check_comp_unit_head): Likewise.
9275 (create_debug_type_hash_table): Likewise.
9276 (read_cutu_die_from_dwo): Likewise.
9277 (init_cutu_and_read_dies): Likewise.
9278 (init_cutu_and_read_dies_no_follow): Likewise.
9279 (process_psymtab_comp_unit_reader): Likewise.
9280 (partial_die_parent_scope): Likewise.
9281 (peek_die_abbrev): Likewise.
9282 (process_queue): Likewise.
9283 (dwarf2_physname): Likewise.
9284 (read_namespace_alias): Likewise.
9285 (read_import_statement): Likewise.
9286 (create_dwo_cu_reader): Likewise.
9287 (create_cus_hash_table): Likewise.
9288 (lookup_dwo_cutu): Likewise.
9289 (inherit_abstract_dies): Likewise.
9290 (read_func_scope): Likewise.
9291 (read_call_site_scope): Likewise.
9292 (dwarf2_add_member_fn): Likewise.
9293 (read_common_block): Likewise.
9294 (read_module_type): Likewise.
9295 (read_typedef): Likewise.
9296 (read_subrange_type): Likewise.
9297 (load_partial_dies): Likewise.
9298 (read_partial_die): Likewise.
9299 (find_partial_die): Likewise.
9300 (read_str_index): Likewise.
9301 (dwarf2_string_attr): Likewise.
9302 (build_error_marker_type): Likewise.
9303 (lookup_die_type): Likewise.
9304 (dump_die_shallow): Likewise.
9305 (follow_die_ref): Likewise.
9306 (dwarf2_fetch_die_loc_sect_off): Likewise.
9307 (dwarf2_fetch_constant_bytes): Likewise.
9308 (follow_die_sig): Likewise.
9309 (get_signatured_type): Likewise.
9310 (get_DW_AT_signature_type): Likewise.
9311 (dwarf2_find_containing_comp_unit): Likewise.
9312 (set_die_type): Likewise.
9314 2018-02-21 John Baldwin <jhb@FreeBSD.org>
9316 * arch/aarch64.c: Include "common-defs.h".
9317 * arch/amd64.c: Likewise.
9318 * arch/i386.c: Likewise.
9320 2018-02-21 Tom Tromey <tom@tromey.com>
9322 * value.h: (extract_field_op): Update.
9323 * eval.c (extract_field_op): Return a const char *.
9324 * expression.h (parse_expression_for_completion): Update.
9325 * completer.c (complete_expression): Update.
9326 (add_struct_fields): Make fieldname const.
9327 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9328 (mark_completion_tag, parse_exp_in_context_1): Update.
9329 (parse_expression_for_completion): Change "name" to
9330 unique_xmalloc_ptr*.
9332 2018-02-21 Tom Tromey <tom@tromey.com>
9334 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9336 2018-02-21 Yao Qi <yao.qi@linaro.org>
9338 * avr-tdep.c (avr_read_pc): Change parameter type to
9340 * gdbarch.sh (read_pc): Likewise.
9341 * gdbarch.c: Re-generated.
9342 * gdbarch.h: Re-generated.
9343 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9345 * ia64-tdep.c (ia64_read_pc): Likewise.
9346 * mips-tdep.c (mips_read_pc): Likewise.
9347 * spu-tdep.c (spu_read_pc): Likewise.
9349 2018-02-21 Yao Qi <yao.qi@linaro.org>
9351 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9352 * regcache-dump.c: New file.
9353 * regcache.c: Move register_dump to regcache-dump.c.
9354 (maintenance_print_registers): Likewise.
9355 (maintenance_print_raw_registers): Likewise.
9356 (maintenance_print_cooked_registers): Likewise.
9357 (maintenance_print_register_groups): Likewise.
9358 (maintenance_print_remote_registers): Likewise.
9359 (_initialize_regcache): Likewise.
9360 * regcache.h (register_dump): Moved from regcache.c.
9362 2018-02-21 Yao Qi <yao.qi@linaro.org>
9364 * regcache.c (regcache::regcache): Update.
9365 (regcache::invalidate): Move it to detached_regcache::invalidate.
9366 (get_thread_arch_aspace_regcache): Update.
9367 (regcache::raw_update): Update.
9368 (regcache::cooked_read): Remove some code.
9369 (regcache::cooked_read_value): Likewise.
9370 (regcache::raw_write): Remove assert on m_readonly_p.
9371 (regcache::raw_supply_integer): Move it to
9372 detached_regcache::raw_supply_integer.
9373 (regcache::raw_supply_zeroed): Likewise.
9374 * regcache.h (detached_regcache) <raw_supply_integer>: New
9376 <raw_supply_zeroed, invalidate>: Likewise.
9377 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9378 <invalidate>: Likewise.
9379 <m_readonly_p>: Removed.
9381 2018-02-21 Yao Qi <yao.qi@linaro.org>
9383 * infcmd.c (get_return_value): Let stop_regs point to
9384 get_current_regcache.
9385 * regcache.c (regcache::regcache): Remove.
9386 (register_dump_reg_buffer): New class.
9387 (regcache_print): Adjust.
9388 * regcache.h (regcache): Remove constructors.
9390 2018-02-21 Yao Qi <yao.qi@linaro.org>
9392 * regcache.c (class register_dump): New class.
9393 (register_dump_regcache, register_dump_none): New class.
9394 (register_dump_remote, register_dump_groups): New class.
9395 (regcache_print): Update.
9396 * regcache.h (regcache_dump_what): Move it to regcache.c.
9397 (regcache) <dump>: Remove.
9399 2018-02-21 Yao Qi <yao.qi@linaro.org>
9401 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9403 (jit_unwind_reg_set_impl): Call raw_supply.
9404 (jit_frame_sniffer): Use reg_buffer_rw.
9405 * record-full.c (record_full_core_regbuf): Change its type.
9406 (record_full_core_open_1): Use reg_buffer_rw.
9407 (record_full_close): Likewise.
9408 (record_full_core_fetch_registers): Use regcache->raw_supply.
9409 (record_full_core_store_registers): Likewise.
9410 * regcache.c (regcache::get_register_status): Move it to
9412 (regcache_raw_set_cached_value): Remove.
9413 (regcache::raw_set_cached_value): Remove.
9414 (regcache::raw_write): Call raw_supply.
9415 (regcache::raw_supply): Move it to reg_buffer_rw.
9416 * regcache.h (regcache_raw_set_cached_value): Remove.
9417 (reg_buffer_rw): New class.
9419 2018-02-21 Yao Qi <yao.qi@linaro.org>
9421 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9422 readonly_detached_regcache.
9423 (dummy_frame_prev_register): Use regcache->cooked_read.
9424 * frame.c (frame_save_as_regcache): Change return type.
9425 (frame_pop): Update.
9426 * frame.h (frame_save_as_regcache): Update declaration.
9427 * inferior.h (get_infcall_suspend_state_regcache): Update
9429 * infrun.c (infcall_suspend_state) <registers>: use
9430 readonly_detached_regcache.
9431 (save_infcall_suspend_state): Don't use regcache_dup.
9432 (get_infcall_suspend_state_regcache): Change return type.
9433 * linux-fork.c (struct fork_info) <savedregs>: Change to
9434 readonly_detached_regcache.
9436 (fork_save_infrun_state): Don't use regcache_dup.
9437 (info_checkpoints_command): Adjust.
9438 * mi/mi-main.c (register_changed_p): Update declaration.
9439 (mi_cmd_data_list_changed_registers): Use
9440 readonly_detached_regcache.
9441 (register_changed_p): Change parameter type to
9442 readonly_detached_regcache.
9443 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9444 readonly_detached_regcache.
9445 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9446 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9448 (regcache::save): Move it to reg_buffer.
9449 (regcache::restore): Change parameter type.
9450 (regcache_dup): Remove.
9451 * regcache.h (reg_buffer) <save>: New method.
9452 (readonly_detached_regcache): New class.
9453 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9454 readonly_detached_regcache.
9455 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9457 2018-02-21 Yao Qi <yao.qi@linaro.org>
9459 * frame.c (frame_save_as_regcache): Use regcache method save.
9460 (frame_pop): Use regcache method restore.
9461 * infrun.c (restore_infcall_suspend_state): Likewise.
9462 * linux-fork.c (fork_load_infrun_state): Likewise.
9463 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9465 * regcache.c (regcache_save): Remove.
9466 (regcache::restore): More asserts.
9467 (regcache_cpy): Remove.
9468 * regcache.h (regcache_save): Remove the declaration.
9469 (regcache::restore): Move from private to public.
9470 Remove the friend declaration of regcache_cpy.
9471 (regcache_cpy): Remove declaration.
9473 2018-02-21 Yao Qi <yao.qi@linaro.org>
9475 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9476 parameter type to 'readable_regcache *'.
9477 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9478 * arm-tdep.c (arm_neon_quad_read): Likewise.
9479 (arm_pseudo_read): Likewise.
9480 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9481 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9482 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9483 * gdbarch.c: Re-generated.
9484 * gdbarch.h: Re-generated.
9485 * gdbarch.sh (pseudo_register_read): Change parameter type to
9486 'readable_regcache *'.
9487 (pseudo_register_read_value): Likewise.
9488 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9489 (h8300_pseudo_register_read): Likewise.
9490 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9491 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9492 (i386_pseudo_register_read_into_value): Likewise.
9493 (i386_pseudo_register_read_value): Likewise.
9494 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9496 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9497 * m32c-tdep.c (m32c_raw_read): Likewise.
9498 (m32c_read_flg): Likewise.
9499 (m32c_banked_register): Likewise.
9500 (m32c_banked_read): Likewise.
9501 (m32c_sb_read): Likewise.
9502 (m32c_part_read): Likewise.
9503 (m32c_cat_read): Likewise.
9504 (m32c_r3r2r1r0_read): Likewise.
9505 (m32c_pseudo_register_read): Likewise.
9506 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9507 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9508 (mep_pseudo_cr64_read): Likewise.
9509 (mep_pseudo_register_read): Likewise.
9510 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9511 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9512 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9513 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9514 (regcache::cooked_read): Likewise.
9515 (regcache::cooked_read_value): Likewise.
9516 (regcache_cooked_read_signed):
9517 (regcache::cooked_read): Likewise.
9518 * regcache.h (readable_regcache): New class.
9519 (regcache): Inherit readable_regcache. Move some methods to
9521 * rl78-tdep.c (rl78_pseudo_register_read): Change
9522 parameter type to 'readable_regcache *'.
9523 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9524 (e500_pseudo_register_read): Change parameter type to
9525 'readable_regcache *'.
9526 (dfp_pseudo_register_read): Likewise.
9527 (vsx_pseudo_register_read): Likewise.
9528 (efpr_pseudo_register_read): Likewise.
9529 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9530 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9531 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9532 (sh64_pseudo_register_read): Likewise.
9533 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9534 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9535 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9536 (spu_pseudo_register_read): Likewise.
9537 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9538 (xtensa_pseudo_register_read): Likewise.
9540 2018-02-21 Yao Qi <yao.qi@linaro.org>
9542 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9543 (regcache::arch): Move it to reg_buffer::arch.
9544 (regcache::register_buffer): Likewise.
9545 (regcache::assert_regnum): Likewise.
9546 (regcache::num_raw_registers): Likewise.
9547 * regcache.h (reg_buffer): New class.
9548 (regcache): Inherit reg_buffer.
9550 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9552 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9553 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9555 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9557 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9559 2018-02-19 Alan Hayward <alan.hayward@arm.com>
9561 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9562 (SFILES): Remove common/*.c files.
9563 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9564 * common/common.host: Add common reference.
9565 * configure.ac: Likewise.
9566 * configure: Regenerate.
9568 2018-02-16 Yao Qi <yao.qi@linaro.org>
9570 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9571 (block_initialize_namespace): Use new.
9572 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9573 (dwarf2_free_objfile): Use delete.
9574 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9575 (copy_type_recursive): Use new.
9576 * gdb_obstack.h (allocate_on_obstack): New.
9578 2018-02-15 Yao Qi <yao.qi@linaro.org>
9581 * inferior.c (exit_inferior_1): Reset inf->control.
9583 2018-02-15 Joel Brobecker <brobecker@adacore.com>
9585 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9588 2018-02-14 Pedro Alves <palves@redhat.com>
9590 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9591 frame_cleanup_after_sniffer on exception.
9593 2018-02-14 Tom Tromey <tom@tromey.com>
9595 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9597 (solib_bfd_open): Make pathname const.
9598 * solib.c (solib_bfd_open): Make pathname const.
9599 * solib-spu.c (spu_bfd_fopen): Make name const.
9600 (spu_bfd_open): Make pathname const.
9601 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9602 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9604 2018-02-14 Tom Tromey <tom@tromey.com>
9606 * symfile.c (symfile_bfd_open): Update.
9607 * source.h (openp, source_full_path_of, find_and_open_source):
9608 Change argument type to unique_xmalloc_ptr.
9609 * source.c (openp): Take a unique_xmalloc_ptr.
9610 (source_full_path_of, find_and_open_source): Likewise.
9611 (open_source_file, symtab_to_fullname): Update.
9612 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9614 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9615 (exec_file_find): Update.
9616 * psymtab.c (psymtab_to_fullname): Update.
9617 * nto-tdep.h (nto_find_and_open_solib): Update.
9618 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9620 * exec.c (exec_file_attach): Update.
9621 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9622 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9624 2018-02-14 Tom Tromey <tom@tromey.com>
9626 * solib.c: Include source.h.
9627 * nto-tdep.c: Include source.h.
9628 * mi/mi-cmd-env.c: Include source.h.
9629 * infcmd.c: Include source.h.
9630 * exec.c: Include source.h.
9631 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9632 (add_path, directory_switch, source_path, init_source_path): Move
9634 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9635 (add_path, directory_switch, source_path, init_source_path):
9638 2018-02-14 Tom Tromey <tom@tromey.com>
9640 * solist.h (exec_file_find, solib_find): Return
9642 (solib_bfd_fopen): Take a const char *.
9643 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9644 (exec_file_find, solib_find): Likewise.
9645 (solib_bfd_fopen): Do not take ownership of "pathname".
9646 (solib_bfd_open): Use unique_xmalloc_ptr.
9647 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9648 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9649 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9650 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9652 2018-02-14 Joel Brobecker <brobecker@adacore.com>
9654 * ada-lang.c (name_match_type_from_name): Remove reference to
9655 ada_name_for_lookup in function's documentation.
9656 * ada-lang.h (ada_name_for_lookup): Delete declaration.
9658 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9660 * defs.h (enum openp_flags): New enum.
9661 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9662 Move to enum openp_flags.
9663 (openp_flags): New enum flags.
9664 (openp): Change parameter type to openp_flags.
9665 * source.c (openp): Change parameter type to openp_flags.
9666 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9667 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9669 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9671 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9674 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
9676 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9678 (class dwarf2_queue_guard): ...the destructor of this new class.
9679 (dw2_do_instantiate_symtab): Create instance of the new class
9680 dwarf2_queue_guard, remove cleanup.
9682 2018-02-09 Tom Tromey <tom@tromey.com>
9684 * source.c (find_source_lines): Don't reference past the end of
9687 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9689 * remote.c (remote_btrace_maybe_reopen): Change error message.
9690 * btrace.c (btrace_enable): Likewise.
9691 (parse_xml_btrace): Likewise.
9692 (parse_xml_btrace_conf): Likewise.
9694 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9696 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9697 (linux_enable_pt, linux_enable_bts): Call
9698 diagnose_perf_event_open_fail.
9700 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9702 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9703 Remove parameter and change return type. Update callers. Move it.
9704 (linux_enable_bts, linux_enable_pt): Improve error message.
9705 (linux_enable_pt): Remove zero buffer size check.
9706 (linux_enable_btrace): Improve error messages. Remove NULL return
9709 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9711 * btrace.c (btrace_enable): Remove target_supports_btrace call.
9712 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9713 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9714 (linux_supports_pt, linux_supports_btrace): Remove.
9715 (linux_enable_bts): Call cpu_supports_bts.
9716 * nat/linux-btrace.h (linux_supports_btrace): Remove.
9717 * remote.c (remote_supports_btrace): Remove.
9718 (init_remote_ops): Remove remote_supports_btrace.
9719 * target-delegates.c: Regenerated.
9720 * target.c (target_supports_btrace): Remove.
9721 * target.h (target_ops) <to_supports_btrace>: Remove
9722 (target_supports_btrace): Remove.
9723 * x86-linux-nat.c (x86_linux_create_target): Remove
9724 linux_supports_btrace.
9726 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9728 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9730 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9731 exception and use message in own exception.
9733 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9735 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9736 (perf_event_pt_event_type): Use gdb_file_up.
9737 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9738 scoped_fd, and scoped_mmap.
9740 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9742 * common/scoped_mmap.h: New.
9743 * unittests/scoped_mmap-selftest.c: New.
9744 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9745 unittests/scoped_mmap-selftest.c.
9747 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9749 * common/scoped_fd.h: New.
9750 * unittests/scoped_fd-selftest.c: New.
9751 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9752 unittests/scoped_fd-selftest.c.
9754 2018-02-09 Tom Tromey <tom@tromey.com>
9756 * auto-load.c (auto_load_section_scripts): Use
9757 gdb::unique_xmalloc_ptr.
9759 2018-02-09 Tom Tromey <tom@tromey.com>
9761 * auto-load.c (execute_script_contents): Use std::string.
9763 2018-02-09 Joel Brobecker <brobecker@adacore.com>
9765 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9766 Python function, rather than a new command.
9768 2018-02-08 Tom Tromey <tom@tromey.com>
9770 * solib.c (solib_find_1): Use std::string.
9771 (solib_bfd_fopen): Use unique_xmalloc_ptr.
9773 2018-02-08 Tom Tromey <tom@tromey.com>
9775 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9777 2018-02-08 Tom Tromey <tom@tromey.com>
9779 * source.c (find_source_lines): Use gdb::def_vector.
9781 2018-02-08 Tom Tromey <tom@tromey.com>
9783 * macrocmd.c (struct temporary_macro_definition): New.
9784 (macro_define_command): Use temporary_macro_definition. Remove
9786 (free_macro_definition_ptr): Remove.
9788 2018-02-08 Tom Tromey <tom@tromey.com>
9790 * macroexp.c (maybe_expand): Use std::string.
9792 2018-02-08 Tom Tromey <tom@tromey.com>
9794 * macroexp.c (struct macro_buffer): Add initializers for some
9796 (init_buffer, init_shared_buffer, free_buffer)
9797 (free_buffer_return_text): Remove.
9798 (macro_buffer): New constructors.
9799 (~macro_buffer): New destructor.
9800 (macro_buffer::set_shared): New method.
9801 (macro_buffer::resize_buffer, macro_buffer::appendc)
9802 (macro_buffer::appendmem): Now methods, not free functions.
9803 (set_token, append_tokens_without_splicing, stringify)
9804 (macro_stringify): Update.
9805 (gather_arguments): Change return type. Remove argc_p argument,
9806 add args_ptr argument. Use std::vector.
9807 (substitute_args): Remove argc argument. Accept std::vector.
9808 (expand): Update. Use std::vector.
9809 (scan, macro_expand, macro_expand_next): Update.
9811 2018-02-08 Tom Tromey <tom@tromey.com>
9813 * symtab.c (default_collect_symbol_completion_matches_break_on):
9814 Use unique_xmalloc_ptr.
9815 * macroscope.h: (sal_macro_scope, user_macro_scope)
9816 (default_macro_scope): Return unique_xmalloc_ptr.
9817 * macroscope.c (sal_macro_scope, user_macro_scope)
9818 (default_macro_scope): Return unique_xmalloc_ptr.
9819 * macroexp.h (macro_expand, macro_expand_once): Return
9821 * macroexp.c (macro_expand, macro_expand_once): Return
9823 * macrocmd.c (macro_expand_command, macro_expand_once_command)
9824 (info_macro_command, info_macros_command): Use
9826 * compile/compile-c-support.c (write_macro_definitions): Use
9828 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9830 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
9832 * value.c (value_static_field): Assign field type instead of
9833 containing type when returning an optimized out value.
9835 2018-02-06 Yao Qi <yao.qi@linaro.org>
9837 * ft32-tdep.c (ft32_read_pc): Remove.
9838 (ft32_write_pc): Remove.
9839 (ft32_gdbarch_init): Update.
9840 * m32r-tdep.c (m32r_read_pc): Remove.
9841 (m32r_gdbarch_init): Update.
9842 * mep-tdep.c (mep_read_pc): Remove.
9843 (mep_gdbarch_init): Update.
9844 * microblaze-tdep.c (microblaze_write_pc): Remove.
9845 (microblaze_gdbarch_init): Update.
9846 * mn10300-tdep.c (mn10300_read_pc): Remove.
9847 (mn10300_write_pc): Remove.
9848 (mn10300_gdbarch_init): Update.
9849 * moxie-tdep.c (moxie_read_pc): Remove.
9850 (moxie_write_pc): Remove.
9851 (moxie_gdbarch_init): Update.
9853 2018-02-06 Yao Qi <yao.qi@linaro.org>
9855 * expprint.c (print_subexp_standard): Handle
9856 OP_F77_UNDETERMINED_ARGLIST.
9857 (dump_subexp_body_standard): Likewise.
9859 2018-02-05 Alan Hayward <alan.hayward@arm.com>
9861 * target-descriptions.c (tdesc_element_visitor) Add empty
9863 (tdesc_type): Move make_gdb_type from here.
9864 (tdesc_type_builtin): Likewise.
9865 (tdesc_type_vector): Likewise.
9866 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9867 (make_gdb_type_struct): Move from tdesc_type_with_fields.
9868 (make_gdb_type_union): Likewise.
9869 (make_gdb_type_flags): Likewise.
9870 (make_gdb_type_enum): Likewise.
9871 (make_gdb_type): New function.
9872 (tdesc_register_type): Use static make_gdb_type.
9874 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
9876 * infcmd.c (default_print_one_register_info): Align natural-format
9877 column values consistently one under another.
9878 (pad_to_column): New function.
9880 2018-02-05 Joel Brobecker <brobecker@adacore.com>
9882 * dwarf2read.c (dwarf2_physname): Move commment.
9884 2018-02-01 Leszek Swirski <leszeks@google.com>
9886 * varobj.c (varobj_formatted_print_options): Allow recursive
9887 pretty printing if pretty printing is enabled.
9889 2018-02-01 Leszek Swirski <leszeks@google.com>
9891 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9892 names after a structop as a filename.
9894 2018-02-01 Yao Qi <yao.qi@linaro.org>
9896 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9897 (arm_record_coproc_data_proc): Likewise.
9899 2018-02-01 Yao Qi <yao.qi@linaro.org>
9901 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9903 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
9905 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9906 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9908 2018-01-31 Pedro Alves <palves@redhat.com>
9910 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9911 * inflow.c (child_terminal_save_inferior): Wrap reference to
9912 tcgetpgrp in HAVE_TERMIOS_H.
9913 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9915 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9916 always iterate over all inferiors.
9917 (gdbsim_cntrl_c): Adjust.
9918 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9920 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9922 * gdbtypes.c (lookup_array_range_type): Make sure the array's
9923 index type is objfile-owned if the element type is as well.
9925 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9929 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
9931 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9932 "features/s390x-linux64.c".
9933 (_initialize_s390_linux_tdep): Remove initialization of tdescs
9934 s390_linux32 and s390x_linux64.
9935 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9937 * s390-tdep.c: Include "features/s390-linux32.c" and
9938 "features/s390x-linux64.c".
9939 (s390_tdesc_valid): Add check for tdesc_has_registers.
9940 (s390_gdbarch_init): Make sure there is always a valid tdesc.
9941 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9942 tdesc_s390x_linux64.
9943 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9944 tdesc_s390x_linux64 to...
9945 * s390-tdep.h: ...here.
9947 2018-01-30 Pedro Alves <palves@redhat.com>
9950 * config.in, configure: Regenerate.
9951 * configure.ac: Check for getpgid.
9952 * go32-nat.c (go32_pass_ctrlc): New.
9953 (go32_target): Install it.
9954 * inf-child.c (inf_child_target): Install
9955 child_terminal_save_inferior, child_pass_ctrlc and
9957 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9958 (inf_ptrace_target): No longer install it.
9959 * infcmd.c (interrupt_target_1): Adjust.
9960 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9961 (child_interrupt): Declare.
9962 (inferior::terminal_state): New.
9963 * inflow.c (struct terminal_info): Update comments.
9964 (inferior_process_group): Delete.
9965 (terminal_is_ours): Delete.
9966 (gdb_tty_state): New.
9967 (child_terminal_init): Adjust.
9968 (is_gdb_terminal, sharing_input_terminal_1)
9969 (sharing_input_terminal): New functions.
9970 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
9971 Set the process's actual process group in the foreground if
9972 possible. Handle is_ours_for_output/is_ours distinction. Don't
9973 mark terminal as the inferior's if not sharing GDB's terminal.
9974 Don't check attach_flag.
9975 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9976 pass down a target_terminal_state.
9977 (child_terminal_save_inferior): New, factored out from ...
9978 (child_terminal_ours_1): ... this. Handle
9979 target_terminal_state::is_ours_for_output.
9980 (child_interrupt, child_pass_ctrlc): New.
9981 (inflow_inferior_exit): Clear the inferior's terminal_state.
9982 (copy_terminal_info): Copy the inferior's terminal state.
9983 (_initialize_inflow): Remove reference to terminal_is_ours.
9984 * inflow.h (inferior_process_group): Delete.
9985 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9986 * procfs.c (procfs_target): Don't install procfs_interrupt.
9987 (procfs_interrupt): Delete.
9988 * remote.c (remote_serial_quit_handler): Adjust.
9989 (remote_interrupt): Remove ptid parameter. Adjust.
9990 * target-delegates.c: Regenerate.
9991 * target.c: Include "terminal.h".
9992 (target_terminal::terminal_state): Rename to ...
9993 (target_terminal::m_terminal_state): ... this.
9994 (target_terminal::init): Adjust.
9995 (target_terminal::inferior): Adjust to per-inferior
9997 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
9998 (target_terminal::ours, target_terminal::ours_for_output): Use
9999 target_terminal_is_ours_kind.
10000 (target_interrupt): Remove ptid parameter. Adjust.
10001 (default_target_pass_ctrlc): Adjust.
10002 * target.h (target_ops::to_terminal_save_inferior): New field.
10003 (target_ops::to_interrupt): Remove ptid_t parameter.
10004 (target_interrupt): Remove ptid_t parameter. Update comment.
10005 (target_pass_ctrlc): Update comment.
10006 * target/target.h (target_terminal_state): New scoped enum,
10007 factored out of ...
10008 (target_terminal::terminal_state): ... here.
10009 (target_terminal::inferior): Update comments.
10010 (target_terminal::restore_inferior): New.
10011 (target_terminal::is_inferior, target_terminal::is_ours)
10012 (target_terminal::is_ours_for_output): Adjust.
10013 (target_terminal::scoped_restore_terminal_state): Adjust to
10014 rename, and call restore_inferior() instead of inferior().
10015 (target_terminal::scoped_restore_terminal_state::m_state): Change
10017 (target_terminal::terminal_state): Rename to ...
10018 (target_terminal::m_terminal_state): ... this and change type.
10020 2018-01-30 Pedro Alves <palves@redhat.com>
10022 * linux-nat.c (wait_for_signal): New function.
10023 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10025 (async_terminal_is_ours)
10026 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10027 (linux_nat_add_target): Don't override
10028 to_terminal_inferior/to_terminal_ours.
10030 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
10032 * remote.c (remote_follow_fork): Don't call "detach_inferior".
10034 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
10036 * dwarf2read.c (free_dwo_files): Add forward-declaration.
10037 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10038 dwarf2_per_objfile_free here.
10039 (dwarf2_per_objfile_free): Remove.
10040 (_initialize_dwarf2_read): Don't register
10041 dwarf2_per_objfile_free as a registry cleanup.
10043 2018-01-27 Eli Zaretskii <eliz@gnu.org>
10045 Avoid compilation errors in MinGW native builds
10047 The error is triggered by including python-internal.h, and the
10050 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10051 from build-gnulib/import/math.h:27,
10052 from d:/usr/Python26/include/pyport.h:235,
10053 from d:/usr/Python26/include/Python.h:58,
10054 from python/python-internal.h:94,
10055 from python/py-arch.c:24:
10056 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10060 This happens because Python headers define 'hypot' to expand t
10061 '_hypot' in the Windows builds.
10062 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10063 'hypoth'. This avoids a compilation error.
10065 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10067 * MAINTAINERS (Write After Approval): Fix ordering.
10069 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10071 * MAINTAINERS (Write After Approval): Add Alan Hayward.
10073 2018-01-26 Alan Modra <amodra@gmail.com>
10075 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10076 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10077 Remove nop. Make const. Comment.
10078 (powerpc32_plt_stub_so_2): New.
10079 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10080 Correct count. Update uses.
10081 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10082 Move common code reading PLT entry word. Correct
10083 powerpc32_plt_stub PLT address calculation.
10084 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10085 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10086 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10087 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10088 (ppc64_standard_linkage8): Likewise.
10089 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10090 Correct insns description.
10091 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10093 2018-01-24 Pedro Alves <palves@redhat.com>
10095 GCC PR libstdc++/83906
10096 * gdbtypes.c (operator==(const dynamic_prop &,
10097 const dynamic_prop &)): New.
10098 (operator==(const range_bounds &, const range_bounds &)): New.
10099 (check_types_equal): Use them instead of memcmp.
10100 * gdbtypes.h (operator==(const dynamic_prop &,
10101 const dynamic_prop &)): Declare.
10102 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10103 (operator==(const range_bounds &, const range_bounds &)): Declare.
10104 (operator!=(const range_bounds &, const range_bounds &)): Declare.
10106 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10108 * s390-linux-tdep.c (s390_record_address_mask)
10109 (s390_record_calc_disp_common, s390_record_calc_disp)
10110 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10111 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10112 (s390_process_record): Move to s390-tdep.c.
10113 (s390_linux_init_abi_any): Adjust.
10114 * s390-tdep.c (s390_record_address_mask)
10115 (s390_record_calc_disp_common, s390_record_calc_disp)
10116 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10117 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10118 (s390_process_record): Moved from s390-linux-tdep.c
10119 (s390_gdbarch_init): Adjust.
10121 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10123 * s390-linux-nat.c (s390-tdep.h): New include.
10124 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10125 (HFILES_NO_SRCDIR): Add s390-tdep.h.
10126 (ALLDEPFILES): Add s390-tdep.c.
10127 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10128 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10129 * s390-tdep.h: ...this. New file.
10130 * s390-linux-tdep.c (s390-tdep.h): New include.
10131 (_initialize_s390_tdep): Rename to...
10132 (_initialize_s390_linux_tdep): ...this and adjust.
10133 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10134 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10136 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10137 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10138 (s390_is_partial_instruction, s390_software_single_step)
10139 (is_non_branch_ril, s390_displaced_step_copy_insn)
10140 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10141 (s390_prologue_data, s390_addr, s390_store, s390_load)
10142 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10143 (s390_register_call_saved, s390_guess_tracepoint_registers)
10144 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10145 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10146 (s390_pseudo_register_name, s390_pseudo_register_type)
10147 (s390_pseudo_register_read, s390_pseudo_register_write)
10148 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10149 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10150 (s390_addr_bits_remove, s390_address_class_type_flags)
10151 (s390_address_class_type_flags_to_name)
10152 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10153 (s390_function_arg_float, s390_function_arg_vector)
10154 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10155 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10156 (s390_frame_align, s390_register_return_value, s390_return_value)
10157 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10158 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10159 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10160 (s390_trad_frame_prev_register, s390_unwind_cache)
10161 (s390_prologue_frame_unwind_cache)
10162 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10163 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10164 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10165 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10166 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10167 (s390_frame_base_address, s390_local_base_address)
10168 (s390_frame_base, s390_gcc_target_options)
10169 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10170 (s390_validate_reg_range, s390_tdesc_valid)
10171 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10172 * s390-tdep.c: ...this. New file.
10174 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10176 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10177 (s390_process_record, s390_gdbarch_tdep_alloc)
10178 (s390_linux_init_abi_any): Use/set new hook.
10180 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10182 * s390-linux-tdep.c (osabi.h): New include.
10183 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10184 (s390_linux_init_abi_any): New functions.
10185 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10187 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10189 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10190 tdesc_has_registers check
10192 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10194 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10195 (s390_validate_reg_range): New macro.
10196 (s390_gdbarch_init): Adjust.
10198 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10200 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10201 (s390_gdbarch_tdep_alloc): Adjust.
10202 (s390_gdbarch_init): Adjust.
10204 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10206 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10207 <have_tdb>: Change type to bool.
10208 (s390_gdbarch_tdep_alloc): Adjust.
10209 (s390_gdbarch_init): Adjust.
10211 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10213 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10214 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10215 (s390_gdbarch_tdep_alloc): New function.
10216 (s390_gdbarch_init): Allocate tdep at start and use its fields
10217 instead of separate variables.
10219 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10221 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10222 when looking for cached gdbarch and add comment for remaining.
10224 2018-01-22 Pedro Alves <palves@redhat.com>
10225 Sergio Durigan Junior <sergiodj@redhat.com>
10227 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10230 2018-01-22 Maciej W. Rozycki <macro@mips.com>
10232 * MAINTAINERS: Update my company e-mail address.
10234 2018-01-22 Yao Qi <yao.qi@linaro.org>
10236 * regcache.c (cooked_write_test): New function.
10237 (_initialize_regcache): Register the test.
10239 2018-01-22 Yao Qi <yao.qi@linaro.org>
10241 * ia64-tdep.c (ia64_pseudo_register_read): Call
10242 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10243 * m32c-tdep.c (m32c_cat_read): Likewise.
10244 (m32c_r3r2r1r0_read): Likewise.
10245 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10246 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10248 2018-01-22 Yao Qi <yao.qi@linaro.org>
10250 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10251 method raw_read instead of regcache_raw_read.
10252 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10253 * arm-tdep.c (arm_neon_quad_read): Likewise.
10254 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10255 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10256 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10257 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10258 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10259 (i386_pseudo_register_read_into_value): Likewise.
10260 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10261 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10262 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10263 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10264 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10265 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10266 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10267 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10268 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10270 2018-01-22 Yao Qi <yao.qi@linaro.org>
10272 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10273 * configure.tgt: Remove target mt.
10274 * mt-tdep.c: Remove.
10275 * regcache.c (cooked_read_test): Remove the check for mt.
10277 2018-01-22 Yao Qi <yao.qi@linaro.org>
10279 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10280 instead of gdbarch_pseudo_register_read_value.
10282 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10284 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10287 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10289 * linespec.c (create_sals_line_offset): Remove code that preserved
10290 the symtab_and_line's line number.
10292 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10294 * varobj.c (varobj_create): Don't set valid_block when creating a
10297 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10299 * varobj.c (varobj_create): Remove out of date comment.
10301 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10304 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10305 updating innermost block.
10306 * parse.c (innermost_block_tracker::update): Take extra type
10307 parameter, and check types match before updating innermost block.
10308 (write_dollar_variable): Update innermost block for registers.
10309 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10310 (innermost_block_tracker::innermost_block_tracker): Initialise
10312 (innermost_block_tracker::reset): Take type parameter.
10313 (innermost_block_tracker::update): Take type parameter, and pass
10314 type through as needed.
10315 (innermost_block_tracker::m_types): New member.
10316 * varobj.c (varobj_create): Pass type when reseting innermost
10319 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10321 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10322 * ada-lang.c (resolve_subexp): Likewise.
10323 * breakpoint.c (set_breakpoint_condition) Likewise.
10324 (watch_command_1) Likewise.
10325 * c-exp.y (variable): Likewise.
10326 * d-exp.y (PrimaryExpression): Likewise.
10327 * f-exp.y (variable): Likewise.
10328 * go-exp.y (variable): Likewise.
10329 * m2-exp.y (variable): Likewise.
10330 * objfiles.c (objfile::~objfile): Likewise.
10331 * p-exp.y (variable): Likewise.
10332 * parse.c (innermost_block): Change type.
10333 * parser-defs.h (class innermost_block_tracker): New.
10334 (innermost_block): Change to innermost_block_tracker.
10335 * printcmd.c (display_command): Switch to innermost_block API.
10336 (do_one_display): Likewise.
10337 * rust-exp.y (do_one_display): Likewise.
10338 * symfile.c (clear_symtab_users): Likewise.
10339 * varobj.c (varobj_create): Switch to innermost_block API, replace
10340 use of innermost_block with block stored on varobj object.
10342 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10344 * expression.h (innermost_block): Remove declaration.
10345 * varobj.c: Add 'parser-defs.h' include.
10347 2018-01-19 Tom Tromey <tom@tromey.com>
10349 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10350 symbols in the static and global blocks.
10352 2018-01-19 James Clarke <jrtc27@jrtc27.com>
10354 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10355 gdb_ptrace.h, and move including gdb_wait.h ...
10356 * nat/linux-ptrace.h: ... to here.
10358 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10360 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10361 inf_ptrace_detach_success.
10362 (inf_ptrace_detach_success): Add inferior parameter, use it
10363 instead of inferior_ptid, pass it to detach_inferior.
10364 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10366 * inferior.c (detach_inferior): Add overload that takes an
10368 * inferior.h (detach_inferior): Likewise.
10369 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10370 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10371 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10373 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10375 * target.h (struct target_ops) <to_detach>: Add inferior
10377 (target_detach): Likewise.
10378 * target.c (dispose_inferior): Pass inferior down.
10379 (target_detach): Pass inferior down. Assert that it is equal to
10380 the current inferior.
10381 * aix-thread.c (aix_thread_detach): Pass inferior down.
10382 * corefile.c (core_file_command): Pass current_inferior() down.
10383 * corelow.c (core_detach): Add inferior parameter.
10384 * darwin-nat.c (darwin_detach): Likewise.
10385 * gnu-nat.c (gnu_detach): Likewise.
10386 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10387 * infcmd.c (detach_command): Pass current_inferior() down to
10389 * infrun.c (follow_fork_inferior): Pass parent_inf to
10391 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10393 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10394 * linux-thread-db.c (thread_db_detach): Likewise.
10395 * nto-procfs.c (procfs_detach): Likewise.
10396 * procfs.c (procfs_detach): Likewise.
10397 * record.c (record_detach): Likewise.
10398 * record.h (struct inferior): Forward-declare.
10399 (record_detach): Add inferior parameter.
10400 * remote-sim.c (gdbsim_detach): Likewise.
10401 * remote.c (remote_detach_1): Likewise.
10402 (remote_detach): Likewise.
10403 (extended_remote_detach): Likewise.
10404 * sol-thread.c (sol_thread_detach): Likewise.
10405 * target-debug.h (target_debug_print_inferior_p): New macro.
10406 * target-delegates.c: Re-generate.
10407 * top.c (kill_or_detach): Pass inferior down to target_detach.
10408 * windows-nat.c (windows_detach): Add inferior parameter.
10410 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10412 * target.h (struct target_ops) <to_detach>: Remove args
10414 (target_detach): Likewise.
10415 * target.c (dispose_inferior): Adjust.
10416 (target_detach): Remove args parameter, adjust.
10417 * aix-thread.c (aix_thread_detach): Adjust.
10418 * corefile.c (core_file_command): Adjust.
10419 * corelow.c (core_detach): Adjust.
10420 * darwin-nat.c (darwin_detach): Adjust.
10421 * gnu-nat.c (gnu_detach): Adjust.
10422 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10423 * infcmd.c (detach_command): Adjust
10424 * infrun.c (follow_fork_inferior): Adjust.
10425 (handle_vfork_child_exec_or_exit): Adjust.
10426 * linux-fork.c (linux_fork_detach): Remove args parameter.
10427 * linux-fork.h (linux_fork_detach): Likewise.
10428 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10429 * linux-thread-db.c (thread_db_detach): Likewise.
10430 * nto-procfs.c (procfs_detach): Likewise.
10431 * procfs.c (procfs_detach): Likewise.
10432 (do_detach): Remove signo parameter.
10433 * record.c (record_detach): Remove args parameter.
10434 * record.h (record_detach): Likewise.
10435 * remote-sim.c (gdbsim_detach): Likewise.
10436 * remote.c (remote_detach_1): Likewise.
10437 (remote_detach): Likewise.
10438 (extended_remote_detach): Likewise.
10439 * sol-thread.c (sol_thread_detach): Likewise.
10440 * target-delegates.c: Re-generate.
10441 * top.c (struct qt_args) <args>: Remove field.
10442 (kill_or_detach): Don't pass args.
10443 (quit_force): Don't set args.
10444 * windows-nat.c (windows_detach): Remove args parameter.
10446 2018-01-19 Yao Qi <yao.qi@linaro.org>
10448 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10449 (arm_linux_init_abi): Install it.
10451 2018-01-19 Yao Qi <yao.qi@linaro.org>
10453 * osabi.c (gdb_osabi_names): Extend the regexp for
10454 arm-linux-gnueabihf.
10456 2018-01-18 Yao Qi <yao.qi@linaro.org>
10458 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10460 (abbrev_table::add_abbrev): Update.
10461 (abbrev_table::lookup_abbrev): Update.
10463 2018-01-18 Yao Qi <yao.qi@linaro.org>
10465 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10467 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10469 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10472 2018-01-17 Tom Tromey <tom@tromey.com>
10474 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10476 2018-01-17 Tom Tromey <tom@tromey.com>
10478 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10479 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10480 (create_array_type_with_stride): Update.
10481 * dwarf2read.c (set_die_type): Update.
10483 2018-01-17 Tom Tromey <tom@tromey.com>
10485 * dwarf2read.c (delayed_method_info): Remove typedef.
10486 (dwarf2_cu::method_info): Now a std::vector.
10487 (add_to_method_list): Update.
10488 (free_delayed_list): Remove.
10489 (compute_delayed_physnames): Update.
10490 (process_full_comp_unit, process_full_type_unit): Clear the method
10491 list. Remove cleanups.
10492 (psymtab_include_file_name): Add name_holder parameter. Use
10493 unique_xmalloc_ptr.
10494 (dwarf_decode_lines): Update.
10496 2018-01-17 Tom Tromey <tom@tromey.com>
10497 Simon Marchi <simon.marchi@ericsson.com>
10499 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10500 (dwarf2_per_objfile::free_cached_comp_units)
10501 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10502 (init_cutu_and_read_dies_no_follow): Update.
10503 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10504 (dwarf2_cu::~dwarf2_cu): New.
10505 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10506 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10508 2018-01-17 Tom Tromey <tom@tromey.com>
10509 Simon Marchi <simon.marchi@ericsson.com>
10511 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10512 (struct die_reader_specs) <abbrev_table>: New member.
10513 (struct abbrev_table): Add constructor.
10514 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10515 <abbrev_obstack>: Now an auto_obstack.
10516 (abbrev_table_up): New typedef.
10517 (init_cu_die_reader): Add abbrev_table parameter.
10518 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10519 Add result_dwo_abbrev_table.
10520 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10521 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10523 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10525 (skip_children): Update.
10526 (abbrev_table::alloc_abbrev): Rename from
10527 abbrev_table_alloc_abbrev.
10528 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10529 (abbrev_table::lookup_abbrev): Rename from
10530 abbrev_table_lookup_abbrev.
10531 (abbrev_table_read_table): Return abbrev_table_up.
10532 (abbrev_table_free, abbrev_table_free_cleanup)
10533 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10534 (load_partial_dies): Update.
10536 2018-01-17 Tom Tromey <tom@tromey.com>
10538 * dwarf2read.c (dwarf2_compute_name): Update comment.
10539 (read_func_scope, read_variable): Update.
10540 (new_symbol): Remove.
10541 (new_symbol_full): Rename to new_symbol.
10543 2018-01-17 Mike Gulick <mgulick@mathworks.com>
10546 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10547 a warning instead of throwing an error, set section size to 0 and return
10549 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10551 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10553 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10555 (linux_ptrace_attach_fail_reason_string): Likewise.
10556 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10558 (linux_ptrace_attach_fail_reason_string): Likewise.
10559 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10561 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10563 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10565 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10568 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10569 checking for fs_base/gs_base fields in struct user_regs_struct.
10570 * configure: Regenerate.
10572 2018-01-17 Yao Qi <yao.qi@linaro.org>
10574 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10576 (aarch64_linux_init_abi): Install it to gdbarch hook
10577 gcc_target_options.
10579 2018-01-15 Pedro Alves <palves@redhat.com>
10581 * common/signals-state-save-restore.c
10582 (save_original_signals_state): Fix typos.
10584 2017-01-12 Tom Tromey <tom@tromey.com>
10585 Sergio Durigan Junior <sergiodj@redhat.com>
10587 * Makefile.in (install-only): Install gdb-add-index.
10589 2018-01-12 John Baldwin <jhb@FreeBSD.org>
10591 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10593 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10595 * infrun.c (keep_going_pass_signal): Clear step-over info when
10596 insert_breakpoints fails.
10598 2018-01-11 Pedro Alves <palves@redhat.com>
10601 * infrun.c (resume): Rename to ...
10602 (resume_1): ... this.
10603 (resume): Reimplement as wrapper around resume_1.
10605 2018-01-11 Pedro Alves <palves@redhat.com>
10608 * remote.c (remote_parse_stop_reply): Default to the last-set
10609 general thread instead of to 'magic_null_ptid'.
10611 2018-01-10 Pedro Alves <palves@redhat.com>
10613 * language.h (language_get_symbol_name_matcher): Rename ...
10614 (get_symbol_name_matcher): ... this.
10615 * language.c (language_get_symbol_name_matcher): Ditto.
10616 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10619 2018-01-10 Pedro Alves <palves@redhat.com>
10623 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10624 Adjust to use language_get_symbol_name_matcher instead of
10625 language_defn::la_get_symbol_name_matcher.
10626 * language.c (language_get_symbol_name_matcher): If in Ada mode
10627 and the lookup name is a verbatim match, return Ada's matcher.
10628 * language.h (language_get_symbol_name_matcher): Adjust comment.
10629 (ada_lookup_name_info::verbatim_p):: New method.
10631 2018-01-10 Pedro Alves <palves@redhat.com>
10634 * ada-lang.c (ada_collect_symbol_completion_matches): If the
10635 minsym's language is language_auto or language_cplus, pass down
10636 language_ada instead.
10637 * symtab.c (compare_symbol_name): Don't frob symbol language here.
10639 2018-01-10 Pedro Alves <palves@redhat.com>
10642 * minsyms.c (linkage_name_str): New function.
10643 (iterate_over_minimal_symbols): Use it.
10645 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10647 * NEWS: Document that 'info proc' now works on FreeBSD.
10649 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10651 * configure.ac: Check for kinfo_getfile in libutil.
10652 * configure: Regenerate.
10653 * config.in: Regenerate.
10654 * fbsd-nat.c: Include "fbsd-tdep.h".
10655 (fbsd_fetch_cmdline): New.
10656 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10657 rather than calling error.
10658 (fbsd_info_proc): New.
10659 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10660 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10661 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10663 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10665 * fbsd-nat.c (struct free_deleter): Remove.
10666 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10668 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10670 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10671 NULL for an empty pathname.
10673 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10675 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10676 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10677 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10678 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10679 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10680 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10681 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10682 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10683 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10684 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10685 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10686 (fbsd_core_fetch_timeval, fbsd_print_sigset)
10687 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10688 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
10689 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10691 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
10693 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10694 (gnu_xfer_auxv): New function.
10695 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10696 TARGET_OBJECT_AUXV.
10698 2018-01-08 Yao Qi <yao.qi@linaro.org>
10699 Simon Marchi <simon.marchi@ericsson.com>
10701 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10703 (COMMON_OBS): Remove selftest.o.
10704 * configure.ac: Append selftest-arch.c and common/selftest.c to
10705 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
10706 * configure: Re-generated.
10707 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10709 (maintenance_info_selftests): Likewise.
10711 2018-01-08 Xavier Roirand <roirand@adacore.com>
10713 * ada-valprint.c (val_print_packed_array_elements): Use
10714 proper number of elements when printing an array indexed
10715 by an enumeration type.
10717 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10719 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10720 (dw2_get_file_names_reader): Adjust.
10721 (lookup_dwo_signatured_type): Adjust.
10722 (lookup_dwp_signatured_type): Adjust.
10723 (lookup_signatured_type): Adjust.
10724 (create_type_unit_group): Adjust.
10725 (get_type_unit_group): Adjust.
10726 (process_psymtab_comp_unit_reader): Adjust.
10727 (build_type_psymtabs_reader): Adjust.
10728 (scan_partial_symbols): Adjust.
10729 (add_partial_symbol): Adjust.
10730 (add_partial_subprogram): Adjust.
10731 (peek_die_abbrev): Adjust.
10732 (fixup_go_packaging): Adjust.
10733 (process_imported_unit_die): Adjust.
10734 (dwarf2_compute_name): Adjust.
10735 (dwarf2_physname): Adjust.
10736 (read_import_statement): Adjust.
10737 (handle_DW_AT_stmt_list): Adjust.
10738 (read_file_scope): Adjust.
10739 (read_func_scope): Adjust.
10740 (read_lexical_block_scope): Adjust.
10741 (read_call_site_scope): Adjust.
10742 (read_variable): Adjust.
10743 (dwarf2_rnglists_process): Adjust.
10744 (dwarf2_ranges_process): Adjust.
10745 (dwarf2_ranges_read): Adjust.
10746 (dwarf2_get_pc_bounds): Adjust.
10747 (dwarf2_record_block_ranges): Adjust.
10748 (dwarf2_add_field): Adjust.
10749 (dwarf2_add_member_fn): Adjust.
10750 (read_structure_type): Adjust.
10751 (process_structure_scope): Adjust.
10752 (read_enumeration_type): Adjust.
10753 (read_array_type): Adjust.
10754 (mark_common_block_symbol_computed): Adjust.
10755 (read_common_block): Adjust.
10756 (read_namespace_type): Adjust.
10757 (read_namespace): Adjust.
10758 (read_module_type): Adjust.
10759 (read_tag_pointer_type): Adjust.
10760 (read_tag_ptr_to_member_type): Adjust.
10761 (read_tag_string_type): Adjust.
10762 (read_subroutine_type): Adjust.
10763 (read_typedef): Adjust.
10764 (read_base_type): Adjust.
10765 (attr_to_dynamic_prop): Adjust.
10766 (read_subrange_type): Adjust.
10767 (read_unspecified_type): Adjust.
10768 (dwarf2_read_abbrevs): Adjust.
10769 (load_partial_dies): Adjust.
10770 (read_partial_die): Adjust.
10771 (find_partial_die): Adjust.
10772 (guess_partial_die_structure_name): Adjust.
10773 (fixup_partial_die): Adjust.
10774 (read_attribute_value): Adjust.
10775 (read_addr_index): Adjust.
10776 (read_addr_index_from_leb128): Adjust.
10777 (read_str_index): Adjust.
10778 (dwarf2_string_attr): Adjust.
10779 (get_debug_line_section): Adjust.
10780 (dwarf_decode_line_header): Adjust.
10781 (lnp_state_machine::check_line_address): Adjust.
10782 (dwarf_decode_lines_1): Adjust.
10783 (dwarf_decode_lines): Adjust.
10784 (dwarf2_start_symtab): Adjust.
10785 (var_decode_location): Adjust.
10786 (new_symbol_full): Adjust.
10787 (dwarf2_const_value_data): Adjust.
10788 (dwarf2_const_value_attr): Adjust.
10789 (dwarf2_const_value): Adjust.
10790 (die_type): Adjust.
10791 (die_containing_type): Adjust.
10792 (build_error_marker_type): Adjust.
10793 (lookup_die_type): Adjust.
10794 (guess_full_die_structure_name): Adjust.
10795 (anonymous_struct_prefix): Adjust.
10796 (determine_prefix): Adjust.
10797 (dwarf2_name): Adjust.
10798 (follow_die_ref_or_sig): Adjust.
10799 (follow_die_offset): Adjust.
10800 (follow_die_ref): Adjust.
10801 (follow_die_sig_1): Adjust.
10802 (follow_die_sig): Adjust.
10803 (get_signatured_type): Adjust.
10804 (get_DW_AT_signature_type): Adjust.
10805 (decode_locdesc): Adjust.
10806 (dwarf_decode_macros): Adjust.
10807 (cu_debug_loc_section): Adjust.
10808 (fill_in_loclist_baton): Adjust.
10809 (dwarf2_symbol_mark_computed): Adjust.
10810 (init_one_comp_unit): Don't assign
10811 dwarf2_cu::dwarf2_per_objfile.
10812 (set_die_type): Adjust.
10814 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10816 * dwarf2read.c (struct mapped_debug_names): Add constructor.
10817 <dwarf2_per_objfile>: New field.
10818 (dwarf2_per_objfile): Remove global.
10819 (get_dwarf2_per_objfile): New function.
10820 (set_dwarf2_per_objfile): New function.
10821 (dwarf2_build_psymtabs_hard): Change objfile parameter to
10822 dwarf2_per_objfile.
10823 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10824 (read_abbrev_offset): Likewise.
10825 (read_indirect_string): Likewise.
10826 (read_indirect_line_string): Likewise.
10827 (read_indirect_string_at_offset): Likewise.
10828 (read_indirect_string_from_dwz): Likewise.
10829 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10830 dwarf2_per_objfile.
10831 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10832 (create_all_comp_units): Change objfile parameter to
10833 dwarf2_per_objfile.
10834 (create_all_type_units): Likewise.
10835 (process_queue): Add dwarf2_per_objfile parameter.
10836 (read_and_check_comp_unit_head): Likewise.
10837 (lookup_dwo_unit_in_dwp): Likewise.
10838 (get_dwp_file): Likewise.
10839 (process_cu_includes): Likewise.
10840 (struct free_dwo_file_cleanup_data): New struct.
10841 (dwarf2_has_info): Use get_dwarf2_per_objfile and
10842 set_dwarf2_per_objfile.
10843 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10844 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10845 context, adjust calls.
10846 (dw2_instantiate_symtab): Likewise.
10847 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10848 (dw2_get_cu): Likewise.
10849 (create_cu_from_index_list): Change objfile parameter to
10850 dwarf2_per_objfile.
10851 (create_cus_from_index_list): Get dwarf2_per_objfile from
10852 context, adjust calls.
10853 (create_cus_from_index): Likewise.
10854 (create_signatured_type_table_from_index): Change objfile
10855 parameter to dwarf2_per_objfile.
10856 (create_signatured_type_table_from_debug_names): Change objfile
10857 parameter to dwarf2_per_objfile.
10858 (create_addrmap_from_index): Likewise.
10859 (create_addrmap_from_aranges): Likewise.
10860 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10861 (dw2_setup): Remove.
10862 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10864 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10865 get_dwarf2_per_objfile.
10866 (dw2_forget_cached_source_info): Likewise.
10867 (dw2_map_symtabs_matching_filename): Likewise.
10868 (struct dw2_symtab_iterator) <index>: Remove.
10869 <dwarf2_per_objfile>: New field.
10870 (dw2_symtab_iter_init): Replace index parameter with
10871 dwarf2_per_objfile.
10872 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10873 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10874 (dw2_print_stats): Likewise.
10875 (dw2_dump): Likewise.
10876 (dw2_expand_symtabs_for_function): Likewise.
10877 (dw2_expand_all_symtabs): Likewise.
10878 (dw2_expand_symtabs_with_fullname): Likewise.
10879 (dw2_expand_marked_cus): Replace index and objfile parameters
10880 with dwarf2_per_objfile.
10881 (dw_expand_symtabs_matching_file_matcher): Add
10882 dwarf2_per_objfile parameter and adjust calls.
10883 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10885 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10886 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10888 (create_cus_from_debug_names_list): Replace objfile parameter
10889 with dwarf2_per_objfile and adjust calls.
10890 (create_cus_from_debug_names): Likewise.
10891 (dwarf2_read_debug_names): Likewise.
10892 (mapped_debug_names::namei_to_name): Adjust call.
10893 (dw2_debug_names_iterator::next): Likewise.
10894 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10895 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10896 (dw2_debug_names_dump): Likewise.
10897 (dw2_debug_names_expand_symtabs_for_function): Likewise.
10898 (dw2_debug_names_expand_symtabs_matching): Likewise.
10899 (dwarf2_initialize_objfile): Likewise.
10900 (dwarf2_build_psymtabs): Likewise.
10901 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10903 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10904 (read_and_check_comp_unit_head): Likewise.
10905 (read_abbrev_offset): Likewise.
10906 (create_debug_type_hash_table): Likewise.
10907 (create_debug_types_hash_table): Likewise.
10908 (create_all_type_units): Replace objfile parameter with
10909 dwarf2_per_objfile.
10910 (add_type_unit): Add dwarf2_per_objfile parameter.
10911 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10912 with dwarf2_per_objfile.
10913 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10914 (lookup_dwp_signatured_type): Likewise.
10915 (lookup_signatured_type): Likewise.
10916 (read_cutu_die_from_dwo): Likewise.
10917 (init_tu_and_read_dwo_dies): Likewise.
10918 (init_cutu_and_read_dies): Likewise.
10919 (init_cutu_and_read_dies_no_follow): Likewise.
10920 (allocate_type_unit_groups_table): Add objfile parameter.
10921 (create_type_unit_group): Use dwarf2_per_objfile from cu.
10922 (get_type_unit_group): Likewise.
10923 (process_psymtab_comp_unit): Update call.
10924 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10925 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10926 (print_tu_stats): Likewise.
10927 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10928 in void* parameter.
10929 (build_type_psymtabs): Change objfile parameter to
10930 dwarf2_per_objfile.
10931 (process_skeletonless_type_unit): Use dwarf2_per_objfile
10932 passed in void* parameter.
10933 (process_skeletonless_type_units): Change objfile parameter to
10934 dwarf2_per_objfile.
10935 (set_partial_user): Likewise.
10936 (dwarf2_build_psymtabs_hard): Likewise.
10937 (read_comp_units_from_section): Likewise.
10938 (create_all_comp_units): Likewise.
10939 (scan_partial_symbols): Update calls.
10940 (add_partial_symbol): Likewise.
10941 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10942 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10943 (process_queue): Add dwarf2_per_objfile parameter.
10944 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10945 (compute_compunit_symtab_includes): Likewise.
10946 (process_cu_includes): Add dwarf2_per_objfile parameter.
10947 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10948 (process_full_type_unit): Likewise.
10949 (process_imported_unit_die): Update call.
10950 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10951 (read_file_scope): Likewise.
10952 (allocate_dwo_file_hash_table): Add objfile parameter.
10953 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10954 (create_cus_hash_table): Likewise.
10955 (create_dwp_hash_table): Likewise.
10956 (create_dwo_unit_in_dwp_v1): Likewise.
10957 (create_dwp_v2_section): Likewise.
10958 (create_dwo_unit_in_dwp_v2): Likewise.
10959 (lookup_dwo_unit_in_dwp): Likewise.
10960 (try_open_dwop_file): Likewise.
10961 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10962 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10963 cleanup to include a reference to dwarf2_per_objfile.
10964 (open_dwp_file): Add dwarf2_per_objfile parameter.
10965 (open_and_init_dwp_file): Likewise.
10966 (get_dwp_file): Likewise.
10967 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10968 (queue_and_load_all_dwo_tus): Update call.
10969 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10971 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10972 (dwarf2_ranges_process): Likewise.
10973 (dwarf2_get_pc_bounds): Likewise.
10974 (mark_common_block_symbol_computed): Likewise.
10975 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10976 (dwarf2_read_abbrevs): Update call.
10977 (read_partial_die): Use dwarf2_per_objfile from cu.
10978 (find_partial_die): Likewise.
10979 (fixup_partial_die): Likewise.
10980 (read_attribute_value): Likewise.
10981 (read_indirect_string_at_offset_from): Add objfile parameter.
10982 (read_indirect_string_at_offset): Add dwarf2_per_objfile
10984 (read_indirect_string_from_dwz): Add objfile parameter.
10985 (read_indirect_string): Add objfile parameter.
10986 (read_addr_index_1): Add dwarf2_per_objfile parameter.
10987 (read_addr_index): Use dwarf2_per_objfile from cu.
10988 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10990 (read_str_index): Use dwarf2_per_objfile from cu.
10991 (get_debug_line_section): Likewise.
10992 (read_formatted_entries): Add dwarf2_per_objfile parameter.
10993 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
10994 (new_symbol_full): Use dwarf2_per_objfile from cu.
10995 (build_error_marker_type): Likewise.
10996 (lookup_die_type): Likewise.
10997 (determine_prefix): Likewise.
10998 (follow_die_offset): Likewise.
10999 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11000 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11001 (dwarf2_fetch_die_type_sect_off): Likewise.
11002 (dwarf2_get_die_type): Likewise.
11003 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11004 (get_signatured_type): Likewise.
11005 (get_DW_AT_signature_type): Likewise.
11006 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11007 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11008 (cu_debug_loc_section): Likewise.
11009 (fill_in_loclist_baton): Likewise.
11010 (dwarf2_symbol_mark_computed): Likewise.
11011 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11012 dwarf2_per_objfile.
11013 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11015 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11016 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11017 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11018 (set_die_type): Use dwarf2_free_objfile from cu.
11019 (get_die_type_at_offset): Likewise.
11020 (dwarf2_per_objfile_free): Don't assign global variable.
11021 (debug_names) <constructor>: Add dwarf2_per_objfile
11022 parameter, update m_debugstrlookup construction.
11023 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11025 <m_dwarf2_per_objfile>: New field.
11026 <lookup>: Use m_dwarf2_per_objfile.
11027 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11028 (psyms_seen_size): Likewise.
11029 (write_gdbindex): Replace objfile parameter with
11030 dwarf2_per_objfile.
11031 (write_debug_names): Likewise.
11032 (write_psymtabs_to_index): Likewise.
11033 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11036 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11038 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11039 <dwarf2_per_objfile>: New field.
11040 (struct dwarf2_per_cu_data) <objfile>: Remove.
11041 <dwarf2_per_objfile>: New field.
11042 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11044 (create_signatured_type_table_from_index): Likewise.
11045 (create_debug_type_hash_table): Likewise.
11046 (fill_in_sig_entry_from_dwo_entry): Likewise.
11047 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11048 (create_type_unit_group): Assign dwarf2_per_objfile instead of
11050 (create_partial_symtab): Access objfile through
11051 dwarf2_per_objfile.
11052 (process_psymtab_comp_unit_reader): Likewise.
11053 (read_comp_units_from_section): Likewise.
11054 (scan_partial_symbols): Likewise.
11055 (add_partial_symbol): Likewise.
11056 (add_partial_subprogram): Likewise.
11057 (peek_die_abbrev): Likewise.
11058 (fixup_go_packaging): Likewise.
11059 (process_full_comp_unit): Likewise.
11060 (process_full_type_unit): Likewise.
11061 (process_imported_unit_die): Likewise.
11062 (dwarf2_compute_name): Likewise.
11063 (dwarf2_physname): Likewise.
11064 (read_import_statement): Likewise.
11065 (create_cus_hash_table): Assign dwarf2_physname instead of
11067 (read_func_scope): Access objfile through dwarf2_per_objfile.
11068 (read_lexical_block_scope): Likewise.
11069 (read_call_site_scope): Likewise.
11070 (read_variable): Likewise.
11071 (dwarf2_rnglists_process): Likewise.
11072 (dwarf2_ranges_process): Likewise.
11073 (dwarf2_ranges_read): Likewise.
11074 (dwarf2_record_block_ranges): Likewise.
11075 (dwarf2_add_field): Likewise.
11076 (dwarf2_add_member_fn): Likewise.
11077 (read_structure_type): Likewise.
11078 (process_structure_scope): Likewise.
11079 (read_enumeration_type): Likewise.
11080 (read_array_type): Likewise.
11081 (read_common_block): Likewise.
11082 (read_namespace_type): Likewise.
11083 (read_namespace): Likewise.
11084 (read_module_type): Likewise.
11085 (read_tag_pointer_type): Likewise.
11086 (read_tag_ptr_to_member_type): Likewise.
11087 (read_tag_string_type): Likewise.
11088 (read_subroutine_type): Likewise.
11089 (read_typedef): Likewise.
11090 (read_base_type): Likewise.
11091 (attr_to_dynamic_prop): Likewise.
11092 (read_subrange_type): Likewise.
11093 (read_unspecified_type): Likewise.
11094 (load_partial_dies): Likewise.
11095 (read_partial_die): Likewise.
11096 (find_partial_die): Likewise.
11097 (guess_partial_die_structure_name): Likewise.
11098 (fixup_partial_die): Likewise.
11099 (read_attribute_value): Likewise.
11100 (read_addr_index_from_leb128): Likewise.
11101 (dwarf2_read_addr_index): Likewise.
11102 (dwarf2_string_attr): Likewise.
11103 (lnp_state_machine::check_line_address): Likewise.
11104 (dwarf_decode_lines_1): Likewise.
11105 (dwarf_decode_lines): Likewise.
11106 (dwarf2_start_symtab): Likewise.
11107 (var_decode_location): Likewise.
11108 (new_symbol_full): Likewise.
11109 (dwarf2_const_value_data): Likewise.
11110 (dwarf2_const_value_attr): Likewise.
11111 (dwarf2_const_value): Likewise.
11112 (die_type): Likewise.
11113 (die_containing_type): Likewise.
11114 (lookup_die_type): Likewise.
11115 (guess_full_die_structure_name): Likewise.
11116 (anonymous_struct_prefix): Likewise.
11117 (dwarf2_name): Likewise.
11118 (follow_die_ref_or_sig): Likewise.
11119 (follow_die_offset): Likewise.
11120 (follow_die_ref): Likewise.
11121 (dwarf2_fetch_die_loc_sect_off): Likewise.
11122 (dwarf2_fetch_constant_bytes): Likewise.
11123 (dwarf2_fetch_die_type_sect_off): Likewise.
11124 (dwarf2_get_die_type): Likewise.
11125 (follow_die_sig): Likewise.
11126 (decode_locdesc): Likewise.
11127 (dwarf2_per_cu_objfile): Likewise.
11128 (dwarf2_per_cu_text_offset): Likewise.
11129 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11131 (set_die_type): Access objfile through
11132 dwarf2_per_objfile.
11134 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11136 * valprint.c (converted_character_d): Remove typedef.
11137 (DEF_VEC_O (converted_character_d)): Remove.
11138 (count_next_character): Use std::vector.
11139 (print_converted_chars_to_obstack): Likewise.
11140 (generic_printstr): Likewise.
11142 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11144 * xml-support.h (struct gdb_xml_value): Add constructor.
11145 <value>: Change type to unique_xmalloc_ptr.
11146 (gdb_xml_value_s): Remove typedef.
11147 (DEF_VEC_O (gdb_xml_value_s)): Remove.
11148 (gdb_xml_element_start_handler): Change parameter type to
11150 (xml_find_attribute): Likewise.
11151 * xml-support.c (xml_find_attribute): Change parameter type to
11152 std::vector and adjust.
11153 (gdb_xml_values_cleanup): Remove.
11154 (gdb_xml_parser::start_element): Adjust to std::vector.
11155 (xinclude_start_include): Change paraeter type to std::vector
11157 * btrace.c (check_xml_btrace_version): Likewise.
11158 (parse_xml_btrace_block): Likewise.
11159 (parse_xml_btrace_pt_config_cpu): Likewise.
11160 (parse_xml_btrace_pt): Likewise.
11161 (parse_xml_btrace_conf_bts): Likewise.
11162 (parse_xml_btrace_conf_pt): Likewise.
11163 * memory-map.c (memory_map_start_memory): Likewise.
11164 (memory_map_start_property): Likewise.
11165 * osdata.c (osdata_start_osdata): Likewise.
11166 (osdata_start_item): Likewise.
11167 (osdata_start_column): Likewise.
11168 * remote.c (start_thread): Likewise.
11169 * solib-aix.c (library_list_start_library): Likewise.
11170 (library_list_start_list): Likewise.
11171 * solib-svr4.c (library_list_start_library): Likewise.
11172 (svr4_library_list_start_list): Likewise.
11173 * solib-target.c (library_list_start_segment): Likewise.
11174 (library_list_start_section): Likewise.
11175 (library_list_start_library): Likewise.
11176 (library_list_start_list): Likewise.
11177 * tracepoint.c (traceframe_info_start_memory): Likewise.
11178 (traceframe_info_start_tvar): Likewise.
11179 * xml-syscall.c (syscall_start_syscall): Likewise.
11180 * xml-tdesc.c (tdesc_start_target): Likewise.
11181 (tdesc_start_feature): Likewise.
11182 (tdesc_start_reg): Likewise.
11183 (tdesc_start_union): Likewise.
11184 (tdesc_start_struct): Likewise.
11185 (tdesc_start_flags): Likewise.
11186 (tdesc_start_enum): Likewise.
11187 (tdesc_start_field): Likewise.
11188 (tdesc_start_enum_value): Likewise.
11189 (tdesc_start_vector): Likewise.
11191 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11193 * extension.h (struct xmethod_worker) <clone>: Remove.
11194 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11196 (python_xmethod_worker::clone): Remove.
11197 * valops.c (find_overload_match): Use std::move instead of
11200 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11202 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11203 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11204 <free_xmethod_worker_data>: Remove.
11205 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11206 <get_xmethod_arg_types>: Remove.
11207 <get_xmethod_result_type>: Remove.
11208 <invoke_xmethod>: Remove.
11209 * extension.c (new_xmethod_worker): Remove.
11210 (clone_xmethod_worker): Remove.
11211 (get_matching_xmethod_workers): Return void, pass std::vector by
11213 (get_xmethod_arg_types): Rename to...
11214 (xmethod_worker::get_arg_types): ... this, and adjust.
11215 (get_xmethod_result_type): Rename to...
11216 (xmethod_worker::get_result_type): ... this, and adjust.
11217 (invoke_xmethod): Remove.
11218 (free_xmethod_worker): Remove.
11219 (free_xmethod_worker_vec): Remove.
11220 * extension.h (enum ext_lang_rc): Move here from
11222 (struct xmethod_worker): Add constructor and destructor.
11225 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11226 virtual pure methods.
11227 <get_arg_types, get_result_type>: New methods.
11228 (xmethod_worker_ptr): Remove typedef.
11229 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11230 (xmethod_worker_vec): Remove typedef.
11231 (xmethod_worker_up): New typedef.
11232 (invoke_xmethod): Remove.
11233 (clone_xmethod_worker): Remove.
11234 (free_xmethod_worker): Remove.
11235 (free_xmethod_worker_vec): Remove.
11236 (get_xmethod_arg_types): Remove.
11237 (get_xmethod_result_type): Remove.
11238 * valops.c (find_method_list): Use std::vector, don't use
11239 intermediate vector.
11240 (value_find_oload_method_list): Use std::vector.
11241 (find_overload_match): Use std::vector.
11242 (find_oload_champ): Use std::vector.
11243 * value.c (value_free): Use operator delete.
11244 (value_of_xmethod): Rename to...
11245 (value_from_xmethod): ... this. Don't assign
11246 xmethod_worker::value, take rvalue-reference.
11247 (result_type_of_xmethod): Adjust.
11248 (call_xmethod): Adjust.
11249 * value.h: Include extension.h.
11250 (struct xmethod_worker): Don't forward-declare.
11251 (value_of_xmethod): Rename to...
11252 (value_from_xmethod): ... this, take rvalue-reference.
11253 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11254 (struct python_xmethod_worker): ... this, add constructor and
11256 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11257 (gdbpy_free_xmethod_worker_data): Rename to...
11258 (python_xmethod_worker::~python_xmethod_worker): ... this and
11260 (gdbpy_clone_xmethod_worker_data): Rename to...
11261 (python_xmethod_worker::clone): ... this and adjust.
11262 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11264 (gdbpy_get_xmethod_arg_types): Rename to...
11265 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11266 (gdbpy_get_xmethod_result_type): Rename to...
11267 (python_xmethod_worker::do_get_result_type): ... this and
11269 (gdbpy_invoke_xmethod): Rename to...
11270 (python_xmethod_worker::invoke): ... this and adjust.
11271 (new_python_xmethod_worker): Rename to...
11272 (python_xmethod_worker::python_xmethod_worker): ... this and
11274 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11276 (gdbpy_free_xmethod_worker_data): Remove.
11277 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11278 (gdbpy_get_xmethod_arg_types): Remove.
11279 (gdbpy_get_xmethod_result_type): Remove.
11280 (gdbpy_invoke_xmethod): Remove.
11281 * python/python.c (python_extension_ops): Remove obsolete
11284 2018-01-05 Pedro Alves <palves@redhat.com>
11287 * common/signals-state-save-restore.c
11288 (save_original_signals_state): New parameter 'quiet'. Warn if we
11289 find a custom handler preinstalled, instead of internal erroring.
11290 But only warn if !quiet.
11291 * common/signals-state-save-restore.h
11292 (save_original_signals_state): New parameter 'quiet'.
11293 * main.c (captured_main_1): Move save_original_signals_state call
11294 after option handling, and pass QUIET.
11296 2018-01-05 Pedro Alves <palves@redhat.com>
11298 * spu-tdep.c (spu_catch_start): Pass
11299 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11301 2018-01-05 Pedro Alves <palves@redhat.com>
11304 * ada-lang.c (literal_symbol_name_matcher): New function.
11305 (ada_get_symbol_name_matcher): Use it for
11306 symbol_name_match_type::SEARCH_NAME.
11307 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11308 it down instead of assuming symbol_name_match_type::FULL.
11309 * block.h (block_lookup_symbol): New parameter 'match_type'.
11310 * c-valprint.c (print_unpacked_pointer): Use
11311 lookup_symbol_search_name instead of lookup_symbol.
11312 * compile/compile-object-load.c (get_out_value_type): Pass down
11313 symbol_name_match_type::SEARCH_NAME.
11314 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11315 symbol_name_match_type::FULL.
11316 * cp-support.c (cp_get_symbol_name_matcher): Handle
11317 symbol_name_match_type::SEARCH_NAME.
11318 * infrun.c (insert_exception_resume_breakpoint): Use
11319 lookup_symbol_search_name.
11320 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11321 * psymtab.c (maintenance_check_psymtabs): Use
11322 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11323 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11324 SYMBOL_SEARCH_NAME.
11325 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11326 if symbol_name_match_type::SEARCH_NAME.
11327 (lookup_symbol_in_language): Pass down
11328 symbol_name_match_type::FULL.
11329 (lookup_symbol_search_name): New.
11330 (lookup_language_this): Pass down
11331 symbol_name_match_type::SEARCH_NAME.
11332 (lookup_symbol_aux, lookup_local_symbol): New parameter
11333 'match_type'. Pass it down.
11334 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11335 (lookup_symbol_search_name): New declaration.
11336 (lookup_symbol_in_block): New 'match_type' parameter.
11338 2018-01-05 Pedro Alves <palves@redhat.com>
11341 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11343 (ada_lookup_symbol): Reimplement in terms of
11344 ada_lookup_symbol_list, bits factored out from
11345 ada_lookup_encoded_symbol.
11347 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11349 * ada-exp.y (write_object_renaming): When subscripting an array
11350 using a symbol as the index, pass the block in call to
11351 ada_lookup_encoded_symbol when looking that symbol up.
11353 2018-01-05 Jerome Guitton <guitton@adacore.com>
11355 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11358 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11360 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11361 the case where VALUE_LVAL (val0) is not lval_memory.
11363 2018-01-05 Xavier Roirand <roirand@adacore.com>
11365 * ada-valprint.c (print_optional_low_bound): Handle
11366 character-indexed array printing like boolean-indexed array
11369 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11371 * NEWS: Create a new section for the next release branch.
11372 Rename the section of the current branch, now that it has
11375 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11377 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11378 * version.in: Bump version to 8.1.50.DATE-git.
11380 2018-01-03 Xavier Roirand <roirand@adacore.com>
11382 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11384 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11386 (default_exception_support_info) <catch_handlers_sym>: Add field.
11387 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11388 (ada_exception_name_addr_1): Add "catch handlers" handling.
11389 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11390 Update all callers.
11391 (create_excep_cond_exprs) <ex>: Add parameter.
11392 (re_set_exception): Update create_excep_cond_exprs call.
11393 (print_it_exception, print_one_exception, print_mention_exception)
11394 (print_recreate_exception): Add "catch handler" handling.
11395 (allocate_location_catch_handlers, re_set_catch_handlers)
11396 (check_status_catch_handlers, print_it_catch_handlers)
11397 (print_one_catch_handlers, print_mention_catch_handlers)
11398 (print_recreate_catch_handlers): New function.
11399 (catch_handlers_breakpoint_ops): New variable.
11400 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11401 Add parameter. Add "catch handler" handling.
11402 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11403 Add "catch handler" handling.
11404 (ada_exception_catchpoint_cond_string): Add "catch handler"
11406 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11408 (catch_ada_handlers_command): New function.
11409 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11410 operations structure.
11411 (_initialize_ada_language): Add "catch handlers" command entry.
11412 * NEWS: Document "catch handlers" feature.
11414 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11416 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11417 account when creating the array type of the slice.
11418 (ada_value_slice): Likewise.
11420 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11422 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11424 (create_array_type_with_stride): Add byte_stride_prop parameter.
11425 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11426 New parameter. Update all callers in this file.
11427 (array_type_has_dynamic_stride): New function.
11428 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11429 of arrays with dynamic byte strides.
11430 * dwarf2read.c (read_array_type): Add support for dynamic
11431 DW_AT_byte_stride attributes.
11433 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11435 * dwarf2read.c (read_unspecified_type): Treat
11436 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11438 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11440 Update copyright year range in all GDB files.
11442 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11444 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11445 and gdb/testsuite/gdb.base/step-line.c.
11447 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11449 * copyright.py (main): Dump the contents of
11450 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11451 even if BY_HAND is empty.
11453 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11455 * top.c (print_gdb_version): Update Copyright year in version
11458 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11460 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11462 For older changes see ChangeLog-2017.
11468 version-control: never