1 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
3 * valarith.c (value_subscripted_rvalue): If an array is not in
4 memory, and we don't know the upper bound, then we can't know that
5 the requested element exists or not.
7 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
9 * target.c (str_comma_list_concat_elem): Fix typo in comment.
10 (target_options_to_string): Add comment.
12 2018-08-08 Tom Tromey <tom@tromey.com>
14 * unittests/scoped_mmap-selftests.c: Check result of "write".
16 2018-08-08 Jim Wilson <jimw@sifive.com>
18 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
19 (decode_register_index_short): New.
20 (decode_j_type_insn, decode_cj_type_insn): New.
21 (decode_b_type_insn, decode_cb_type_insn): New.
22 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
23 local xlen. Check xlen when decoding ambiguous compressed insns. In
24 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
25 is_c_sw_insn instead of is_sw_insn.
26 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
27 (riscv_software_single_step): New.
28 * riscv-tdep.h (riscv_software_single_step): Declare.
30 * riscv-tdep.c (riscv_isa_xlen): Drop static.
31 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
33 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
36 * target.c (dispose_inferior): Don't dispose of inferiors that are
39 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
41 * remote.c (remote_target::download_tracepoint): Change char* to
44 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
46 * target.h (target_options_to_string): Return an std::string.
47 * target.c (str_comma_list_concat_elem): Return void, use
49 (do_option): Likewise.
50 (target_options_to_string): Return an std::string.
51 * linux-nat.c (linux_nat_target::wait): Adjust.
52 * target-debug.h (target_debug_print_options): Adjust.
54 2018-08-07 Tom Tromey <tom@tromey.com>
56 * Makefile.in (CPPFLAGS): New variable.
57 (INTERNAL_CPPFLAGS): Use it.
59 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
61 * NEWS: Mention the index cache.
63 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
65 * common/pathstuff.h (get_standard_cache_dir): New.
66 * common/pathstuff.c (get_standard_cache_dir): New.
67 * build-id.h (build_id_to_string): New.
68 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
69 DEBUG_STR_SUFFIX): Move to here.
70 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
71 DEBUG_STR_SUFFIX): Move from there.
72 (write_psymtabs_to_index): Make non-static, add basename
73 parameter. Write to temporary files, rename when done.
74 (save_gdb_index_command): Adjust call to
75 write_psymtabs_to_index.
76 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
78 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
79 (get_gdb_index_contents_from_cache): New.
80 (get_gdb_index_contents_from_cache_dwz): New.
81 (dwarf2_initialize_objfile): Read index from cache.
82 (dwarf2_build_psymtabs): Save to index.
83 * dwarf-index-cache.h: New file.
84 * dwarf-index-cache.c: New file.
85 * dwarf-index-write.h: New file.
87 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
89 * gnulib/aclocal.m4: Re-generate.
90 * gnulib/config.in: Re-generate.
91 * gnulib/configure: Re-generate.
92 * gnulib/import/Makefile.am: Re-generate.
93 * gnulib/import/Makefile.in: Re-generate.
94 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
95 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
96 * gnulib/import/m4/mkdir.m4: New file.
97 * gnulib/import/mkdir.c: New file.
98 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
101 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
103 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
104 * common/scoped_mmap.c: New file.
105 * common/scoped_mmap.h (destroy): New method.
106 (~scoped_mmap, reset): Use destroy.
107 (scoped_mmap): New move constructor.
108 (mmap_file): New declaration.
109 * unittests/scoped_mmap-selftests.c (test_normal,
110 test_invalid_filename, run_tests): New functions.
111 (_initialize_scoped_mmap_selftests): Register selftest.
113 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
115 * dwarf2read.c (read_gdb_index_from_section): Rename to...
116 (read_gdb_index_from_buffer): ... this. Remove section
117 parameter, add buffer parameter.
118 (get_gdb_index_contents_ftype,
119 get_gdb_index_contents_dwz_ftype): New typedefs.
120 (dwarf2_read_gdb_index): Add callback parameters to get the
122 (get_gdb_index_contents_from_section): New.
123 (dwarf2_initialize_objfile): Update call to
124 dwarf2_read_gdb_index.
126 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
128 * common/filestuff.h (gdb_fopen_cloexec): New overload.
129 (gdb_open_cloexec): Likewise.
130 * nat/linux-osdata.c (command_from_pid): Use string_printf.
131 (commandline_from_pid): Likewise.
132 (linux_xfer_osdata_threads): Likewise.
133 (linux_xfer_osdata_fds): Likewise.
134 * ada-lang.c (is_package_name): Likewise.
135 * auxv.c (procfs_xfer_auxv): Likewise.
136 * breakpoint.c (print_one_breakpoint_location): Use
138 (print_one_catch_solib): Use string_printf.
139 * coff-pe-read.c (add_pe_exported_sym): Likewise.
140 (add_pe_forwarded_sym): Likewise.
141 * dwarf2read.c (create_type_unit_group): Likewise.
142 (build_error_marker_type): Likewise.
143 * infcall.c (get_function_name): Likewise.
144 * valprint.c (print_converted_chars_to_obstack): Likewise.
145 * xtensa-tdep.c (xtensa_register_type): Likewise.
147 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
149 * remote.c (remote_target::download_tracepoint): Fix format
152 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
154 * tracefile.c: Include common/byte-vector.h.
155 (trace_save): Change type of buf to gdb::byte_vector. Initialize
156 with trace_regblock_size if needed. Update uses of buf.
158 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
160 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
161 std::vector<unsigned char>.
162 * tracepoint.c (collection_list::collection_list): Remove
163 m_regs_mask initializer from initializer list. Resize
164 m_regs_mask using the largest remote register number.
165 (collection_list::add_remote_register): Remove size check on
166 m_regs_mask. Use at to access element.
167 (collection_list::stringify): Change type of temp_buf to
168 gdb::char_vector. Update uses of temp_buf. Resize if needed to
169 stringify the register mask. Use pack_hex_byte for the register
172 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
174 * tracepoint.h (class collection_list) <add_register>: Remove.
175 <add_remote_register, add_ax_registers, add_local_register>:
177 <add_memrange>: Add scope parameter.
178 * tracepoint.c (encode_actions_1): Likewise.
179 (collection_list::add_register): Rename to ...
180 (collection_list::add_remote_register): ... this. Update
182 (collection_list::add_ax_registers, add_local_register): New
184 (collection_list::add_memrange): Add scope parameter. Call
185 add_local_register instead of add_register.
186 (finalize_tracepoint_aexpr): New function.
187 (collection_list::collect_symbol): Update calls to add_memrange.
188 Call add_local_register instead of add_register. Call
189 add_ax_registers. Call finalize_tracepoint_aexpr.
190 (encode_actions_1): Get remote regnos for $reg action. Call
191 add_remote_register, add_ax_registers, and add_local_register.
192 Update call to add_memrange. Call finalize_tracepoint_aexpr.
193 (validate_actionline): Call finalize_tracepoint_aexpr.
195 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
197 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
198 Replace array buf with gdb::char_vector buf, of size
199 get_remote_packet_size (). Replace references to buf and
200 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
201 and xsnprintf with snprintf. Raise errors if the buffer is too
204 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
206 * remote.c (remote_target::download_tracepoint): Fix the has_more
207 predicate in the QTDP action list iteration.
209 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
211 * remote.c (remote_target::download_tracepoint): Fix indentation
214 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
216 * proc-api.c (_initialize_proc_api): Remove c, unused.
217 * procfs.c (procfs_init_inferior): Remove signals, unused.
218 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
221 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
222 Andrew Burgess <andrew.burgess@embecosm.com>
224 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
225 'W_STOPCODE (0)' as this could be ambiguous.
227 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
229 * ser-tcp.c (net_open): Fix thinko when deciding whether to
230 disable TCP's Nagle algorithm (use "ai_protocol" instead of
233 2018-08-02 Tom Tromey <tom@tromey.com>
236 * dwarf2read.c (read_func_scope): Set symtab on template parameter
238 (process_structure_scope): Likewise.
240 2018-08-02 Xavier Roirand <roirand@adacore.com>
243 * darwin-nat.c (darwin_kill_inferior): Fix handling of
246 2018-08-02 Tom Tromey <tom@tromey.com>
248 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
249 (darwin_suspend_inferior, darwin_resume_inferior)
250 (darwin_decode_notify_message, darwin_resume_inferior_threads)
251 (darwin_check_new_threads): Check result of get_darwin_inferior.
253 2018-07-31 Joel Brobecker <brobecker@adacore.com>
257 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
259 * varobj.c (varobj_get_path_expr_parent): Report an error if
260 parent is a dynamic varobj.
262 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
264 * gnulib/aclocal.m4: Re-generate.
265 * gnulib/config.in: Re-generate.
266 * gnulib/configure: Re-generate.
267 * gnulib/import/Makefile.in: Re-generate.
268 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
269 * gnulib/import/m4/onceonly.m4: Re-generate.
271 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
273 * target-descriptions.c (struct xml_test_tdesc): New.
274 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
275 (record_xml_tdesc): Update.
276 (maintenance_check_xml_descriptions): Update.
277 * target-descriptions.h (record_xml_tdesc): Update comment.
279 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
281 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
282 checking array bounds are defined.
284 2018-07-30 Tom Tromey <tom@tromey.com>
286 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
287 irreflexivity violation.
289 2018-07-30 Tom Tromey <tom@tromey.com>
291 * cli/cli-decode.c (lookup_cmd): Remove lint code.
292 * value.c (unpack_long): Remove lint code.
293 * valops.c (value_ind): Remove lint code.
294 * valarith.c (value_x_binop, value_x_unop, value_equal)
295 (value_pos): Remove lint code.
297 2018-07-28 Tom de Vries <tdevries@suse.de>
299 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
300 with undefined upper bound as <optimized out>.
302 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
304 * gcore.in: Rename variable "name" to "prefix". Expand
307 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
309 * windows-nat.c (windows_nat_target::create_inferior): Update to
310 call close() in global namespace.
312 2018-07-26 Tom Tromey <tom@tromey.com>
314 * dwarf-index-write.c (add_address_entry): Don't add objfile
316 * dbxread.c (find_stab_function): Rename from
317 find_stab_function_addr. Return a bound_minimal_symbol.
318 (read_dbx_symtab): Use raw_text_low, raw_text_high.
319 Don't add objfile offsets.
320 (end_psymtab): Use raw_text_low, raw_text_high,
321 MSYMBOL_VALUE_RAW_ADDRESS.
322 (read_ofile_symtab): Update.
323 (process_one_symbol): Update.
324 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
326 (dw2_relocate): Remove.
327 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
329 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
331 (process_psymtab_comp_unit_reader, add_partial_symbol)
332 (add_partial_subprogram, dwarf2_ranges_read): Update.
333 (load_partial_dies): Update.
334 (add_address_entry): Don't add objfile offsets.
335 (dwarf2_build_include_psymtabs): Update.
336 (create_addrmap_from_aranges): Don't add objfile offsets.
337 (dw2_find_pc_sect_compunit_symtab): Update.
338 * mdebugread.c (parse_symbol): Don't add objfile offsets.
339 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
341 (parse_partial_symbols): Don't add objfile offsets. Use
342 raw_text_low, raw_text_high. Update.
343 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
344 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
345 or call 'relocate' quick function. Clear psymbol_map.
346 * psympriv.h (struct partial_symbol) <address>: Add section
348 <set_unrelocated_address>: Rename from set_address.
349 <raw_text_low, raw_text_high>: New methods.
350 <text_low, text_high>: Add objfile parameter.
351 (add_psymbol_to_bcache): Add 'section' parameter. Call
352 set_unrelocated_address.
353 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
354 (find_pc_psymbol): Update.
355 (fixup_psymbol_section, relocate_psymtabs): Remove.
356 (dump_psymtab, psym_functions): Update.
357 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
359 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
360 (start_psymtab_common): Update.
361 * symfile-debug.c (debug_qf_relocate): Remove.
362 (debug_sym_quick_functions): Update.
363 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
364 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
367 2018-07-26 Tom Tromey <tromey@redhat.com>
369 * dbxread.c (end_psymtab): Use text_high_valid and
371 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
372 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
373 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
375 <text_low_valid, text_high_valid>: New fields.
376 <set_text_low, set_text_high>: Update.
377 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
379 2018-07-26 Tom Tromey <tom@tromey.com>
381 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
383 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
384 textlow and texthigh fields.
385 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
387 * mdebugread.c (parse_lines, parse_partial_symbols)
388 (psymtab_to_symtab_1): Update.
389 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
390 Rename fields. Update comment. Now private.
391 <text_low, text_high, set_text_low, set_text_high>: New methods.
392 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
393 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
394 (start_psymtab_common, maintenance_info_psymtabs)
395 (maintenance_check_psymtabs): Update.
396 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
398 (scan_xcoff_symtab): Update.
400 2018-07-26 Tom Tromey <tromey@redhat.com>
402 * psympriv.h (struct partial_symbol) <unrelocated_address,
403 address, set_address>: New methods.
404 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
405 (fixup_psymbol_section, relocate_psymtabs): Update.
406 (print_partial_symbols): Add 'objfile' parameter. Update.
407 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
410 2018-07-26 Tom Tromey <tom@tromey.com>
412 * dwarf-index-write.c (write_psymbols, debug_names::insert)
413 (debug_names::write_psymbols): Update.
414 * psympriv.h (struct partial_symbol): Derive from
416 <obj_section>: New method.
417 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
418 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
419 (find_pc_sect_psymbol, fixup_psymbol_section)
420 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
421 (print_partial_symbols, recursively_search_psymtabs)
422 (compare_psymbols, psymbol_hash, psymbol_compare)
423 (add_psymbol_to_bcache, maintenance_check_psymtabs)
424 (psymbol_name_matches, psym_fill_psymbol_map): Update.
426 2018-07-26 Tom Tromey <tromey@redhat.com>
428 * dbxread.c (end_psymtab): Remove dead code.
430 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
432 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
433 DWARF unwinders are disabled.
434 * dwarf2-frame.c: Add dwarf2read.h include.
435 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
437 (dwarf2_frame_unwinders_enabled_p): Define.
438 (show_dwarf_unwinders_enabled_p): New function.
439 (_initialize_dwarf2_frame): Register switch to control DWARF
441 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
442 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
443 (show_dwarf_cmdlist): Remove static keyword.
444 * dwarf2read.h (set_dwarf_cmdlist): Declare.
445 (show_dwarf_cmdlist): Declare.
446 * NEWS: Document new feature.
448 2018-07-26 Tom de Vries <tdevries@suse.de>
451 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
453 2018-07-26 Tom de Vries <tdevries@suse.de>
455 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
456 DW_AT_count can't be translated to a dynamic prop.
458 2018-07-25 Tom de Vries <tdevries@suse.de>
460 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
463 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
465 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
467 2018-07-25 Joel Brobecker <brobecker@adacore.com>
469 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
471 2018-07-24 Keith Seitz <keiths@redhat.comt
474 * dwarf2read.c (dw2_add_symbol_to_list): New function.
475 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
476 instead of add_symbol_to_list.
477 (read_file_scope): Call prepare_one_comp_unit before reading
480 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
482 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
484 2018-07-24 Tom Tromey <tom@tromey.com>
486 * utils.c (malloc, realloc, free): Don't declare.
487 * configure, config.in: Rebuild.
488 * configure.ac: Don't check for declarations of free, malloc, or
491 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
493 * aarch64-linux-nat.c
494 (aarch64_linux_nat_target::stopped_data_address): Remove unused
496 * arm-linux-nat.c (fetch_regs): Likewise.
497 (store_regs): Likewise.
498 (fetch_vfp_regs): Likewise.
499 (store_vfp_regs): Likewise.
500 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
501 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
502 (arm_linux_nat_target::insert_watchpoint): Likewise.
503 (arm_linux_nat_target::remove_watchpoint): Likewise.
504 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
506 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
508 * ppc-linux-nat.c (fetch_register): Likewise.
509 (fetch_all_gp_regs): Likewise.
510 (fetch_ppc_registers): Likewise.
511 (store_all_gp_regs): Likewise.
512 (store_ppc_registers): Likewise.
513 (hwdebug_insert_point): Likewise.
514 (can_use_watchpoint_cond_accel): Likewise.
515 * remote-sim.c (gdb_os_write_stdout): Likewise.
517 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
518 Tom Tromey <tom@tromey.com>
520 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
522 * configure: Rebuild.
524 2018-07-22 Tom Tromey <tom@tromey.com>
526 * regformats/regdat.sh: Define xmltarget_${name} inside
527 #ifndef IN_PROCESS_AGENT.
529 2018-07-22 Tom Tromey <tom@tromey.com>
531 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
533 2018-07-22 Tom Tromey <tom@tromey.com>
535 * symfile.c (reread_symbols): Notify iter, not objfile.
537 2018-07-22 Tom Tromey <tom@tromey.com>
539 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
541 (ravenscar_thread_target::prepare_to_store): Likewise.
543 2018-07-22 Tom Tromey <tom@tromey.com>
545 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
546 unused variable. Call value_fetch_lazy when needed.
547 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
548 Remove unused variable. Call value_fetch_lazy when needed.
550 2018-07-22 Tom Tromey <tom@tromey.com>
552 * m32c-tdep.c (mark_dma): Return void.
553 (make_regs): Remove unused declarations.
555 2018-07-22 Tom Tromey <tom@tromey.com>
557 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
558 cmdscm_get_valid_command_smob_arg_unsafe for effect.
559 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
560 bkscm_get_valid_block_smob_arg_unsafe for effect.
562 2018-07-22 Tom Tromey <tom@tromey.com>
564 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
567 2018-07-22 Tom Tromey <tom@tromey.com>
569 * windows-nat.c (saved_context): Conditionally define.
570 * remote.c (remote_target::remote_btrace_maybe_reopen):
571 Conditionally declare "warned".
572 * inflow.c (sigquit_ours): Conditionally define.
573 (new_tty): Move "tty" declaration inside #if.
574 * guile/guile.c (guile_datadir): Conditionally define.
575 * charset.c (set_be_le_names): Move some declarations inside #if.
576 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
578 (parse_xml_btrace_conf): Likewise.
580 2018-07-22 Tom Tromey <tom@tromey.com>
582 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
584 2018-07-22 Tom Tromey <tom@tromey.com>
586 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
587 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
588 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
589 * buildsym-legacy.c (get_macro_table): Remove unused variable.
590 * stack.c (frame_apply_level_command): Remove unused variable.
591 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
592 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
593 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
595 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
596 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
597 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
599 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
600 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
602 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
603 Remove unused variable.
604 * cli/cli-script.c (recurse_read_control_structure): Remove unused
606 * common/tdesc.c (print_xml_feature::visit): Remove unused
608 * compile/compile-object-load.c (store_regs): Remove unused
610 * complaints.c (clear_complaints): Remove unused variable.
611 * corelow.c (core_target_open): Remove unused variable.
612 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
614 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
616 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
618 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
620 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
622 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
624 * ia64-tdep.c (examine_prologue): Remove unused variable.
625 * infcall.c (run_inferior_call): Remove unused variable.
626 * inferior.c (exit_inferior): Remove unused variable.
627 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
628 * linespec.c (decode_line_2): Remove unused variable.
629 * linux-nat.c (super_close): Remove.
630 * linux-tdep.c (linux_info_proc): Remove unused variable.
631 * mi/mi-main.c (mi_execute_command): Remove unused variable.
632 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
633 Remove unused variable.
634 * parse.c (find_minsym_type_and_address): Remove unused variable.
635 * printcmd.c (info_symbol_command, printf_floating): Remove unused
637 * python/py-breakpoint.c (bppy_set_commands): Remove unused
639 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
641 * record-btrace.c (record_btrace_target::store_registers): Remove
643 (cmd_show_record_btrace_cpu): Remove unused variable.
644 * riscv-tdep.c (riscv_register_reggroup_p)
645 (riscv_push_dummy_call, riscv_return_value): Remove unused
647 * rust-exp.y (literal): Remove unused variable.
648 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
650 <STRUCTOP_ANONYMOUS>: Likewise.
651 * s390-linux-tdep.c (s390_linux_init_abi_31)
652 (s390_linux_init_abi_64): Remove unused variable.
653 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
654 (file_select_thread, net_windows_open, _initialize_ser_windows):
655 Remove unused variables.
656 * symtab.c (find_pc_sect_line): Remove unused variable.
657 * target-memory.c (compute_garbled_blocks): Remove unused
659 (target_write_memory_blocks): Remove unused variable.
660 * target.c (target_stack::unpush): Remove unused variables.
661 * tracepoint.c (start_tracing, all_tracepoint_actions)
662 (merge_uploaded_trace_state_variables)
663 (print_one_static_tracepoint_marker): Remove unused variable.
664 * unittests/basic_string_view/element_access/char/1.cc (test01):
665 Remove unused variable.
666 * windows-nat.c (windows_continue, windows_add_all_dlls)
667 (do_initial_windows_stuff, windows_nat_target::create_inferior):
668 Remove unused variables.
670 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
672 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
673 attr_profile in HAVE_ELF.
674 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
677 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
679 * frame.c (frame_register_unwind): Change parameter name.
680 (frame_unwind_register): Likewise.
681 (frame_unwind_register_value): Likewise.
682 (frame_unwind_register_signed): Likewise.
683 (frame_unwind_register_unsigned): Likewise.
684 * frame.h (frame_register_unwind): Likewise.
685 (frame_unwind_register): Likewise.
686 (frame_unwind_register_value): Likewise.
687 (frame_unwind_register_signed): Likewise.
688 (frame_unwind_register_unsigned): Likewise.
689 (frame_unwind_arch): Likewise.
691 2018-07-20 Maciej W. Rozycki <macro@mips.com>
693 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
696 2018-07-20 Maciej W. Rozycki <macro@mips.com>
698 * mips-linux-nat.c (mips_linux_nat_target::read_description):
699 Call `get_ptrace_pid' rather than extracting the ptrace PID by
702 2018-07-20 Keith Seitz <keiths@redhat.com>
704 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
705 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
706 m_compunit_symtab, m_language>: Add "m_" prefix.
708 * buildsym.c: Update all uses.
710 2018-07-20 Tom Tromey <tom@tromey.com>
712 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
713 * buildsym.h (record_line_ftype): Remove typedef.
715 2018-07-20 Tom Tromey <tom@tromey.com>
717 * buildsym-legacy.h (augment_type_symtab): Don't declare.
718 (end_expandable_symtab): Likewise.
719 (end_symtab_get_static_block): Likewise.
720 (end_symtab_from_static_block): Likewise.
721 * buildsym-legacy.c (augment_type_symtab): Remove.
722 (end_expandable_symtab): Remove.
723 (end_symtab_get_static_block): Remove.
724 (end_symtab_from_static_block): Remove.
726 2018-07-20 Tom Tromey <tom@tromey.com>
728 * dwarf2read.c: Include buildsym.h.
729 (struct dwarf2_cu) <builder>: New method.
730 (fixup_go_packaging): Update.
731 (process_full_comp_unit, process_full_type_unit): Update. Don't
732 use scoped_free_pendings.
733 (using_directives): Add "cu" parameter, remove "language".
734 (read_import_statement, setup_type_unit_groups, )
735 (read_func_scope, read_lexical_block_scope)
736 (dwarf2_record_block_ranges, read_namespace): Update.
737 (lnp_state_machine::lnp_state_machine): Add cu parameter.
738 (lnp_state_machine::handle_end_sequence): Update.
739 (class lnp_state_machine) <m_cu>: New member.
740 <m_record_line_callback>: Remove.
741 <m_currently_recording_lines>: New member.
742 (lnp_state_machine::handle_set_file): Update.
743 (noop_record_line): Remove.
744 (dwarf_record_line_p): Add cu parameter.
745 (dwarf_record_line_1, dwarf_finish_line): Likewise.
746 (lnp_state_machine::record_line)
747 (lnp_state_machine::lnp_state_machine)
748 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
749 (dwarf_decode_lines): Update.
750 (dwarf2_start_subfile): Add cu parameter.
751 (dwarf2_start_symtab, new_symbol): Update.
752 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
753 Remove dwarf2_per_objfile parameter.
754 (dwarf_decode_macros): Update.
756 2018-07-20 Tom Tromey <tom@tromey.com>
758 * stabsread.c (define_symbol): Update.
759 * buildsym-legacy.h (get_buildsym_compunit): Declare.
760 * dwarf2read.c (new_symbol): Update.
761 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
762 * cp-namespace.c: Include buildsym.h.
763 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
764 * buildsym-legacy.c (get_buildsym_compunit): New function.
766 2018-07-20 Tom Tromey <tom@tromey.com>
768 * xcoffread.c: Include buildsym-legacy.h.
769 * windows-nat.c: Include buildsym-legacy.h.
770 * stabsread.c: Include buildsym-legacy.h.
771 * mdebugread.c: Include buildsym-legacy.h.
772 * buildsym-legacy.h: New file.
773 * buildsym-legacy.c: New file, from buildsym.c.
774 * go32-nat.c: Include buildsym-legacy.h.
775 * dwarf2read.c: Include buildsym-legacy.h.
776 * dbxread.c: Include buildsym-legacy.h.
777 * cp-namespace.c: Include buildsym-legacy.h.
778 * coffread.c: Include buildsym-legacy.h.
779 * buildsym.h: Move some contents to buildsym-legacy.h.
780 * buildsym.c: Include buildsym-legacy.h. Move many functions to
782 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
784 2018-07-20 Tom Tromey <tom@tromey.com>
786 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
787 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
788 (buildsym_compunit::buildsym_compunit)
789 (buildsym_compunit::~buildsym_compunit)
790 (buildsym_compunit::get_macro_table): Define.
792 2018-07-20 Tom Tromey <tom@tromey.com>
794 * buildsym.c (reset_symtab_globals): Remove.
795 (buildsym_compunit::end_symtab_from_static_block): Update.
796 (buildsym_compunit::augment_type_symtab): Update.
797 (end_symtab_from_static_block): Call free_buildsym_compunit.
798 (augment_type_symtab, end_symtab, end_expandable_symtab):
801 2018-07-20 Tom Tromey <tom@tromey.com>
803 * arch-utils.c: Do not include buildsym.h.
804 * mipsread.c: Do not include buildsym.h.
805 * machoread.c: Do not include buildsym.h.
806 * elfread.c: Do not include buildsym.h.
808 2018-07-20 Tom Tromey <tom@tromey.com>
810 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
812 (buildsym_compunit): Add new constructor.
813 (struct buildsym_compunit) <get_last_source_file, finish_block,
814 record_block_range, start_subfile, patch_subfile_names,
815 push_subfile, pop_subfile, record_line, get_compunit_symtab,
816 set_last_source_start_addr, get_last_source_start_addr,
817 get_local_using_directives, set_local_using_directives,
818 get_global_using_directives, outermost_context_p,
819 get_current_context_stack, get_context_stack_depth,
820 get_current_subfile, get_local_symbols, get_file_symbols,
821 get_global_symbols, record_debugformat, record_producer,
822 push_context, pop_context, end_symtab_get_static_block,
823 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
825 <record_pending_block, finish_block_internal, make_blockvector,
826 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
830 2018-05-22 Tom Tromey <tom@tromey.com>
832 * buildsym.c (record_pending_block): Move earlier. Remove objfile
834 (finish_block_internal): Update.
836 2018-07-20 Tom Tromey <tom@tromey.com>
838 * buildsym.c (record_pending_block): Move earlier. Remove objfile
840 (finish_block_internal): Update.
842 2018-07-20 Tom Tromey <tom@tromey.com>
844 * buildsym.h (EXTERN): Don't define or undef.
845 * buildsym.c (EXTERN): Don't define.
847 2018-07-20 Tom Tromey <tom@tromey.com>
849 * buildsym.c: Remove TODO comment.
851 2018-07-20 Tom Tromey <tom@tromey.com>
853 * coffread.c (coff_symtab_read): Update.
854 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
855 (xcoff_new_init): Update.
856 * mipsread.c (mipscoff_new_init): Update.
857 * mdebugread.c (mdebug_build_psymtabs): Update.
858 * elfread.c (elf_new_init): Update.
859 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
861 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
862 (coffstab_build_psymtabs, elfstab_build_psymtabs)
863 (stabsect_build_psymtabs): Update.
864 * buildsym.h (buildsym_init): Don't declare.
865 * buildsym.c: Update comment.
866 (prepare_for_building): Remove.
867 (start_symtab, restart_symtab): Update.
868 (reset_symtab_globals): Update comment.
869 (buildsym_init): Remove.
871 2018-07-20 Tom Tromey <tom@tromey.com>
873 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
874 * stabsread.c (patch_block_stabs, define_symbol, read_type)
875 (read_enum_type, common_block_start, common_block_end)
876 (cleanup_undefined_types_1, finish_global_stabs): Update.
877 * mdebugread.c (psymtab_to_symtab_1): Update.
878 * dwarf2read.c (fixup_go_packaging, read_func_scope)
879 (read_lexical_block_scope, new_symbol): Update.
880 * dbxread.c (process_one_symbol): Update.
881 * coffread.c (coff_symtab_read, process_coff_symbol)
882 (coff_read_enum_type): Update.
883 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
885 (get_local_symbols, get_file_symbols, get_global_symbols): New
887 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
889 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
890 (~scoped_free_pendings): Update.
891 (finish_block, prepare_for_building, reset_symtab_globals)
892 (end_symtab_get_static_block, end_symtab_with_blockvector)
893 (augment_type_symtab, push_context): Update.
894 (get_local_symbols, get_file_symbols, get_global_symbols): New
896 (buildsym_init): Update.
898 2018-07-20 Tom Tromey <tom@tromey.com>
900 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
901 (process_full_type_unit): Likewise.
902 (dwarf2_start_symtab): Set list_in_scope.
904 2018-07-20 Tom Tromey <tom@tromey.com>
906 * dwarf2read.c (process_psymtab_comp_unit_reader)
907 (build_type_psymtabs_reader): Do not set list_in_scope.
909 2018-07-20 Tom Tromey <tom@tromey.com>
911 * buildsym.c (free_pendings): Remove.
912 (add_symbol_to_list, scoped_free_pendings)
913 (finish_block_internal, buildsym_init): Update.
915 2018-07-20 Tom Tromey <tom@tromey.com>
917 * xcoffread.c (read_xcoff_symtab): Update.
918 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
920 * dbxread.c (process_one_symbol): Update.
921 * coffread.c (coff_symtab_read): Update.
922 * buildsym.h (finish_block): Update.
923 * buildsym.c (finish_block): Remove "listhead" argument.
924 (end_symtab_get_static_block): Update.
926 2018-07-20 Tom Tromey <tom@tromey.com>
928 * buildsym.h (class scoped_free_pendings): Remove constructor.
929 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
931 <m_pending_block_obstack, m_pending_blocks>: New members.
932 (pending_block_obstack, pending_blocks): Remove.
933 (scoped_free_pendings::scoped_free_pendings): Default.
934 (~scoped_free_pendings): Update.
935 (free_pending_blocks): Remove.
936 (finish_block_internal, record_pending_block, make_blockvector)
937 (end_symtab_get_static_block, augment_type_symtab, push_context)
938 (buildsym_init): Update.
940 2018-07-20 Tom Tromey <tom@tromey.com>
942 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
943 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
945 (pending_addrmap, pending_addrmap_obstack)
946 (pending_addrmap_interesting): Remove.
947 (scoped_free_pendings, record_block_range, make_blockvector)
948 (prepare_for_building, reset_symtab_globals, buildsym_init):
951 2018-07-20 Tom Tromey <tom@tromey.com>
953 * xcoffread.c (process_linenos): Update.
954 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
955 * mdebugread.c (psymtab_to_symtab_1): Update.
956 * dwarf2read.c (setup_type_unit_groups)
957 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
958 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
959 * dbxread.c (process_one_symbol): Update.
960 * coffread.c (coff_symtab_read, enter_linenos)
961 (process_coff_symbol): Update.
962 * buildsym.h (current_subfile): Don't declare.
963 (get_current_subfile): Declare.
964 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
966 (start_subfile, free_buildsym_compunit, push_subfile)
967 (prepare_for_building, start_symtab): Update.
968 (get_current_subfile): New function.
970 2018-07-20 Tom Tromey <tom@tromey.com>
972 * coffread.c (coff_symtab_read): Update.
973 * xcoffread.c (read_xcoff_symtab): Update.
974 * dwarf2read.c (new_symbol): Update.
975 (read_func_scope, read_lexical_block_scope): Update.
976 * dbxread.c (process_one_symbol): Update.
977 * buildsym.h (context_stack, context_stack_depth): Don't declare.
978 (outermost_context_p): Remove macro.
979 (outermost_context_p, get_current_context_stack)
980 (get_context_stack_depth): Declare.
981 (pop_context): Return struct context_stack.
982 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
984 (context_stack_size): Remove.
985 (INITIAL_CONTEXT_STACK_SIZE): Remove.
986 (prepare_for_building, end_symtab_get_static_block)
987 (augment_type_symtab, push_context): Update.
988 (pop_context): Return struct context_stack.
989 (outermost_context_p, get_current_context_stack)
990 (get_context_stack_depth): New functions.
991 (buildsym_init): Update.
993 2018-07-20 Tom Tromey <tom@tromey.com>
995 * rust-exp.y: Now a pure parser. Update all rules.
996 (%union): Move earlier.
997 (current_parser, work_obstack): Remove globals.
998 (rust_parser, ~rust_parser): Update.
999 (class rust_parser) <copy_name, concat3, crate_name, super_name,
1000 lex_character, lex_number, lex_string, lex_identifier,
1001 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1002 convert_name, convert_params_to_expression,
1003 convert_ast_to_expression, ast_basic_type, ast_operation,
1004 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1005 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1006 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1007 ast_array_type, ast_slice_type, ast_reference_type,
1008 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1009 (rust_parse): Update.
1010 (rustyyerror, rustyylex): Add parser parameter.
1011 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1012 (rust_lex_stringish_test, rust_lex_test_sequence)
1013 (rust_lex_test_trailing_dot, rust_lex_test_completion)
1014 (rust_lex_test_push_back, rust_lex_tests): Update.
1016 2018-07-19 Pedro Alves <palves@redhat.com>
1018 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1019 gdb::unique_xmalloc_ptr.
1020 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1021 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1022 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1023 copy-initialization.
1024 * guile/scm-pretty-print.c (ppscm_print_children): Use
1025 gdb::unique_xmalloc_ptr instead of cleanups.
1026 (gdbscm_apply_val_pretty_printer): Remove cleanups.
1027 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1028 gdb::unique_xmalloc_ptr.
1029 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1030 Adjust to use gdb::unique_xmalloc_ptr.
1031 * guile/scm-utils.c (extract_arg): Adjust.
1032 * guile/scm-value.c (gdbscm_value_field): Adjust to use
1033 gdb::unique_xmalloc_ptr instead of a cleanup.
1035 2018-07-19 Tom Tromey <tom@tromey.com>
1037 * utils.c (do_value_free_to_mark)
1038 (make_cleanup_value_free_to_mark): Remove.
1039 * utils.h (make_cleanup_value_free_to_mark): Remove.
1041 2018-07-19 Pedro Alves <palves@redhat.com>
1043 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1044 forwarding reference.
1046 2018-07-18 Pedro Alves <palves@redhat.com>
1048 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1049 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
1052 2018-07-18 Pedro Alves <palves@redhat.com>
1054 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1056 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1058 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1059 directly instead of a cleanup.
1060 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1061 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
1062 (vlscm_binop_gdbthrow): New, factored out from ...
1063 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
1064 (vlscm_rich_compare): Use gdbscm_wrap.
1065 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1066 instead of a cleanup.
1067 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1069 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1070 Use xfree directly instead of a cleanup.
1071 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1072 Adjust to use gdbscm_wrap and scoped_value_mark.
1073 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1074 (gdbscm_value_address, gdbscm_value_dereference)
1075 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1077 (gdbscm_value_dynamic_type): Use scoped_value_mark.
1078 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1080 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1081 gdbscm_wrap and scoped_value_mark.
1082 (gdbscm_value_to_string): Use xfree directly instead of a
1083 cleanup. Move 'buffer' unique_ptr to TRY scope.
1084 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1085 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
1087 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1088 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1090 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1093 2018-07-18 Tom de Vries <tdevries@suse.de>
1095 * findvar.c (default_read_var_value): Also resolve dynamic type for
1096 LOC_OPTIMIZED_OUT vars.
1098 2018-07-18 Maciej W. Rozycki <macro@mips.com>
1100 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1103 2018-07-17 Tom Tromey <tom@tromey.com>
1105 * guile/scm-param.c (pascm_set_func, pascm_show_func)
1106 (compute_enum_list, pascm_set_param_value_x)
1107 (gdbscm_parameter_value): Update.
1108 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1109 (gdbscm_scm_to_host_string): Update.
1110 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1112 * guile/scm-cmd.c (cmdscm_add_completion): Update.
1113 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1114 * guile/scm-string.c (gdbscm_scm_to_string): Return
1116 (gdbscm_scm_to_host_string): Likewise.
1118 2018-07-17 Tom Tromey <tom@tromey.com>
1120 * guile/guile.c (gdbscm_eval_from_control_command): Update.
1121 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1122 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1123 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1126 2018-07-17 Tom Tromey <tom@tromey.com>
1128 * guile/scm-param.c (pascm_signal_setshow_error): Update.
1129 * guile/guile-internal.h (gdbscm_exception_message_to_string):
1131 * guile/scm-cmd.c (cmdscm_function): Update.
1132 * guile/scm-pretty-print.c
1133 (ppscm_print_exception_unless_memory_error): Update.
1134 * guile/scm-exception.c (gdbscm_exception_message_to_string):
1135 Return unique_xmalloc_ptr.
1137 2018-07-17 Tom Tromey <tom@tromey.com>
1139 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1142 2018-07-17 Jim Wilson <jimw@sifive.com>
1144 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1145 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
1146 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
1147 unecessary braces after EF_RISCV_RVC test. Delete call to
1148 set_gdbarch_decr_pc_after_break.
1150 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1151 RISCV_LAST_FP_REGNUM + 1.
1152 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1154 2018-07-17 Tom Tromey <tom@tromey.com>
1156 * configure.ac: Remove --disable-gdbcli.
1157 * configure: Rebuild.
1158 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1159 (SUBDIR_CLI_CFLAGS): Remove.
1160 (SFILES): Use SUBDIR_CLI_SRCS.
1161 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1163 2018-07-17 Tom Tromey <tom@tromey.com>
1166 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1168 2018-07-16 Jim Wilson <jimw@sifive.com>
1170 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1172 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1174 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1176 (libunwind_frame_sniffer): Likewise.
1177 (libunwind_frame_prev_register): Likewise.
1178 (libunwind_sigtramp_frame_sniffer): Likewise.
1179 * ia64-tdep.c (ia64_access_reg): Likewise.
1180 (ia64_access_rse_reg): Likewise.
1181 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1182 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1184 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1186 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1188 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1190 * remote-sim.c (gdbsim_target::close,
1191 gdbsim_target::mourn_inferior): Remove unused variables.
1193 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1195 * ia64-tdep.c (ktab_buf): New global.
1196 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1197 (get_kernel_table): Adjust.
1199 2018-07-16 Tom Tromey <tom@tromey.com>
1201 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1202 * dwarf2read.c (using_directives, new_symbol): Use
1203 outermost_context_p.
1204 * dbxread.c (process_one_symbol): Use outermost_context_p.
1205 * coffread.c (coff_symtab_read): Use outermost_context_p.
1207 2018-07-16 Tom Tromey <tom@tromey.com>
1209 * dwarf2read.c (using_directives, read_func_scope)
1210 (read_lexical_block_scope): Update.
1211 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1212 * buildsym.h (local_using_directives, global_using_directives):
1214 (get_local_using_directives, set_local_using_directives)
1215 (get_global_using_directives): Declare.
1216 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1217 m_global_using_directives>: New members.
1218 (finish_block_internal, prepare_for_building)
1219 (reset_symtab_globals, end_symtab_get_static_block)
1220 (push_context): Update.
1221 (get_local_using_directives, set_local_using_directives)
1222 (get_global_using_directives): New functions.
1223 (buildsym_init): Update.
1225 2018-07-16 Tom Tromey <tom@tromey.com>
1227 * xcoffread.c (xcoff_initial_scan): Don't call
1228 free_pending_blocks.
1229 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1230 * buildsym.h (class scoped_free_pendings): Add constructor.
1231 (free_pending_blocks): Don't declare.
1232 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1233 (free_pending_blocks): Now static.
1235 2018-07-16 Tom Tromey <tom@tromey.com>
1237 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1238 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1240 (struct subfile_stack): Remove.
1241 (subfile_stack): Remove.
1242 (push_subfile, pop_subfile, buildsym_init): Update.
1244 2018-07-16 Tom Tromey <tom@tromey.com>
1246 * buildsym.c (push_subfile): Use gdb_assert.
1247 (pop_subfile): Use gdb_assert.
1249 2018-07-16 Tom Tromey <tom@tromey.com>
1251 * buildsym.h (merge_symbol_lists): Remove.
1252 * buildsym.c (merge_symbol_lists): Remove.
1254 2018-07-16 Tom Tromey <tom@tromey.com>
1256 * stabsread.c (scan_file_globals): Update comment.
1257 * stabsread.h (scan_file_globals): Move from buildsym.h.
1258 * buildsym.h (scan_file_globals): Move to stabsread.h.
1260 2018-07-16 Tom Tromey <tom@tromey.com>
1262 * xcoffread.c (xcoff_new_init): Update.
1263 * mipsread.c (mipscoff_new_init): Update.
1264 * mdebugread.c (mdebug_build_psymtabs): Update.
1265 * elfread.c (elf_new_init): Update.
1266 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1267 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1268 * buildsym.h (buildsym_new_init): Don't declare.
1269 * buildsym.c (buildsym_new_init): Remove.
1271 2018-07-16 Tom Tromey <tom@tromey.com>
1273 * stabsread.h (within_function): Move from buildsym.h.
1274 * stabsread.c (start_stabs): Clear within_function.
1275 * coffread.c (coff_start_symtab): Clear within_function.
1276 * buildsym.h (within_function): Move to stabsread.h.
1277 * buildsym.c (prepare_for_building): Update.
1279 2018-07-16 Tom Tromey <tom@tromey.com>
1281 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1282 * dwarf2read.c (dwarf2_start_symtab): Don't set
1283 processing_gcc_compilation.
1284 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1286 2018-07-16 Tom Tromey <tom@tromey.com>
1288 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1289 (next_symbol_text_func): Move from buildsym.h.
1290 * stabsread.c (hashname): Move from buildsym.c.
1291 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1292 (next_symbol_text_func, hashname): Move to stabsread.h.
1293 * buildsym.c: Don't include bcache.h
1294 (hashname): Move to stasbread.c.
1296 2018-07-16 Tom Tromey <tom@tromey.com>
1298 * buildsym.h (context_stack_size): Don't declare.
1299 * buildsym.c (context_stack_size): New global.
1301 2018-07-16 Tom Tromey <tom@tromey.com>
1303 * dbxread.c (processing_acc_compilation): New global.
1304 * buildsym.h (processing_acc_compilation): Don't declare.
1306 2018-07-16 Tom Tromey <tom@tromey.com>
1308 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1309 * dbxread.c (read_ofile_symtab): Update.
1310 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1311 * buildsym.h (last_source_start_addr): Remove.
1312 (set_last_source_start_addr, get_last_source_start_addr):
1314 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1316 (struct buildsym_compunit) <m_last_source_start_addr>: New
1318 (prepare_for_building): Remove start_addr parameter.
1319 (start_symtab, restart_symtab, end_symtab_get_static_block)
1320 (end_symtab_with_blockvector): Update.
1321 (set_last_source_start_addr, get_last_source_start_addr): New
1324 2018-07-16 Tom Tromey <tom@tromey.com>
1326 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1328 (have_line_numbers): Remove.
1329 (record_line, prepare_for_building, end_symtab_get_static_block)
1330 (augment_type_symtab): Update.
1332 2018-07-16 Tom Tromey <tom@tromey.com>
1334 * buildsym.c (~buildsym_compunit): Free the macro table.
1335 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1337 <m_pending_macros>: New member.
1338 (pending_macros): Remove.
1339 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1340 (reset_symtab_globals, end_symtab_get_static_block)
1341 (end_symtab_with_blockvector, augment_type_symtab)
1342 (buildsym_init): Update.
1344 2018-07-16 Tom Tromey <tom@tromey.com>
1346 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1348 (buildsym_compunit::set_last_source_file): New method.
1349 <m_last_source_file>: New member.
1350 (prepare_for_building): Remove "name" parameter.
1351 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1352 (last_source_file): Remove.
1353 (set_last_source_file, get_last_source_file): Update.
1355 2018-07-16 Tom Tromey <tom@tromey.com>
1357 * buildsym.c (prepare_for_building): Add assert.
1359 2018-07-16 Tom Tromey <tom@tromey.com>
1361 * buildsym.c (~buildsym_compunit): Update.
1362 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1363 (start_subfile, patch_subfile_names)
1364 (end_symtab_with_blockvector): Update.
1366 2018-07-16 Tom Tromey <tom@tromey.com>
1368 * buildsym.c (struct buildsym_compunit): Add constructor,
1369 destructor, initializers.
1370 (start_buildsym_compunit): Remove.
1371 (free_buildsym_compunit): Use "delete".
1372 (start_symtab, restart_symtab): Use "new".
1374 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1376 * symfile.c (set_objfile_default_section_offset): Remove struct
1379 2018-07-14 Stafford Horne <shorne@gmail.com>
1381 * (Responsible Maintainers): Add myself as or1k maintainer.
1383 2018-07-13 Tom Tromey <tom@tromey.com>
1385 * symfile.c (set_objfile_default_section_offset): Use extra braces
1388 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1390 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1393 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1395 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1396 unittests/cli-utils-selftests.c
1397 * unittests/cli-utils-selftests.c: New file.
1399 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1401 * NEWS: Mention new commands. Mention change to 'thread apply'.
1403 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1405 * thread.c (thr_try_catch_cmd): New function.
1406 (thread_apply_all_command): Handle qcs flags.
1407 (thread_apply_command): Handle qcs flags.
1408 (taas_command): New function.
1409 (tfaas_command): New function.
1410 (_initialize_thread): Update to setup the new commands 'taas
1411 and 'tfaas'. Change doc string for 'thread apply'.
1413 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1415 * stack.c: (trailing_outermost_frame): New function, mostly
1416 extracted from backtrace_command_1.
1417 (leading_innermost_frame): New function.
1418 (backtrace_command_1): Update to call trailing_outermost_frame.
1419 (frame_apply_command_count): New function.
1420 (frame_apply_level_command): New function.
1421 (frame_apply_all_command): New function.
1422 (frame_apply_command): New function.
1423 (faas_command): New function.
1424 (frame_cmd_list): New variable.
1425 (_initialize_stack): Update to setup the new commands 'frame apply'
1428 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1430 * cli-utils.c (number_or_range_parser::get_number): Only handle
1431 numbers or convenience var as numbers.
1432 (parse_flags): New function.
1433 (parse_flags_qcs): New function.
1434 (number_or_range_parser::finished): Ensure parsing end is detected
1435 before end of string.
1436 * cli-utils.h (parse_flags): New function.
1437 (parse_flags_qcs): New function.
1438 (number_or_range_parser): Remove m_finished bool.
1439 (number_or_range_parser::skip_range): Set m_in_range to false.
1441 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
1443 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1446 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1447 Jan Kratochvil <jan.kratochvil@redhat.com>
1448 Paul Fertser <fercerpav@gmail.com>
1449 Tsutomu Seki <sekiriki@gmail.com>
1450 Pedro Alves <palves@redhat.com>
1452 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1453 'unittests/parse-connection-spec-selftests.c'.
1454 (COMMON_SFILES): Add 'common/netstuff.c'.
1455 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1456 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1457 * common/netstuff.c: New file.
1458 * common/netstuff.h: New file.
1459 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1460 (wait_for_connect): Update comment. New parameter
1461 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1462 Use 'sock' directly instead of 'scb->fd'.
1463 (try_connect): New function, with code from 'net_open'.
1464 (net_open): Rewrite main loop to deal with multiple
1465 sockets/addresses. Handle IPv6-style hostnames; implement
1466 support for IPv6 connections.
1467 * unittests/parse-connection-spec-selftests.c: New file.
1469 2018-07-11 Pedro Alves <palves@redhat.com>
1472 * remote.c (remote_target::remote_detach_pid): Call
1473 set_current_process.
1475 2018-07-11 Pedro Alves <palves@redhat.com>
1477 * h8300-tdep.c (h8300_gdbarch_init): Remove
1478 set_gdbarch_ecoff_reg_to_regnum calls.
1480 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1483 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1484 offsets/sizes for static members of a class/struct.
1486 2018-07-11 Alan Hayward <alan.hayward@arm.com>
1488 * target-descriptions.c (tdesc_register_bitsize): Rename.
1489 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1490 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1491 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1493 2018-07-10 Tom Tromey <tom@tromey.com>
1495 * breakpoint.c (moribund_locations): Now static and a
1497 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1498 (build_bpstat_chain, update_global_location_list)
1499 (breakpoint_retire_moribund): Update.
1500 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1503 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1505 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1506 (riscv_register_reggroup_p): Use new function, remove unneeded
1508 (riscv_push_dummy_call): Extend assert to compare against xlen or
1509 flen based on register type.
1511 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1513 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1515 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1517 * remote.c (show_hardware_watchpoint_limit): New function.
1518 (show_hardware_watchpoint_length_limit): New function.
1519 (show_hardware_breakpoint_limit): New function.
1520 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1521 where appropriate, update help text.
1523 2018-07-09 Tom Tromey <tom@tromey.com>
1525 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1526 (CLIBS): Don't mention NAT_CLIBS.
1528 2018-07-09 Tom Tromey <tom@tromey.com>
1530 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1531 (LIBGDB_OBS, clean mostlyclean): Update.
1532 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1534 2018-07-09 Tom Tromey <tom@tromey.com>
1536 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1537 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1538 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1540 2018-07-09 Tom Tromey <tom@tromey.com>
1542 * Makefile.in (ALLDEPFILES): Remove exec.c.
1543 (COMMON_OBS): Remove exec.o.
1544 (COMMON_SFILES): Add exec.c.
1546 2018-07-09 Tom Tromey <tom@tromey.com>
1548 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1550 2018-07-09 Tom Tromey <tom@tromey.com>
1552 * Makefile.in (clean mostlyclean): Remove stamp-version.
1553 (version.c): Depend on stamp-version.
1554 (stamp-version): New rule, from version.c rule.
1556 2018-07-09 Tom Tromey <tom@tromey.com>
1558 * Makefile.in (init.c): Depend on stamp-init.
1559 (stamp-init): New rule, from init.c rule.
1560 (clean mostlyclean): Remove stamp-init.
1562 2018-07-09 Tom Tromey <tom@tromey.com>
1564 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1565 SUBDIR_GCC_COMPILE_SRCS.
1567 2018-07-09 Tom Tromey <tom@tromey.com>
1569 * Makefile.in (init.c): Remove some unused sed rules.
1571 2018-07-09 Tom Tromey <tom@tromey.com>
1573 * Makefile.in (TSOBS): Remove.
1574 (INIT_FILES): Update.
1575 (LIBGDB_OBS): Update.
1576 (COMMON_SFILES): Add inflow.c.
1577 (SFILES): Remove inflow.c.
1579 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1581 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1583 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1585 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1586 get_saveloc_name, is_signal_frame_name, step_name,
1587 init_remote_name, create_addr_space_name,
1588 destroy_addr_space_name, search_unwind_table_name,
1589 find_dyn_list_name): Constify.
1591 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1593 * darwin-nat.c (darwin_pthread_kill): New function.
1594 (darwin_resume_thread): Use darwin_pthread_kill.
1596 2018-07-05 Tom de Vries <tdevries@suse.de>
1598 * macroexp.c (macro_buffer) <operator=>: New member function.
1600 2018-07-04 Tom Tromey <tom@tromey.com>
1602 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1604 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
1606 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1607 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1608 * maint.c: Likewise.
1611 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1613 * NEWS: Create a new section for the next release branch.
1614 Rename the section of the current branch, now that it has
1617 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1619 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1620 * version.in: Bump version to 8.2.50.DATE-git.
1622 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1623 Pedro Alves <palves@redhat.com>
1625 * linux-nat.c (linux_init_ptrace): Rename to ...
1626 (linux_init_ptrace_procfs): ... this. Call
1627 linux_proc_init_warnings.
1628 (linux_nat_target::post_attach)
1629 (linux_nat_target::post_startup_inferior): Adjust.
1630 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1631 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1633 2018-07-04 Tom de Vries <tdevries@suse.de>
1635 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1637 (read_comp_unit_head): ... here.
1639 2018-07-03 Tom Tromey <tom@tromey.com>
1641 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1642 (stop_tracing, tstatus_command)
1643 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1644 (print_one_static_tracepoint_marker): Update.
1645 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1647 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
1649 (all_tracepoints, static_tracepoints_here): Return std::vector.
1651 2018-07-03 Tom Tromey <tom@tromey.com>
1653 * common/ptid.c (ptid_equal): Remove.
1654 * common/ptid.h (ptid_equal): Don't declare.
1655 * ada-tasks.c: Update.
1656 * breakpoint.c: Update.
1657 * common/agent.c: Update.
1658 * corelow.c: Update.
1659 * darwin-nat-info.c: Update.
1660 * darwin-nat.c: Update.
1662 * dtrace-probe.c: Update.
1663 * dummy-frame.c: Update.
1664 * fbsd-nat.c: Update.
1666 * gdbthread.h: Update.
1667 * gnu-nat.c: Update.
1668 * go32-nat.c: Update.
1669 * inf-loop.c: Update.
1670 * inf-ptrace.c: Update.
1671 * infcall.c: Update.
1675 * linux-fork.c: Update.
1676 * linux-nat.c: Update.
1677 * linux-thread-db.c: Update.
1678 * mi/mi-cmd-var.c: Update.
1679 * mi/mi-interp.c: Update.
1680 * mi/mi-main.c: Update.
1681 * nto-procfs.c: Update.
1682 * ppc-linux-tdep.c: Update.
1684 * python/py-inferior.c: Update.
1685 * python/py-record-btrace.c: Update.
1686 * python/py-record.c: Update.
1687 * ravenscar-thread.c: Update.
1688 * regcache.c: Update.
1689 * remote-sim.c: Update.
1691 * sol-thread.c: Update.
1694 * tui/tui-stack.c: Update.
1696 * windows-nat.c: Update.
1697 * windows-tdep.c: Update.
1699 2018-07-03 Tom Tromey <tom@tromey.com>
1701 * common/ptid.c (ptid_match): Remove.
1702 * common/ptid.h (ptid_match): Don't declare.
1703 * fbsd-nat.c: Update.
1706 * linux-nat.c: Update.
1707 * record-btrace.c: Update.
1708 * regcache.c: Update.
1711 2018-07-03 Tom Tromey <tom@tromey.com>
1713 * common/ptid.c (ptid_tid_p): Remove.
1714 * common/ptid.h (ptid_tid_p): Don't declare.
1715 * sol-thread.c: Update.
1717 2018-07-03 Tom Tromey <tom@tromey.com>
1719 * common/ptid.c (ptid_lwp_p): Remove.
1720 * common/ptid.h (ptid_lwp_p): Don't declare.
1721 * fbsd-nat.c: Update.
1722 * linux-nat.c: Update.
1723 * nat/linux-procfs.c: Update.
1724 * nat/x86-linux-dregs.c: Update.
1725 * sol-thread.c: Update.
1727 2018-07-03 Tom Tromey <tom@tromey.com>
1729 * common/ptid.c (ptid_is_pid): Remove.
1730 * common/ptid.h (ptid_is_pid): Don't declare.
1732 * linux-nat.c: Update.
1733 * mi/mi-interp.c: Update.
1737 2018-07-03 Tom Tromey <tom@tromey.com>
1739 * common/ptid.c (ptid_get_tid): Remove.
1740 * common/ptid.h (ptid_get_tid): Don't declare.
1741 * ada-tasks.c: Update.
1742 * aix-thread.c: Update.
1743 * bsd-uthread.c: Update.
1744 * darwin-nat.c: Update.
1745 * fbsd-nat.c: Update.
1746 * i386-darwin-nat.c: Update.
1748 * linux-tdep.c: Update.
1749 * nto-procfs.c: Update.
1750 * ppc-ravenscar-thread.c: Update.
1751 * python/py-infthread.c: Update.
1752 * ravenscar-thread.c: Update.
1753 * sol-thread.c: Update.
1754 * sparc-ravenscar-thread.c: Update.
1755 * windows-nat.c: Update.
1757 2018-07-03 Tom Tromey <tom@tromey.com>
1759 * common/ptid.c (ptid_get_lwp): Remove.
1760 * common/ptid.h (ptid_get_lwp): Don't declare.
1761 * aarch64-linux-nat.c: Update.
1762 * ada-tasks.c: Update.
1763 * aix-thread.c: Update.
1764 * amd64-linux-nat.c: Update.
1765 * arm-linux-nat.c: Update.
1766 * corelow.c: Update.
1767 * fbsd-nat.c: Update.
1768 * fbsd-tdep.c: Update.
1769 * gnu-nat.c: Update.
1770 * i386-cygwin-tdep.c: Update.
1771 * i386-gnu-nat.c: Update.
1772 * i386-linux-nat.c: Update.
1773 * ia64-linux-nat.c: Update.
1774 * inf-ptrace.c: Update.
1776 * linux-fork.c: Update.
1777 * linux-nat.c: Update.
1778 * linux-tdep.c: Update.
1779 * linux-thread-db.c: Update.
1780 * mips-linux-nat.c: Update.
1781 * nat/aarch64-linux-hw-point.c: Update.
1782 * nat/aarch64-linux.c: Update.
1783 * nat/linux-btrace.c: Update.
1784 * nat/linux-osdata.c: Update.
1785 * nat/linux-procfs.c: Update.
1786 * nat/x86-linux-dregs.c: Update.
1787 * obsd-nat.c: Update.
1788 * ppc-fbsd-nat.c: Update.
1789 * ppc-linux-nat.c: Update.
1791 * python/py-infthread.c: Update.
1792 * ravenscar-thread.c: Update.
1794 * s390-linux-nat.c: Update.
1795 * sol-thread.c: Update.
1796 * sol2-tdep.c: Update.
1797 * spu-linux-nat.c: Update.
1798 * x86-linux-nat.c: Update.
1799 * xtensa-linux-nat.c: Update.
1801 2018-07-03 Tom Tromey <tom@tromey.com>
1803 * common/ptid.c (ptid_get_pid): Remove.
1804 * common/ptid.h (ptid_get_pid): Don't declare.
1805 * aarch64-linux-nat.c: Update.
1806 * ada-lang.c: Update.
1807 * aix-thread.c: Update.
1808 * alpha-bsd-nat.c: Update.
1809 * amd64-fbsd-nat.c: Update.
1810 * amd64-linux-nat.c: Update.
1811 * arm-linux-nat.c: Update.
1812 * arm-nbsd-nat.c: Update.
1814 * break-catch-syscall.c: Update.
1815 * breakpoint.c: Update.
1816 * bsd-uthread.c: Update.
1817 * corelow.c: Update.
1819 * darwin-nat.c: Update.
1820 * fbsd-nat.c: Update.
1821 * fbsd-tdep.c: Update.
1823 * gnu-nat.c: Update.
1824 * hppa-nbsd-nat.c: Update.
1825 * hppa-obsd-nat.c: Update.
1826 * i386-fbsd-nat.c: Update.
1827 * ia64-linux-nat.c: Update.
1828 * inf-ptrace.c: Update.
1830 * inferior.c: Update.
1831 * inferior.h: Update.
1834 * linux-fork.c: Update.
1835 * linux-nat.c: Update.
1836 * linux-tdep.c: Update.
1837 * linux-thread-db.c: Update.
1838 * m68k-bsd-nat.c: Update.
1839 * mi/mi-interp.c: Update.
1840 * mi/mi-main.c: Update.
1841 * mips-linux-nat.c: Update.
1842 * mips-nbsd-nat.c: Update.
1843 * mips64-obsd-nat.c: Update.
1844 * nat/aarch64-linux-hw-point.c: Update.
1845 * nat/aarch64-linux.c: Update.
1846 * nat/linux-btrace.c: Update.
1847 * nat/linux-osdata.c: Update.
1848 * nat/linux-procfs.c: Update.
1849 * nat/x86-linux-dregs.c: Update.
1850 * nto-procfs.c: Update.
1851 * obsd-nat.c: Update.
1852 * ppc-linux-nat.c: Update.
1853 * ppc-nbsd-nat.c: Update.
1854 * ppc-obsd-nat.c: Update.
1855 * proc-service.c: Update.
1857 * python/py-inferior.c: Update.
1858 * python/py-infthread.c: Update.
1859 * ravenscar-thread.c: Update.
1861 * remote-sim.c: Update.
1863 * rs6000-nat.c: Update.
1864 * s390-linux-nat.c: Update.
1865 * sh-nbsd-nat.c: Update.
1866 * sol-thread.c: Update.
1867 * sparc-nat.c: Update.
1868 * sparc64-tdep.c: Update.
1869 * spu-linux-nat.c: Update.
1870 * spu-tdep.c: Update.
1871 * target-debug.h: Update.
1874 * tid-parse.c: Update.
1875 * tracefile-tfile.c: Update.
1876 * vax-bsd-nat.c: Update.
1877 * windows-nat.c: Update.
1878 * x86-linux-nat.c: Update.
1879 * x86-nat.c: Update.
1881 2018-07-03 Tom Tromey <tom@tromey.com>
1883 * common/ptid.c (pid_to_ptid): Remove.
1884 * common/ptid.h (pid_to_ptid): Don't declare.
1885 * aix-thread.c: Update.
1886 * arm-linux-nat.c: Update.
1887 * common/ptid.c: Update.
1888 * common/ptid.h: Update.
1889 * corelow.c: Update.
1891 * darwin-nat.c: Update.
1892 * fbsd-nat.c: Update.
1893 * fork-child.c: Update.
1894 * gnu-nat.c: Update.
1895 * go32-nat.c: Update.
1896 * inf-ptrace.c: Update.
1898 * inferior.c: Update.
1900 * linux-fork.c: Update.
1901 * linux-nat.c: Update.
1902 * nat/aarch64-linux-hw-point.c: Update.
1903 * nat/fork-inferior.c: Update.
1904 * nat/x86-linux-dregs.c: Update.
1905 * nto-procfs.c: Update.
1906 * obsd-nat.c: Update.
1908 * progspace.c: Update.
1910 * rs6000-nat.c: Update.
1911 * s390-linux-nat.c: Update.
1912 * sol-thread.c: Update.
1913 * spu-linux-nat.c: Update.
1916 * tracefile-tfile.c: Update.
1917 * windows-nat.c: Update.
1919 2018-07-03 Tom Tromey <tom@tromey.com>
1921 * common/ptid.h (ptid_build): Don't declare.
1922 * common/ptid.c (ptid_build): Remove.
1923 * aix-thread.c: Update.
1924 * bsd-kvm.c: Update.
1925 * bsd-uthread.c: Update.
1926 * common/agent.c: Update.
1927 * common/ptid.c: Update.
1928 * common/ptid.h: Update.
1929 * corelow.c: Update.
1930 * darwin-nat.c: Update.
1931 * fbsd-nat.c: Update.
1932 * gnu-nat.c: Update.
1933 * linux-fork.c: Update.
1934 * linux-nat.c: Update.
1935 * linux-thread-db.c: Update.
1936 * nat/linux-osdata.c: Update.
1937 * nat/linux-procfs.c: Update.
1938 * nto-procfs.c: Update.
1939 * obsd-nat.c: Update.
1940 * proc-service.c: Update.
1942 * ravenscar-thread.c: Update.
1943 * remote-sim.c: Update.
1945 * sol-thread.c: Update.
1947 * windows-nat.c: Update.
1949 2018-07-03 Tom Tromey <tom@tromey.com>
1951 * infrun.c (follow_exec): Use exit_inferior_silent.
1952 * inferior.c (exit_inferior_num_silent): Remove.
1953 * inferior.h (exit_inferior_num_silent): Don't declare.
1955 2018-07-03 Tom Tromey <tom@tromey.com>
1958 * darwin-nat.c (darwin_attach_pid): Reset inferior and
1959 inferior_ptid on error.
1961 2018-07-02 Maciej W. Rozycki <macro@mips.com>
1962 Simon Marchi <simon.marchi@polymtl.ca>
1965 * disasm.h (gdb_disassembler): Add
1966 `m_disassembler_options_holder'. member
1967 * disasm.c (get_all_disassembler_options): New function.
1968 (gdb_disassembler::gdb_disassembler): Use it.
1969 (gdb_buffered_insn_length_init_dis): Likewise.
1970 (gdb_buffered_insn_length): Adjust accordingly.
1971 (set_disassembler_options): Handle options with arguments.
1972 (show_disassembler_options_sfunc): Likewise. Add a leading new
1973 line if showing options with descriptions.
1974 (disassembler_options_completer): Adapt to using the
1975 `disasm_options_and_args_t' structure.
1976 * mips-tdep.c (mips_disassembler_options): New variable.
1977 (mips_disassembler_options_o32): Likewise.
1978 (mips_disassembler_options_n32): Likewise.
1979 (mips_disassembler_options_n64): Likewise.
1980 (gdb_print_insn_mips): Don't set `disassembler_options'.
1981 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1983 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
1984 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
1985 `gdbarch_disassembler_options_implicit' and
1986 `gdbarch_valid_disassembler_options'.
1987 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
1988 `disasm_options_and_args_t' structure.
1989 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
1991 (valid_disassembler_options): Switch from `disasm_options_t' to
1992 the `disasm_options_and_args_t' structure.
1993 * NEWS: Document `set disassembler-options' support for the MIPS
1995 * gdbarch.h: Regenerate.
1996 * gdbarch.c: Regenerate.
1998 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
2000 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2002 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2004 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2005 parameter in call to amd64_target_description.
2006 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2007 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2008 (amd64fbsd_init_abi): Likewise.
2009 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2010 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2011 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2012 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2014 2018-06-29 Pedro Alves <palves@redhat.com>
2016 * gdb/amd64-tdep.h (amd64_create_target_description): Add
2017 "segments" parameter.
2018 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2019 (_initialize_amd64_tdep): Update call to
2020 amd64_create_target_description.
2021 (amd64_target_description): Add "segments" parameter. Adjust
2022 the implementation to use it.
2023 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2024 call to amd64_create_target_description.
2025 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2026 * gdb/arch/amd64.h (amd64_create_target_description): Add
2027 "segments" register.
2028 * gdb/arch/amd64.c (amd64_create_target_description): Add
2029 "segments" parameter. Call create_feature_i386_64bit_segments
2030 only if SEGMENTS is true.
2031 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2032 call to amd64_create_target_description.
2034 2018-06-29 Pedro Alves <palves@redhat.com>
2036 * thread.c (thread_target_id_str): New, factored out from ...
2037 (print_thread_info_1): ... here. Use it to compute the max
2038 "Target Id" column width.
2040 2018-06-29 Pedro Alves <palves@redhat.com>
2042 * remote.c (remote_target::extra_thread_info): Delete
2043 'display_buf' and 'n' locals. from the cache, regardless of
2044 packet mechanims is in use. Use cache for qThreadExtra and qP
2047 2018-06-29 Pedro Alves <palves@redhat.com>
2049 * blockframe.c (find_pc_sect_containing_function): New function.
2050 * breakpoint.c (print_breakpoint_location): Don't call
2051 find_pc_sect_function.
2052 * linespec.c (create_sals_line_offset): Record the location's
2054 * linespec.c (convert_address_location_to_sals): Fill in sal's
2055 symbol with find_pc_sect_containing_function.
2056 * symtab.c (find_function_start_sal): Rename to ...
2057 (find_function_start_sal_1): ... this.
2058 (find_function_start_sal): Reimplement as wrapper around
2059 find_function_start_sal_1, and use
2060 find_pc_sect_containing_function to fill in the sal's symbol.
2061 (find_function_start_sal(symbol*, bool)): Adjust.
2062 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2064 (find_pc_sect_containing_function): Declare.
2066 2018-06-29 Pedro Alves <palves@redhat.com>
2068 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2069 true if the the location has no symbol.
2071 2018-06-28 Tom Tromey <tom@tromey.com>
2073 * NEWS: Mention --enable-codesign.
2074 * silent-rules.mk (ECHO_SIGN): New variable.
2075 * configure.ac: Add --enable-codesign.
2076 * configure: Rebuild.
2077 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2078 (gdb$(EXEEXT)): Optionally invoke codesign.
2080 2018-06-28 Pedro Alves <palves@redhat.com>
2082 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2084 (switch_to_thread_no_regs): Adjust comment.
2085 * infcmd.c (stop_pc): Delete.
2086 (post_create_inferior, info_program_command): Replace references
2087 to stop_pc with references to thread_info->suspend.stop_pc.
2088 * inferior.h (stop_pc): Delete declaration.
2089 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2090 (handle_inferior_event_1, handle_signal_stop)
2091 (process_event_stop_test, keep_going_stepped_thread)
2092 (handle_step_into_function, handle_step_into_function_backward)
2093 (print_stop_location): Replace references to stop_pc with
2094 references to thread_info->suspend.stop_pc.
2095 (struct infcall_suspend_state) <stop_pc>: Delete field.
2096 (save_infcall_suspend_state, restore_infcall_suspend_state):
2097 Remove references to inf_stat->stop_pc.
2098 * linux-fork.c (fork_load_infrun_state): Likewise.
2099 * record-btrace.c (record_btrace_set_replay): Likewise.
2100 * record-full.c (record_full_goto_entry): Likewise.
2101 * remote.c (print_one_stopped_thread): Likewise.
2102 * target.c (target_resume): Extend comment.
2103 * thread.c (set_executing_thread): New.
2104 (set_executing): Use it.
2105 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2106 Remove references to stop_pc.
2108 2018-06-28 Pedro Alves <palves@redhat.com>
2110 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2111 Moving fetching stop_pc until after ecs->event_thread is refreshed.
2113 2018-06-28 Tom Tromey <tom@tromey.com>
2115 * coffread.c (coff_symfile_finish): Update.
2116 * xcoffread.c (xcoff_symfile_finish): Update.
2117 * elfread.c (elf_symfile_finish): Update.
2118 * symfile.h (dwarf2_free_objfile): Don't declare.
2119 * dwarf2read.c (_initialize_dwarf2_read): Use
2120 register_objfile_data_with_cleanup.
2121 (dwarf2_free_objfile): Now static. Change signature.
2123 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2125 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2126 option "-o" to add-symbol-file-load to add an offset to each
2127 section's load address.
2128 * symfile.c (set_objfile_default_section_offset): New function.
2130 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2132 * symfile.c (add_symbol_file_command): Make sure that sections
2133 with the same name are sorted in the same order.
2135 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2137 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2138 require the second argument. If omitted, load sections at the
2139 addresses specified in the file.
2141 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2143 * symfile.c (symbol_file_command, symbol_file_add_main_1)
2144 (_initialize_symfile): Add option "-o" to symbol-file to add an
2145 offset to each section of the symbol file.
2147 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2149 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2151 2018-06-27 Tom Tromey <tom@tromey.com>
2153 * stack.c (_initialize_stack): Update "func" help text.
2155 2018-06-27 Tom Tromey <tom@tromey.com>
2157 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2159 (unwind_infopy_str, pyuw_create_unwind_info)
2160 (unwind_infopy_add_saved_register, pyuw_sniffer)
2161 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2163 (struct saved_reg): Add constructor.
2164 <value>: Now a gdbpy_ref<>.
2166 2018-06-27 Tom Tromey <tom@tromey.com>
2168 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2170 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2172 * gdb-gdb.py.in: Format using autopep8.
2174 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2176 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2177 (type_lookup_function): Recognize CORE_ADDR values.
2179 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2181 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2184 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2186 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2189 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2191 * gdb-gdb.py: Move to...
2192 * gdb-gdb.py.in: ... here.
2193 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2194 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2196 (distclean): Remove gdb-gdb.py when cleaning.
2197 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2198 * configure: Re-generate.
2200 2018-06-27 Pedro Alves <palves@redhat.com>
2202 * proc-service.c (get_ps_regcache): New.
2203 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2204 (ps_lsetfpregs): Use it.
2206 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
2209 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2210 (dwarf_decode_lines_1): Adjust.
2212 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2214 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2216 <info_proc>: Likewise.
2218 2018-06-26 Joel Brobecker <brobecker@adacore.com>
2220 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2221 to windows_fetch_one_register, and only handle the case of
2222 fetching one register. Move the code that reloads the context
2223 and iterates over all registers if R is negative to...
2224 (windows_nat_target::fetch_registers): ... here.
2225 (do_windows_store_inferior_registers): Rename to
2226 windows_store_one_register, and only handle the case of storing
2227 one register. Move the code that handles the case where r is
2229 (windows_nat_target::store_registers) ... here.
2231 2018-06-26 Tom Tromey <tom@tromey.com>
2234 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2235 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2237 (rust_internal_print_type): Add podata parameter.
2238 (rust_print_type): Update.
2240 2018-06-26 Tom Tromey <tom@tromey.com>
2242 * typeprint.h (struct print_offset_data) <update, finish,
2243 maybe_print_hole>: New methods.
2244 <indentation>: New constant.
2245 * typeprint.c (print_offset_data::indentation): Define.
2246 (print_offset_data::maybe_print_hole, print_offset_data::update)
2247 (print_offset_data::finish): Move from c-typeprint.c and rename.
2248 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2249 (print_spaces_filtered_with_print_options): Update.
2250 (c_print_type_union_field_offset, maybe_print_hole)
2251 (c_print_type_struct_field_offset): Move to typeprint.c and
2253 (c_type_print_base_struct_union): Update.
2255 2018-06-25 Pedro Alves <palves@redhat.com>
2257 * gdbthread.h (thread_info_ref, delete_thread)
2258 (delete_thread_silent, first_thread_of_inferior)
2259 (any_thread_of_inferior, switch_to_thread)
2260 (enable_thread_stack_temporaries)
2261 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2262 (get_last_thread_stack_temporary)
2263 (value_in_thread_stack_temporaries, can_access_registers_thread):
2264 Spell out "struct thread_info" instead of just "thread_info".
2265 * inferior.h (notice_new_inferior): Likewise.
2267 2018-06-25 Pedro Alves <palves@redhat.com>
2269 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2270 pass thread_info pointer to delete_thread.
2271 (windows_nat_target::detach): Pass inferior pointer to
2273 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2275 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2276 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2277 and pass a thread_info pointer to delete_thread.
2278 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2279 pass thread_info pointer to delete_thread.
2280 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2281 delete_thread_silent call.
2282 * procfs.c (procfs_target::detach): Pass inferior pointer to
2284 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2285 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2286 delete_thread_silent call.
2287 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2288 pass thread_info pointer to delete_thread.
2289 (windows_nat_target::detach): Pass inferior pointer to
2292 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2294 * regcache.c (readable_regcache::read_part): Fix asserts.
2295 (reg_buffer::raw_collect_part): New function.
2296 (regcache::write_part): Fix asserts.
2297 (reg_buffer::raw_supply_part): New function.
2298 (regcache::transfer_regset_register): New helper function.
2299 (regcache::transfer_regset): Call new functions.
2300 (regcache_supply_regset): Use gdb_byte*.
2301 (regcache::supply_regset): Likewise.
2302 (regcache_collect_regset): Likewise.
2303 (regcache::collect_regset): Likewise.
2304 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2305 (reg_buffer::raw_supply_part): Likewise.
2306 (regcache::transfer_regset_register): Likewise.
2307 (regcache::transfer_regset): Use gdb_byte*.
2309 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2311 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2313 2018-06-21 Pedro Alves <palves@redhat.com>
2315 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2316 instead of a ptid_t. All callers adjusted.
2317 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2319 (print_ada_task_info, display_current_task_id, task_command_1):
2321 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2323 (breakpoint_kind): Adjust.
2324 (remove_breakpoints_pid): Rename to ...
2325 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2326 pointer. All callers adjusted.
2327 (bpstat_clear_actions): Use inferior_thread.
2328 (get_bpstat_thread): New.
2329 (bpstat_do_actions): Use it.
2330 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2331 to take a thread_info pointer. All callers adjusted.
2332 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2333 (breakpoint_re_set_thread): Use inferior_thread.
2334 * breakpoint.h (struct inferior): Forward declare.
2335 (bpstat_stop_status): Update.
2336 (remove_breakpoints_pid): Delete.
2337 (remove_breakpoints_inf): New.
2338 * bsd-uthread.c (bsd_uthread_target::wait)
2339 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2340 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2341 (maint_btrace_packet_history_cmd)
2342 (maint_btrace_clear_packet_history_cmd): Adjust.
2343 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2345 * cli/cli-interp.c: Include "inferior.h".
2346 * common/refcounted-object.h (struct
2347 refcounted_object_ref_policy): New.
2348 * compile/compile-object-load.c: Include gdbthread.h.
2349 (store_regs): Use inferior_thread.
2350 * corelow.c (core_target::close): Use current_inferior.
2351 (core_target_open): Adjust to use first_thread_of_inferior and use
2352 the current inferior.
2353 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2354 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2355 <thread>: ... this new field. All references adjusted.
2356 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2357 Take a thread_info pointer instead of a ptid_t.
2358 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2359 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2360 thread_info pointer instead of a ptid_t.
2361 * elfread.c: Include "inferior.h".
2362 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2363 Use inferior_thread.
2364 * eval.c (evaluate_subexp): Likewise.
2365 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2367 * gdb_proc_service.h (struct thread_info): Forward declare.
2368 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2369 <thread>: ... this new field. All references adjusted.
2370 * gdbarch.h, gdbarch.c: Regenerate.
2371 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2372 'thread' parameter. All implementations and callers adjusted.
2373 * gdbthread.h (thread_info) <set_running>: New method.
2374 (delete_thread, delete_thread_silent): Take a thread_info pointer
2376 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2377 (first_thread_of_process): Delete, replaced by ...
2378 (first_thread_of_inferior): ... this new function. All callers
2380 (any_live_thread_of_process): Delete, replaced by ...
2381 (any_live_thread_of_inferior): ... this new function. All callers
2383 (switch_to_thread, switch_to_no_thread): Declare.
2384 (is_executing): Delete.
2385 (enable_thread_stack_temporaries): Update comment.
2386 <enable_thread_stack_temporaries>: Take a thread_info pointer
2387 instead of a ptid_t. Incref the thread.
2388 <~enable_thread_stack_temporaries>: Decref the thread.
2391 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2392 (get_last_thread_stack_temporary)
2393 (value_in_thread_stack_temporaries, can_access_registers_thread):
2394 Take a thread_info pointer instead of a ptid_t. All callers
2396 * infcall.c (get_call_return_value): Use inferior_thread.
2397 (run_inferior_call): Work with thread pointers instead of ptid_t.
2398 (call_function_by_hand_dummy): Work with thread pointers instead
2399 of ptid_t. Use thread_info_ref.
2400 * infcmd.c (proceed_thread_callback): Access thread's state
2402 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2403 access thread's state directly.
2404 (continue_command): Use inferior_thread.
2405 (info_program_command): Use find_thread_ptid and access thread
2407 (proceed_after_attach_callback): Use thread state directly.
2408 (notice_new_inferior): Take a thread_info pointer instead of a
2409 ptid_t. All callers adjusted.
2410 (exit_inferior): Take an inferior pointer instead of a pid. All
2412 (exit_inferior_silent): New.
2413 (detach_inferior): Delete.
2414 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2415 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2416 (detach_inferior_command, kill_inferior_command): Use
2417 find_inferior_id instead of valid_gdb_inferior_id and
2418 gdb_inferior_id_to_pid.
2419 (inferior_command): Use inferior and thread pointers.
2420 * inferior.h (struct thread_info): Forward declare.
2421 (notice_new_inferior): Take a thread_info pointer instead of a
2422 ptid_t. All callers adjusted.
2423 (detach_inferior): Delete declaration.
2424 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2425 instead of a pid. All callers adjusted.
2426 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2427 (valid_gdb_inferior_id): Delete.
2428 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2429 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2430 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2432 <inf>: ... this new field.
2433 <step_ptid>: Delete, replaced by ...
2434 <step_thread>: ... this new field.
2435 (get_displaced_stepping_state): Take an inferior pointer instead
2436 of a pid. All callers adjusted.
2437 (displaced_step_in_progress_any_inferior): Adjust.
2438 (displaced_step_in_progress_thread): Take a thread pointer instead
2439 of a ptid_t. All callers adjusted.
2440 (displaced_step_in_progress, add_displaced_stepping_state): Take
2441 an inferior pointer instead of a pid. All callers adjusted.
2442 (get_displaced_step_closure_by_addr): Adjust.
2443 (remove_displaced_stepping_state): Take an inferior pointer
2444 instead of a pid. All callers adjusted.
2445 (displaced_step_prepare_throw, displaced_step_prepare)
2446 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2447 All callers adjusted.
2448 (start_step_over): Adjust.
2449 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2450 displaced step queue.
2451 (do_target_resume): Adjust.
2452 (fetch_inferior_event): Use inferior_thread.
2453 (context_switch, get_inferior_stop_soon): Take an
2454 execution_control_state pointer instead of a ptid_t. All callers
2456 (switch_to_thread_cleanup): Delete.
2457 (stop_all_threads): Use scoped_restore_current_thread.
2458 * inline-frame.c: Include "gdbthread.h".
2459 (inline_state) <inline_state>: Take a thread pointer instead of a
2460 ptid_t. All callers adjusted.
2461 <ptid>: Delete, replaced by ...
2462 <thread>: ... this new field.
2463 (find_inline_frame_state): Take a thread pointer instead of a
2464 ptid_t. All callers adjusted.
2465 (skip_inline_frames, step_into_inline_frame)
2466 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2467 pointer instead of a ptid_t. All callers adjusted.
2468 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2469 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2470 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2472 * linux-nat.c (get_detach_signal): Likewise.
2473 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2474 (thread_db_notice_clone): Adjust.
2475 (thread_db_find_new_threads_silently)
2476 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2477 a thread pointer instead of a ptid_t. All callers adjusted.
2478 * mi/mi-cmd-var.c: Include "inferior.h".
2479 (mi_cmd_var_update_iter): Update to use thread pointers.
2480 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2482 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2484 (mi_output_running): ... this new function.
2485 (mi_on_resume_1): Adjust to use it.
2486 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2487 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2489 (interrupt_thread_callback): : Adjust to use thread and inferior
2491 * proc-service.c: Include "gdbthread.h".
2492 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2493 * progspace-and-thread.c: Include "inferior.h".
2494 * progspace.c: Include "inferior.h".
2495 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2496 hold a reference to an inferior_object.
2497 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2499 * python/py-inferior.c (struct inferior_object): Give the type a
2500 tag name instead of a typedef.
2501 (python_on_normal_stop): No need to check if the current thread is
2503 (inferior_to_inferior_object): Change return type to
2504 inferior_object. All callers adjusted.
2505 (find_thread_object): Delete, bits factored out to ...
2506 (thread_to_thread_object): ... this new function.
2507 * python/py-infthread.c (create_thread_object): Use
2508 inferior_to_inferior_object.
2509 (thpy_is_stopped): Use thread pointer directly.
2510 (gdbpy_selected_thread): Use inferior_thread.
2511 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2512 field, replaced with ...
2513 <thread>: ... this new field. All users adjusted.
2514 (btpy_insn_or_gap_new): Drop const.
2515 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2517 * python/py-record.c: Include "gdbthread.h".
2518 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2519 a ptid_t. All callers adjusted.
2520 (gdbpy_current_recording): Use inferior_thread.
2521 * python/py-record.h (recpy_record_object) <ptid>: Delete
2522 field, replaced with ...
2523 <thread>: ... this new field. All users adjusted.
2524 (recpy_element_object) <ptid>: Delete
2525 field, replaced with ...
2526 <thread>: ... this new field. All users adjusted.
2527 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2528 a ptid_t. All callers adjusted.
2529 * python/py-threadevent.c: Include "gdbthread.h".
2530 (get_event_thread): Use thread_to_thread_object.
2531 * python/python-internal.h (struct inferior_object): Forward
2533 (find_thread_object, find_inferior_object): Delete declarations.
2534 (thread_to_thread_object, inferior_to_inferior_object): New
2536 * record-btrace.c: Include "inferior.h".
2537 (require_btrace_thread): Use inferior_thread.
2538 (record_btrace_frame_sniffer)
2539 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2540 (get_thread_current_frame): Use scoped_restore_current_thread and
2542 (get_thread_current_frame): Use thread pointer directly.
2543 (record_btrace_replay_at_breakpoint): Use thread's inferior
2545 * record-full.c: Include "inferior.h".
2546 * regcache.c: Include "gdbthread.h".
2547 (get_thread_arch_regcache): Use the inferior's address space
2549 (get_thread_regcache, registers_changed_thread): New.
2550 * regcache.h (get_thread_regcache(thread_info *thread)): New
2552 (registers_changed_thread): New.
2553 (remote_target) <remote_detach_1>: Swap order of parameters.
2554 (remote_add_thread): <remote_add_thread>: Return the new thread.
2555 (get_remote_thread_info(ptid_t)): New overload.
2556 (remote_target::remote_notice_new_inferior): Use thread pointers
2558 (remote_target::process_initial_stop_replies): Use
2559 thread_info::set_running.
2560 (remote_target::remote_detach_1, remote_target::detach)
2561 (extended_remote_target::detach): Adjust.
2562 * stack.c (frame_show_address): Use inferior_thread.
2563 * target-debug.h (target_debug_print_thread_info_pp): New.
2564 * target-delegates.c: Regenerate.
2565 * target.c (default_thread_address_space): Delete.
2566 (memory_xfer_partial_1): Use current_inferior.
2567 (target_detach): Use current_inferior.
2568 (target_thread_address_space): Delete.
2569 (generic_mourn_inferior): Use current_inferior.
2570 * target.h (struct target_ops) <thread_address_space>: Delete.
2571 (target_thread_address_space): Delete.
2572 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2574 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2575 thread pointer instead of a ptid_t. Adjust all callers.
2576 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2577 (first_thread_of_process): Delete, replaced by ...
2578 (first_thread_of_inferior): ... this new function. All callers
2580 (any_thread_of_process): Rename to ...
2581 (any_thread_of_inferior): ... this, and take an inferior pointer.
2582 (any_live_thread_of_process): Rename to ...
2583 (any_live_thread_of_inferior): ... this, and take an inferior
2585 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2586 (value_in_thread_stack_temporaries)
2587 (get_last_thread_stack_temporary): Take a thread pointer instead
2588 of a ptid_t. Adjust all callers.
2589 (thread_info::set_running): New.
2590 (validate_registers_access): Use inferior_thread.
2591 (can_access_registers_ptid): Rename to ...
2592 (can_access_registers_thread): ... this, and take a thread
2594 (print_thread_info_1): Adjust to compare thread pointers instead
2596 (switch_to_no_thread, switch_to_thread): Make extern.
2597 (scoped_restore_current_thread::~scoped_restore_current_thread):
2598 Use m_thread pointer directly.
2599 (scoped_restore_current_thread::scoped_restore_current_thread):
2600 Use inferior_thread.
2601 (thread_command): Use thread pointer directly.
2602 (thread_num_make_value_helper): Use inferior_thread.
2603 * top.c (execute_command): Use inferior_thread.
2604 * tui/tui-interp.c: Include "inferior.h".
2605 * varobj.c (varobj_create): Use inferior_thread.
2606 (value_of_root_1): Use find_thread_global_id instead of
2607 global_thread_id_to_ptid.
2609 2018-06-21 Alan Hayward <alan.hayward@arm.com>
2611 * regcache.c (readable_regcache::read_part): Avoid memcpy when
2613 (regcache::write_part): Likewise.
2614 (readable_regcache::cooked_read_part): Update comment.
2615 (readable_regcache::cooked_write_part): Likewise.
2616 * regcache.h: (readable_regcache::read_part): Likewise.
2617 (regcache::write_part): Likewise.
2619 2018-06-21 Richard Bunt <richard.bunt@arm.com>
2620 Dirk Schubert <dirk.schubert@arm.com>
2622 * aarch64-linux-nat.c (post_attach): New.
2623 (aarch64_linux_nat_target::post_attach): Override post_attach to
2624 record the number of hardware debug registers.
2626 2018-06-20 Tom Tromey <tom@tromey.com>
2628 * python/py-param.c (add_setshow_generic): Make parameters const.
2629 (parmpy_init): Update.
2631 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2633 * regcache.h (regcache_cooked_read_ftype): Rename to...
2634 (register_read_ftype): ...this, change type to function_view.
2635 (class reg_buffer) <save>: Remove src parameter.
2636 (readonly_detached_regcache) <readonly_detached_regcache>: Make
2637 parameter non-const in first overload. Remove src parameter in
2639 * regcache.c (do_cooked_read): Remove.
2640 (readonly_detached_regcache::readonly_detached_regcache): Make
2641 parameter non-const, adjust call to other constructor.
2642 (reg_buffer::save): Remove src parameter.
2643 * frame.c (do_frame_register_read): Remove.
2644 (frame_save_as_regcache): Use lambda function.
2645 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2646 parameter to ppu2spu_data *.
2647 (ppu2spu_sniffer): Use lambda function.
2649 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2651 * record-full.c (record_full_target::insert_breakpoint): Remove
2652 "struct" keyword, add const.
2654 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2656 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2657 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2658 * configure.ac: Remove AC_PREREQ, add missing quoting.
2659 * gnulib/configure.ac: Modernize usage of
2660 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
2661 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2662 (AUTOMAKE_VERSION): Bump to 1.15.1.
2663 * configure: Re-generate.
2664 * config.in: Re-generate.
2665 * aclocal.m4: Re-generate.
2666 * gnulib/aclocal.m4: Re-generate.
2667 * gnulib/config.in: Re-generate.
2668 * gnulib/configure: Re-generate.
2669 * gnulib/import/Makefile.in: Re-generate.
2671 2018-06-19 Pedro Alves <palves@redhat.com>
2673 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2674 (lookup_minimal_symbol_by_pc_section): ... here with
2675 gdb_assert_not_reached added.
2677 2018-06-19 Pedro Alves <palves@redhat.com>
2679 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2680 parameter with a block parameter. Compare location's block symbol
2681 with the frame's block instead of addresses.
2682 (skip_inline_frames): Pass the current block instead of the
2683 frame's address. Break out as soon as we determine the frame
2684 should not be skipped.
2686 2018-06-18 Tom Tromey <tom@tromey.com>
2688 * solib-aix.c (solib_aix_get_section_offsets): Return
2690 (solib_aix_solib_create_inferior_hook): Update.
2692 2018-06-18 Tom Tromey <tom@tromey.com>
2694 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2696 2018-06-18 Tom Tromey <tom@tromey.com>
2698 * solib-frv.c (frv_relocate_main_executable): Use
2700 * solib-dsbt.c (dsbt_relocate_main_executable): Use
2703 2018-06-18 Tom Tromey <tom@tromey.com>
2705 * objfiles.h (inhibit_section_map_updates): Update.
2706 (resume_section_map_updates, resume_section_map_updates_cleanup):
2708 * solib-svr4.c (svr4_handle_solib_event): Update.
2709 * objfiles.c (inhibit_section_map_updates): Return
2710 scoped_restore_tmpl<int>.
2711 (resume_section_map_updates, resume_section_map_updates_cleanup):
2714 2018-06-18 Tom Tromey <tom@tromey.com>
2716 * valprint.h (read_string): Update.
2717 * valprint.c (read_string): Change type of "buffer".
2718 (val_print_string): Update.
2719 * python/py-value.c (valpy_string): Update.
2720 * language.h (struct language_defn) <la_get_string>: Change
2722 (default_get_string, c_get_string): Update.
2723 * language.c (default_get_string): Change type of "buffer".
2724 * guile/scm-value.c (gdbscm_value_to_string): Update.
2725 * c-lang.c (c_get_string): Change type of "buffer".
2727 2018-06-18 Tom Tromey <tom@tromey.com>
2729 * ser-mingw.c (struct pipe_state_destroyer): New.
2730 (pipe_state_up): New typedef.
2731 (cleanup_pipe_state): Remove.
2732 (pipe_windows_open): Use pipe_state_up. Don't release argv.
2734 2018-06-18 Tom Tromey <tom@tromey.com>
2736 * rust-lang.h (rust_yyerror): Don't declare.
2737 * rust-lang.c (rust_language_defn): Update.
2738 * rust-exp.y (yyerror): Now static.
2739 * parse.c (parse_exp_in_context_1): Update.
2740 * p-lang.h (p_yyerror): Don't declare.
2741 * p-lang.c (p_language_defn): Update.
2742 * p-exp.y (yyerror): Now static.
2743 * opencl-lang.c (opencl_language_defn): Update.
2744 * objc-lang.c (objc_language_defn): Update.
2745 * m2-lang.h (m2_yyerror): Don't declare.
2746 * m2-lang.c (m2_language_defn): Update.
2747 * m2-exp.y (yyerror): Now static.
2748 * language.h (struct language_defn) <la_error>: Remove.
2749 * language.c (unk_lang_error): Remove.
2750 (unknown_language_defn, auto_language_defn): Remove.
2751 * go-lang.h (go_yyerror): Don't declare.
2752 * go-lang.c (go_language_defn): Update.
2753 * go-exp.y (yyerror): Now static.
2754 * f-lang.h (f_yyerror): Don't declare.
2755 * f-lang.c (f_language_defn): Update.
2756 * f-exp.y (yyerror): Now static.
2757 * d-lang.h (d_yyerror): Don't declare.
2758 * d-lang.c (d_language_defn): Update.
2759 * d-exp.y (yyerror): Now static.
2760 * c-lang.h (c_yyerror): Don't declare.
2761 * c-lang.c (c_language_defn, cplus_language_defn)
2762 (asm_language_defn, minimal_language_defn): Update.
2763 * c-exp.y (yyerror): Now static.
2764 * ada-lang.h (ada_yyerror): Don't declare.
2765 * ada-lang.c (ada_language_defn): Update.
2766 * ada-exp.y (yyerror): Now static.
2768 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2770 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2771 (store_sveregs_to_thread): Likewise.
2772 (aarch64_linux_fetch_inferior_registers): Check for SVE.
2773 (aarch64_linux_store_inferior_registers): Likewise.
2774 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2776 (aarch64_sve_regs_copy_to_regcache): Likewise.
2777 (aarch64_sve_regs_copy_from_regcache): Likewise.
2778 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2780 (aarch64_sve_regs_copy_to_regcache): Likewise.
2781 (aarch64_sve_regs_copy_from_regcache): Likewise.
2782 (sve_context): Structure from Linux headers.
2783 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2784 (SVE_SIG_ZREG_SIZE): Likewise.
2785 (SVE_SIG_PREG_SIZE): Likewise.
2786 (SVE_SIG_FFR_SIZE): Likewise.
2787 (SVE_SIG_REGS_OFFSET): Likewise.
2788 (SVE_SIG_ZREGS_OFFSET): Likewise.
2789 (SVE_SIG_ZREG_OFFSET): Likewise.
2790 (SVE_SIG_ZREGS_SIZE): Likewise.
2791 (SVE_SIG_PREGS_OFFSET): Likewise.
2792 (SVE_SIG_PREG_OFFSET): Likewise.
2793 (SVE_SIG_PREGS_SIZE): Likewise.
2794 (SVE_SIG_FFR_OFFSET): Likewise.
2795 (SVE_SIG_REGS_SIZE): Likewise.
2796 (SVE_SIG_CONTEXT_SIZE): Likewise.
2797 (SVE_PT_REGS_MASK): Likewise.
2798 (SVE_PT_REGS_FPSIMD): Likewise.
2799 (SVE_PT_REGS_SVE): Likewise.
2800 (SVE_PT_VL_INHERIT): Likewise.
2801 (SVE_PT_VL_ONEXEC): Likewise.
2802 (SVE_PT_REGS_OFFSET): Likewise.
2803 (SVE_PT_FPSIMD_OFFSET): Likewise.
2804 (SVE_PT_FPSIMD_SIZE): Likewise.
2805 (SVE_PT_SVE_ZREG_SIZE): Likewise.
2806 (SVE_PT_SVE_PREG_SIZE): Likewise.
2807 (SVE_PT_SVE_FFR_SIZE): Likewise.
2808 (SVE_PT_SVE_FPSR_SIZE): Likewise.
2809 (SVE_PT_SVE_FPCR_SIZE): Likewise.
2810 (__SVE_SIG_TO_PT): Likewise.
2811 (SVE_PT_SVE_OFFSET): Likewise.
2812 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2813 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2814 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2815 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2816 (SVE_PT_SVE_PREG_OFFSET): Likewise.
2817 (SVE_PT_SVE_PREGS_SIZE): Likewise.
2818 (SVE_PT_SVE_FFR_OFFSET): Likewise.
2819 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2820 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2821 (SVE_PT_SVE_SIZE): Likewise.
2822 (SVE_PT_SIZE): Likewise.
2823 (HAS_SVE_STATE): New define.
2825 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2827 * nat/aarch64-sve-linux-sigcontext.h: New file.
2828 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2830 (SVE_VQ_MIN): Likewise.
2831 (SVE_VQ_MAX): Likewise.
2832 (SVE_VL_MIN): Likewise.
2833 (SVE_VL_MAX): Likewise.
2834 (SVE_NUM_ZREGS): Likewise.
2835 (SVE_NUM_PREGS): Likewise.
2836 (sve_vl_valid): Likewise.
2837 (struct user_sve_header): Likewise.
2839 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
2840 Richard Bunt <Richard.Bunt@arm.com>
2842 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2843 was requested by GDB.
2845 2018-06-15 Tom de Vries <tdevries@suse.de>
2847 * MAINTAINERS (Write After Approval): Add Tom de Vries.
2849 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
2851 * gnulib/update-gnulib.sh: Print expected versions of
2854 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
2856 * arch-utils.c (default_type_align): Use type_length_units.
2857 * gdbtypes.c (type_align): Use type_length_units.
2859 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2861 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2862 of 'define' command.
2864 2018-06-14 Tom de Vries <tdevries@suse.de>
2867 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2868 get_no_prettyformat_print_options.
2870 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
2872 * sparc-nat.h: Include target.h.
2873 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2874 <fetch_registers>: Remove this argument in function call.
2875 <store_registers>: Remove this argument in function call, remove
2877 <low_forget_process>: Call sparc64_forget_process instead of
2878 sparc_forget_process.
2880 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2882 * procfs.c (_initialize_procfs): Use add_inf_child_target.
2883 (procfs_target::make_corefile_notes): Adjust to new
2884 target_read_alloc return type.
2886 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2887 Stephen Roberts <stephen.roberts@arm.com>
2890 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2891 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2892 Move should_notify_stop local into more inner scope.
2894 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2895 Stephen Roberts <stephen.roberts@arm.com>
2898 * infrun.c (resume_1): Add call to mark_async_event_handler.
2900 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2902 * infrun.c (do_target_wait): Change old version of $pc printed.
2904 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
2906 * dwarf2read.c (read_index_from_section): Rename to...
2907 (read_gdb_index_from_section): ... this, update all callers.
2908 (dwarf2_read_index): Rename to...
2909 (dwarf2_read_gdb_index): ... this, update all callers.
2911 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
2913 * gdb/hppa-linux-nat.c
2914 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2915 hppa_linux_nat_target::fetch_registers.
2917 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2919 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2920 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2921 (AARCH64_DWARF_SVE_FFR): Likewise.
2922 (AARCH64_DWARF_SVE_P0): Likewise.
2923 (AARCH64_DWARF_SVE_Z0): Likewise.
2925 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2927 * common/common-regcache.h (raw_compare): New function.
2928 * regcache.c (regcache::raw_compare): Likewise.
2929 * regcache.h (regcache::raw_compare): New declaration.
2931 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2933 * common/common-regcache.h (reg_buffer_common): New structure.
2934 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2935 (reg_buffer::raw_supply): Likewise.
2936 (reg_buffer::raw_supply_integer): Likewise.
2937 (reg_buffer::raw_supply_zeroed): Likewise.
2938 (reg_buffer::raw_collect): Likewise.
2939 (reg_buffer::raw_collect_integer): Likewise.
2940 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2941 (reg_buffer::raw_supply): Likewise.
2942 (reg_buffer::raw_supply_integer): Likewise.
2943 (reg_buffer::raw_supply_zeroed): Likewise.
2944 (reg_buffer::raw_collect): Likewise.
2945 (reg_buffer::raw_collect_integer): Likewise.
2947 2018-06-10 Tom Tromey <tom@tromey.com>
2949 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
2950 (class remote_state) <stop_reply_queue>: Now std::vector.
2951 (remote_state::~remote_state)
2952 (remote_target::stop_reply_queue_length): Update.
2953 (struct queue_iter_param, remove_child_of_pending_fork)
2954 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2955 (check_pending_event_prevents_wildcard_vcont_callback)
2956 (remove_stop_reply_for_inferior)
2957 (remove_stop_reply_of_remote_state)
2958 (remote_notif_remove_once_on_match)
2959 (stop_reply_match_ptid_and_ws)
2960 (remote_kill_child_of_pending_fork): Remove.
2961 (remote_target::remove_new_fork_children)
2962 (remote_target::check_pending_events_prevent_wildcard_vcont)
2963 (remote_target::discard_pending_stop_replies)
2964 (remote_target::discard_pending_stop_replies_in_queue)
2965 (remote_target::remote_notif_remove_queued_reply)
2966 (remote_target::queued_stop_reply)
2967 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2968 (remote_target::wait, remote_target::kill_new_fork_children)
2969 (remote_target::async): Update.
2971 2018-06-10 Tom Tromey <tom@tromey.com>
2973 * record-full.c (record_full_arch_list_cleanups): Remove.
2974 (record_full_message): Use try/catch.
2975 (record_full_wait_cleanups): Remove.
2976 (record_full_wait_1): Use try/catch.
2977 (record_full_restore): Likewise.
2979 2018-06-10 Tom Tromey <tom@tromey.com>
2981 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
2982 declare VEC. Add constructor.
2983 <in_target_beneath>: Now bool.
2984 (record_full_breakpoints): Now a std::vector, static.
2985 (record_full_sync_record_breakpoints)
2986 (record_full_init_record_breakpoints)
2987 (record_full_target::insert_breakpoint)
2988 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
2990 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
2992 * dwarf2read.c (process_cu_includes): Remove struct keyword.
2993 * serial.c (serial_interface_lookup): Remove struct keyword.
2995 2018-06-10 Tom Tromey <tom@tromey.com>
2997 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
2999 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3001 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3003 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3004 "beneath" as a method.
3005 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3006 Use "beneath" as a method.
3008 2018-06-10 Tom Tromey <tom@tromey.com>
3010 * tracefile.c (struct trace_file_writer_deleter): New.
3011 <operator()>: Rename from trace_file_writer_xfree.
3012 (trace_file_writer_up): New typedef.
3013 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3015 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3017 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3018 <m_registers, m_register_status>: Change type to
3020 * regcache.c (reg_buffer::reg_buffer): Use new instead of
3023 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3025 * common/common-regcache.h (enum register_status): Add
3026 underlying type "signed char".
3027 * regcache.h (reg_buffer) <m_register_status>: Change type to
3029 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3030 register_status instead of signed char.
3031 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3032 (reg_buffer::get_register_status): Remove cast.
3033 (readable_regcache::raw_read): Remove cast.
3034 (readable_regcache::cooked_read): Remove cast.
3036 2018-06-09 Tom Tromey <tom@tromey.com>
3038 * source.c (reverse_search_command, forward_search_command): Use
3041 2018-06-09 Tom Tromey <tom@tromey.com>
3043 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
3044 (serial_ops_list): Now static, std::vector.
3045 (serial_interface_lookup, serial_add_interface): Update.
3047 2018-06-09 Tom Tromey <tom@tromey.com>
3049 * dwarf2read.c (process_cu_includes): Update.
3050 (process_full_comp_unit): Update.
3051 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3054 2018-06-08 Paul Koning <paul_koning@dell.com>
3058 * python/python.c (do_start_initialization):
3059 Avoid call to internal Python API.
3060 (init__gdb_module): New function.
3062 2018-06-08 Gary Benson <gbenson@redhat.com>
3064 * linux-thread-db.c (valprint.h): New include.
3065 (struct check_thread_db_info): New structure.
3066 (check_thread_db_on_load, tdb_testinfo): New static globals.
3067 (check_thread_db, check_thread_db_callback): New functions.
3068 (try_thread_db_load_1): Run integrity checks if requested.
3069 (maintenance_check_libthread_db): New function.
3070 (_initialize_thread_db): Register "maint check libthread-db"
3071 and "maint set/show check-libthread-db".
3072 * NEWS: Mention the above new commands.
3074 2018-06-08 Tom Tromey <tom@tromey.com>
3076 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3079 2018-06-08 Tom Tromey <tom@tromey.com>
3081 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3083 2018-06-08 Tom Tromey <tom@tromey.com>
3085 * common/btrace-common.h (struct btrace_data): Add constructor,
3086 destructor, move assignment operator.
3087 <empty, clear, fini>: New methods.
3088 <format>: Initialize.
3089 (btrace_data_init, btrace_data_fini, btrace_data_clear)
3090 (btrace_data_empty): Don't declare.
3091 * common/btrace-common.c (btrace_data_init): Remove.
3092 (btrace_data::fini): Rename from btrace_data_fini.
3093 (btrace_data::empty): Rename from btrace_data_empty.
3094 (btrace_data::clear): Rename from btrace_data_clear. Return
3096 * btrace.h (make_cleanup_btrace_data): Don't declare.
3097 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3098 (parse_xml_btrace): Update.
3099 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3100 (maint_btrace_clear_packet_history_cmd): Update.
3102 2018-06-07 Pedro Alves <palves@redhat.com>
3104 * target.h (target_ops) <beneath>: Now a method. All references
3106 (class target_stack): New.
3107 * target.c (g_target_stack): New.
3108 (g_current_top_target): Delete.
3109 (current_top_target): Get the top target out of g_target_stack.
3110 (target_stack::push, target_stack::unpush): New.
3111 (push_target, unpush_target): Reimplement.
3112 (target_is_pushed): Reimplement in terms of g_target_stack.
3113 (target_ops::beneath, target_stack::find_beneath): New.
3115 2018-06-07 Pedro Alves <palves@redhat.com>
3117 * target.h (find_target_beneath): Delete declaration.
3118 * target.c (find_target_beneath): Delete definition.
3119 * aix-thread.c: All callers of find_target_beneath adjusted to
3120 call target_ops::beneath instead.
3121 * bsd-uthread.c: Likewise.
3122 * linux-thread-db.c: Likewise.
3123 * ravenscar-thread.c: Likewise.
3124 * sol-thread.c: Likewise.
3125 * spu-multiarch.c: Likewise.
3127 2018-06-07 Pedro Alves <palves@redhat.com>
3129 * target.h (target_ops) <beneath>: Now a method. All references
3131 (target_ops) <m_beneath>: New.
3132 * target.c (target_ops::beneath): New.
3133 * corelow.c: Adjust all references to target_ops::beneath.
3134 * linux-thread-db.c: Likewise.
3135 * make-target-delegates: Likewise.
3136 * record-btrace.c: Likewise.
3137 * record-full.c: Likewise.
3138 * remote.c: Likewise.
3139 * target.c: Likewise.
3140 * target-delegates.c: Regenerate.
3142 2018-06-07 Pedro Alves <palves@redhat.com>
3144 * target.h (target_stack): Delete.
3145 (current_top_target): Declare function.
3146 * target.c (target_stack): Delete.
3147 (g_current_top_target): New.
3148 (current_top_target): New function.
3149 * auxv.c: Use current_top_target instead of target_stack
3151 * avr-tdep.c: Likewise.
3152 * breakpoint.c: Likewise.
3153 * corefile.c: Likewise.
3154 * elfread.c: Likewise.
3156 * exceptions.c: Likewise.
3157 * frame.c: Likewise.
3158 * gdbarch-selftests.c: Likewise.
3159 * gnu-v3-abi.c: Likewise.
3160 * ia64-tdep.c: Likewise.
3161 * ia64-vms-tdep.c: Likewise.
3162 * infcall.c: Likewise.
3163 * infcmd.c: Likewise.
3164 * infrun.c: Likewise.
3165 * linespec.c: Likewise.
3166 * linux-tdep.c: Likewise.
3167 * minsyms.c: Likewise.
3168 * ppc-linux-nat.c: Likewise.
3169 * ppc-linux-tdep.c: Likewise.
3170 * procfs.c: Likewise.
3171 * regcache.c: Likewise.
3172 * remote.c: Likewise.
3173 * rs6000-tdep.c: Likewise.
3174 * s390-linux-nat.c: Likewise.
3175 * s390-tdep.c: Likewise.
3176 * solib-aix.c: Likewise.
3177 * solib-darwin.c: Likewise.
3178 * solib-dsbt.c: Likewise.
3179 * solib-spu.c: Likewise.
3180 * solib-svr4.c: Likewise.
3181 * solib-target.c: Likewise.
3182 * sparc-tdep.c: Likewise.
3183 * sparc64-tdep.c: Likewise.
3184 * spu-tdep.c: Likewise.
3185 * symfile.c: Likewise.
3186 * symtab.c: Likewise.
3187 * target-descriptions.c: Likewise.
3188 * target-memory.c: Likewise.
3189 * target.c: Likewise.
3190 * target.h: Likewise.
3191 * tracefile-tfile.c: Likewise.
3192 * tracepoint.c: Likewise.
3193 * valops.c: Likewise.
3194 * valprint.c: Likewise.
3195 * value.c: Likewise.
3196 * windows-tdep.c: Likewise.
3197 * mi/mi-main.c: Likewise.
3199 2018-06-07 Tom Tromey <tom@tromey.com>
3201 * valprint.h (build_address_symbolic): Declare.
3202 * printcmd.c (print_address_symbolic): Update.
3203 (build_address_symbolic): Change "name" and "filename" to
3205 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3207 * defs.h (build_address_symbolic): Remove declaration.
3209 2018-06-07 Alan Hayward <alan.hayward@arm.com>
3211 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3212 (aarch64_vnv_type): Add function.
3213 (aarch64_pseudo_register_name): Add V regs for SVE.
3214 (aarch64_pseudo_register_type): Likewise.
3215 (aarch64_pseudo_register_reggroup_p): Likewise.
3216 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3217 (aarch64_pseudo_read_value): Add V regs for SVE.
3218 (aarch64_pseudo_write_2): Use V0 offset for SVE
3219 (aarch64_pseudo_write): Add V regs for SVE.
3220 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3222 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3224 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3225 (sve_vl_from_vq): Likewise.
3227 2018-06-05 Tom Tromey <tom@tromey.com>
3229 * cli/cli-cmds.c (show_version): Update.
3230 * top.c (print_gdb_version): Add "interactive" parameter.
3232 * main.c (captured_main_1): Update.
3233 * top.h (print_gdb_version): Add "interactive" parameter and a
3236 2018-06-05 David Malcolm <dmalcolm@redhat.com>
3238 * common/enum-flags.h: Add trailing semicolon to example in
3241 2018-06-05 Tom Tromey <tom@tromey.com>
3244 * NEWS: Add entry about pager.
3245 * utils.c (pagination_disabled_for_command): New global.
3246 (prompt_for_continue): Allow "c" response to prompt.
3247 (reinitialize_more_filter): Clear
3248 pagination_disabled_for_command.
3249 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3251 2018-06-04 Tom Tromey <tom@tromey.com>
3253 * ada-lang.h (ada_lookup_symbol_list): Update.
3254 * ada-lang.c (resolve_subexp): Update.
3255 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3257 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3258 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3259 results parameter to std::vector.
3260 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3262 * ada-exp.y (block_lookup): Update.
3263 (select_possible_type_sym): Change type of syms. Remove nsyms
3265 (write_var_or_type, write_name_assoc): Update.
3267 2018-06-04 Joel Brobecker <brobecker@adacore.com>
3269 * windows-nat.c (windows_nat_target::xfer_partial): Return
3270 TARGET_XFER_E_IO if we need to delegate to the target beneath
3271 but BENEATH is NULL.
3273 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3275 * Makefile.in (config.status): Add configure.nat as a
3278 2018-06-04 Tom Tromey <tom@tromey.com>
3280 * cp-name-parser.y (cpname_state): Add method declarations.
3281 (HANDLE_QUAL): Update.
3282 (cpname_state::d_grab, cpname_state::fill_comp)
3283 (cpname_state::make_operator, cpname_state::make_dtor)
3284 (cpname_state::make_builtin_type, cpname_state::make_name)
3285 (cpname_state::d_qualify, cpname_state::d_int_type)
3286 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3287 (%union): Move earlier.
3289 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3291 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3293 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3295 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3296 (aarch64_pseudo_write_1): Likewise.
3297 (aarch64_pseudo_read_value): Use helper.
3298 (aarch64_pseudo_write): Likewise.
3300 2018-06-04 Pedro Alves <palves@redhat.com>
3302 * darwin-nat.c (darwin_ops): Delete.
3303 (darwin_attach_pid): Use get_native_target.
3305 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3307 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3308 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3310 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3312 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3313 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3314 (aarch64_gdbarch_init): Check for SVE.
3315 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3317 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3319 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3320 * aarch64-tdep.h (aarch64_read_description): Likewise.
3321 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3322 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3323 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3324 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3325 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3327 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3329 * value.c (value_fetch_lazy_bitfield): New.
3330 (value_fetch_lazy_memory): New.
3331 (value_fetch_lazy_register): New.
3332 (value_fetch_lazy): Factor out to smaller functions.
3334 2018-06-01 Tom Tromey <tom@tromey.com>
3336 * cp-name-parser.y (backslashable, represented): Now const.
3338 2018-06-01 Tom Tromey <tom@tromey.com>
3340 * cp-name-parser.y: Include parser-defs.h.
3341 (parser_fprintf): Remove declaration.
3343 2018-06-01 Tom Tromey <tom@tromey.com>
3345 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3347 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3348 (global_result): Remove globals.
3349 (struct cpname_state): New.
3350 (yyparse): Don't declare.
3351 (yylex, yyerror): Move declarations after %union.
3352 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3353 (make_name): Add state parameter.
3355 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3357 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3359 (yylex): Add lvalp, state parameters.
3360 (yyerror): Add state parameter.
3361 (cp_demangled_name_to_comp): Update.
3363 2018-06-01 Tom Tromey <tom@tromey.com>
3365 * cp-name-parser.y (parser_fprintf): Declare.
3366 (GDB_YY_REMAP_PREFIX): Define.
3367 Include yy-remap.h. Don't redefine yy* identifiers.
3369 2018-06-01 Tom Tromey <tom@tromey.com>
3371 * python/py-type.c (typy_legacy_template_argument): Update.
3372 * cp-support.h (cp_demangled_name_to_comp): Update.
3373 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3374 parameter to be a "std::string *".
3377 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3379 * ada-lex.l: Include "diagnostics.h" instead of
3380 "common/diagnostics.h".
3381 * unittests/environ-selftests.c: Likewise.
3382 * common/diagnostics.h: Moved to ../include.
3384 2018-06-01 Joel Brobecker <brobecker@adacore.com>
3386 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3387 to language_mode_manual while calling breakpoint_re_set_one.
3389 2018-06-01 Tom Tromey <tom@tromey.com>
3391 * valops.c (value_cast_structs, destructor_name_p): Update.
3392 * symtab.c (gdb_mangle_name): Update.
3393 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3395 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3396 (pascal_object_print_value_fields, pascal_object_print_value):
3398 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3399 * linespec.c (find_methods): Update.
3400 * gdbtypes.h (type_name_no_tag): Remove.
3401 (type_name_or_error): Rename from type_name_no_tag_or_error.
3402 * gdbtypes.c (type_name_no_tag): Remove.
3403 (type_name_or_error): Rename from type_name_no_tag_or_error.
3404 (lookup_struct_elt_type, check_typedef): Update.
3405 * expprint.c (print_subexp_standard): Update.
3406 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3407 * d-namespace.c (d_lookup_nested_symbol): Update.
3408 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3409 (cp_print_class_member): Update.
3410 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3411 * completer.c (add_struct_fields): Update.
3412 * c-typeprint.c (cp_type_print_derivation_info)
3413 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3415 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3416 (ada_prefer_type, ada_is_exception_sym): Update.
3418 2018-06-01 Tom Tromey <tom@tromey.com>
3420 * valops.c (enum_constant_from_type, value_namespace_elt)
3421 (value_maybe_namespace_elt): Update.
3422 * valarith.c (find_size_for_pointer_math): Update.
3423 * target-descriptions.c (make_gdb_type): Update.
3424 * symmisc.c (print_symbol): Update.
3425 * stabsread.c (define_symbol, read_type)
3426 (complain_about_struct_wipeout, add_undefined_type)
3427 (cleanup_undefined_types_1): Update.
3428 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3429 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3430 (rust_internal_print_type, rust_composite_type)
3431 (rust_evaluate_funcall, rust_evaluate_subexp)
3432 (rust_inclusive_range_type_p): Update.
3433 * python/py-type.c (typy_get_tag): Update.
3434 * p-typeprint.c (pascal_type_print_base): Update.
3435 * mdebugread.c (parse_symbol, parse_type): Update.
3436 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3438 * guile/scm-type.c (gdbscm_type_tag): Update.
3439 * go-lang.c (sixg_string_p): Update.
3440 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3442 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3443 (TYPE_TAG_NAME): Remove.
3444 * gdbtypes.c (type_name_no_tag): Simplify.
3445 (check_typedef, check_types_equal, recursive_dump_type)
3446 (copy_type_recursive, arch_composite_type): Update.
3447 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3448 in summary mode when needed.
3449 * eval.c (evaluate_funcall): Update.
3450 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3451 (process_structure_scope, read_enumeration_type)
3452 (read_namespace_type, read_module_type, determine_prefix): Update.
3453 * cp-support.c (inspect_type): Update.
3454 * coffread.c (process_coff_symbol, decode_base_type): Update.
3455 * c-varobj.c (c_is_path_expr_parent): Update.
3456 * c-typeprint.c (c_type_print_base_struct_union): Update.
3457 (c_type_print_base_1): Update. Print struct/class/union/enum in
3458 summary when using C language.
3459 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3460 (gen_maybe_namespace_elt): Update.
3461 * ada-lang.c (ada_type_name): Simplify.
3462 (empty_record, ada_template_to_fixed_record_type_1)
3463 (template_to_static_fixed_type)
3464 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3466 2018-06-01 Tom Tromey <tom@tromey.com>
3468 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3470 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3471 (c_print_type): Update.
3472 (c_print_type): New overload.
3473 (c_type_print_varspec_prefix, c_type_print_args)
3474 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3475 (c_type_print_base_struct_union, c_type_print_base_1)
3476 (cp_type_print_method_args): Add "language" parameter.
3477 (c_type_print_base): Update.
3478 * c-lang.h (c_print_type): Add new overload.
3480 2018-06-01 Tom Tromey <tom@tromey.com>
3482 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3483 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3485 2018-06-01 Alan Hayward <alan.hayward@arm.com>
3487 * aarch64-tdep.c (aarch64_sve_register_names): New const
3489 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3490 (AARCH64_SVE_Z_REGS_NUM): New define.
3491 (AARCH64_SVE_P_REGS_NUM): Likewise.
3492 (AARCH64_SVE_NUM_REGS): Likewise.
3494 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
3496 * nat/linux-ptrace.h [__alpha__]
3497 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3500 2018-05-31 Maciej W. Rozycki <macro@mips.com>
3502 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3503 the endianness selected.
3504 * NEWS: Document `set endian auto' mode operation update.
3506 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3508 * Makefile.in: Add new header.
3509 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3510 (sve_vl_from_vg): Likewise.
3511 (sve_vq_from_vl): Likewise.
3512 (sve_vl_from_vq): Likewise.
3513 (sve_vq_from_vg): Likewise.
3514 (sve_vg_from_vq): Likewise.
3515 * configure.nat: Add new c file.
3516 * nat/aarch64-sve-linux-ptrace.c: New file.
3517 * nat/aarch64-sve-linux-ptrace.h: New file.
3519 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3521 * aarch64-linux-nat.c (aarch64_linux_read_description):
3523 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3525 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3526 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3527 (aarch64_gdbarch_init): Add parmeter zero.
3528 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3529 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3530 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3532 * doc/gdb.texinfo: Describe SVE feature
3533 * features/aarch64-sve.c: New file.
3535 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
3538 * gdbarch.sh (significant_addr_bit): Default to zero when
3539 not set by target architecture.
3540 * gdbarch.c: Re-generated.
3541 * utils.c (address_significant): Update.
3543 2018-05-30 Joel Brobecker <brobecker@adacore.com>
3545 * stack.c (func_command): Remove trailing newline in call to error.
3547 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3549 * regcache.h (regcache_raw_collect): Remove, update callers to
3550 use regcache::raw_collect.
3551 * regcache.c (regcache_raw_collect): Remove.
3553 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3555 * regcache.h (regcache_raw_supply): Remove, update callers to
3556 use detached_regcache::raw_supply.
3557 * regcache.c (regcache_raw_supply): Remove.
3559 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3561 * regcache.h (regcache_cooked_write_part): Remove, update
3562 callers to use regcache::cooked_write_part.
3563 * regcache.c (regcache_cooked_write_part): Remove.
3565 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3567 * regcache.h (regcache_cooked_read_part): Remove, update callers
3568 to use readable_regcache::cooked_read_part.
3569 * regcache.c (regcache_cooked_read_part): Remove.
3571 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3573 * regcache.h (regcache_cooked_read_value): Remove, update
3574 callers to use readable_regcache::cooked_read_value.
3575 * regcache.c (regcache_cooked_read_value): Remove.
3577 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3579 * regcache.h (regcache_cooked_write): Remove, update callers to
3580 use regcache::cooked_write.
3581 * regcache.c (regcache_cooked_write): Remove.
3583 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3585 * regcache.h (regcache_invalidate): Remove, update callers to
3586 use detached_regcache::invalidate instead.
3587 * regcache.c (regcache_invalidate): Remove.
3589 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3591 * regcache.h (regcache_raw_write_part): Remove, update callers
3592 to use regcache::raw_write_part instead.
3593 * regcache.c (regcache_raw_write_part): Remove.
3595 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3597 * regcache.h (regcache_raw_read_part): Remove, update callers to
3598 use readable_regcache::raw_read_part instead.
3599 * regcache.c (regcache_raw_read_part): Remove.
3601 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3603 * regcache.h (regcache_cooked_read): Remove, update callers to
3604 use readable_regcache::cooked_read instead.
3605 * regcache.c (regcache_cooked_read): Remove.
3607 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3609 * regcache.h (regcache_raw_write): Remove, update callers to use
3610 regcache::raw_write instead.
3611 * regcache.c (regcache_raw_write): Remove.
3613 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3615 * regcache.h (regcache_raw_read): Remove, update callers to use
3616 readable_regcache::raw_read instead.
3617 * regcache.c (regcache_raw_read): Remove.
3619 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3621 * regcache.h (regcache_raw_update): Remove, update callers to
3622 use readable_regcache::raw_update instead.
3623 * regcache.c (regcache_raw_update): Remove.
3625 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3627 * regcache.h (regcache_register_status): Remove, update callers
3628 to use reg_buffer::get_register_status directly instead.
3629 * regcache.c (regcache_register_status): Remove.
3631 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3633 * regcache.h (regcache_get_ptid): Remove, update all callers to
3634 call regcache::ptid instead.
3635 * regcache.c (regcache_get_ptid): Remove.
3637 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3639 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3641 2018-05-30 Pedro Alves <palves@redhat.com>
3643 * common/common-exceptions.h (exception_rethrow): Use
3646 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
3648 * breakpoint.c (print_solib_event, check_status_catch_solib):
3649 Remove struct keyword in range-based for loops.
3650 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3651 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3653 * linespec.c (find_superclass_methods, search_minsyms_for_name):
3655 * symfile.c (addr_info_make_relative): Likewise.
3656 * thread.c (value_in_thread_stack_temporaries): Likewise.
3658 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
3661 * valops.c (value_struct_elt_for_reference): Call check_typedef on
3662 aggregate type to get its real type before accessing it.
3664 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
3666 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3667 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3668 * coff-pe-read.c (add_pe_forwarded_sym): Replace
3669 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3670 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3671 * jit.c (jit_breakpoint_re_set_internal): Likewise.
3672 * printcmd.c (info_address_command): Likewise.
3674 2018-05-29 Tom Tromey <tom@tromey.com>
3676 * windows-nat.c (handle_exception): Update fall-through comment.
3678 2018-05-29 Tom Tromey <tom@tromey.com>
3680 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
3681 (struct program_space) <added_solibs>: Now a std::vector.
3682 * breakpoint.c (print_solib_event): Update.
3683 (check_status_catch_solib): Update.
3684 * progspace.c (clear_program_space_solib_cache): Update.
3685 * solib.c (update_solib_list): Update.
3687 2018-05-29 Tom Tromey <tom@tromey.com>
3689 * python/py-type.c (typy_richcompare): Update.
3690 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3691 * gdbtypes.h (types_deeply_equal): Return bool.
3692 (types_equal): Likewise.
3693 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
3695 (check_types_equal): Change worklist to std::vector. Return
3697 (struct type_equality_entry): Add constructor.
3698 (compare_maybe_null_strings): Return bool.
3699 (check_types_worklist): Return bool. Change worklist to
3701 (types_deeply_equal): Use std::vector.
3702 (types_equal): Return bool.
3703 (compare_maybe_null_strings): Simplify.
3705 2018-05-29 Tom Tromey <tom@tromey.com>
3707 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
3709 2018-05-29 Tom Tromey <tom@tromey.com>
3711 * objc-lang.h: Don't include cp-support.h.
3712 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
3715 2018-05-27 Tom Tromey <tom@tromey.com>
3717 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3719 2018-05-25 Tom Tromey <tom@tromey.com>
3721 * value.c (value::location): Initialize.
3723 2018-05-25 Tom Tromey <tom@tromey.com>
3725 * dbxread.c (init_bincl_list): Remove.
3726 (bincl_list): Now a std::vector.
3727 (bincls_allocated, next_bincl): Remove.
3728 (free_bincl_list, do_free_bincl_list_cleanup)
3729 (make_cleanup_free_bincl_list): Remove.
3730 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3732 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3733 (struct header_file_location): Add constructor.
3734 (add_bincl_to_list): Remove.
3736 2018-05-25 Tom Tromey <tom@tromey.com>
3738 * tui/tui.c (tui_enable): Update.
3739 * mi/mi-interp.c (mi_interp::init): Update.
3740 * interps.h (class interp) <name>: New method.
3741 <m_name>: Rename from name.
3742 (~scoped_restore_interp): Update.
3743 * interps.c (interp::interp): Update.
3744 (interp_add, interp_set, interp_lookup_existing)
3745 (current_interp_named_p): Update.
3747 2018-05-25 Tom Tromey <tom@tromey.com>
3749 * interps.c (interp_name): Remove.
3750 * mi/mi-interp.c (mi_interp::init): Update.
3751 * interps.h (interp_name): Remove.
3752 (~scoped_restore_interp): Update.
3753 * tui/tui.c (tui_enable): Update.
3755 2018-05-25 Tom Tromey <tom@tromey.com>
3757 * utils.c (fputs_maybe_filtered): Update.
3758 * linespec.c (decode_line_full): Update.
3759 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3760 (mi_print_breakpoint_for_event, mi_solib_loaded)
3761 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3762 (mi_user_selected_context_changed): Update.
3763 * mi/mi-main.c (mi_execute_command): Update.
3764 * cli/cli-script.c (execute_control_command): Update.
3765 * python/python.c (execute_gdb_command): Update.
3766 * solib.c (info_sharedlibrary_command): Update.
3767 * interps.c (interp_ui_out): Remove.
3768 * interps.h (interp_ui_out): Remove.
3770 2018-05-25 Tom Tromey <tom@tromey.com>
3772 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3773 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3774 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3776 2018-05-25 Tom Tromey <tom@tromey.com>
3778 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3779 * interps.c (interp_exec): Use scoped_restore.
3781 2018-05-25 Tom Tromey <tom@tromey.com>
3783 * remote.c (remote_target::remote_file_get): Use
3785 (remote_target::remote_file_put): Likewise.
3787 2018-05-25 Tom Tromey <tom@tromey.com>
3789 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3791 (get_pe_section_index, add_pe_exported_sym): Update.
3792 (read_pe_exported_syms): Use gdb::def_vector.
3794 2018-05-25 Tom Tromey <tom@tromey.com>
3796 * frame.c (remove_prev_frame): Remove.
3797 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3799 2018-05-25 Maciej W. Rozycki <macro@mips.com>
3801 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3803 * mips-linux-nat.c (supply_fpregset): Always call
3804 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3805 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3806 `mips_fill_fpregset'.
3807 * mips-linux-tdep.c (mips_supply_fpregset)
3808 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3809 (mips_fill_fpregset_wrapper): Remove functions.
3810 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3811 (mips_linux_fpregset): Remove variable.
3812 (mips_linux_iterate_over_regset_sections): Use
3813 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3814 (mips_linux_o32_sigframe_init): Remove comment.
3816 2018-05-25 Pedro Alves <palves@redhat.com>
3818 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3819 (struct readahead_cache, struct packet_reg, struct
3820 remote_arch_state, class remote_state): Move higher up in the
3822 (remote_target::m_remote_state): Now an object instead of a pointer.
3823 (remote_target::get_remote_state): Adjust.
3825 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3827 * stack.c (select_and_print_frame): Delete.
3828 (struct function_bounds): Move struct within function.
3829 (func_command): Most content moved into new function
3830 find_frame_for_function, use new function, print result, add
3832 (find_frame_for_function): New function, now returns a result.
3834 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3836 * stack.c (iterate_over_block_arg_vars): Fix comment.
3837 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3839 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3843 (scoped_restore_selected_frame::scoped_restore_selected_frame):
3845 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3847 * frame.h (class scoped_restore_selected_frame): New class.
3848 * stack.c (print_frame_local_vars): Remove catching and rethrowing
3849 of any exception, use scoped_restore_selected_frame to restore the
3852 2018-05-24 Pedro Alves <palves@redhat.com>
3854 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3857 2018-05-23 Tom Tromey <tom@tromey.com>
3859 * complaints.c (struct complaints): Remove.
3860 (symfile_complaint_book): Remove.
3861 (series): New global.
3862 (complaint_internal): Update.
3863 (clear_complaints): Update.
3865 2018-05-23 Tom Tromey <tom@tromey.com>
3867 * complaints.c (counters): New global.
3868 (struct complain): Remove.
3869 (struct complaints) <root>: Remove.
3870 (complaint_sentinel): Remove.
3871 (symfile_complaint_book): Update.
3872 (find_complaint) Remove.
3873 (complaint_internal, clear_complaints): Update.
3875 2018-05-23 Tom Tromey <tom@tromey.com>
3877 * complaints.c (struct complain) <file, line>: Remove.
3878 (find_complaint): Remove file, line parameters.
3879 (complaint_internal): Update.
3881 2018-05-23 Tom Tromey <tom@tromey.com>
3883 * complaints.c (vcomplaint): Remove.
3884 (complaint_internal) Merge in contents of vcomplaint.
3886 2018-05-23 Tom Tromey <tom@tromey.com>
3888 * complaints.c (struct complaints) <explanation>: Remove.
3889 (symfile_explanations): Remove.
3890 (symfile_complaint_book): Update.
3891 (vcomplaint): Update.
3892 (struct explanation): Remove.
3894 2018-05-23 Tom Tromey <tom@tromey.com>
3896 * complaints.c (symfile_complaints): Remove.
3897 (complaint_internal): Remove "complaints" parameter.
3898 (clear_complaints, vcomplaint): Remove "c" parameter.
3899 (get_complaints): Remove.
3900 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3901 (dwarf2_debug_line_missing_file_complaint)
3902 (dwarf2_debug_line_missing_end_sequence_complaint)
3903 (dwarf2_complex_location_expr_complaint)
3904 (dwarf2_const_value_length_mismatch_complaint)
3905 (dwarf2_section_buffer_overflow_complaint)
3906 (dwarf2_macro_malformed_definition_complaint)
3907 (dwarf2_invalid_attrib_class_complaint)
3908 (create_addrmap_from_index, dw2_symtab_iter_next)
3909 (dw2_expand_marked_cus)
3910 (dw2_debug_names_iterator::find_vec_in_debug_names)
3911 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3912 (create_debug_type_hash_table, init_cutu_and_read_dies)
3913 (partial_die_parent_scope, add_partial_enumeration)
3914 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3915 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3916 (read_import_statement, read_file_scope, create_dwo_cu_reader)
3917 (create_cus_hash_table, create_dwp_hash_table)
3918 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3919 (dwarf2_rnglists_process, dwarf2_ranges_process)
3920 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3921 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3922 (handle_struct_member_die, process_structure_scope)
3923 (read_array_type, read_common_block, read_module_type)
3924 (read_tag_pointer_type, read_typedef, read_base_type)
3925 (read_subrange_type, load_partial_dies, partial_die_info::read)
3926 (partial_die_info::read, partial_die_info::read)
3927 (partial_die_info::read, read_checked_initial_length_and_offset)
3928 (dwarf2_string_attr, read_formatted_entries)
3929 (dwarf_decode_line_header)
3930 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3931 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3932 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3933 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3934 (get_signatured_type, get_DW_AT_signature_type)
3935 (decode_locdesc, file_file_name, consume_improper_spaces)
3936 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3937 (dwarf_decode_macro_bytes, dwarf_decode_macros)
3938 (dwarf2_symbol_mark_computed, set_die_type)
3939 (read_attribute_value): Update.
3940 * stap-probe.c (handle_stap_probe, get_stap_base_address):
3942 * dbxread.c (unknown_symtype_complaint)
3943 (lbrac_mismatch_complaint, repeated_header_complaint)
3944 (set_namestring, function_outside_compilation_unit_complaint)
3945 (read_dbx_symtab, process_one_symbol): Update.
3946 * gdbtypes.c (stub_noname_complaint): Update.
3947 * windows-nat.c (handle_unload_dll): Update.
3948 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3949 (decode_base_type): Update.
3950 * xcoffread.c (bf_notfound_complaint, ef_complaint)
3951 (eb_complaint, record_include_begin, record_include_end)
3952 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3953 (process_xcoff_symbol, read_symbol)
3954 (function_outside_compilation_unit_complaint)
3955 (scan_xcoff_symtab): Update.
3956 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3957 * buildsym.c (finish_block_internal, make_blockvector)
3958 (end_symtab_get_static_block, augment_type_symtab): Update.
3959 * dtrace-probe.c (dtrace_process_dof)
3960 (dtrace_static_probe_ops::get_probes): Update.
3961 * complaints.h (struct complaint): Don't declare.
3962 (symfile_complaints): Remove.
3963 (complaint_internal): Remove "complaints" parameter.
3964 (complaint): Likewise.
3965 (clear_complaints): Likewise.
3966 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3967 (reread_symbols): Update.
3968 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3969 (dwarf2_frame_cache, decode_frame_entry): Update.
3970 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3971 * objc-lang.c (lookup_objc_class, lookup_child_selector)
3972 (info_selectors_command): Update.
3973 * macrotab.c (macro_include, check_for_redefinition)
3974 (macro_undef): Update.
3975 * objfiles.c (filter_overlapping_sections): Update.
3976 * stabsread.c (invalid_cpp_abbrev_complaint)
3977 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3978 (define_symbol, error_type, read_type, rs6000_builtin_type)
3979 (stabs_method_name_from_physname, read_member_functions)
3980 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3981 (attach_fields_to_type, complain_about_struct_wipeout)
3982 (read_range_type, read_args, common_block_start)
3983 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
3985 * mdebugread.c (index_complaint, unknown_ext_complaint)
3986 (basic_type_complaint, bad_tag_guess_complaint)
3987 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
3988 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
3989 (parse_procedure, parse_lines)
3990 (function_outside_compilation_unit_complaint)
3991 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
3992 (bad_tag_guess_complaint, reg_value_complaint): Update.
3993 * cp-support.c (demangled_name_complaint): Update.
3994 * macroscope.c (sal_macro_scope): Update.
3995 * dwarf-index-write.c (class debug_names): Update.
3997 2018-05-23 Tom Tromey <tom@tromey.com>
3999 * complaints.c (clear_complaints): Remove "noisy" parameter.
4000 * complaints.h (clear_complaints): Update.
4001 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4002 (reread_symbols): Update.
4004 2018-05-23 Tom Tromey <tom@tromey.com>
4006 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4008 (vcomplaint, clear_complaints): Update.
4009 (symfile_explanations): Remove some messages.
4011 2018-05-23 Tom Tromey <tom@tromey.com>
4013 * complaints.c (internal_complaint): Remove.
4014 * complaints.h (internal_complaint): Remove.
4016 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4018 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4020 2018-05-22 Pedro Alves <palves@redhat.com>
4022 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4023 (remote_fileio_badfd, remote_fileio_return_errno)
4024 (remote_fileio_return_success, remote_fileio_func_open)
4025 (remote_fileio_func_open, remote_fileio_func_close)
4026 (remote_fileio_func_read, remote_fileio_func_write)
4027 (remote_fileio_func_lseek, remote_fileio_func_rename)
4028 (remote_fileio_func_unlink, remote_fileio_func_stat)
4029 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4030 (remote_fileio_func_isatty, remote_fileio_func_system): Add
4031 remote_target parameter.
4032 (remote_fio_func_map) <func>: Add remote_target parameter.
4033 (do_remote_fileio_request, remote_fileio_request):
4034 * remote-fileio.h (remote_fileio_request):
4035 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4036 remote_target parameter.
4037 (remote_notif_process, handle_notification): Adjust to pass down
4039 (remote_notif_state_allocate): Add remote_target parameter. Save
4041 * remote-notif.h (struct remote_target): Forward declare.
4042 (struct notif_client) <parse, ack, can_get_pending_events>: Add
4043 remote_target parameter.
4044 (struct remote_notif_state) <remote>: New field.
4045 (remote_notif_ack, remote_notif_parse): Add remote_target
4047 (remote_notif_state_allocate, remote_notif_state_allocate): Add
4048 remote_target parameter.
4049 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4050 (threads_listing_context, rmt_thread_action, protocol_feature)
4051 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4052 (packet_result, struct threads_listing_context, remote_state):
4053 Move definitions and declarations higher up.
4054 (remote_target) <~remote_target>: Declare.
4055 (remote_download_command_source, remote_file_put, remote_file_get)
4056 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4057 (remote_hostio_pread_vFile, remote_hostio_send_command)
4058 (remote_hostio_set_filesystem, remote_hostio_open)
4059 (remote_hostio_close, remote_hostio_unlink, remote_state)
4060 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4061 (get_memory_write_packet_size, get_memory_read_packet_size)
4062 (append_pending_thread_resumptions, remote_detach_1)
4063 (append_resumption, remote_resume_with_vcont)
4064 (add_current_inferior_and_thread, wait_ns, wait_as)
4065 (process_stop_reply, remote_notice_new_inferior)
4066 (process_initial_stop_replies, remote_add_thread)
4067 (btrace_sync_conf, remote_btrace_maybe_reopen)
4068 (remove_new_fork_children, kill_new_fork_children)
4069 (discard_pending_stop_replies, stop_reply_queue_length)
4070 (check_pending_events_prevent_wildcard_vcont)
4071 (discard_pending_stop_replies_in_queue, stop_reply)
4072 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4073 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4074 (remote_interrupt_as, remote_interrupt_ns)
4075 (remote_get_noisy_reply, remote_query_attached)
4076 (remote_add_inferior, remote_current_thread, get_current_thread)
4077 (set_thread, set_general_thread, set_continue_thread)
4078 (set_general_process, write_ptid)
4079 (remote_unpack_thread_info_response, remote_get_threadinfo)
4080 (parse_threadlist_response, remote_get_threadlist)
4081 (remote_threadlist_iterator, remote_get_threads_with_ql)
4082 (remote_get_threads_with_qxfer)
4083 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4084 (get_offsets, remote_check_symbols, remote_supported_packet)
4085 (remote_query_supported, remote_packet_size)
4086 (remote_serial_quit_handler, remote_detach_pid)
4087 (remote_vcont_probe, remote_resume_with_hc)
4088 (send_interrupt_sequence, interrupt_query)
4089 (remote_notif_get_pending_events, fetch_register_using_p)
4090 (send_g_packet, process_g_packet, fetch_registers_using_g)
4091 (store_register_using_P, store_registers_using_G)
4092 (set_remote_traceframe, check_binary_download)
4093 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4094 (remote_xfer_live_readonly_partial, remote_read_bytes)
4095 (remote_send_printf, remote_flash_write, readchar)
4096 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4097 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4098 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4099 (extended_remote_disable_randomization, extended_remote_run)
4100 (send_environment_packet, extended_remote_environment_support)
4101 (extended_remote_set_inferior_cwd, remote_write_qxfer)
4102 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4103 (packet_command): Now methods of ...
4104 (remote_target): ... this class.
4105 (m_remote_state) <remote_target>: New field.
4106 (struct remote_state) <stop_reply_queue,
4107 remote_async_inferior_event_token, wait_forever_enabled_p>: New
4109 (remote_state::remote_state): Allocate stop_reply_queue.
4110 (remote_state): Delete global.
4111 (get_remote_state_raw): Delete.
4112 (remote_target::get_remote_state): Allocate m_remote_state on
4114 (get_current_remote_target): New.
4115 (remote_ops, extended_remote_ops): Delete.
4116 (wait_forever_enabled_p, remote_async_inferior_event_token):
4117 Delete, moved to struct remote_state.
4118 (remote_target::close): Delete self. Destruction bits split to
4120 (remote_target::~remote_target): ... this.
4121 (show_memory_packet_size): Adjust to use
4122 get_current_remote_target.
4123 (struct protocol_feature) <func>: Add remote_target parameter.
4124 All callers adjusted.
4125 (curr_quit_handler_target): New.
4126 (remote_serial_quit_handler): Reimplement.
4127 (remote_target::open_1): Adjust to use get_current_remote_target.
4128 Heap-allocate remote_target/extended_remote_target instances.
4129 (vcont_builder::vcont_builder): Add remote_target parameter, and
4130 save it in m_remote. All callers adjusted.
4131 (vcont_builder::m_remote): New field.
4132 (vcont_builder::restart, vcont_builder::flush)
4133 (vcont_builder::push_action): Use it.
4134 (remote_target::commit_resume): Use it.
4135 (struct queue_iter_param) <remote>: New field.
4136 (remote_target::remove_new_fork_children): Fill in 'remote' field.
4137 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4138 (check_pending_event_prevents_wildcard_vcont_callback)
4139 (remote_target::check_pending_events_prevent_wildcard_vcont)
4140 (remote_target::discard_pending_stop_replies)
4141 (remote_target::discard_pending_stop_replies_in_queue)
4142 (remote_target::remote_notif_remove_queued_reply): Fill in
4144 (remote_notif_get_pending_events): New.
4145 (remote_target::readchar, remote_target::remote_serial_write):
4146 Save/restore curr_quit_handler_target.
4148 (kill_new_fork_children): Fill in 'remote' field.
4149 (packet_command): Use get_current_remote_target, defer to
4150 remote_target method of same name.
4151 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4152 parameter, and save it in m_remote. All callers adjusted.
4153 (scoped_remote_fd::release): Use m_remote.
4154 (scoped_remote_fd::m_remote): New field.
4155 (remote_file_put, remote_file_get, remote_file_delete): Use
4156 get_current_remote_target, defer to remote_target method of same
4158 (remote_btrace_reset): Add remote_state paremeter. Update all
4160 (remote_async_inferior_event_handler). Pass down 'data'.
4161 (remote_new_objfile): Use get_current_remote_target.
4162 (remote_target::vcont_r_supported): New.
4163 (set_range_stepping): Use get_current_remote_target and
4164 remote_target::vcont_r_supported.
4165 (_initialize_remote): Don't allocate 'remote_state' and
4166 'stop_reply_queue' globals.
4167 * remote.h (struct remote_target): Forward declare.
4168 (getpkt, putpkt, remote_notif_get_pending_events): Add
4169 'remote_target' parameter.
4171 2018-05-22 Pedro Alves <palves@redhat.com>
4173 * remote.c (vcont_builder): Now a class. Make all data members
4175 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4177 (vcont_builder_restart): Rename to ...
4178 (vcont_builder::restart): ... this.
4179 (vcont_builder_flush): Rename to ...
4180 (vcont_builder::flush): ... this.
4181 (vcont_builder_push_action): Rename to ...
4182 (vcont_builder::push_action): ... this.
4183 (remote_target::commit_resume): Adjust.
4185 2018-05-22 Pedro Alves <palves@redhat.com>
4187 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4188 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4189 (get_fixed_memory_packet_size): New.
4190 (get_memory_packet_size): Use it.
4191 (set_memory_packet_size): Don't override the config size with
4192 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4193 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4194 Don't refer to get_memory_packet_size if not connected to a remote
4195 target. Show "(default)" if configured size is 0.
4197 2018-05-22 Pedro Alves <palves@redhat.com>
4199 * remote.c (remote_target::mourn_inferior): Move
4200 discard_pending_stop_replies call here from ...
4201 (_initialize_remote): ... here.
4203 2018-05-22 Pedro Alves <palves@redhat.com>
4205 * remote.c (compare_section_command): Remove set_general_process
4208 2018-05-22 Pedro Alves <palves@redhat.com>
4210 * remote.c (struct packet_reg, struct remote_arch_state):
4211 Move higher up in the file.
4212 (remote_state) <m_arch_states>: Store remote_arch_state values
4213 instead of remote_arch_state pointers.
4214 (remote_state::get_remote_arch_state): Adjust.
4216 2018-05-22 Pedro Alves <palves@redhat.com>
4218 * remote.c: Include <unordered_map>.
4219 (remote_state): Now a class.
4220 (remote_state) <get_remote_arch_state>: Declare method.
4221 <get_remote_arch_state>: New field.
4222 (remote_arch_state) <remote_arch_state>: Declare ctor.
4223 <regs>: Now a unique_ptr.
4224 (remote_gdbarch_data_handle): Delete.
4225 (get_remote_arch_state): Delete.
4226 (remote_state::get_remote_arch_state): New.
4227 (get_remote_state): Adjust to call remote_state's
4228 get_remote_arch_state method.
4229 (init_remote_state): Delete, bits factored out to ...
4230 (remote_arch_state::remote_arch_state): ... this new method.
4231 (get_remote_packet_size, get_memory_packet_size)
4232 (process_g_packet, remote_target::fetch_registers)
4233 (remote_target::prepare_to_store, store_registers_using_G)
4234 (remote_target::store_registers, remote_target::get_trace_status):
4235 Adjust to call remote_state's method.
4236 (_initialize_remote): Remove reference to
4237 remote_gdbarch_data_handle.
4239 2018-05-22 Pedro Alves <palves@redhat.com>
4241 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4242 pread>: New method declarations.
4243 (remote_target::open_1): Adjust.
4244 (readahead_cache_invalidate): Rename to ...
4245 (readahead_cache::invalidate): ... this, and adjust to be a class
4247 (readahead_cache_invalidate_fd): Rename to ...
4248 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4250 (remote_hostio_pwrite): Adjust.
4251 (remote_hostio_pread_from_cache): Rename to ...
4252 (readahead_cache::pread): ... this, and adjust to be a class
4254 (remote_hostio_close): Adjust.
4256 2018-05-22 Pedro Alves <palves@redhat.com>
4258 * remote.c (remote_hostio_close_cleanup): Delete.
4259 (class scoped_remote_fd): New.
4260 (remote_file_put, remote_file_get): Use it.
4262 2018-05-22 Pedro Alves <palves@redhat.com>
4264 (struct vCont_action_support): Use bool and initialize all fields.
4265 (struct readahead_cache): Initialize all fields.
4266 (remote_state): Use bool and initialize all fields.
4267 (remote_state::remote_state, remote_state::~remote_state): New.
4268 (new_remote_state): Delete.
4269 (_initialize_remote): Use new to allocate remote_state.
4271 2018-05-22 Pedro Alves <palves@redhat.com>
4275 * c-exp.y: Include "c-support.h".
4276 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4277 of tolower. Use c_ident_is_alpha to scan names.
4278 * c-lang.c: Include "c-support.h".
4279 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4280 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4281 * c-support.h: New file, with bits factored out from ...
4282 * cp-name-parser.y: ... this file.
4283 Include "c-support.h".
4284 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4285 c-support.h and renamed.
4286 (symbol_end, yylex): Adjust.
4288 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4290 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4291 parameter type to CORE_ADDR.
4292 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4293 parameter type in declaration to CORE_ADDR.
4294 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4295 target_auxv_search to get AT_HWCAP and use the result to get the
4297 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4298 to CORE_ADDR. Remove the cast of the return value to unsigned
4299 long. Fix error predicate of target_auxv_search.
4300 (ppc_linux_nat_target::read_description): Change the type of the
4301 hwcap variable to CORE_ADDR.
4303 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4305 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4306 if the size of fpscr is larger than 32 bits.
4308 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4310 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4311 (ppc32_linux_vsxregmap): New global.
4312 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4313 regcache_supply_regset, and regcache_collect_regset.
4314 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4315 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4316 (fetch_vsx_register, store_vsx_register): Remove.
4317 (fetch_vsx_registers): Add regno parameter. Get regset using
4318 ppc_linux_vsxregset. Use regset to supply registers.
4319 (store_vsx_registers): Add regno parameter. Get regset using
4320 ppc_linux_vsxregset. Use regset to collect registers.
4321 (fetch_register): Call fetch_vsx_registers instead of
4323 (store_register): Call store_vsx_registers instead of
4325 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4326 new regno parameter.
4327 (store_ppc_registers): Call store_vsx_registers with -1 for the
4328 new regno parameter.
4329 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4330 (ppc_collect_vsxregset): Remove.
4332 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4334 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4336 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4337 for vector register offset fields.
4338 (ppc64_fbsd_reg_offsets): Likewise.
4339 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4340 to vector register offset fields.
4341 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4342 to vector register offset fields.
4343 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4344 vector register offset fields.
4345 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4346 initializers for vector register offset fields.
4347 (rs6000_aix64_reg_offsets): Likewise.
4348 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4349 (ppc_supply_vrregset): Remove.
4350 (ppc_collect_vrregset): Remove.
4351 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4352 (ppc_linux_vrregset) : New function.
4353 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4354 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4355 (ppc32_linux_vrregset): Remove.
4356 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4357 and use result instead of ppc32_linux_vrregset.
4358 (ppc32_linux_reg_offsets): Remove initializers for vector register
4360 (ppc64_linux_reg_offsets): Likewise.
4361 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4362 * ppc-linux-nat.c: Include regset.h.
4363 (gdb_vrregset_t): Adjust comment to account for little-endian
4365 (supply_vrregset, fill_vrregset): Remove.
4366 (fetch_altivec_register, store_altivec_register): Remove.
4367 (fetch_altivec_registers): Add regno parameter. Get regset using
4368 ppc_linux_vrregset. Use regset to supply registers.
4369 (store_altivec_registers): Add regno parameter. Get regset using
4370 ppc_linux_vrregset. Use regset to collect registers.
4371 (fetch_register): Call fetch_altivec_registers instead of
4372 fetch_altivec_register.
4373 (store_register): Call store_altivec_registers instead of
4374 store_altivec_register.
4375 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4376 the new regno parameter.
4377 (store_ppc_registers): Call store_altivec_registers with -1 for
4378 the new regno parameter.
4380 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4382 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4383 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4384 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4385 (gdb_vrregset_t): Change array type size to
4386 PPC_LINUX_SIZEOF_VRREGSET.
4387 (gdb_vsxregset_t): Change array type size to
4388 PPC_LINUX_SIZEOF_VSXREGSET.
4389 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4390 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4391 PPC_LINUX_SIZEOF_VSXREGSET.
4393 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4395 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4396 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4398 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4399 ppc_linux_target_wordsize with tid.
4400 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4402 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4403 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4404 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4405 tid parameter. Remove static specifier.
4406 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4407 (ppc_linux_target_wordsize): New declaration.
4409 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4411 * arch/ppc-linux-common.c: New file.
4412 * arch/ppc-linux-common.h: New file.
4413 * arch/ppc-linux-tdesc.h: New file.
4414 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4415 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4416 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4417 arch/ppc-linux-tdesc.h.
4418 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4419 arch/ppc-linux-tdesc.h.
4420 (ppc_linux_nat_target::read_description): Remove target
4421 description matching code. Fill a ppc_linux_features struct and
4422 call ppc_linux_match_description with it. Move comment about ISA
4423 2.05 to ppc-linux-common.c.
4424 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4425 arch/ppc-linux-tdesc.h.
4426 (ppc_linux_core_read_description): Remove target description
4427 matching code. Fill a ppc_linux_features struct and call
4428 ppc_linux_match_description with it.
4429 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4430 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4431 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4432 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4433 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4434 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4435 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4436 (tdesc_powerpc_e500l): Remove.
4438 2018-05-22 Joel Brobecker <brobecker@adacore.com>
4440 * ada-lang.c (catch_assert_command): Pass empty string instead
4441 of NULL for excep_string argument.
4443 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4445 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4446 the width of the requested register exceeds the width of the
4449 2018-05-21 Tom Tromey <tom@tromey.com>
4451 * printcmd.c (output_command): Remove.
4452 (output_command_const): Rename to output_command.
4453 * valprint.h (output_command): Rename from output_command_const.
4454 * tracepoint.c (trace_dump_actions): Call output_command.
4456 2018-05-21 Tom Tromey <tom@tromey.com>
4458 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4459 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4460 * ada-lang.h (create_ada_exception_catchpoint): Update.
4461 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4463 (create_excep_cond_exprs, ~ada_catchpoint)
4464 (should_stop_exception, print_one_exception)
4465 (print_mention_exception, print_recreate_exception): Update.
4466 (ada_get_next_arg): Remove.
4467 (catch_ada_exception_command_split): Use std::string. Change type
4468 of "excep_string", "cond_string".
4469 (catch_ada_exception_command): Update.
4470 (create_ada_exception_catchpoint): Change type of excep_string.
4471 (ada_exception_sal): Remove excep_string parameter.
4472 (~ada_catchpoint): Remove.
4474 2018-05-21 Tom Tromey <tom@tromey.com>
4476 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4479 2018-05-21 Tom Tromey <tom@tromey.com>
4481 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4482 Return unique_xmalloc_ptr.
4483 (print_it_exception): Update.
4485 2018-05-21 Tom Tromey <tom@tromey.com>
4487 * tracepoint.c (trace_dump_actions): Use std::string.
4489 2018-05-21 Tom Tromey <tom@tromey.com>
4491 * symfile.c (reread_symbols): Use std::string for original_name.
4493 2018-05-21 Tom Tromey <tom@tromey.com>
4495 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4496 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4499 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4501 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4503 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4504 * objfiles.c (get_objfile_bfd_data): Allocate
4505 objfile_per_bfd_storage with obstack_new when allocating on
4508 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4510 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4512 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4513 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4514 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4515 (add_pending): Likewise.
4516 (parse_symbol): Likewise.
4517 (parse_partial_symbols): Likewise.
4518 (psymtab_to_symtab_1): Likewise.
4519 (new_psymtab): Likewise.
4520 (elfmdebug_build_psymtabs): Likewise.
4521 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4522 * objfiles.c (get_objfile_bfd_data): Likewise.
4523 (objfile_register_static_link): Likewise.
4524 * psymtab.c (allocate_psymtab): Likewise.
4525 * stabsread.c (read_member_functions): Likewise.
4526 * xcoffread.c (xcoff_end_psymtab): Likewise.
4528 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4530 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4531 compiler supports std::is_trivially_constructible.
4532 * common/poison.h: Include obstack.h.
4533 (IsMallocable): Define to is_trivially_constructible if the
4534 compiler supports it, define to true_type otherwise.
4538 (XOBNEWVEC): Redefine.
4539 * gdb_obstack.h (obstack_zalloc): New.
4540 (OBSTACK_ZALLOC): Redefine.
4541 (obstack_calloc): New.
4542 (OBSTACK_CALLOC): Redefine.
4544 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4545 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4547 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4548 obstack_calloc/obstack_zalloc.
4549 (gdbarch_obstack_zalloc): Remove.
4550 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4552 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4554 * stack.c (backtrace_command_1): Remove useless variable int i.
4556 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4558 * stack.c (print_frame_info): Fix comment.
4560 2018-05-18 Tom Tromey <tom@tromey.com>
4562 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4563 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4564 (~dwarf2_per_objfile): Update
4565 (dwarf2_get_dwz_file): Use new.
4566 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4569 2018-05-18 Tom Tromey <tom@tromey.com>
4571 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4573 * dwarf2read.c (struct dwp_file): Add constructor and
4575 (open_and_init_dwp_file): Return a unique_ptr.
4576 (dwarf2_per_objfile, create_dwp_hash_table)
4577 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4578 (lookup_dwo_unit_in_dwp): Update.
4579 (open_and_init_dwp_file, get_dwp_file): Update.
4581 2018-05-18 Tom Tromey <tom@tromey.com>
4583 * dwarf2read.c (dwarf2_per_objfile): Update.
4584 (struct mapped_index): Add initializers.
4585 (dwarf2_read_index): Use new.
4586 (dw2_symtab_iter_init): Update.
4587 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4590 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4592 * dwarf2read.c (mapped_index) <total_size>: Remove.
4594 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4596 * unittests/format_pieces-selftests.c (test_format_specifier):
4599 2018-05-18 Tom Tromey <tom@tromey.com>
4601 * c-typeprint.c (maybe_print_hole): New function.
4602 (c_print_type_struct_field_offset): Update.
4603 (c_type_print_base_struct_union): Call maybe_print_hole.
4605 2018-05-17 Keith Seitz <keiths@redhat.com>
4607 * breakpoint.c (build_bpstat_chain): New function, moved from
4609 (bpstat_stop_status): Add optional parameter, `stop_chain'.
4610 If no stop chain is passed, call build_bpstat_chain to build it.
4611 * breakpoint.h (build_bpstat_chain): Declare.
4612 (bpstat_stop_status): Move documentation here from breakpoint.c.
4613 * infrun.c (handle_signal_stop): Before eliding inlined frames,
4614 build the stop chain and pass it to skip_inline_frames.
4615 Pass this stop chain to bpstat_stop_status.
4616 * inline-frame.c: Include breakpoint.h.
4617 (stopped_by_user_bp_inline_frame): New function.
4618 (skip_inline_frames): Add parameter `stop_chain'.
4619 Move documention to inline-frame.h.
4620 If non-NULL, use stopped_by_user_bp_inline_frame to determine
4621 whether the frame should be elided.
4622 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4623 Add moved documentation and update for new parameter.
4625 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4628 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4629 unittests/format_pieces-selftests.c.
4630 * common/format.h (format_piece) <operator==>: New.
4631 (format_pieces) <operator[]>: Remove.
4632 * common/format.c (format_pieces::format_pieces): Handle \e.
4633 * unittests/format_pieces-selftests.c: New.
4635 2018-05-17 Tom Tromey <tom@tromey.com>
4638 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4639 (dw2_instantiate_symtab): Add skip_partial parameter.
4640 (dw2_find_last_source_symtab, dw2_map_expand_apply)
4641 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4642 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4643 (dw2_expand_symtabs_matching_one)
4644 (dw2_find_pc_sect_compunit_symtab)
4645 (dw2_debug_names_lookup_symbol)
4646 (dw2_debug_names_expand_symtabs_for_function): Update.
4647 (init_cutu_and_read_dies): Add skip_partial parameter.
4648 (process_psymtab_comp_unit, build_type_psymtabs_1)
4649 (process_skeletonless_type_unit, load_partial_comp_unit)
4650 (psymtab_to_symtab_1): Update.
4651 (load_full_comp_unit): Add skip_partial parameter.
4652 (process_imported_unit_die, dwarf2_read_addr_index)
4653 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4654 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4655 (read_signatured_type): Update.
4657 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4659 * value.c (release_value): Remove unused variable.
4660 (record_latest_value): Likewise.
4661 (access_value_history): Likewise.
4662 (preserve_values): Likewise.
4664 2018-05-17 Tom Tromey <tom@tromey.com>
4666 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4669 2018-05-16 Maciej W. Rozycki <macro@mips.com>
4672 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4673 Also handle registers whose width is not a multiple of
4675 (linux_nat_trad_target::store_register): Likewise.
4677 2018-05-16 Tom Tromey <tom@tromey.com>
4679 * gdbcore.h (core_bfd): Redefine.
4680 * corelow.c (core_target::close): Update.
4681 (core_target_open): Update.
4682 * progspace.h (struct program_space) <cbfd>: Now a
4685 2018-05-16 Tom Tromey <tom@tromey.com>
4688 * symfile-add-flags.h (enum symfile_add_flags)
4689 <SYMFILE_NOT_FILENAME>: New constant.
4690 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
4691 objfile name from BFD.
4692 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4693 * minidebug.c (find_separate_debug_file_in_section): Put
4694 ".gnu_debugdata" into BFD's file name.
4696 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
4698 * regcache.c (regcache_read_ftype, regcache_write_ftype):
4701 2018-05-15 Tamar Christina <tamar.christina@arm.com>
4704 * aarch64-tdep.c (aarch64_analyze_prologue,
4705 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4706 Indicate not interested in errors.
4708 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4710 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4711 Supply the MIPS_ZERO_REGNUM register.
4713 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4715 * mips-tdep.c (mask_address_var): Make variable static.
4717 2018-05-14 Tom Tromey <tom@tromey.com>
4719 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4721 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
4723 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4724 FXSAVE_ADDR for the mxcsr register.
4726 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
4728 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4730 2018-05-11 Pedro Alves <palves@redhat.com>
4732 * corelow.c (core_target) <core_target>: No longer inline.
4733 Initialize m_core_gdbarch, m_core_vec and build the section table
4735 <~core_target>: New.
4736 <core_gdbarch, get_core_register_section>: New methods.
4737 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4738 factored out from ...
4739 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4741 (sniff_core_bfd): Add gdbarch parameter.
4742 (core_close): Delete, merged into ...
4743 (core_target::close): ... here. Delete self.
4744 (core_close_cleanup): Delete.
4745 (core_target_open): Allocate a core_target on the heap. Use a
4746 unique_ptr instead of a cleanup. Bits moved into the core_target
4747 ctor. Adjust to use core_target methods instead of globals.
4748 (get_core_register_section): Rename to ...
4749 (core_target::get_core_register_section): ... this and adjust.
4750 (struct get_core_registers_cb_data): New.
4751 (get_core_registers_cb): Use it. Use bool.
4752 (core_target::fetch_registers, core_target::files_info)
4753 (core_target::xfer_partial, core_target::read_description)
4754 (core_target::pid_to, core_target::thread_name): Adjust to
4755 reference class fields instead of globals.
4756 * target.h (struct target_ops_deleter, target_ops_up): New.
4758 2018-05-11 Pedro Alves <palves@redhat.com>
4760 * corefile.c (core_file_command): Move to corelow.c.
4761 * corelow.c (the_core_target): Delete.
4762 (core_file_command): Moved from corefile.c. Check exec_bfd
4763 instead of the_core_target. Use target_detach instead of calling
4764 into the_core_target directly.
4765 (maybe_say_no_core_file_now): New.
4766 (core_target::detach): Use it.
4767 (_initialize_corelow): Remove references to the_core_target.
4768 * gdbcore.h (the_core_target): Delete.
4770 2018-05-11 Tom Tromey <tromey@redhat.com>
4771 Pedro Alves <palves@redhat.com>
4773 * corefile.c (core_bfd): Remove.
4774 * gdbcore.h (core_bfd): Now a macro.
4775 * progspace.h (struct program_space) <cbfd>: New field.
4777 2018-05-11 Tom Tromey <tom@tromey.com>
4779 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4782 2018-05-10 Tom Tromey <tom@tromey.com>
4784 * configure: Rebuild.
4785 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4787 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4790 * regformats/regdat.sh: Adjust script, following the addition
4791 of the new expedite_regs parameter to init_target_desc.
4793 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
4796 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4797 set_gdbarch_significant_addr_bit.
4798 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4799 set_gdbarch_significant_addr_bit.
4800 * utils.c (address_significant): Update to sign extend addr.
4802 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
4804 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4805 (xtensa_linux_init_abi): Limit tdep->num_regs by
4806 tdep->num_nopriv_regs.
4807 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4808 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4811 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
4813 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4815 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4817 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4818 (I387_MXCSR_INIT_VAL): New constant.
4819 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4820 buffer if it was supplied by the inferior.
4821 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4822 (i387_xsave_get_clear_bv): New function.
4823 (i387_supply_xsave): Only read x87 control registers from the
4824 xsave buffer if the feature is enabled, and the state will have
4825 been written, otherwise, provide a suitable default.
4826 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4827 including x87 control registers. Update control registers if they
4828 have changed from the default value, and mark features as enabled
4830 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4832 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4834 * spu-tdep.c (info_spu_event_command): Fix output formatting.
4836 2018-05-07 Tom Tromey <tom@tromey.com>
4838 * configure: Rebuild.
4839 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4841 2018-05-07 Tom Tromey <tom@tromey.com>
4844 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4845 bit. Use correct value for VDIV.
4847 2018-05-04 Tom Tromey <tom@tromey.com>
4849 * configure: Rebuild.
4850 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4852 2018-05-04 Tom Tromey <tom@tromey.com>
4854 * linux-record.c (record_linux_system_call) <case
4855 RECORD_SYS_RECVFROM>: Add "break".
4857 2018-05-04 Tom Tromey <tom@tromey.com>
4859 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4860 Add missing "break".
4861 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4862 Add missing "break".
4864 2018-05-04 Tom Tromey <tom@tromey.com>
4866 * rs6000-tdep.c (ppc_process_record_op4)
4867 (ppc_process_record_op63): Add fall-through comment.
4869 2018-05-04 Tom Tromey <tom@tromey.com>
4871 * i386-tdep.c (i386_process_record): Add fall-through comment.
4873 2018-05-04 Tom Tromey <tom@tromey.com>
4875 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4878 2018-05-04 Tom Tromey <tom@tromey.com>
4880 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4881 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4882 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4884 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4886 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4889 2018-05-04 Tom Tromey <tom@tromey.com>
4891 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4893 2018-05-04 Tom Tromey <tom@tromey.com>
4895 * s390-tdep.c (s390_process_record): Fix fall-through comments.
4896 * xcoffread.c (scan_xcoff_symtab): Move comment later.
4897 * symfile.c (section_is_mapped): Fix fall-through comment.
4898 * stabsread.c (define_symbol, read_member_functions): Fix
4899 fall-through comment.
4900 * s390-linux-tdep.c (s390_process_record): Fix fall-through
4902 * remote.c (remote_wait_as): Fix fall-through comment.
4903 * p-exp.y (yylex): Fix fall-through comment.
4904 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4906 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4907 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4908 * jv-exp.y (yylex): Fix fall-through comment.
4909 * go-exp.y (lex_one_token): Fix fall-through comment.
4910 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4911 fall-through comment.
4912 * f-exp.y (yylex): Fix fall-through comment.
4913 * dwarf2read.c (process_die): Fix fall-through comments.
4914 * dbxread.c (process_one_symbol): Fix fall-through comment.
4915 * d-exp.y (lex_one_token): Fix fall-through comment.
4916 * cp-name-parser.y (yylex): Fix fall-through comment.
4917 * coffread.c (coff_symtab_read): Fix fall-through comment.
4918 * c-exp.y (lex_one_token): Fix fall-through comment.
4919 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4921 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4924 2018-05-04 Tom Tromey <tom@tromey.com>
4927 * NEWS: Mention gdb.execute change.
4928 * gdbcmd.h (execute_control_command): Don't declare.
4929 * python/python.c (execute_gdb_command): Use read_command_lines_1,
4930 execute_control_commands, execute_control_commands_to_string.
4931 * cli/cli-script.h (execute_control_commands)
4932 (execute_control_commands_to_string): Declare.
4933 (execute_control_command): Add from_tty parameter.
4934 * cli/cli-script.c (execute_control_commands)
4935 (execute_control_commands_to_string): New functions.
4936 (execute_user_command): Use execute_control_commands.
4937 (execute_control_command_1): Add "from_tty" parameter. Update.
4938 (execute_control_command): Likewise.
4940 2018-05-04 Tom Tromey <tom@tromey.com>
4943 * NEWS: Mention that breakpoint commands are writable.
4944 * python/py-breakpoint.c (bppy_set_commands): New function.
4945 (breakpoint_object_getset) <"commands">: Use it.
4947 2018-05-04 Tom Tromey <tom@tromey.com>
4949 * tracepoint.c (actions_command): Update.
4950 * mi/mi-cmd-break.c (mi_command_line_array)
4951 (mi_command_line_array_cnt, mi_command_line_array_ptr)
4952 (mi_read_next_line): Remove.
4953 (mi_cmd_break_commands): Update.
4954 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4956 * cli/cli-script.c (get_command_line): Update.
4957 (process_next_line): Use function_view. Constify.
4958 (recurse_read_control_structure, read_command_lines)
4959 (read_command_lines_1): Change argument types to function_view.
4960 (do_define_command, document_command): Update.
4961 * breakpoint.h (check_tracepoint_command): Don't declare.
4962 * breakpoint.c (check_tracepoint_command): Remove.
4963 (commands_command_1, create_tracepoint_from_upload): Update.
4965 2018-05-04 Tom Tromey <tom@tromey.com>
4968 * cli/cli-script.h (enum command_control_type) <define_control>:
4970 * cli/cli-script.c (multi_line_command_p): Handle define_control.
4971 (build_command_line, execute_control_command_1)
4972 (process_next_line): Likewise.
4973 (do_define_command): New function, extracted from define_command.
4974 (define_command): Use it.
4976 2018-05-04 Tom Tromey <tom@tromey.com>
4978 * tracepoint.c (actions_command): Update.
4979 * cli/cli-script.h (read_command_lines): Update.
4980 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4981 (MAX_TMPBUF): Remove define.
4982 (define_command): Use string_printf.
4983 (document_command): Likewise.
4984 * breakpoint.c (commands_command_1): Update.
4986 2018-05-04 Tom Tromey <tom@tromey.com>
4988 * top.c (execute_command): Update.
4989 * cli/cli-script.h (print_command_lines): Now varargs.
4990 * cli/cli-script.c (print_command_lines): Now varargs.
4991 (execute_control_command_1) <case while_control, case if_control>:
4994 2018-05-04 Tom Tromey <tom@tromey.com>
4996 * tracepoint.c (all_tracepoint_actions): Rename from
4997 all_tracepoint_actions_and_cleanup. Change return type.
4998 (actions_command, encode_actions_1, encode_actions)
4999 (trace_dump_actions, tdump_command): Update.
5000 * remote.c (remote_download_command_source): Update.
5001 * python/python.c (gdbpy_eval_from_control_command)
5002 (python_command, python_interactive_command): Update.
5003 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5004 * guile/guile.c (guile_command)
5005 (gdbscm_eval_from_control_command, guile_command): Update.
5006 * compile/compile.c (compile_code_command)
5007 (compile_print_command, compile_to_object): Update.
5008 * cli/cli-script.h (struct command_lines_deleter): New.
5009 (counted_command_line): New typedef.
5010 (struct command_line): Add constructor, destructor.
5011 <body_list>: Remove.
5012 <body_list_0, body_list_1>: New members.
5013 (command_line_up): Remove typedef.
5014 (read_command_lines, read_command_lines_1, get_command_line):
5016 (copy_command_lines): Don't declare.
5017 * cli/cli-script.c (build_command_line): Use "new".
5018 (get_command_line): Return counted_command_line.
5019 (print_command_lines, execute_user_command)
5020 (execute_control_command_1, while_command, if_command): Update.
5021 (realloc_body_list): Remove.
5022 (process_next_line, recurse_read_control_structure): Update.
5023 (read_command_lines, read_command_lines_1): Return counted_command_line.
5024 (free_command_lines): Use "delete".
5025 (copy_command_lines): Remove.
5026 (define_command, document_command, show_user_1): Update.
5027 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5028 a counted_command_line.
5029 * breakpoint.h (counted_command_line): Remove typedef.
5030 (breakpoint_set_commands): Update.
5031 * breakpoint.c (check_no_tracepoint_commands)
5032 (validate_commands_for_breakpoint): Update.
5033 (breakpoint_set_commands): Change commands to be a
5034 counted_command_line.
5035 (commands_command_1, update_dprintf_command_list)
5036 (create_tracepoint_from_upload): Update.
5038 2018-05-04 Tom Tromey <tom@tromey.com>
5040 * cli/cli-decode.h (cmd_list_element): New constructor.
5041 (~cmd_list_element): New destructor.
5042 (struct cmd_list_element): Add initializers.
5043 * cli/cli-decode.c (do_add_cmd): Use "new".
5044 (delete_cmd): Use "delete".
5046 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5047 Pedro Alves <palves@redhat.com>
5049 PR breakpoints/19806 and support for PR external/20207.
5050 * NEWS: Mention Aarch64 watchpoint improvements.
5051 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5052 watchpoints and PR external/20207 watchpoints.
5053 * nat/aarch64-linux-hw-point.c
5054 (kernel_supports_any_contiguous_range): New.
5055 (aarch64_watchpoint_offset): New.
5056 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5057 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5058 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5059 (aarch64_align_watchpoint): New parameters aligned_offset_p and
5060 next_addr_orig_p. Support PR external/20207 watchpoints.
5061 (aarch64_downgrade_regs): New.
5062 (aarch64_dr_state_insert_one_point): New parameters offset and
5064 (aarch64_dr_state_remove_one_point): Likewise.
5065 (aarch64_handle_breakpoint): Update caller.
5066 (aarch64_handle_aligned_watchpoint): Likewise.
5067 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5069 (aarch64_linux_set_debug_regs): Remove const from state. Call
5070 aarch64_downgrade_regs.
5071 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5072 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5073 (DR_CONTROL_MASK): ... this.
5074 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5075 (unsigned int aarch64_watchpoint_offset): New prototype.
5076 (aarch64_linux_set_debug_regs): Remove const from state.
5077 * utils.c (align_up, align_down): Move to ...
5078 * common/common-utils.c (align_up, align_down): ... here.
5079 * utils.h (align_up, align_down): Move to ...
5080 * common/common-utils.h (align_up, align_down): ... here.
5082 2018-05-04 Joel Brobecker <brobecker@adacore.com>
5084 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5085 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5086 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5087 Re-implement to match the ABI as summarized in GCC's
5088 gcc/config/sparc/sparc.c. All callers updated.
5089 (sparc32_store_arguments): Remove assertion.
5091 2018-05-04 Tom Tromey <tom@tromey.com>
5093 * printcmd.c: Don't include tui.h.
5094 (decode_format): Use skip_spaces.
5096 2018-05-04 Tom Tromey <tom@tromey.com>
5099 * printcmd.c (last_count): New global.
5100 (x_command): Use saved count when repeating.
5102 2018-05-04 Tom Tromey <tom@tromey.com>
5104 * nto-procfs.c (do_closedir_cleanup): Remove.
5105 (procfs_pidlist): Use gdb_dir_up.
5106 * procfs.c (do_closedir_cleanup): Remove.
5107 (proc_update_threads): Use gdb_dir_up.
5108 * common/filestuff.h (struct gdb_dir_deleter): New.
5109 (gdb_dir_up): New typedef.
5111 2018-05-04 Tom Tromey <tom@tromey.com>
5113 * ada-lang.c (print_mention_exception): Use std::string.
5115 2018-05-04 Tom Tromey <tom@tromey.com>
5117 * ada-lang.c (create_excep_cond_exprs): Update.
5118 (ada_exception_catchpoint_cond_string): Use std::string.
5120 2018-05-04 Tom Tromey <tom@tromey.com>
5122 * ada-lang.c (xget_renaming_scope): Return std::string.
5123 (old_renaming_is_invisible): Update.
5125 2018-05-04 Tom Tromey <tom@tromey.com>
5127 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5128 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5130 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
5132 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5134 2018-05-04 Tom Tromey <tom@tromey.com>
5136 * remote.c (remote_query_supported_append): Change type.
5137 (remote_check_symbols): Update.
5139 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
5142 * configure.ac: Prepend libpython.
5143 * python/python-config.py: Likewise.
5144 * configure: Regenerate.
5146 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
5148 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5150 2018-05-03 Pedro Alves <palves@redhat.com>
5153 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5154 override. Write 'true' instead of '1'.
5155 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5158 2018-05-02 Pedro Alves <palves@redhat.com>
5160 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5161 add_inf_child_target.
5162 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5163 add_inf_child_target.
5164 * aix-thread.c (aix_thread_target_info): New.
5165 (aix_thread_target) <shortname, longname, doc>: Delete.
5167 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5168 add_inf_child_target.
5169 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5170 add_inf_child_target.
5171 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5172 add_inf_child_target.
5173 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5174 add_inf_child_target.
5175 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5176 add_inf_child_target.
5177 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5178 add_inf_child_target.
5179 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5180 add_inf_child_target.
5181 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5182 add_inf_child_target.
5183 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5184 add_inf_child_target.
5185 * bfd-target.c (target_bfd_target_info): New.
5186 (target_bfd) <shortname, longname, doc>: Delete.
5188 * bsd-kvm.c (bsd_kvm_target_info): New.
5189 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5191 (bsd_kvm_target::open): Rename to ...
5192 (bsd_kvm_target_open): ... this. Adjust.
5193 * bsd-uthread.c (bsd_uthread_target_info): New.
5194 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5196 * corefile.c (core_file_command): Adjust.
5197 * corelow.c (core_target_info): New.
5198 (core_target) <shortname, longname, doc>: Delete.
5200 (core_target::open): Rename to ...
5201 (core_target_open): ... this. Adjust.
5202 * ctf.c (ctf_target_info): New.
5203 (ctf_target) <shortname, longname, doc>: Delete.
5205 (ctf_target::open): Rename to ...
5206 (ctf_target_open): ... this.
5207 (_initialize_ctf): Adjust.
5208 * exec.c (exec_target_info): New.
5209 (exec_target) <shortname, longname, doc>: Delete.
5211 (exec_target::open): Rename to ...
5212 (exec_target_open): ... this.
5213 * gdbcore.h (core_target_open): Declare.
5214 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5215 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5216 add_inf_child_target.
5217 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5218 add_inf_child_target.
5219 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5220 add_inf_child_target.
5221 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5222 add_inf_child_target.
5223 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5224 add_inf_child_target.
5225 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5226 add_inf_child_target.
5227 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5228 add_inf_child_target.
5229 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5230 add_inf_child_target.
5231 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5232 add_inf_child_target.
5233 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5234 add_inf_child_target.
5235 * inf-child.c (inf_child_target_info): New.
5236 (inf_child_target::info): New.
5237 (inf_child_open_target): Remove 'target' parameter. Use
5238 get_native_target instead.
5239 (inf_child_target::open): Delete.
5240 (add_inf_child_target): New.
5241 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5244 (add_inf_child_target): Declare.
5245 (inf_child_open_target): Declare.
5246 * linux-thread-db.c (thread_db_target_info): New.
5247 (thread_db_target) <shortname, longname, doc>: Delete.
5249 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5250 add_inf_child_target.
5251 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5252 add_inf_child_target.
5253 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5254 add_inf_child_target.
5255 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5256 add_inf_child_target.
5257 * make-target-delegates (print_class): Adjust.
5258 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5259 add_inf_child_target.
5260 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5261 add_inf_child_target.
5262 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5263 add_inf_child_target.
5264 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5265 add_inf_child_target.
5266 * nto-procfs.c (nto_native_target_info): New.
5267 (nto_procfs_target_native) <shortname, longname, doc>:
5270 (nto_procfs_target_info): New.
5271 (nto_procfs_target_procfs) <shortname, longname, doc>:
5274 (init_procfs_targets): Adjust.
5275 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5276 add_inf_child_target.
5277 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5278 add_inf_child_target.
5279 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5280 add_inf_child_target.
5281 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5282 add_inf_child_target.
5283 * ravenscar-thread.c (ravenscar_target_info): New.
5284 (ravenscar_thread_target) <shortname, longname, doc>:
5287 * record-btrace.c (record_btrace_target_info):
5288 (record_btrace_target) <shortname, longname, doc>: Delete.
5290 (record_btrace_target::open): Rename to ...
5291 (record_btrace_target_open): ... this. Adjust.
5292 * record-full.c (record_longname, record_doc): New.
5293 (record_full_base_target) <shortname, longname, doc>: Delete.
5295 (record_full_target_info): New.
5296 (record_full_target): <shortname>: Delete.
5298 (record_full_core_open_1, record_full_open_1): Update comments.
5299 (record_full_base_target::open): Rename to ...
5300 (record_full_open): ... this.
5301 (cmd_record_full_restore): Update.
5302 (_initialize_record_full): Update.
5303 * remote-sim.c (remote_sim_target_info): New.
5304 (gdbsim_target) <shortname, longname, doc>: Delete.
5306 (gdbsim_target::open): Rename to ...
5307 (gdbsim_target_open): ... this.
5308 (_initialize_remote_sim): Adjust.
5309 * remote.c (remote_doc): New.
5310 (remote_target_info): New.
5311 (remote_target) <shortname, longname, doc>: Delete.
5313 (extended_remote_target_info): New.
5314 (extended_remote_target) <shortname, longname, doc>: Delete.
5316 (remote_target::open_1): Make static. Adjust.
5317 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5318 * s390-linux-nat.c (_initialize_s390_nat): Use
5319 add_inf_child_target.
5320 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5321 add_inf_child_target.
5322 * sol-thread.c (thread_db_target_info): New.
5323 (sol_thread_target) <shortname, longname, doc>: Delete.
5325 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5326 add_inf_child_target.
5327 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5328 add_inf_child_target.
5329 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5330 add_inf_child_target.
5331 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5332 add_inf_child_target.
5333 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5334 add_inf_child_target.
5335 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5336 add_inf_child_target.
5337 * spu-linux-nat.c (_initialize_spu_nat): Use
5338 add_inf_child_target.
5339 * spu-multiarch.c (spu_multiarch_target_info): New.
5340 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5342 * target-delegates.c: Regenerate.
5343 * target.c: Include <unordered_map>.
5344 (target_ops_p): Delete.
5345 (DEF_VEC_P(target_ops_p)): Delete.
5346 (target_factories): New.
5347 (test_target_info): New.
5348 (test_target_ops::info): New.
5349 (open_target): Adjust to use target_factories.
5350 (add_target_with_completer): Rename to ...
5351 (add_target): ... this. Change prototype. Register target_info
5352 and open callback in target_factories. Register target_info in
5353 command context instead of target_ops.
5354 (add_target): Delete old implementation.
5355 (add_deprecated_target_alias): Change prototype. Adjust.
5356 (the_native_target): New.
5357 (set_native_target, get_native_target): New.
5358 (find_default_run_target): Use the_native_target.
5359 (find_attach_target, find_run_target): Simplify.
5360 (target_ops::open): Delete.
5361 (dummy_target_info): New.
5362 (dummy_target::shortname, dummy_target::longname)
5363 (dummy_target::doc): Delete.
5364 (dummy_target::info): New.
5365 (debug_target::shortname, debug_target::longname)
5366 (debug_target::doc): Delete.
5367 (debug_target::info): New.
5368 * target.h (struct target_info): New.
5369 (target_ops::~target_ops): Add comment.
5370 (target_ops::info): New.
5371 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5372 longer virtual. Implement in terms of target_info.
5373 (set_native_target, get_native_target): Declare.
5374 (target_open_ftype): New.
5375 (add_target, add_target_with_completer)
5376 (add_deprecated_target_alias): Change prototype.
5377 (test_target) <shortname, longname, doc>: Delete.
5379 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5380 add_inf_child_target.
5381 * tracefile-tfile.c (tfile_target_info): New.
5382 (tfile_target) <shortname, longname, doc>: Delete.
5384 (tfile_target::open): Rename to ...
5385 (tfile_target_open): ... this.
5386 (_initialize_tracefile_tfile): Adjust.
5387 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5388 add_inf_child_target.
5389 * windows-nat.c (_initialize_windows_nat): Use
5390 add_inf_child_target.
5391 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5392 add_inf_child_target.
5394 2018-05-02 Pedro Alves <palves@redhat.com>
5396 * linux-nat.h (linux_nat_target) <low_new_thread,
5397 low_delete_thread, low_new_fork, low_forget_process,
5398 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5399 New virtual methods.
5400 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5401 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5402 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5403 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5404 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5406 * linux-fork.c (delete_fork): Adjust to call low method.
5407 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5408 (linux_nat_new_fork, linux_nat_forget_process_hook)
5409 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5410 (linux_nat_status_is_event):
5411 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5412 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5414 (sigtrap_is_event): Rename to ...
5415 (linux_nat_target::low_status_is_event): ... this.
5416 (linux_nat_set_status_is_event): Delete.
5417 (save_stop_reason, linux_nat_wait_1)
5418 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5420 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5421 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5422 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5423 (linux_nat_set_prepare_to_resume): Delete.
5424 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5425 low virtual methods.
5426 * amd64-linux-nat.c: Likewise.
5427 * arm-linux-nat.c: Likewise.
5428 * i386-linux-nat.c: Likewise.
5429 * ia64-linux-nat.c: Likewise.
5430 * mips-linux-nat.c: Likewise.
5431 * ppc-linux-nat.c: Likewise.
5432 * s390-linux-nat.c: Likewise.
5433 * sparc64-linux-nat.c: Likewise.
5434 * x86-linux-nat.c: Likewise.
5435 * x86-linux-nat.h: Include "nat/x86-linux.h".
5436 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5437 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5440 2018-05-02 Pedro Alves <palves@redhat.com>
5442 * target.h (target_ops)
5443 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5444 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5445 stopped_by_watchpoint, have_continuable_watchpoint,
5446 stopped_data_address, watchpoint_addr_within_range,
5447 can_accel_watchpoint_condition, can_run, thread_alive,
5448 has_all_memory, has_memory, has_stack, has_registers,
5449 has_execution, can_async_p, is_async_p, supports_non_stop,
5450 always_non_stop_p, can_execute_reverse, supports_multi_process,
5451 supports_enable_disable_tracepoint,
5452 supports_disable_randomization, supports_string_tracing,
5453 supports_evaluation_of_breakpoint_conditions,
5454 can_run_breakpoint_commands, filesystem_is_local,
5455 can_download_tracepoint, get_trace_state_variable_value,
5456 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5457 record_is_replaying, record_will_replay,
5458 augmented_libraries_svr4_read>: Adjust to return bool.
5459 * aarch64-linux-nat.c: All implementations adjusted.
5460 * aix-thread.c: All implementations adjusted.
5461 * arm-linux-nat.c: All implementations adjusted.
5462 * breakpoint.c: All implementations adjusted.
5463 * bsd-kvm.c: All implementations adjusted.
5464 * bsd-uthread.c: All implementations adjusted.
5465 * corelow.c: All implementations adjusted.
5466 * ctf.c: All implementations adjusted.
5467 * darwin-nat.c: All implementations adjusted.
5468 * darwin-nat.h: All implementations adjusted.
5469 * exec.c: All implementations adjusted.
5470 * fbsd-nat.c: All implementations adjusted.
5471 * fbsd-nat.h: All implementations adjusted.
5472 * gnu-nat.c: All implementations adjusted.
5473 * gnu-nat.h: All implementations adjusted.
5474 * go32-nat.c: All implementations adjusted.
5475 * ia64-linux-nat.c: All implementations adjusted.
5476 * inf-child.c: All implementations adjusted.
5477 * inf-child.h: All implementations adjusted.
5478 * inf-ptrace.c: All implementations adjusted.
5479 * inf-ptrace.h: All implementations adjusted.
5480 * linux-nat.c: All implementations adjusted.
5481 * linux-nat.h: All implementations adjusted.
5482 * mips-linux-nat.c: All implementations adjusted.
5483 * nto-procfs.c: All implementations adjusted.
5484 * ppc-linux-nat.c: All implementations adjusted.
5485 * procfs.c: All implementations adjusted.
5486 * ravenscar-thread.c: All implementations adjusted.
5487 * record-btrace.c: All implementations adjusted.
5488 * record-full.c: All implementations adjusted.
5489 * remote-sim.c: All implementations adjusted.
5490 * remote.c: All implementations adjusted.
5491 * s390-linux-nat.c: All implementations adjusted.
5492 * sol-thread.c: All implementations adjusted.
5493 * spu-multiarch.c: All implementations adjusted.
5494 * target-delegates.c: All implementations adjusted.
5495 * target.c: All implementations adjusted.
5496 * target.h: All implementations adjusted.
5497 * tracefile-tfile.c: All implementations adjusted.
5498 * tracefile.c: All implementations adjusted.
5499 * tracefile.h: All implementations adjusted.
5500 * windows-nat.c: All implementations adjusted.
5501 * x86-linux-nat.h: All implementations adjusted.
5502 * x86-nat.h: All implementations adjusted.
5504 2018-05-02 Pedro Alves <palves@redhat.com>
5506 * make-target-delegates (scan_target_h): Don't trim lines here.
5507 Replace sequences of tabs and/or whitespace with a single
5509 (top level, parsing methods): Trim each line before processing it
5512 2018-05-02 Pedro Alves <palves@redhat.com>
5513 John Baldwin <jhb@freebsd.org>
5515 * target.h (enum strata) <debug_stratum>: New.
5516 (struct target_ops) <all delegation methods>: Replace by C++
5517 virtual methods, and drop "to_" prefix. All references updated
5519 <to_shortname, to_longname, to_doc, to_data,
5520 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5521 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5522 virtual methods. All references updated throughout.
5523 <can_attach, supports_terminal_ours, can_create_inferior,
5524 get_thread_control_capabilities, attach_no_wait>: New
5526 <insert_breakpoint, remove_breakpoint>: Now
5527 TARGET_DEFAULT_NORETURN methods.
5528 <info_proc>: Now returns bool.
5530 (OPS_MAGIC): Delete.
5531 (current_target): Delete. All references replaced by references
5533 (target_stack): ... this. New.
5534 (target_shortname, target_longname): Adjust.
5535 (target_can_run): Now a function declaration.
5536 (default_child_has_all_memory, default_child_has_memory)
5537 (default_child_has_stack, default_child_has_registers)
5538 (default_child_has_execution): Remove target_ops parameter.
5539 (complete_target_initialization): Delete.
5540 (memory_breakpoint_target): New template class.
5541 (test_target_ops): Refactor as a C++ class with virtual methods.
5542 * make-target-delegates (NAME_PART): Tighten.
5543 (POINTER_PART, CP_SYMBOL): New.
5544 (SIMPLE_RETURN_PART): Reimplement.
5545 (VEC_RETURN_PART): Expect less.
5546 (RETURN_PART, VIRTUAL_PART): New.
5547 (METHOD): Adjust to C++ virtual methods.
5548 (scan_target_h): Remove reference to C99.
5549 (dname): Output "target_ops::" prefix.
5550 (write_function_header): Adjust to output a C++ class method.
5551 (write_declaration): New.
5552 (write_delegator): Adjust to output a C++ class method.
5553 (tdname): Output "dummy_target::" prefix.
5554 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5556 (tdefault_names, debug_names): Delete.
5557 (return_types, tdefaults, styles, argtypes_array): New.
5558 (top level): All methods are delegators.
5560 (top level): Print dummy_target and debug_target classes.
5561 * target-delegates.c: Regenerate.
5562 * target-debug.h (target_debug_print_enum_info_proc_what)
5563 (target_debug_print_thread_control_capabilities)
5564 (target_debug_print_thread_info_p): New.
5565 * target.c (dummy_target): Delete.
5566 (the_dummy_target, the_debug_target): New.
5567 (target_stack): Now extern.
5568 (set_targetdebug): Push/unpush debug target.
5569 (default_child_has_all_memory, default_child_has_memory)
5570 (default_child_has_stack, default_child_has_registers)
5571 (default_child_has_execution): Remove target_ops parameter.
5572 (complete_target_initialization): Delete.
5573 (add_target_with_completer): No longer call
5574 complete_target_initialization.
5575 (target_supports_terminal_ours): Use regular delegation.
5576 (update_current_target): Delete.
5577 (push_target): No longer check magic number. Don't call
5578 update_current_target.
5579 (unpush_target): Don't call update_current_target.
5580 (target_is_pushed): No longer check magic number.
5581 (target_require_runnable): Skip for all stratums over
5583 (target_ops::info_proc): New.
5584 (target_info_proc): Use find_target_at and
5585 find_default_run_target.
5586 (target_supports_disable_randomization): Use regular delegation.
5587 (target_get_osdata): Use find_target_at.
5588 (target_ops::open, target_ops::close, target_ops::can_attach)
5589 (target_ops::attach, target_ops::can_create_inferior)
5590 (target_ops::create_inferior, target_ops::can_run)
5591 (target_can_run): New.
5592 (default_fileio_target): Use regular delegation.
5593 (target_ops::fileio_open, target_ops::fileio_pwrite)
5594 (target_ops::fileio_pread, target_ops::fileio_fstat)
5595 (target_ops::fileio_close, target_ops::fileio_unlink)
5596 (target_ops::fileio_readlink): New.
5597 (target_fileio_open_1, target_fileio_unlink)
5598 (target_fileio_readlink): Always call the target method. Handle
5600 (return_zero, return_zero_has_execution): Delete.
5601 (init_dummy_target): Delete.
5602 (dummy_target::dummy_target, dummy_target::shortname)
5603 (dummy_target::longname, dummy_target::doc)
5604 (debug_target::debug_target, debug_target::shortname)
5605 (debug_target::longname, debug_target::doc): New.
5606 (target_supports_delete_record): Use regular delegation.
5607 (setup_target_debug): Delete.
5608 (maintenance_print_target_stack): Skip debug_stratum.
5609 (initialize_targets): Instantiate the_dummy_target and
5611 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
5613 (target_auxv_search, fprint_target_auxv): Adjust.
5614 (info_auxv_command): Adjust to use target_stack.
5615 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5616 * exceptions.c (print_flush): Handle a NULL target_stack.
5617 * regcache.c (target_ops_no_register): Refactor as class with
5620 * exec.c (exec_target): New class.
5621 (exec_ops): Now an exec_target.
5622 (exec_open, exec_close_1, exec_get_section_table)
5623 (exec_xfer_partial, exec_files_info, exec_has_memory)
5624 (exec_make_note_section): Refactor as exec_target methods.
5625 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5627 (exec_target::find_memory_regions): New.
5628 (_initialize_exec): Don't call init_exec_ops.
5629 * gdbcore.h (exec_file_clear): Delete.
5631 * corefile.c (core_target): Delete.
5632 (core_file_command): Adjust.
5633 * corelow.c (core_target): New class.
5634 (the_core_target): New.
5635 (core_close): Remove target_ops parameter.
5636 (core_close_cleanup): Adjust.
5637 (core_target::close): New.
5638 (core_open, core_detach, get_core_registers, core_files_info)
5639 (core_xfer_partial, core_thread_alive, core_read_description)
5640 (core_pid_to_str, core_thread_name, core_has_memory)
5641 (core_has_stack, core_has_registers, core_info_proc): Rework as
5642 core_target methods.
5643 (ignore, core_remove_breakpoint, init_core_ops): Delete.
5644 (_initialize_corelow): Initialize the_core_target.
5645 * gdbcore.h (core_target): Delete.
5646 (the_core_target): New.
5648 * ctf.c: (ctf_target): New class.
5649 (ctf_ops): Now a ctf_target.
5650 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5651 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5652 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5654 (init_ctf_ops): Delete.
5655 (_initialize_ctf): Don't call it.
5656 * tracefile-tfile.c (tfile_target): New class.
5657 (tfile_ops): Now a tfile_target.
5658 (tfile_open, tfile_close, tfile_files_info)
5659 (tfile_get_tracepoint_status, tfile_trace_find)
5660 (tfile_fetch_registers, tfile_xfer_partial)
5661 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5662 Refactor as tfile_target methods.
5663 (tfile_xfer_partial_features): Remove target_ops parameter.
5664 (init_tfile_ops): Delete.
5665 (_initialize_tracefile_tfile): Don't call it.
5666 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5667 (tracefile_has_stack, tracefile_has_registers)
5668 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5669 tracefile_target methods.
5670 (init_tracefile_ops): Delete.
5671 (tracefile_target::tracefile_target): New.
5672 * tracefile.h: Include "target.h".
5673 (tracefile_target): New class.
5674 (init_tracefile_ops): Delete.
5676 * spu-multiarch.c (spu_multiarch_target): New class.
5677 (spu_ops): Now a spu_multiarch_target.
5678 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5679 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5680 (spu_search_memory, spu_mourn_inferior): Refactor as
5681 spu_multiarch_target methods.
5682 (init_spu_ops): Delete.
5683 (_initialize_spu_multiarch): Remove references to init_spu_ops,
5684 complete_target_initialization.
5686 * ravenscar-thread.c (ravenscar_thread_target): New class.
5687 (ravenscar_ops): Now a ravenscar_thread_target.
5688 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5689 (ravenscar_thread_alive, ravenscar_pid_to_str)
5690 (ravenscar_fetch_registers, ravenscar_store_registers)
5691 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5692 (ravenscar_stopped_by_hw_breakpoint)
5693 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5694 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5695 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5697 (init_ravenscar_thread_ops): Delete.
5698 (_initialize_ravenscar): Remove references to
5699 init_ravenscar_thread_ops and complete_target_initialization.
5701 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5702 (bsd_uthread_target): New class.
5703 (bsd_uthread_ops): Now a bsd_uthread_target.
5704 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5705 (bsd_uthread_close, bsd_uthread_mourn_inferior)
5706 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5707 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5708 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5709 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5710 (bsd_uthread_target): Delete function.
5711 (_initialize_bsd_uthread): Remove reference to
5712 complete_target_initialization.
5714 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
5715 (target_bfd): ... this new class.
5716 (target_bfd_xfer_partial, target_bfd_get_section_table)
5717 (target_bfd_close): Refactor as target_bfd methods.
5718 (target_bfd::~target_bfd): New.
5719 (target_bfd_reopen): Adjust.
5720 (target_bfd::close): New.
5722 * record-btrace.c (record_btrace_target): New class.
5723 (record_btrace_ops): Now a record_btrace_target.
5724 (record_btrace_open, record_btrace_stop_recording)
5725 (record_btrace_disconnect, record_btrace_close)
5726 (record_btrace_async, record_btrace_info)
5727 (record_btrace_insn_history, record_btrace_insn_history_range)
5728 (record_btrace_insn_history_from, record_btrace_call_history)
5729 (record_btrace_call_history_range)
5730 (record_btrace_call_history_from, record_btrace_record_method)
5731 (record_btrace_is_replaying, record_btrace_will_replay)
5732 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5733 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5734 (record_btrace_store_registers, record_btrace_prepare_to_store)
5735 (record_btrace_to_get_unwinder)
5736 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5737 (record_btrace_commit_resume, record_btrace_wait)
5738 (record_btrace_stop, record_btrace_can_execute_reverse)
5739 (record_btrace_stopped_by_sw_breakpoint)
5740 (record_btrace_supports_stopped_by_sw_breakpoint)
5741 (record_btrace_stopped_by_hw_breakpoint)
5742 (record_btrace_supports_stopped_by_hw_breakpoint)
5743 (record_btrace_update_thread_list, record_btrace_thread_alive)
5744 (record_btrace_goto_begin, record_btrace_goto_end)
5745 (record_btrace_goto, record_btrace_stop_replaying_all)
5746 (record_btrace_execution_direction)
5747 (record_btrace_prepare_to_generate_core)
5748 (record_btrace_done_generating_core): Refactor as
5749 record_btrace_target methods.
5750 (init_record_btrace_ops): Delete.
5751 (_initialize_record_btrace): Remove reference to
5752 init_record_btrace_ops.
5753 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5754 the execution_direction global.
5755 (record_full_base_target, record_full_target)
5756 (record_full_core_target): New classes.
5757 (record_full_ops): Now a record_full_target.
5758 (record_full_core_ops): Now a record_full_core_target.
5759 (record_full_target::detach, record_full_target::disconnect)
5760 (record_full_core_target::disconnect)
5761 (record_full_target::mourn_inferior, record_full_target::kill):
5763 (record_full_open, record_full_close, record_full_async): Refactor
5764 as methods of the record_full_base_target class.
5765 (record_full_resume, record_full_commit_resume): Refactor
5766 as methods of the record_full_target class.
5767 (record_full_wait, record_full_stopped_by_watchpoint)
5768 (record_full_stopped_data_address)
5769 (record_full_stopped_by_sw_breakpoint)
5770 (record_full_supports_stopped_by_sw_breakpoint)
5771 (record_full_stopped_by_hw_breakpoint)
5772 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5773 methods of the record_full_base_target class.
5774 (record_full_store_registers, record_full_xfer_partial)
5775 (record_full_insert_breakpoint, record_full_remove_breakpoint):
5776 Refactor as methods of the record_full_target class.
5777 (record_full_can_execute_reverse, record_full_get_bookmark)
5778 (record_full_goto_bookmark, record_full_execution_direction)
5779 (record_full_record_method, record_full_info, record_full_delete)
5780 (record_full_is_replaying, record_full_will_replay)
5781 (record_full_goto_begin, record_full_goto_end, record_full_goto)
5782 (record_full_stop_replaying): Refactor as methods of the
5783 record_full_base_target class.
5784 (record_full_core_resume, record_full_core_kill)
5785 (record_full_core_fetch_registers)
5786 (record_full_core_prepare_to_store)
5787 (record_full_core_store_registers, record_full_core_xfer_partial)
5788 (record_full_core_insert_breakpoint)
5789 (record_full_core_remove_breakpoint)
5790 (record_full_core_has_execution): Refactor
5791 as methods of the record_full_core_target class.
5792 (record_full_base_target::supports_delete_record): New.
5793 (init_record_full_ops): Delete.
5794 (init_record_full_core_ops): Delete.
5795 (record_full_save): Refactor as method of the
5796 record_full_base_target class.
5797 (_initialize_record_full): Remove references to
5798 init_record_full_ops and init_record_full_core_ops.
5800 * remote.c (remote_target, extended_remote_target): New classes.
5801 (remote_ops): Now a remote_target.
5802 (extended_remote_ops): Now an extended_remote_target.
5803 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5804 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5805 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5806 (remote_pass_signals, remote_set_syscall_catchpoint)
5807 (remote_program_signals, )
5808 (remote_thread_always_alive): Remove target_ops parameter.
5809 (remote_thread_alive, remote_thread_name)
5810 (remote_update_thread_list, remote_threads_extra_info)
5811 (remote_static_tracepoint_marker_at)
5812 (remote_static_tracepoint_markers_by_strid)
5813 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5814 (remote_open): Refactor as methods of remote_target.
5815 (extended_remote_open, extended_remote_detach)
5816 (extended_remote_attach, extended_remote_post_attach):
5817 (extended_remote_supports_disable_randomization)
5818 (extended_remote_create_inferior): : Refactor as method of
5819 extended_remote_target.
5820 (remote_set_permissions, remote_open_1, remote_detach)
5821 (remote_follow_fork, remote_follow_exec, remote_disconnect)
5822 (remote_resume, remote_commit_resume, remote_stop)
5823 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5824 (remote_terminal_ours, remote_wait, remote_fetch_registers)
5825 (remote_prepare_to_store, remote_store_registers)
5826 (remote_flash_erase, remote_flash_done, remote_files_info)
5827 (remote_kill, remote_mourn, remote_insert_breakpoint)
5828 (remote_remove_breakpoint, remote_insert_watchpoint)
5829 (remote_watchpoint_addr_within_range)
5830 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5831 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5832 (remote_supports_stopped_by_sw_breakpoint)
5833 (remote_stopped_by_hw_breakpoint)
5834 (remote_supports_stopped_by_hw_breakpoint)
5835 (remote_stopped_by_watchpoint, remote_stopped_data_address)
5836 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5837 (remote_verify_memory): Refactor as methods of remote_target.
5838 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5840 (remote_xfer_partial, remote_get_memory_xfer_limit)
5841 (remote_search_memory, remote_rcmd, remote_memory_map)
5842 (remote_pid_to_str, remote_get_thread_local_address)
5843 (remote_get_tib_address, remote_read_description): Refactor as
5844 methods of remote_target.
5845 (remote_target::fileio_open, remote_target::fileio_pwrite)
5846 (remote_target::fileio_pread, remote_target::fileio_close): New.
5847 (remote_hostio_readlink, remote_hostio_fstat)
5848 (remote_filesystem_is_local, remote_can_execute_reverse)
5849 (remote_supports_non_stop, remote_supports_disable_randomization)
5850 (remote_supports_multi_process, remote_supports_cond_breakpoints)
5851 (remote_supports_enable_disable_tracepoint)
5852 (remote_supports_string_tracing)
5853 (remote_can_run_breakpoint_commands, remote_trace_init)
5854 (remote_download_tracepoint, remote_can_download_tracepoint)
5855 (remote_download_trace_state_variable, remote_enable_tracepoint)
5856 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5857 (remote_trace_start, remote_get_trace_status)
5858 (remote_get_tracepoint_status, remote_trace_stop)
5859 (remote_trace_find, remote_get_trace_state_variable_value)
5860 (remote_save_trace_data, remote_get_raw_trace_data)
5861 (remote_set_disconnected_tracing, remote_core_of_thread)
5862 (remote_set_circular_trace_buffer, remote_traceframe_info)
5863 (remote_get_min_fast_tracepoint_insn_len)
5864 (remote_set_trace_buffer_size, remote_set_trace_notes)
5865 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5866 (remote_disable_btrace, remote_teardown_btrace)
5867 (remote_read_btrace, remote_btrace_conf)
5868 (remote_augmented_libraries_svr4_read, remote_load)
5869 (remote_pid_to_exec_file, remote_can_do_single_step)
5870 (remote_execution_direction, remote_thread_handle_to_thread_info):
5871 Refactor as methods of remote_target.
5872 (init_remote_ops, init_extended_remote_ops): Delete.
5873 (remote_can_async_p, remote_is_async_p, remote_async)
5874 (remote_thread_events, remote_upload_tracepoints)
5875 (remote_upload_trace_state_variables): Refactor as methods of
5877 (_initialize_remote): Remove references to init_remote_ops and
5878 init_extended_remote_ops.
5880 * remote-sim.c (gdbsim_target): New class.
5881 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5882 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5883 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5884 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5885 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5886 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5887 Refactor as methods of gdbsim_target.
5888 (gdbsim_ops): Now a gdbsim_target.
5889 (init_gdbsim_ops): Delete.
5890 (gdbsim_cntrl_c): Adjust.
5891 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5893 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5894 (the_amd64_linux_nat_target): New.
5895 (amd64_linux_fetch_inferior_registers)
5896 (amd64_linux_store_inferior_registers): Refactor as methods of
5897 amd64_linux_nat_target.
5898 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
5899 * i386-linux-nat.c: Don't include "linux-nat.h".
5900 (i386_linux_nat_target): New class.
5901 (the_i386_linux_nat_target): New.
5902 (i386_linux_fetch_inferior_registers)
5903 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5904 as methods of i386_linux_nat_target.
5905 (_initialize_i386_linux_nat): Adjust. Set linux_target.
5906 * inf-child.c (inf_child_ops): Delete.
5907 (inf_child_fetch_inferior_registers)
5908 (inf_child_store_inferior_registers): Delete.
5909 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5910 methods of inf_child_target.
5911 (inf_child_target::supports_terminal_ours)
5912 (inf_child_target::terminal_init)
5913 (inf_child_target::terminal_inferior)
5914 (inf_child_target::terminal_ours_for_output)
5915 (inf_child_target::terminal_ours, inf_child_target::interrupt)
5916 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5918 (inf_child_open, inf_child_disconnect, inf_child_close)
5919 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5920 (inf_child_post_startup_inferior, inf_child_can_run)
5921 (inf_child_pid_to_exec_file): Refactor as methods of
5923 (inf_child_follow_fork): Delete.
5924 (inf_child_target::can_create_inferior)
5925 (inf_child_target::can_attach): New.
5926 (inf_child_target::has_all_memory, inf_child_target::has_memory)
5927 (inf_child_target::has_stack, inf_child_target::has_registers)
5928 (inf_child_target::has_execution): New.
5929 (inf_child_fileio_open, inf_child_fileio_pwrite)
5930 (inf_child_fileio_pread, inf_child_fileio_fstat)
5931 (inf_child_fileio_close, inf_child_fileio_unlink)
5932 (inf_child_fileio_readlink, inf_child_use_agent)
5933 (inf_child_can_use_agent): Refactor as methods of
5935 (return_zero, inf_child_target): Delete.
5936 (inf_child_target::inf_child_target): New.
5937 * inf-child.h: Include "target.h".
5938 (inf_child_target): Delete function prototype.
5939 (inf_child_target): New class.
5940 (inf_child_open_target, inf_child_mourn_inferior)
5941 (inf_child_maybe_unpush_target): Delete.
5942 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5943 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5944 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5945 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5946 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5947 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5948 (inf_ptrace_wait, inf_ptrace_xfer_partial)
5949 (inf_ptrace_thread_alive, inf_ptrace_files_info)
5950 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5951 methods of inf_ptrace_target.
5952 (inf_ptrace_target): Delete function.
5953 * inf-ptrace.h: Include "inf-child.h".
5954 (inf_ptrace_target): Delete function declaration.
5955 (inf_ptrace_target): New class.
5956 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5957 * linux-nat.c (linux_target): New.
5958 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5959 (linux_nat_target::~linux_nat_target): New.
5960 (linux_child_post_attach, linux_child_post_startup_inferior)
5961 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5962 (linux_child_remove_fork_catchpoint)
5963 (linux_child_insert_vfork_catchpoint)
5964 (linux_child_remove_vfork_catchpoint)
5965 (linux_child_insert_exec_catchpoint)
5966 (linux_child_remove_exec_catchpoint)
5967 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5968 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5969 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5970 (linux_nat_stopped_data_address)
5971 (linux_nat_stopped_by_sw_breakpoint)
5972 (linux_nat_supports_stopped_by_sw_breakpoint)
5973 (linux_nat_stopped_by_hw_breakpoint)
5974 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5975 (linux_nat_kill, linux_nat_mourn_inferior)
5976 (linux_nat_xfer_partial, linux_nat_thread_alive)
5977 (linux_nat_update_thread_list, linux_nat_pid_to_str)
5978 (linux_nat_thread_name, linux_child_pid_to_exec_file)
5979 (linux_child_static_tracepoint_markers_by_strid)
5980 (linux_nat_is_async_p, linux_nat_can_async_p)
5981 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5982 (linux_nat_supports_multi_process)
5983 (linux_nat_supports_disable_randomization, linux_nat_async)
5984 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
5985 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
5986 (linux_nat_fileio_open, linux_nat_fileio_readlink)
5987 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
5988 methods of linux_nat_target.
5989 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
5990 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
5992 (check_stopped_by_watchpoint): Adjust.
5993 (linux_xfer_partial): Delete.
5994 (linux_target_install_ops, linux_target, linux_nat_add_target):
5996 (linux_nat_target::linux_nat_target): New.
5997 * linux-nat.h: Include "inf-ptrace.h".
5998 (linux_nat_target): New.
5999 (linux_target, linux_target_install_ops, linux_nat_add_target):
6000 Delete function declarations.
6001 (linux_target): Declare global.
6002 * linux-thread-db.c (thread_db_target): New.
6003 (thread_db_target::thread_db_target): New.
6004 (thread_db_ops): Delete.
6005 (the_thread_db_target): New.
6006 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6007 (thread_db_update_thread_list, thread_db_pid_to_str)
6008 (thread_db_extra_thread_info)
6009 (thread_db_thread_handle_to_thread_info)
6010 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6011 (thread_db_resume): Refactor as methods of thread_db_target.
6012 (init_thread_db_ops): Delete.
6013 (_initialize_thread_db): Remove reference to init_thread_db_ops.
6014 * x86-linux-nat.c: Don't include "linux-nat.h".
6015 (super_post_startup_inferior): Delete.
6016 (x86_linux_nat_target::~x86_linux_nat_target): New.
6017 (x86_linux_child_post_startup_inferior)
6018 (x86_linux_read_description, x86_linux_enable_btrace)
6019 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6020 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6021 methods of x86_linux_nat_target.
6022 (x86_linux_create_target): Delete. Bits folded ...
6023 (x86_linux_add_target): ... here. Now takes a linux_nat_target
6025 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6026 (x86_linux_nat_target): New class.
6027 (x86_linux_create_target): Delete.
6028 (x86_linux_add_target): Now takes a linux_nat_target pointer.
6029 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6030 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6031 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6032 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6033 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6035 (x86_use_watchpoints): Delete.
6036 * x86-nat.h: Include "breakpoint.h" and "target.h".
6037 (x86_use_watchpoints): Delete.
6038 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6039 (x86_stopped_by_watchpoint, x86_stopped_data_address)
6040 (x86_insert_watchpoint, x86_remove_watchpoint)
6041 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6042 (x86_stopped_by_hw_breakpoint): New declarations.
6043 (x86_nat_target): New template class.
6045 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6046 (the_ppc_linux_nat_target): New.
6047 (ppc_linux_fetch_inferior_registers)
6048 (ppc_linux_can_use_hw_breakpoint)
6049 (ppc_linux_region_ok_for_hw_watchpoint)
6050 (ppc_linux_ranged_break_num_registers)
6051 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6052 (ppc_linux_insert_mask_watchpoint)
6053 (ppc_linux_remove_mask_watchpoint)
6054 (ppc_linux_can_accel_watchpoint_condition)
6055 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6056 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6057 (ppc_linux_watchpoint_addr_within_range)
6058 (ppc_linux_masked_watch_num_registers)
6059 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6060 (ppc_linux_read_description): Refactor as methods of
6061 ppc_linux_nat_target.
6062 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
6064 * procfs.c (procfs_xfer_partial): Delete forward declaration.
6065 (procfs_target): New class.
6066 (the_procfs_target): New.
6067 (procfs_target): Delete function.
6068 (procfs_auxv_parse, procfs_attach, procfs_detach)
6069 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6070 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6071 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6072 (procfs_create_inferior, procfs_update_thread_list)
6073 (procfs_thread_alive, procfs_pid_to_str)
6074 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6075 (procfs_stopped_data_address, procfs_insert_watchpoint)
6076 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6077 (proc_find_memory_regions, procfs_info_proc)
6078 (procfs_make_note_section): Refactor as methods of procfs_target.
6079 (_initialize_procfs): Adjust.
6080 * sol-thread.c (sol_thread_target): New class.
6081 (sol_thread_ops): Now a sol_thread_target.
6082 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6083 (sol_thread_fetch_registers, sol_thread_store_registers)
6084 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6085 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6086 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6087 (init_sol_thread_ops): Delete.
6088 (_initialize_sol_thread): Adjust. Remove references to
6089 init_sol_thread_ops and complete_target_initialization.
6091 * windows-nat.c (windows_nat_target): New class.
6092 (windows_fetch_inferior_registers)
6093 (windows_store_inferior_registers, windows_resume, windows_wait)
6094 (windows_attach, windows_detach, windows_pid_to_exec_file)
6095 (windows_files_info, windows_create_inferior)
6096 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6097 (windows_close, windows_pid_to_str, windows_xfer_partial)
6098 (windows_get_tib_address, windows_get_ada_task_ptid)
6099 (windows_thread_name, windows_thread_alive): Refactor as
6100 windows_nat_target methods.
6101 (do_initial_windows_stuff): Adjust.
6102 (windows_target): Delete function.
6103 (_initialize_windows_nat): Adjust.
6105 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6106 (darwin_mourn_inferior, darwin_kill_inferior)
6107 (darwin_create_inferior, darwin_attach, darwin_detach)
6108 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6109 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6110 (darwin_supports_multi_process): Refactor as darwin_nat_target
6112 (darwin_resume_to, darwin_files_info): Delete.
6113 (_initialize_darwin_inferior): Rename to ...
6114 (_initialize_darwin_nat): ... this. Adjust to C++ification.
6115 * darwin-nat.h: Include "inf-child.h".
6116 (darwin_nat_target): New class.
6117 (darwin_complete_target): Delete.
6118 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6119 (darwin_target): New.
6120 (i386_darwin_fetch_inferior_registers)
6121 (i386_darwin_store_inferior_registers): Refactor as methods of
6123 (darwin_complete_target): Delete, with ...
6124 (_initialize_i386_darwin_nat): ... bits factored out here.
6126 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6127 (the_alpha_linux_nat_target): New.
6128 (alpha_linux_register_u_offset): Refactor as
6129 alpha_linux_nat_target method.
6130 (_initialize_alpha_linux_nat): Adjust.
6131 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6132 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6133 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6134 methods of linux_nat_trad_target.
6135 (linux_trad_target): Delete.
6136 * linux-nat-trad.h (linux_trad_target): Delete function.
6137 (linux_nat_trad_target): New class.
6138 * mips-linux-nat.c (mips_linux_nat_target): New class.
6139 (super_fetch_registers, super_store_registers, super_close):
6141 (the_mips_linux_nat_target): New.
6142 (mips64_linux_regsets_fetch_registers)
6143 (mips64_linux_regsets_store_registers)
6144 (mips64_linux_fetch_registers, mips64_linux_store_registers)
6145 (mips_linux_register_u_offset, mips_linux_read_description)
6146 (mips_linux_can_use_hw_breakpoint)
6147 (mips_linux_stopped_by_watchpoint)
6148 (mips_linux_stopped_data_address)
6149 (mips_linux_region_ok_for_hw_watchpoint)
6150 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6151 (mips_linux_close): Refactor as methods of mips_linux_nat.
6152 (_initialize_mips_linux_nat): Adjust to C++ification.
6154 * aix-thread.c (aix_thread_target): New class.
6155 (aix_thread_ops): Now an aix_thread_target.
6156 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6157 (aix_thread_fetch_registers, aix_thread_store_registers)
6158 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6159 (aix_thread_thread_alive, aix_thread_pid_to_str)
6160 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6161 Refactor as methods of aix_thread_target.
6162 (init_aix_thread_ops): Delete.
6163 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6164 and complete_target_initialization.
6165 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6166 (rs6000_nat_target): New class.
6167 (the_rs6000_nat_target): New.
6168 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6169 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6170 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6171 (super_create_inferior): Delete.
6172 (_initialize_rs6000_nat): Adjust to C++ification.
6174 * arm-linux-nat.c (arm_linux_nat_target): New class.
6175 (the_arm_linux_nat_target): New.
6176 (arm_linux_fetch_inferior_registers)
6177 (arm_linux_store_inferior_registers, arm_linux_read_description)
6178 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6179 (arm_linux_remove_hw_breakpoint)
6180 (arm_linux_region_ok_for_hw_watchpoint)
6181 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6182 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6183 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6184 arm_linux_nat_target.
6185 (_initialize_arm_linux_nat): Adjust to C++ification.
6187 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6188 (the_aarch64_linux_nat_target): New.
6189 (aarch64_linux_fetch_inferior_registers)
6190 (aarch64_linux_store_inferior_registers)
6191 (aarch64_linux_child_post_startup_inferior)
6192 (aarch64_linux_read_description)
6193 (aarch64_linux_can_use_hw_breakpoint)
6194 (aarch64_linux_insert_hw_breakpoint)
6195 (aarch64_linux_remove_hw_breakpoint)
6196 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6197 (aarch64_linux_region_ok_for_hw_watchpoint)
6198 (aarch64_linux_stopped_data_address)
6199 (aarch64_linux_stopped_by_watchpoint)
6200 (aarch64_linux_watchpoint_addr_within_range)
6201 (aarch64_linux_can_do_single_step): Refactor as methods of
6202 aarch64_linux_nat_target.
6203 (super_post_startup_inferior): Delete.
6204 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6206 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6207 (the_hppa_linux_nat_target): New.
6208 (hppa_linux_fetch_inferior_registers)
6209 (hppa_linux_store_inferior_registers): Refactor as methods of
6210 hppa_linux_nat_target.
6211 (_initialize_hppa_linux_nat): Adjust to C++ification.
6213 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6214 (the_ia64_linux_nat_target): New.
6215 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6216 (ia64_linux_stopped_data_address)
6217 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6218 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6219 ia64_linux_nat_target methods.
6220 (super_xfer_partial): Delete.
6221 (_initialize_ia64_linux_nat): Adjust to C++ification.
6223 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6224 (the_m32r_linux_nat_target): New.
6225 (m32r_linux_fetch_inferior_registers)
6226 (m32r_linux_store_inferior_registers): Refactor as
6227 m32r_linux_nat_target methods.
6228 (_initialize_m32r_linux_nat): Adjust to C++ification.
6230 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6231 (the_m68k_linux_nat_target): New.
6232 (m68k_linux_fetch_inferior_registers)
6233 (m68k_linux_store_inferior_registers): Refactor as
6234 m68k_linux_nat_target methods.
6235 (_initialize_m68k_linux_nat): Adjust to C++ification.
6237 * s390-linux-nat.c (s390_linux_nat_target): New class.
6238 (the_s390_linux_nat_target): New.
6239 (s390_linux_fetch_inferior_registers)
6240 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6241 (s390_insert_watchpoint, s390_remove_watchpoint)
6242 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6243 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6244 (s390_auxv_parse, s390_read_description): Refactor as methods of
6245 s390_linux_nat_target.
6246 (_initialize_s390_nat): Adjust to C++ification.
6248 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6249 (the_sparc_linux_nat_target): New.
6250 (_initialize_sparc_linux_nat): Adjust to C++ification.
6251 * sparc-nat.c (sparc_fetch_inferior_registers)
6252 (sparc_store_inferior_registers): Remove target_ops parameter.
6253 * sparc-nat.h (sparc_fetch_inferior_registers)
6254 (sparc_store_inferior_registers): Remove target_ops parameter.
6255 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6256 (the_sparc64_linux_nat_target): New.
6257 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6259 * spu-linux-nat.c (spu_linux_nat_target): New class.
6260 (the_spu_linux_nat_target): New.
6261 (spu_child_post_startup_inferior, spu_child_post_attach)
6262 (spu_child_wait, spu_fetch_inferior_registers)
6263 (spu_store_inferior_registers, spu_xfer_partial)
6264 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6266 (_initialize_spu_nat): Adjust to C++ification.
6268 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6269 (the_tilegx_linux_nat_target): New.
6270 (fetch_inferior_registers, store_inferior_registers):
6271 Refactor as methods.
6272 (_initialize_tile_linux_nat): Adjust to C++ification.
6274 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6275 (the_xtensa_linux_nat_target): New.
6276 (xtensa_linux_fetch_inferior_registers)
6277 (xtensa_linux_store_inferior_registers): Refactor as
6278 xtensa_linux_nat_target methods.
6279 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6281 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6282 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6283 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6284 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6285 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6286 (fbsd_stopped_by_sw_breakpoint)
6287 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6288 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6289 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6290 (fbsd_post_startup_inferior, fbsd_post_attach)
6291 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6292 (fbsd_set_syscall_catchpoint)
6293 (super_xfer_partial, super_resume, super_wait)
6294 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6295 (fbsd_handle_debug_trap): Remove target_ops parameter.
6296 (fbsd_nat_add_target): Delete.
6297 * fbsd-nat.h: Include "inf-ptrace.h".
6298 (fbsd_nat_add_target): Delete.
6299 (USE_SIGTRAP_SIGINFO): Define.
6300 (fbsd_nat_target): New class.
6302 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6303 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6304 (amd64bsd_target): Delete.
6305 * amd64-bsd-nat.h: New file.
6306 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6308 (amd64_fbsd_nat_target): New class.
6309 (the_amd64_fbsd_nat_target): New.
6310 (amd64fbsd_read_description): Refactor as method of
6311 amd64_fbsd_nat_target.
6312 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6313 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6314 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6315 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6316 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6317 (i386bsd_target): Delete.
6318 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6319 (i386bsd_fetch_inferior_registers)
6320 (i386bsd_store_inferior_registers): Declare.
6321 (i386_bsd_nat_target): New class.
6322 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6323 (the_i386_fbsd_nat_target): New.
6324 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6325 i386_fbsd_nat_target methods.
6326 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6327 (_initialize_i386fbsd_nat): Adjust to C++ification.
6328 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6329 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6330 (_initialize_x86_bsd_nat): Adjust to C++ification.
6331 * x86-bsd-nat.h: Include "x86-nat.h".
6332 (x86bsd_target): Delete declaration.
6333 (x86bsd_nat_target): New class.
6335 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6336 (the_aarch64_fbsd_nat_target): New.
6337 (aarch64_fbsd_fetch_inferior_registers)
6338 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6339 aarch64_fbsd_nat_target.
6340 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6341 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6342 (the_alpha_bsd_nat_target): New.
6343 (alphabsd_fetch_inferior_registers)
6344 (alphabsd_store_inferior_registers): Refactor as
6345 alpha_bsd_nat_target methods.
6346 (_initialize_alphabsd_nat): Refactor as methods of
6347 alpha_bsd_nat_target.
6348 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6349 (the_amd64_nbsd_nat_target): New.
6350 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6351 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6352 (the_amd64_obsd_nat_target): New.
6353 (_initialize_amd64obsd_nat): Adjust to C++ification.
6354 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6355 (the_arm_fbsd_nat_target): New.
6356 (arm_fbsd_fetch_inferior_registers)
6357 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6358 (_initialize_arm_fbsd_nat): Refactor as methods of
6359 arm_fbsd_nat_target.
6360 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6361 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6362 (the_arm_netbsd_nat_target): New.
6363 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6364 arm_netbsd_nat_target.
6365 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6366 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6367 (the_hppa_nbsd_nat_target): New.
6368 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6369 hppa_nbsd_nat_target methods.
6370 (_initialize_hppanbsd_nat): Adjust to C++ification.
6371 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6372 (the_hppa_obsd_nat_target): New.
6373 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6374 methods of hppa_obsd_nat_target.
6375 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6377 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6378 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6380 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6381 (_initialize_i386obsd_nat): Use add_target.
6382 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6383 (the_m68k_bsd_nat_target): New.
6384 (m68kbsd_fetch_inferior_registers)
6385 (m68kbsd_store_inferior_registers): Refactor as methods of
6386 m68k_bsd_nat_target.
6387 (_initialize_m68kbsd_nat): Adjust to C++ification.
6388 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6389 (the_mips_fbsd_nat_target): New.
6390 (mips_fbsd_fetch_inferior_registers)
6391 (mips_fbsd_store_inferior_registers): Refactor as methods of
6392 mips_fbsd_nat_target.
6393 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6395 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6396 (the_mips_nbsd_nat_target): New.
6397 (mipsnbsd_fetch_inferior_registers)
6398 (mipsnbsd_store_inferior_registers): Refactor as methods of
6399 mips_nbsd_nat_target.
6400 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6401 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6402 (the_mips64_obsd_nat_target): New.
6403 (mips64obsd_fetch_inferior_registers)
6404 (mips64obsd_store_inferior_registers): Refactor as methods of
6405 mips64_obsd_nat_target.
6406 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6408 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6410 * nbsd-nat.h: Include "inf-ptrace.h".
6411 (nbsd_nat_target): New class.
6412 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6413 (obsd_wait): Refactor as methods of obsd_nat_target.
6414 (obsd_add_target): Delete.
6415 * obsd-nat.h: Include "inf-ptrace.h".
6416 (obsd_nat_target): New class.
6417 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6418 (the_ppc_fbsd_nat_target): New.
6419 (ppcfbsd_fetch_inferior_registers)
6420 (ppcfbsd_store_inferior_registers): Refactor as methods of
6421 ppc_fbsd_nat_target.
6422 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6424 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6425 (the_ppc_nbsd_nat_target): New.
6426 (ppcnbsd_fetch_inferior_registers)
6427 (ppcnbsd_store_inferior_registers): Refactor as methods of
6428 ppc_nbsd_nat_target.
6429 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6430 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6431 (the_ppc_obsd_nat_target): New.
6432 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6433 methods of ppc_obsd_nat_target.
6434 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6436 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6437 (the_sh_nbsd_nat_target): New.
6438 (shnbsd_fetch_inferior_registers)
6439 (shnbsd_store_inferior_registers): Refactor as methods of
6441 (_initialize_shnbsd_nat): Adjust to C++ification.
6442 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6443 (inf_ptrace_xfer_partial): Delete.
6444 (sparc_xfer_partial, sparc_target): Delete.
6445 * sparc-nat.h (sparc_fetch_inferior_registers)
6446 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6447 (sparc_target): Delete function declaration.
6448 (sparc_target): New template class.
6449 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6450 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6451 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6452 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6454 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6455 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6456 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6457 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6459 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6460 (the_vax_bsd_nat_target): New.
6461 (vaxbsd_fetch_inferior_registers)
6462 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6464 (_initialize_vaxbsd_nat): Adjust to C++ification.
6466 * bsd-kvm.c (bsd_kvm_target): New class.
6467 (bsd_kvm_ops): Now a bsd_kvm_target.
6468 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6469 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6470 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6472 (bsd_kvm_return_one): Delete.
6473 (bsd_kvm_add_target): Adjust to C++ification.
6475 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6476 (nto_procfs_target_procfs): New classes.
6477 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6478 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6479 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6480 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6481 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6482 (procfs_remove_hw_breakpoint, procfs_resume)
6483 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6484 (procfs_kill_inferior, procfs_store_registers)
6485 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6486 as methods of nto_procfs_target.
6487 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6488 (nto_native_ops): Delete.
6489 (procfs_open, procfs_native_open): Delete.
6490 (nto_native_ops): Now an nto_procfs_target_native.
6491 (init_procfs_targets): Adjust to C++ification.
6492 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6493 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6494 Refactor as methods of nto_procfs_target.
6496 * go32-nat.c (go32_nat_target): New class.
6497 (the_go32_nat_target): New.
6498 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6499 (go32_store_registers, go32_xfer_partial, go32_files_info)
6500 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6501 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6502 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6503 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6504 (go32_target): Delete.
6505 (_initialize_go32_nat): Adjust to C++ification.
6507 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6508 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6509 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6510 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6512 (gnu_target): Delete.
6513 * gnu-nat.h (gnu_target): Delete.
6514 (gnu_nat_target): New class.
6515 * i386-gnu-nat.c (gnu_base_target): New.
6516 (i386_gnu_nat_target): New class.
6517 (the_i386_gnu_nat_target): New.
6518 (_initialize_i386gnu_nat): Adjust to C++ification.
6520 2018-05-02 Pedro Alves <palves@redhat.com>
6522 * bfd-target.c (target_bfd_xclose): Rename to ...
6523 (target_bfd_close): ... this.
6524 (target_bfd_reopen): Adjust.
6525 * target.c (target_close): Remove references to to_xclose.
6526 * target.h (target_ops::to_xclose): Delete.
6527 (target_ops::to_close): Update comments.
6529 2018-05-02 Pedro Alves <palves@redhat.com>
6531 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6533 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6534 * inf-ptrace.c (inf_ptrace_register_u_offset)
6535 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6536 (inf_ptrace_store_register, inf_ptrace_store_registers)
6537 (inf_ptrace_trad_target): Move to ...
6538 * linux-nat-trad.c: ... this new file.
6539 * linux-nat-trad.h: New file.
6540 * linux-nat.c (linux_target_install_ops): Make extern.
6541 (linux_trad_target): Delete.
6542 * linux-nat.h (linux_trad_target): Delete declaration.
6543 (linux_target_install_ops): Declare.
6544 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6547 2018-05-02 Pedro Alves <palves@redhat.com>
6549 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6550 procfs_target/add_target here.
6551 * procfs.c (procfs_target): Make static.
6552 (_initialize_procfs): Call add_target here.
6553 * procfs.h (struct target_ops): Remove forward declaration.
6554 (procfs_target): Remove declaration.
6555 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6557 2018-05-02 Pedro Alves <palves@redhat.com>
6559 * procfs.c (procfs_stopped_by_watchpoint)
6560 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6561 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6563 (procfs_use_watchpoints): Delete, move contents...
6564 (procfs_target): ... here.
6565 * procfs.h (procfs_use_watchpoints): Delete declaration.
6566 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6567 procfs_use_watchpoints.
6568 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6569 procfs_use_watchpoints.
6571 2018-05-02 Tom Tromey <tom@tromey.com>
6574 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6575 and var_zuinteger_unlimited.
6576 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6577 and PARAM_ZUINTEGER_UNLIMITED.
6578 (set_parameter_value): Handle var_zuinteger and
6579 var_zuinteger_unlimited.
6580 (add_setshow_generic): Likewise.
6581 (parmpy_init): Likewise.
6583 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6586 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6587 pointer is not null before dereferencing it.
6589 2018-04-30 Tom Tromey <tom@tromey.com>
6591 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6594 2018-04-30 Tom Tromey <tom@tromey.com>
6596 * breakpoint.c (mention): Remove use of is_mi_like_p.
6597 (print_mention_ranged_breakpoint): Likewise.
6598 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6601 2018-04-30 Tom Tromey <tom@tromey.com>
6603 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6605 2018-04-30 Tom Tromey <tom@tromey.com>
6607 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6608 (info_spu_event_command): Remove some uses of is_mi_like_p.
6610 2018-04-30 Tom Tromey <tom@tromey.com>
6612 * python/py-framefilter.c (py_print_single_arg)
6613 (enumerate_locals, py_print_args, py_print_frame): Remove some
6614 uses of is_mi_like_p.
6616 2018-04-30 Tom Tromey <tom@tromey.com>
6619 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6620 * ui-out.h (ui_out::is_mi_like_p): Now const.
6621 (ui_out::do_is_mi_like_p): Now const.
6622 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6624 2018-04-30 Tom Tromey <tom@tromey.com>
6626 * varobj.c (varobj_set_visualizer): Use new_reference.
6627 * python/python.c (gdbpy_decode_line): Use new_reference.
6628 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6631 2018-04-30 Tom Tromey <tom@tromey.com>
6633 * varobj.c (install_new_value): Use new_reference.
6634 * value.h (value_incref): Return void. Swap intro comment with
6636 * value.c (set_value_parent): Use new_reference.
6637 (value_incref): Return void. Update intro comment.
6638 (release_value): Use new_reference.
6639 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6641 2018-04-30 Tom Tromey <tom@tromey.com>
6643 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6644 * gdb_bfd.h (new_bfd_ref): Remove.
6645 (gdb_bfd_open): Update comment.
6646 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6647 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6648 (gdb_bfd_fdopenr): Use new_reference.
6649 * exec.c (exec_file_attach): Use new_reference.
6651 2018-04-30 Tom Tromey <tom@tromey.com>
6653 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6656 2018-04-30 Tom Tromey <tom@tromey.com>
6658 * jit.c (jit_read_code_entry): Use type_align.
6659 * i386-tdep.c (i386_gdbarch_init): Don't call
6660 set_gdbarch_long_long_align_bit.
6661 * gdbarch.sh: Remove long_long_align_bit.
6662 * gdbarch.c, gdbarch.h: Rebuild.
6663 * arc-tdep.c (arc_type_align): New function.
6664 (arc_gdbarch_init): Use arc_type_align. Don't call
6665 set_gdbarch_long_long_align_bit.
6667 2018-04-30 Tom Tromey <tom@tromey.com>
6669 * rust-lang.c (rust_type_alignment): Remove.
6670 (rust_composite_type): Use type_align.
6672 2018-04-30 Tom Tromey <tom@tromey.com>
6674 * NEWS: Mention Type.align.
6675 * python/py-type.c (typy_get_alignof): New function.
6676 (type_object_getset): Add "alignof".
6678 2018-04-30 Tom Tromey <tom@tromey.com>
6682 * std-operator.def (UNOP_ALIGNOF): New operator.
6683 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6685 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6686 * c-lang.c (c_op_print_tab): Add alignof.
6687 * c-exp.y (ALIGNOF): New token.
6688 (exp): Add "ALIGNOF" production.
6689 (ident_tokens): Add _Alignof and alignof.
6691 2018-04-30 Tom Tromey <tom@tromey.com>
6693 * i386-tdep.c (i386_type_align): New function.
6694 (i386_gdbarch_init): Update.
6695 * gdbarch.sh (type_align): New method.
6696 * gdbarch.c, gdbarch.h: Rebuild.
6697 * arch-utils.h (default_type_align): Declare.
6698 * arch-utils.c (default_type_align): New function.
6699 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6700 (struct type) <align_log2>: New field.
6701 <instance_flags>: Now a bitfield.
6702 (TYPE_RAW_ALIGN): New macro.
6703 (type_align, type_raw_align, set_type_align): Declare.
6704 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6706 * dwarf2read.c (quirk_rust_enum): Set type alignment.
6707 (get_alignment, maybe_set_alignment): New functions.
6708 (read_structure_type, read_enumeration_type, read_array_type)
6709 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6710 (read_subrange_type, read_base_type): Set type alignment.
6712 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
6714 * dwarf2read.c (read_index_from_section): Use bool.
6716 2018-04-29 Fabian Groffen <grobian@gentoo.org>
6719 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6722 2018-04-29 John Reiser <jreiser@BitWagon.com>
6725 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6726 last step, and do it atomically.
6728 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
6730 * compile/compile-c-types.c (convert_int, convert_float):
6733 2018-04-27 Tom Tromey <tom@tromey.com>
6736 * rust-lang.c (rust_inclusive_range_type_p): New function.
6737 (rust_range): Handle inclusive ranges.
6738 (rust_compute_range): Likewise.
6739 * rust-exp.y (struct rust_op) <inclusive>: New field.
6740 (DOTDOTEQ): New constant.
6741 (range_expr): Add "..=" productions.
6742 (operator_tokens): Add "..=" token.
6743 (ast_range): Add "inclusive" parameter.
6744 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6746 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6748 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6749 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6751 * expprint.c (print_subexp_standard): Handle new bounds values.
6752 (dump_subexp_body_standard): Likewise.
6754 2018-04-27 Tom Tromey <tom@tromey.com>
6756 * configure: Rebuild.
6757 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6758 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6760 (class symbol_needs_eval_context): Likewise.
6761 * dwarf2read.c (mock_mapped_index::symbol_name_count)
6762 (mock_mapped_index::symbol_name_at): Use "override". Remove
6764 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6766 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6767 * aarch64-tdep.c (instruction_reader::read): Use "override".
6768 (instruction_reader_test::read): Likewise.
6769 * arm-tdep.c (instruction_reader::read): Use "override".
6770 (instruction_reader_thumb::read): Likewise.
6772 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
6775 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6776 instead of remote_send.
6777 (remote_send): Remove.
6779 2018-04-26 Pedro Alves <palves@redhat.com>
6781 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6782 find_function_start_sal instead of find_pc_line.
6784 2018-04-26 Pedro Alves <palves@redhat.com>
6786 * breakpoint.c (set_breakpoint_location_function): Handle
6788 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6789 * elfread.c (elf_symtab_read): Give data symbols with
6790 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6791 (elf_rel_plt_read): Update comment.
6792 * linespec.c (convert_linespec_to_sals): Handle
6794 (minsym_found): Handle mst_data_gnu_ifunc.
6795 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6796 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6797 * parse.c (find_minsym_type_and_address): Handle
6799 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6800 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6801 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6803 <mst_data_gnu_ifunc>: New enumerator.
6805 2018-04-26 Pedro Alves <palves@redhat.com>
6807 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6808 (lookup_minimal_symbol_by_pc_section): ... this. Replace
6809 'want_trampoline' parameter by a lookup_msym_prefer parameter.
6811 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6812 (lookup_minimal_symbol_by_pc): Adjust.
6813 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6814 (lookup_solib_trampoline_symbol_by_pc): Adjust.
6815 * minsyms.h (lookup_msym_prefer): New enum.
6816 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6817 parameter by a lookup_msym_prefer parameter.
6819 2018-04-26 Pedro Alves <palves@redhat.com>
6821 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6822 ends in "@plt" instead of looking at the symbol's section.
6824 2018-04-26 Pedro Alves <palves@redhat.com>
6826 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
6828 (find_pc_partial_function_gnu_ifunc): Rename to ...
6829 (find_pc_partial_function): ... this, and remove references to
6831 (find_pc_partial_function): Delete old implementation.
6832 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6834 2018-04-26 Pedro Alves <palves@redhat.com>
6836 * linespec.c (struct bound_minimal_symbol_search_key): New.
6837 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
6838 skip first line if we found a GNU ifunc minimal symbol by name.
6839 (compare_msymbols): Change parameters to work with a destructured
6841 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6844 2018-04-26 Pedro Alves <palves@redhat.com>
6846 * breakpoint.c (set_breakpoint_location_function): Don't resolve
6847 ifunc targets here. Instead, if we have an ifunc minsym, use its
6849 (add_location_to_breakpoint): Store the minsym and the objfile in
6850 the breakpoint location.
6851 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6852 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6853 Record the minsym in the sal.
6854 * symtab.h (symtab_and_line) <msymbol>: New field.
6856 2018-04-26 Pedro Alves <palves@redhat.com>
6858 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6859 unless we actually resolved the ifunc.
6861 2018-04-26 Pedro Alves <palves@redhat.com>
6863 * c-exp.y (variable production): Prefer ifunc minsyms over
6864 regular function symbols.
6865 * symtab.c (find_gnu_ifunc): New function.
6866 * minsyms.h (lookup_msym_prefer): New enum.
6867 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6868 parameter by a lookup_msym_prefer parameter.
6869 * symtab.h (find_gnu_ifunc): New declaration.
6871 2018-04-26 Pedro Alves <palves@redhat.com>
6873 * blockframe.c (find_gnu_ifunc_target_type): New function.
6874 (find_function_type): New.
6875 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6876 return a value with a memory address.
6877 (eval_call): For calls to GNU ifunc functions, try to find the
6878 type of the target function from the type that the resolver
6880 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6882 * infcall.c (find_function_return_type): Delete.
6883 (find_function_addr): Add 'function_type' parameter. For calls to
6884 GNU ifunc functions, try to find the type of the target function
6885 from the type that the resolver returns, and return it via
6887 (call_function_by_hand_dummy): Adjust to use the function type
6888 returned by find_function_addr.
6889 (find_function_addr): Add 'function_type' parameter and move
6891 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6894 2018-04-26 Pedro Alves <palves@redhat.com>
6896 * c-exp.y (variable production): Skip finding an alias for ifunc
6899 2018-04-26 Pedro Alves <palves@redhat.com>
6901 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6903 2018-04-25 Pedro Alves <palves@redhat.com>
6905 * infcmd.c (kill_command): Print the pid as string, not the whole
6906 thread's ptid. Add comment. s/has been killed/killed/ in output
6908 * remote.c (remote_detach_1): Print the pid as string, not the
6909 whole thread's ptid.
6911 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6912 Sergio Durigan Junior <sergiodj@redhat.com>
6913 Pedro Alves <palves@redhat.com>
6915 * infcmd.c (kill_command): Print message when inferior has
6917 * inferior.c (print_inferior_events): Remove 'static'. Set as
6919 (add_inferior): Improve message printed when
6920 'print_inferior_events' is on.
6921 (exit_inferior): Remove message printed when
6922 'print_inferior_events' is on.
6923 (detach_inferior): Improve message printed when
6924 'print_inferior_events' is on.
6925 (initialize_inferiors): Use 'add_inferior_silent' to set
6926 'current_inferior_'.
6927 * inferior.h (print_inferior_events): Declare here as
6929 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6930 '[Detaching...]' messages when 'print_inferior_events' is on.
6931 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
6932 as prefix/suffix for messages. Remove periods. Fix erroneous
6933 'Detaching after fork from child...', replace it by '... from
6935 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6936 prefix/suffix when printing 'Detaching...' messages. Print
6937 them when 'print_inferior_events' is on.
6938 * remote.c (remote_detach_1): Print message when detaching
6939 from inferior and '!is_fork_parent'.
6941 2018-04-24 Tom Tromey <tom@tromey.com>
6943 * cli-out.h: Reindent.
6945 2018-04-24 Tom Tromey <tom@tromey.com>
6947 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6948 (cli_ui_out::do_field_string): Use fputs_filtered.
6949 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6951 2018-04-23 Tom Tromey <tom@tromey.com>
6953 * guile/scm-frame.c (gdbscm_frame_read_var): Use
6954 gdb::unique_xmalloc_ptr.
6956 2018-04-23 Tom Tromey <tom@tromey.com>
6958 * configure: Rebuild.
6960 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
6963 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6964 prepare_for_testing. Set normal_bp to r_debug_state if target
6967 2018-04-21 Pedro Alves <palves@redhat.com>
6968 Rajendra SY <rajendra.sy@gmail.com>
6970 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6971 * remote.c (extended_remote_attach): In all-stop mode, mark the
6972 thread as executing.
6974 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6976 * thread.c (thread_apply_all_command): Fix comment.
6977 (thread_command): Fix comment.
6979 2018-04-10 Alan Hayward <alan.hayward@arm.com>
6981 * common/tdesc.h (tdesc_create_feature): Remove xml filename
6983 * features/aarch64-core.c (create_feature_aarch64_core):
6985 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
6987 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
6989 * features/i386/32bit-avx512.c
6990 (create_feature_i386_32bit_avx512): Likewise.
6991 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
6993 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
6995 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
6997 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
6999 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7001 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7003 * features/i386/64bit-avx512.c
7004 (create_feature_i386_64bit_avx512): Likewise.
7005 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7007 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7009 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7011 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7013 * features/i386/64bit-segments.c
7014 (create_feature_i386_64bit_segments): Likewise.
7015 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7017 * features/i386/x32-core.c
7018 (create_feature_i386_x32_core): Likewise.
7019 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7020 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7021 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7022 * target-descriptions.c: In generated code, don't pass xml
7025 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7027 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7028 (print_xml_feature::visit_post): Likewise.
7029 (print_xml_feature::visit): Likewise.
7030 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7031 (print_xml_feature): Add new class.
7032 * regformats/regdat.sh: Null xmltarget on feature targets.
7033 * target-descriptions.c (struct target_desc): Add xmltarget.
7034 (maintenance_check_tdesc_xml_convert): Add unittest function.
7035 (tdesc_get_features_xml): Add function to get xml.
7036 (maintenance_check_xml_descriptions): Test xml generation.
7037 * xml-tdesc.c (string_read_description_xml): Add function.
7038 * xml-tdesc.h (string_read_description_xml): Add declaration.
7040 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7042 * features/Makefile: Add feature marker to targets with new style
7043 target descriptions.
7044 * regformats/aarch64.dat: Regenerate.
7045 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7046 * regformats/i386/amd64-avx-linux.dat: Likewise.
7047 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7048 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7049 * regformats/i386/amd64-linux.dat: Likewise.
7050 * regformats/i386/amd64-mpx-linux.dat: Likewise.
7051 * regformats/i386/amd64.dat: Likewise.
7052 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7053 * regformats/i386/i386-avx-linux.dat: Likewise.
7054 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7055 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7056 * regformats/i386/i386-linux.dat: Likewise.
7057 * regformats/i386/i386-mmx-linux.dat: Likewise.
7058 * regformats/i386/i386-mpx-linux.dat: Likewise.
7059 * regformats/i386/i386.dat: Likewise.
7060 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7061 * regformats/i386/x32-avx-linux.dat: Likewise.
7062 * regformats/i386/x32-linux.dat: Likewise.
7063 * regformats/tic6x-c62x-linux.dat: Likewise.
7064 * regformats/tic6x-c64x-linux.dat: Likewise.
7065 * regformats/tic6x-c64xp-linux.dat: Likewise.
7066 * regformats/regdat.sh: Parse feature marker.
7068 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7070 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7071 (tdesc_osabi_name): Likewise.
7072 * target-descriptions.c (tdesc_architecture_name): Add new
7074 (tdesc_osabi_name): Likewise.
7076 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7078 * common/tdesc.c (tdesc_predefined_type): Move to here.
7079 (tdesc_named_type): Likewise.
7080 (tdesc_create_vector): Likewise.
7081 (tdesc_create_struct): Likewise.
7082 (tdesc_set_struct_size): Likewise.
7083 (tdesc_create_union): Likewise.
7084 (tdesc_create_flags): Likewise.
7085 (tdesc_create_enum): Likewise.
7086 (tdesc_add_field): Likewise.
7087 (tdesc_add_typed_bitfield): Likewise.
7088 (tdesc_add_bitfield): Likewise.
7089 (tdesc_add_flag): Likewise.
7090 (tdesc_add_enum_value): Likewise.
7091 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7092 (struct tdesc_type_vector): Likewise.
7093 (struct tdesc_type_field): Likewise.
7094 (struct tdesc_type_with_fields): Likewise.
7095 (tdesc_create_enum): Add declaration.
7096 (tdesc_add_typed_bitfield): Likewise.
7097 (tdesc_add_enum_value): Likewise.
7098 * target-descriptions.c (tdesc_type_field): Move from here.
7099 (tdesc_type_builtin): Likewise.
7100 (tdesc_type_vector): Likewise.
7101 (tdesc_type_with_fields): Likewise.
7102 (tdesc_predefined_types): Likewise.
7103 (tdesc_named_type): Likewise.
7104 (tdesc_create_vector): Likewise.
7105 (tdesc_create_struct): Likewise.
7106 (tdesc_set_struct_size): Likewise.
7107 (tdesc_create_union): Likewise.
7108 (tdesc_create_flags): Likewise.
7109 (tdesc_create_enum): Likewise.
7110 (tdesc_add_field): Likewise.
7111 (tdesc_add_typed_bitfield): Likewise.
7112 (tdesc_add_bitfield): Likewise.
7113 (tdesc_add_flag): Likewise.
7114 (tdesc_add_enum_value): Likewise.
7115 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7116 (tdesc_add_typed_bitfield): Likewise.
7117 (tdesc_add_enum_value): Likewise.
7119 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7121 * common/tdesc.c (tdesc_feature::accept): Move to here.
7122 (tdesc_feature::operator==): Likewise.
7123 (tdesc_create_reg): Likewise.
7124 * common/tdesc.h (tdesc_type_kind): Likewise.
7125 (struct tdesc_type): Likewise.
7126 (struct tdesc_feature): Likewise.
7127 * regformats/regdat.sh: Create a feature.
7128 * target-descriptions.c (tdesc_type_kind): Move from here.
7129 (tdesc_type): Likewise.
7130 (tdesc_type_up): Likewise.
7131 (tdesc_feature): Likewise.
7132 (tdesc_create_reg): Likewise.
7134 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7136 * Makefile.in: Add arch/tdesc.c
7137 * common/tdesc.c: New file.
7138 * common/tdesc.h (tdesc_element_visitor): Move to here.
7139 (tdesc_element): Likewise.
7140 (tdesc_reg): Likewise.
7141 (tdesc_reg_up): Likewise.
7142 * regformats/regdef.h (reg): Add offset to constructors.
7143 * target-descriptions.c (tdesc_element_visitor): Move from here.
7144 (tdesc_element): Likewise.
7145 (tdesc_reg): Likewise.
7146 (tdesc_reg_up): Likewise.
7148 2018-04-17 Tom Tromey <tom@tromey.com>
7150 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7153 2018-04-17 Tom Tromey <tom@tromey.com>
7155 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7157 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
7159 * symtab.c (print_symbol_info): Skip printing filename and line
7160 number when `last' is NULL.
7161 (symtab_symbol_info): Use empty string instead of NULL for first
7162 invocation of print_symbol_info.
7163 (rbreak_command): Pass NULL to `last' parameter of
7166 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
7168 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7171 2018-04-16 Pedro Alves <palves@redhat.com>
7173 * MAINTAINERS (sh): Remove.
7174 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7175 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7176 (ALLDEPFILES): Remove sh64-tdep.c.
7177 * NEWS: Mentions that support for SH-5/SH64 is removed.
7178 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7179 (sh*-*-openbsd*): Ditto.
7180 (sh64-*-elf*): Remove.
7182 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7183 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7184 * sh-tdep.c: No longer include "sh64-tdep.h".
7185 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7186 * sh64-tdep.c, sh64-tdep.h: Remove files.
7188 2018-04-16 Pedro Alves <palves@redhat.com>
7190 * MAINTAINERS: Remove m88k.
7191 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7192 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7193 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7194 * NEWS: Mention that support for m88k was removed.
7195 * configure.host (m88*-*-*): Remove support.
7196 * configure.nat (m88k-*-*): Remove support.
7197 * configure.tgt (m88*-*-openbsd*): Remove.
7198 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7200 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7202 * configure.tgt (x86_tobjs): New variable.
7203 (amd64_tobjs, i386_tobjs): Use it.
7205 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7207 * symtab.c (print_symbol_info): Precede the symbol definition by
7208 the line number when available.
7209 * NEWS: Advertise this enhancement.
7211 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7213 * NEWS (New options): announce set/show record btrace cpu.
7214 * btrace.c: Include record-btrace.h.
7215 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7216 the vendor is unknown.
7217 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7218 Maybe overwrite the btrace configuration's cpu.
7219 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7220 (btrace_fetch): Add cpu parameter. Update callers.
7221 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7222 Maybe overwrite the btrace configuration's cpu. Skip enabling
7223 errata workarounds if the vendor is unknown.
7224 * python/py-record-btrace.c: Include record-btrace.h.
7225 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7226 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7227 * record-btrace.c (record_btrace_cpu_state_kind): New.
7228 (record_btrace_cpu): New.
7229 (set_record_btrace_cpu_cmdlist): New.
7230 (record_btrace_get_cpu): New.
7231 (require_btrace_thread, record_btrace_info)
7232 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7233 (cmd_set_record_btrace_cpu_none): New.
7234 (cmd_set_record_btrace_cpu_auto): New.
7235 (cmd_set_record_btrace_cpu): New.
7236 (cmd_show_record_btrace_cpu): New.
7237 (_initialize_record_btrace): Initialize set/show record btrace cpu
7239 * record-btrace.h (record_btrace_get_cpu): New.
7241 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7243 * record.c (set_record_command): Fix typo in message.
7245 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7247 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7249 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7251 * infrun.c (process_event_stop_test): Call
7252 gdbarch_in_indirect_branch_thunk.
7253 * gdbarch.sh (in_indirect_branch_thunk): New.
7254 * gdbarch.c: Regenerated.
7255 * gdbarch.h: Regenerated.
7258 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7259 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7260 (ALLDEPFILES): Add x86-tdep.c.
7261 * arch-utils.h (default_in_indirect_branch_thunk): New.
7262 * arch-utils.c (default_in_indirect_branch_thunk): New.
7263 * i386-tdep: Include x86-tdep.h.
7264 (i386_in_indirect_branch_thunk): New.
7265 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7267 * amd64-tdep: Include x86-tdep.h.
7268 (amd64_in_indirect_branch_thunk): New.
7269 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7271 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7274 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7275 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7276 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7279 2018-04-12 Tom Tromey <tom@tromey.com>
7281 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7282 (rust_evaluate_subexp): Likewise.
7284 2018-04-12 Pedro Alves <palves@redhat.com>
7286 * procfs.c (procfs_detach): Make forward declaration's prototype
7287 match definition's protototype.
7288 (proc_get_LDT_entry): Remove stale do_cleanups call.
7290 2018-04-12 Pedro Alves <palves@redhat.com>
7292 * target.h (target_ops::to_has_exited): Delete.
7293 (target_has_exited): Delete.
7294 * target-delegates.c: Regenerate.
7296 2018-04-11 Pedro Alves <palves@redhat.com>
7298 * target.c (fileio_fh_t::t): Add comment.
7299 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7300 (target_fileio_close): Handle a NULL target.
7301 (invalidate_fileio_fh): New.
7302 (target_close): Call it.
7303 * remote.c (remote_hostio_send_command): No longer check whether
7304 remote_desc is open.
7306 2018-04-11 Pedro Alves <palves@redhat.com>
7308 * target.c (fileio_fh_t): Make it a named struct instead of a
7310 (fileio_fh_t::is_closed): New method.
7311 (DEF_VEC_O (fileio_fh_t)): Remove.
7312 (fileio_fhandles): Now a std::vector.
7313 (is_closed_fileio_fh): Delete.
7314 (acquire_fileio_fd): Adjust. Rename parameters.
7315 (release_fileio_fd): Adjust.
7316 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7317 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7318 (target_fileio_close): Adjust.
7320 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7322 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7325 2018-04-10 Pedro Alves <palves@redhat.com>
7327 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7328 (scoped_finish_thread_state): New class.
7329 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7331 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7332 (fetch_inferior_event, normal_stop): Likewise.
7333 * thread.c (finish_thread_state_cleanup): Delete.
7335 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7336 Pedro Alves <palves@redhat.com>
7338 * value.c: Include "selftest.h" and "common/array-view.h".
7339 (struct range) <operator ==>: New.
7340 (test_ranges_contain): New.
7341 (check_ranges_vector): New.
7342 (test_insert_into_bit_range_vector): New.
7343 (_initialize_values): Register selftests.
7344 * common/array-view.h (operator==, operator!=): New.
7346 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7348 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7350 * inline-frame.c: Include <algorithm>.
7351 (struct inline_state): Add constructor.
7352 (inline_state_s): Remove.
7353 (DEF_VEC_O(inline_state_s)): Remove.
7354 (inline_states): Change type to std::vector.
7355 (find_inline_frame_state): Adjust to std::vector.
7356 (allocate_inline_frame_state): Remove.
7357 (clear_inline_frame_state): Adjust to std::vector.
7358 (skip_inline_frames): Adjust to std::vector.
7360 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7362 * tracepoint.h (struct trace_state_variable): Add constructor.
7363 <name>: Change type to std::string.
7364 * tracepoint.c (tsv_s): Remove.
7365 (DEF_VEC_O(tsv_s)): Remove.
7366 (tvariables): Change to std::vector.
7367 (create_trace_state_variable): Adjust to std::vector.
7368 (find_trace_state_variable): Likewise.
7369 (find_trace_state_variable_by_number): Likewise.
7370 (delete_trace_state_variable): Likewise.
7371 (trace_variable_command): Adjust to std::string.
7372 (delete_trace_variable_command): Likewise.
7373 (tvariables_info_1): Adjust to std::vector.
7374 (save_trace_state_variables): Likewise.
7375 (start_tracing): Likewise.
7376 (merge_uploaded_trace_state_variables): Adjust to std::vector
7378 * target.h (struct target_ops)
7379 <to_download_trace_state_variable>: Pass reference to
7380 trace_state_variable.
7381 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7382 * target-delegates.c: Re-generate.
7383 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7384 (mi_tsv_deleted): Likewise.
7385 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7386 * remote.c (remote_download_trace_state_variable): Change
7387 pointer to reference and adjust.
7388 * make-target-delegates (parse_argtypes): Handle references.
7389 (write_function_header): Likewise.
7390 (munge_type): Likewise.
7392 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7394 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7395 string_view-selftests.c.
7396 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7398 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7399 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7400 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7401 * unittests/basic_string_view/element_access/char/1.cc:
7403 * unittests/basic_string_view/element_access/char/empty.cc:
7405 * unittests/basic_string_view/element_access/char/front_back.cc:
7407 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7408 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7410 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7412 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7414 * unittests/basic_string_view/operations/compare/char/1.cc:
7416 * unittests/basic_string_view/operations/compare/char/13650.cc:
7418 * unittests/basic_string_view/operations/copy/char/1.cc:
7420 * unittests/basic_string_view/operations/data/char/1.cc:
7422 * unittests/basic_string_view/operations/find/char/1.cc:
7424 * unittests/basic_string_view/operations/find/char/2.cc:
7426 * unittests/basic_string_view/operations/find/char/3.cc:
7428 * unittests/basic_string_view/operations/find/char/4.cc:
7430 * unittests/basic_string_view/operations/rfind/char/1.cc:
7432 * unittests/basic_string_view/operations/rfind/char/2.cc:
7434 * unittests/basic_string_view/operations/rfind/char/3.cc:
7436 * unittests/basic_string_view/operations/substr/char/1.cc:
7438 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7439 * unittests/string_view-selftests.c: New file.
7441 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7443 * unittests/basic_string_view/capacity/1.cc: New file.
7444 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7445 * unittests/basic_string_view/cons/char/1.cc: New file.
7446 * unittests/basic_string_view/cons/char/2.cc: New file.
7447 * unittests/basic_string_view/cons/char/3.cc: New file.
7448 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7449 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7450 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7451 * unittests/basic_string_view/element_access/char/1.cc: New file.
7452 * unittests/basic_string_view/element_access/char/2.cc: New file.
7453 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7454 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7455 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7456 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7457 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7458 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7459 * unittests/basic_string_view/include.cc: New file.
7460 * unittests/basic_string_view/inserters/char/1.cc: New file.
7461 * unittests/basic_string_view/inserters/char/2.cc: New file.
7462 * unittests/basic_string_view/inserters/char/3.cc: New file.
7463 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7464 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7465 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7466 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7467 * unittests/basic_string_view/literals/types.cc: New file.
7468 * unittests/basic_string_view/literals/values.cc: New file.
7469 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7470 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7471 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7472 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7473 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7474 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7475 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7476 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7477 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7478 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7479 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7480 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7481 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7482 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7483 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7484 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7485 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7486 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7487 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7488 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7489 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7490 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7491 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7492 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7493 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7494 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7495 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7496 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7497 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7498 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7499 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7500 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7501 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7502 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7503 * unittests/basic_string_view/operators/char/2.cc: New file.
7504 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7505 * unittests/basic_string_view/range_access/char/1.cc: New file.
7506 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7507 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7508 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7509 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7510 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7511 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7512 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7513 * unittests/basic_string_view/typedefs.cc: New file.
7514 * unittests/basic_string_view/types/1.cc: New file.
7516 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7518 * common/gdb_string_view.h: Remove libstdc++ implementation
7519 details, adjust to gdb reality.
7520 * common/gdb_string_view.tcc: Likewise.
7521 * cli/cli-script.c (struct string_view): Remove.
7522 (user_args) <m_args>: Change element type to gdb::string_view.
7523 (user_args::insert_args): Adjust.
7525 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7527 * common/gdb_string_view.h: New file.
7528 * common/gdb_string_view.tcc: New file.
7530 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7532 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7533 * configure: Re-generate.
7535 2018-04-09 Pedro Alves <palves@redhat.com>
7537 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7538 (set_target_gdbarch): Call
7539 gdb::observers::architecture_changed.notify instead of
7540 observer_notify_architecture_changed.
7542 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7544 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7545 (do_restore_current_traceframe_cleanup): Remove.
7546 (restore_current_traceframe_cleanup_dtor): Remove.
7547 (make_cleanup_restore_current_traceframe): Remove.
7548 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7550 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7551 * infrun.c (fetch_inferior_event): Use
7552 scoped_restore_current_traceframe.
7554 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7556 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7558 <n_allocated_type_units>: Remove.
7559 <all_type_units>: Change to std::vector.
7560 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7561 to std::vector change.
7562 (dwarf2_per_objfile::get_cutu): Likewise.
7563 (dwarf2_per_objfile::get_tu): Likewise.
7564 (create_signatured_type_table_from_index): Likewise.
7565 (create_signatured_type_table_from_debug_names): Likewise.
7566 (dw2_symtab_iter_next): Likewise.
7567 (dw2_print_stats): Likewise.
7568 (dw2_expand_all_symtabs): Likewise.
7569 (dw2_expand_marked_cus): Likewise.
7570 (dw2_debug_names_iterator::next): Likewise.
7571 (dwarf2_initialize_objfile): Likewise.
7572 (add_signatured_type_cu_to_table): Likewise.
7573 (create_all_type_units): Likewise.
7574 (add_type_unit): Likewise.
7575 (struct tu_abbrev_offset): Add constructor.
7576 (build_type_psymtabs_1): Adjust to std::vector change.
7577 (print_tu_stats): Likewise.
7578 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7579 (write_debug_names): Likewise.
7581 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7583 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7584 Make an std::vector.
7585 <n_comp_units>: Remove.
7586 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7587 to std::vector change.
7588 (dwarf2_per_objfile::get_cutu): Likewise.
7589 (dwarf2_per_objfile::get_cu): Likewise.
7590 (create_cus_from_index): Likewise.
7591 (create_addrmap_from_index): Likewise.
7592 (create_addrmap_from_aranges): Likewise.
7593 (dwarf2_read_index): Likewise.
7594 (dw2_find_last_source_symtab): Likewise.
7595 (dw2_map_symtabs_matching_filename): Likewise.
7596 (dw2_symtab_iter_next): Likewise.
7597 (dw2_print_stats): Likewise.
7598 (dw2_expand_all_symtabs): Likewise.
7599 (dw2_expand_symtabs_with_fullname): Likewise.
7600 (dw2_expand_marked_cus): Likewise.
7601 (dw2_map_symbol_filenames): Likewise.
7602 (create_cus_from_debug_names): Likewise.
7603 (dwarf2_read_debug_names): Likewise.
7604 (dw2_debug_names_iterator::next): Likewise.
7605 (dwarf2_initialize_objfile): Likewise.
7606 (set_partial_user): Likewise.
7607 (dwarf2_build_psymtabs_hard): Likewise.
7608 (read_comp_units_from_section): Remove arguments, adjust to
7610 (create_all_comp_units): Adjust to std::vector and
7611 read_comp_units_from_section changes.
7612 (dwarf2_find_containing_comp_unit): Adjust to std::vector
7614 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7615 (psyms_seen_size): Likewise.
7616 (write_gdbindex): Likewise.
7617 (write_debug_names): Likewise.
7619 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7621 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7622 with dwarf2_per_objfile.
7623 (create_cus_from_index): Likewise.
7624 (create_signatured_type_table_from_index): Likewise.
7625 (dwarf2_read_index): Likewise.
7626 (dwarf2_initialize_objfile): Likewise.
7627 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
7628 per_cu rather than get_dwarf2_per_objfile.
7630 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7632 * dwarf2read.h (struct signatured_type): Forward declare.
7633 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7635 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7636 (dw2_get_cutu): ...this.
7637 (dwarf2_per_objfile::get_cu): Rename from...
7638 (dw2_get_cu): ...this.
7639 (dwarf2_per_objfile::get_tu): New.
7640 (create_addrmap_from_index): Adjust.
7641 (create_addrmap_from_aranges): Adjust.
7642 (dw2_find_last_source_symtab): Adjust.
7643 (dw2_map_symtabs_matching_filename): Adjust.
7644 (dw2_symtab_iter_next): Adjust.
7645 (dw2_print_stats): Adjust.
7646 (dw2_expand_all_symtabs): Adjust.
7647 (dw2_expand_symtabs_with_fullname): Adjust.
7648 (dw2_expand_marked_cus): Adjust.
7649 (dw_expand_symtabs_matching_file_matcher): Adjust.
7650 (dw2_map_symbol_filenames): Adjust.
7651 (dw2_debug_names_iterator::next): Adjust.
7652 (dwarf2_initialize_objfile): Adjust.
7653 (set_partial_user): Adjust.
7654 (dwarf2_build_psymtabs_hard): Adjust.
7656 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7658 * dwarf2read.c (create_signatured_type_table_from_debug_names):
7659 Remove unused variables.
7660 (dw2_map_symtabs_matching_filename): Likewise.
7661 (dwarf2_record_block_ranges): Likewise.
7662 (dwarf2_read_addr_index): Likewise.
7663 (follow_die_offset): Likewise.
7665 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7667 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7668 to symbol_file_add_main.
7670 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7673 * mi/mi-console.c (do_fputc_async_safe): New.
7674 (mi_console_file::write_async_safe): New.
7675 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7676 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7678 * ui-file.c (ui_file::putstrn): Adjust call to
7679 fputstrn_unfiltered.
7680 * utils.c (printchar): Replace do_fputs and do_fprintf
7681 parameters by do_fputc.
7682 (fputstr_filtered): Adjust call to printchar.
7683 (fputstr_unfiltered): Likewise.
7684 (fputstrn_filtered): Likewise.
7685 (fputstrn_unfiltered): Add do_fputc parameter, pass to
7687 * utils.h (do_fputc_ftype): New typedef.
7688 (fputstrn_unfiltered): Add do_fputc parameter.
7690 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7692 * regformats/i386/i386-avx.dat: Remove.
7694 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7697 * amd64-tdep.c (amd64_none_init_abi): New function.
7698 (amd64_x32_none_init_abi): New function.
7699 (_initialize_amd64_tdep): Register handlers for x86-64 and
7700 x64_32 with GDB_OSABI_NONE.
7701 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7702 GDB_OSABI_NONE osabi.
7704 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7707 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7709 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7710 * osabi.c (gdb_osabi_names): Add "unknown" entry.
7712 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7714 * common/byte-vector.h (char_vector): New type.
7715 * target.h (target_read_alloc): Return
7716 gdb::optional<byte_vector>.
7717 (target_read_stralloc): Return gdb::optional<char_vector>.
7718 (target_get_osdata): Return gdb::optional<char_vector>.
7719 * target.c (target_read_alloc_1): Templatize. Replacement
7720 manual memory management with vector.
7721 (target_read_alloc): Change return type, adjust.
7722 (target_read_stralloc): Change return type, adjust.
7723 (target_get_osdata): Change return type, adjust.
7724 * auxv.c (struct auxv_info) <length>: Remove.
7725 <data>: Change type to gdb::optional<byte_vector>.
7726 (auxv_inferior_data_cleanup): Free auxv_info with delete.
7727 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7728 (target_auxv_search): Adjust.
7729 (fprint_target_auxv): Adjust.
7730 * avr-tdep.c (avr_io_reg_read_command): Adjust.
7731 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7732 (linux_make_corefile_notes): Adjust.
7733 * osdata.c (get_osdata): Adjust.
7734 * remote.c (remote_get_threads_with_qxfer): Adjust.
7735 (remote_memory_map): Adjust.
7736 (remote_traceframe_info): Adjust.
7737 (btrace_read_config): Adjust.
7738 (remote_read_btrace): Adjust.
7739 (remote_pid_to_exec_file): Adjust.
7740 * solib-aix.c (solib_aix_get_library_list): Adjust.
7741 * solib-dsbt.c (decode_loadmap): Don't free buf.
7742 (dsbt_get_initial_loadmaps): Adjust.
7743 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7744 * solib-target.c (solib_target_current_sos): Adjust.
7745 * tracepoint.c (sdata_make_value): Adjust.
7746 * xml-support.c (xinclude_start_include): Adjust.
7747 (xml_fetch_content_from_file): Adjust.
7748 * xml-support.h (xml_fetch_another): Change return type.
7749 (xml_fetch_content_from_file): Change return type.
7750 * xml-syscall.c (xml_init_syscalls_info): Adjust.
7751 * xml-tdesc.c (file_read_description_xml): Adjust.
7752 (fetch_available_features_from_target): Change return type.
7753 (target_fetch_description_xml): Adjust.
7754 (target_read_description_xml): Adjust.
7756 2018-04-06 Tom Tromey <tom@tromey.com>
7758 * value.c (~value): Update.
7759 (struct value) <contents>: Now unique_xmalloc_ptr.
7760 (value_contents_bits_eq, allocate_value_contents)
7761 (value_contents_raw, value_contents_all_raw)
7762 (value_contents_for_printing, value_contents_for_printing_const)
7763 (set_value_enclosing_type): Update.
7765 2018-04-06 Tom Tromey <tom@tromey.com>
7767 * value.c (range_s): Remove typedef, VEC.
7768 (struct range): Add operator<.
7769 (range_lessthan): Remove.
7770 (ranges_contain): Change type.
7772 (struct value) <unavailable, optimized_out>: Now std::vector.
7773 (value_entirely_available)
7774 (value_entirely_covered_by_range_vector)
7775 (value_entirely_unavailable, value_entirely_optimized_out):
7777 (insert_into_bit_range_vector): Change argument type.
7778 (find_first_range_overlap): Likewise.
7779 (struct ranges_and_idx, value_contents_bits_eq)
7780 (require_not_optimized_out, require_available): Update.
7781 (ranges_copy_adjusted): Change argument types.
7782 (value_optimized_out, value_copy, value_fetch_lazy): Update.
7784 2018-04-06 Tom Tromey <tom@tromey.com>
7786 * value.c (~value): Update.
7787 (struct value) <parent>: Now a value_ref_ptr.
7788 (value_parent, set_value_parent, value_address, value_copy):
7791 2018-04-06 Tom Tromey <tom@tromey.com>
7793 * value.c (struct value): Add constructor, destructor, and member
7795 (allocate_value_lazy, value_decref): Update.
7797 2018-04-06 Tom Tromey <tom@tromey.com>
7799 * value.c (struct value) <released, next>: Remove.
7800 (all_values): Now a std::vector.
7801 (allocate_value_lazy): Update.
7802 (value_next): Remove.
7803 (value_mark, value_free_to_mark, release_value)
7804 (value_release_to_mark): Update.
7806 2018-04-06 Tom Tromey <tom@tromey.com>
7808 * value.h (fetch_subexp_value, value_release_to_mark): Update.
7809 (free_value_chain): Remove.
7810 * value.c (free_value_chain): Remove.
7811 (value_release_to_mark): Return a std::vector.
7812 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7814 (check_condition): Update.
7815 * eval.c (fetch_subexp_value): Change "val_chain" to a
7817 * breakpoint.c (update_watchpoint): Update.
7818 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7820 2018-04-06 Tom Tromey <tom@tromey.com>
7822 * value.h (free_all_values): Remove.
7823 * value.c (free_all_values): Remove.
7825 2018-04-06 Tom Tromey <tom@tromey.com>
7827 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7828 (value_history_chain, value_history_count): Remove.
7829 (value_history): New global.
7830 (record_latest_value, access_value_history, show_values)
7831 (preserve_values): Update.
7833 2018-04-06 Tom Tromey <tom@tromey.com>
7835 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7836 * varobj.c (varobj_set_display_format, varobj_set_value)
7837 (install_default_visualizer, construct_visualizer)
7838 (install_new_value, ~varobj, varobj_get_value_type)
7839 (my_value_of_variable, varobj_editable_p): Update.
7840 * c-varobj.c (c_describe_child, c_value_of_variable)
7841 (cplus_number_of_children, cplus_describe_child): Update.
7842 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7843 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7844 (ada_value_of_variable, ada_value_is_changeable_p): Update.
7846 2018-04-06 Tom Tromey <tom@tromey.com>
7848 * printcmd.c (last_examine_address): Change type to
7850 (do_examine, x_command): Update.
7852 2018-04-06 Tom Tromey <tom@tromey.com>
7854 * value.c (release_value): Update.
7855 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7856 (struct bpstats) <val>: Now a value_ref_ptr.
7857 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7858 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7859 (~watchpoint, print_it_watchpoint, watch_command_1)
7860 (invalidate_bp_value_on_memory_change): Update.
7862 2018-04-06 Tom Tromey <tom@tromey.com>
7864 * varobj.c (varobj_clear_saved_item)
7865 (update_dynamic_varobj_children, install_new_value, ~varobj):
7867 * value.h (value_incref): Move declaration earlier.
7868 (value_decref): Rename from value_free.
7869 (struct value_ref_policy): New.
7870 (value_ref_ptr): New typedef.
7871 (struct value_deleter): Remove.
7872 (gdb_value_up): Remove typedef.
7873 (release_value): Change return type.
7874 (release_value_or_incref): Remove.
7875 * value.c (set_value_parent): Update.
7876 (value_incref): Change return type.
7877 (value_decref): Rename from value_free.
7878 (value_free_to_mark, free_all_values, free_value_chain): Update.
7879 (release_value): Return value_ref_ptr.
7880 (release_value_or_incref): Remove.
7881 (record_latest_value, set_internalvar, clear_internalvar):
7883 * stack.c (info_frame_command): Don't call value_free.
7884 * python/py-value.c (valpy_dealloc, valpy_new)
7885 (value_to_value_object): Update.
7886 * printcmd.c (do_examine): Update.
7887 * opencl-lang.c (lval_func_free_closure): Update.
7888 * mi/mi-main.c (register_changed_p): Don't call value_free.
7889 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7890 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7891 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7893 * guile/scm-value.c (vlscm_free_value_smob)
7894 (vlscm_scm_from_value): Update.
7895 * frame.c (frame_register_unwind, frame_unwind_register_signed)
7896 (frame_unwind_register_unsigned, get_frame_register_bytes)
7897 (put_frame_register_bytes): Don't call value_free.
7898 * findvar.c (address_from_register): Don't call value_free.
7899 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7900 * dwarf2loc.c (entry_data_value_free_closure)
7901 (value_of_dwarf_reg_entry, free_pieced_value_closure)
7902 (dwarf2_evaluate_loc_desc_full): Update.
7903 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7904 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7905 (~watchpoint, watch_command_1)
7906 (invalidate_bp_value_on_memory_change): Update.
7907 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7909 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
7912 * warning.m4: Add -Wno-error=deprecated-register.
7913 * configure: Re-generate.
7915 2018-04-05 Tom Tromey <tom@tromey.com>
7917 * linespec.h: Remove include of "vec.h".
7919 2018-04-05 Tom Tromey <tom@tromey.com>
7921 * linespec.c (typep): Remove typedef.
7922 (find_methods, find_superclass_methods): Take a std::vector.
7923 (find_method): Use std::vector.
7925 2018-04-05 Tom Tromey <tom@tromey.com>
7927 * utils.c (compare_strings): Remove.
7928 * utils.h (compare_strings): Remove.
7929 * objc-lang.h (find_imps): Update.
7930 * objc-lang.c (find_methods): Take a std::vector.
7931 (uniquify_strings, find_imps): Likewise.
7932 * linespec.c (find_methods): Take a std::vector.
7933 (decode_objc): Use std::vector.
7934 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7936 (find_method, find_function_symbols): Use std::vector.
7938 2018-04-05 Tom Tromey <tom@tromey.com>
7940 * completer.c (completion_tracker::completion_tracker): Remove
7942 (completion_tracker::discard_completions): Likewise.
7943 * breakpoint.c (ambiguous_names_p): Remove cast.
7944 * ada-lang.c (_initialize_ada_language): Remove cast.
7945 * utils.h (streq): Update.
7946 (streq_hash): Add new declaration.
7947 * utils.c (streq): Return bool.
7948 (streq_hash): New function.
7950 2018-04-05 Tom Tromey <tom@tromey.com>
7952 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7953 Remove a string copy.
7955 2018-04-05 Tom Tromey <tom@tromey.com>
7957 * linespec.c (filter_results): Use std::vector.
7958 (decode_line_2, decode_line_full): Update.
7960 2018-04-05 Tom Tromey <tom@tromey.com>
7962 * linespec.c (canonical_to_fullform): Return std::string.
7963 (filter_results): Update.
7964 (struct decode_line_2_item): Add constructor.
7965 <fullform, displayform>: Now std::string.
7966 (decode_line_2_compare_items): Now a std::sort comparator.
7967 (decode_line_2): Update.
7969 2018-04-05 Tom Tromey <tom@tromey.com>
7971 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7972 (unexpected_linespec_error): Update.
7973 (linespec_parse_basic, parse_linespec): Update.
7975 2018-04-05 Tom Tromey <tom@tromey.com>
7977 * linespec.c (linespec_parse_basic): Reindent.
7979 2018-04-05 Tom Tromey <tom@tromey.com>
7981 * minsyms.h (iterate_over_minimal_symbols): Update.
7982 * minsyms.c (iterate_over_minimal_symbols): Take a
7984 * linespec.c (struct collect_minsyms): Remove.
7985 (compare_msyms): Now a std::sort comparator.
7986 (add_minsym): Add parameters.
7987 (search_minsyms_for_name): Update. Use std::vector.
7989 2018-04-03 Tom Tromey <tom@tromey.com>
7991 * mipsread.c (read_alphacoff_dynamic_symtab): Use
7994 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7996 * MAINTAINERS (Write After Approval): Add Weimin Pan.
7998 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8001 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
8002 printing static type.
8004 2018-04-01 Tom Tromey <tom@tromey.com>
8006 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8007 (rs6000_xfer_shared_libraries): Update.
8009 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
8011 * common/gdb_vecs.h (char_ptr): Remove.
8012 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8014 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8016 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8018 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8020 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8022 * tracepoint.h (struct uploaded_tp): Initialize fields.
8023 <actions, step_actions, cmd_strings>: Change type to
8024 std::vector<char *>.
8025 * tracepoint.c (get_uploaded_tp): Allocate with new.
8026 (free_uploaded_tps): Free with delete.
8027 (parse_tracepoint_definition): Adjust to std::vector change.
8028 * breakpoint.c (read_uploaded_action): Likewise.
8029 (create_tracepoint_from_upload): Likewise.
8030 * ctf.c (ctf_write_uploaded_tp): Likewise.
8031 (SET_ARRAY_FIELD): Likewise.
8032 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8034 2018-03-30 Tom Tromey <tom@tromey.com>
8036 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
8038 (svr4_keep_data_in_core): Update.
8039 (svr4_read_so_list): Update.
8041 2018-03-30 Tom Tromey <tom@tromey.com>
8043 * windows-nat.c (handle_output_debug_string, handle_exception):
8045 * target.h (target_read_string): Update.
8046 * target.c (target_read_string): Change "string" to
8048 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8050 * solib-frv.c (frv_current_sos): Update.
8051 * solib-dsbt.c (dsbt_current_sos): Update.
8052 * solib-darwin.c (darwin_current_sos): Update.
8053 * linux-thread-db.c (inferior_has_bug): Update.
8054 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8055 Update. Remove alloca.
8056 * ada-lang.c (ada_main_name): Update.
8058 2018-03-30 Tom Tromey <tom@tromey.com>
8060 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8061 (struct dwo_file_deleter): New.
8062 (dwo_file_up): New typedef.
8063 (open_and_init_dwo_file): Use dwo_file_up.
8064 (free_dwo_file_cleanup): Remove.
8066 2018-03-30 Tom Tromey <tom@tromey.com>
8068 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8069 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8071 2018-03-30 Tom Tromey <tom@tromey.com>
8073 * dwarf2read.c (class free_cached_comp_units): New class.
8074 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8075 (free_cached_comp_units): Remove function.
8077 2018-03-30 Tom Tromey <tom@tromey.com>
8079 * utils.h (make_cleanup_unpush_target): Remove.
8080 * inf-ptrace.c (struct target_unpusher): New.
8081 (target_unpush_up) New typedef.
8082 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8084 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8086 2018-03-27 Tom Tromey <tom@tromey.com>
8088 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8090 2018-03-27 Pedro Alves <palves@redhat.com>
8091 Tom Tromey <tom@tromey.com>
8093 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8094 destructor. Now a class.
8095 (gdb_readline_wrapper_cleanup): Remove function.
8096 (gdb_readline_wrapper): Remove cleanups.
8098 2018-03-27 Tom Tromey <tom@tromey.com>
8100 * typeprint.h (struct type_print_options) <local_typedefs,
8101 global_typedefs>: Remove "struct" keyword.
8102 (class typedef_hash_table): New class.
8103 (recursively_update_typedef_hash, add_template_parameters)
8104 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8105 (find_typedef_in_hash): Don't declare.
8106 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8107 (typedef_hash_table::recursively_update): Rename from
8108 recursively_update_typedef_hash. Now a member.
8109 (typedef_hash_table::add_template_parameters): Rename from
8110 add_template_parameters. Now a member.
8111 (typedef_hash_table::typedef_hash_table): Now a constructor;
8112 rename from create_typedef_hash.
8113 (typedef_hash_table::~typedef_hash_table): Now a destructor;
8114 rename from free_typedef_hash.
8115 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8116 (do_free_global_table): Remove.
8117 (typedef_hash_table::typedef_hash_table): New constructor; renamed
8118 from copy_type_recursive.
8119 (create_global_typedef_table): Remove.
8120 (typedef_hash_table::find_global_typedef): Now a member of
8122 (typedef_hash_table::find_typedef): Rename from
8123 find_typedef_in_hash; now a member.
8124 (whatis_exp): Update.
8125 * extension.h (struct ext_lang_type_printers): Add constructor and
8127 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8129 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8130 Now a constructor; rename from start_ext_lang_type_printers.
8131 (ext_lang_type_printers): Now a destructor; rename from
8132 free_ext_lang_type_printers.
8133 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8135 (c_type_print_base_struct_union): Update. Remove cleanups.
8137 2018-03-27 Tom Tromey <tom@tromey.com>
8139 * dwarf-index-write.c: Include <cmath>.
8141 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8143 * NEWS: Add entry describing new "set|show varsize-limit" command.
8144 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8146 * printcmd.c (_initialize_printcmd): Add "set var" alias of
8149 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
8151 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8153 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8154 * dwarf-index-common.c: New file.
8155 * dwarf-index-common.h: New file.
8156 * dwarf-index-write.c: New file.
8157 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8158 (struct dwarf2_section_info): Move from here.
8159 (dwarf2_section_info_def): Likewise.
8160 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8161 (offset_type): Likewise.
8162 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8163 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8164 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8165 (byte_swap): Likewise.
8166 (MAYBE_SWAP): Likewise.
8167 (dwarf2_per_cu_ptr): Likewise.
8168 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8169 (struct tu_stats): Likewise.
8170 (struct dwarf2_per_objfile): Likewise.
8171 (struct dwarf2_per_cu_data): Likewise.
8172 (struct signatured_type): Likewise.
8173 (sig_type_ptr): Likewise.
8174 (DEF_VEC_P (sig_type_ptr)): Likewise.
8175 (INDEX4_SUFFIX): Likewise.
8176 (INDEX5_SUFFIX): Likewise.
8177 (DEBUG_STR_SUFFIX): Likewise.
8178 (dwarf2_read_section): Make non-static.
8179 (mapped_index_string_hash): Move from here.
8180 (dwarf5_djb_hash): Likewise.
8181 (file_write): Likewise.
8182 (class data_buf): Likewise.
8183 (struct symtab_index_entry): Likewise.
8184 (struct mapped_symtab): Likewise.
8185 (find_slot): Likewise.
8186 (hash_expand): Likewise.
8187 (add_index_entry): Likewise.
8188 (uniquify_cu_indices): Likewise.
8189 (class c_str_view): Likewise.
8190 (class c_str_view_hasher): Likewise.
8191 (class vector_hasher): Likewise.
8192 (write_hash_table): Likewise.
8193 (psym_index_map): Likewise.
8194 (struct addrmap_index_data): Likewise.
8195 (add_address_entry): Likewise.
8196 (add_address_entry_worker): Likewise.
8197 (write_address_map): Likewise.
8198 (symbol_kind): Likewise.
8199 (write_psymbols): Likewise.
8200 (struct signatured_type_index_data): Likewise.
8201 (write_one_signatured_type): Likewise.
8202 (recursively_count_psymbols): Likewise.
8203 (recursively_write_psymbols): Likewise.
8204 (class debug_names): Likewise.
8205 (check_dwarf64_offsets): Likewise.
8206 (psyms_seen_size): Likewise.
8207 (write_gdbindex): Likewise.
8208 (write_debug_names): Likewise.
8209 (assert_file_size): Likewise.
8210 (write_psymtabs_to_index): Likewise.
8211 (save_gdb_index_command): Likewise.
8212 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8214 * dwarf2read.h: New file.
8216 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8219 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8220 symbol name if the CU's language stores symbol names in linkage
8222 * language.h (struct language_defn)
8223 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8224 all instances of this struct.
8226 2018-03-26 Tom Tromey <tom@tromey.com>
8228 * stack.c (backtrace_command_1): Remove verbose code.
8230 2018-03-26 Tom Tromey <tom@tromey.com>
8232 * python/py-framefilter.c (py_print_type): Don't catch
8233 exceptions. Return void.
8234 (py_print_value): Likewise.
8235 (py_print_single_arg): Likewise.
8236 (enumerate_args): Don't catch exceptions.
8237 (py_print_args): Likewise.
8238 (py_print_frame): Likewise.
8239 (gdbpy_apply_frame_filter): Catch exceptions here.
8241 2018-03-26 Tom Tromey <tom@tromey.com>
8243 * stack.c (_initialize_stack): Remove trailing newlines from help
8244 text. Add "Usage" line to "backtrace" help.
8246 2018-03-26 Tom Tromey <tom@tromey.com>
8249 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8251 2018-03-26 Tom Tromey <tom@tromey.com>
8253 * python/py-framefilter.c (py_print_single_arg): Return
8254 EXT_LANG_BT_ERROR from catch.
8256 2018-03-26 Tom Tromey <tom@tromey.com>
8259 * stack.c (backtrace_command_1): Move some code into no-filters
8262 2018-03-26 Tom Tromey <tom@tromey.com>
8264 * python/py-framefilter.c (throw_quit_or_print_exception): New
8266 (gdbpy_apply_frame_filter): Use it.
8268 2018-03-26 Tom Tromey <tom@tromey.com>
8271 * python/py-framefilter.c (py_print_type, py_print_value)
8272 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8275 2018-03-26 Tom Tromey <tom@tromey.com>
8277 * python/py-framefilter.c (enumerate_args): Use
8278 gdb::unique_xmalloc_ptr.
8280 2018-03-26 Tom Tromey <tom@tromey.com>
8282 * python/py-framefilter.c (py_print_frame): Return
8284 (gdbpy_apply_frame_filter): Update comment.
8285 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8287 <EXT_LANG_BT_NO_FILTERS>: Change value.
8289 2018-03-26 Tom Tromey <tom@tromey.com>
8292 * stack.c (backtrace_command): Parse "hide" argument.
8293 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8294 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8297 2018-03-26 Tom Tromey <tom@tromey.com>
8299 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8301 (backtrace_command): Remove "fulltrace", add "flags".
8303 2018-03-26 Tom Tromey <tom@tromey.com>
8305 * stack.c (backtrace_command): Rewrite command line parsing.
8307 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8309 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8311 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8313 * filename-seen-cache.h: Add include guard.
8315 2018-03-26 Keith Seitz <keiths@redhat.com>
8317 * symfile.c (place_section): Remove "struct" from section_addr_info
8319 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8320 "struct" keyword from section_addr_info.
8322 2018-03-26 Alan Hayward <alan.hayward@arm.com>
8324 * regformats/regdef.h (reg): Add constructors.
8326 2018-03-25 Pedro Alves <palves@redhat.com>
8328 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8329 if then/else bodies in var_func_name extraction.
8331 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
8333 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8334 lookup_minimal_symbol() to find symbol entry.
8335 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8337 2018-03-23 Keith Seitz <keiths@redhat.com>
8340 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8341 nested type definitions for C++, too.
8343 2018-03-23 Tom Tromey <tom@tromey.com>
8345 * machoread.c (struct oso_el): Add a constructor. Don't define as
8347 (macho_register_oso): Remove.
8348 (macho_symtab_read): Take a std::vector.
8349 (oso_el_compare_name): Now a std::sort comparator.
8350 (macho_symfile_read_all_oso): Take a std::vector.
8351 (macho_symfile_read): Use std::vector. Remove cleanups.
8353 2018-03-22 Tom Tromey <tom@tromey.com>
8355 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8356 (record_full_goto_bookmark): Use std::string.
8358 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8361 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8364 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8366 * rs6000-tdep.c (store_insn_p): New function.
8367 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8368 and cr_reg to their unshifted values. Use store_insn_p to
8369 match LR saves using either R1 or fdata->alloca_reg. Use
8370 store_insn_p to match CR saves. Set alloca_reg_offset
8371 when alloca_reg and framep are set. Remove lr_reg shift
8372 when assigning to fdata->lr_register.
8374 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8376 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8377 command line args instead of emitting a warning.
8379 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8381 * tracepoint.h (struct static_tracepoint_marker): Initialize
8382 fields, define default constructor, move constructor and move
8383 assignment, disable the rest.
8384 <str_id, extra>: Make std::string.
8385 (release_static_tracepoint_marker): Remove.
8386 (free_current_marker): Remove.
8387 * tracepoint.c (free_current_marker): Remove.
8388 (parse_static_tracepoint_marker_definition): Adjust to
8389 std::string, use new hex2str overload.
8390 (release_static_tracepoint_marker): Remove.
8391 (print_one_static_tracepoint_marker): Get marker by reference
8392 and adjust to std::string.
8393 (info_static_tracepoint_markers_command): Adjust to std::vector
8395 * target.h (static_tracepoint_marker_p): Remove typedef.
8396 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8397 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8399 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8401 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8402 (target_debug_print_std_vector_static_tracepoint_marker): New.
8403 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8405 (target_debug_print_static_tracepoint_marker_p): ... this.
8406 * target-delegates.c: Re-generate.
8407 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8409 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8410 (decode_static_tracepoint_spec): Adjust to std::vector.
8411 (tracepoint_print_one_detail): Adjust to std::string.
8412 (strace_marker_decode_location): Adjust to std::string.
8413 (update_static_tracepoint): Adjust to std::string, remove call
8414 to release_static_tracepoint_marker.
8415 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8416 Adjust to std::vector.
8417 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8418 (remote_static_tracepoint_markers_by_strid): Adjust to
8420 * common/rsp-low.h (hex2str): New overload with explicit count
8422 * common/rsp-low.c (hex2str): New overload with explicit count
8424 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8425 (_initialize_rsp_low_selftests): Add test_hex2str test.
8426 * unittests/tracepoint-selftests.c
8427 (test_parse_static_tracepoint_marker_definition): Adjust to
8430 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8432 * tracepoint.c (parse_static_tracepoint_marker_definition):
8433 Consider case where the definition is followed by more
8435 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8436 tracepoint-selftests.c.
8437 * unittests/tracepoint-selftests.c: New.
8439 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8441 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8444 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8446 * symtab.c (find_pc_sect_line): fixed indentation.
8448 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8450 * symtab.c (find_pc_sect_line): now uses binary search.
8452 2018-03-19 Tom Tromey <tom@tromey.com>
8454 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8457 2018-03-19 Pedro Alves <palves@redhat.com>
8458 Tom Tromey <tom@tromey.com>
8460 * unittests/observable-selftests.c: New file.
8461 * common/observable.h: New file.
8462 * observable.h: New file.
8463 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8464 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8465 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8466 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8467 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8468 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8469 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8470 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8471 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8472 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8473 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8474 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8475 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8476 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8477 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8478 tui/tui-interp.c, valops.c: Update all users.
8479 * tui/tui-hooks.c (tui_bp_created_observer)
8480 (tui_bp_deleted_observer, tui_bp_modified_observer)
8481 (tui_inferior_exit_observer, tui_before_prompt_observer)
8482 (tui_normal_stop_observer, tui_register_changed_observer):
8484 (tui_observers_token): New global.
8485 (attach_or_detach, tui_attach_detach_observers): New functions.
8486 (tui_install_hooks, tui_remove_hooks): Use
8487 tui_attach_detach_observers.
8488 * record-btrace.c (record_btrace_thread_observer): Remove.
8489 (record_btrace_thread_observer_token): New global.
8490 * observer.sh: Remove.
8491 * observer.c: Rename to observable.c.
8492 * observable.c (namespace gdb_observers): Define new objects.
8493 (observer_debug): Move into gdb_observers namespace.
8494 (struct observer, struct observer_list, xalloc_observer_list_node)
8495 (xfree_observer_list_node, generic_observer_attach)
8496 (generic_observer_detach, generic_observer_notify): Remove.
8497 (_initialize_observer): Update.
8498 Don't include observer.inc.
8499 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8500 (clean mostlyclean): Likewise.
8501 (observer.h, observer.inc): Remove targets.
8502 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8503 (COMMON_SFILES): Use observable.c, not observer.c.
8504 * .gitignore: Remove observer.h.
8506 2018-03-18 Tom Tromey <tom@tromey.com>
8508 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8510 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8512 2018-03-17 Tom Tromey <tom@tromey.com>
8514 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8516 2018-03-17 Tom Tromey <tom@tromey.com>
8518 * target.c (class scoped_target_fd): New.
8519 (target_fileio_close_cleanup): Remove.
8520 (target_fileio_read_alloc_1): Use scoped_target_fd.
8522 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8524 * silent-rules.mk: New.
8525 * Makefile.in: Include silent-rules.mk
8526 (srcdir, VPATH, top_srcdir): Move up.
8527 (COMPILE): Add ECHO_CXX.
8528 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8529 (init.c): Add ECHO_INIT_C.
8530 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8531 (version.c): Add ECHO_GEN.
8532 (printcmd.o): Add ECHO_CXX.
8533 (target-float.o): Add ECHO_CXX.
8534 (ada-exp.o): Add ECHO_CXX.
8535 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8536 (insight$(EXEEXT)): Add ECHO_CXXLD.
8537 * gnulib/configure.ac: Add AM_SILENT_RULES.
8538 * gnulib/aclocal.m4: Re-generate.
8539 * gnulib/configure: Re-generate.
8540 * gnulib/import/Makefile.in: Re-generate.
8542 2018-03-16 Tom Tromey <tom@tromey.com>
8544 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8545 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8546 * utils.c (do_free_section_addr_info)
8547 (make_cleanup_free_section_addr_info): Remove.
8548 * symfile.h (struct other_sections): Add constructor.
8549 (struct section_addr_info): Remove.
8550 (section_addr_info): New typedef.
8551 (struct sym_fns) <sym_offsets>: Change type of parameter.
8552 (build_section_addr_info_from_objfile)
8553 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8554 (default_symfile_offsets, symbol_file_add)
8555 (symbol_file_add_from_bfd)
8556 (build_section_addr_info_from_section_table): Update.
8557 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8558 * symfile.c (alloc_section_addr_info): Remove.
8559 (build_section_addr_info_from_section_table): Change return type.
8561 (build_section_addr_info_from_bfd)
8562 (build_section_addr_info_from_objfile): Likewise.
8563 (free_section_addr_info): Remove.
8564 (relative_addr_info_to_section_offsets): Change type of "addrs".
8565 (addrs_section_compar): Now a std::sort comparator.
8566 (addrs_section_sort): Change return type.
8567 (addr_info_make_relative): Change type of "addrs". Update.
8568 (default_symfile_offsets, syms_from_objfile_1)
8569 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8570 (symbol_file_add_separate): Update.
8571 (symbol_file_add): Change type of "addrs". Update.
8572 (add_symbol_file_command): Update. Remove cleanups.
8573 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8575 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8576 * solib.c (solib_read_symbols): Update.
8577 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8578 * machoread.c (macho_symfile_offsets): Update.
8579 * jit.c (jit_bfd_try_read_symtab): Update.
8581 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8583 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8584 unittests/utils-selftests.c.
8585 * unittests/utils-selftests.c: New file.
8587 2018-03-14 Tom Tromey <tom@tromey.com>
8590 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8593 2018-03-14 Tom Tromey <tom@tromey.com>
8596 * printcmd.c (printf_pointer): Allow "-" in format.
8598 2018-03-14 Tom Tromey <tom@tromey.com>
8600 * printcmd.c (_initialize_printcmd): Add usage to printf.
8602 2018-03-14 Yao Qi <qiyao@sourceware.org>
8604 * MAINTAINERS: Update my email address.
8606 2018-03-13 Tom Tromey <tom@tromey.com>
8608 * machoread.c (macho_check_dsym): Change filenamep to a
8610 (macho_symfile_read): Update.
8611 * symfile.c (load_command): Use std::string.
8613 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
8615 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8616 to error message string.
8617 (riscv_register_name): Use xsnprintf instead of sprintf.
8618 (riscv_insn::fetch_instruction): Use gdb_assert instead of
8620 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8622 (riscv_push_dummy_call): Likewise.
8624 2018-03-12 Tom Tromey <tom@tromey.com>
8626 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8627 Use gdb::byte_vector.
8628 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8630 2018-03-12 Yao Qi <yao.qi@linaro.org>
8632 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8633 parameter type to readable_regcache.
8634 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8637 2018-03-11 Tom Tromey <tom@tromey.com>
8639 * dwarf2read.c (struct nextfield): Add initializers.
8640 (struct nextfnfield): Remove.
8641 (struct fnfieldlist): Add initializers. Remove "length" and
8642 "head", use std::vector.
8643 (struct decl_field_list): Remove.
8644 (struct field_info): Add initializers.
8645 <fields, baseclasses>: Now std::vector.
8646 <nbaseclasses, nfnfields, typedef_field_list_count,
8647 nested_types_list_count>: Remove.
8648 (dwarf2_add_field, dwarf2_add_type_defn)
8649 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8650 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8651 (process_structure_scope): Update.
8653 2018-03-11 Tom Tromey <tom@tromey.com>
8655 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8656 for use by std::sort.
8657 (build_type_psymtabs_1): Use std::vector.
8659 2018-03-09 Eli Zaretskii <eliz@gnu.org>
8661 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8662 and LIBMPFR in the printed configuration.
8664 2018-03-08 Tom Tromey <tom@tromey.com>
8666 * source.c (get_filename_and_charpos): Use scoped_fd.
8667 * nto-procfs.c (procfs_open_1): Use scoped_fd.
8668 (procfs_pidlist): Likewise.
8669 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8670 (iterate_over_mappings): Likewise.
8672 2018-03-08 Tom Tromey <tom@tromey.com>
8674 * infcall.c (struct call_return_meta_info)
8675 <stack_temporaries_enabled>: Remove.
8676 (get_call_return_value, call_function_by_hand_dummy): Update.
8677 * thread.c (disable_thread_stack_temporaries): Remove.
8678 (enable_thread_stack_temporaries): Remove.
8679 (thread_stack_temporaries_enabled_p): Return bool.
8680 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8681 (get_last_thread_stack_temporary): Update.
8682 * eval.c (evaluate_subexp): Update.
8683 * gdbthread.h (class enable_thread_stack_temporaries): Now a
8684 class, not a function.
8685 (value_ptr, value_vec): Remove typedefs.
8686 (class thread_info) <stack_temporaries_enabled>: Now bool.
8687 <stack_temporaries>: Now a std::vector.
8688 (thread_stack_temporaries_enabled_p)
8689 (value_in_thread_stack_temporaries): Return bool.
8691 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
8693 * remote.c (putpkt_binary): Fix omitted bytes reporting.
8694 (getpkt_or_notif_sane_1): Likewise.
8696 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8698 * build-id.c (build_id_to_debug_bfd): Use std::string.
8700 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8702 * build-id.c (find_separate_debug_file_by_buildid): Return
8704 * build-id.h (find_separate_debug_file_by_buildid): Return
8706 * coffread.c (coff_symfile_read): Adjust to std::string.
8707 * elfread.c (elf_symfile_read): Adjust to std::string.
8708 * symfile.c (separate_debug_file_exists): Change parameter to
8710 (find_separate_debug_file): Return std::string.
8711 (find_separate_debug_file_by_debuglink): Return std::string.
8712 * symfile.h (find_separate_debug_file_by_debuglink): Return
8715 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8717 * common/xml-utils.c (xml_escape_text): Move code to...
8718 (xml_escape_text_append): ... this new function.
8719 * common/xml-utils.h (xml_escape_text_append): New declaration.
8720 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8722 (_initialize_xml_utils): register test_xml_escape_text_append as
8725 2018-03-07 Alan Hayward <alan.hayward@arm.com>
8727 * defs.h: Remove MAX_REGISTER_SIZE.
8728 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8730 * python/py-unwind.c (pyuw_sniffer): Likewise.
8732 2018-03-07 Tom Tromey <tom@tromey.com>
8734 * linux-tdep.c (linux_info_proc): Update.
8735 * target.h (struct target_ops) <to_fileio_readlink>: Return
8737 (target_fileio_readlink): Return optional<string>.
8738 * remote.c (remote_hostio_readlink): Return optional<string>.
8739 * inf-child.c (inf_child_fileio_readlink): Return
8741 * target.c (target_fileio_readlink): Return optional<string>.
8743 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
8745 * regcache.c (cooked_read_test): Add riscv to the list of
8746 architectures that have a save_reggroup.
8748 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
8750 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8751 value is not a dynamic class object.
8753 2018-03-06 Tom Tromey <tom@tromey.com>
8755 * rust-exp.y: Formatting fixes.
8757 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8759 * riscv-tdep.c (riscv_register_name): Remove target description
8761 (riscv_gdbarch_init): Remove target description check.
8763 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8765 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8767 * riscv-tdep.h: Likewise.
8769 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8771 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8772 (riscv_pseudo_register_write): Delete.
8773 (riscv_gdbarch_init): Remove all use of pseudo registers.
8775 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8777 * record-btrace.c (btrace_print_lines): Replace cleanup
8778 parameter with RAII equivalents.
8779 (btrace_insn_history): Replace cleanup with RAII equivalents.
8780 * ui-out.h (make_cleanup_ui_out_list_begin_end,
8781 make_cleanup_ui_out_tuple_begin_end): Remove.
8782 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8783 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8784 make_cleanup_ui_out_list_begin_end): Remove.
8786 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8788 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8789 parameter types to std::vector. Use bool.
8790 (record_btrace_wait): Replace VEC(tp_t) with
8791 std::vector<thread_info *>.
8792 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8794 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8796 * record-btrace.c (record_btrace_disable_callback): Remove.
8797 (struct scoped_btrace_disable): New.
8798 (record_btrace_open): Use scoped_btrace_disable.
8800 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8802 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8803 reading values from registers.
8805 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8807 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8810 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8812 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8813 change parameter type. Use GDB's print functions, and use
8814 core_addr_to_string where appropriate.
8815 (riscv_push_dummy_call): Use core_addr_to_string where
8816 appropriate, update call to riscv_print_arg_location, and reindent
8818 (riscv_return_value): Update call to riscv_print_arg_location.
8820 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8821 Tim Newsome <tim@sifive.com>
8822 Albert Ou <a0u@eecs.berkeley.edu>
8823 Darius Rad <darius@bluespec.com>
8825 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8826 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8827 (ALLDEPFILES): Add riscv-tdep.c
8828 * configure.tgt: Add riscv support.
8829 * riscv-tdep.c: New file.
8830 * riscv-tdep.h: New file.
8831 * NEWS: Mention new target.
8832 * MAINTAINERS: Add entry for riscv.
8834 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8836 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8837 fields within aggregates.
8839 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
8841 * record-btrace.c (btrace_print_lines): Change type of flags to
8842 gdb_disassembly_flags.
8844 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8846 * fbsd-nat.c: Include "inf-ptrace.h".
8847 (USE_SIGTRAP_SIGINFO): Conditionally define.
8848 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8849 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8850 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8852 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8854 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8856 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8857 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8858 "supports_stopped_by_hw_breakpoint" target methods.
8860 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8862 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8863 * fbsd-nat.c (debug_fbsd_nat): New variable.
8864 (show_fbsd_nat_debug): New function.
8865 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8866 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8868 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8870 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8871 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8873 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8874 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8877 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8879 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8880 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8882 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8884 * charset.c (struct charset_vector): New.
8885 (charsets): Change type to charset_vector.
8886 (find_charset_names): Adjust.
8888 (_initialize_charset): Adjust.
8890 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8892 * progspace.h (struct program_space) <deleted_solibs>: Change
8893 type to std::vector<std::string>.
8894 * progspace.c (clear_program_space_solib_cache): Adjust.
8895 * breakpoint.c (print_solib_event): Adjust.
8896 (check_status_catch_solib): Adjust.
8897 * solib.c (update_solib_list): Adjust.
8898 * ui-out.h (class ui_out) <field_string>: New overload.
8899 * ui-out.c (ui_out::field_string): New overload.
8901 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8903 * progspace.h (struct program_space): Add constructor and
8904 destructor, initialize fields.
8905 (add_program_space): Remove.
8906 * progspace.c (add_program_space): Rename to...
8907 (program_space::program_space): ... this.
8908 (release_program_space): Rename to...
8909 (program_space::~program_space): ... this.
8910 (delete_program_space): Use delete to delete program_space.
8911 (initialize_progspace): Use new to allocate program_space.
8912 * inferior.c (add_inferior_with_spaces): Likewise.
8913 (clone_inferior_command): Likewise.
8914 * infrun.c (follow_fork_inferior): Likewise.
8915 (handle_vfork_child_exec_or_exit): Likewise.
8917 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8919 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8920 (delim_string_to_char_ptr_vec): Return std::vector of
8921 gdb::unique_xmalloc_ptr.
8922 (dirnames_to_char_ptr_vec_append): Take std::vector of
8923 gdb::unique_xmalloc_ptr.
8924 (dirnames_to_char_ptr_vec): Return std::vector of
8925 gdb::unique_xmalloc_ptr.
8926 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8927 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8928 (delim_string_to_char_ptr_vec): Return an std::vector of
8929 gdb::unique_xmalloc_ptr, adjust the code.
8930 (dirnames_to_char_ptr_vec_append): Take an std::vector of
8931 gdb::unique_xmalloc_ptr, adjust the code.
8932 (dirnames_to_char_ptr_vec): Return an std::vector of
8933 gdb::unique_xmalloc_ptr, adjust the code.
8934 * auto-load.c (auto_load_safe_path_vec): Change type to
8935 std::vector of gdb::unique_xmalloc_ptr.
8936 (auto_load_expand_dir_vars): Return an std::vector of
8937 gdb::unique_xmalloc_ptr, adjust the code.
8938 (auto_load_safe_path_vec_update): Adjust.
8939 (filename_is_in_auto_load_safe_path_vec): Adjust.
8940 (auto_load_objfile_script_1): Adjust.
8941 * build-id.c (build_id_to_debug_bfd): Adjust.
8942 * linux-thread-db.c (thread_db_load_search): Adjust.
8943 * source.c (add_path): Adjust.
8945 * symfile.c (find_separate_debug_file): Adjust.
8946 * utils.c (do_free_char_ptr_vec): Remove.
8947 (make_cleanup_free_char_ptr_vec): Remove.
8949 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
8952 * common/pathstuff.c: Conditionally include "<windows.h>".
8954 2018-03-01 Georg Sauthoff <mail@georg.so>
8957 * gcore.in: Quote variables and switch interpreter to bash.
8959 2018-03-01 Tom Tromey <tom@tromey.com>
8961 * dwarf2read.c (alloc_discriminant_info): Fix default_index
8962 assertion. Add assertion for discriminant_index.
8963 (quirk_rust_enum): Use correct base type name in univariant case.
8965 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
8967 * record.c (get_call_history_modifiers): Return a
8969 (cmd_record_call_history): Adjust.
8970 * record-btrace.c (record_btrace_call_history): Adjust.
8971 (record_btrace_call_history_range): Adjust.
8972 (record_btrace_call_history_from): Adjust.
8973 * target-debug.h (target_debug_print_record_print_flags): New.
8974 * target-delegates.c: Re-generate.
8975 * target.c (target_call_history): Change flags type.
8976 (target_call_history_from): Likewise.
8977 (target_call_history_range): Likewise.
8978 * target.h (struct target_ops) <target_call_history>: Likewise.
8979 (target_call_history_from): Likewise.
8980 (target_call_history_range): Likewise.
8982 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8983 Simon Marchi <simon.marchi@polymtl.ca>
8985 * common/common-utils.c: Include "sys/stat.h".
8986 (is_regular_file): Move here from "source.c"; change return
8988 * common/common-utils.h (is_regular_file): New prototype.
8989 * common/pathstuff.c (contains_dir_separator): New function.
8990 * common/pathstuff.h (contains_dir_separator): New prototype.
8991 * source.c: Don't include "sys/stat.h".
8992 (is_regular_file): Move to "common/common-utils.c".
8994 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8996 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
8997 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
8998 * auto-load.c: Include "common/pathstuff.h".
8999 * common/common-def.h (current_directory): Move here.
9000 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9002 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9004 * common/pathstuff.c: New file.
9005 * common/pathstuff.h: New file.
9006 * compile/compile.c: Include "common/pathstuff.h".
9007 * defs.h (current_directory): Move to "common/common-defs.h".
9008 * dwarf2read.c: Include "common/pathstuff.h".
9010 * guile/scm-safe-call.c: Likewise.
9011 * linux-thread-db.c: Likewise.
9013 * nto-tdep.c: Likewise.
9014 * objfiles.c: Likewise.
9015 * source.c: Likewise.
9016 * symtab.c: Likewise.
9017 * utils.c: Include "common/pathstuff.h".
9018 (gdb_realpath): Move to "common/pathstuff.c".
9019 (gdb_realpath_keepfile): Likewise.
9020 (gdb_abspath): Likewise.
9021 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9022 (gdb_realpath_keepfile): Likewise.
9023 (gdb_abspath): Likewise.
9025 2018-02-28 John Baldwin <jhb@FreeBSD.org>
9027 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9028 wildcard process pid for super_resume for kernels with a
9031 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
9033 * compile/compile.c (get_args): Add additional comments
9034 explaining function.
9036 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
9037 Tom Tromey <tom@tromey.com>
9039 * target.h (memory_write_request_s): Remove typedef. Don't define
9041 (target_write_memory_blocks): Change argument to std::vector.
9042 (struct memory_write_request): Add constructor.
9043 * target-memory.c (compare_block_starting_address): Return bool.
9044 Change argument types.
9045 (claim_memory): Change arguments to use std::vector.
9046 (split_regular_and_flash_blocks, blocks_to_erase)
9047 (compute_garbled_blocks): Likewise.
9048 (cleanup_request_data, cleanup_write_requests_vector): Remove.
9049 (target_write_memory_blocks): Change argument to std::vector.
9050 * symfile.c (struct load_section_data): Add constructor and
9051 destructor. Use std::vector for "requests".
9052 (struct load_progress_data): Add initializers.
9053 (load_section_callback): Update. Use "new".
9054 (clear_memory_write_data): Remove.
9055 (generic_load): Update.
9057 2018-02-27 Alan Hayward <alan.hayward@arm.com>
9059 * arch/aarch64.h: Use common/tdesc.h.
9061 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9063 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9064 architecture with a 64-bit ABI.
9066 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9068 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9069 ahead of target description loading.
9071 2018-02-26 Tom Tromey <tom@tromey.com>
9073 * stack.c (backtrace_command_1): Update.
9074 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9076 * python/py-framefilter.c (py_print_frame)
9077 (gdbpy_apply_frame_filter): Change type of "flags".
9078 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9080 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9081 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9082 * extension.h (enum frame_filter_flag): Rename from
9084 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9085 (apply_ext_lang_frame_filter): Change type of "flags".
9086 * extension.c (apply_ext_lang_frame_filter): Change type of
9088 * extension-priv.h (struct extension_language_ops)
9089 <apply_frame_filter>: Change type of "flags".
9091 2018-02-26 Tom Tromey <tom@tromey.com>
9094 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
9095 off-by-one in py_end computation.
9096 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9098 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9101 2018-02-26 Tom Tromey <tom@tromey.com>
9103 * dwarf2read.c (struct variant_field): New.
9104 (struct nextfield) <variant>: New field.
9105 (dwarf2_add_field): Handle DW_TAG_variant_part.
9106 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9107 discriminated union.
9108 (read_structure_type): Handle DW_TAG_variant_part.
9109 (handle_struct_member_die): New function, extracted from
9110 process_structure_scope. Handle DW_TAG_variant.
9111 (process_structure_scope): Handle discriminated unions. Call
9112 handle_struct_member_die.
9114 2018-02-26 Tom Tromey <tom@tromey.com>
9116 * rust-lang.h (rust_last_path_segment): Declare.
9117 * rust-lang.c (rust_last_path_segment): Now public. Change
9119 (struct disr_info): Remove.
9120 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9121 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9122 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9123 (rust_enum_p, rust_enum_variant): New function.
9124 (rust_underscore_fields): Remove "offset" parameter.
9125 (rust_print_enum): New function.
9126 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9127 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9128 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
9130 (rust_internal_print_type): New function, from rust_print_type.
9132 (rust_print_type): Call rust_internal_print_type.
9133 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9134 Update enum handling.
9135 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9136 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9137 (rust_union_quirks): New functions.
9138 (process_full_comp_unit, process_full_type_unit): Call
9140 (process_structure_scope): Update rust_unions if necessary.
9142 2018-02-26 Tom Tromey <tom@tromey.com>
9144 * value.h (value_union_variant): Declare.
9145 * valops.c (value_union_variant): New function.
9146 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9147 (struct discriminant_info): New.
9148 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9150 (struct main_type) <flag_discriminated_union>: New field.
9152 2018-02-26 Tom Tromey <tom@tromey.com>
9154 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9155 unittests/unpack-selftests.c.
9156 * unittests/unpack-selftests.c: New file.
9157 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9159 2018-02-26 Yao Qi <yao.qi@linaro.org>
9161 * dwarf2read.c (struct partial_die_info) <read>: New method.
9162 (read_partial_die): Remove the declaration.
9163 (load_partial_dies): Update.
9164 (partial_die_info::partial_die_info):
9165 (read_partial_die): Change it to partial_die_info::read.
9167 2018-02-26 Yao Qi <yao.qi@linaro.org>
9169 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9170 (fixup_partial_die): Remove declaration.
9171 (scan_partial_symbols): Update.
9172 (partial_die_parent_scope): Likewise.
9173 (partial_die_full_name): Likewise.
9174 (fixup_partial_die): Change it to partial_die_info::fixup.
9176 2018-02-26 Yao Qi <yao.qi@linaro.org>
9178 * dwarf2read.c (read_partial_die): Update the declaration.
9179 (load_partial_dies): Caller update.
9180 (read_partial_die): Remove one argument abbrev_len.
9182 2018-02-26 Yao Qi <yao.qi@linaro.org>
9184 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9185 assignment operator.
9186 (load_partial_dies): Use ctor and copy ctor.
9187 (read_partial_die): Update.
9188 (dwarf2_cu::find_partial_die): Use ctor.
9190 2018-02-26 Yao Qi <yao.qi@linaro.org>
9192 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9193 (find_partial_die_in_comp_unit): Change it to
9194 dwarf2_cu::find_partial_die.
9195 (find_partial_die): Update.
9197 2018-02-26 Yao Qi <yao.qi@linaro.org>
9199 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9202 2018-02-26 Yao Qi <yao.qi@linaro.org>
9204 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9206 2018-02-26 Alan Hayward <alan.hayward@arm.com>
9208 * arch/amd64.h: Use common/tdesc.h.
9209 * arch/i386.c: Likewise.
9210 * arch/i386.h: Likewise.
9211 * arch/tic6x.c: Likewise.
9212 * arch/tdesc.h: Move file from here...
9213 * common/tdesc.h: ...to here.
9214 * features/aarch64-core.c: Regenerate.
9215 * features/aarch64-fpu.c: Regenerate.
9216 * features/i386/32bit-avx.c: Regenerate.
9217 * features/i386/32bit-avx512.c: Regenerate.
9218 * features/i386/32bit-core.c: Regenerate.
9219 * features/i386/32bit-linux.c: Regenerate.
9220 * features/i386/32bit-mpx.c: Regenerate.
9221 * features/i386/32bit-pkeys.c: Regenerate.
9222 * features/i386/32bit-sse.c: Regenerate.
9223 * features/i386/64bit-avx.c: Regenerate.
9224 * features/i386/64bit-avx512.c: Regenerate.
9225 * features/i386/64bit-core.c: Regenerate.
9226 * features/i386/64bit-linux.c: Regenerate.
9227 * features/i386/64bit-mpx.c: Regenerate.
9228 * features/i386/64bit-pkeys.c: Regenerate.
9229 * features/i386/64bit-segments.c: Regenerate.
9230 * features/i386/64bit-sse.c: Regenerate.
9231 * features/i386/x32-core.c: Regenerate.
9232 * features/tic6x-c6xp.c: Regenerate.
9233 * features/tic6x-core.c: Regenerate.
9234 * features/tic6x-gp.c: Regenerate.
9235 * target-descriptions.c: Use common/tdesc.h.
9236 * target-descriptions.h: Likewise.
9238 2018-02-24 Tom Tromey <tom@tromey.com>
9240 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9241 (try_thread_db_load_from_dir, thread_db_load_search): Use
9243 (info_auto_load_libthread_db_compare): Return bool. Change
9245 (info_auto_load_libthread_db): Use std::vector, std::string.
9248 2018-02-24 Tom Tromey <tom@tromey.com>
9250 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9252 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9254 * gdbarch.c: Rebuild.
9255 * gdbarch.h: Rebuild.
9256 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9257 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9258 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9261 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9263 * gdbtypes.h (sect_offset): Change type to uint64_t.
9264 (sect_offset_str): New function.
9265 * dwarf2read.c (create_addrmap_from_aranges): Use
9267 (error_check_comp_unit_head): Likewise.
9268 (create_debug_type_hash_table): Likewise.
9269 (read_cutu_die_from_dwo): Likewise.
9270 (init_cutu_and_read_dies): Likewise.
9271 (init_cutu_and_read_dies_no_follow): Likewise.
9272 (process_psymtab_comp_unit_reader): Likewise.
9273 (partial_die_parent_scope): Likewise.
9274 (peek_die_abbrev): Likewise.
9275 (process_queue): Likewise.
9276 (dwarf2_physname): Likewise.
9277 (read_namespace_alias): Likewise.
9278 (read_import_statement): Likewise.
9279 (create_dwo_cu_reader): Likewise.
9280 (create_cus_hash_table): Likewise.
9281 (lookup_dwo_cutu): Likewise.
9282 (inherit_abstract_dies): Likewise.
9283 (read_func_scope): Likewise.
9284 (read_call_site_scope): Likewise.
9285 (dwarf2_add_member_fn): Likewise.
9286 (read_common_block): Likewise.
9287 (read_module_type): Likewise.
9288 (read_typedef): Likewise.
9289 (read_subrange_type): Likewise.
9290 (load_partial_dies): Likewise.
9291 (read_partial_die): Likewise.
9292 (find_partial_die): Likewise.
9293 (read_str_index): Likewise.
9294 (dwarf2_string_attr): Likewise.
9295 (build_error_marker_type): Likewise.
9296 (lookup_die_type): Likewise.
9297 (dump_die_shallow): Likewise.
9298 (follow_die_ref): Likewise.
9299 (dwarf2_fetch_die_loc_sect_off): Likewise.
9300 (dwarf2_fetch_constant_bytes): Likewise.
9301 (follow_die_sig): Likewise.
9302 (get_signatured_type): Likewise.
9303 (get_DW_AT_signature_type): Likewise.
9304 (dwarf2_find_containing_comp_unit): Likewise.
9305 (set_die_type): Likewise.
9307 2018-02-21 John Baldwin <jhb@FreeBSD.org>
9309 * arch/aarch64.c: Include "common-defs.h".
9310 * arch/amd64.c: Likewise.
9311 * arch/i386.c: Likewise.
9313 2018-02-21 Tom Tromey <tom@tromey.com>
9315 * value.h: (extract_field_op): Update.
9316 * eval.c (extract_field_op): Return a const char *.
9317 * expression.h (parse_expression_for_completion): Update.
9318 * completer.c (complete_expression): Update.
9319 (add_struct_fields): Make fieldname const.
9320 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9321 (mark_completion_tag, parse_exp_in_context_1): Update.
9322 (parse_expression_for_completion): Change "name" to
9323 unique_xmalloc_ptr*.
9325 2018-02-21 Tom Tromey <tom@tromey.com>
9327 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9329 2018-02-21 Yao Qi <yao.qi@linaro.org>
9331 * avr-tdep.c (avr_read_pc): Change parameter type to
9333 * gdbarch.sh (read_pc): Likewise.
9334 * gdbarch.c: Re-generated.
9335 * gdbarch.h: Re-generated.
9336 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9338 * ia64-tdep.c (ia64_read_pc): Likewise.
9339 * mips-tdep.c (mips_read_pc): Likewise.
9340 * spu-tdep.c (spu_read_pc): Likewise.
9342 2018-02-21 Yao Qi <yao.qi@linaro.org>
9344 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9345 * regcache-dump.c: New file.
9346 * regcache.c: Move register_dump to regcache-dump.c.
9347 (maintenance_print_registers): Likewise.
9348 (maintenance_print_raw_registers): Likewise.
9349 (maintenance_print_cooked_registers): Likewise.
9350 (maintenance_print_register_groups): Likewise.
9351 (maintenance_print_remote_registers): Likewise.
9352 (_initialize_regcache): Likewise.
9353 * regcache.h (register_dump): Moved from regcache.c.
9355 2018-02-21 Yao Qi <yao.qi@linaro.org>
9357 * regcache.c (regcache::regcache): Update.
9358 (regcache::invalidate): Move it to detached_regcache::invalidate.
9359 (get_thread_arch_aspace_regcache): Update.
9360 (regcache::raw_update): Update.
9361 (regcache::cooked_read): Remove some code.
9362 (regcache::cooked_read_value): Likewise.
9363 (regcache::raw_write): Remove assert on m_readonly_p.
9364 (regcache::raw_supply_integer): Move it to
9365 detached_regcache::raw_supply_integer.
9366 (regcache::raw_supply_zeroed): Likewise.
9367 * regcache.h (detached_regcache) <raw_supply_integer>: New
9369 <raw_supply_zeroed, invalidate>: Likewise.
9370 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9371 <invalidate>: Likewise.
9372 <m_readonly_p>: Removed.
9374 2018-02-21 Yao Qi <yao.qi@linaro.org>
9376 * infcmd.c (get_return_value): Let stop_regs point to
9377 get_current_regcache.
9378 * regcache.c (regcache::regcache): Remove.
9379 (register_dump_reg_buffer): New class.
9380 (regcache_print): Adjust.
9381 * regcache.h (regcache): Remove constructors.
9383 2018-02-21 Yao Qi <yao.qi@linaro.org>
9385 * regcache.c (class register_dump): New class.
9386 (register_dump_regcache, register_dump_none): New class.
9387 (register_dump_remote, register_dump_groups): New class.
9388 (regcache_print): Update.
9389 * regcache.h (regcache_dump_what): Move it to regcache.c.
9390 (regcache) <dump>: Remove.
9392 2018-02-21 Yao Qi <yao.qi@linaro.org>
9394 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9396 (jit_unwind_reg_set_impl): Call raw_supply.
9397 (jit_frame_sniffer): Use reg_buffer_rw.
9398 * record-full.c (record_full_core_regbuf): Change its type.
9399 (record_full_core_open_1): Use reg_buffer_rw.
9400 (record_full_close): Likewise.
9401 (record_full_core_fetch_registers): Use regcache->raw_supply.
9402 (record_full_core_store_registers): Likewise.
9403 * regcache.c (regcache::get_register_status): Move it to
9405 (regcache_raw_set_cached_value): Remove.
9406 (regcache::raw_set_cached_value): Remove.
9407 (regcache::raw_write): Call raw_supply.
9408 (regcache::raw_supply): Move it to reg_buffer_rw.
9409 * regcache.h (regcache_raw_set_cached_value): Remove.
9410 (reg_buffer_rw): New class.
9412 2018-02-21 Yao Qi <yao.qi@linaro.org>
9414 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9415 readonly_detached_regcache.
9416 (dummy_frame_prev_register): Use regcache->cooked_read.
9417 * frame.c (frame_save_as_regcache): Change return type.
9418 (frame_pop): Update.
9419 * frame.h (frame_save_as_regcache): Update declaration.
9420 * inferior.h (get_infcall_suspend_state_regcache): Update
9422 * infrun.c (infcall_suspend_state) <registers>: use
9423 readonly_detached_regcache.
9424 (save_infcall_suspend_state): Don't use regcache_dup.
9425 (get_infcall_suspend_state_regcache): Change return type.
9426 * linux-fork.c (struct fork_info) <savedregs>: Change to
9427 readonly_detached_regcache.
9429 (fork_save_infrun_state): Don't use regcache_dup.
9430 (info_checkpoints_command): Adjust.
9431 * mi/mi-main.c (register_changed_p): Update declaration.
9432 (mi_cmd_data_list_changed_registers): Use
9433 readonly_detached_regcache.
9434 (register_changed_p): Change parameter type to
9435 readonly_detached_regcache.
9436 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9437 readonly_detached_regcache.
9438 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9439 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9441 (regcache::save): Move it to reg_buffer.
9442 (regcache::restore): Change parameter type.
9443 (regcache_dup): Remove.
9444 * regcache.h (reg_buffer) <save>: New method.
9445 (readonly_detached_regcache): New class.
9446 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9447 readonly_detached_regcache.
9448 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9450 2018-02-21 Yao Qi <yao.qi@linaro.org>
9452 * frame.c (frame_save_as_regcache): Use regcache method save.
9453 (frame_pop): Use regcache method restore.
9454 * infrun.c (restore_infcall_suspend_state): Likewise.
9455 * linux-fork.c (fork_load_infrun_state): Likewise.
9456 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9458 * regcache.c (regcache_save): Remove.
9459 (regcache::restore): More asserts.
9460 (regcache_cpy): Remove.
9461 * regcache.h (regcache_save): Remove the declaration.
9462 (regcache::restore): Move from private to public.
9463 Remove the friend declaration of regcache_cpy.
9464 (regcache_cpy): Remove declaration.
9466 2018-02-21 Yao Qi <yao.qi@linaro.org>
9468 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9469 parameter type to 'readable_regcache *'.
9470 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9471 * arm-tdep.c (arm_neon_quad_read): Likewise.
9472 (arm_pseudo_read): Likewise.
9473 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9474 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9475 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9476 * gdbarch.c: Re-generated.
9477 * gdbarch.h: Re-generated.
9478 * gdbarch.sh (pseudo_register_read): Change parameter type to
9479 'readable_regcache *'.
9480 (pseudo_register_read_value): Likewise.
9481 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9482 (h8300_pseudo_register_read): Likewise.
9483 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9484 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9485 (i386_pseudo_register_read_into_value): Likewise.
9486 (i386_pseudo_register_read_value): Likewise.
9487 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9489 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9490 * m32c-tdep.c (m32c_raw_read): Likewise.
9491 (m32c_read_flg): Likewise.
9492 (m32c_banked_register): Likewise.
9493 (m32c_banked_read): Likewise.
9494 (m32c_sb_read): Likewise.
9495 (m32c_part_read): Likewise.
9496 (m32c_cat_read): Likewise.
9497 (m32c_r3r2r1r0_read): Likewise.
9498 (m32c_pseudo_register_read): Likewise.
9499 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9500 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9501 (mep_pseudo_cr64_read): Likewise.
9502 (mep_pseudo_register_read): Likewise.
9503 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9504 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9505 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9506 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9507 (regcache::cooked_read): Likewise.
9508 (regcache::cooked_read_value): Likewise.
9509 (regcache_cooked_read_signed):
9510 (regcache::cooked_read): Likewise.
9511 * regcache.h (readable_regcache): New class.
9512 (regcache): Inherit readable_regcache. Move some methods to
9514 * rl78-tdep.c (rl78_pseudo_register_read): Change
9515 parameter type to 'readable_regcache *'.
9516 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9517 (e500_pseudo_register_read): Change parameter type to
9518 'readable_regcache *'.
9519 (dfp_pseudo_register_read): Likewise.
9520 (vsx_pseudo_register_read): Likewise.
9521 (efpr_pseudo_register_read): Likewise.
9522 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9523 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9524 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9525 (sh64_pseudo_register_read): Likewise.
9526 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9527 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9528 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9529 (spu_pseudo_register_read): Likewise.
9530 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9531 (xtensa_pseudo_register_read): Likewise.
9533 2018-02-21 Yao Qi <yao.qi@linaro.org>
9535 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9536 (regcache::arch): Move it to reg_buffer::arch.
9537 (regcache::register_buffer): Likewise.
9538 (regcache::assert_regnum): Likewise.
9539 (regcache::num_raw_registers): Likewise.
9540 * regcache.h (reg_buffer): New class.
9541 (regcache): Inherit reg_buffer.
9543 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9545 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9546 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9548 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9550 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9552 2018-02-19 Alan Hayward <alan.hayward@arm.com>
9554 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9555 (SFILES): Remove common/*.c files.
9556 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9557 * common/common.host: Add common reference.
9558 * configure.ac: Likewise.
9559 * configure: Regenerate.
9561 2018-02-16 Yao Qi <yao.qi@linaro.org>
9563 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9564 (block_initialize_namespace): Use new.
9565 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9566 (dwarf2_free_objfile): Use delete.
9567 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9568 (copy_type_recursive): Use new.
9569 * gdb_obstack.h (allocate_on_obstack): New.
9571 2018-02-15 Yao Qi <yao.qi@linaro.org>
9574 * inferior.c (exit_inferior_1): Reset inf->control.
9576 2018-02-15 Joel Brobecker <brobecker@adacore.com>
9578 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9581 2018-02-14 Pedro Alves <palves@redhat.com>
9583 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9584 frame_cleanup_after_sniffer on exception.
9586 2018-02-14 Tom Tromey <tom@tromey.com>
9588 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9590 (solib_bfd_open): Make pathname const.
9591 * solib.c (solib_bfd_open): Make pathname const.
9592 * solib-spu.c (spu_bfd_fopen): Make name const.
9593 (spu_bfd_open): Make pathname const.
9594 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9595 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9597 2018-02-14 Tom Tromey <tom@tromey.com>
9599 * symfile.c (symfile_bfd_open): Update.
9600 * source.h (openp, source_full_path_of, find_and_open_source):
9601 Change argument type to unique_xmalloc_ptr.
9602 * source.c (openp): Take a unique_xmalloc_ptr.
9603 (source_full_path_of, find_and_open_source): Likewise.
9604 (open_source_file, symtab_to_fullname): Update.
9605 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9607 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9608 (exec_file_find): Update.
9609 * psymtab.c (psymtab_to_fullname): Update.
9610 * nto-tdep.h (nto_find_and_open_solib): Update.
9611 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9613 * exec.c (exec_file_attach): Update.
9614 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9615 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9617 2018-02-14 Tom Tromey <tom@tromey.com>
9619 * solib.c: Include source.h.
9620 * nto-tdep.c: Include source.h.
9621 * mi/mi-cmd-env.c: Include source.h.
9622 * infcmd.c: Include source.h.
9623 * exec.c: Include source.h.
9624 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9625 (add_path, directory_switch, source_path, init_source_path): Move
9627 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9628 (add_path, directory_switch, source_path, init_source_path):
9631 2018-02-14 Tom Tromey <tom@tromey.com>
9633 * solist.h (exec_file_find, solib_find): Return
9635 (solib_bfd_fopen): Take a const char *.
9636 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9637 (exec_file_find, solib_find): Likewise.
9638 (solib_bfd_fopen): Do not take ownership of "pathname".
9639 (solib_bfd_open): Use unique_xmalloc_ptr.
9640 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9641 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9642 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9643 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9645 2018-02-14 Joel Brobecker <brobecker@adacore.com>
9647 * ada-lang.c (name_match_type_from_name): Remove reference to
9648 ada_name_for_lookup in function's documentation.
9649 * ada-lang.h (ada_name_for_lookup): Delete declaration.
9651 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9653 * defs.h (enum openp_flags): New enum.
9654 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9655 Move to enum openp_flags.
9656 (openp_flags): New enum flags.
9657 (openp): Change parameter type to openp_flags.
9658 * source.c (openp): Change parameter type to openp_flags.
9659 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9660 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9662 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9664 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9667 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
9669 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9671 (class dwarf2_queue_guard): ...the destructor of this new class.
9672 (dw2_do_instantiate_symtab): Create instance of the new class
9673 dwarf2_queue_guard, remove cleanup.
9675 2018-02-09 Tom Tromey <tom@tromey.com>
9677 * source.c (find_source_lines): Don't reference past the end of
9680 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9682 * remote.c (remote_btrace_maybe_reopen): Change error message.
9683 * btrace.c (btrace_enable): Likewise.
9684 (parse_xml_btrace): Likewise.
9685 (parse_xml_btrace_conf): Likewise.
9687 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9689 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9690 (linux_enable_pt, linux_enable_bts): Call
9691 diagnose_perf_event_open_fail.
9693 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9695 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9696 Remove parameter and change return type. Update callers. Move it.
9697 (linux_enable_bts, linux_enable_pt): Improve error message.
9698 (linux_enable_pt): Remove zero buffer size check.
9699 (linux_enable_btrace): Improve error messages. Remove NULL return
9702 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9704 * btrace.c (btrace_enable): Remove target_supports_btrace call.
9705 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9706 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9707 (linux_supports_pt, linux_supports_btrace): Remove.
9708 (linux_enable_bts): Call cpu_supports_bts.
9709 * nat/linux-btrace.h (linux_supports_btrace): Remove.
9710 * remote.c (remote_supports_btrace): Remove.
9711 (init_remote_ops): Remove remote_supports_btrace.
9712 * target-delegates.c: Regenerated.
9713 * target.c (target_supports_btrace): Remove.
9714 * target.h (target_ops) <to_supports_btrace>: Remove
9715 (target_supports_btrace): Remove.
9716 * x86-linux-nat.c (x86_linux_create_target): Remove
9717 linux_supports_btrace.
9719 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9721 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9723 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9724 exception and use message in own exception.
9726 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9728 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9729 (perf_event_pt_event_type): Use gdb_file_up.
9730 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9731 scoped_fd, and scoped_mmap.
9733 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9735 * common/scoped_mmap.h: New.
9736 * unittests/scoped_mmap-selftest.c: New.
9737 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9738 unittests/scoped_mmap-selftest.c.
9740 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9742 * common/scoped_fd.h: New.
9743 * unittests/scoped_fd-selftest.c: New.
9744 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9745 unittests/scoped_fd-selftest.c.
9747 2018-02-09 Tom Tromey <tom@tromey.com>
9749 * auto-load.c (auto_load_section_scripts): Use
9750 gdb::unique_xmalloc_ptr.
9752 2018-02-09 Tom Tromey <tom@tromey.com>
9754 * auto-load.c (execute_script_contents): Use std::string.
9756 2018-02-09 Joel Brobecker <brobecker@adacore.com>
9758 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9759 Python function, rather than a new command.
9761 2018-02-08 Tom Tromey <tom@tromey.com>
9763 * solib.c (solib_find_1): Use std::string.
9764 (solib_bfd_fopen): Use unique_xmalloc_ptr.
9766 2018-02-08 Tom Tromey <tom@tromey.com>
9768 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9770 2018-02-08 Tom Tromey <tom@tromey.com>
9772 * source.c (find_source_lines): Use gdb::def_vector.
9774 2018-02-08 Tom Tromey <tom@tromey.com>
9776 * macrocmd.c (struct temporary_macro_definition): New.
9777 (macro_define_command): Use temporary_macro_definition. Remove
9779 (free_macro_definition_ptr): Remove.
9781 2018-02-08 Tom Tromey <tom@tromey.com>
9783 * macroexp.c (maybe_expand): Use std::string.
9785 2018-02-08 Tom Tromey <tom@tromey.com>
9787 * macroexp.c (struct macro_buffer): Add initializers for some
9789 (init_buffer, init_shared_buffer, free_buffer)
9790 (free_buffer_return_text): Remove.
9791 (macro_buffer): New constructors.
9792 (~macro_buffer): New destructor.
9793 (macro_buffer::set_shared): New method.
9794 (macro_buffer::resize_buffer, macro_buffer::appendc)
9795 (macro_buffer::appendmem): Now methods, not free functions.
9796 (set_token, append_tokens_without_splicing, stringify)
9797 (macro_stringify): Update.
9798 (gather_arguments): Change return type. Remove argc_p argument,
9799 add args_ptr argument. Use std::vector.
9800 (substitute_args): Remove argc argument. Accept std::vector.
9801 (expand): Update. Use std::vector.
9802 (scan, macro_expand, macro_expand_next): Update.
9804 2018-02-08 Tom Tromey <tom@tromey.com>
9806 * symtab.c (default_collect_symbol_completion_matches_break_on):
9807 Use unique_xmalloc_ptr.
9808 * macroscope.h: (sal_macro_scope, user_macro_scope)
9809 (default_macro_scope): Return unique_xmalloc_ptr.
9810 * macroscope.c (sal_macro_scope, user_macro_scope)
9811 (default_macro_scope): Return unique_xmalloc_ptr.
9812 * macroexp.h (macro_expand, macro_expand_once): Return
9814 * macroexp.c (macro_expand, macro_expand_once): Return
9816 * macrocmd.c (macro_expand_command, macro_expand_once_command)
9817 (info_macro_command, info_macros_command): Use
9819 * compile/compile-c-support.c (write_macro_definitions): Use
9821 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9823 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
9825 * value.c (value_static_field): Assign field type instead of
9826 containing type when returning an optimized out value.
9828 2018-02-06 Yao Qi <yao.qi@linaro.org>
9830 * ft32-tdep.c (ft32_read_pc): Remove.
9831 (ft32_write_pc): Remove.
9832 (ft32_gdbarch_init): Update.
9833 * m32r-tdep.c (m32r_read_pc): Remove.
9834 (m32r_gdbarch_init): Update.
9835 * mep-tdep.c (mep_read_pc): Remove.
9836 (mep_gdbarch_init): Update.
9837 * microblaze-tdep.c (microblaze_write_pc): Remove.
9838 (microblaze_gdbarch_init): Update.
9839 * mn10300-tdep.c (mn10300_read_pc): Remove.
9840 (mn10300_write_pc): Remove.
9841 (mn10300_gdbarch_init): Update.
9842 * moxie-tdep.c (moxie_read_pc): Remove.
9843 (moxie_write_pc): Remove.
9844 (moxie_gdbarch_init): Update.
9846 2018-02-06 Yao Qi <yao.qi@linaro.org>
9848 * expprint.c (print_subexp_standard): Handle
9849 OP_F77_UNDETERMINED_ARGLIST.
9850 (dump_subexp_body_standard): Likewise.
9852 2018-02-05 Alan Hayward <alan.hayward@arm.com>
9854 * target-descriptions.c (tdesc_element_visitor) Add empty
9856 (tdesc_type): Move make_gdb_type from here.
9857 (tdesc_type_builtin): Likewise.
9858 (tdesc_type_vector): Likewise.
9859 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9860 (make_gdb_type_struct): Move from tdesc_type_with_fields.
9861 (make_gdb_type_union): Likewise.
9862 (make_gdb_type_flags): Likewise.
9863 (make_gdb_type_enum): Likewise.
9864 (make_gdb_type): New function.
9865 (tdesc_register_type): Use static make_gdb_type.
9867 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
9869 * infcmd.c (default_print_one_register_info): Align natural-format
9870 column values consistently one under another.
9871 (pad_to_column): New function.
9873 2018-02-05 Joel Brobecker <brobecker@adacore.com>
9875 * dwarf2read.c (dwarf2_physname): Move commment.
9877 2018-02-01 Leszek Swirski <leszeks@google.com>
9879 * varobj.c (varobj_formatted_print_options): Allow recursive
9880 pretty printing if pretty printing is enabled.
9882 2018-02-01 Leszek Swirski <leszeks@google.com>
9884 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9885 names after a structop as a filename.
9887 2018-02-01 Yao Qi <yao.qi@linaro.org>
9889 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9890 (arm_record_coproc_data_proc): Likewise.
9892 2018-02-01 Yao Qi <yao.qi@linaro.org>
9894 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9896 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
9898 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9899 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9901 2018-01-31 Pedro Alves <palves@redhat.com>
9903 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9904 * inflow.c (child_terminal_save_inferior): Wrap reference to
9905 tcgetpgrp in HAVE_TERMIOS_H.
9906 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9908 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9909 always iterate over all inferiors.
9910 (gdbsim_cntrl_c): Adjust.
9911 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9913 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9915 * gdbtypes.c (lookup_array_range_type): Make sure the array's
9916 index type is objfile-owned if the element type is as well.
9918 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9922 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
9924 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9925 "features/s390x-linux64.c".
9926 (_initialize_s390_linux_tdep): Remove initialization of tdescs
9927 s390_linux32 and s390x_linux64.
9928 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9930 * s390-tdep.c: Include "features/s390-linux32.c" and
9931 "features/s390x-linux64.c".
9932 (s390_tdesc_valid): Add check for tdesc_has_registers.
9933 (s390_gdbarch_init): Make sure there is always a valid tdesc.
9934 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9935 tdesc_s390x_linux64.
9936 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9937 tdesc_s390x_linux64 to...
9938 * s390-tdep.h: ...here.
9940 2018-01-30 Pedro Alves <palves@redhat.com>
9943 * config.in, configure: Regenerate.
9944 * configure.ac: Check for getpgid.
9945 * go32-nat.c (go32_pass_ctrlc): New.
9946 (go32_target): Install it.
9947 * inf-child.c (inf_child_target): Install
9948 child_terminal_save_inferior, child_pass_ctrlc and
9950 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9951 (inf_ptrace_target): No longer install it.
9952 * infcmd.c (interrupt_target_1): Adjust.
9953 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9954 (child_interrupt): Declare.
9955 (inferior::terminal_state): New.
9956 * inflow.c (struct terminal_info): Update comments.
9957 (inferior_process_group): Delete.
9958 (terminal_is_ours): Delete.
9959 (gdb_tty_state): New.
9960 (child_terminal_init): Adjust.
9961 (is_gdb_terminal, sharing_input_terminal_1)
9962 (sharing_input_terminal): New functions.
9963 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
9964 Set the process's actual process group in the foreground if
9965 possible. Handle is_ours_for_output/is_ours distinction. Don't
9966 mark terminal as the inferior's if not sharing GDB's terminal.
9967 Don't check attach_flag.
9968 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9969 pass down a target_terminal_state.
9970 (child_terminal_save_inferior): New, factored out from ...
9971 (child_terminal_ours_1): ... this. Handle
9972 target_terminal_state::is_ours_for_output.
9973 (child_interrupt, child_pass_ctrlc): New.
9974 (inflow_inferior_exit): Clear the inferior's terminal_state.
9975 (copy_terminal_info): Copy the inferior's terminal state.
9976 (_initialize_inflow): Remove reference to terminal_is_ours.
9977 * inflow.h (inferior_process_group): Delete.
9978 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9979 * procfs.c (procfs_target): Don't install procfs_interrupt.
9980 (procfs_interrupt): Delete.
9981 * remote.c (remote_serial_quit_handler): Adjust.
9982 (remote_interrupt): Remove ptid parameter. Adjust.
9983 * target-delegates.c: Regenerate.
9984 * target.c: Include "terminal.h".
9985 (target_terminal::terminal_state): Rename to ...
9986 (target_terminal::m_terminal_state): ... this.
9987 (target_terminal::init): Adjust.
9988 (target_terminal::inferior): Adjust to per-inferior
9990 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
9991 (target_terminal::ours, target_terminal::ours_for_output): Use
9992 target_terminal_is_ours_kind.
9993 (target_interrupt): Remove ptid parameter. Adjust.
9994 (default_target_pass_ctrlc): Adjust.
9995 * target.h (target_ops::to_terminal_save_inferior): New field.
9996 (target_ops::to_interrupt): Remove ptid_t parameter.
9997 (target_interrupt): Remove ptid_t parameter. Update comment.
9998 (target_pass_ctrlc): Update comment.
9999 * target/target.h (target_terminal_state): New scoped enum,
10000 factored out of ...
10001 (target_terminal::terminal_state): ... here.
10002 (target_terminal::inferior): Update comments.
10003 (target_terminal::restore_inferior): New.
10004 (target_terminal::is_inferior, target_terminal::is_ours)
10005 (target_terminal::is_ours_for_output): Adjust.
10006 (target_terminal::scoped_restore_terminal_state): Adjust to
10007 rename, and call restore_inferior() instead of inferior().
10008 (target_terminal::scoped_restore_terminal_state::m_state): Change
10010 (target_terminal::terminal_state): Rename to ...
10011 (target_terminal::m_terminal_state): ... this and change type.
10013 2018-01-30 Pedro Alves <palves@redhat.com>
10015 * linux-nat.c (wait_for_signal): New function.
10016 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10018 (async_terminal_is_ours)
10019 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10020 (linux_nat_add_target): Don't override
10021 to_terminal_inferior/to_terminal_ours.
10023 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
10025 * remote.c (remote_follow_fork): Don't call "detach_inferior".
10027 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
10029 * dwarf2read.c (free_dwo_files): Add forward-declaration.
10030 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10031 dwarf2_per_objfile_free here.
10032 (dwarf2_per_objfile_free): Remove.
10033 (_initialize_dwarf2_read): Don't register
10034 dwarf2_per_objfile_free as a registry cleanup.
10036 2018-01-27 Eli Zaretskii <eliz@gnu.org>
10038 Avoid compilation errors in MinGW native builds
10040 The error is triggered by including python-internal.h, and the
10043 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10044 from build-gnulib/import/math.h:27,
10045 from d:/usr/Python26/include/pyport.h:235,
10046 from d:/usr/Python26/include/Python.h:58,
10047 from python/python-internal.h:94,
10048 from python/py-arch.c:24:
10049 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10053 This happens because Python headers define 'hypot' to expand t
10054 '_hypot' in the Windows builds.
10055 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10056 'hypoth'. This avoids a compilation error.
10058 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10060 * MAINTAINERS (Write After Approval): Fix ordering.
10062 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10064 * MAINTAINERS (Write After Approval): Add Alan Hayward.
10066 2018-01-26 Alan Modra <amodra@gmail.com>
10068 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10069 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10070 Remove nop. Make const. Comment.
10071 (powerpc32_plt_stub_so_2): New.
10072 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10073 Correct count. Update uses.
10074 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10075 Move common code reading PLT entry word. Correct
10076 powerpc32_plt_stub PLT address calculation.
10077 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10078 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10079 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10080 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10081 (ppc64_standard_linkage8): Likewise.
10082 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10083 Correct insns description.
10084 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10086 2018-01-24 Pedro Alves <palves@redhat.com>
10088 GCC PR libstdc++/83906
10089 * gdbtypes.c (operator==(const dynamic_prop &,
10090 const dynamic_prop &)): New.
10091 (operator==(const range_bounds &, const range_bounds &)): New.
10092 (check_types_equal): Use them instead of memcmp.
10093 * gdbtypes.h (operator==(const dynamic_prop &,
10094 const dynamic_prop &)): Declare.
10095 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10096 (operator==(const range_bounds &, const range_bounds &)): Declare.
10097 (operator!=(const range_bounds &, const range_bounds &)): Declare.
10099 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10101 * s390-linux-tdep.c (s390_record_address_mask)
10102 (s390_record_calc_disp_common, s390_record_calc_disp)
10103 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10104 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10105 (s390_process_record): Move to s390-tdep.c.
10106 (s390_linux_init_abi_any): Adjust.
10107 * s390-tdep.c (s390_record_address_mask)
10108 (s390_record_calc_disp_common, s390_record_calc_disp)
10109 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10110 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10111 (s390_process_record): Moved from s390-linux-tdep.c
10112 (s390_gdbarch_init): Adjust.
10114 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10116 * s390-linux-nat.c (s390-tdep.h): New include.
10117 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10118 (HFILES_NO_SRCDIR): Add s390-tdep.h.
10119 (ALLDEPFILES): Add s390-tdep.c.
10120 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10121 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10122 * s390-tdep.h: ...this. New file.
10123 * s390-linux-tdep.c (s390-tdep.h): New include.
10124 (_initialize_s390_tdep): Rename to...
10125 (_initialize_s390_linux_tdep): ...this and adjust.
10126 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10127 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10129 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10130 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10131 (s390_is_partial_instruction, s390_software_single_step)
10132 (is_non_branch_ril, s390_displaced_step_copy_insn)
10133 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10134 (s390_prologue_data, s390_addr, s390_store, s390_load)
10135 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10136 (s390_register_call_saved, s390_guess_tracepoint_registers)
10137 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10138 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10139 (s390_pseudo_register_name, s390_pseudo_register_type)
10140 (s390_pseudo_register_read, s390_pseudo_register_write)
10141 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10142 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10143 (s390_addr_bits_remove, s390_address_class_type_flags)
10144 (s390_address_class_type_flags_to_name)
10145 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10146 (s390_function_arg_float, s390_function_arg_vector)
10147 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10148 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10149 (s390_frame_align, s390_register_return_value, s390_return_value)
10150 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10151 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10152 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10153 (s390_trad_frame_prev_register, s390_unwind_cache)
10154 (s390_prologue_frame_unwind_cache)
10155 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10156 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10157 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10158 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10159 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10160 (s390_frame_base_address, s390_local_base_address)
10161 (s390_frame_base, s390_gcc_target_options)
10162 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10163 (s390_validate_reg_range, s390_tdesc_valid)
10164 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10165 * s390-tdep.c: ...this. New file.
10167 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10169 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10170 (s390_process_record, s390_gdbarch_tdep_alloc)
10171 (s390_linux_init_abi_any): Use/set new hook.
10173 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10175 * s390-linux-tdep.c (osabi.h): New include.
10176 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10177 (s390_linux_init_abi_any): New functions.
10178 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10180 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10182 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10183 tdesc_has_registers check
10185 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10187 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10188 (s390_validate_reg_range): New macro.
10189 (s390_gdbarch_init): Adjust.
10191 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10193 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10194 (s390_gdbarch_tdep_alloc): Adjust.
10195 (s390_gdbarch_init): Adjust.
10197 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10199 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10200 <have_tdb>: Change type to bool.
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 (s390_abi_kind) <ABI_NONE>: New default field.
10207 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10208 (s390_gdbarch_tdep_alloc): New function.
10209 (s390_gdbarch_init): Allocate tdep at start and use its fields
10210 instead of separate variables.
10212 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10214 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10215 when looking for cached gdbarch and add comment for remaining.
10217 2018-01-22 Pedro Alves <palves@redhat.com>
10218 Sergio Durigan Junior <sergiodj@redhat.com>
10220 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10223 2018-01-22 Maciej W. Rozycki <macro@mips.com>
10225 * MAINTAINERS: Update my company e-mail address.
10227 2018-01-22 Yao Qi <yao.qi@linaro.org>
10229 * regcache.c (cooked_write_test): New function.
10230 (_initialize_regcache): Register the test.
10232 2018-01-22 Yao Qi <yao.qi@linaro.org>
10234 * ia64-tdep.c (ia64_pseudo_register_read): Call
10235 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10236 * m32c-tdep.c (m32c_cat_read): Likewise.
10237 (m32c_r3r2r1r0_read): Likewise.
10238 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10239 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10241 2018-01-22 Yao Qi <yao.qi@linaro.org>
10243 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10244 method raw_read instead of regcache_raw_read.
10245 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10246 * arm-tdep.c (arm_neon_quad_read): Likewise.
10247 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10248 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10249 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10250 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10251 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10252 (i386_pseudo_register_read_into_value): Likewise.
10253 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10254 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10255 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10256 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10257 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10258 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10259 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10260 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10261 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10263 2018-01-22 Yao Qi <yao.qi@linaro.org>
10265 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10266 * configure.tgt: Remove target mt.
10267 * mt-tdep.c: Remove.
10268 * regcache.c (cooked_read_test): Remove the check for mt.
10270 2018-01-22 Yao Qi <yao.qi@linaro.org>
10272 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10273 instead of gdbarch_pseudo_register_read_value.
10275 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10277 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10280 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10282 * linespec.c (create_sals_line_offset): Remove code that preserved
10283 the symtab_and_line's line number.
10285 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10287 * varobj.c (varobj_create): Don't set valid_block when creating a
10290 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10292 * varobj.c (varobj_create): Remove out of date comment.
10294 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10297 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10298 updating innermost block.
10299 * parse.c (innermost_block_tracker::update): Take extra type
10300 parameter, and check types match before updating innermost block.
10301 (write_dollar_variable): Update innermost block for registers.
10302 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10303 (innermost_block_tracker::innermost_block_tracker): Initialise
10305 (innermost_block_tracker::reset): Take type parameter.
10306 (innermost_block_tracker::update): Take type parameter, and pass
10307 type through as needed.
10308 (innermost_block_tracker::m_types): New member.
10309 * varobj.c (varobj_create): Pass type when reseting innermost
10312 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10314 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10315 * ada-lang.c (resolve_subexp): Likewise.
10316 * breakpoint.c (set_breakpoint_condition) Likewise.
10317 (watch_command_1) Likewise.
10318 * c-exp.y (variable): Likewise.
10319 * d-exp.y (PrimaryExpression): Likewise.
10320 * f-exp.y (variable): Likewise.
10321 * go-exp.y (variable): Likewise.
10322 * m2-exp.y (variable): Likewise.
10323 * objfiles.c (objfile::~objfile): Likewise.
10324 * p-exp.y (variable): Likewise.
10325 * parse.c (innermost_block): Change type.
10326 * parser-defs.h (class innermost_block_tracker): New.
10327 (innermost_block): Change to innermost_block_tracker.
10328 * printcmd.c (display_command): Switch to innermost_block API.
10329 (do_one_display): Likewise.
10330 * rust-exp.y (do_one_display): Likewise.
10331 * symfile.c (clear_symtab_users): Likewise.
10332 * varobj.c (varobj_create): Switch to innermost_block API, replace
10333 use of innermost_block with block stored on varobj object.
10335 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10337 * expression.h (innermost_block): Remove declaration.
10338 * varobj.c: Add 'parser-defs.h' include.
10340 2018-01-19 Tom Tromey <tom@tromey.com>
10342 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10343 symbols in the static and global blocks.
10345 2018-01-19 James Clarke <jrtc27@jrtc27.com>
10347 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10348 gdb_ptrace.h, and move including gdb_wait.h ...
10349 * nat/linux-ptrace.h: ... to here.
10351 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10353 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10354 inf_ptrace_detach_success.
10355 (inf_ptrace_detach_success): Add inferior parameter, use it
10356 instead of inferior_ptid, pass it to detach_inferior.
10357 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10359 * inferior.c (detach_inferior): Add overload that takes an
10361 * inferior.h (detach_inferior): Likewise.
10362 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10363 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10364 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10366 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10368 * target.h (struct target_ops) <to_detach>: Add inferior
10370 (target_detach): Likewise.
10371 * target.c (dispose_inferior): Pass inferior down.
10372 (target_detach): Pass inferior down. Assert that it is equal to
10373 the current inferior.
10374 * aix-thread.c (aix_thread_detach): Pass inferior down.
10375 * corefile.c (core_file_command): Pass current_inferior() down.
10376 * corelow.c (core_detach): Add inferior parameter.
10377 * darwin-nat.c (darwin_detach): Likewise.
10378 * gnu-nat.c (gnu_detach): Likewise.
10379 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10380 * infcmd.c (detach_command): Pass current_inferior() down to
10382 * infrun.c (follow_fork_inferior): Pass parent_inf to
10384 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10386 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10387 * linux-thread-db.c (thread_db_detach): Likewise.
10388 * nto-procfs.c (procfs_detach): Likewise.
10389 * procfs.c (procfs_detach): Likewise.
10390 * record.c (record_detach): Likewise.
10391 * record.h (struct inferior): Forward-declare.
10392 (record_detach): Add inferior parameter.
10393 * remote-sim.c (gdbsim_detach): Likewise.
10394 * remote.c (remote_detach_1): Likewise.
10395 (remote_detach): Likewise.
10396 (extended_remote_detach): Likewise.
10397 * sol-thread.c (sol_thread_detach): Likewise.
10398 * target-debug.h (target_debug_print_inferior_p): New macro.
10399 * target-delegates.c: Re-generate.
10400 * top.c (kill_or_detach): Pass inferior down to target_detach.
10401 * windows-nat.c (windows_detach): Add inferior parameter.
10403 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10405 * target.h (struct target_ops) <to_detach>: Remove args
10407 (target_detach): Likewise.
10408 * target.c (dispose_inferior): Adjust.
10409 (target_detach): Remove args parameter, adjust.
10410 * aix-thread.c (aix_thread_detach): Adjust.
10411 * corefile.c (core_file_command): Adjust.
10412 * corelow.c (core_detach): Adjust.
10413 * darwin-nat.c (darwin_detach): Adjust.
10414 * gnu-nat.c (gnu_detach): Adjust.
10415 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10416 * infcmd.c (detach_command): Adjust
10417 * infrun.c (follow_fork_inferior): Adjust.
10418 (handle_vfork_child_exec_or_exit): Adjust.
10419 * linux-fork.c (linux_fork_detach): Remove args parameter.
10420 * linux-fork.h (linux_fork_detach): Likewise.
10421 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10422 * linux-thread-db.c (thread_db_detach): Likewise.
10423 * nto-procfs.c (procfs_detach): Likewise.
10424 * procfs.c (procfs_detach): Likewise.
10425 (do_detach): Remove signo parameter.
10426 * record.c (record_detach): Remove args parameter.
10427 * record.h (record_detach): Likewise.
10428 * remote-sim.c (gdbsim_detach): Likewise.
10429 * remote.c (remote_detach_1): Likewise.
10430 (remote_detach): Likewise.
10431 (extended_remote_detach): Likewise.
10432 * sol-thread.c (sol_thread_detach): Likewise.
10433 * target-delegates.c: Re-generate.
10434 * top.c (struct qt_args) <args>: Remove field.
10435 (kill_or_detach): Don't pass args.
10436 (quit_force): Don't set args.
10437 * windows-nat.c (windows_detach): Remove args parameter.
10439 2018-01-19 Yao Qi <yao.qi@linaro.org>
10441 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10442 (arm_linux_init_abi): Install it.
10444 2018-01-19 Yao Qi <yao.qi@linaro.org>
10446 * osabi.c (gdb_osabi_names): Extend the regexp for
10447 arm-linux-gnueabihf.
10449 2018-01-18 Yao Qi <yao.qi@linaro.org>
10451 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10453 (abbrev_table::add_abbrev): Update.
10454 (abbrev_table::lookup_abbrev): Update.
10456 2018-01-18 Yao Qi <yao.qi@linaro.org>
10458 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10460 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10462 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10465 2018-01-17 Tom Tromey <tom@tromey.com>
10467 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10469 2018-01-17 Tom Tromey <tom@tromey.com>
10471 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10472 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10473 (create_array_type_with_stride): Update.
10474 * dwarf2read.c (set_die_type): Update.
10476 2018-01-17 Tom Tromey <tom@tromey.com>
10478 * dwarf2read.c (delayed_method_info): Remove typedef.
10479 (dwarf2_cu::method_info): Now a std::vector.
10480 (add_to_method_list): Update.
10481 (free_delayed_list): Remove.
10482 (compute_delayed_physnames): Update.
10483 (process_full_comp_unit, process_full_type_unit): Clear the method
10484 list. Remove cleanups.
10485 (psymtab_include_file_name): Add name_holder parameter. Use
10486 unique_xmalloc_ptr.
10487 (dwarf_decode_lines): Update.
10489 2018-01-17 Tom Tromey <tom@tromey.com>
10490 Simon Marchi <simon.marchi@ericsson.com>
10492 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10493 (dwarf2_per_objfile::free_cached_comp_units)
10494 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10495 (init_cutu_and_read_dies_no_follow): Update.
10496 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10497 (dwarf2_cu::~dwarf2_cu): New.
10498 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10499 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10501 2018-01-17 Tom Tromey <tom@tromey.com>
10502 Simon Marchi <simon.marchi@ericsson.com>
10504 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10505 (struct die_reader_specs) <abbrev_table>: New member.
10506 (struct abbrev_table): Add constructor.
10507 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10508 <abbrev_obstack>: Now an auto_obstack.
10509 (abbrev_table_up): New typedef.
10510 (init_cu_die_reader): Add abbrev_table parameter.
10511 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10512 Add result_dwo_abbrev_table.
10513 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10514 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10516 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10518 (skip_children): Update.
10519 (abbrev_table::alloc_abbrev): Rename from
10520 abbrev_table_alloc_abbrev.
10521 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10522 (abbrev_table::lookup_abbrev): Rename from
10523 abbrev_table_lookup_abbrev.
10524 (abbrev_table_read_table): Return abbrev_table_up.
10525 (abbrev_table_free, abbrev_table_free_cleanup)
10526 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10527 (load_partial_dies): Update.
10529 2018-01-17 Tom Tromey <tom@tromey.com>
10531 * dwarf2read.c (dwarf2_compute_name): Update comment.
10532 (read_func_scope, read_variable): Update.
10533 (new_symbol): Remove.
10534 (new_symbol_full): Rename to new_symbol.
10536 2018-01-17 Mike Gulick <mgulick@mathworks.com>
10539 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10540 a warning instead of throwing an error, set section size to 0 and return
10542 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10544 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10546 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10548 (linux_ptrace_attach_fail_reason_string): Likewise.
10549 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10551 (linux_ptrace_attach_fail_reason_string): Likewise.
10552 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10554 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10556 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10558 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10561 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10562 checking for fs_base/gs_base fields in struct user_regs_struct.
10563 * configure: Regenerate.
10565 2018-01-17 Yao Qi <yao.qi@linaro.org>
10567 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10569 (aarch64_linux_init_abi): Install it to gdbarch hook
10570 gcc_target_options.
10572 2018-01-15 Pedro Alves <palves@redhat.com>
10574 * common/signals-state-save-restore.c
10575 (save_original_signals_state): Fix typos.
10577 2017-01-12 Tom Tromey <tom@tromey.com>
10578 Sergio Durigan Junior <sergiodj@redhat.com>
10580 * Makefile.in (install-only): Install gdb-add-index.
10582 2018-01-12 John Baldwin <jhb@FreeBSD.org>
10584 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10586 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10588 * infrun.c (keep_going_pass_signal): Clear step-over info when
10589 insert_breakpoints fails.
10591 2018-01-11 Pedro Alves <palves@redhat.com>
10594 * infrun.c (resume): Rename to ...
10595 (resume_1): ... this.
10596 (resume): Reimplement as wrapper around resume_1.
10598 2018-01-11 Pedro Alves <palves@redhat.com>
10601 * remote.c (remote_parse_stop_reply): Default to the last-set
10602 general thread instead of to 'magic_null_ptid'.
10604 2018-01-10 Pedro Alves <palves@redhat.com>
10606 * language.h (language_get_symbol_name_matcher): Rename ...
10607 (get_symbol_name_matcher): ... this.
10608 * language.c (language_get_symbol_name_matcher): Ditto.
10609 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10612 2018-01-10 Pedro Alves <palves@redhat.com>
10616 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10617 Adjust to use language_get_symbol_name_matcher instead of
10618 language_defn::la_get_symbol_name_matcher.
10619 * language.c (language_get_symbol_name_matcher): If in Ada mode
10620 and the lookup name is a verbatim match, return Ada's matcher.
10621 * language.h (language_get_symbol_name_matcher): Adjust comment.
10622 (ada_lookup_name_info::verbatim_p):: New method.
10624 2018-01-10 Pedro Alves <palves@redhat.com>
10627 * ada-lang.c (ada_collect_symbol_completion_matches): If the
10628 minsym's language is language_auto or language_cplus, pass down
10629 language_ada instead.
10630 * symtab.c (compare_symbol_name): Don't frob symbol language here.
10632 2018-01-10 Pedro Alves <palves@redhat.com>
10635 * minsyms.c (linkage_name_str): New function.
10636 (iterate_over_minimal_symbols): Use it.
10638 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10640 * NEWS: Document that 'info proc' now works on FreeBSD.
10642 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10644 * configure.ac: Check for kinfo_getfile in libutil.
10645 * configure: Regenerate.
10646 * config.in: Regenerate.
10647 * fbsd-nat.c: Include "fbsd-tdep.h".
10648 (fbsd_fetch_cmdline): New.
10649 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10650 rather than calling error.
10651 (fbsd_info_proc): New.
10652 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10653 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10654 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10656 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10658 * fbsd-nat.c (struct free_deleter): Remove.
10659 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10661 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10663 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10664 NULL for an empty pathname.
10666 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10668 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10669 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10670 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10671 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10672 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10673 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10674 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10675 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10676 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10677 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10678 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10679 (fbsd_core_fetch_timeval, fbsd_print_sigset)
10680 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10681 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
10682 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10684 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
10686 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10687 (gnu_xfer_auxv): New function.
10688 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10689 TARGET_OBJECT_AUXV.
10691 2018-01-08 Yao Qi <yao.qi@linaro.org>
10692 Simon Marchi <simon.marchi@ericsson.com>
10694 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10696 (COMMON_OBS): Remove selftest.o.
10697 * configure.ac: Append selftest-arch.c and common/selftest.c to
10698 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
10699 * configure: Re-generated.
10700 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10702 (maintenance_info_selftests): Likewise.
10704 2018-01-08 Xavier Roirand <roirand@adacore.com>
10706 * ada-valprint.c (val_print_packed_array_elements): Use
10707 proper number of elements when printing an array indexed
10708 by an enumeration type.
10710 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10712 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10713 (dw2_get_file_names_reader): Adjust.
10714 (lookup_dwo_signatured_type): Adjust.
10715 (lookup_dwp_signatured_type): Adjust.
10716 (lookup_signatured_type): Adjust.
10717 (create_type_unit_group): Adjust.
10718 (get_type_unit_group): Adjust.
10719 (process_psymtab_comp_unit_reader): Adjust.
10720 (build_type_psymtabs_reader): Adjust.
10721 (scan_partial_symbols): Adjust.
10722 (add_partial_symbol): Adjust.
10723 (add_partial_subprogram): Adjust.
10724 (peek_die_abbrev): Adjust.
10725 (fixup_go_packaging): Adjust.
10726 (process_imported_unit_die): Adjust.
10727 (dwarf2_compute_name): Adjust.
10728 (dwarf2_physname): Adjust.
10729 (read_import_statement): Adjust.
10730 (handle_DW_AT_stmt_list): Adjust.
10731 (read_file_scope): Adjust.
10732 (read_func_scope): Adjust.
10733 (read_lexical_block_scope): Adjust.
10734 (read_call_site_scope): Adjust.
10735 (read_variable): Adjust.
10736 (dwarf2_rnglists_process): Adjust.
10737 (dwarf2_ranges_process): Adjust.
10738 (dwarf2_ranges_read): Adjust.
10739 (dwarf2_get_pc_bounds): Adjust.
10740 (dwarf2_record_block_ranges): Adjust.
10741 (dwarf2_add_field): Adjust.
10742 (dwarf2_add_member_fn): Adjust.
10743 (read_structure_type): Adjust.
10744 (process_structure_scope): Adjust.
10745 (read_enumeration_type): Adjust.
10746 (read_array_type): Adjust.
10747 (mark_common_block_symbol_computed): Adjust.
10748 (read_common_block): Adjust.
10749 (read_namespace_type): Adjust.
10750 (read_namespace): Adjust.
10751 (read_module_type): Adjust.
10752 (read_tag_pointer_type): Adjust.
10753 (read_tag_ptr_to_member_type): Adjust.
10754 (read_tag_string_type): Adjust.
10755 (read_subroutine_type): Adjust.
10756 (read_typedef): Adjust.
10757 (read_base_type): Adjust.
10758 (attr_to_dynamic_prop): Adjust.
10759 (read_subrange_type): Adjust.
10760 (read_unspecified_type): Adjust.
10761 (dwarf2_read_abbrevs): Adjust.
10762 (load_partial_dies): Adjust.
10763 (read_partial_die): Adjust.
10764 (find_partial_die): Adjust.
10765 (guess_partial_die_structure_name): Adjust.
10766 (fixup_partial_die): Adjust.
10767 (read_attribute_value): Adjust.
10768 (read_addr_index): Adjust.
10769 (read_addr_index_from_leb128): Adjust.
10770 (read_str_index): Adjust.
10771 (dwarf2_string_attr): Adjust.
10772 (get_debug_line_section): Adjust.
10773 (dwarf_decode_line_header): Adjust.
10774 (lnp_state_machine::check_line_address): Adjust.
10775 (dwarf_decode_lines_1): Adjust.
10776 (dwarf_decode_lines): Adjust.
10777 (dwarf2_start_symtab): Adjust.
10778 (var_decode_location): Adjust.
10779 (new_symbol_full): Adjust.
10780 (dwarf2_const_value_data): Adjust.
10781 (dwarf2_const_value_attr): Adjust.
10782 (dwarf2_const_value): Adjust.
10783 (die_type): Adjust.
10784 (die_containing_type): Adjust.
10785 (build_error_marker_type): Adjust.
10786 (lookup_die_type): Adjust.
10787 (guess_full_die_structure_name): Adjust.
10788 (anonymous_struct_prefix): Adjust.
10789 (determine_prefix): Adjust.
10790 (dwarf2_name): Adjust.
10791 (follow_die_ref_or_sig): Adjust.
10792 (follow_die_offset): Adjust.
10793 (follow_die_ref): Adjust.
10794 (follow_die_sig_1): Adjust.
10795 (follow_die_sig): Adjust.
10796 (get_signatured_type): Adjust.
10797 (get_DW_AT_signature_type): Adjust.
10798 (decode_locdesc): Adjust.
10799 (dwarf_decode_macros): Adjust.
10800 (cu_debug_loc_section): Adjust.
10801 (fill_in_loclist_baton): Adjust.
10802 (dwarf2_symbol_mark_computed): Adjust.
10803 (init_one_comp_unit): Don't assign
10804 dwarf2_cu::dwarf2_per_objfile.
10805 (set_die_type): Adjust.
10807 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10809 * dwarf2read.c (struct mapped_debug_names): Add constructor.
10810 <dwarf2_per_objfile>: New field.
10811 (dwarf2_per_objfile): Remove global.
10812 (get_dwarf2_per_objfile): New function.
10813 (set_dwarf2_per_objfile): New function.
10814 (dwarf2_build_psymtabs_hard): Change objfile parameter to
10815 dwarf2_per_objfile.
10816 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10817 (read_abbrev_offset): Likewise.
10818 (read_indirect_string): Likewise.
10819 (read_indirect_line_string): Likewise.
10820 (read_indirect_string_at_offset): Likewise.
10821 (read_indirect_string_from_dwz): Likewise.
10822 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10823 dwarf2_per_objfile.
10824 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10825 (create_all_comp_units): Change objfile parameter to
10826 dwarf2_per_objfile.
10827 (create_all_type_units): Likewise.
10828 (process_queue): Add dwarf2_per_objfile parameter.
10829 (read_and_check_comp_unit_head): Likewise.
10830 (lookup_dwo_unit_in_dwp): Likewise.
10831 (get_dwp_file): Likewise.
10832 (process_cu_includes): Likewise.
10833 (struct free_dwo_file_cleanup_data): New struct.
10834 (dwarf2_has_info): Use get_dwarf2_per_objfile and
10835 set_dwarf2_per_objfile.
10836 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10837 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10838 context, adjust calls.
10839 (dw2_instantiate_symtab): Likewise.
10840 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10841 (dw2_get_cu): Likewise.
10842 (create_cu_from_index_list): Change objfile parameter to
10843 dwarf2_per_objfile.
10844 (create_cus_from_index_list): Get dwarf2_per_objfile from
10845 context, adjust calls.
10846 (create_cus_from_index): Likewise.
10847 (create_signatured_type_table_from_index): Change objfile
10848 parameter to dwarf2_per_objfile.
10849 (create_signatured_type_table_from_debug_names): Change objfile
10850 parameter to dwarf2_per_objfile.
10851 (create_addrmap_from_index): Likewise.
10852 (create_addrmap_from_aranges): Likewise.
10853 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10854 (dw2_setup): Remove.
10855 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10857 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10858 get_dwarf2_per_objfile.
10859 (dw2_forget_cached_source_info): Likewise.
10860 (dw2_map_symtabs_matching_filename): Likewise.
10861 (struct dw2_symtab_iterator) <index>: Remove.
10862 <dwarf2_per_objfile>: New field.
10863 (dw2_symtab_iter_init): Replace index parameter with
10864 dwarf2_per_objfile.
10865 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10866 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10867 (dw2_print_stats): Likewise.
10868 (dw2_dump): Likewise.
10869 (dw2_expand_symtabs_for_function): Likewise.
10870 (dw2_expand_all_symtabs): Likewise.
10871 (dw2_expand_symtabs_with_fullname): Likewise.
10872 (dw2_expand_marked_cus): Replace index and objfile parameters
10873 with dwarf2_per_objfile.
10874 (dw_expand_symtabs_matching_file_matcher): Add
10875 dwarf2_per_objfile parameter and adjust calls.
10876 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10878 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10879 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10881 (create_cus_from_debug_names_list): Replace objfile parameter
10882 with dwarf2_per_objfile and adjust calls.
10883 (create_cus_from_debug_names): Likewise.
10884 (dwarf2_read_debug_names): Likewise.
10885 (mapped_debug_names::namei_to_name): Adjust call.
10886 (dw2_debug_names_iterator::next): Likewise.
10887 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10888 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10889 (dw2_debug_names_dump): Likewise.
10890 (dw2_debug_names_expand_symtabs_for_function): Likewise.
10891 (dw2_debug_names_expand_symtabs_matching): Likewise.
10892 (dwarf2_initialize_objfile): Likewise.
10893 (dwarf2_build_psymtabs): Likewise.
10894 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10896 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10897 (read_and_check_comp_unit_head): Likewise.
10898 (read_abbrev_offset): Likewise.
10899 (create_debug_type_hash_table): Likewise.
10900 (create_debug_types_hash_table): Likewise.
10901 (create_all_type_units): Replace objfile parameter with
10902 dwarf2_per_objfile.
10903 (add_type_unit): Add dwarf2_per_objfile parameter.
10904 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10905 with dwarf2_per_objfile.
10906 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10907 (lookup_dwp_signatured_type): Likewise.
10908 (lookup_signatured_type): Likewise.
10909 (read_cutu_die_from_dwo): Likewise.
10910 (init_tu_and_read_dwo_dies): Likewise.
10911 (init_cutu_and_read_dies): Likewise.
10912 (init_cutu_and_read_dies_no_follow): Likewise.
10913 (allocate_type_unit_groups_table): Add objfile parameter.
10914 (create_type_unit_group): Use dwarf2_per_objfile from cu.
10915 (get_type_unit_group): Likewise.
10916 (process_psymtab_comp_unit): Update call.
10917 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10918 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10919 (print_tu_stats): Likewise.
10920 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10921 in void* parameter.
10922 (build_type_psymtabs): Change objfile parameter to
10923 dwarf2_per_objfile.
10924 (process_skeletonless_type_unit): Use dwarf2_per_objfile
10925 passed in void* parameter.
10926 (process_skeletonless_type_units): Change objfile parameter to
10927 dwarf2_per_objfile.
10928 (set_partial_user): Likewise.
10929 (dwarf2_build_psymtabs_hard): Likewise.
10930 (read_comp_units_from_section): Likewise.
10931 (create_all_comp_units): Likewise.
10932 (scan_partial_symbols): Update calls.
10933 (add_partial_symbol): Likewise.
10934 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10935 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10936 (process_queue): Add dwarf2_per_objfile parameter.
10937 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10938 (compute_compunit_symtab_includes): Likewise.
10939 (process_cu_includes): Add dwarf2_per_objfile parameter.
10940 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10941 (process_full_type_unit): Likewise.
10942 (process_imported_unit_die): Update call.
10943 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10944 (read_file_scope): Likewise.
10945 (allocate_dwo_file_hash_table): Add objfile parameter.
10946 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10947 (create_cus_hash_table): Likewise.
10948 (create_dwp_hash_table): Likewise.
10949 (create_dwo_unit_in_dwp_v1): Likewise.
10950 (create_dwp_v2_section): Likewise.
10951 (create_dwo_unit_in_dwp_v2): Likewise.
10952 (lookup_dwo_unit_in_dwp): Likewise.
10953 (try_open_dwop_file): Likewise.
10954 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10955 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10956 cleanup to include a reference to dwarf2_per_objfile.
10957 (open_dwp_file): Add dwarf2_per_objfile parameter.
10958 (open_and_init_dwp_file): Likewise.
10959 (get_dwp_file): Likewise.
10960 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10961 (queue_and_load_all_dwo_tus): Update call.
10962 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10964 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10965 (dwarf2_ranges_process): Likewise.
10966 (dwarf2_get_pc_bounds): Likewise.
10967 (mark_common_block_symbol_computed): Likewise.
10968 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10969 (dwarf2_read_abbrevs): Update call.
10970 (read_partial_die): Use dwarf2_per_objfile from cu.
10971 (find_partial_die): Likewise.
10972 (fixup_partial_die): Likewise.
10973 (read_attribute_value): Likewise.
10974 (read_indirect_string_at_offset_from): Add objfile parameter.
10975 (read_indirect_string_at_offset): Add dwarf2_per_objfile
10977 (read_indirect_string_from_dwz): Add objfile parameter.
10978 (read_indirect_string): Add objfile parameter.
10979 (read_addr_index_1): Add dwarf2_per_objfile parameter.
10980 (read_addr_index): Use dwarf2_per_objfile from cu.
10981 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10983 (read_str_index): Use dwarf2_per_objfile from cu.
10984 (get_debug_line_section): Likewise.
10985 (read_formatted_entries): Add dwarf2_per_objfile parameter.
10986 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
10987 (new_symbol_full): Use dwarf2_per_objfile from cu.
10988 (build_error_marker_type): Likewise.
10989 (lookup_die_type): Likewise.
10990 (determine_prefix): Likewise.
10991 (follow_die_offset): Likewise.
10992 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
10993 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
10994 (dwarf2_fetch_die_type_sect_off): Likewise.
10995 (dwarf2_get_die_type): Likewise.
10996 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
10997 (get_signatured_type): Likewise.
10998 (get_DW_AT_signature_type): Likewise.
10999 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11000 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11001 (cu_debug_loc_section): Likewise.
11002 (fill_in_loclist_baton): Likewise.
11003 (dwarf2_symbol_mark_computed): Likewise.
11004 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11005 dwarf2_per_objfile.
11006 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11008 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11009 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11010 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11011 (set_die_type): Use dwarf2_free_objfile from cu.
11012 (get_die_type_at_offset): Likewise.
11013 (dwarf2_per_objfile_free): Don't assign global variable.
11014 (debug_names) <constructor>: Add dwarf2_per_objfile
11015 parameter, update m_debugstrlookup construction.
11016 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11018 <m_dwarf2_per_objfile>: New field.
11019 <lookup>: Use m_dwarf2_per_objfile.
11020 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11021 (psyms_seen_size): Likewise.
11022 (write_gdbindex): Replace objfile parameter with
11023 dwarf2_per_objfile.
11024 (write_debug_names): Likewise.
11025 (write_psymtabs_to_index): Likewise.
11026 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11029 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11031 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11032 <dwarf2_per_objfile>: New field.
11033 (struct dwarf2_per_cu_data) <objfile>: Remove.
11034 <dwarf2_per_objfile>: New field.
11035 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11037 (create_signatured_type_table_from_index): Likewise.
11038 (create_debug_type_hash_table): Likewise.
11039 (fill_in_sig_entry_from_dwo_entry): Likewise.
11040 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11041 (create_type_unit_group): Assign dwarf2_per_objfile instead of
11043 (create_partial_symtab): Access objfile through
11044 dwarf2_per_objfile.
11045 (process_psymtab_comp_unit_reader): Likewise.
11046 (read_comp_units_from_section): Likewise.
11047 (scan_partial_symbols): Likewise.
11048 (add_partial_symbol): Likewise.
11049 (add_partial_subprogram): Likewise.
11050 (peek_die_abbrev): Likewise.
11051 (fixup_go_packaging): Likewise.
11052 (process_full_comp_unit): Likewise.
11053 (process_full_type_unit): Likewise.
11054 (process_imported_unit_die): Likewise.
11055 (dwarf2_compute_name): Likewise.
11056 (dwarf2_physname): Likewise.
11057 (read_import_statement): Likewise.
11058 (create_cus_hash_table): Assign dwarf2_physname instead of
11060 (read_func_scope): Access objfile through dwarf2_per_objfile.
11061 (read_lexical_block_scope): Likewise.
11062 (read_call_site_scope): Likewise.
11063 (read_variable): Likewise.
11064 (dwarf2_rnglists_process): Likewise.
11065 (dwarf2_ranges_process): Likewise.
11066 (dwarf2_ranges_read): Likewise.
11067 (dwarf2_record_block_ranges): Likewise.
11068 (dwarf2_add_field): Likewise.
11069 (dwarf2_add_member_fn): Likewise.
11070 (read_structure_type): Likewise.
11071 (process_structure_scope): Likewise.
11072 (read_enumeration_type): Likewise.
11073 (read_array_type): Likewise.
11074 (read_common_block): Likewise.
11075 (read_namespace_type): Likewise.
11076 (read_namespace): Likewise.
11077 (read_module_type): Likewise.
11078 (read_tag_pointer_type): Likewise.
11079 (read_tag_ptr_to_member_type): Likewise.
11080 (read_tag_string_type): Likewise.
11081 (read_subroutine_type): Likewise.
11082 (read_typedef): Likewise.
11083 (read_base_type): Likewise.
11084 (attr_to_dynamic_prop): Likewise.
11085 (read_subrange_type): Likewise.
11086 (read_unspecified_type): Likewise.
11087 (load_partial_dies): Likewise.
11088 (read_partial_die): Likewise.
11089 (find_partial_die): Likewise.
11090 (guess_partial_die_structure_name): Likewise.
11091 (fixup_partial_die): Likewise.
11092 (read_attribute_value): Likewise.
11093 (read_addr_index_from_leb128): Likewise.
11094 (dwarf2_read_addr_index): Likewise.
11095 (dwarf2_string_attr): Likewise.
11096 (lnp_state_machine::check_line_address): Likewise.
11097 (dwarf_decode_lines_1): Likewise.
11098 (dwarf_decode_lines): Likewise.
11099 (dwarf2_start_symtab): Likewise.
11100 (var_decode_location): Likewise.
11101 (new_symbol_full): Likewise.
11102 (dwarf2_const_value_data): Likewise.
11103 (dwarf2_const_value_attr): Likewise.
11104 (dwarf2_const_value): Likewise.
11105 (die_type): Likewise.
11106 (die_containing_type): Likewise.
11107 (lookup_die_type): Likewise.
11108 (guess_full_die_structure_name): Likewise.
11109 (anonymous_struct_prefix): Likewise.
11110 (dwarf2_name): Likewise.
11111 (follow_die_ref_or_sig): Likewise.
11112 (follow_die_offset): Likewise.
11113 (follow_die_ref): Likewise.
11114 (dwarf2_fetch_die_loc_sect_off): Likewise.
11115 (dwarf2_fetch_constant_bytes): Likewise.
11116 (dwarf2_fetch_die_type_sect_off): Likewise.
11117 (dwarf2_get_die_type): Likewise.
11118 (follow_die_sig): Likewise.
11119 (decode_locdesc): Likewise.
11120 (dwarf2_per_cu_objfile): Likewise.
11121 (dwarf2_per_cu_text_offset): Likewise.
11122 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11124 (set_die_type): Access objfile through
11125 dwarf2_per_objfile.
11127 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11129 * valprint.c (converted_character_d): Remove typedef.
11130 (DEF_VEC_O (converted_character_d)): Remove.
11131 (count_next_character): Use std::vector.
11132 (print_converted_chars_to_obstack): Likewise.
11133 (generic_printstr): Likewise.
11135 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11137 * xml-support.h (struct gdb_xml_value): Add constructor.
11138 <value>: Change type to unique_xmalloc_ptr.
11139 (gdb_xml_value_s): Remove typedef.
11140 (DEF_VEC_O (gdb_xml_value_s)): Remove.
11141 (gdb_xml_element_start_handler): Change parameter type to
11143 (xml_find_attribute): Likewise.
11144 * xml-support.c (xml_find_attribute): Change parameter type to
11145 std::vector and adjust.
11146 (gdb_xml_values_cleanup): Remove.
11147 (gdb_xml_parser::start_element): Adjust to std::vector.
11148 (xinclude_start_include): Change paraeter type to std::vector
11150 * btrace.c (check_xml_btrace_version): Likewise.
11151 (parse_xml_btrace_block): Likewise.
11152 (parse_xml_btrace_pt_config_cpu): Likewise.
11153 (parse_xml_btrace_pt): Likewise.
11154 (parse_xml_btrace_conf_bts): Likewise.
11155 (parse_xml_btrace_conf_pt): Likewise.
11156 * memory-map.c (memory_map_start_memory): Likewise.
11157 (memory_map_start_property): Likewise.
11158 * osdata.c (osdata_start_osdata): Likewise.
11159 (osdata_start_item): Likewise.
11160 (osdata_start_column): Likewise.
11161 * remote.c (start_thread): Likewise.
11162 * solib-aix.c (library_list_start_library): Likewise.
11163 (library_list_start_list): Likewise.
11164 * solib-svr4.c (library_list_start_library): Likewise.
11165 (svr4_library_list_start_list): Likewise.
11166 * solib-target.c (library_list_start_segment): Likewise.
11167 (library_list_start_section): Likewise.
11168 (library_list_start_library): Likewise.
11169 (library_list_start_list): Likewise.
11170 * tracepoint.c (traceframe_info_start_memory): Likewise.
11171 (traceframe_info_start_tvar): Likewise.
11172 * xml-syscall.c (syscall_start_syscall): Likewise.
11173 * xml-tdesc.c (tdesc_start_target): Likewise.
11174 (tdesc_start_feature): Likewise.
11175 (tdesc_start_reg): Likewise.
11176 (tdesc_start_union): Likewise.
11177 (tdesc_start_struct): Likewise.
11178 (tdesc_start_flags): Likewise.
11179 (tdesc_start_enum): Likewise.
11180 (tdesc_start_field): Likewise.
11181 (tdesc_start_enum_value): Likewise.
11182 (tdesc_start_vector): Likewise.
11184 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11186 * extension.h (struct xmethod_worker) <clone>: Remove.
11187 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11189 (python_xmethod_worker::clone): Remove.
11190 * valops.c (find_overload_match): Use std::move instead of
11193 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11195 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11196 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11197 <free_xmethod_worker_data>: Remove.
11198 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11199 <get_xmethod_arg_types>: Remove.
11200 <get_xmethod_result_type>: Remove.
11201 <invoke_xmethod>: Remove.
11202 * extension.c (new_xmethod_worker): Remove.
11203 (clone_xmethod_worker): Remove.
11204 (get_matching_xmethod_workers): Return void, pass std::vector by
11206 (get_xmethod_arg_types): Rename to...
11207 (xmethod_worker::get_arg_types): ... this, and adjust.
11208 (get_xmethod_result_type): Rename to...
11209 (xmethod_worker::get_result_type): ... this, and adjust.
11210 (invoke_xmethod): Remove.
11211 (free_xmethod_worker): Remove.
11212 (free_xmethod_worker_vec): Remove.
11213 * extension.h (enum ext_lang_rc): Move here from
11215 (struct xmethod_worker): Add constructor and destructor.
11218 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11219 virtual pure methods.
11220 <get_arg_types, get_result_type>: New methods.
11221 (xmethod_worker_ptr): Remove typedef.
11222 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11223 (xmethod_worker_vec): Remove typedef.
11224 (xmethod_worker_up): New typedef.
11225 (invoke_xmethod): Remove.
11226 (clone_xmethod_worker): Remove.
11227 (free_xmethod_worker): Remove.
11228 (free_xmethod_worker_vec): Remove.
11229 (get_xmethod_arg_types): Remove.
11230 (get_xmethod_result_type): Remove.
11231 * valops.c (find_method_list): Use std::vector, don't use
11232 intermediate vector.
11233 (value_find_oload_method_list): Use std::vector.
11234 (find_overload_match): Use std::vector.
11235 (find_oload_champ): Use std::vector.
11236 * value.c (value_free): Use operator delete.
11237 (value_of_xmethod): Rename to...
11238 (value_from_xmethod): ... this. Don't assign
11239 xmethod_worker::value, take rvalue-reference.
11240 (result_type_of_xmethod): Adjust.
11241 (call_xmethod): Adjust.
11242 * value.h: Include extension.h.
11243 (struct xmethod_worker): Don't forward-declare.
11244 (value_of_xmethod): Rename to...
11245 (value_from_xmethod): ... this, take rvalue-reference.
11246 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11247 (struct python_xmethod_worker): ... this, add constructor and
11249 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11250 (gdbpy_free_xmethod_worker_data): Rename to...
11251 (python_xmethod_worker::~python_xmethod_worker): ... this and
11253 (gdbpy_clone_xmethod_worker_data): Rename to...
11254 (python_xmethod_worker::clone): ... this and adjust.
11255 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11257 (gdbpy_get_xmethod_arg_types): Rename to...
11258 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11259 (gdbpy_get_xmethod_result_type): Rename to...
11260 (python_xmethod_worker::do_get_result_type): ... this and
11262 (gdbpy_invoke_xmethod): Rename to...
11263 (python_xmethod_worker::invoke): ... this and adjust.
11264 (new_python_xmethod_worker): Rename to...
11265 (python_xmethod_worker::python_xmethod_worker): ... this and
11267 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11269 (gdbpy_free_xmethod_worker_data): Remove.
11270 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11271 (gdbpy_get_xmethod_arg_types): Remove.
11272 (gdbpy_get_xmethod_result_type): Remove.
11273 (gdbpy_invoke_xmethod): Remove.
11274 * python/python.c (python_extension_ops): Remove obsolete
11277 2018-01-05 Pedro Alves <palves@redhat.com>
11280 * common/signals-state-save-restore.c
11281 (save_original_signals_state): New parameter 'quiet'. Warn if we
11282 find a custom handler preinstalled, instead of internal erroring.
11283 But only warn if !quiet.
11284 * common/signals-state-save-restore.h
11285 (save_original_signals_state): New parameter 'quiet'.
11286 * main.c (captured_main_1): Move save_original_signals_state call
11287 after option handling, and pass QUIET.
11289 2018-01-05 Pedro Alves <palves@redhat.com>
11291 * spu-tdep.c (spu_catch_start): Pass
11292 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11294 2018-01-05 Pedro Alves <palves@redhat.com>
11297 * ada-lang.c (literal_symbol_name_matcher): New function.
11298 (ada_get_symbol_name_matcher): Use it for
11299 symbol_name_match_type::SEARCH_NAME.
11300 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11301 it down instead of assuming symbol_name_match_type::FULL.
11302 * block.h (block_lookup_symbol): New parameter 'match_type'.
11303 * c-valprint.c (print_unpacked_pointer): Use
11304 lookup_symbol_search_name instead of lookup_symbol.
11305 * compile/compile-object-load.c (get_out_value_type): Pass down
11306 symbol_name_match_type::SEARCH_NAME.
11307 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11308 symbol_name_match_type::FULL.
11309 * cp-support.c (cp_get_symbol_name_matcher): Handle
11310 symbol_name_match_type::SEARCH_NAME.
11311 * infrun.c (insert_exception_resume_breakpoint): Use
11312 lookup_symbol_search_name.
11313 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11314 * psymtab.c (maintenance_check_psymtabs): Use
11315 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11316 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11317 SYMBOL_SEARCH_NAME.
11318 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11319 if symbol_name_match_type::SEARCH_NAME.
11320 (lookup_symbol_in_language): Pass down
11321 symbol_name_match_type::FULL.
11322 (lookup_symbol_search_name): New.
11323 (lookup_language_this): Pass down
11324 symbol_name_match_type::SEARCH_NAME.
11325 (lookup_symbol_aux, lookup_local_symbol): New parameter
11326 'match_type'. Pass it down.
11327 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11328 (lookup_symbol_search_name): New declaration.
11329 (lookup_symbol_in_block): New 'match_type' parameter.
11331 2018-01-05 Pedro Alves <palves@redhat.com>
11334 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11336 (ada_lookup_symbol): Reimplement in terms of
11337 ada_lookup_symbol_list, bits factored out from
11338 ada_lookup_encoded_symbol.
11340 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11342 * ada-exp.y (write_object_renaming): When subscripting an array
11343 using a symbol as the index, pass the block in call to
11344 ada_lookup_encoded_symbol when looking that symbol up.
11346 2018-01-05 Jerome Guitton <guitton@adacore.com>
11348 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11351 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11353 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11354 the case where VALUE_LVAL (val0) is not lval_memory.
11356 2018-01-05 Xavier Roirand <roirand@adacore.com>
11358 * ada-valprint.c (print_optional_low_bound): Handle
11359 character-indexed array printing like boolean-indexed array
11362 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11364 * NEWS: Create a new section for the next release branch.
11365 Rename the section of the current branch, now that it has
11368 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11370 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11371 * version.in: Bump version to 8.1.50.DATE-git.
11373 2018-01-03 Xavier Roirand <roirand@adacore.com>
11375 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11377 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11379 (default_exception_support_info) <catch_handlers_sym>: Add field.
11380 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11381 (ada_exception_name_addr_1): Add "catch handlers" handling.
11382 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11383 Update all callers.
11384 (create_excep_cond_exprs) <ex>: Add parameter.
11385 (re_set_exception): Update create_excep_cond_exprs call.
11386 (print_it_exception, print_one_exception, print_mention_exception)
11387 (print_recreate_exception): Add "catch handler" handling.
11388 (allocate_location_catch_handlers, re_set_catch_handlers)
11389 (check_status_catch_handlers, print_it_catch_handlers)
11390 (print_one_catch_handlers, print_mention_catch_handlers)
11391 (print_recreate_catch_handlers): New function.
11392 (catch_handlers_breakpoint_ops): New variable.
11393 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11394 Add parameter. Add "catch handler" handling.
11395 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11396 Add "catch handler" handling.
11397 (ada_exception_catchpoint_cond_string): Add "catch handler"
11399 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11401 (catch_ada_handlers_command): New function.
11402 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11403 operations structure.
11404 (_initialize_ada_language): Add "catch handlers" command entry.
11405 * NEWS: Document "catch handlers" feature.
11407 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11409 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11410 account when creating the array type of the slice.
11411 (ada_value_slice): Likewise.
11413 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11415 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11417 (create_array_type_with_stride): Add byte_stride_prop parameter.
11418 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11419 New parameter. Update all callers in this file.
11420 (array_type_has_dynamic_stride): New function.
11421 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11422 of arrays with dynamic byte strides.
11423 * dwarf2read.c (read_array_type): Add support for dynamic
11424 DW_AT_byte_stride attributes.
11426 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11428 * dwarf2read.c (read_unspecified_type): Treat
11429 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11431 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11433 Update copyright year range in all GDB files.
11435 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11437 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11438 and gdb/testsuite/gdb.base/step-line.c.
11440 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11442 * copyright.py (main): Dump the contents of
11443 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11444 even if BY_HAND is empty.
11446 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11448 * top.c (print_gdb_version): Update Copyright year in version
11451 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11453 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11455 For older changes see ChangeLog-2017.
11461 version-control: never