1 2018-03-16 Tom Tromey <tom@tromey.com>
3 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
4 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
5 * utils.c (do_free_section_addr_info)
6 (make_cleanup_free_section_addr_info): Remove.
7 * symfile.h (struct other_sections): Add constructor.
8 (struct section_addr_info): Remove.
9 (section_addr_info): New typedef.
10 (struct sym_fns) <sym_offsets>: Change type of parameter.
11 (build_section_addr_info_from_objfile)
12 (relative_addr_info_to_section_offsets, addr_info_make_relative)
13 (default_symfile_offsets, symbol_file_add)
14 (symbol_file_add_from_bfd)
15 (build_section_addr_info_from_section_table): Update.
16 (alloc_section_addr_info, free_section_addr_info): Don't declare.
17 * symfile.c (alloc_section_addr_info): Remove.
18 (build_section_addr_info_from_section_table): Change return type.
20 (build_section_addr_info_from_bfd)
21 (build_section_addr_info_from_objfile): Likewise.
22 (free_section_addr_info): Remove.
23 (relative_addr_info_to_section_offsets): Change type of "addrs".
24 (addrs_section_compar): Now a std::sort comparator.
25 (addrs_section_sort): Change return type.
26 (addr_info_make_relative): Change type of "addrs". Update.
27 (default_symfile_offsets, syms_from_objfile_1)
28 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
29 (symbol_file_add_separate): Update.
30 (symbol_file_add): Change type of "addrs". Update.
31 (add_symbol_file_command): Update. Remove cleanups.
32 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
34 * symfile-debug.c (debug_sym_offsets): Change type of "info".
35 * solib.c (solib_read_symbols): Update.
36 * objfiles.c (objfile_relocate): Update. Remove cleanups.
37 * machoread.c (macho_symfile_offsets): Update.
38 * jit.c (jit_bfd_try_read_symtab): Update.
40 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
42 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
43 unittests/utils-selftests.c.
44 * unittests/utils-selftests.c: New file.
46 2018-03-14 Tom Tromey <tom@tromey.com>
49 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
52 2018-03-14 Tom Tromey <tom@tromey.com>
55 * printcmd.c (printf_pointer): Allow "-" in format.
57 2018-03-14 Tom Tromey <tom@tromey.com>
59 * printcmd.c (_initialize_printcmd): Add usage to printf.
61 2018-03-14 Yao Qi <qiyao@sourceware.org>
63 * MAINTAINERS: Update my email address.
65 2018-03-13 Tom Tromey <tom@tromey.com>
67 * machoread.c (macho_check_dsym): Change filenamep to a
69 (macho_symfile_read): Update.
70 * symfile.c (load_command): Use std::string.
72 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
74 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
75 to error message string.
76 (riscv_register_name): Use xsnprintf instead of sprintf.
77 (riscv_insn::fetch_instruction): Use gdb_assert instead of
79 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
81 (riscv_push_dummy_call): Likewise.
83 2018-03-12 Tom Tromey <tom@tromey.com>
85 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
87 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
89 2018-03-12 Yao Qi <yao.qi@linaro.org>
91 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
92 parameter type to readable_regcache.
93 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
96 2018-03-11 Tom Tromey <tom@tromey.com>
98 * dwarf2read.c (struct nextfield): Add initializers.
99 (struct nextfnfield): Remove.
100 (struct fnfieldlist): Add initializers. Remove "length" and
101 "head", use std::vector.
102 (struct decl_field_list): Remove.
103 (struct field_info): Add initializers.
104 <fields, baseclasses>: Now std::vector.
105 <nbaseclasses, nfnfields, typedef_field_list_count,
106 nested_types_list_count>: Remove.
107 (dwarf2_add_field, dwarf2_add_type_defn)
108 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
109 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
110 (process_structure_scope): Update.
112 2018-03-11 Tom Tromey <tom@tromey.com>
114 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
115 for use by std::sort.
116 (build_type_psymtabs_1): Use std::vector.
118 2018-03-09 Eli Zaretskii <eliz@gnu.org>
120 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
121 and LIBMPFR in the printed configuration.
123 2018-03-08 Tom Tromey <tom@tromey.com>
125 * source.c (get_filename_and_charpos): Use scoped_fd.
126 * nto-procfs.c (procfs_open_1): Use scoped_fd.
127 (procfs_pidlist): Likewise.
128 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
129 (iterate_over_mappings): Likewise.
131 2018-03-08 Tom Tromey <tom@tromey.com>
133 * infcall.c (struct call_return_meta_info)
134 <stack_temporaries_enabled>: Remove.
135 (get_call_return_value, call_function_by_hand_dummy): Update.
136 * thread.c (disable_thread_stack_temporaries): Remove.
137 (enable_thread_stack_temporaries): Remove.
138 (thread_stack_temporaries_enabled_p): Return bool.
139 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
140 (get_last_thread_stack_temporary): Update.
141 * eval.c (evaluate_subexp): Update.
142 * gdbthread.h (class enable_thread_stack_temporaries): Now a
143 class, not a function.
144 (value_ptr, value_vec): Remove typedefs.
145 (class thread_info) <stack_temporaries_enabled>: Now bool.
146 <stack_temporaries>: Now a std::vector.
147 (thread_stack_temporaries_enabled_p)
148 (value_in_thread_stack_temporaries): Return bool.
150 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
152 * remote.c (putpkt_binary): Fix omitted bytes reporting.
153 (getpkt_or_notif_sane_1): Likewise.
155 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
157 * build-id.c (build_id_to_debug_bfd): Use std::string.
159 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
161 * build-id.c (find_separate_debug_file_by_buildid): Return
163 * build-id.h (find_separate_debug_file_by_buildid): Return
165 * coffread.c (coff_symfile_read): Adjust to std::string.
166 * elfread.c (elf_symfile_read): Adjust to std::string.
167 * symfile.c (separate_debug_file_exists): Change parameter to
169 (find_separate_debug_file): Return std::string.
170 (find_separate_debug_file_by_debuglink): Return std::string.
171 * symfile.h (find_separate_debug_file_by_debuglink): Return
174 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
176 * common/xml-utils.c (xml_escape_text): Move code to...
177 (xml_escape_text_append): ... this new function.
178 * common/xml-utils.h (xml_escape_text_append): New declaration.
179 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
181 (_initialize_xml_utils): register test_xml_escape_text_append as
184 2018-03-07 Alan Hayward <alan.hayward@arm.com>
186 * defs.h: Remove MAX_REGISTER_SIZE.
187 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
189 * python/py-unwind.c (pyuw_sniffer): Likewise.
191 2018-03-07 Tom Tromey <tom@tromey.com>
193 * linux-tdep.c (linux_info_proc): Update.
194 * target.h (struct target_ops) <to_fileio_readlink>: Return
196 (target_fileio_readlink): Return optional<string>.
197 * remote.c (remote_hostio_readlink): Return optional<string>.
198 * inf-child.c (inf_child_fileio_readlink): Return
200 * target.c (target_fileio_readlink): Return optional<string>.
202 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
204 * regcache.c (cooked_read_test): Add riscv to the list of
205 architectures that have a save_reggroup.
207 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
209 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
210 value is not a dynamic class object.
212 2018-03-06 Tom Tromey <tom@tromey.com>
214 * rust-exp.y: Formatting fixes.
216 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
218 * riscv-tdep.c (riscv_register_name): Remove target description
220 (riscv_gdbarch_init): Remove target description check.
222 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
224 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
226 * riscv-tdep.h: Likewise.
228 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
230 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
231 (riscv_pseudo_register_write): Delete.
232 (riscv_gdbarch_init): Remove all use of pseudo registers.
234 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
236 * record-btrace.c (btrace_print_lines): Replace cleanup
237 parameter with RAII equivalents.
238 (btrace_insn_history): Replace cleanup with RAII equivalents.
239 * ui-out.h (make_cleanup_ui_out_list_begin_end,
240 make_cleanup_ui_out_tuple_begin_end): Remove.
241 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
242 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
243 make_cleanup_ui_out_list_begin_end): Remove.
245 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
247 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
248 parameter types to std::vector. Use bool.
249 (record_btrace_wait): Replace VEC(tp_t) with
250 std::vector<thread_info *>.
251 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
253 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
255 * record-btrace.c (record_btrace_disable_callback): Remove.
256 (struct scoped_btrace_disable): New.
257 (record_btrace_open): Use scoped_btrace_disable.
259 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
261 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
262 reading values from registers.
264 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
266 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
269 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
271 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
272 change parameter type. Use GDB's print functions, and use
273 core_addr_to_string where appropriate.
274 (riscv_push_dummy_call): Use core_addr_to_string where
275 appropriate, update call to riscv_print_arg_location, and reindent
277 (riscv_return_value): Update call to riscv_print_arg_location.
279 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
280 Tim Newsome <tim@sifive.com>
281 Albert Ou <a0u@eecs.berkeley.edu>
282 Darius Rad <darius@bluespec.com>
284 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
285 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
286 (ALLDEPFILES): Add riscv-tdep.c
287 * configure.tgt: Add riscv support.
288 * riscv-tdep.c: New file.
289 * riscv-tdep.h: New file.
290 * NEWS: Mention new target.
291 * MAINTAINERS: Add entry for riscv.
293 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
295 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
296 fields within aggregates.
298 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
300 * record-btrace.c (btrace_print_lines): Change type of flags to
301 gdb_disassembly_flags.
303 2018-03-04 John Baldwin <jhb@FreeBSD.org>
305 * fbsd-nat.c: Include "inf-ptrace.h".
306 (USE_SIGTRAP_SIGINFO): Conditionally define.
307 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
308 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
309 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
311 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
313 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
315 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
316 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
317 "supports_stopped_by_hw_breakpoint" target methods.
319 2018-03-04 John Baldwin <jhb@FreeBSD.org>
321 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
322 * fbsd-nat.c (debug_fbsd_nat): New variable.
323 (show_fbsd_nat_debug): New function.
324 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
325 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
327 2018-03-04 John Baldwin <jhb@FreeBSD.org>
329 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
330 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
332 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
333 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
336 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
338 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
339 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
341 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
343 * charset.c (struct charset_vector): New.
344 (charsets): Change type to charset_vector.
345 (find_charset_names): Adjust.
347 (_initialize_charset): Adjust.
349 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
351 * progspace.h (struct program_space) <deleted_solibs>: Change
352 type to std::vector<std::string>.
353 * progspace.c (clear_program_space_solib_cache): Adjust.
354 * breakpoint.c (print_solib_event): Adjust.
355 (check_status_catch_solib): Adjust.
356 * solib.c (update_solib_list): Adjust.
357 * ui-out.h (class ui_out) <field_string>: New overload.
358 * ui-out.c (ui_out::field_string): New overload.
360 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
362 * progspace.h (struct program_space): Add constructor and
363 destructor, initialize fields.
364 (add_program_space): Remove.
365 * progspace.c (add_program_space): Rename to...
366 (program_space::program_space): ... this.
367 (release_program_space): Rename to...
368 (program_space::~program_space): ... this.
369 (delete_program_space): Use delete to delete program_space.
370 (initialize_progspace): Use new to allocate program_space.
371 * inferior.c (add_inferior_with_spaces): Likewise.
372 (clone_inferior_command): Likewise.
373 * infrun.c (follow_fork_inferior): Likewise.
374 (handle_vfork_child_exec_or_exit): Likewise.
376 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
378 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
379 (delim_string_to_char_ptr_vec): Return std::vector of
380 gdb::unique_xmalloc_ptr.
381 (dirnames_to_char_ptr_vec_append): Take std::vector of
382 gdb::unique_xmalloc_ptr.
383 (dirnames_to_char_ptr_vec): Return std::vector of
384 gdb::unique_xmalloc_ptr.
385 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
386 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
387 (delim_string_to_char_ptr_vec): Return an std::vector of
388 gdb::unique_xmalloc_ptr, adjust the code.
389 (dirnames_to_char_ptr_vec_append): Take an std::vector of
390 gdb::unique_xmalloc_ptr, adjust the code.
391 (dirnames_to_char_ptr_vec): Return an std::vector of
392 gdb::unique_xmalloc_ptr, adjust the code.
393 * auto-load.c (auto_load_safe_path_vec): Change type to
394 std::vector of gdb::unique_xmalloc_ptr.
395 (auto_load_expand_dir_vars): Return an std::vector of
396 gdb::unique_xmalloc_ptr, adjust the code.
397 (auto_load_safe_path_vec_update): Adjust.
398 (filename_is_in_auto_load_safe_path_vec): Adjust.
399 (auto_load_objfile_script_1): Adjust.
400 * build-id.c (build_id_to_debug_bfd): Adjust.
401 * linux-thread-db.c (thread_db_load_search): Adjust.
402 * source.c (add_path): Adjust.
404 * symfile.c (find_separate_debug_file): Adjust.
405 * utils.c (do_free_char_ptr_vec): Remove.
406 (make_cleanup_free_char_ptr_vec): Remove.
408 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
411 * common/pathstuff.c: Conditionally include "<windows.h>".
413 2018-03-01 Georg Sauthoff <mail@georg.so>
416 * gcore.in: Quote variables and switch interpreter to bash.
418 2018-03-01 Tom Tromey <tom@tromey.com>
420 * dwarf2read.c (alloc_discriminant_info): Fix default_index
421 assertion. Add assertion for discriminant_index.
422 (quirk_rust_enum): Use correct base type name in univariant case.
424 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
426 * record.c (get_call_history_modifiers): Return a
428 (cmd_record_call_history): Adjust.
429 * record-btrace.c (record_btrace_call_history): Adjust.
430 (record_btrace_call_history_range): Adjust.
431 (record_btrace_call_history_from): Adjust.
432 * target-debug.h (target_debug_print_record_print_flags): New.
433 * target-delegates.c: Re-generate.
434 * target.c (target_call_history): Change flags type.
435 (target_call_history_from): Likewise.
436 (target_call_history_range): Likewise.
437 * target.h (struct target_ops) <target_call_history>: Likewise.
438 (target_call_history_from): Likewise.
439 (target_call_history_range): Likewise.
441 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
442 Simon Marchi <simon.marchi@polymtl.ca>
444 * common/common-utils.c: Include "sys/stat.h".
445 (is_regular_file): Move here from "source.c"; change return
447 * common/common-utils.h (is_regular_file): New prototype.
448 * common/pathstuff.c (contains_dir_separator): New function.
449 * common/pathstuff.h (contains_dir_separator): New prototype.
450 * source.c: Don't include "sys/stat.h".
451 (is_regular_file): Move to "common/common-utils.c".
453 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
455 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
456 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
457 * auto-load.c: Include "common/pathstuff.h".
458 * common/common-def.h (current_directory): Move here.
459 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
461 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
463 * common/pathstuff.c: New file.
464 * common/pathstuff.h: New file.
465 * compile/compile.c: Include "common/pathstuff.h".
466 * defs.h (current_directory): Move to "common/common-defs.h".
467 * dwarf2read.c: Include "common/pathstuff.h".
469 * guile/scm-safe-call.c: Likewise.
470 * linux-thread-db.c: Likewise.
472 * nto-tdep.c: Likewise.
473 * objfiles.c: Likewise.
474 * source.c: Likewise.
475 * symtab.c: Likewise.
476 * utils.c: Include "common/pathstuff.h".
477 (gdb_realpath): Move to "common/pathstuff.c".
478 (gdb_realpath_keepfile): Likewise.
479 (gdb_abspath): Likewise.
480 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
481 (gdb_realpath_keepfile): Likewise.
482 (gdb_abspath): Likewise.
484 2018-02-28 John Baldwin <jhb@FreeBSD.org>
486 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
487 wildcard process pid for super_resume for kernels with a
490 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
492 * compile/compile.c (get_args): Add additional comments
495 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
496 Tom Tromey <tom@tromey.com>
498 * target.h (memory_write_request_s): Remove typedef. Don't define
500 (target_write_memory_blocks): Change argument to std::vector.
501 (struct memory_write_request): Add constructor.
502 * target-memory.c (compare_block_starting_address): Return bool.
503 Change argument types.
504 (claim_memory): Change arguments to use std::vector.
505 (split_regular_and_flash_blocks, blocks_to_erase)
506 (compute_garbled_blocks): Likewise.
507 (cleanup_request_data, cleanup_write_requests_vector): Remove.
508 (target_write_memory_blocks): Change argument to std::vector.
509 * symfile.c (struct load_section_data): Add constructor and
510 destructor. Use std::vector for "requests".
511 (struct load_progress_data): Add initializers.
512 (load_section_callback): Update. Use "new".
513 (clear_memory_write_data): Remove.
514 (generic_load): Update.
516 2018-02-27 Alan Hayward <alan.hayward@arm.com>
518 * arch/aarch64.h: Use common/tdesc.h.
520 2018-02-26 Maciej W. Rozycki <macro@mips.com>
522 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
523 architecture with a 64-bit ABI.
525 2018-02-26 Maciej W. Rozycki <macro@mips.com>
527 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
528 ahead of target description loading.
530 2018-02-26 Tom Tromey <tom@tromey.com>
532 * stack.c (backtrace_command_1): Update.
533 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
535 * python/py-framefilter.c (py_print_frame)
536 (gdbpy_apply_frame_filter): Change type of "flags".
537 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
539 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
540 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
541 * extension.h (enum frame_filter_flag): Rename from
543 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
544 (apply_ext_lang_frame_filter): Change type of "flags".
545 * extension.c (apply_ext_lang_frame_filter): Change type of
547 * extension-priv.h (struct extension_language_ops)
548 <apply_frame_filter>: Change type of "flags".
550 2018-02-26 Tom Tromey <tom@tromey.com>
553 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
554 off-by-one in py_end computation.
555 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
557 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
560 2018-02-26 Tom Tromey <tom@tromey.com>
562 * dwarf2read.c (struct variant_field): New.
563 (struct nextfield) <variant>: New field.
564 (dwarf2_add_field): Handle DW_TAG_variant_part.
565 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
567 (read_structure_type): Handle DW_TAG_variant_part.
568 (handle_struct_member_die): New function, extracted from
569 process_structure_scope. Handle DW_TAG_variant.
570 (process_structure_scope): Handle discriminated unions. Call
571 handle_struct_member_die.
573 2018-02-26 Tom Tromey <tom@tromey.com>
575 * rust-lang.h (rust_last_path_segment): Declare.
576 * rust-lang.c (rust_last_path_segment): Now public. Change
578 (struct disr_info): Remove.
579 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
580 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
581 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
582 (rust_enum_p, rust_enum_variant): New function.
583 (rust_underscore_fields): Remove "offset" parameter.
584 (rust_print_enum): New function.
585 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
586 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
587 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
589 (rust_internal_print_type): New function, from rust_print_type.
591 (rust_print_type): Call rust_internal_print_type.
592 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
593 Update enum handling.
594 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
595 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
596 (rust_union_quirks): New functions.
597 (process_full_comp_unit, process_full_type_unit): Call
599 (process_structure_scope): Update rust_unions if necessary.
601 2018-02-26 Tom Tromey <tom@tromey.com>
603 * value.h (value_union_variant): Declare.
604 * valops.c (value_union_variant): New function.
605 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
606 (struct discriminant_info): New.
607 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
609 (struct main_type) <flag_discriminated_union>: New field.
611 2018-02-26 Tom Tromey <tom@tromey.com>
613 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
614 unittests/unpack-selftests.c.
615 * unittests/unpack-selftests.c: New file.
616 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
618 2018-02-26 Yao Qi <yao.qi@linaro.org>
620 * dwarf2read.c (struct partial_die_info) <read>: New method.
621 (read_partial_die): Remove the declaration.
622 (load_partial_dies): Update.
623 (partial_die_info::partial_die_info):
624 (read_partial_die): Change it to partial_die_info::read.
626 2018-02-26 Yao Qi <yao.qi@linaro.org>
628 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
629 (fixup_partial_die): Remove declaration.
630 (scan_partial_symbols): Update.
631 (partial_die_parent_scope): Likewise.
632 (partial_die_full_name): Likewise.
633 (fixup_partial_die): Change it to partial_die_info::fixup.
635 2018-02-26 Yao Qi <yao.qi@linaro.org>
637 * dwarf2read.c (read_partial_die): Update the declaration.
638 (load_partial_dies): Caller update.
639 (read_partial_die): Remove one argument abbrev_len.
641 2018-02-26 Yao Qi <yao.qi@linaro.org>
643 * dwarf2read.c (struct partial_die_info): Add ctor, delete
645 (load_partial_dies): Use ctor and copy ctor.
646 (read_partial_die): Update.
647 (dwarf2_cu::find_partial_die): Use ctor.
649 2018-02-26 Yao Qi <yao.qi@linaro.org>
651 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
652 (find_partial_die_in_comp_unit): Change it to
653 dwarf2_cu::find_partial_die.
654 (find_partial_die): Update.
656 2018-02-26 Yao Qi <yao.qi@linaro.org>
658 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
661 2018-02-26 Yao Qi <yao.qi@linaro.org>
663 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
665 2018-02-26 Alan Hayward <alan.hayward@arm.com>
667 * arch/amd64.h: Use common/tdesc.h.
668 * arch/i386.c: Likewise.
669 * arch/i386.h: Likewise.
670 * arch/tic6x.c: Likewise.
671 * arch/tdesc.h: Move file from here...
672 * common/tdesc.h: ...to here.
673 * features/aarch64-core.c: Regenerate.
674 * features/aarch64-fpu.c: Regenerate.
675 * features/i386/32bit-avx.c: Regenerate.
676 * features/i386/32bit-avx512.c: Regenerate.
677 * features/i386/32bit-core.c: Regenerate.
678 * features/i386/32bit-linux.c: Regenerate.
679 * features/i386/32bit-mpx.c: Regenerate.
680 * features/i386/32bit-pkeys.c: Regenerate.
681 * features/i386/32bit-sse.c: Regenerate.
682 * features/i386/64bit-avx.c: Regenerate.
683 * features/i386/64bit-avx512.c: Regenerate.
684 * features/i386/64bit-core.c: Regenerate.
685 * features/i386/64bit-linux.c: Regenerate.
686 * features/i386/64bit-mpx.c: Regenerate.
687 * features/i386/64bit-pkeys.c: Regenerate.
688 * features/i386/64bit-segments.c: Regenerate.
689 * features/i386/64bit-sse.c: Regenerate.
690 * features/i386/x32-core.c: Regenerate.
691 * features/tic6x-c6xp.c: Regenerate.
692 * features/tic6x-core.c: Regenerate.
693 * features/tic6x-gp.c: Regenerate.
694 * target-descriptions.c: Use common/tdesc.h.
695 * target-descriptions.h: Likewise.
697 2018-02-24 Tom Tromey <tom@tromey.com>
699 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
700 (try_thread_db_load_from_dir, thread_db_load_search): Use
702 (info_auto_load_libthread_db_compare): Return bool. Change
704 (info_auto_load_libthread_db): Use std::vector, std::string.
707 2018-02-24 Tom Tromey <tom@tromey.com>
709 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
711 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
713 * gdbarch.c: Rebuild.
714 * gdbarch.h: Rebuild.
715 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
716 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
717 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
720 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
722 * gdbtypes.h (sect_offset): Change type to uint64_t.
723 (sect_offset_str): New function.
724 * dwarf2read.c (create_addrmap_from_aranges): Use
726 (error_check_comp_unit_head): Likewise.
727 (create_debug_type_hash_table): Likewise.
728 (read_cutu_die_from_dwo): Likewise.
729 (init_cutu_and_read_dies): Likewise.
730 (init_cutu_and_read_dies_no_follow): Likewise.
731 (process_psymtab_comp_unit_reader): Likewise.
732 (partial_die_parent_scope): Likewise.
733 (peek_die_abbrev): Likewise.
734 (process_queue): Likewise.
735 (dwarf2_physname): Likewise.
736 (read_namespace_alias): Likewise.
737 (read_import_statement): Likewise.
738 (create_dwo_cu_reader): Likewise.
739 (create_cus_hash_table): Likewise.
740 (lookup_dwo_cutu): Likewise.
741 (inherit_abstract_dies): Likewise.
742 (read_func_scope): Likewise.
743 (read_call_site_scope): Likewise.
744 (dwarf2_add_member_fn): Likewise.
745 (read_common_block): Likewise.
746 (read_module_type): Likewise.
747 (read_typedef): Likewise.
748 (read_subrange_type): Likewise.
749 (load_partial_dies): Likewise.
750 (read_partial_die): Likewise.
751 (find_partial_die): Likewise.
752 (read_str_index): Likewise.
753 (dwarf2_string_attr): Likewise.
754 (build_error_marker_type): Likewise.
755 (lookup_die_type): Likewise.
756 (dump_die_shallow): Likewise.
757 (follow_die_ref): Likewise.
758 (dwarf2_fetch_die_loc_sect_off): Likewise.
759 (dwarf2_fetch_constant_bytes): Likewise.
760 (follow_die_sig): Likewise.
761 (get_signatured_type): Likewise.
762 (get_DW_AT_signature_type): Likewise.
763 (dwarf2_find_containing_comp_unit): Likewise.
764 (set_die_type): Likewise.
766 2018-02-21 John Baldwin <jhb@FreeBSD.org>
768 * arch/aarch64.c: Include "common-defs.h".
769 * arch/amd64.c: Likewise.
770 * arch/i386.c: Likewise.
772 2018-02-21 Tom Tromey <tom@tromey.com>
774 * value.h: (extract_field_op): Update.
775 * eval.c (extract_field_op): Return a const char *.
776 * expression.h (parse_expression_for_completion): Update.
777 * completer.c (complete_expression): Update.
778 (add_struct_fields): Make fieldname const.
779 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
780 (mark_completion_tag, parse_exp_in_context_1): Update.
781 (parse_expression_for_completion): Change "name" to
784 2018-02-21 Tom Tromey <tom@tromey.com>
786 * infcall.c (call_function_by_hand_dummy): Use std::vector.
788 2018-02-21 Yao Qi <yao.qi@linaro.org>
790 * avr-tdep.c (avr_read_pc): Change parameter type to
792 * gdbarch.sh (read_pc): Likewise.
793 * gdbarch.c: Re-generated.
794 * gdbarch.h: Re-generated.
795 * hppa-tdep.c (hppa_read_pc): Change parameter type to
797 * ia64-tdep.c (ia64_read_pc): Likewise.
798 * mips-tdep.c (mips_read_pc): Likewise.
799 * spu-tdep.c (spu_read_pc): Likewise.
801 2018-02-21 Yao Qi <yao.qi@linaro.org>
803 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
804 * regcache-dump.c: New file.
805 * regcache.c: Move register_dump to regcache-dump.c.
806 (maintenance_print_registers): Likewise.
807 (maintenance_print_raw_registers): Likewise.
808 (maintenance_print_cooked_registers): Likewise.
809 (maintenance_print_register_groups): Likewise.
810 (maintenance_print_remote_registers): Likewise.
811 (_initialize_regcache): Likewise.
812 * regcache.h (register_dump): Moved from regcache.c.
814 2018-02-21 Yao Qi <yao.qi@linaro.org>
816 * regcache.c (regcache::regcache): Update.
817 (regcache::invalidate): Move it to detached_regcache::invalidate.
818 (get_thread_arch_aspace_regcache): Update.
819 (regcache::raw_update): Update.
820 (regcache::cooked_read): Remove some code.
821 (regcache::cooked_read_value): Likewise.
822 (regcache::raw_write): Remove assert on m_readonly_p.
823 (regcache::raw_supply_integer): Move it to
824 detached_regcache::raw_supply_integer.
825 (regcache::raw_supply_zeroed): Likewise.
826 * regcache.h (detached_regcache) <raw_supply_integer>: New
828 <raw_supply_zeroed, invalidate>: Likewise.
829 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
830 <invalidate>: Likewise.
831 <m_readonly_p>: Removed.
833 2018-02-21 Yao Qi <yao.qi@linaro.org>
835 * infcmd.c (get_return_value): Let stop_regs point to
836 get_current_regcache.
837 * regcache.c (regcache::regcache): Remove.
838 (register_dump_reg_buffer): New class.
839 (regcache_print): Adjust.
840 * regcache.h (regcache): Remove constructors.
842 2018-02-21 Yao Qi <yao.qi@linaro.org>
844 * regcache.c (class register_dump): New class.
845 (register_dump_regcache, register_dump_none): New class.
846 (register_dump_remote, register_dump_groups): New class.
847 (regcache_print): Update.
848 * regcache.h (regcache_dump_what): Move it to regcache.c.
849 (regcache) <dump>: Remove.
851 2018-02-21 Yao Qi <yao.qi@linaro.org>
853 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
855 (jit_unwind_reg_set_impl): Call raw_supply.
856 (jit_frame_sniffer): Use reg_buffer_rw.
857 * record-full.c (record_full_core_regbuf): Change its type.
858 (record_full_core_open_1): Use reg_buffer_rw.
859 (record_full_close): Likewise.
860 (record_full_core_fetch_registers): Use regcache->raw_supply.
861 (record_full_core_store_registers): Likewise.
862 * regcache.c (regcache::get_register_status): Move it to
864 (regcache_raw_set_cached_value): Remove.
865 (regcache::raw_set_cached_value): Remove.
866 (regcache::raw_write): Call raw_supply.
867 (regcache::raw_supply): Move it to reg_buffer_rw.
868 * regcache.h (regcache_raw_set_cached_value): Remove.
869 (reg_buffer_rw): New class.
871 2018-02-21 Yao Qi <yao.qi@linaro.org>
873 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
874 readonly_detached_regcache.
875 (dummy_frame_prev_register): Use regcache->cooked_read.
876 * frame.c (frame_save_as_regcache): Change return type.
878 * frame.h (frame_save_as_regcache): Update declaration.
879 * inferior.h (get_infcall_suspend_state_regcache): Update
881 * infrun.c (infcall_suspend_state) <registers>: use
882 readonly_detached_regcache.
883 (save_infcall_suspend_state): Don't use regcache_dup.
884 (get_infcall_suspend_state_regcache): Change return type.
885 * linux-fork.c (struct fork_info) <savedregs>: Change to
886 readonly_detached_regcache.
888 (fork_save_infrun_state): Don't use regcache_dup.
889 (info_checkpoints_command): Adjust.
890 * mi/mi-main.c (register_changed_p): Update declaration.
891 (mi_cmd_data_list_changed_registers): Use
892 readonly_detached_regcache.
893 (register_changed_p): Change parameter type to
894 readonly_detached_regcache.
895 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
896 readonly_detached_regcache.
897 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
898 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
900 (regcache::save): Move it to reg_buffer.
901 (regcache::restore): Change parameter type.
902 (regcache_dup): Remove.
903 * regcache.h (reg_buffer) <save>: New method.
904 (readonly_detached_regcache): New class.
905 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
906 readonly_detached_regcache.
907 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
909 2018-02-21 Yao Qi <yao.qi@linaro.org>
911 * frame.c (frame_save_as_regcache): Use regcache method save.
912 (frame_pop): Use regcache method restore.
913 * infrun.c (restore_infcall_suspend_state): Likewise.
914 * linux-fork.c (fork_load_infrun_state): Likewise.
915 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
917 * regcache.c (regcache_save): Remove.
918 (regcache::restore): More asserts.
919 (regcache_cpy): Remove.
920 * regcache.h (regcache_save): Remove the declaration.
921 (regcache::restore): Move from private to public.
922 Remove the friend declaration of regcache_cpy.
923 (regcache_cpy): Remove declaration.
925 2018-02-21 Yao Qi <yao.qi@linaro.org>
927 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
928 parameter type to 'readable_regcache *'.
929 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
930 * arm-tdep.c (arm_neon_quad_read): Likewise.
931 (arm_pseudo_read): Likewise.
932 * avr-tdep.c (avr_pseudo_register_read): Likewise.
933 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
934 * frv-tdep.c (frv_pseudo_register_read): Likewise.
935 * gdbarch.c: Re-generated.
936 * gdbarch.h: Re-generated.
937 * gdbarch.sh (pseudo_register_read): Change parameter type to
938 'readable_regcache *'.
939 (pseudo_register_read_value): Likewise.
940 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
941 (h8300_pseudo_register_read): Likewise.
942 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
943 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
944 (i386_pseudo_register_read_into_value): Likewise.
945 (i386_pseudo_register_read_value): Likewise.
946 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
948 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
949 * m32c-tdep.c (m32c_raw_read): Likewise.
950 (m32c_read_flg): Likewise.
951 (m32c_banked_register): Likewise.
952 (m32c_banked_read): Likewise.
953 (m32c_sb_read): Likewise.
954 (m32c_part_read): Likewise.
955 (m32c_cat_read): Likewise.
956 (m32c_r3r2r1r0_read): Likewise.
957 (m32c_pseudo_register_read): Likewise.
958 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
959 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
960 (mep_pseudo_cr64_read): Likewise.
961 (mep_pseudo_register_read): Likewise.
962 * mips-tdep.c (mips_pseudo_register_read): Likewise.
963 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
964 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
965 * regcache.c (regcache::raw_read): Move it to readable_regcache.
966 (regcache::cooked_read): Likewise.
967 (regcache::cooked_read_value): Likewise.
968 (regcache_cooked_read_signed):
969 (regcache::cooked_read): Likewise.
970 * regcache.h (readable_regcache): New class.
971 (regcache): Inherit readable_regcache. Move some methods to
973 * rl78-tdep.c (rl78_pseudo_register_read): Change
974 parameter type to 'readable_regcache *'.
975 * rs6000-tdep.c (do_regcache_raw_read): Remove.
976 (e500_pseudo_register_read): Change parameter type to
977 'readable_regcache *'.
978 (dfp_pseudo_register_read): Likewise.
979 (vsx_pseudo_register_read): Likewise.
980 (efpr_pseudo_register_read): Likewise.
981 * s390-tdep.c (s390_pseudo_register_read): Likewise.
982 * sh-tdep.c (sh_pseudo_register_read): Likewise.
983 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
984 (sh64_pseudo_register_read): Likewise.
985 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
986 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
987 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
988 (spu_pseudo_register_read): Likewise.
989 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
990 (xtensa_pseudo_register_read): Likewise.
992 2018-02-21 Yao Qi <yao.qi@linaro.org>
994 * regcache.c (regcache::regcache): Call reg_buffer ctor.
995 (regcache::arch): Move it to reg_buffer::arch.
996 (regcache::register_buffer): Likewise.
997 (regcache::assert_regnum): Likewise.
998 (regcache::num_raw_registers): Likewise.
999 * regcache.h (reg_buffer): New class.
1000 (regcache): Inherit reg_buffer.
1002 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
1004 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
1005 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
1007 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
1009 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
1011 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1013 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
1014 (SFILES): Remove common/*.c files.
1015 (COMMON_OBS): Remove some *.o files built from common/*.c files.
1016 * common/common.host: Add common reference.
1017 * configure.ac: Likewise.
1018 * configure: Regenerate.
1020 2018-02-16 Yao Qi <yao.qi@linaro.org>
1022 * block.c (block_namespace_info): Inherit allocate_on_obstack.
1023 (block_initialize_namespace): Use new.
1024 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
1025 (dwarf2_free_objfile): Use delete.
1026 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
1027 (copy_type_recursive): Use new.
1028 * gdb_obstack.h (allocate_on_obstack): New.
1030 2018-02-15 Yao Qi <yao.qi@linaro.org>
1033 * inferior.c (exit_inferior_1): Reset inf->control.
1035 2018-02-15 Joel Brobecker <brobecker@adacore.com>
1037 * ada-lang.c (ada_to_fixed_value_create): Delete advance
1040 2018-02-14 Pedro Alves <palves@redhat.com>
1042 * frame-unwind.c (frame_unwind_try_unwinder): Always call
1043 frame_cleanup_after_sniffer on exception.
1045 2018-02-14 Tom Tromey <tom@tromey.com>
1047 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
1049 (solib_bfd_open): Make pathname const.
1050 * solib.c (solib_bfd_open): Make pathname const.
1051 * solib-spu.c (spu_bfd_fopen): Make name const.
1052 (spu_bfd_open): Make pathname const.
1053 * solib-darwin.c (darwin_bfd_open): Make pathname const.
1054 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
1056 2018-02-14 Tom Tromey <tom@tromey.com>
1058 * symfile.c (symfile_bfd_open): Update.
1059 * source.h (openp, source_full_path_of, find_and_open_source):
1060 Change argument type to unique_xmalloc_ptr.
1061 * source.c (openp): Take a unique_xmalloc_ptr.
1062 (source_full_path_of, find_and_open_source): Likewise.
1063 (open_source_file, symtab_to_fullname): Update.
1064 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
1066 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
1067 (exec_file_find): Update.
1068 * psymtab.c (psymtab_to_fullname): Update.
1069 * nto-tdep.h (nto_find_and_open_solib): Update.
1070 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
1072 * exec.c (exec_file_attach): Update.
1073 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
1074 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
1076 2018-02-14 Tom Tromey <tom@tromey.com>
1078 * solib.c: Include source.h.
1079 * nto-tdep.c: Include source.h.
1080 * mi/mi-cmd-env.c: Include source.h.
1081 * infcmd.c: Include source.h.
1082 * exec.c: Include source.h.
1083 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
1084 (add_path, directory_switch, source_path, init_source_path): Move
1086 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
1087 (add_path, directory_switch, source_path, init_source_path):
1090 2018-02-14 Tom Tromey <tom@tromey.com>
1092 * solist.h (exec_file_find, solib_find): Return
1094 (solib_bfd_fopen): Take a const char *.
1095 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
1096 (exec_file_find, solib_find): Likewise.
1097 (solib_bfd_fopen): Do not take ownership of "pathname".
1098 (solib_bfd_open): Use unique_xmalloc_ptr.
1099 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
1100 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
1101 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
1102 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
1104 2018-02-14 Joel Brobecker <brobecker@adacore.com>
1106 * ada-lang.c (name_match_type_from_name): Remove reference to
1107 ada_name_for_lookup in function's documentation.
1108 * ada-lang.h (ada_name_for_lookup): Delete declaration.
1110 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
1112 * defs.h (enum openp_flags): New enum.
1113 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
1114 Move to enum openp_flags.
1115 (openp_flags): New enum flags.
1116 (openp): Change parameter type to openp_flags.
1117 * source.c (openp): Change parameter type to openp_flags.
1118 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
1119 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
1121 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
1123 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
1126 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
1128 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
1130 (class dwarf2_queue_guard): ...the destructor of this new class.
1131 (dw2_do_instantiate_symtab): Create instance of the new class
1132 dwarf2_queue_guard, remove cleanup.
1134 2018-02-09 Tom Tromey <tom@tromey.com>
1136 * source.c (find_source_lines): Don't reference past the end of
1139 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1141 * remote.c (remote_btrace_maybe_reopen): Change error message.
1142 * btrace.c (btrace_enable): Likewise.
1143 (parse_xml_btrace): Likewise.
1144 (parse_xml_btrace_conf): Likewise.
1146 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1148 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
1149 (linux_enable_pt, linux_enable_bts): Call
1150 diagnose_perf_event_open_fail.
1152 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1154 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
1155 Remove parameter and change return type. Update callers. Move it.
1156 (linux_enable_bts, linux_enable_pt): Improve error message.
1157 (linux_enable_pt): Remove zero buffer size check.
1158 (linux_enable_btrace): Improve error messages. Remove NULL return
1161 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1163 * btrace.c (btrace_enable): Remove target_supports_btrace call.
1164 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
1165 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
1166 (linux_supports_pt, linux_supports_btrace): Remove.
1167 (linux_enable_bts): Call cpu_supports_bts.
1168 * nat/linux-btrace.h (linux_supports_btrace): Remove.
1169 * remote.c (remote_supports_btrace): Remove.
1170 (init_remote_ops): Remove remote_supports_btrace.
1171 * target-delegates.c: Regenerated.
1172 * target.c (target_supports_btrace): Remove.
1173 * target.h (target_ops) <to_supports_btrace>: Remove
1174 (target_supports_btrace): Remove.
1175 * x86-linux-nat.c (x86_linux_create_target): Remove
1176 linux_supports_btrace.
1178 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1180 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
1182 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
1183 exception and use message in own exception.
1185 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1187 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
1188 (perf_event_pt_event_type): Use gdb_file_up.
1189 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
1190 scoped_fd, and scoped_mmap.
1192 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1194 * common/scoped_mmap.h: New.
1195 * unittests/scoped_mmap-selftest.c: New.
1196 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1197 unittests/scoped_mmap-selftest.c.
1199 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1201 * common/scoped_fd.h: New.
1202 * unittests/scoped_fd-selftest.c: New.
1203 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1204 unittests/scoped_fd-selftest.c.
1206 2018-02-09 Tom Tromey <tom@tromey.com>
1208 * auto-load.c (auto_load_section_scripts): Use
1209 gdb::unique_xmalloc_ptr.
1211 2018-02-09 Tom Tromey <tom@tromey.com>
1213 * auto-load.c (execute_script_contents): Use std::string.
1215 2018-02-09 Joel Brobecker <brobecker@adacore.com>
1217 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
1218 Python function, rather than a new command.
1220 2018-02-08 Tom Tromey <tom@tromey.com>
1222 * solib.c (solib_find_1): Use std::string.
1223 (solib_bfd_fopen): Use unique_xmalloc_ptr.
1225 2018-02-08 Tom Tromey <tom@tromey.com>
1227 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
1229 2018-02-08 Tom Tromey <tom@tromey.com>
1231 * source.c (find_source_lines): Use gdb::def_vector.
1233 2018-02-08 Tom Tromey <tom@tromey.com>
1235 * macrocmd.c (struct temporary_macro_definition): New.
1236 (macro_define_command): Use temporary_macro_definition. Remove
1238 (free_macro_definition_ptr): Remove.
1240 2018-02-08 Tom Tromey <tom@tromey.com>
1242 * macroexp.c (maybe_expand): Use std::string.
1244 2018-02-08 Tom Tromey <tom@tromey.com>
1246 * macroexp.c (struct macro_buffer): Add initializers for some
1248 (init_buffer, init_shared_buffer, free_buffer)
1249 (free_buffer_return_text): Remove.
1250 (macro_buffer): New constructors.
1251 (~macro_buffer): New destructor.
1252 (macro_buffer::set_shared): New method.
1253 (macro_buffer::resize_buffer, macro_buffer::appendc)
1254 (macro_buffer::appendmem): Now methods, not free functions.
1255 (set_token, append_tokens_without_splicing, stringify)
1256 (macro_stringify): Update.
1257 (gather_arguments): Change return type. Remove argc_p argument,
1258 add args_ptr argument. Use std::vector.
1259 (substitute_args): Remove argc argument. Accept std::vector.
1260 (expand): Update. Use std::vector.
1261 (scan, macro_expand, macro_expand_next): Update.
1263 2018-02-08 Tom Tromey <tom@tromey.com>
1265 * symtab.c (default_collect_symbol_completion_matches_break_on):
1266 Use unique_xmalloc_ptr.
1267 * macroscope.h: (sal_macro_scope, user_macro_scope)
1268 (default_macro_scope): Return unique_xmalloc_ptr.
1269 * macroscope.c (sal_macro_scope, user_macro_scope)
1270 (default_macro_scope): Return unique_xmalloc_ptr.
1271 * macroexp.h (macro_expand, macro_expand_once): Return
1273 * macroexp.c (macro_expand, macro_expand_once): Return
1275 * macrocmd.c (macro_expand_command, macro_expand_once_command)
1276 (info_macro_command, info_macros_command): Use
1278 * compile/compile-c-support.c (write_macro_definitions): Use
1280 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
1282 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
1284 * value.c (value_static_field): Assign field type instead of
1285 containing type when returning an optimized out value.
1287 2018-02-06 Yao Qi <yao.qi@linaro.org>
1289 * ft32-tdep.c (ft32_read_pc): Remove.
1290 (ft32_write_pc): Remove.
1291 (ft32_gdbarch_init): Update.
1292 * m32r-tdep.c (m32r_read_pc): Remove.
1293 (m32r_gdbarch_init): Update.
1294 * mep-tdep.c (mep_read_pc): Remove.
1295 (mep_gdbarch_init): Update.
1296 * microblaze-tdep.c (microblaze_write_pc): Remove.
1297 (microblaze_gdbarch_init): Update.
1298 * mn10300-tdep.c (mn10300_read_pc): Remove.
1299 (mn10300_write_pc): Remove.
1300 (mn10300_gdbarch_init): Update.
1301 * moxie-tdep.c (moxie_read_pc): Remove.
1302 (moxie_write_pc): Remove.
1303 (moxie_gdbarch_init): Update.
1305 2018-02-06 Yao Qi <yao.qi@linaro.org>
1307 * expprint.c (print_subexp_standard): Handle
1308 OP_F77_UNDETERMINED_ARGLIST.
1309 (dump_subexp_body_standard): Likewise.
1311 2018-02-05 Alan Hayward <alan.hayward@arm.com>
1313 * target-descriptions.c (tdesc_element_visitor) Add empty
1315 (tdesc_type): Move make_gdb_type from here.
1316 (tdesc_type_builtin): Likewise.
1317 (tdesc_type_vector): Likewise.
1318 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
1319 (make_gdb_type_struct): Move from tdesc_type_with_fields.
1320 (make_gdb_type_union): Likewise.
1321 (make_gdb_type_flags): Likewise.
1322 (make_gdb_type_enum): Likewise.
1323 (make_gdb_type): New function.
1324 (tdesc_register_type): Use static make_gdb_type.
1326 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
1328 * infcmd.c (default_print_one_register_info): Align natural-format
1329 column values consistently one under another.
1330 (pad_to_column): New function.
1332 2018-02-05 Joel Brobecker <brobecker@adacore.com>
1334 * dwarf2read.c (dwarf2_physname): Move commment.
1336 2018-02-01 Leszek Swirski <leszeks@google.com>
1338 * varobj.c (varobj_formatted_print_options): Allow recursive
1339 pretty printing if pretty printing is enabled.
1341 2018-02-01 Leszek Swirski <leszeks@google.com>
1343 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
1344 names after a structop as a filename.
1346 2018-02-01 Yao Qi <yao.qi@linaro.org>
1348 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
1349 (arm_record_coproc_data_proc): Likewise.
1351 2018-02-01 Yao Qi <yao.qi@linaro.org>
1353 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
1355 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
1357 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
1358 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
1360 2018-01-31 Pedro Alves <palves@redhat.com>
1362 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
1363 * inflow.c (child_terminal_save_inferior): Wrap reference to
1364 tcgetpgrp in HAVE_TERMIOS_H.
1365 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
1367 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
1368 always iterate over all inferiors.
1369 (gdbsim_cntrl_c): Adjust.
1370 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
1372 2018-01-31 Joel Brobecker <brobecker@adacore.com>
1374 * gdbtypes.c (lookup_array_range_type): Make sure the array's
1375 index type is objfile-owned if the element type is as well.
1377 2018-01-31 Joel Brobecker <brobecker@adacore.com>
1381 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
1383 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
1384 "features/s390x-linux64.c".
1385 (_initialize_s390_linux_tdep): Remove initialization of tdescs
1386 s390_linux32 and s390x_linux64.
1387 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
1389 * s390-tdep.c: Include "features/s390-linux32.c" and
1390 "features/s390x-linux64.c".
1391 (s390_tdesc_valid): Add check for tdesc_has_registers.
1392 (s390_gdbarch_init): Make sure there is always a valid tdesc.
1393 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
1394 tdesc_s390x_linux64.
1395 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
1396 tdesc_s390x_linux64 to...
1397 * s390-tdep.h: ...here.
1399 2018-01-30 Pedro Alves <palves@redhat.com>
1402 * config.in, configure: Regenerate.
1403 * configure.ac: Check for getpgid.
1404 * go32-nat.c (go32_pass_ctrlc): New.
1405 (go32_target): Install it.
1406 * inf-child.c (inf_child_target): Install
1407 child_terminal_save_inferior, child_pass_ctrlc and
1409 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
1410 (inf_ptrace_target): No longer install it.
1411 * infcmd.c (interrupt_target_1): Adjust.
1412 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
1413 (child_interrupt): Declare.
1414 (inferior::terminal_state): New.
1415 * inflow.c (struct terminal_info): Update comments.
1416 (inferior_process_group): Delete.
1417 (terminal_is_ours): Delete.
1418 (gdb_tty_state): New.
1419 (child_terminal_init): Adjust.
1420 (is_gdb_terminal, sharing_input_terminal_1)
1421 (sharing_input_terminal): New functions.
1422 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
1423 Set the process's actual process group in the foreground if
1424 possible. Handle is_ours_for_output/is_ours distinction. Don't
1425 mark terminal as the inferior's if not sharing GDB's terminal.
1426 Don't check attach_flag.
1427 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
1428 pass down a target_terminal_state.
1429 (child_terminal_save_inferior): New, factored out from ...
1430 (child_terminal_ours_1): ... this. Handle
1431 target_terminal_state::is_ours_for_output.
1432 (child_interrupt, child_pass_ctrlc): New.
1433 (inflow_inferior_exit): Clear the inferior's terminal_state.
1434 (copy_terminal_info): Copy the inferior's terminal state.
1435 (_initialize_inflow): Remove reference to terminal_is_ours.
1436 * inflow.h (inferior_process_group): Delete.
1437 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
1438 * procfs.c (procfs_target): Don't install procfs_interrupt.
1439 (procfs_interrupt): Delete.
1440 * remote.c (remote_serial_quit_handler): Adjust.
1441 (remote_interrupt): Remove ptid parameter. Adjust.
1442 * target-delegates.c: Regenerate.
1443 * target.c: Include "terminal.h".
1444 (target_terminal::terminal_state): Rename to ...
1445 (target_terminal::m_terminal_state): ... this.
1446 (target_terminal::init): Adjust.
1447 (target_terminal::inferior): Adjust to per-inferior
1449 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
1450 (target_terminal::ours, target_terminal::ours_for_output): Use
1451 target_terminal_is_ours_kind.
1452 (target_interrupt): Remove ptid parameter. Adjust.
1453 (default_target_pass_ctrlc): Adjust.
1454 * target.h (target_ops::to_terminal_save_inferior): New field.
1455 (target_ops::to_interrupt): Remove ptid_t parameter.
1456 (target_interrupt): Remove ptid_t parameter. Update comment.
1457 (target_pass_ctrlc): Update comment.
1458 * target/target.h (target_terminal_state): New scoped enum,
1460 (target_terminal::terminal_state): ... here.
1461 (target_terminal::inferior): Update comments.
1462 (target_terminal::restore_inferior): New.
1463 (target_terminal::is_inferior, target_terminal::is_ours)
1464 (target_terminal::is_ours_for_output): Adjust.
1465 (target_terminal::scoped_restore_terminal_state): Adjust to
1466 rename, and call restore_inferior() instead of inferior().
1467 (target_terminal::scoped_restore_terminal_state::m_state): Change
1469 (target_terminal::terminal_state): Rename to ...
1470 (target_terminal::m_terminal_state): ... this and change type.
1472 2018-01-30 Pedro Alves <palves@redhat.com>
1474 * linux-nat.c (wait_for_signal): New function.
1475 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
1477 (async_terminal_is_ours)
1478 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
1479 (linux_nat_add_target): Don't override
1480 to_terminal_inferior/to_terminal_ours.
1482 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
1484 * remote.c (remote_follow_fork): Don't call "detach_inferior".
1486 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
1488 * dwarf2read.c (free_dwo_files): Add forward-declaration.
1489 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
1490 dwarf2_per_objfile_free here.
1491 (dwarf2_per_objfile_free): Remove.
1492 (_initialize_dwarf2_read): Don't register
1493 dwarf2_per_objfile_free as a registry cleanup.
1495 2018-01-27 Eli Zaretskii <eliz@gnu.org>
1497 Avoid compilation errors in MinGW native builds
1499 The error is triggered by including python-internal.h, and the
1502 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
1503 from build-gnulib/import/math.h:27,
1504 from d:/usr/Python26/include/pyport.h:235,
1505 from d:/usr/Python26/include/Python.h:58,
1506 from python/python-internal.h:94,
1507 from python/py-arch.c:24:
1508 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
1512 This happens because Python headers define 'hypot' to expand t
1513 '_hypot' in the Windows builds.
1514 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
1515 'hypoth'. This avoids a compilation error.
1517 2018-01-26 Alan Hayward <alan.hayward@arm.com>
1519 * MAINTAINERS (Write After Approval): Fix ordering.
1521 2018-01-26 Alan Hayward <alan.hayward@arm.com>
1523 * MAINTAINERS (Write After Approval): Add Alan Hayward.
1525 2018-01-26 Alan Modra <amodra@gmail.com>
1527 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
1528 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
1529 Remove nop. Make const. Comment.
1530 (powerpc32_plt_stub_so_2): New.
1531 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
1532 Correct count. Update uses.
1533 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
1534 Move common code reading PLT entry word. Correct
1535 powerpc32_plt_stub PLT address calculation.
1536 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
1537 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
1538 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
1539 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
1540 (ppc64_standard_linkage8): Likewise.
1541 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
1542 Correct insns description.
1543 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
1545 2018-01-24 Pedro Alves <palves@redhat.com>
1547 GCC PR libstdc++/83906
1548 * gdbtypes.c (operator==(const dynamic_prop &,
1549 const dynamic_prop &)): New.
1550 (operator==(const range_bounds &, const range_bounds &)): New.
1551 (check_types_equal): Use them instead of memcmp.
1552 * gdbtypes.h (operator==(const dynamic_prop &,
1553 const dynamic_prop &)): Declare.
1554 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
1555 (operator==(const range_bounds &, const range_bounds &)): Declare.
1556 (operator!=(const range_bounds &, const range_bounds &)): Declare.
1558 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1560 * s390-linux-tdep.c (s390_record_address_mask)
1561 (s390_record_calc_disp_common, s390_record_calc_disp)
1562 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
1563 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
1564 (s390_process_record): Move to s390-tdep.c.
1565 (s390_linux_init_abi_any): Adjust.
1566 * s390-tdep.c (s390_record_address_mask)
1567 (s390_record_calc_disp_common, s390_record_calc_disp)
1568 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
1569 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
1570 (s390_process_record): Moved from s390-linux-tdep.c
1571 (s390_gdbarch_init): Adjust.
1573 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1575 * s390-linux-nat.c (s390-tdep.h): New include.
1576 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
1577 (HFILES_NO_SRCDIR): Add s390-tdep.h.
1578 (ALLDEPFILES): Add s390-tdep.c.
1579 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
1580 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
1581 * s390-tdep.h: ...this. New file.
1582 * s390-linux-tdep.c (s390-tdep.h): New include.
1583 (_initialize_s390_tdep): Rename to...
1584 (_initialize_s390_linux_tdep): ...this and adjust.
1585 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
1586 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
1588 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
1589 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
1590 (s390_is_partial_instruction, s390_software_single_step)
1591 (is_non_branch_ril, s390_displaced_step_copy_insn)
1592 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
1593 (s390_prologue_data, s390_addr, s390_store, s390_load)
1594 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
1595 (s390_register_call_saved, s390_guess_tracepoint_registers)
1596 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
1597 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
1598 (s390_pseudo_register_name, s390_pseudo_register_type)
1599 (s390_pseudo_register_read, s390_pseudo_register_write)
1600 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
1601 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
1602 (s390_addr_bits_remove, s390_address_class_type_flags)
1603 (s390_address_class_type_flags_to_name)
1604 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
1605 (s390_function_arg_float, s390_function_arg_vector)
1606 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
1607 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
1608 (s390_frame_align, s390_register_return_value, s390_return_value)
1609 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
1610 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
1611 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
1612 (s390_trad_frame_prev_register, s390_unwind_cache)
1613 (s390_prologue_frame_unwind_cache)
1614 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
1615 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
1616 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
1617 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
1618 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
1619 (s390_frame_base_address, s390_local_base_address)
1620 (s390_frame_base, s390_gcc_target_options)
1621 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
1622 (s390_validate_reg_range, s390_tdesc_valid)
1623 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
1624 * s390-tdep.c: ...this. New file.
1626 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1628 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
1629 (s390_process_record, s390_gdbarch_tdep_alloc)
1630 (s390_linux_init_abi_any): Use/set new hook.
1632 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1634 * s390-linux-tdep.c (osabi.h): New include.
1635 (s390_linux_init_abi_31, s390_linux_init_abi_64)
1636 (s390_linux_init_abi_any): New functions.
1637 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
1639 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1641 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
1642 tdesc_has_registers check
1644 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1646 * s390-linux-tdep.c (s390_tdesc_valid): New function.
1647 (s390_validate_reg_range): New macro.
1648 (s390_gdbarch_init): Adjust.
1650 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1652 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
1653 (s390_gdbarch_tdep_alloc): Adjust.
1654 (s390_gdbarch_init): Adjust.
1656 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1658 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
1659 <have_tdb>: Change type to bool.
1660 (s390_gdbarch_tdep_alloc): Adjust.
1661 (s390_gdbarch_init): Adjust.
1663 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1665 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
1666 (gdbarch_tdep) <have_upper, have_vx>: New fields.
1667 (s390_gdbarch_tdep_alloc): New function.
1668 (s390_gdbarch_init): Allocate tdep at start and use its fields
1669 instead of separate variables.
1671 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1673 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
1674 when looking for cached gdbarch and add comment for remaining.
1676 2018-01-22 Pedro Alves <palves@redhat.com>
1677 Sergio Durigan Junior <sergiodj@redhat.com>
1679 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
1682 2018-01-22 Maciej W. Rozycki <macro@mips.com>
1684 * MAINTAINERS: Update my company e-mail address.
1686 2018-01-22 Yao Qi <yao.qi@linaro.org>
1688 * regcache.c (cooked_write_test): New function.
1689 (_initialize_regcache): Register the test.
1691 2018-01-22 Yao Qi <yao.qi@linaro.org>
1693 * ia64-tdep.c (ia64_pseudo_register_read): Call
1694 regcache->cooked_read instead of regcache_cooked_read_unsigned.
1695 * m32c-tdep.c (m32c_cat_read): Likewise.
1696 (m32c_r3r2r1r0_read): Likewise.
1697 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
1698 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
1700 2018-01-22 Yao Qi <yao.qi@linaro.org>
1702 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
1703 method raw_read instead of regcache_raw_read.
1704 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
1705 * arm-tdep.c (arm_neon_quad_read): Likewise.
1706 * avr-tdep.c (avr_pseudo_register_read): Likewise.
1707 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
1708 * frv-tdep.c (frv_pseudo_register_read): Likewise.
1709 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
1710 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1711 (i386_pseudo_register_read_into_value): Likewise.
1712 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
1713 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
1714 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
1715 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
1716 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
1717 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
1718 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
1719 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
1720 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
1722 2018-01-22 Yao Qi <yao.qi@linaro.org>
1724 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
1725 * configure.tgt: Remove target mt.
1726 * mt-tdep.c: Remove.
1727 * regcache.c (cooked_read_test): Remove the check for mt.
1729 2018-01-22 Yao Qi <yao.qi@linaro.org>
1731 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
1732 instead of gdbarch_pseudo_register_read_value.
1734 2018-01-22 Joel Brobecker <brobecker@adacore.com>
1736 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
1739 2018-01-22 Joel Brobecker <brobecker@adacore.com>
1741 * linespec.c (create_sals_line_offset): Remove code that preserved
1742 the symtab_and_line's line number.
1744 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
1746 * varobj.c (varobj_create): Don't set valid_block when creating a
1749 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
1751 * varobj.c (varobj_create): Remove out of date comment.
1753 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
1756 * ada-exp.y (write_var_from_sym): Pass extra parameter when
1757 updating innermost block.
1758 * parse.c (innermost_block_tracker::update): Take extra type
1759 parameter, and check types match before updating innermost block.
1760 (write_dollar_variable): Update innermost block for registers.
1761 * parser-defs.h (enum innermost_block_tracker_type): New enum.
1762 (innermost_block_tracker::innermost_block_tracker): Initialise
1764 (innermost_block_tracker::reset): Take type parameter.
1765 (innermost_block_tracker::update): Take type parameter, and pass
1766 type through as needed.
1767 (innermost_block_tracker::m_types): New member.
1768 * varobj.c (varobj_create): Pass type when reseting innermost
1771 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
1773 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
1774 * ada-lang.c (resolve_subexp): Likewise.
1775 * breakpoint.c (set_breakpoint_condition) Likewise.
1776 (watch_command_1) Likewise.
1777 * c-exp.y (variable): Likewise.
1778 * d-exp.y (PrimaryExpression): Likewise.
1779 * f-exp.y (variable): Likewise.
1780 * go-exp.y (variable): Likewise.
1781 * m2-exp.y (variable): Likewise.
1782 * objfiles.c (objfile::~objfile): Likewise.
1783 * p-exp.y (variable): Likewise.
1784 * parse.c (innermost_block): Change type.
1785 * parser-defs.h (class innermost_block_tracker): New.
1786 (innermost_block): Change to innermost_block_tracker.
1787 * printcmd.c (display_command): Switch to innermost_block API.
1788 (do_one_display): Likewise.
1789 * rust-exp.y (do_one_display): Likewise.
1790 * symfile.c (clear_symtab_users): Likewise.
1791 * varobj.c (varobj_create): Switch to innermost_block API, replace
1792 use of innermost_block with block stored on varobj object.
1794 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
1796 * expression.h (innermost_block): Remove declaration.
1797 * varobj.c: Add 'parser-defs.h' include.
1799 2018-01-19 Tom Tromey <tom@tromey.com>
1801 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
1802 symbols in the static and global blocks.
1804 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1806 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
1807 gdb_ptrace.h, and move including gdb_wait.h ...
1808 * nat/linux-ptrace.h: ... to here.
1810 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
1812 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
1813 inf_ptrace_detach_success.
1814 (inf_ptrace_detach_success): Add inferior parameter, use it
1815 instead of inferior_ptid, pass it to detach_inferior.
1816 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
1818 * inferior.c (detach_inferior): Add overload that takes an
1820 * inferior.h (detach_inferior): Likewise.
1821 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
1822 use inferior_ptid, adjust call to inf_ptrace_detach_success.
1823 * linux-thread-db.c (thread_db_detach): Use inf parameter.
1825 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
1827 * target.h (struct target_ops) <to_detach>: Add inferior
1829 (target_detach): Likewise.
1830 * target.c (dispose_inferior): Pass inferior down.
1831 (target_detach): Pass inferior down. Assert that it is equal to
1832 the current inferior.
1833 * aix-thread.c (aix_thread_detach): Pass inferior down.
1834 * corefile.c (core_file_command): Pass current_inferior() down.
1835 * corelow.c (core_detach): Add inferior parameter.
1836 * darwin-nat.c (darwin_detach): Likewise.
1837 * gnu-nat.c (gnu_detach): Likewise.
1838 * inf-ptrace.c (inf_ptrace_detach): Likewise.
1839 * infcmd.c (detach_command): Pass current_inferior() down to
1841 * infrun.c (follow_fork_inferior): Pass parent_inf to
1843 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
1845 * linux-nat.c (linux_nat_detach): Add inferior parameter.
1846 * linux-thread-db.c (thread_db_detach): Likewise.
1847 * nto-procfs.c (procfs_detach): Likewise.
1848 * procfs.c (procfs_detach): Likewise.
1849 * record.c (record_detach): Likewise.
1850 * record.h (struct inferior): Forward-declare.
1851 (record_detach): Add inferior parameter.
1852 * remote-sim.c (gdbsim_detach): Likewise.
1853 * remote.c (remote_detach_1): Likewise.
1854 (remote_detach): Likewise.
1855 (extended_remote_detach): Likewise.
1856 * sol-thread.c (sol_thread_detach): Likewise.
1857 * target-debug.h (target_debug_print_inferior_p): New macro.
1858 * target-delegates.c: Re-generate.
1859 * top.c (kill_or_detach): Pass inferior down to target_detach.
1860 * windows-nat.c (windows_detach): Add inferior parameter.
1862 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
1864 * target.h (struct target_ops) <to_detach>: Remove args
1866 (target_detach): Likewise.
1867 * target.c (dispose_inferior): Adjust.
1868 (target_detach): Remove args parameter, adjust.
1869 * aix-thread.c (aix_thread_detach): Adjust.
1870 * corefile.c (core_file_command): Adjust.
1871 * corelow.c (core_detach): Adjust.
1872 * darwin-nat.c (darwin_detach): Adjust.
1873 * gnu-nat.c (gnu_detach): Adjust.
1874 * inf-ptrace.c (inf_ptrace_detach): Adjust.
1875 * infcmd.c (detach_command): Adjust
1876 * infrun.c (follow_fork_inferior): Adjust.
1877 (handle_vfork_child_exec_or_exit): Adjust.
1878 * linux-fork.c (linux_fork_detach): Remove args parameter.
1879 * linux-fork.h (linux_fork_detach): Likewise.
1880 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
1881 * linux-thread-db.c (thread_db_detach): Likewise.
1882 * nto-procfs.c (procfs_detach): Likewise.
1883 * procfs.c (procfs_detach): Likewise.
1884 (do_detach): Remove signo parameter.
1885 * record.c (record_detach): Remove args parameter.
1886 * record.h (record_detach): Likewise.
1887 * remote-sim.c (gdbsim_detach): Likewise.
1888 * remote.c (remote_detach_1): Likewise.
1889 (remote_detach): Likewise.
1890 (extended_remote_detach): Likewise.
1891 * sol-thread.c (sol_thread_detach): Likewise.
1892 * target-delegates.c: Re-generate.
1893 * top.c (struct qt_args) <args>: Remove field.
1894 (kill_or_detach): Don't pass args.
1895 (quit_force): Don't set args.
1896 * windows-nat.c (windows_detach): Remove args parameter.
1898 2018-01-19 Yao Qi <yao.qi@linaro.org>
1900 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
1901 (arm_linux_init_abi): Install it.
1903 2018-01-19 Yao Qi <yao.qi@linaro.org>
1905 * osabi.c (gdb_osabi_names): Extend the regexp for
1906 arm-linux-gnueabihf.
1908 2018-01-18 Yao Qi <yao.qi@linaro.org>
1910 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
1912 (abbrev_table::add_abbrev): Update.
1913 (abbrev_table::lookup_abbrev): Update.
1915 2018-01-18 Yao Qi <yao.qi@linaro.org>
1917 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
1919 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
1921 * compile/compile.c (compile_to_object): Convert "triplet_rx"
1924 2018-01-17 Tom Tromey <tom@tromey.com>
1926 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
1928 2018-01-17 Tom Tromey <tom@tromey.com>
1930 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
1931 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
1932 (create_array_type_with_stride): Update.
1933 * dwarf2read.c (set_die_type): Update.
1935 2018-01-17 Tom Tromey <tom@tromey.com>
1937 * dwarf2read.c (delayed_method_info): Remove typedef.
1938 (dwarf2_cu::method_info): Now a std::vector.
1939 (add_to_method_list): Update.
1940 (free_delayed_list): Remove.
1941 (compute_delayed_physnames): Update.
1942 (process_full_comp_unit, process_full_type_unit): Clear the method
1943 list. Remove cleanups.
1944 (psymtab_include_file_name): Add name_holder parameter. Use
1946 (dwarf_decode_lines): Update.
1948 2018-01-17 Tom Tromey <tom@tromey.com>
1949 Simon Marchi <simon.marchi@ericsson.com>
1951 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
1952 (dwarf2_per_objfile::free_cached_comp_units)
1953 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
1954 (init_cutu_and_read_dies_no_follow): Update.
1955 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
1956 (dwarf2_cu::~dwarf2_cu): New.
1957 (free_heap_comp_unit, free_stack_comp_unit): Remove.
1958 (age_cached_comp_units, free_one_cached_comp_unit): Update.
1960 2018-01-17 Tom Tromey <tom@tromey.com>
1961 Simon Marchi <simon.marchi@ericsson.com>
1963 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
1964 (struct die_reader_specs) <abbrev_table>: New member.
1965 (struct abbrev_table): Add constructor.
1966 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
1967 <abbrev_obstack>: Now an auto_obstack.
1968 (abbrev_table_up): New typedef.
1969 (init_cu_die_reader): Add abbrev_table parameter.
1970 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
1971 Add result_dwo_abbrev_table.
1972 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
1973 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
1975 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
1977 (skip_children): Update.
1978 (abbrev_table::alloc_abbrev): Rename from
1979 abbrev_table_alloc_abbrev.
1980 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
1981 (abbrev_table::lookup_abbrev): Rename from
1982 abbrev_table_lookup_abbrev.
1983 (abbrev_table_read_table): Return abbrev_table_up.
1984 (abbrev_table_free, abbrev_table_free_cleanup)
1985 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
1986 (load_partial_dies): Update.
1988 2018-01-17 Tom Tromey <tom@tromey.com>
1990 * dwarf2read.c (dwarf2_compute_name): Update comment.
1991 (read_func_scope, read_variable): Update.
1992 (new_symbol): Remove.
1993 (new_symbol_full): Rename to new_symbol.
1995 2018-01-17 Mike Gulick <mgulick@mathworks.com>
1998 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
1999 a warning instead of throwing an error, set section size to 0 and return
2001 * gdb_bfd.h (gdb_bfd_map_section): Update description.
2003 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2005 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
2007 (linux_ptrace_attach_fail_reason_string): Likewise.
2008 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
2010 (linux_ptrace_attach_fail_reason_string): Likewise.
2011 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
2013 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2015 * linux-nat.c (linux_nat_attach): Remove xstrdup.
2017 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2020 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2021 checking for fs_base/gs_base fields in struct user_regs_struct.
2022 * configure: Regenerate.
2024 2018-01-17 Yao Qi <yao.qi@linaro.org>
2026 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
2028 (aarch64_linux_init_abi): Install it to gdbarch hook
2031 2018-01-15 Pedro Alves <palves@redhat.com>
2033 * common/signals-state-save-restore.c
2034 (save_original_signals_state): Fix typos.
2036 2017-01-12 Tom Tromey <tom@tromey.com>
2037 Sergio Durigan Junior <sergiodj@redhat.com>
2039 * Makefile.in (install-only): Install gdb-add-index.
2041 2018-01-12 John Baldwin <jhb@FreeBSD.org>
2043 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
2045 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2047 * infrun.c (keep_going_pass_signal): Clear step-over info when
2048 insert_breakpoints fails.
2050 2018-01-11 Pedro Alves <palves@redhat.com>
2053 * infrun.c (resume): Rename to ...
2054 (resume_1): ... this.
2055 (resume): Reimplement as wrapper around resume_1.
2057 2018-01-11 Pedro Alves <palves@redhat.com>
2060 * remote.c (remote_parse_stop_reply): Default to the last-set
2061 general thread instead of to 'magic_null_ptid'.
2063 2018-01-10 Pedro Alves <palves@redhat.com>
2065 * language.h (language_get_symbol_name_matcher): Rename ...
2066 (get_symbol_name_matcher): ... this.
2067 * language.c (language_get_symbol_name_matcher): Ditto.
2068 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
2071 2018-01-10 Pedro Alves <palves@redhat.com>
2075 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
2076 Adjust to use language_get_symbol_name_matcher instead of
2077 language_defn::la_get_symbol_name_matcher.
2078 * language.c (language_get_symbol_name_matcher): If in Ada mode
2079 and the lookup name is a verbatim match, return Ada's matcher.
2080 * language.h (language_get_symbol_name_matcher): Adjust comment.
2081 (ada_lookup_name_info::verbatim_p):: New method.
2083 2018-01-10 Pedro Alves <palves@redhat.com>
2086 * ada-lang.c (ada_collect_symbol_completion_matches): If the
2087 minsym's language is language_auto or language_cplus, pass down
2088 language_ada instead.
2089 * symtab.c (compare_symbol_name): Don't frob symbol language here.
2091 2018-01-10 Pedro Alves <palves@redhat.com>
2094 * minsyms.c (linkage_name_str): New function.
2095 (iterate_over_minimal_symbols): Use it.
2097 2018-01-09 John Baldwin <jhb@FreeBSD.org>
2099 * NEWS: Document that 'info proc' now works on FreeBSD.
2101 2018-01-09 John Baldwin <jhb@FreeBSD.org>
2103 * configure.ac: Check for kinfo_getfile in libutil.
2104 * configure: Regenerate.
2105 * config.in: Regenerate.
2106 * fbsd-nat.c: Include "fbsd-tdep.h".
2107 (fbsd_fetch_cmdline): New.
2108 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
2109 rather than calling error.
2110 (fbsd_info_proc): New.
2111 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
2112 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
2113 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
2115 2018-01-09 John Baldwin <jhb@FreeBSD.org>
2117 * fbsd-nat.c (struct free_deleter): Remove.
2118 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
2120 2018-01-09 John Baldwin <jhb@FreeBSD.org>
2122 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
2123 NULL for an empty pathname.
2125 2018-01-09 John Baldwin <jhb@FreeBSD.org>
2127 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
2128 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
2129 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
2130 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
2131 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
2132 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
2133 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
2134 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
2135 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
2136 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
2137 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
2138 (fbsd_core_fetch_timeval, fbsd_print_sigset)
2139 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
2140 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
2141 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
2143 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
2145 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
2146 (gnu_xfer_auxv): New function.
2147 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
2150 2018-01-08 Yao Qi <yao.qi@linaro.org>
2151 Simon Marchi <simon.marchi@ericsson.com>
2153 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
2155 (COMMON_OBS): Remove selftest.o.
2156 * configure.ac: Append selftest-arch.c and common/selftest.c to
2157 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
2158 * configure: Re-generated.
2159 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
2161 (maintenance_info_selftests): Likewise.
2163 2018-01-08 Xavier Roirand <roirand@adacore.com>
2165 * ada-valprint.c (val_print_packed_array_elements): Use
2166 proper number of elements when printing an array indexed
2167 by an enumeration type.
2169 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2171 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
2172 (dw2_get_file_names_reader): Adjust.
2173 (lookup_dwo_signatured_type): Adjust.
2174 (lookup_dwp_signatured_type): Adjust.
2175 (lookup_signatured_type): Adjust.
2176 (create_type_unit_group): Adjust.
2177 (get_type_unit_group): Adjust.
2178 (process_psymtab_comp_unit_reader): Adjust.
2179 (build_type_psymtabs_reader): Adjust.
2180 (scan_partial_symbols): Adjust.
2181 (add_partial_symbol): Adjust.
2182 (add_partial_subprogram): Adjust.
2183 (peek_die_abbrev): Adjust.
2184 (fixup_go_packaging): Adjust.
2185 (process_imported_unit_die): Adjust.
2186 (dwarf2_compute_name): Adjust.
2187 (dwarf2_physname): Adjust.
2188 (read_import_statement): Adjust.
2189 (handle_DW_AT_stmt_list): Adjust.
2190 (read_file_scope): Adjust.
2191 (read_func_scope): Adjust.
2192 (read_lexical_block_scope): Adjust.
2193 (read_call_site_scope): Adjust.
2194 (read_variable): Adjust.
2195 (dwarf2_rnglists_process): Adjust.
2196 (dwarf2_ranges_process): Adjust.
2197 (dwarf2_ranges_read): Adjust.
2198 (dwarf2_get_pc_bounds): Adjust.
2199 (dwarf2_record_block_ranges): Adjust.
2200 (dwarf2_add_field): Adjust.
2201 (dwarf2_add_member_fn): Adjust.
2202 (read_structure_type): Adjust.
2203 (process_structure_scope): Adjust.
2204 (read_enumeration_type): Adjust.
2205 (read_array_type): Adjust.
2206 (mark_common_block_symbol_computed): Adjust.
2207 (read_common_block): Adjust.
2208 (read_namespace_type): Adjust.
2209 (read_namespace): Adjust.
2210 (read_module_type): Adjust.
2211 (read_tag_pointer_type): Adjust.
2212 (read_tag_ptr_to_member_type): Adjust.
2213 (read_tag_string_type): Adjust.
2214 (read_subroutine_type): Adjust.
2215 (read_typedef): Adjust.
2216 (read_base_type): Adjust.
2217 (attr_to_dynamic_prop): Adjust.
2218 (read_subrange_type): Adjust.
2219 (read_unspecified_type): Adjust.
2220 (dwarf2_read_abbrevs): Adjust.
2221 (load_partial_dies): Adjust.
2222 (read_partial_die): Adjust.
2223 (find_partial_die): Adjust.
2224 (guess_partial_die_structure_name): Adjust.
2225 (fixup_partial_die): Adjust.
2226 (read_attribute_value): Adjust.
2227 (read_addr_index): Adjust.
2228 (read_addr_index_from_leb128): Adjust.
2229 (read_str_index): Adjust.
2230 (dwarf2_string_attr): Adjust.
2231 (get_debug_line_section): Adjust.
2232 (dwarf_decode_line_header): Adjust.
2233 (lnp_state_machine::check_line_address): Adjust.
2234 (dwarf_decode_lines_1): Adjust.
2235 (dwarf_decode_lines): Adjust.
2236 (dwarf2_start_symtab): Adjust.
2237 (var_decode_location): Adjust.
2238 (new_symbol_full): Adjust.
2239 (dwarf2_const_value_data): Adjust.
2240 (dwarf2_const_value_attr): Adjust.
2241 (dwarf2_const_value): Adjust.
2243 (die_containing_type): Adjust.
2244 (build_error_marker_type): Adjust.
2245 (lookup_die_type): Adjust.
2246 (guess_full_die_structure_name): Adjust.
2247 (anonymous_struct_prefix): Adjust.
2248 (determine_prefix): Adjust.
2249 (dwarf2_name): Adjust.
2250 (follow_die_ref_or_sig): Adjust.
2251 (follow_die_offset): Adjust.
2252 (follow_die_ref): Adjust.
2253 (follow_die_sig_1): Adjust.
2254 (follow_die_sig): Adjust.
2255 (get_signatured_type): Adjust.
2256 (get_DW_AT_signature_type): Adjust.
2257 (decode_locdesc): Adjust.
2258 (dwarf_decode_macros): Adjust.
2259 (cu_debug_loc_section): Adjust.
2260 (fill_in_loclist_baton): Adjust.
2261 (dwarf2_symbol_mark_computed): Adjust.
2262 (init_one_comp_unit): Don't assign
2263 dwarf2_cu::dwarf2_per_objfile.
2264 (set_die_type): Adjust.
2266 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
2268 * dwarf2read.c (struct mapped_debug_names): Add constructor.
2269 <dwarf2_per_objfile>: New field.
2270 (dwarf2_per_objfile): Remove global.
2271 (get_dwarf2_per_objfile): New function.
2272 (set_dwarf2_per_objfile): New function.
2273 (dwarf2_build_psymtabs_hard): Change objfile parameter to
2275 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
2276 (read_abbrev_offset): Likewise.
2277 (read_indirect_string): Likewise.
2278 (read_indirect_line_string): Likewise.
2279 (read_indirect_string_at_offset): Likewise.
2280 (read_indirect_string_from_dwz): Likewise.
2281 (dwarf2_find_containing_comp_unit): Change objfile parameter to
2283 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
2284 (create_all_comp_units): Change objfile parameter to
2286 (create_all_type_units): Likewise.
2287 (process_queue): Add dwarf2_per_objfile parameter.
2288 (read_and_check_comp_unit_head): Likewise.
2289 (lookup_dwo_unit_in_dwp): Likewise.
2290 (get_dwp_file): Likewise.
2291 (process_cu_includes): Likewise.
2292 (struct free_dwo_file_cleanup_data): New struct.
2293 (dwarf2_has_info): Use get_dwarf2_per_objfile and
2294 set_dwarf2_per_objfile.
2295 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
2296 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
2297 context, adjust calls.
2298 (dw2_instantiate_symtab): Likewise.
2299 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
2300 (dw2_get_cu): Likewise.
2301 (create_cu_from_index_list): Change objfile parameter to
2303 (create_cus_from_index_list): Get dwarf2_per_objfile from
2304 context, adjust calls.
2305 (create_cus_from_index): Likewise.
2306 (create_signatured_type_table_from_index): Change objfile
2307 parameter to dwarf2_per_objfile.
2308 (create_signatured_type_table_from_debug_names): Change objfile
2309 parameter to dwarf2_per_objfile.
2310 (create_addrmap_from_index): Likewise.
2311 (create_addrmap_from_aranges): Likewise.
2312 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
2313 (dw2_setup): Remove.
2314 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
2316 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
2317 get_dwarf2_per_objfile.
2318 (dw2_forget_cached_source_info): Likewise.
2319 (dw2_map_symtabs_matching_filename): Likewise.
2320 (struct dw2_symtab_iterator) <index>: Remove.
2321 <dwarf2_per_objfile>: New field.
2322 (dw2_symtab_iter_init): Replace index parameter with
2324 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
2325 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
2326 (dw2_print_stats): Likewise.
2327 (dw2_dump): Likewise.
2328 (dw2_expand_symtabs_for_function): Likewise.
2329 (dw2_expand_all_symtabs): Likewise.
2330 (dw2_expand_symtabs_with_fullname): Likewise.
2331 (dw2_expand_marked_cus): Replace index and objfile parameters
2332 with dwarf2_per_objfile.
2333 (dw_expand_symtabs_matching_file_matcher): Add
2334 dwarf2_per_objfile parameter and adjust calls.
2335 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
2337 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
2338 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
2340 (create_cus_from_debug_names_list): Replace objfile parameter
2341 with dwarf2_per_objfile and adjust calls.
2342 (create_cus_from_debug_names): Likewise.
2343 (dwarf2_read_debug_names): Likewise.
2344 (mapped_debug_names::namei_to_name): Adjust call.
2345 (dw2_debug_names_iterator::next): Likewise.
2346 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
2347 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
2348 (dw2_debug_names_dump): Likewise.
2349 (dw2_debug_names_expand_symtabs_for_function): Likewise.
2350 (dw2_debug_names_expand_symtabs_matching): Likewise.
2351 (dwarf2_initialize_objfile): Likewise.
2352 (dwarf2_build_psymtabs): Likewise.
2353 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
2355 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
2356 (read_and_check_comp_unit_head): Likewise.
2357 (read_abbrev_offset): Likewise.
2358 (create_debug_type_hash_table): Likewise.
2359 (create_debug_types_hash_table): Likewise.
2360 (create_all_type_units): Replace objfile parameter with
2362 (add_type_unit): Add dwarf2_per_objfile parameter.
2363 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
2364 with dwarf2_per_objfile.
2365 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
2366 (lookup_dwp_signatured_type): Likewise.
2367 (lookup_signatured_type): Likewise.
2368 (read_cutu_die_from_dwo): Likewise.
2369 (init_tu_and_read_dwo_dies): Likewise.
2370 (init_cutu_and_read_dies): Likewise.
2371 (init_cutu_and_read_dies_no_follow): Likewise.
2372 (allocate_type_unit_groups_table): Add objfile parameter.
2373 (create_type_unit_group): Use dwarf2_per_objfile from cu.
2374 (get_type_unit_group): Likewise.
2375 (process_psymtab_comp_unit): Update call.
2376 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
2377 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
2378 (print_tu_stats): Likewise.
2379 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
2381 (build_type_psymtabs): Change objfile parameter to
2383 (process_skeletonless_type_unit): Use dwarf2_per_objfile
2384 passed in void* parameter.
2385 (process_skeletonless_type_units): Change objfile parameter to
2387 (set_partial_user): Likewise.
2388 (dwarf2_build_psymtabs_hard): Likewise.
2389 (read_comp_units_from_section): Likewise.
2390 (create_all_comp_units): Likewise.
2391 (scan_partial_symbols): Update calls.
2392 (add_partial_symbol): Likewise.
2393 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
2394 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
2395 (process_queue): Add dwarf2_per_objfile parameter.
2396 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
2397 (compute_compunit_symtab_includes): Likewise.
2398 (process_cu_includes): Add dwarf2_per_objfile parameter.
2399 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
2400 (process_full_type_unit): Likewise.
2401 (process_imported_unit_die): Update call.
2402 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
2403 (read_file_scope): Likewise.
2404 (allocate_dwo_file_hash_table): Add objfile parameter.
2405 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
2406 (create_cus_hash_table): Likewise.
2407 (create_dwp_hash_table): Likewise.
2408 (create_dwo_unit_in_dwp_v1): Likewise.
2409 (create_dwp_v2_section): Likewise.
2410 (create_dwo_unit_in_dwp_v2): Likewise.
2411 (lookup_dwo_unit_in_dwp): Likewise.
2412 (try_open_dwop_file): Likewise.
2413 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
2414 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
2415 cleanup to include a reference to dwarf2_per_objfile.
2416 (open_dwp_file): Add dwarf2_per_objfile parameter.
2417 (open_and_init_dwp_file): Likewise.
2418 (get_dwp_file): Likewise.
2419 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
2420 (queue_and_load_all_dwo_tus): Update call.
2421 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
2423 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
2424 (dwarf2_ranges_process): Likewise.
2425 (dwarf2_get_pc_bounds): Likewise.
2426 (mark_common_block_symbol_computed): Likewise.
2427 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
2428 (dwarf2_read_abbrevs): Update call.
2429 (read_partial_die): Use dwarf2_per_objfile from cu.
2430 (find_partial_die): Likewise.
2431 (fixup_partial_die): Likewise.
2432 (read_attribute_value): Likewise.
2433 (read_indirect_string_at_offset_from): Add objfile parameter.
2434 (read_indirect_string_at_offset): Add dwarf2_per_objfile
2436 (read_indirect_string_from_dwz): Add objfile parameter.
2437 (read_indirect_string): Add objfile parameter.
2438 (read_addr_index_1): Add dwarf2_per_objfile parameter.
2439 (read_addr_index): Use dwarf2_per_objfile from cu.
2440 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
2442 (read_str_index): Use dwarf2_per_objfile from cu.
2443 (get_debug_line_section): Likewise.
2444 (read_formatted_entries): Add dwarf2_per_objfile parameter.
2445 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
2446 (new_symbol_full): Use dwarf2_per_objfile from cu.
2447 (build_error_marker_type): Likewise.
2448 (lookup_die_type): Likewise.
2449 (determine_prefix): Likewise.
2450 (follow_die_offset): Likewise.
2451 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
2452 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
2453 (dwarf2_fetch_die_type_sect_off): Likewise.
2454 (dwarf2_get_die_type): Likewise.
2455 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
2456 (get_signatured_type): Likewise.
2457 (get_DW_AT_signature_type): Likewise.
2458 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
2459 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
2460 (cu_debug_loc_section): Likewise.
2461 (fill_in_loclist_baton): Likewise.
2462 (dwarf2_symbol_mark_computed): Likewise.
2463 (dwarf2_find_containing_comp_unit): Change objfile parameter to
2465 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
2467 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
2468 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
2469 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
2470 (set_die_type): Use dwarf2_free_objfile from cu.
2471 (get_die_type_at_offset): Likewise.
2472 (dwarf2_per_objfile_free): Don't assign global variable.
2473 (debug_names) <constructor>: Add dwarf2_per_objfile
2474 parameter, update m_debugstrlookup construction.
2475 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
2477 <m_dwarf2_per_objfile>: New field.
2478 <lookup>: Use m_dwarf2_per_objfile.
2479 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
2480 (psyms_seen_size): Likewise.
2481 (write_gdbindex): Replace objfile parameter with
2483 (write_debug_names): Likewise.
2484 (write_psymtabs_to_index): Likewise.
2485 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
2488 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
2490 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
2491 <dwarf2_per_objfile>: New field.
2492 (struct dwarf2_per_cu_data) <objfile>: Remove.
2493 <dwarf2_per_objfile>: New field.
2494 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
2496 (create_signatured_type_table_from_index): Likewise.
2497 (create_debug_type_hash_table): Likewise.
2498 (fill_in_sig_entry_from_dwo_entry): Likewise.
2499 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
2500 (create_type_unit_group): Assign dwarf2_per_objfile instead of
2502 (create_partial_symtab): Access objfile through
2504 (process_psymtab_comp_unit_reader): Likewise.
2505 (read_comp_units_from_section): Likewise.
2506 (scan_partial_symbols): Likewise.
2507 (add_partial_symbol): Likewise.
2508 (add_partial_subprogram): Likewise.
2509 (peek_die_abbrev): Likewise.
2510 (fixup_go_packaging): Likewise.
2511 (process_full_comp_unit): Likewise.
2512 (process_full_type_unit): Likewise.
2513 (process_imported_unit_die): Likewise.
2514 (dwarf2_compute_name): Likewise.
2515 (dwarf2_physname): Likewise.
2516 (read_import_statement): Likewise.
2517 (create_cus_hash_table): Assign dwarf2_physname instead of
2519 (read_func_scope): Access objfile through dwarf2_per_objfile.
2520 (read_lexical_block_scope): Likewise.
2521 (read_call_site_scope): Likewise.
2522 (read_variable): Likewise.
2523 (dwarf2_rnglists_process): Likewise.
2524 (dwarf2_ranges_process): Likewise.
2525 (dwarf2_ranges_read): Likewise.
2526 (dwarf2_record_block_ranges): Likewise.
2527 (dwarf2_add_field): Likewise.
2528 (dwarf2_add_member_fn): Likewise.
2529 (read_structure_type): Likewise.
2530 (process_structure_scope): Likewise.
2531 (read_enumeration_type): Likewise.
2532 (read_array_type): Likewise.
2533 (read_common_block): Likewise.
2534 (read_namespace_type): Likewise.
2535 (read_namespace): Likewise.
2536 (read_module_type): Likewise.
2537 (read_tag_pointer_type): Likewise.
2538 (read_tag_ptr_to_member_type): Likewise.
2539 (read_tag_string_type): Likewise.
2540 (read_subroutine_type): Likewise.
2541 (read_typedef): Likewise.
2542 (read_base_type): Likewise.
2543 (attr_to_dynamic_prop): Likewise.
2544 (read_subrange_type): Likewise.
2545 (read_unspecified_type): Likewise.
2546 (load_partial_dies): Likewise.
2547 (read_partial_die): Likewise.
2548 (find_partial_die): Likewise.
2549 (guess_partial_die_structure_name): Likewise.
2550 (fixup_partial_die): Likewise.
2551 (read_attribute_value): Likewise.
2552 (read_addr_index_from_leb128): Likewise.
2553 (dwarf2_read_addr_index): Likewise.
2554 (dwarf2_string_attr): Likewise.
2555 (lnp_state_machine::check_line_address): Likewise.
2556 (dwarf_decode_lines_1): Likewise.
2557 (dwarf_decode_lines): Likewise.
2558 (dwarf2_start_symtab): Likewise.
2559 (var_decode_location): Likewise.
2560 (new_symbol_full): Likewise.
2561 (dwarf2_const_value_data): Likewise.
2562 (dwarf2_const_value_attr): Likewise.
2563 (dwarf2_const_value): Likewise.
2564 (die_type): Likewise.
2565 (die_containing_type): Likewise.
2566 (lookup_die_type): Likewise.
2567 (guess_full_die_structure_name): Likewise.
2568 (anonymous_struct_prefix): Likewise.
2569 (dwarf2_name): Likewise.
2570 (follow_die_ref_or_sig): Likewise.
2571 (follow_die_offset): Likewise.
2572 (follow_die_ref): Likewise.
2573 (dwarf2_fetch_die_loc_sect_off): Likewise.
2574 (dwarf2_fetch_constant_bytes): Likewise.
2575 (dwarf2_fetch_die_type_sect_off): Likewise.
2576 (dwarf2_get_die_type): Likewise.
2577 (follow_die_sig): Likewise.
2578 (decode_locdesc): Likewise.
2579 (dwarf2_per_cu_objfile): Likewise.
2580 (dwarf2_per_cu_text_offset): Likewise.
2581 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
2583 (set_die_type): Access objfile through
2586 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
2588 * valprint.c (converted_character_d): Remove typedef.
2589 (DEF_VEC_O (converted_character_d)): Remove.
2590 (count_next_character): Use std::vector.
2591 (print_converted_chars_to_obstack): Likewise.
2592 (generic_printstr): Likewise.
2594 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2596 * xml-support.h (struct gdb_xml_value): Add constructor.
2597 <value>: Change type to unique_xmalloc_ptr.
2598 (gdb_xml_value_s): Remove typedef.
2599 (DEF_VEC_O (gdb_xml_value_s)): Remove.
2600 (gdb_xml_element_start_handler): Change parameter type to
2602 (xml_find_attribute): Likewise.
2603 * xml-support.c (xml_find_attribute): Change parameter type to
2604 std::vector and adjust.
2605 (gdb_xml_values_cleanup): Remove.
2606 (gdb_xml_parser::start_element): Adjust to std::vector.
2607 (xinclude_start_include): Change paraeter type to std::vector
2609 * btrace.c (check_xml_btrace_version): Likewise.
2610 (parse_xml_btrace_block): Likewise.
2611 (parse_xml_btrace_pt_config_cpu): Likewise.
2612 (parse_xml_btrace_pt): Likewise.
2613 (parse_xml_btrace_conf_bts): Likewise.
2614 (parse_xml_btrace_conf_pt): Likewise.
2615 * memory-map.c (memory_map_start_memory): Likewise.
2616 (memory_map_start_property): Likewise.
2617 * osdata.c (osdata_start_osdata): Likewise.
2618 (osdata_start_item): Likewise.
2619 (osdata_start_column): Likewise.
2620 * remote.c (start_thread): Likewise.
2621 * solib-aix.c (library_list_start_library): Likewise.
2622 (library_list_start_list): Likewise.
2623 * solib-svr4.c (library_list_start_library): Likewise.
2624 (svr4_library_list_start_list): Likewise.
2625 * solib-target.c (library_list_start_segment): Likewise.
2626 (library_list_start_section): Likewise.
2627 (library_list_start_library): Likewise.
2628 (library_list_start_list): Likewise.
2629 * tracepoint.c (traceframe_info_start_memory): Likewise.
2630 (traceframe_info_start_tvar): Likewise.
2631 * xml-syscall.c (syscall_start_syscall): Likewise.
2632 * xml-tdesc.c (tdesc_start_target): Likewise.
2633 (tdesc_start_feature): Likewise.
2634 (tdesc_start_reg): Likewise.
2635 (tdesc_start_union): Likewise.
2636 (tdesc_start_struct): Likewise.
2637 (tdesc_start_flags): Likewise.
2638 (tdesc_start_enum): Likewise.
2639 (tdesc_start_field): Likewise.
2640 (tdesc_start_enum_value): Likewise.
2641 (tdesc_start_vector): Likewise.
2643 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2645 * extension.h (struct xmethod_worker) <clone>: Remove.
2646 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
2648 (python_xmethod_worker::clone): Remove.
2649 * valops.c (find_overload_match): Use std::move instead of
2652 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2654 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
2655 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
2656 <free_xmethod_worker_data>: Remove.
2657 <get_matching_xmethod_workers>: Chance VEC to std::vector.
2658 <get_xmethod_arg_types>: Remove.
2659 <get_xmethod_result_type>: Remove.
2660 <invoke_xmethod>: Remove.
2661 * extension.c (new_xmethod_worker): Remove.
2662 (clone_xmethod_worker): Remove.
2663 (get_matching_xmethod_workers): Return void, pass std::vector by
2665 (get_xmethod_arg_types): Rename to...
2666 (xmethod_worker::get_arg_types): ... this, and adjust.
2667 (get_xmethod_result_type): Rename to...
2668 (xmethod_worker::get_result_type): ... this, and adjust.
2669 (invoke_xmethod): Remove.
2670 (free_xmethod_worker): Remove.
2671 (free_xmethod_worker_vec): Remove.
2672 * extension.h (enum ext_lang_rc): Move here from
2674 (struct xmethod_worker): Add constructor and destructor.
2677 <invoke, clone, do_get_result_type, do_get_arg_types>: New
2678 virtual pure methods.
2679 <get_arg_types, get_result_type>: New methods.
2680 (xmethod_worker_ptr): Remove typedef.
2681 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
2682 (xmethod_worker_vec): Remove typedef.
2683 (xmethod_worker_up): New typedef.
2684 (invoke_xmethod): Remove.
2685 (clone_xmethod_worker): Remove.
2686 (free_xmethod_worker): Remove.
2687 (free_xmethod_worker_vec): Remove.
2688 (get_xmethod_arg_types): Remove.
2689 (get_xmethod_result_type): Remove.
2690 * valops.c (find_method_list): Use std::vector, don't use
2691 intermediate vector.
2692 (value_find_oload_method_list): Use std::vector.
2693 (find_overload_match): Use std::vector.
2694 (find_oload_champ): Use std::vector.
2695 * value.c (value_free): Use operator delete.
2696 (value_of_xmethod): Rename to...
2697 (value_from_xmethod): ... this. Don't assign
2698 xmethod_worker::value, take rvalue-reference.
2699 (result_type_of_xmethod): Adjust.
2700 (call_xmethod): Adjust.
2701 * value.h: Include extension.h.
2702 (struct xmethod_worker): Don't forward-declare.
2703 (value_of_xmethod): Rename to...
2704 (value_from_xmethod): ... this, take rvalue-reference.
2705 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
2706 (struct python_xmethod_worker): ... this, add constructor and
2708 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
2709 (gdbpy_free_xmethod_worker_data): Rename to...
2710 (python_xmethod_worker::~python_xmethod_worker): ... this and
2712 (gdbpy_clone_xmethod_worker_data): Rename to...
2713 (python_xmethod_worker::clone): ... this and adjust.
2714 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
2716 (gdbpy_get_xmethod_arg_types): Rename to...
2717 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
2718 (gdbpy_get_xmethod_result_type): Rename to...
2719 (python_xmethod_worker::do_get_result_type): ... this and
2721 (gdbpy_invoke_xmethod): Rename to...
2722 (python_xmethod_worker::invoke): ... this and adjust.
2723 (new_python_xmethod_worker): Rename to...
2724 (python_xmethod_worker::python_xmethod_worker): ... this and
2726 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
2728 (gdbpy_free_xmethod_worker_data): Remove.
2729 (gdbpy_get_matching_xmethod_workers): Use std::vector.
2730 (gdbpy_get_xmethod_arg_types): Remove.
2731 (gdbpy_get_xmethod_result_type): Remove.
2732 (gdbpy_invoke_xmethod): Remove.
2733 * python/python.c (python_extension_ops): Remove obsolete
2736 2018-01-05 Pedro Alves <palves@redhat.com>
2739 * common/signals-state-save-restore.c
2740 (save_original_signals_state): New parameter 'quiet'. Warn if we
2741 find a custom handler preinstalled, instead of internal erroring.
2742 But only warn if !quiet.
2743 * common/signals-state-save-restore.h
2744 (save_original_signals_state): New parameter 'quiet'.
2745 * main.c (captured_main_1): Move save_original_signals_state call
2746 after option handling, and pass QUIET.
2748 2018-01-05 Pedro Alves <palves@redhat.com>
2750 * spu-tdep.c (spu_catch_start): Pass
2751 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
2753 2018-01-05 Pedro Alves <palves@redhat.com>
2756 * ada-lang.c (literal_symbol_name_matcher): New function.
2757 (ada_get_symbol_name_matcher): Use it for
2758 symbol_name_match_type::SEARCH_NAME.
2759 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
2760 it down instead of assuming symbol_name_match_type::FULL.
2761 * block.h (block_lookup_symbol): New parameter 'match_type'.
2762 * c-valprint.c (print_unpacked_pointer): Use
2763 lookup_symbol_search_name instead of lookup_symbol.
2764 * compile/compile-object-load.c (get_out_value_type): Pass down
2765 symbol_name_match_type::SEARCH_NAME.
2766 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
2767 symbol_name_match_type::FULL.
2768 * cp-support.c (cp_get_symbol_name_matcher): Handle
2769 symbol_name_match_type::SEARCH_NAME.
2770 * infrun.c (insert_exception_resume_breakpoint): Use
2771 lookup_symbol_search_name.
2772 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
2773 * psymtab.c (maintenance_check_psymtabs): Use
2774 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
2775 * stack.c (print_frame_args): Use lookup_symbol_search_name and
2777 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
2778 if symbol_name_match_type::SEARCH_NAME.
2779 (lookup_symbol_in_language): Pass down
2780 symbol_name_match_type::FULL.
2781 (lookup_symbol_search_name): New.
2782 (lookup_language_this): Pass down
2783 symbol_name_match_type::SEARCH_NAME.
2784 (lookup_symbol_aux, lookup_local_symbol): New parameter
2785 'match_type'. Pass it down.
2786 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
2787 (lookup_symbol_search_name): New declaration.
2788 (lookup_symbol_in_block): New 'match_type' parameter.
2790 2018-01-05 Pedro Alves <palves@redhat.com>
2793 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
2795 (ada_lookup_symbol): Reimplement in terms of
2796 ada_lookup_symbol_list, bits factored out from
2797 ada_lookup_encoded_symbol.
2799 2018-01-05 Joel Brobecker <brobecker@adacore.com>
2801 * ada-exp.y (write_object_renaming): When subscripting an array
2802 using a symbol as the index, pass the block in call to
2803 ada_lookup_encoded_symbol when looking that symbol up.
2805 2018-01-05 Jerome Guitton <guitton@adacore.com>
2807 * ada-lang.c (ada_array_length): Use ada_index_type instead of
2810 2018-01-05 Joel Brobecker <brobecker@adacore.com>
2812 * ada-lang.c (ada_to_fixed_value_create): Add handling of
2813 the case where VALUE_LVAL (val0) is not lval_memory.
2815 2018-01-05 Xavier Roirand <roirand@adacore.com>
2817 * ada-valprint.c (print_optional_low_bound): Handle
2818 character-indexed array printing like boolean-indexed array
2821 2018-01-05 Joel Brobecker <brobecker@adacore.com>
2823 * NEWS: Create a new section for the next release branch.
2824 Rename the section of the current branch, now that it has
2827 2018-01-05 Joel Brobecker <brobecker@adacore.com>
2829 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
2830 * version.in: Bump version to 8.1.50.DATE-git.
2832 2018-01-03 Xavier Roirand <roirand@adacore.com>
2834 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
2836 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
2838 (default_exception_support_info) <catch_handlers_sym>: Add field.
2839 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
2840 (ada_exception_name_addr_1): Add "catch handlers" handling.
2841 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
2843 (create_excep_cond_exprs) <ex>: Add parameter.
2844 (re_set_exception): Update create_excep_cond_exprs call.
2845 (print_it_exception, print_one_exception, print_mention_exception)
2846 (print_recreate_exception): Add "catch handler" handling.
2847 (allocate_location_catch_handlers, re_set_catch_handlers)
2848 (check_status_catch_handlers, print_it_catch_handlers)
2849 (print_one_catch_handlers, print_mention_catch_handlers)
2850 (print_recreate_catch_handlers): New function.
2851 (catch_handlers_breakpoint_ops): New variable.
2852 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
2853 Add parameter. Add "catch handler" handling.
2854 (ada_exception_sym_name, ada_exception_breakpoint_ops):
2855 Add "catch handler" handling.
2856 (ada_exception_catchpoint_cond_string): Add "catch handler"
2858 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
2860 (catch_ada_handlers_command): New function.
2861 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
2862 operations structure.
2863 (_initialize_ada_language): Add "catch handlers" command entry.
2864 * NEWS: Document "catch handlers" feature.
2866 2018-01-02 Joel Brobecker <brobecker@adacore.com>
2868 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
2869 account when creating the array type of the slice.
2870 (ada_value_slice): Likewise.
2872 2018-01-02 Joel Brobecker <brobecker@adacore.com>
2874 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
2876 (create_array_type_with_stride): Add byte_stride_prop parameter.
2877 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
2878 New parameter. Update all callers in this file.
2879 (array_type_has_dynamic_stride): New function.
2880 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
2881 of arrays with dynamic byte strides.
2882 * dwarf2read.c (read_array_type): Add support for dynamic
2883 DW_AT_byte_stride attributes.
2885 2018-01-02 Joel Brobecker <brobecker@adacore.com>
2887 * dwarf2read.c (read_unspecified_type): Treat
2888 DW_TAG_enumeration_type DIEs from Ada units as stubs.
2890 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2892 Update copyright year range in all GDB files.
2894 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2896 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
2897 and gdb/testsuite/gdb.base/step-line.c.
2899 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2901 * copyright.py (main): Dump the contents of
2902 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
2903 even if BY_HAND is empty.
2905 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2907 * top.c (print_gdb_version): Update Copyright year in version
2910 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2912 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
2914 For older changes see ChangeLog-2017.
2920 version-control: never