1 2018-08-21 Alan Hayward <alan.hayward@arm.com>
3 * NEWS: Add SVE to 8.2 section.
5 2018-08-21 Pedro Alves <palves@redhat.com>
7 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
8 out from gdbscm_parse_function_args.
9 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
10 gdbscm_parse_function_args_1.
12 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
15 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
18 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
20 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
22 2018-08-19 Michael Spang <spang@google.com>
25 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
28 2018-08-18 Kevin Buettner <kevinb@redhat.com>
30 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
32 * dwarf2-frame.c (class dwarf_expr_executor):
33 Add override for dwarf_variable_value.
34 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
35 (class symbol_needs_eval_context): Likewise.
36 (indirect_synthetic_pointer): Add forward declaration.
37 (sect_variable_value): New function.
38 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
39 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
40 for DW_OP_GNU_variable_value.
42 2018-08-16 Tom Tromey <tom@tromey.com>
44 * top.c (read_command_file): Update.
45 (command_line_input): Remove "repeat" argument.
46 * ada-lang.c (get_selections): Update.
47 * linespec.c (decode_line_2): Update.
48 * defs.h (command_line_input): Remove argument.
49 * cli/cli-script.c (read_next_line): Update.
50 * python/py-gdb-readline.c: Update.
52 2018-08-17 Tom Tromey <tom@tromey.com>
54 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
57 2018-08-15 Tom Tromey <tom@tromey.com>
59 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
61 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
63 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
64 If used, use find_pc_partial_function to find address range
66 * mi/mi-main.c (mi_cmd_list_features): Report
67 "data-disassemble-a-option" feature.
68 * NEWS: Mention new -data-disassemble option -a.
70 2018-08-13 Tom Tromey <tom@tromey.com>
72 * common/common-defs.h (_FORTIFY_SOURCE): Define.
74 2018-08-13 Alan Hayward <alan.hayward@arm.com>
76 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
77 (aarch64_linux_collect_sve_regset): Likewise.
78 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
79 * regcache.h (regcache_map_entry_size): New function.
81 2018-08-13 Alan Hayward <alan.hayward@arm.com>
83 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
84 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
85 (SVE_HEADER_VL_LENGTH): Likewise.
86 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
87 (SVE_HEADER_FLAGS_LENGTH): Likewise.
88 (SVE_HEADER_RESERVED_LENGTH): Likewise.
89 (SVE_HEADER_SIZE_OFFSET): Likewise.
90 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
91 (SVE_HEADER_VL_OFFSET): Likewise.
92 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
93 (SVE_HEADER_FLAGS_OFFSET): Likewise.
94 (SVE_HEADER_RESERVED_OFFSET): Likewise.
95 (SVE_HEADER_SIZE): Likewise.
96 (aarch64_linux_core_read_vq): Add function.
97 (aarch64_linux_core_read_description): Check for SVE section.
99 2018-08-13 Alan Hayward <alan.hayward@arm.com>
101 * aarch64-fbsd-tdep.c
102 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
104 * aarch64-linux-tdep.c
105 (aarch64_linux_iterate_over_regset_sections): Likewise.
107 (alpha_linux_iterate_over_regset_sections):
109 (alphanbsd_iterate_over_regset_sections): Likewise.
111 (amd64fbsd_iterate_over_regset_sections): Likewise.
113 (amd64_linux_iterate_over_regset_sections): Likewise.
115 (armbsd_iterate_over_regset_sections): Likewise.
117 (arm_fbsd_iterate_over_regset_sections): Likewise.
119 (arm_linux_iterate_over_regset_sections): Likewise.
120 * corelow.c (get_core_registers_cb): Likewise.
121 (core_target::fetch_registers): Likewise.
122 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
123 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
124 * gdbarch.h (void): Regenerate.
125 * gdbarch.sh: Add supply_size and collect_size.
126 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
127 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
128 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
129 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
130 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
131 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
132 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
133 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
134 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
135 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
136 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
137 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
138 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
139 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
140 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
141 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
142 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
143 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
144 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
145 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
146 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
147 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
148 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
149 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
150 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
151 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
152 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
153 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
154 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
155 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
157 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
159 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
162 2018-08-10 Keith Seitz <keiths@redhat.com>
164 * compile/compile-c-support.c (add_code_header, add_code_footer):
165 Move into policy class.
166 (c_push_user_expression, pop_user_expression_nop)
167 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
168 (compile_program): New host class.
169 (c_compile_program): New typedef.
170 (c_compute_porgram): Use c_compile_program.
172 2018-08-10 Keith Seitz <keiths@redhat.com>
174 * compile/compile-internal.h (compile_instance::~compile_instance):
175 Remove calls to htab_delete.
176 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
177 * compile.c (compile_instance::compile_instance): Initialize
178 htab unique pointers.
179 (compile_instance::get_cached_type, compile_instance::insert_type)
180 (compile_instance::error_symbol_once): Update for unique_ptr.
182 2018-08-10 Keith Seitz <keiths@redhat.com>
184 * compile/compile-c-symbols.c (struct symbol_error)
185 (hash_symbol_error, eq_symbol_error, del_symbol_error)
186 (compile_instance::insert_symbol_error)
187 (compile_instance::error_symbol_once): Move to ...
188 * compile/compile.c: ... here.
190 2018-08-10 Keith Seitz <keiths@redhat.com>
192 * compile/compile-c-support.c (c_get_compile_context): Use `new'
193 instead of `new_compile_instance'.
194 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
196 If the symbol error map is not initialized, create it.
197 (generate_c_for_for_one_symbol): Do not check/initialize
198 the symbol error map.
199 * compile/compile-c-types.c (compile_c_instance): Make a class.
201 (compile_instance::compile_instance): Initialize the type cache.
202 (get_cached_type): New function.
203 (insert_type): Update description.
204 (compile_c_instance::m_default_cflags): Define.
205 (convert_type): Update description. Use get_cached_type.
206 (delete_instance): Moved to destructor.
207 (new_compile_instance): Moved to constructor.
208 * compile/compile-c.h (compile_c_instance): Make class inheriting
209 from compile_instance.
210 <base>: Remove field.
211 <type_map, symbol_err_map>: Move to base class.
212 <c_plugin>: Rename to `m_plugin' and remove pointer type.
213 * compile/compile-internal.h (compile_instance): Make class.
214 <type_map_t, symbol_err_map_t>: Define.
215 <fe>: Rename to `m_gcc_fe'.
216 <scope, block, gcc_target_options>: Add `m_' prefix.
217 <m_type_map, m_symbol_err_map>: New fields, moved from
220 (convert_type, new_compile_instance): Remove.
221 * compile/compile.c (cleanup_compile_instance): Remove.
222 (compile_to_object): Use unique_ptr to eliminate cleanups.
223 (compile_instance::set_print_callback, compile_instance::version)
224 (compile_instance::set_verbose)
225 (compile_instance::set_driver_filename)
226 (compile_instance::set_triplet_regexp)
227 (compile_instance::set_arguments)
228 (compile_instance::set_source_file)
229 (compile_instance::compile): Define.
231 2018-08-10 Keith Seitz <keiths@redhat.com>
233 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
234 * compile/compile-c-types.c: Define GCC_METHODN macros and include
235 gcc-c-fe.def to define C plugin.
236 (delete_instance): Delete `c_plugin'.
237 (new_compile_instance): Initialize `c_plugin'.
238 * compile/compile-c.h: Include gcc_c_plugin.h.
239 (struct compile_c_instance) <c_plugin>: New member.
240 * gcc-c-plugin.h: New file.
241 Update all callers with API change.
243 2018-08-10 Keith Seitz <keiths@redhat.com>
245 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
246 (HFILES_NO_SRCDIR): ... to here.
247 Add compile-internal.h and compile-c.h.
248 * compile/compile-c-support.c: Include compile-c.h.
249 * compile/compile-c-symbols.c: Include compile-c.h.
250 (generate_c_for_variable_locations): Update comment.
251 * compile/compile-c-types.c: Include compile-c.h.
252 * compile/compile-c.h: New file -- moved C language declarations
253 from other files here.
254 * compile/compile-internal.h: Do not include hashtab.h or
256 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
257 (gcc_convert_symbol, gcc_symbol_address)
258 (generate_c_for_variable_locations, c_get_mode_for_size)
259 (c_get_range_decl_name): Definitions moved to compile-c.h.
260 * compile/compile-loc2c.c: Include compile-c.h.
262 2018-08-10 Keith Seitz <keiths@redhat.com>
264 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
265 (c_symbol_substitution_name): ... this.
268 2018-08-10 Keith Seitz <keiths@redhat.com>
270 * compile/compile-c-support.c (c_compute_program): Use
271 unique_xmalloc_ptr to eliminate cleanup.
272 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
273 Return a unique_xmalloc_ptr and eliminate cleanup.
274 * compile/compile-internal.h (generate_c_for_variable_locations):
275 Return unique_xmalloc_ptr and update description.
277 2018-08-10 Alan Hayward <alan.hayward@arm.com>
279 * corelow.c (core_target::get_core_register_section): Rename
280 min_size to section_min_size.
282 2018-08-09 Jim Wilson <jimw@sifive.com>
284 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
285 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
286 * NEWS: Mention new GNU/Linux RISC-V target.
287 * configure.host: Add riscv*-*-linux*.
288 * configure.nat: Add riscv*.
289 * configure.tgt: Add riscv*-*-linux*.
290 * riscv-linux-nat.c: New file.
291 * riscv-linux-tdep.c: New file.
293 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
295 * infrun.c (resume): Make static, add forward declaration.
296 (proceed): Update header comment.
297 * infrun.h (resume): Delete declaration.
299 2018-08-09 Tom Tromey <tom@tromey.com>
301 * riscv-tdep.h: Minor formatting fixes.
303 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
305 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
306 * dwarf-index-cache.c (create_dir_and_check): Likewise.
307 (test_mkdir_recursive): Likewise.
308 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
310 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
312 * valarith.c (value_subscripted_rvalue): If an array is not in
313 memory, and we don't know the upper bound, then we can't know that
314 the requested element exists or not.
316 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
318 * target.c (str_comma_list_concat_elem): Fix typo in comment.
319 (target_options_to_string): Add comment.
321 2018-08-08 Tom Tromey <tom@tromey.com>
323 * unittests/scoped_mmap-selftests.c: Check result of "write".
325 2018-08-08 Jim Wilson <jimw@sifive.com>
327 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
328 (decode_register_index_short): New.
329 (decode_j_type_insn, decode_cj_type_insn): New.
330 (decode_b_type_insn, decode_cb_type_insn): New.
331 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
332 local xlen. Check xlen when decoding ambiguous compressed insns. In
333 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
334 is_c_sw_insn instead of is_sw_insn.
335 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
336 (riscv_software_single_step): New.
337 * riscv-tdep.h (riscv_software_single_step): Declare.
339 * riscv-tdep.c (riscv_isa_xlen): Drop static.
340 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
342 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
345 * target.c (dispose_inferior): Don't dispose of inferiors that are
348 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
350 * remote.c (remote_target::download_tracepoint): Change char* to
353 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
355 * target.h (target_options_to_string): Return an std::string.
356 * target.c (str_comma_list_concat_elem): Return void, use
358 (do_option): Likewise.
359 (target_options_to_string): Return an std::string.
360 * linux-nat.c (linux_nat_target::wait): Adjust.
361 * target-debug.h (target_debug_print_options): Adjust.
363 2018-08-07 Tom Tromey <tom@tromey.com>
365 * Makefile.in (CPPFLAGS): New variable.
366 (INTERNAL_CPPFLAGS): Use it.
368 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
370 * NEWS: Mention the index cache.
372 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
374 * common/pathstuff.h (get_standard_cache_dir): New.
375 * common/pathstuff.c (get_standard_cache_dir): New.
376 * build-id.h (build_id_to_string): New.
377 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
378 DEBUG_STR_SUFFIX): Move to here.
379 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
380 DEBUG_STR_SUFFIX): Move from there.
381 (write_psymtabs_to_index): Make non-static, add basename
382 parameter. Write to temporary files, rename when done.
383 (save_gdb_index_command): Adjust call to
384 write_psymtabs_to_index.
385 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
387 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
388 (get_gdb_index_contents_from_cache): New.
389 (get_gdb_index_contents_from_cache_dwz): New.
390 (dwarf2_initialize_objfile): Read index from cache.
391 (dwarf2_build_psymtabs): Save to index.
392 * dwarf-index-cache.h: New file.
393 * dwarf-index-cache.c: New file.
394 * dwarf-index-write.h: New file.
396 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
398 * gnulib/aclocal.m4: Re-generate.
399 * gnulib/config.in: Re-generate.
400 * gnulib/configure: Re-generate.
401 * gnulib/import/Makefile.am: Re-generate.
402 * gnulib/import/Makefile.in: Re-generate.
403 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
404 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
405 * gnulib/import/m4/mkdir.m4: New file.
406 * gnulib/import/mkdir.c: New file.
407 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
410 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
412 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
413 * common/scoped_mmap.c: New file.
414 * common/scoped_mmap.h (destroy): New method.
415 (~scoped_mmap, reset): Use destroy.
416 (scoped_mmap): New move constructor.
417 (mmap_file): New declaration.
418 * unittests/scoped_mmap-selftests.c (test_normal,
419 test_invalid_filename, run_tests): New functions.
420 (_initialize_scoped_mmap_selftests): Register selftest.
422 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
424 * dwarf2read.c (read_gdb_index_from_section): Rename to...
425 (read_gdb_index_from_buffer): ... this. Remove section
426 parameter, add buffer parameter.
427 (get_gdb_index_contents_ftype,
428 get_gdb_index_contents_dwz_ftype): New typedefs.
429 (dwarf2_read_gdb_index): Add callback parameters to get the
431 (get_gdb_index_contents_from_section): New.
432 (dwarf2_initialize_objfile): Update call to
433 dwarf2_read_gdb_index.
435 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
437 * common/filestuff.h (gdb_fopen_cloexec): New overload.
438 (gdb_open_cloexec): Likewise.
439 * nat/linux-osdata.c (command_from_pid): Use string_printf.
440 (commandline_from_pid): Likewise.
441 (linux_xfer_osdata_threads): Likewise.
442 (linux_xfer_osdata_fds): Likewise.
443 * ada-lang.c (is_package_name): Likewise.
444 * auxv.c (procfs_xfer_auxv): Likewise.
445 * breakpoint.c (print_one_breakpoint_location): Use
447 (print_one_catch_solib): Use string_printf.
448 * coff-pe-read.c (add_pe_exported_sym): Likewise.
449 (add_pe_forwarded_sym): Likewise.
450 * dwarf2read.c (create_type_unit_group): Likewise.
451 (build_error_marker_type): Likewise.
452 * infcall.c (get_function_name): Likewise.
453 * valprint.c (print_converted_chars_to_obstack): Likewise.
454 * xtensa-tdep.c (xtensa_register_type): Likewise.
456 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
458 * remote.c (remote_target::download_tracepoint): Fix format
461 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
463 * tracefile.c: Include common/byte-vector.h.
464 (trace_save): Change type of buf to gdb::byte_vector. Initialize
465 with trace_regblock_size if needed. Update uses of buf.
467 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
469 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
470 std::vector<unsigned char>.
471 * tracepoint.c (collection_list::collection_list): Remove
472 m_regs_mask initializer from initializer list. Resize
473 m_regs_mask using the largest remote register number.
474 (collection_list::add_remote_register): Remove size check on
475 m_regs_mask. Use at to access element.
476 (collection_list::stringify): Change type of temp_buf to
477 gdb::char_vector. Update uses of temp_buf. Resize if needed to
478 stringify the register mask. Use pack_hex_byte for the register
481 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
483 * tracepoint.h (class collection_list) <add_register>: Remove.
484 <add_remote_register, add_ax_registers, add_local_register>:
486 <add_memrange>: Add scope parameter.
487 * tracepoint.c (encode_actions_1): Likewise.
488 (collection_list::add_register): Rename to ...
489 (collection_list::add_remote_register): ... this. Update
491 (collection_list::add_ax_registers, add_local_register): New
493 (collection_list::add_memrange): Add scope parameter. Call
494 add_local_register instead of add_register.
495 (finalize_tracepoint_aexpr): New function.
496 (collection_list::collect_symbol): Update calls to add_memrange.
497 Call add_local_register instead of add_register. Call
498 add_ax_registers. Call finalize_tracepoint_aexpr.
499 (encode_actions_1): Get remote regnos for $reg action. Call
500 add_remote_register, add_ax_registers, and add_local_register.
501 Update call to add_memrange. Call finalize_tracepoint_aexpr.
502 (validate_actionline): Call finalize_tracepoint_aexpr.
504 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
506 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
507 Replace array buf with gdb::char_vector buf, of size
508 get_remote_packet_size (). Replace references to buf and
509 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
510 and xsnprintf with snprintf. Raise errors if the buffer is too
513 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
515 * remote.c (remote_target::download_tracepoint): Fix the has_more
516 predicate in the QTDP action list iteration.
518 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
520 * remote.c (remote_target::download_tracepoint): Fix indentation
523 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
525 * proc-api.c (_initialize_proc_api): Remove c, unused.
526 * procfs.c (procfs_init_inferior): Remove signals, unused.
527 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
530 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
531 Andrew Burgess <andrew.burgess@embecosm.com>
533 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
534 'W_STOPCODE (0)' as this could be ambiguous.
536 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
538 * ser-tcp.c (net_open): Fix thinko when deciding whether to
539 disable TCP's Nagle algorithm (use "ai_protocol" instead of
542 2018-08-02 Tom Tromey <tom@tromey.com>
545 * dwarf2read.c (read_func_scope): Set symtab on template parameter
547 (process_structure_scope): Likewise.
549 2018-08-02 Xavier Roirand <roirand@adacore.com>
552 * darwin-nat.c (darwin_kill_inferior): Fix handling of
555 2018-08-02 Tom Tromey <tom@tromey.com>
557 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
558 (darwin_suspend_inferior, darwin_resume_inferior)
559 (darwin_decode_notify_message, darwin_resume_inferior_threads)
560 (darwin_check_new_threads): Check result of get_darwin_inferior.
562 2018-07-31 Joel Brobecker <brobecker@adacore.com>
566 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
568 * varobj.c (varobj_get_path_expr_parent): Report an error if
569 parent is a dynamic varobj.
571 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
573 * gnulib/aclocal.m4: Re-generate.
574 * gnulib/config.in: Re-generate.
575 * gnulib/configure: Re-generate.
576 * gnulib/import/Makefile.in: Re-generate.
577 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
578 * gnulib/import/m4/onceonly.m4: Re-generate.
580 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
582 * target-descriptions.c (struct xml_test_tdesc): New.
583 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
584 (record_xml_tdesc): Update.
585 (maintenance_check_xml_descriptions): Update.
586 * target-descriptions.h (record_xml_tdesc): Update comment.
588 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
590 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
591 checking array bounds are defined.
593 2018-07-30 Tom Tromey <tom@tromey.com>
595 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
596 irreflexivity violation.
598 2018-07-30 Tom Tromey <tom@tromey.com>
600 * cli/cli-decode.c (lookup_cmd): Remove lint code.
601 * value.c (unpack_long): Remove lint code.
602 * valops.c (value_ind): Remove lint code.
603 * valarith.c (value_x_binop, value_x_unop, value_equal)
604 (value_pos): Remove lint code.
606 2018-07-28 Tom de Vries <tdevries@suse.de>
608 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
609 with undefined upper bound as <optimized out>.
611 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
613 * gcore.in: Rename variable "name" to "prefix". Expand
616 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
618 * windows-nat.c (windows_nat_target::create_inferior): Update to
619 call close() in global namespace.
621 2018-07-26 Tom Tromey <tom@tromey.com>
623 * dwarf-index-write.c (add_address_entry): Don't add objfile
625 * dbxread.c (find_stab_function): Rename from
626 find_stab_function_addr. Return a bound_minimal_symbol.
627 (read_dbx_symtab): Use raw_text_low, raw_text_high.
628 Don't add objfile offsets.
629 (end_psymtab): Use raw_text_low, raw_text_high,
630 MSYMBOL_VALUE_RAW_ADDRESS.
631 (read_ofile_symtab): Update.
632 (process_one_symbol): Update.
633 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
635 (dw2_relocate): Remove.
636 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
638 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
640 (process_psymtab_comp_unit_reader, add_partial_symbol)
641 (add_partial_subprogram, dwarf2_ranges_read): Update.
642 (load_partial_dies): Update.
643 (add_address_entry): Don't add objfile offsets.
644 (dwarf2_build_include_psymtabs): Update.
645 (create_addrmap_from_aranges): Don't add objfile offsets.
646 (dw2_find_pc_sect_compunit_symtab): Update.
647 * mdebugread.c (parse_symbol): Don't add objfile offsets.
648 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
650 (parse_partial_symbols): Don't add objfile offsets. Use
651 raw_text_low, raw_text_high. Update.
652 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
653 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
654 or call 'relocate' quick function. Clear psymbol_map.
655 * psympriv.h (struct partial_symbol) <address>: Add section
657 <set_unrelocated_address>: Rename from set_address.
658 <raw_text_low, raw_text_high>: New methods.
659 <text_low, text_high>: Add objfile parameter.
660 (add_psymbol_to_bcache): Add 'section' parameter. Call
661 set_unrelocated_address.
662 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
663 (find_pc_psymbol): Update.
664 (fixup_psymbol_section, relocate_psymtabs): Remove.
665 (dump_psymtab, psym_functions): Update.
666 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
668 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
669 (start_psymtab_common): Update.
670 * symfile-debug.c (debug_qf_relocate): Remove.
671 (debug_sym_quick_functions): Update.
672 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
673 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
676 2018-07-26 Tom Tromey <tromey@redhat.com>
678 * dbxread.c (end_psymtab): Use text_high_valid and
680 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
681 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
682 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
684 <text_low_valid, text_high_valid>: New fields.
685 <set_text_low, set_text_high>: Update.
686 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
688 2018-07-26 Tom Tromey <tom@tromey.com>
690 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
692 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
693 textlow and texthigh fields.
694 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
696 * mdebugread.c (parse_lines, parse_partial_symbols)
697 (psymtab_to_symtab_1): Update.
698 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
699 Rename fields. Update comment. Now private.
700 <text_low, text_high, set_text_low, set_text_high>: New methods.
701 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
702 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
703 (start_psymtab_common, maintenance_info_psymtabs)
704 (maintenance_check_psymtabs): Update.
705 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
707 (scan_xcoff_symtab): Update.
709 2018-07-26 Tom Tromey <tromey@redhat.com>
711 * psympriv.h (struct partial_symbol) <unrelocated_address,
712 address, set_address>: New methods.
713 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
714 (fixup_psymbol_section, relocate_psymtabs): Update.
715 (print_partial_symbols): Add 'objfile' parameter. Update.
716 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
719 2018-07-26 Tom Tromey <tom@tromey.com>
721 * dwarf-index-write.c (write_psymbols, debug_names::insert)
722 (debug_names::write_psymbols): Update.
723 * psympriv.h (struct partial_symbol): Derive from
725 <obj_section>: New method.
726 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
727 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
728 (find_pc_sect_psymbol, fixup_psymbol_section)
729 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
730 (print_partial_symbols, recursively_search_psymtabs)
731 (compare_psymbols, psymbol_hash, psymbol_compare)
732 (add_psymbol_to_bcache, maintenance_check_psymtabs)
733 (psymbol_name_matches, psym_fill_psymbol_map): Update.
735 2018-07-26 Tom Tromey <tromey@redhat.com>
737 * dbxread.c (end_psymtab): Remove dead code.
739 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
741 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
742 DWARF unwinders are disabled.
743 * dwarf2-frame.c: Add dwarf2read.h include.
744 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
746 (dwarf2_frame_unwinders_enabled_p): Define.
747 (show_dwarf_unwinders_enabled_p): New function.
748 (_initialize_dwarf2_frame): Register switch to control DWARF
750 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
751 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
752 (show_dwarf_cmdlist): Remove static keyword.
753 * dwarf2read.h (set_dwarf_cmdlist): Declare.
754 (show_dwarf_cmdlist): Declare.
755 * NEWS: Document new feature.
757 2018-07-26 Tom de Vries <tdevries@suse.de>
760 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
762 2018-07-26 Tom de Vries <tdevries@suse.de>
764 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
765 DW_AT_count can't be translated to a dynamic prop.
767 2018-07-25 Tom de Vries <tdevries@suse.de>
769 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
772 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
774 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
776 2018-07-25 Joel Brobecker <brobecker@adacore.com>
778 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
780 2018-07-24 Keith Seitz <keiths@redhat.comt
783 * dwarf2read.c (dw2_add_symbol_to_list): New function.
784 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
785 instead of add_symbol_to_list.
786 (read_file_scope): Call prepare_one_comp_unit before reading
789 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
791 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
793 2018-07-24 Tom Tromey <tom@tromey.com>
795 * utils.c (malloc, realloc, free): Don't declare.
796 * configure, config.in: Rebuild.
797 * configure.ac: Don't check for declarations of free, malloc, or
800 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
802 * aarch64-linux-nat.c
803 (aarch64_linux_nat_target::stopped_data_address): Remove unused
805 * arm-linux-nat.c (fetch_regs): Likewise.
806 (store_regs): Likewise.
807 (fetch_vfp_regs): Likewise.
808 (store_vfp_regs): Likewise.
809 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
810 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
811 (arm_linux_nat_target::insert_watchpoint): Likewise.
812 (arm_linux_nat_target::remove_watchpoint): Likewise.
813 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
815 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
817 * ppc-linux-nat.c (fetch_register): Likewise.
818 (fetch_all_gp_regs): Likewise.
819 (fetch_ppc_registers): Likewise.
820 (store_all_gp_regs): Likewise.
821 (store_ppc_registers): Likewise.
822 (hwdebug_insert_point): Likewise.
823 (can_use_watchpoint_cond_accel): Likewise.
824 * remote-sim.c (gdb_os_write_stdout): Likewise.
826 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
827 Tom Tromey <tom@tromey.com>
829 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
831 * configure: Rebuild.
833 2018-07-22 Tom Tromey <tom@tromey.com>
835 * regformats/regdat.sh: Define xmltarget_${name} inside
836 #ifndef IN_PROCESS_AGENT.
838 2018-07-22 Tom Tromey <tom@tromey.com>
840 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
842 2018-07-22 Tom Tromey <tom@tromey.com>
844 * symfile.c (reread_symbols): Notify iter, not objfile.
846 2018-07-22 Tom Tromey <tom@tromey.com>
848 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
850 (ravenscar_thread_target::prepare_to_store): Likewise.
852 2018-07-22 Tom Tromey <tom@tromey.com>
854 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
855 unused variable. Call value_fetch_lazy when needed.
856 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
857 Remove unused variable. Call value_fetch_lazy when needed.
859 2018-07-22 Tom Tromey <tom@tromey.com>
861 * m32c-tdep.c (mark_dma): Return void.
862 (make_regs): Remove unused declarations.
864 2018-07-22 Tom Tromey <tom@tromey.com>
866 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
867 cmdscm_get_valid_command_smob_arg_unsafe for effect.
868 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
869 bkscm_get_valid_block_smob_arg_unsafe for effect.
871 2018-07-22 Tom Tromey <tom@tromey.com>
873 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
876 2018-07-22 Tom Tromey <tom@tromey.com>
878 * windows-nat.c (saved_context): Conditionally define.
879 * remote.c (remote_target::remote_btrace_maybe_reopen):
880 Conditionally declare "warned".
881 * inflow.c (sigquit_ours): Conditionally define.
882 (new_tty): Move "tty" declaration inside #if.
883 * guile/guile.c (guile_datadir): Conditionally define.
884 * charset.c (set_be_le_names): Move some declarations inside #if.
885 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
887 (parse_xml_btrace_conf): Likewise.
889 2018-07-22 Tom Tromey <tom@tromey.com>
891 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
893 2018-07-22 Tom Tromey <tom@tromey.com>
895 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
896 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
897 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
898 * buildsym-legacy.c (get_macro_table): Remove unused variable.
899 * stack.c (frame_apply_level_command): Remove unused variable.
900 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
901 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
902 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
904 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
905 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
906 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
908 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
909 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
911 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
912 Remove unused variable.
913 * cli/cli-script.c (recurse_read_control_structure): Remove unused
915 * common/tdesc.c (print_xml_feature::visit): Remove unused
917 * compile/compile-object-load.c (store_regs): Remove unused
919 * complaints.c (clear_complaints): Remove unused variable.
920 * corelow.c (core_target_open): Remove unused variable.
921 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
923 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
925 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
927 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
929 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
931 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
933 * ia64-tdep.c (examine_prologue): Remove unused variable.
934 * infcall.c (run_inferior_call): Remove unused variable.
935 * inferior.c (exit_inferior): Remove unused variable.
936 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
937 * linespec.c (decode_line_2): Remove unused variable.
938 * linux-nat.c (super_close): Remove.
939 * linux-tdep.c (linux_info_proc): Remove unused variable.
940 * mi/mi-main.c (mi_execute_command): Remove unused variable.
941 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
942 Remove unused variable.
943 * parse.c (find_minsym_type_and_address): Remove unused variable.
944 * printcmd.c (info_symbol_command, printf_floating): Remove unused
946 * python/py-breakpoint.c (bppy_set_commands): Remove unused
948 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
950 * record-btrace.c (record_btrace_target::store_registers): Remove
952 (cmd_show_record_btrace_cpu): Remove unused variable.
953 * riscv-tdep.c (riscv_register_reggroup_p)
954 (riscv_push_dummy_call, riscv_return_value): Remove unused
956 * rust-exp.y (literal): Remove unused variable.
957 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
959 <STRUCTOP_ANONYMOUS>: Likewise.
960 * s390-linux-tdep.c (s390_linux_init_abi_31)
961 (s390_linux_init_abi_64): Remove unused variable.
962 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
963 (file_select_thread, net_windows_open, _initialize_ser_windows):
964 Remove unused variables.
965 * symtab.c (find_pc_sect_line): Remove unused variable.
966 * target-memory.c (compute_garbled_blocks): Remove unused
968 (target_write_memory_blocks): Remove unused variable.
969 * target.c (target_stack::unpush): Remove unused variables.
970 * tracepoint.c (start_tracing, all_tracepoint_actions)
971 (merge_uploaded_trace_state_variables)
972 (print_one_static_tracepoint_marker): Remove unused variable.
973 * unittests/basic_string_view/element_access/char/1.cc (test01):
974 Remove unused variable.
975 * windows-nat.c (windows_continue, windows_add_all_dlls)
976 (do_initial_windows_stuff, windows_nat_target::create_inferior):
977 Remove unused variables.
979 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
981 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
982 attr_profile in HAVE_ELF.
983 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
986 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
988 * frame.c (frame_register_unwind): Change parameter name.
989 (frame_unwind_register): Likewise.
990 (frame_unwind_register_value): Likewise.
991 (frame_unwind_register_signed): Likewise.
992 (frame_unwind_register_unsigned): Likewise.
993 * frame.h (frame_register_unwind): Likewise.
994 (frame_unwind_register): Likewise.
995 (frame_unwind_register_value): Likewise.
996 (frame_unwind_register_signed): Likewise.
997 (frame_unwind_register_unsigned): Likewise.
998 (frame_unwind_arch): Likewise.
1000 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1002 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1005 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1007 * mips-linux-nat.c (mips_linux_nat_target::read_description):
1008 Call `get_ptrace_pid' rather than extracting the ptrace PID by
1011 2018-07-20 Keith Seitz <keiths@redhat.com>
1013 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1014 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1015 m_compunit_symtab, m_language>: Add "m_" prefix.
1017 * buildsym.c: Update all uses.
1019 2018-07-20 Tom Tromey <tom@tromey.com>
1021 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1022 * buildsym.h (record_line_ftype): Remove typedef.
1024 2018-07-20 Tom Tromey <tom@tromey.com>
1026 * buildsym-legacy.h (augment_type_symtab): Don't declare.
1027 (end_expandable_symtab): Likewise.
1028 (end_symtab_get_static_block): Likewise.
1029 (end_symtab_from_static_block): Likewise.
1030 * buildsym-legacy.c (augment_type_symtab): Remove.
1031 (end_expandable_symtab): Remove.
1032 (end_symtab_get_static_block): Remove.
1033 (end_symtab_from_static_block): Remove.
1035 2018-07-20 Tom Tromey <tom@tromey.com>
1037 * dwarf2read.c: Include buildsym.h.
1038 (struct dwarf2_cu) <builder>: New method.
1039 (fixup_go_packaging): Update.
1040 (process_full_comp_unit, process_full_type_unit): Update. Don't
1041 use scoped_free_pendings.
1042 (using_directives): Add "cu" parameter, remove "language".
1043 (read_import_statement, setup_type_unit_groups, )
1044 (read_func_scope, read_lexical_block_scope)
1045 (dwarf2_record_block_ranges, read_namespace): Update.
1046 (lnp_state_machine::lnp_state_machine): Add cu parameter.
1047 (lnp_state_machine::handle_end_sequence): Update.
1048 (class lnp_state_machine) <m_cu>: New member.
1049 <m_record_line_callback>: Remove.
1050 <m_currently_recording_lines>: New member.
1051 (lnp_state_machine::handle_set_file): Update.
1052 (noop_record_line): Remove.
1053 (dwarf_record_line_p): Add cu parameter.
1054 (dwarf_record_line_1, dwarf_finish_line): Likewise.
1055 (lnp_state_machine::record_line)
1056 (lnp_state_machine::lnp_state_machine)
1057 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1058 (dwarf_decode_lines): Update.
1059 (dwarf2_start_subfile): Add cu parameter.
1060 (dwarf2_start_symtab, new_symbol): Update.
1061 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1062 Remove dwarf2_per_objfile parameter.
1063 (dwarf_decode_macros): Update.
1065 2018-07-20 Tom Tromey <tom@tromey.com>
1067 * stabsread.c (define_symbol): Update.
1068 * buildsym-legacy.h (get_buildsym_compunit): Declare.
1069 * dwarf2read.c (new_symbol): Update.
1070 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1071 * cp-namespace.c: Include buildsym.h.
1072 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1073 * buildsym-legacy.c (get_buildsym_compunit): New function.
1075 2018-07-20 Tom Tromey <tom@tromey.com>
1077 * xcoffread.c: Include buildsym-legacy.h.
1078 * windows-nat.c: Include buildsym-legacy.h.
1079 * stabsread.c: Include buildsym-legacy.h.
1080 * mdebugread.c: Include buildsym-legacy.h.
1081 * buildsym-legacy.h: New file.
1082 * buildsym-legacy.c: New file, from buildsym.c.
1083 * go32-nat.c: Include buildsym-legacy.h.
1084 * dwarf2read.c: Include buildsym-legacy.h.
1085 * dbxread.c: Include buildsym-legacy.h.
1086 * cp-namespace.c: Include buildsym-legacy.h.
1087 * coffread.c: Include buildsym-legacy.h.
1088 * buildsym.h: Move some contents to buildsym-legacy.h.
1089 * buildsym.c: Include buildsym-legacy.h. Move many functions to
1091 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1093 2018-07-20 Tom Tromey <tom@tromey.com>
1095 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1096 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1097 (buildsym_compunit::buildsym_compunit)
1098 (buildsym_compunit::~buildsym_compunit)
1099 (buildsym_compunit::get_macro_table): Define.
1101 2018-07-20 Tom Tromey <tom@tromey.com>
1103 * buildsym.c (reset_symtab_globals): Remove.
1104 (buildsym_compunit::end_symtab_from_static_block): Update.
1105 (buildsym_compunit::augment_type_symtab): Update.
1106 (end_symtab_from_static_block): Call free_buildsym_compunit.
1107 (augment_type_symtab, end_symtab, end_expandable_symtab):
1110 2018-07-20 Tom Tromey <tom@tromey.com>
1112 * arch-utils.c: Do not include buildsym.h.
1113 * mipsread.c: Do not include buildsym.h.
1114 * machoread.c: Do not include buildsym.h.
1115 * elfread.c: Do not include buildsym.h.
1117 2018-07-20 Tom Tromey <tom@tromey.com>
1119 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1121 (buildsym_compunit): Add new constructor.
1122 (struct buildsym_compunit) <get_last_source_file, finish_block,
1123 record_block_range, start_subfile, patch_subfile_names,
1124 push_subfile, pop_subfile, record_line, get_compunit_symtab,
1125 set_last_source_start_addr, get_last_source_start_addr,
1126 get_local_using_directives, set_local_using_directives,
1127 get_global_using_directives, outermost_context_p,
1128 get_current_context_stack, get_context_stack_depth,
1129 get_current_subfile, get_local_symbols, get_file_symbols,
1130 get_global_symbols, record_debugformat, record_producer,
1131 push_context, pop_context, end_symtab_get_static_block,
1132 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1134 <record_pending_block, finish_block_internal, make_blockvector,
1135 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1139 2018-05-22 Tom Tromey <tom@tromey.com>
1141 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1143 (finish_block_internal): Update.
1145 2018-07-20 Tom Tromey <tom@tromey.com>
1147 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1149 (finish_block_internal): Update.
1151 2018-07-20 Tom Tromey <tom@tromey.com>
1153 * buildsym.h (EXTERN): Don't define or undef.
1154 * buildsym.c (EXTERN): Don't define.
1156 2018-07-20 Tom Tromey <tom@tromey.com>
1158 * buildsym.c: Remove TODO comment.
1160 2018-07-20 Tom Tromey <tom@tromey.com>
1162 * coffread.c (coff_symtab_read): Update.
1163 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1164 (xcoff_new_init): Update.
1165 * mipsread.c (mipscoff_new_init): Update.
1166 * mdebugread.c (mdebug_build_psymtabs): Update.
1167 * elfread.c (elf_new_init): Update.
1168 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1170 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1171 (coffstab_build_psymtabs, elfstab_build_psymtabs)
1172 (stabsect_build_psymtabs): Update.
1173 * buildsym.h (buildsym_init): Don't declare.
1174 * buildsym.c: Update comment.
1175 (prepare_for_building): Remove.
1176 (start_symtab, restart_symtab): Update.
1177 (reset_symtab_globals): Update comment.
1178 (buildsym_init): Remove.
1180 2018-07-20 Tom Tromey <tom@tromey.com>
1182 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1183 * stabsread.c (patch_block_stabs, define_symbol, read_type)
1184 (read_enum_type, common_block_start, common_block_end)
1185 (cleanup_undefined_types_1, finish_global_stabs): Update.
1186 * mdebugread.c (psymtab_to_symtab_1): Update.
1187 * dwarf2read.c (fixup_go_packaging, read_func_scope)
1188 (read_lexical_block_scope, new_symbol): Update.
1189 * dbxread.c (process_one_symbol): Update.
1190 * coffread.c (coff_symtab_read, process_coff_symbol)
1191 (coff_read_enum_type): Update.
1192 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1194 (get_local_symbols, get_file_symbols, get_global_symbols): New
1196 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1198 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1199 (~scoped_free_pendings): Update.
1200 (finish_block, prepare_for_building, reset_symtab_globals)
1201 (end_symtab_get_static_block, end_symtab_with_blockvector)
1202 (augment_type_symtab, push_context): Update.
1203 (get_local_symbols, get_file_symbols, get_global_symbols): New
1205 (buildsym_init): Update.
1207 2018-07-20 Tom Tromey <tom@tromey.com>
1209 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1210 (process_full_type_unit): Likewise.
1211 (dwarf2_start_symtab): Set list_in_scope.
1213 2018-07-20 Tom Tromey <tom@tromey.com>
1215 * dwarf2read.c (process_psymtab_comp_unit_reader)
1216 (build_type_psymtabs_reader): Do not set list_in_scope.
1218 2018-07-20 Tom Tromey <tom@tromey.com>
1220 * buildsym.c (free_pendings): Remove.
1221 (add_symbol_to_list, scoped_free_pendings)
1222 (finish_block_internal, buildsym_init): Update.
1224 2018-07-20 Tom Tromey <tom@tromey.com>
1226 * xcoffread.c (read_xcoff_symtab): Update.
1227 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1229 * dbxread.c (process_one_symbol): Update.
1230 * coffread.c (coff_symtab_read): Update.
1231 * buildsym.h (finish_block): Update.
1232 * buildsym.c (finish_block): Remove "listhead" argument.
1233 (end_symtab_get_static_block): Update.
1235 2018-07-20 Tom Tromey <tom@tromey.com>
1237 * buildsym.h (class scoped_free_pendings): Remove constructor.
1238 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1240 <m_pending_block_obstack, m_pending_blocks>: New members.
1241 (pending_block_obstack, pending_blocks): Remove.
1242 (scoped_free_pendings::scoped_free_pendings): Default.
1243 (~scoped_free_pendings): Update.
1244 (free_pending_blocks): Remove.
1245 (finish_block_internal, record_pending_block, make_blockvector)
1246 (end_symtab_get_static_block, augment_type_symtab, push_context)
1247 (buildsym_init): Update.
1249 2018-07-20 Tom Tromey <tom@tromey.com>
1251 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1252 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
1254 (pending_addrmap, pending_addrmap_obstack)
1255 (pending_addrmap_interesting): Remove.
1256 (scoped_free_pendings, record_block_range, make_blockvector)
1257 (prepare_for_building, reset_symtab_globals, buildsym_init):
1260 2018-07-20 Tom Tromey <tom@tromey.com>
1262 * xcoffread.c (process_linenos): Update.
1263 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1264 * mdebugread.c (psymtab_to_symtab_1): Update.
1265 * dwarf2read.c (setup_type_unit_groups)
1266 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1267 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1268 * dbxread.c (process_one_symbol): Update.
1269 * coffread.c (coff_symtab_read, enter_linenos)
1270 (process_coff_symbol): Update.
1271 * buildsym.h (current_subfile): Don't declare.
1272 (get_current_subfile): Declare.
1273 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
1275 (start_subfile, free_buildsym_compunit, push_subfile)
1276 (prepare_for_building, start_symtab): Update.
1277 (get_current_subfile): New function.
1279 2018-07-20 Tom Tromey <tom@tromey.com>
1281 * coffread.c (coff_symtab_read): Update.
1282 * xcoffread.c (read_xcoff_symtab): Update.
1283 * dwarf2read.c (new_symbol): Update.
1284 (read_func_scope, read_lexical_block_scope): Update.
1285 * dbxread.c (process_one_symbol): Update.
1286 * buildsym.h (context_stack, context_stack_depth): Don't declare.
1287 (outermost_context_p): Remove macro.
1288 (outermost_context_p, get_current_context_stack)
1289 (get_context_stack_depth): Declare.
1290 (pop_context): Return struct context_stack.
1291 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1293 (context_stack_size): Remove.
1294 (INITIAL_CONTEXT_STACK_SIZE): Remove.
1295 (prepare_for_building, end_symtab_get_static_block)
1296 (augment_type_symtab, push_context): Update.
1297 (pop_context): Return struct context_stack.
1298 (outermost_context_p, get_current_context_stack)
1299 (get_context_stack_depth): New functions.
1300 (buildsym_init): Update.
1302 2018-07-20 Tom Tromey <tom@tromey.com>
1304 * rust-exp.y: Now a pure parser. Update all rules.
1305 (%union): Move earlier.
1306 (current_parser, work_obstack): Remove globals.
1307 (rust_parser, ~rust_parser): Update.
1308 (class rust_parser) <copy_name, concat3, crate_name, super_name,
1309 lex_character, lex_number, lex_string, lex_identifier,
1310 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1311 convert_name, convert_params_to_expression,
1312 convert_ast_to_expression, ast_basic_type, ast_operation,
1313 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1314 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1315 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1316 ast_array_type, ast_slice_type, ast_reference_type,
1317 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1318 (rust_parse): Update.
1319 (rustyyerror, rustyylex): Add parser parameter.
1320 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1321 (rust_lex_stringish_test, rust_lex_test_sequence)
1322 (rust_lex_test_trailing_dot, rust_lex_test_completion)
1323 (rust_lex_test_push_back, rust_lex_tests): Update.
1325 2018-07-19 Pedro Alves <palves@redhat.com>
1327 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1328 gdb::unique_xmalloc_ptr.
1329 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1330 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1331 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1332 copy-initialization.
1333 * guile/scm-pretty-print.c (ppscm_print_children): Use
1334 gdb::unique_xmalloc_ptr instead of cleanups.
1335 (gdbscm_apply_val_pretty_printer): Remove cleanups.
1336 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1337 gdb::unique_xmalloc_ptr.
1338 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1339 Adjust to use gdb::unique_xmalloc_ptr.
1340 * guile/scm-utils.c (extract_arg): Adjust.
1341 * guile/scm-value.c (gdbscm_value_field): Adjust to use
1342 gdb::unique_xmalloc_ptr instead of a cleanup.
1344 2018-07-19 Tom Tromey <tom@tromey.com>
1346 * utils.c (do_value_free_to_mark)
1347 (make_cleanup_value_free_to_mark): Remove.
1348 * utils.h (make_cleanup_value_free_to_mark): Remove.
1350 2018-07-19 Pedro Alves <palves@redhat.com>
1352 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1353 forwarding reference.
1355 2018-07-18 Pedro Alves <palves@redhat.com>
1357 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1358 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
1361 2018-07-18 Pedro Alves <palves@redhat.com>
1363 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1365 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1367 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1368 directly instead of a cleanup.
1369 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1370 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
1371 (vlscm_binop_gdbthrow): New, factored out from ...
1372 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
1373 (vlscm_rich_compare): Use gdbscm_wrap.
1374 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1375 instead of a cleanup.
1376 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1378 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1379 Use xfree directly instead of a cleanup.
1380 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1381 Adjust to use gdbscm_wrap and scoped_value_mark.
1382 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1383 (gdbscm_value_address, gdbscm_value_dereference)
1384 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1386 (gdbscm_value_dynamic_type): Use scoped_value_mark.
1387 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1389 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1390 gdbscm_wrap and scoped_value_mark.
1391 (gdbscm_value_to_string): Use xfree directly instead of a
1392 cleanup. Move 'buffer' unique_ptr to TRY scope.
1393 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1394 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
1396 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1397 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1399 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1402 2018-07-18 Tom de Vries <tdevries@suse.de>
1404 * findvar.c (default_read_var_value): Also resolve dynamic type for
1405 LOC_OPTIMIZED_OUT vars.
1407 2018-07-18 Maciej W. Rozycki <macro@mips.com>
1409 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1412 2018-07-17 Tom Tromey <tom@tromey.com>
1414 * guile/scm-param.c (pascm_set_func, pascm_show_func)
1415 (compute_enum_list, pascm_set_param_value_x)
1416 (gdbscm_parameter_value): Update.
1417 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1418 (gdbscm_scm_to_host_string): Update.
1419 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1421 * guile/scm-cmd.c (cmdscm_add_completion): Update.
1422 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1423 * guile/scm-string.c (gdbscm_scm_to_string): Return
1425 (gdbscm_scm_to_host_string): Likewise.
1427 2018-07-17 Tom Tromey <tom@tromey.com>
1429 * guile/guile.c (gdbscm_eval_from_control_command): Update.
1430 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1431 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1432 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1435 2018-07-17 Tom Tromey <tom@tromey.com>
1437 * guile/scm-param.c (pascm_signal_setshow_error): Update.
1438 * guile/guile-internal.h (gdbscm_exception_message_to_string):
1440 * guile/scm-cmd.c (cmdscm_function): Update.
1441 * guile/scm-pretty-print.c
1442 (ppscm_print_exception_unless_memory_error): Update.
1443 * guile/scm-exception.c (gdbscm_exception_message_to_string):
1444 Return unique_xmalloc_ptr.
1446 2018-07-17 Tom Tromey <tom@tromey.com>
1448 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1451 2018-07-17 Jim Wilson <jimw@sifive.com>
1453 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1454 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
1455 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
1456 unecessary braces after EF_RISCV_RVC test. Delete call to
1457 set_gdbarch_decr_pc_after_break.
1459 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1460 RISCV_LAST_FP_REGNUM + 1.
1461 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1463 2018-07-17 Tom Tromey <tom@tromey.com>
1465 * configure.ac: Remove --disable-gdbcli.
1466 * configure: Rebuild.
1467 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1468 (SUBDIR_CLI_CFLAGS): Remove.
1469 (SFILES): Use SUBDIR_CLI_SRCS.
1470 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1472 2018-07-17 Tom Tromey <tom@tromey.com>
1475 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1477 2018-07-16 Jim Wilson <jimw@sifive.com>
1479 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1481 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1483 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1485 (libunwind_frame_sniffer): Likewise.
1486 (libunwind_frame_prev_register): Likewise.
1487 (libunwind_sigtramp_frame_sniffer): Likewise.
1488 * ia64-tdep.c (ia64_access_reg): Likewise.
1489 (ia64_access_rse_reg): Likewise.
1490 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1491 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1493 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1495 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1497 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1499 * remote-sim.c (gdbsim_target::close,
1500 gdbsim_target::mourn_inferior): Remove unused variables.
1502 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1504 * ia64-tdep.c (ktab_buf): New global.
1505 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1506 (get_kernel_table): Adjust.
1508 2018-07-16 Tom Tromey <tom@tromey.com>
1510 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1511 * dwarf2read.c (using_directives, new_symbol): Use
1512 outermost_context_p.
1513 * dbxread.c (process_one_symbol): Use outermost_context_p.
1514 * coffread.c (coff_symtab_read): Use outermost_context_p.
1516 2018-07-16 Tom Tromey <tom@tromey.com>
1518 * dwarf2read.c (using_directives, read_func_scope)
1519 (read_lexical_block_scope): Update.
1520 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1521 * buildsym.h (local_using_directives, global_using_directives):
1523 (get_local_using_directives, set_local_using_directives)
1524 (get_global_using_directives): Declare.
1525 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1526 m_global_using_directives>: New members.
1527 (finish_block_internal, prepare_for_building)
1528 (reset_symtab_globals, end_symtab_get_static_block)
1529 (push_context): Update.
1530 (get_local_using_directives, set_local_using_directives)
1531 (get_global_using_directives): New functions.
1532 (buildsym_init): Update.
1534 2018-07-16 Tom Tromey <tom@tromey.com>
1536 * xcoffread.c (xcoff_initial_scan): Don't call
1537 free_pending_blocks.
1538 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1539 * buildsym.h (class scoped_free_pendings): Add constructor.
1540 (free_pending_blocks): Don't declare.
1541 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1542 (free_pending_blocks): Now static.
1544 2018-07-16 Tom Tromey <tom@tromey.com>
1546 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1547 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1549 (struct subfile_stack): Remove.
1550 (subfile_stack): Remove.
1551 (push_subfile, pop_subfile, buildsym_init): Update.
1553 2018-07-16 Tom Tromey <tom@tromey.com>
1555 * buildsym.c (push_subfile): Use gdb_assert.
1556 (pop_subfile): Use gdb_assert.
1558 2018-07-16 Tom Tromey <tom@tromey.com>
1560 * buildsym.h (merge_symbol_lists): Remove.
1561 * buildsym.c (merge_symbol_lists): Remove.
1563 2018-07-16 Tom Tromey <tom@tromey.com>
1565 * stabsread.c (scan_file_globals): Update comment.
1566 * stabsread.h (scan_file_globals): Move from buildsym.h.
1567 * buildsym.h (scan_file_globals): Move to stabsread.h.
1569 2018-07-16 Tom Tromey <tom@tromey.com>
1571 * xcoffread.c (xcoff_new_init): Update.
1572 * mipsread.c (mipscoff_new_init): Update.
1573 * mdebugread.c (mdebug_build_psymtabs): Update.
1574 * elfread.c (elf_new_init): Update.
1575 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1576 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1577 * buildsym.h (buildsym_new_init): Don't declare.
1578 * buildsym.c (buildsym_new_init): Remove.
1580 2018-07-16 Tom Tromey <tom@tromey.com>
1582 * stabsread.h (within_function): Move from buildsym.h.
1583 * stabsread.c (start_stabs): Clear within_function.
1584 * coffread.c (coff_start_symtab): Clear within_function.
1585 * buildsym.h (within_function): Move to stabsread.h.
1586 * buildsym.c (prepare_for_building): Update.
1588 2018-07-16 Tom Tromey <tom@tromey.com>
1590 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1591 * dwarf2read.c (dwarf2_start_symtab): Don't set
1592 processing_gcc_compilation.
1593 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1595 2018-07-16 Tom Tromey <tom@tromey.com>
1597 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1598 (next_symbol_text_func): Move from buildsym.h.
1599 * stabsread.c (hashname): Move from buildsym.c.
1600 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1601 (next_symbol_text_func, hashname): Move to stabsread.h.
1602 * buildsym.c: Don't include bcache.h
1603 (hashname): Move to stasbread.c.
1605 2018-07-16 Tom Tromey <tom@tromey.com>
1607 * buildsym.h (context_stack_size): Don't declare.
1608 * buildsym.c (context_stack_size): New global.
1610 2018-07-16 Tom Tromey <tom@tromey.com>
1612 * dbxread.c (processing_acc_compilation): New global.
1613 * buildsym.h (processing_acc_compilation): Don't declare.
1615 2018-07-16 Tom Tromey <tom@tromey.com>
1617 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1618 * dbxread.c (read_ofile_symtab): Update.
1619 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1620 * buildsym.h (last_source_start_addr): Remove.
1621 (set_last_source_start_addr, get_last_source_start_addr):
1623 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1625 (struct buildsym_compunit) <m_last_source_start_addr>: New
1627 (prepare_for_building): Remove start_addr parameter.
1628 (start_symtab, restart_symtab, end_symtab_get_static_block)
1629 (end_symtab_with_blockvector): Update.
1630 (set_last_source_start_addr, get_last_source_start_addr): New
1633 2018-07-16 Tom Tromey <tom@tromey.com>
1635 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1637 (have_line_numbers): Remove.
1638 (record_line, prepare_for_building, end_symtab_get_static_block)
1639 (augment_type_symtab): Update.
1641 2018-07-16 Tom Tromey <tom@tromey.com>
1643 * buildsym.c (~buildsym_compunit): Free the macro table.
1644 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1646 <m_pending_macros>: New member.
1647 (pending_macros): Remove.
1648 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1649 (reset_symtab_globals, end_symtab_get_static_block)
1650 (end_symtab_with_blockvector, augment_type_symtab)
1651 (buildsym_init): Update.
1653 2018-07-16 Tom Tromey <tom@tromey.com>
1655 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1657 (buildsym_compunit::set_last_source_file): New method.
1658 <m_last_source_file>: New member.
1659 (prepare_for_building): Remove "name" parameter.
1660 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1661 (last_source_file): Remove.
1662 (set_last_source_file, get_last_source_file): Update.
1664 2018-07-16 Tom Tromey <tom@tromey.com>
1666 * buildsym.c (prepare_for_building): Add assert.
1668 2018-07-16 Tom Tromey <tom@tromey.com>
1670 * buildsym.c (~buildsym_compunit): Update.
1671 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1672 (start_subfile, patch_subfile_names)
1673 (end_symtab_with_blockvector): Update.
1675 2018-07-16 Tom Tromey <tom@tromey.com>
1677 * buildsym.c (struct buildsym_compunit): Add constructor,
1678 destructor, initializers.
1679 (start_buildsym_compunit): Remove.
1680 (free_buildsym_compunit): Use "delete".
1681 (start_symtab, restart_symtab): Use "new".
1683 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1685 * symfile.c (set_objfile_default_section_offset): Remove struct
1688 2018-07-14 Stafford Horne <shorne@gmail.com>
1690 * (Responsible Maintainers): Add myself as or1k maintainer.
1692 2018-07-13 Tom Tromey <tom@tromey.com>
1694 * symfile.c (set_objfile_default_section_offset): Use extra braces
1697 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1699 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1702 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1704 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1705 unittests/cli-utils-selftests.c
1706 * unittests/cli-utils-selftests.c: New file.
1708 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1710 * NEWS: Mention new commands. Mention change to 'thread apply'.
1712 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1714 * thread.c (thr_try_catch_cmd): New function.
1715 (thread_apply_all_command): Handle qcs flags.
1716 (thread_apply_command): Handle qcs flags.
1717 (taas_command): New function.
1718 (tfaas_command): New function.
1719 (_initialize_thread): Update to setup the new commands 'taas
1720 and 'tfaas'. Change doc string for 'thread apply'.
1722 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1724 * stack.c: (trailing_outermost_frame): New function, mostly
1725 extracted from backtrace_command_1.
1726 (leading_innermost_frame): New function.
1727 (backtrace_command_1): Update to call trailing_outermost_frame.
1728 (frame_apply_command_count): New function.
1729 (frame_apply_level_command): New function.
1730 (frame_apply_all_command): New function.
1731 (frame_apply_command): New function.
1732 (faas_command): New function.
1733 (frame_cmd_list): New variable.
1734 (_initialize_stack): Update to setup the new commands 'frame apply'
1737 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1739 * cli-utils.c (number_or_range_parser::get_number): Only handle
1740 numbers or convenience var as numbers.
1741 (parse_flags): New function.
1742 (parse_flags_qcs): New function.
1743 (number_or_range_parser::finished): Ensure parsing end is detected
1744 before end of string.
1745 * cli-utils.h (parse_flags): New function.
1746 (parse_flags_qcs): New function.
1747 (number_or_range_parser): Remove m_finished bool.
1748 (number_or_range_parser::skip_range): Set m_in_range to false.
1750 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
1752 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1755 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1756 Jan Kratochvil <jan.kratochvil@redhat.com>
1757 Paul Fertser <fercerpav@gmail.com>
1758 Tsutomu Seki <sekiriki@gmail.com>
1759 Pedro Alves <palves@redhat.com>
1761 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1762 'unittests/parse-connection-spec-selftests.c'.
1763 (COMMON_SFILES): Add 'common/netstuff.c'.
1764 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1765 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1766 * common/netstuff.c: New file.
1767 * common/netstuff.h: New file.
1768 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1769 (wait_for_connect): Update comment. New parameter
1770 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1771 Use 'sock' directly instead of 'scb->fd'.
1772 (try_connect): New function, with code from 'net_open'.
1773 (net_open): Rewrite main loop to deal with multiple
1774 sockets/addresses. Handle IPv6-style hostnames; implement
1775 support for IPv6 connections.
1776 * unittests/parse-connection-spec-selftests.c: New file.
1778 2018-07-11 Pedro Alves <palves@redhat.com>
1781 * remote.c (remote_target::remote_detach_pid): Call
1782 set_current_process.
1784 2018-07-11 Pedro Alves <palves@redhat.com>
1786 * h8300-tdep.c (h8300_gdbarch_init): Remove
1787 set_gdbarch_ecoff_reg_to_regnum calls.
1789 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1792 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1793 offsets/sizes for static members of a class/struct.
1795 2018-07-11 Alan Hayward <alan.hayward@arm.com>
1797 * target-descriptions.c (tdesc_register_bitsize): Rename.
1798 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1799 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1800 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1802 2018-07-10 Tom Tromey <tom@tromey.com>
1804 * breakpoint.c (moribund_locations): Now static and a
1806 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1807 (build_bpstat_chain, update_global_location_list)
1808 (breakpoint_retire_moribund): Update.
1809 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1812 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1814 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1815 (riscv_register_reggroup_p): Use new function, remove unneeded
1817 (riscv_push_dummy_call): Extend assert to compare against xlen or
1818 flen based on register type.
1820 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1822 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1824 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1826 * remote.c (show_hardware_watchpoint_limit): New function.
1827 (show_hardware_watchpoint_length_limit): New function.
1828 (show_hardware_breakpoint_limit): New function.
1829 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1830 where appropriate, update help text.
1832 2018-07-09 Tom Tromey <tom@tromey.com>
1834 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1835 (CLIBS): Don't mention NAT_CLIBS.
1837 2018-07-09 Tom Tromey <tom@tromey.com>
1839 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1840 (LIBGDB_OBS, clean mostlyclean): Update.
1841 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1843 2018-07-09 Tom Tromey <tom@tromey.com>
1845 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1846 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1847 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1849 2018-07-09 Tom Tromey <tom@tromey.com>
1851 * Makefile.in (ALLDEPFILES): Remove exec.c.
1852 (COMMON_OBS): Remove exec.o.
1853 (COMMON_SFILES): Add exec.c.
1855 2018-07-09 Tom Tromey <tom@tromey.com>
1857 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1859 2018-07-09 Tom Tromey <tom@tromey.com>
1861 * Makefile.in (clean mostlyclean): Remove stamp-version.
1862 (version.c): Depend on stamp-version.
1863 (stamp-version): New rule, from version.c rule.
1865 2018-07-09 Tom Tromey <tom@tromey.com>
1867 * Makefile.in (init.c): Depend on stamp-init.
1868 (stamp-init): New rule, from init.c rule.
1869 (clean mostlyclean): Remove stamp-init.
1871 2018-07-09 Tom Tromey <tom@tromey.com>
1873 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1874 SUBDIR_GCC_COMPILE_SRCS.
1876 2018-07-09 Tom Tromey <tom@tromey.com>
1878 * Makefile.in (init.c): Remove some unused sed rules.
1880 2018-07-09 Tom Tromey <tom@tromey.com>
1882 * Makefile.in (TSOBS): Remove.
1883 (INIT_FILES): Update.
1884 (LIBGDB_OBS): Update.
1885 (COMMON_SFILES): Add inflow.c.
1886 (SFILES): Remove inflow.c.
1888 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1890 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1892 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1894 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1895 get_saveloc_name, is_signal_frame_name, step_name,
1896 init_remote_name, create_addr_space_name,
1897 destroy_addr_space_name, search_unwind_table_name,
1898 find_dyn_list_name): Constify.
1900 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1902 * darwin-nat.c (darwin_pthread_kill): New function.
1903 (darwin_resume_thread): Use darwin_pthread_kill.
1905 2018-07-05 Tom de Vries <tdevries@suse.de>
1907 * macroexp.c (macro_buffer) <operator=>: New member function.
1909 2018-07-04 Tom Tromey <tom@tromey.com>
1911 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1913 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
1915 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1916 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1917 * maint.c: Likewise.
1920 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1922 * NEWS: Create a new section for the next release branch.
1923 Rename the section of the current branch, now that it has
1926 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1928 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1929 * version.in: Bump version to 8.2.50.DATE-git.
1931 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1932 Pedro Alves <palves@redhat.com>
1934 * linux-nat.c (linux_init_ptrace): Rename to ...
1935 (linux_init_ptrace_procfs): ... this. Call
1936 linux_proc_init_warnings.
1937 (linux_nat_target::post_attach)
1938 (linux_nat_target::post_startup_inferior): Adjust.
1939 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1940 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1942 2018-07-04 Tom de Vries <tdevries@suse.de>
1944 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1946 (read_comp_unit_head): ... here.
1948 2018-07-03 Tom Tromey <tom@tromey.com>
1950 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1951 (stop_tracing, tstatus_command)
1952 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1953 (print_one_static_tracepoint_marker): Update.
1954 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1956 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
1958 (all_tracepoints, static_tracepoints_here): Return std::vector.
1960 2018-07-03 Tom Tromey <tom@tromey.com>
1962 * common/ptid.c (ptid_equal): Remove.
1963 * common/ptid.h (ptid_equal): Don't declare.
1964 * ada-tasks.c: Update.
1965 * breakpoint.c: Update.
1966 * common/agent.c: Update.
1967 * corelow.c: Update.
1968 * darwin-nat-info.c: Update.
1969 * darwin-nat.c: Update.
1971 * dtrace-probe.c: Update.
1972 * dummy-frame.c: Update.
1973 * fbsd-nat.c: Update.
1975 * gdbthread.h: Update.
1976 * gnu-nat.c: Update.
1977 * go32-nat.c: Update.
1978 * inf-loop.c: Update.
1979 * inf-ptrace.c: Update.
1980 * infcall.c: Update.
1984 * linux-fork.c: Update.
1985 * linux-nat.c: Update.
1986 * linux-thread-db.c: Update.
1987 * mi/mi-cmd-var.c: Update.
1988 * mi/mi-interp.c: Update.
1989 * mi/mi-main.c: Update.
1990 * nto-procfs.c: Update.
1991 * ppc-linux-tdep.c: Update.
1993 * python/py-inferior.c: Update.
1994 * python/py-record-btrace.c: Update.
1995 * python/py-record.c: Update.
1996 * ravenscar-thread.c: Update.
1997 * regcache.c: Update.
1998 * remote-sim.c: Update.
2000 * sol-thread.c: Update.
2003 * tui/tui-stack.c: Update.
2005 * windows-nat.c: Update.
2006 * windows-tdep.c: Update.
2008 2018-07-03 Tom Tromey <tom@tromey.com>
2010 * common/ptid.c (ptid_match): Remove.
2011 * common/ptid.h (ptid_match): Don't declare.
2012 * fbsd-nat.c: Update.
2015 * linux-nat.c: Update.
2016 * record-btrace.c: Update.
2017 * regcache.c: Update.
2020 2018-07-03 Tom Tromey <tom@tromey.com>
2022 * common/ptid.c (ptid_tid_p): Remove.
2023 * common/ptid.h (ptid_tid_p): Don't declare.
2024 * sol-thread.c: Update.
2026 2018-07-03 Tom Tromey <tom@tromey.com>
2028 * common/ptid.c (ptid_lwp_p): Remove.
2029 * common/ptid.h (ptid_lwp_p): Don't declare.
2030 * fbsd-nat.c: Update.
2031 * linux-nat.c: Update.
2032 * nat/linux-procfs.c: Update.
2033 * nat/x86-linux-dregs.c: Update.
2034 * sol-thread.c: Update.
2036 2018-07-03 Tom Tromey <tom@tromey.com>
2038 * common/ptid.c (ptid_is_pid): Remove.
2039 * common/ptid.h (ptid_is_pid): Don't declare.
2041 * linux-nat.c: Update.
2042 * mi/mi-interp.c: Update.
2046 2018-07-03 Tom Tromey <tom@tromey.com>
2048 * common/ptid.c (ptid_get_tid): Remove.
2049 * common/ptid.h (ptid_get_tid): Don't declare.
2050 * ada-tasks.c: Update.
2051 * aix-thread.c: Update.
2052 * bsd-uthread.c: Update.
2053 * darwin-nat.c: Update.
2054 * fbsd-nat.c: Update.
2055 * i386-darwin-nat.c: Update.
2057 * linux-tdep.c: Update.
2058 * nto-procfs.c: Update.
2059 * ppc-ravenscar-thread.c: Update.
2060 * python/py-infthread.c: Update.
2061 * ravenscar-thread.c: Update.
2062 * sol-thread.c: Update.
2063 * sparc-ravenscar-thread.c: Update.
2064 * windows-nat.c: Update.
2066 2018-07-03 Tom Tromey <tom@tromey.com>
2068 * common/ptid.c (ptid_get_lwp): Remove.
2069 * common/ptid.h (ptid_get_lwp): Don't declare.
2070 * aarch64-linux-nat.c: Update.
2071 * ada-tasks.c: Update.
2072 * aix-thread.c: Update.
2073 * amd64-linux-nat.c: Update.
2074 * arm-linux-nat.c: Update.
2075 * corelow.c: Update.
2076 * fbsd-nat.c: Update.
2077 * fbsd-tdep.c: Update.
2078 * gnu-nat.c: Update.
2079 * i386-cygwin-tdep.c: Update.
2080 * i386-gnu-nat.c: Update.
2081 * i386-linux-nat.c: Update.
2082 * ia64-linux-nat.c: Update.
2083 * inf-ptrace.c: Update.
2085 * linux-fork.c: Update.
2086 * linux-nat.c: Update.
2087 * linux-tdep.c: Update.
2088 * linux-thread-db.c: Update.
2089 * mips-linux-nat.c: Update.
2090 * nat/aarch64-linux-hw-point.c: Update.
2091 * nat/aarch64-linux.c: Update.
2092 * nat/linux-btrace.c: Update.
2093 * nat/linux-osdata.c: Update.
2094 * nat/linux-procfs.c: Update.
2095 * nat/x86-linux-dregs.c: Update.
2096 * obsd-nat.c: Update.
2097 * ppc-fbsd-nat.c: Update.
2098 * ppc-linux-nat.c: Update.
2100 * python/py-infthread.c: Update.
2101 * ravenscar-thread.c: Update.
2103 * s390-linux-nat.c: Update.
2104 * sol-thread.c: Update.
2105 * sol2-tdep.c: Update.
2106 * spu-linux-nat.c: Update.
2107 * x86-linux-nat.c: Update.
2108 * xtensa-linux-nat.c: Update.
2110 2018-07-03 Tom Tromey <tom@tromey.com>
2112 * common/ptid.c (ptid_get_pid): Remove.
2113 * common/ptid.h (ptid_get_pid): Don't declare.
2114 * aarch64-linux-nat.c: Update.
2115 * ada-lang.c: Update.
2116 * aix-thread.c: Update.
2117 * alpha-bsd-nat.c: Update.
2118 * amd64-fbsd-nat.c: Update.
2119 * amd64-linux-nat.c: Update.
2120 * arm-linux-nat.c: Update.
2121 * arm-nbsd-nat.c: Update.
2123 * break-catch-syscall.c: Update.
2124 * breakpoint.c: Update.
2125 * bsd-uthread.c: Update.
2126 * corelow.c: Update.
2128 * darwin-nat.c: Update.
2129 * fbsd-nat.c: Update.
2130 * fbsd-tdep.c: Update.
2132 * gnu-nat.c: Update.
2133 * hppa-nbsd-nat.c: Update.
2134 * hppa-obsd-nat.c: Update.
2135 * i386-fbsd-nat.c: Update.
2136 * ia64-linux-nat.c: Update.
2137 * inf-ptrace.c: Update.
2139 * inferior.c: Update.
2140 * inferior.h: Update.
2143 * linux-fork.c: Update.
2144 * linux-nat.c: Update.
2145 * linux-tdep.c: Update.
2146 * linux-thread-db.c: Update.
2147 * m68k-bsd-nat.c: Update.
2148 * mi/mi-interp.c: Update.
2149 * mi/mi-main.c: Update.
2150 * mips-linux-nat.c: Update.
2151 * mips-nbsd-nat.c: Update.
2152 * mips64-obsd-nat.c: Update.
2153 * nat/aarch64-linux-hw-point.c: Update.
2154 * nat/aarch64-linux.c: Update.
2155 * nat/linux-btrace.c: Update.
2156 * nat/linux-osdata.c: Update.
2157 * nat/linux-procfs.c: Update.
2158 * nat/x86-linux-dregs.c: Update.
2159 * nto-procfs.c: Update.
2160 * obsd-nat.c: Update.
2161 * ppc-linux-nat.c: Update.
2162 * ppc-nbsd-nat.c: Update.
2163 * ppc-obsd-nat.c: Update.
2164 * proc-service.c: Update.
2166 * python/py-inferior.c: Update.
2167 * python/py-infthread.c: Update.
2168 * ravenscar-thread.c: Update.
2170 * remote-sim.c: Update.
2172 * rs6000-nat.c: Update.
2173 * s390-linux-nat.c: Update.
2174 * sh-nbsd-nat.c: Update.
2175 * sol-thread.c: Update.
2176 * sparc-nat.c: Update.
2177 * sparc64-tdep.c: Update.
2178 * spu-linux-nat.c: Update.
2179 * spu-tdep.c: Update.
2180 * target-debug.h: Update.
2183 * tid-parse.c: Update.
2184 * tracefile-tfile.c: Update.
2185 * vax-bsd-nat.c: Update.
2186 * windows-nat.c: Update.
2187 * x86-linux-nat.c: Update.
2188 * x86-nat.c: Update.
2190 2018-07-03 Tom Tromey <tom@tromey.com>
2192 * common/ptid.c (pid_to_ptid): Remove.
2193 * common/ptid.h (pid_to_ptid): Don't declare.
2194 * aix-thread.c: Update.
2195 * arm-linux-nat.c: Update.
2196 * common/ptid.c: Update.
2197 * common/ptid.h: Update.
2198 * corelow.c: Update.
2200 * darwin-nat.c: Update.
2201 * fbsd-nat.c: Update.
2202 * fork-child.c: Update.
2203 * gnu-nat.c: Update.
2204 * go32-nat.c: Update.
2205 * inf-ptrace.c: Update.
2207 * inferior.c: Update.
2209 * linux-fork.c: Update.
2210 * linux-nat.c: Update.
2211 * nat/aarch64-linux-hw-point.c: Update.
2212 * nat/fork-inferior.c: Update.
2213 * nat/x86-linux-dregs.c: Update.
2214 * nto-procfs.c: Update.
2215 * obsd-nat.c: Update.
2217 * progspace.c: Update.
2219 * rs6000-nat.c: Update.
2220 * s390-linux-nat.c: Update.
2221 * sol-thread.c: Update.
2222 * spu-linux-nat.c: Update.
2225 * tracefile-tfile.c: Update.
2226 * windows-nat.c: Update.
2228 2018-07-03 Tom Tromey <tom@tromey.com>
2230 * common/ptid.h (ptid_build): Don't declare.
2231 * common/ptid.c (ptid_build): Remove.
2232 * aix-thread.c: Update.
2233 * bsd-kvm.c: Update.
2234 * bsd-uthread.c: Update.
2235 * common/agent.c: Update.
2236 * common/ptid.c: Update.
2237 * common/ptid.h: Update.
2238 * corelow.c: Update.
2239 * darwin-nat.c: Update.
2240 * fbsd-nat.c: Update.
2241 * gnu-nat.c: Update.
2242 * linux-fork.c: Update.
2243 * linux-nat.c: Update.
2244 * linux-thread-db.c: Update.
2245 * nat/linux-osdata.c: Update.
2246 * nat/linux-procfs.c: Update.
2247 * nto-procfs.c: Update.
2248 * obsd-nat.c: Update.
2249 * proc-service.c: Update.
2251 * ravenscar-thread.c: Update.
2252 * remote-sim.c: Update.
2254 * sol-thread.c: Update.
2256 * windows-nat.c: Update.
2258 2018-07-03 Tom Tromey <tom@tromey.com>
2260 * infrun.c (follow_exec): Use exit_inferior_silent.
2261 * inferior.c (exit_inferior_num_silent): Remove.
2262 * inferior.h (exit_inferior_num_silent): Don't declare.
2264 2018-07-03 Tom Tromey <tom@tromey.com>
2267 * darwin-nat.c (darwin_attach_pid): Reset inferior and
2268 inferior_ptid on error.
2270 2018-07-02 Maciej W. Rozycki <macro@mips.com>
2271 Simon Marchi <simon.marchi@polymtl.ca>
2274 * disasm.h (gdb_disassembler): Add
2275 `m_disassembler_options_holder'. member
2276 * disasm.c (get_all_disassembler_options): New function.
2277 (gdb_disassembler::gdb_disassembler): Use it.
2278 (gdb_buffered_insn_length_init_dis): Likewise.
2279 (gdb_buffered_insn_length): Adjust accordingly.
2280 (set_disassembler_options): Handle options with arguments.
2281 (show_disassembler_options_sfunc): Likewise. Add a leading new
2282 line if showing options with descriptions.
2283 (disassembler_options_completer): Adapt to using the
2284 `disasm_options_and_args_t' structure.
2285 * mips-tdep.c (mips_disassembler_options): New variable.
2286 (mips_disassembler_options_o32): Likewise.
2287 (mips_disassembler_options_n32): Likewise.
2288 (mips_disassembler_options_n64): Likewise.
2289 (gdb_print_insn_mips): Don't set `disassembler_options'.
2290 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2292 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2293 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
2294 `gdbarch_disassembler_options_implicit' and
2295 `gdbarch_valid_disassembler_options'.
2296 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2297 `disasm_options_and_args_t' structure.
2298 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2300 (valid_disassembler_options): Switch from `disasm_options_t' to
2301 the `disasm_options_and_args_t' structure.
2302 * NEWS: Document `set disassembler-options' support for the MIPS
2304 * gdbarch.h: Regenerate.
2305 * gdbarch.c: Regenerate.
2307 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
2309 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2311 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2313 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2314 parameter in call to amd64_target_description.
2315 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2316 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2317 (amd64fbsd_init_abi): Likewise.
2318 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2319 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2320 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2321 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2323 2018-06-29 Pedro Alves <palves@redhat.com>
2325 * gdb/amd64-tdep.h (amd64_create_target_description): Add
2326 "segments" parameter.
2327 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2328 (_initialize_amd64_tdep): Update call to
2329 amd64_create_target_description.
2330 (amd64_target_description): Add "segments" parameter. Adjust
2331 the implementation to use it.
2332 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2333 call to amd64_create_target_description.
2334 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2335 * gdb/arch/amd64.h (amd64_create_target_description): Add
2336 "segments" register.
2337 * gdb/arch/amd64.c (amd64_create_target_description): Add
2338 "segments" parameter. Call create_feature_i386_64bit_segments
2339 only if SEGMENTS is true.
2340 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2341 call to amd64_create_target_description.
2343 2018-06-29 Pedro Alves <palves@redhat.com>
2345 * thread.c (thread_target_id_str): New, factored out from ...
2346 (print_thread_info_1): ... here. Use it to compute the max
2347 "Target Id" column width.
2349 2018-06-29 Pedro Alves <palves@redhat.com>
2351 * remote.c (remote_target::extra_thread_info): Delete
2352 'display_buf' and 'n' locals. from the cache, regardless of
2353 packet mechanims is in use. Use cache for qThreadExtra and qP
2356 2018-06-29 Pedro Alves <palves@redhat.com>
2358 * blockframe.c (find_pc_sect_containing_function): New function.
2359 * breakpoint.c (print_breakpoint_location): Don't call
2360 find_pc_sect_function.
2361 * linespec.c (create_sals_line_offset): Record the location's
2363 * linespec.c (convert_address_location_to_sals): Fill in sal's
2364 symbol with find_pc_sect_containing_function.
2365 * symtab.c (find_function_start_sal): Rename to ...
2366 (find_function_start_sal_1): ... this.
2367 (find_function_start_sal): Reimplement as wrapper around
2368 find_function_start_sal_1, and use
2369 find_pc_sect_containing_function to fill in the sal's symbol.
2370 (find_function_start_sal(symbol*, bool)): Adjust.
2371 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2373 (find_pc_sect_containing_function): Declare.
2375 2018-06-29 Pedro Alves <palves@redhat.com>
2377 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2378 true if the the location has no symbol.
2380 2018-06-28 Tom Tromey <tom@tromey.com>
2382 * NEWS: Mention --enable-codesign.
2383 * silent-rules.mk (ECHO_SIGN): New variable.
2384 * configure.ac: Add --enable-codesign.
2385 * configure: Rebuild.
2386 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2387 (gdb$(EXEEXT)): Optionally invoke codesign.
2389 2018-06-28 Pedro Alves <palves@redhat.com>
2391 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2393 (switch_to_thread_no_regs): Adjust comment.
2394 * infcmd.c (stop_pc): Delete.
2395 (post_create_inferior, info_program_command): Replace references
2396 to stop_pc with references to thread_info->suspend.stop_pc.
2397 * inferior.h (stop_pc): Delete declaration.
2398 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2399 (handle_inferior_event_1, handle_signal_stop)
2400 (process_event_stop_test, keep_going_stepped_thread)
2401 (handle_step_into_function, handle_step_into_function_backward)
2402 (print_stop_location): Replace references to stop_pc with
2403 references to thread_info->suspend.stop_pc.
2404 (struct infcall_suspend_state) <stop_pc>: Delete field.
2405 (save_infcall_suspend_state, restore_infcall_suspend_state):
2406 Remove references to inf_stat->stop_pc.
2407 * linux-fork.c (fork_load_infrun_state): Likewise.
2408 * record-btrace.c (record_btrace_set_replay): Likewise.
2409 * record-full.c (record_full_goto_entry): Likewise.
2410 * remote.c (print_one_stopped_thread): Likewise.
2411 * target.c (target_resume): Extend comment.
2412 * thread.c (set_executing_thread): New.
2413 (set_executing): Use it.
2414 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2415 Remove references to stop_pc.
2417 2018-06-28 Pedro Alves <palves@redhat.com>
2419 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2420 Moving fetching stop_pc until after ecs->event_thread is refreshed.
2422 2018-06-28 Tom Tromey <tom@tromey.com>
2424 * coffread.c (coff_symfile_finish): Update.
2425 * xcoffread.c (xcoff_symfile_finish): Update.
2426 * elfread.c (elf_symfile_finish): Update.
2427 * symfile.h (dwarf2_free_objfile): Don't declare.
2428 * dwarf2read.c (_initialize_dwarf2_read): Use
2429 register_objfile_data_with_cleanup.
2430 (dwarf2_free_objfile): Now static. Change signature.
2432 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2434 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2435 option "-o" to add-symbol-file-load to add an offset to each
2436 section's load address.
2437 * symfile.c (set_objfile_default_section_offset): New function.
2439 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2441 * symfile.c (add_symbol_file_command): Make sure that sections
2442 with the same name are sorted in the same order.
2444 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2446 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2447 require the second argument. If omitted, load sections at the
2448 addresses specified in the file.
2450 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2452 * symfile.c (symbol_file_command, symbol_file_add_main_1)
2453 (_initialize_symfile): Add option "-o" to symbol-file to add an
2454 offset to each section of the symbol file.
2456 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2458 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2460 2018-06-27 Tom Tromey <tom@tromey.com>
2462 * stack.c (_initialize_stack): Update "func" help text.
2464 2018-06-27 Tom Tromey <tom@tromey.com>
2466 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2468 (unwind_infopy_str, pyuw_create_unwind_info)
2469 (unwind_infopy_add_saved_register, pyuw_sniffer)
2470 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2472 (struct saved_reg): Add constructor.
2473 <value>: Now a gdbpy_ref<>.
2475 2018-06-27 Tom Tromey <tom@tromey.com>
2477 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2479 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2481 * gdb-gdb.py.in: Format using autopep8.
2483 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2485 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2486 (type_lookup_function): Recognize CORE_ADDR values.
2488 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2490 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2493 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2495 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2498 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2500 * gdb-gdb.py: Move to...
2501 * gdb-gdb.py.in: ... here.
2502 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2503 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2505 (distclean): Remove gdb-gdb.py when cleaning.
2506 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2507 * configure: Re-generate.
2509 2018-06-27 Pedro Alves <palves@redhat.com>
2511 * proc-service.c (get_ps_regcache): New.
2512 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2513 (ps_lsetfpregs): Use it.
2515 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
2518 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2519 (dwarf_decode_lines_1): Adjust.
2521 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2523 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2525 <info_proc>: Likewise.
2527 2018-06-26 Joel Brobecker <brobecker@adacore.com>
2529 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2530 to windows_fetch_one_register, and only handle the case of
2531 fetching one register. Move the code that reloads the context
2532 and iterates over all registers if R is negative to...
2533 (windows_nat_target::fetch_registers): ... here.
2534 (do_windows_store_inferior_registers): Rename to
2535 windows_store_one_register, and only handle the case of storing
2536 one register. Move the code that handles the case where r is
2538 (windows_nat_target::store_registers) ... here.
2540 2018-06-26 Tom Tromey <tom@tromey.com>
2543 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2544 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2546 (rust_internal_print_type): Add podata parameter.
2547 (rust_print_type): Update.
2549 2018-06-26 Tom Tromey <tom@tromey.com>
2551 * typeprint.h (struct print_offset_data) <update, finish,
2552 maybe_print_hole>: New methods.
2553 <indentation>: New constant.
2554 * typeprint.c (print_offset_data::indentation): Define.
2555 (print_offset_data::maybe_print_hole, print_offset_data::update)
2556 (print_offset_data::finish): Move from c-typeprint.c and rename.
2557 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2558 (print_spaces_filtered_with_print_options): Update.
2559 (c_print_type_union_field_offset, maybe_print_hole)
2560 (c_print_type_struct_field_offset): Move to typeprint.c and
2562 (c_type_print_base_struct_union): Update.
2564 2018-06-25 Pedro Alves <palves@redhat.com>
2566 * gdbthread.h (thread_info_ref, delete_thread)
2567 (delete_thread_silent, first_thread_of_inferior)
2568 (any_thread_of_inferior, switch_to_thread)
2569 (enable_thread_stack_temporaries)
2570 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2571 (get_last_thread_stack_temporary)
2572 (value_in_thread_stack_temporaries, can_access_registers_thread):
2573 Spell out "struct thread_info" instead of just "thread_info".
2574 * inferior.h (notice_new_inferior): Likewise.
2576 2018-06-25 Pedro Alves <palves@redhat.com>
2578 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2579 pass thread_info pointer to delete_thread.
2580 (windows_nat_target::detach): Pass inferior pointer to
2582 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2584 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2585 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2586 and pass a thread_info pointer to delete_thread.
2587 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2588 pass thread_info pointer to delete_thread.
2589 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2590 delete_thread_silent call.
2591 * procfs.c (procfs_target::detach): Pass inferior pointer to
2593 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2594 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2595 delete_thread_silent call.
2596 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2597 pass thread_info pointer to delete_thread.
2598 (windows_nat_target::detach): Pass inferior pointer to
2601 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2603 * regcache.c (readable_regcache::read_part): Fix asserts.
2604 (reg_buffer::raw_collect_part): New function.
2605 (regcache::write_part): Fix asserts.
2606 (reg_buffer::raw_supply_part): New function.
2607 (regcache::transfer_regset_register): New helper function.
2608 (regcache::transfer_regset): Call new functions.
2609 (regcache_supply_regset): Use gdb_byte*.
2610 (regcache::supply_regset): Likewise.
2611 (regcache_collect_regset): Likewise.
2612 (regcache::collect_regset): Likewise.
2613 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2614 (reg_buffer::raw_supply_part): Likewise.
2615 (regcache::transfer_regset_register): Likewise.
2616 (regcache::transfer_regset): Use gdb_byte*.
2618 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2620 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2622 2018-06-21 Pedro Alves <palves@redhat.com>
2624 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2625 instead of a ptid_t. All callers adjusted.
2626 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2628 (print_ada_task_info, display_current_task_id, task_command_1):
2630 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2632 (breakpoint_kind): Adjust.
2633 (remove_breakpoints_pid): Rename to ...
2634 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2635 pointer. All callers adjusted.
2636 (bpstat_clear_actions): Use inferior_thread.
2637 (get_bpstat_thread): New.
2638 (bpstat_do_actions): Use it.
2639 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2640 to take a thread_info pointer. All callers adjusted.
2641 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2642 (breakpoint_re_set_thread): Use inferior_thread.
2643 * breakpoint.h (struct inferior): Forward declare.
2644 (bpstat_stop_status): Update.
2645 (remove_breakpoints_pid): Delete.
2646 (remove_breakpoints_inf): New.
2647 * bsd-uthread.c (bsd_uthread_target::wait)
2648 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2649 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2650 (maint_btrace_packet_history_cmd)
2651 (maint_btrace_clear_packet_history_cmd): Adjust.
2652 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2654 * cli/cli-interp.c: Include "inferior.h".
2655 * common/refcounted-object.h (struct
2656 refcounted_object_ref_policy): New.
2657 * compile/compile-object-load.c: Include gdbthread.h.
2658 (store_regs): Use inferior_thread.
2659 * corelow.c (core_target::close): Use current_inferior.
2660 (core_target_open): Adjust to use first_thread_of_inferior and use
2661 the current inferior.
2662 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2663 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2664 <thread>: ... this new field. All references adjusted.
2665 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2666 Take a thread_info pointer instead of a ptid_t.
2667 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2668 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2669 thread_info pointer instead of a ptid_t.
2670 * elfread.c: Include "inferior.h".
2671 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2672 Use inferior_thread.
2673 * eval.c (evaluate_subexp): Likewise.
2674 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2676 * gdb_proc_service.h (struct thread_info): Forward declare.
2677 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2678 <thread>: ... this new field. All references adjusted.
2679 * gdbarch.h, gdbarch.c: Regenerate.
2680 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2681 'thread' parameter. All implementations and callers adjusted.
2682 * gdbthread.h (thread_info) <set_running>: New method.
2683 (delete_thread, delete_thread_silent): Take a thread_info pointer
2685 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2686 (first_thread_of_process): Delete, replaced by ...
2687 (first_thread_of_inferior): ... this new function. All callers
2689 (any_live_thread_of_process): Delete, replaced by ...
2690 (any_live_thread_of_inferior): ... this new function. All callers
2692 (switch_to_thread, switch_to_no_thread): Declare.
2693 (is_executing): Delete.
2694 (enable_thread_stack_temporaries): Update comment.
2695 <enable_thread_stack_temporaries>: Take a thread_info pointer
2696 instead of a ptid_t. Incref the thread.
2697 <~enable_thread_stack_temporaries>: Decref the thread.
2700 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2701 (get_last_thread_stack_temporary)
2702 (value_in_thread_stack_temporaries, can_access_registers_thread):
2703 Take a thread_info pointer instead of a ptid_t. All callers
2705 * infcall.c (get_call_return_value): Use inferior_thread.
2706 (run_inferior_call): Work with thread pointers instead of ptid_t.
2707 (call_function_by_hand_dummy): Work with thread pointers instead
2708 of ptid_t. Use thread_info_ref.
2709 * infcmd.c (proceed_thread_callback): Access thread's state
2711 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2712 access thread's state directly.
2713 (continue_command): Use inferior_thread.
2714 (info_program_command): Use find_thread_ptid and access thread
2716 (proceed_after_attach_callback): Use thread state directly.
2717 (notice_new_inferior): Take a thread_info pointer instead of a
2718 ptid_t. All callers adjusted.
2719 (exit_inferior): Take an inferior pointer instead of a pid. All
2721 (exit_inferior_silent): New.
2722 (detach_inferior): Delete.
2723 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2724 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2725 (detach_inferior_command, kill_inferior_command): Use
2726 find_inferior_id instead of valid_gdb_inferior_id and
2727 gdb_inferior_id_to_pid.
2728 (inferior_command): Use inferior and thread pointers.
2729 * inferior.h (struct thread_info): Forward declare.
2730 (notice_new_inferior): Take a thread_info pointer instead of a
2731 ptid_t. All callers adjusted.
2732 (detach_inferior): Delete declaration.
2733 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2734 instead of a pid. All callers adjusted.
2735 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2736 (valid_gdb_inferior_id): Delete.
2737 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2738 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2739 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2741 <inf>: ... this new field.
2742 <step_ptid>: Delete, replaced by ...
2743 <step_thread>: ... this new field.
2744 (get_displaced_stepping_state): Take an inferior pointer instead
2745 of a pid. All callers adjusted.
2746 (displaced_step_in_progress_any_inferior): Adjust.
2747 (displaced_step_in_progress_thread): Take a thread pointer instead
2748 of a ptid_t. All callers adjusted.
2749 (displaced_step_in_progress, add_displaced_stepping_state): Take
2750 an inferior pointer instead of a pid. All callers adjusted.
2751 (get_displaced_step_closure_by_addr): Adjust.
2752 (remove_displaced_stepping_state): Take an inferior pointer
2753 instead of a pid. All callers adjusted.
2754 (displaced_step_prepare_throw, displaced_step_prepare)
2755 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2756 All callers adjusted.
2757 (start_step_over): Adjust.
2758 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2759 displaced step queue.
2760 (do_target_resume): Adjust.
2761 (fetch_inferior_event): Use inferior_thread.
2762 (context_switch, get_inferior_stop_soon): Take an
2763 execution_control_state pointer instead of a ptid_t. All callers
2765 (switch_to_thread_cleanup): Delete.
2766 (stop_all_threads): Use scoped_restore_current_thread.
2767 * inline-frame.c: Include "gdbthread.h".
2768 (inline_state) <inline_state>: Take a thread pointer instead of a
2769 ptid_t. All callers adjusted.
2770 <ptid>: Delete, replaced by ...
2771 <thread>: ... this new field.
2772 (find_inline_frame_state): Take a thread pointer instead of a
2773 ptid_t. All callers adjusted.
2774 (skip_inline_frames, step_into_inline_frame)
2775 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2776 pointer instead of a ptid_t. All callers adjusted.
2777 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2778 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2779 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2781 * linux-nat.c (get_detach_signal): Likewise.
2782 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2783 (thread_db_notice_clone): Adjust.
2784 (thread_db_find_new_threads_silently)
2785 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2786 a thread pointer instead of a ptid_t. All callers adjusted.
2787 * mi/mi-cmd-var.c: Include "inferior.h".
2788 (mi_cmd_var_update_iter): Update to use thread pointers.
2789 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2791 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2793 (mi_output_running): ... this new function.
2794 (mi_on_resume_1): Adjust to use it.
2795 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2796 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2798 (interrupt_thread_callback): : Adjust to use thread and inferior
2800 * proc-service.c: Include "gdbthread.h".
2801 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2802 * progspace-and-thread.c: Include "inferior.h".
2803 * progspace.c: Include "inferior.h".
2804 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2805 hold a reference to an inferior_object.
2806 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2808 * python/py-inferior.c (struct inferior_object): Give the type a
2809 tag name instead of a typedef.
2810 (python_on_normal_stop): No need to check if the current thread is
2812 (inferior_to_inferior_object): Change return type to
2813 inferior_object. All callers adjusted.
2814 (find_thread_object): Delete, bits factored out to ...
2815 (thread_to_thread_object): ... this new function.
2816 * python/py-infthread.c (create_thread_object): Use
2817 inferior_to_inferior_object.
2818 (thpy_is_stopped): Use thread pointer directly.
2819 (gdbpy_selected_thread): Use inferior_thread.
2820 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2821 field, replaced with ...
2822 <thread>: ... this new field. All users adjusted.
2823 (btpy_insn_or_gap_new): Drop const.
2824 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2826 * python/py-record.c: Include "gdbthread.h".
2827 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2828 a ptid_t. All callers adjusted.
2829 (gdbpy_current_recording): Use inferior_thread.
2830 * python/py-record.h (recpy_record_object) <ptid>: Delete
2831 field, replaced with ...
2832 <thread>: ... this new field. All users adjusted.
2833 (recpy_element_object) <ptid>: Delete
2834 field, replaced with ...
2835 <thread>: ... this new field. All users adjusted.
2836 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2837 a ptid_t. All callers adjusted.
2838 * python/py-threadevent.c: Include "gdbthread.h".
2839 (get_event_thread): Use thread_to_thread_object.
2840 * python/python-internal.h (struct inferior_object): Forward
2842 (find_thread_object, find_inferior_object): Delete declarations.
2843 (thread_to_thread_object, inferior_to_inferior_object): New
2845 * record-btrace.c: Include "inferior.h".
2846 (require_btrace_thread): Use inferior_thread.
2847 (record_btrace_frame_sniffer)
2848 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2849 (get_thread_current_frame): Use scoped_restore_current_thread and
2851 (get_thread_current_frame): Use thread pointer directly.
2852 (record_btrace_replay_at_breakpoint): Use thread's inferior
2854 * record-full.c: Include "inferior.h".
2855 * regcache.c: Include "gdbthread.h".
2856 (get_thread_arch_regcache): Use the inferior's address space
2858 (get_thread_regcache, registers_changed_thread): New.
2859 * regcache.h (get_thread_regcache(thread_info *thread)): New
2861 (registers_changed_thread): New.
2862 (remote_target) <remote_detach_1>: Swap order of parameters.
2863 (remote_add_thread): <remote_add_thread>: Return the new thread.
2864 (get_remote_thread_info(ptid_t)): New overload.
2865 (remote_target::remote_notice_new_inferior): Use thread pointers
2867 (remote_target::process_initial_stop_replies): Use
2868 thread_info::set_running.
2869 (remote_target::remote_detach_1, remote_target::detach)
2870 (extended_remote_target::detach): Adjust.
2871 * stack.c (frame_show_address): Use inferior_thread.
2872 * target-debug.h (target_debug_print_thread_info_pp): New.
2873 * target-delegates.c: Regenerate.
2874 * target.c (default_thread_address_space): Delete.
2875 (memory_xfer_partial_1): Use current_inferior.
2876 (target_detach): Use current_inferior.
2877 (target_thread_address_space): Delete.
2878 (generic_mourn_inferior): Use current_inferior.
2879 * target.h (struct target_ops) <thread_address_space>: Delete.
2880 (target_thread_address_space): Delete.
2881 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2883 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2884 thread pointer instead of a ptid_t. Adjust all callers.
2885 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2886 (first_thread_of_process): Delete, replaced by ...
2887 (first_thread_of_inferior): ... this new function. All callers
2889 (any_thread_of_process): Rename to ...
2890 (any_thread_of_inferior): ... this, and take an inferior pointer.
2891 (any_live_thread_of_process): Rename to ...
2892 (any_live_thread_of_inferior): ... this, and take an inferior
2894 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2895 (value_in_thread_stack_temporaries)
2896 (get_last_thread_stack_temporary): Take a thread pointer instead
2897 of a ptid_t. Adjust all callers.
2898 (thread_info::set_running): New.
2899 (validate_registers_access): Use inferior_thread.
2900 (can_access_registers_ptid): Rename to ...
2901 (can_access_registers_thread): ... this, and take a thread
2903 (print_thread_info_1): Adjust to compare thread pointers instead
2905 (switch_to_no_thread, switch_to_thread): Make extern.
2906 (scoped_restore_current_thread::~scoped_restore_current_thread):
2907 Use m_thread pointer directly.
2908 (scoped_restore_current_thread::scoped_restore_current_thread):
2909 Use inferior_thread.
2910 (thread_command): Use thread pointer directly.
2911 (thread_num_make_value_helper): Use inferior_thread.
2912 * top.c (execute_command): Use inferior_thread.
2913 * tui/tui-interp.c: Include "inferior.h".
2914 * varobj.c (varobj_create): Use inferior_thread.
2915 (value_of_root_1): Use find_thread_global_id instead of
2916 global_thread_id_to_ptid.
2918 2018-06-21 Alan Hayward <alan.hayward@arm.com>
2920 * regcache.c (readable_regcache::read_part): Avoid memcpy when
2922 (regcache::write_part): Likewise.
2923 (readable_regcache::cooked_read_part): Update comment.
2924 (readable_regcache::cooked_write_part): Likewise.
2925 * regcache.h: (readable_regcache::read_part): Likewise.
2926 (regcache::write_part): Likewise.
2928 2018-06-21 Richard Bunt <richard.bunt@arm.com>
2929 Dirk Schubert <dirk.schubert@arm.com>
2931 * aarch64-linux-nat.c (post_attach): New.
2932 (aarch64_linux_nat_target::post_attach): Override post_attach to
2933 record the number of hardware debug registers.
2935 2018-06-20 Tom Tromey <tom@tromey.com>
2937 * python/py-param.c (add_setshow_generic): Make parameters const.
2938 (parmpy_init): Update.
2940 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2942 * regcache.h (regcache_cooked_read_ftype): Rename to...
2943 (register_read_ftype): ...this, change type to function_view.
2944 (class reg_buffer) <save>: Remove src parameter.
2945 (readonly_detached_regcache) <readonly_detached_regcache>: Make
2946 parameter non-const in first overload. Remove src parameter in
2948 * regcache.c (do_cooked_read): Remove.
2949 (readonly_detached_regcache::readonly_detached_regcache): Make
2950 parameter non-const, adjust call to other constructor.
2951 (reg_buffer::save): Remove src parameter.
2952 * frame.c (do_frame_register_read): Remove.
2953 (frame_save_as_regcache): Use lambda function.
2954 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2955 parameter to ppu2spu_data *.
2956 (ppu2spu_sniffer): Use lambda function.
2958 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2960 * record-full.c (record_full_target::insert_breakpoint): Remove
2961 "struct" keyword, add const.
2963 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2965 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2966 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2967 * configure.ac: Remove AC_PREREQ, add missing quoting.
2968 * gnulib/configure.ac: Modernize usage of
2969 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
2970 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2971 (AUTOMAKE_VERSION): Bump to 1.15.1.
2972 * configure: Re-generate.
2973 * config.in: Re-generate.
2974 * aclocal.m4: Re-generate.
2975 * gnulib/aclocal.m4: Re-generate.
2976 * gnulib/config.in: Re-generate.
2977 * gnulib/configure: Re-generate.
2978 * gnulib/import/Makefile.in: Re-generate.
2980 2018-06-19 Pedro Alves <palves@redhat.com>
2982 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2983 (lookup_minimal_symbol_by_pc_section): ... here with
2984 gdb_assert_not_reached added.
2986 2018-06-19 Pedro Alves <palves@redhat.com>
2988 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2989 parameter with a block parameter. Compare location's block symbol
2990 with the frame's block instead of addresses.
2991 (skip_inline_frames): Pass the current block instead of the
2992 frame's address. Break out as soon as we determine the frame
2993 should not be skipped.
2995 2018-06-18 Tom Tromey <tom@tromey.com>
2997 * solib-aix.c (solib_aix_get_section_offsets): Return
2999 (solib_aix_solib_create_inferior_hook): Update.
3001 2018-06-18 Tom Tromey <tom@tromey.com>
3003 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3005 2018-06-18 Tom Tromey <tom@tromey.com>
3007 * solib-frv.c (frv_relocate_main_executable): Use
3009 * solib-dsbt.c (dsbt_relocate_main_executable): Use
3012 2018-06-18 Tom Tromey <tom@tromey.com>
3014 * objfiles.h (inhibit_section_map_updates): Update.
3015 (resume_section_map_updates, resume_section_map_updates_cleanup):
3017 * solib-svr4.c (svr4_handle_solib_event): Update.
3018 * objfiles.c (inhibit_section_map_updates): Return
3019 scoped_restore_tmpl<int>.
3020 (resume_section_map_updates, resume_section_map_updates_cleanup):
3023 2018-06-18 Tom Tromey <tom@tromey.com>
3025 * valprint.h (read_string): Update.
3026 * valprint.c (read_string): Change type of "buffer".
3027 (val_print_string): Update.
3028 * python/py-value.c (valpy_string): Update.
3029 * language.h (struct language_defn) <la_get_string>: Change
3031 (default_get_string, c_get_string): Update.
3032 * language.c (default_get_string): Change type of "buffer".
3033 * guile/scm-value.c (gdbscm_value_to_string): Update.
3034 * c-lang.c (c_get_string): Change type of "buffer".
3036 2018-06-18 Tom Tromey <tom@tromey.com>
3038 * ser-mingw.c (struct pipe_state_destroyer): New.
3039 (pipe_state_up): New typedef.
3040 (cleanup_pipe_state): Remove.
3041 (pipe_windows_open): Use pipe_state_up. Don't release argv.
3043 2018-06-18 Tom Tromey <tom@tromey.com>
3045 * rust-lang.h (rust_yyerror): Don't declare.
3046 * rust-lang.c (rust_language_defn): Update.
3047 * rust-exp.y (yyerror): Now static.
3048 * parse.c (parse_exp_in_context_1): Update.
3049 * p-lang.h (p_yyerror): Don't declare.
3050 * p-lang.c (p_language_defn): Update.
3051 * p-exp.y (yyerror): Now static.
3052 * opencl-lang.c (opencl_language_defn): Update.
3053 * objc-lang.c (objc_language_defn): Update.
3054 * m2-lang.h (m2_yyerror): Don't declare.
3055 * m2-lang.c (m2_language_defn): Update.
3056 * m2-exp.y (yyerror): Now static.
3057 * language.h (struct language_defn) <la_error>: Remove.
3058 * language.c (unk_lang_error): Remove.
3059 (unknown_language_defn, auto_language_defn): Remove.
3060 * go-lang.h (go_yyerror): Don't declare.
3061 * go-lang.c (go_language_defn): Update.
3062 * go-exp.y (yyerror): Now static.
3063 * f-lang.h (f_yyerror): Don't declare.
3064 * f-lang.c (f_language_defn): Update.
3065 * f-exp.y (yyerror): Now static.
3066 * d-lang.h (d_yyerror): Don't declare.
3067 * d-lang.c (d_language_defn): Update.
3068 * d-exp.y (yyerror): Now static.
3069 * c-lang.h (c_yyerror): Don't declare.
3070 * c-lang.c (c_language_defn, cplus_language_defn)
3071 (asm_language_defn, minimal_language_defn): Update.
3072 * c-exp.y (yyerror): Now static.
3073 * ada-lang.h (ada_yyerror): Don't declare.
3074 * ada-lang.c (ada_language_defn): Update.
3075 * ada-exp.y (yyerror): Now static.
3077 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3079 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3080 (store_sveregs_to_thread): Likewise.
3081 (aarch64_linux_fetch_inferior_registers): Check for SVE.
3082 (aarch64_linux_store_inferior_registers): Likewise.
3083 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3085 (aarch64_sve_regs_copy_to_regcache): Likewise.
3086 (aarch64_sve_regs_copy_from_regcache): Likewise.
3087 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3089 (aarch64_sve_regs_copy_to_regcache): Likewise.
3090 (aarch64_sve_regs_copy_from_regcache): Likewise.
3091 (sve_context): Structure from Linux headers.
3092 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3093 (SVE_SIG_ZREG_SIZE): Likewise.
3094 (SVE_SIG_PREG_SIZE): Likewise.
3095 (SVE_SIG_FFR_SIZE): Likewise.
3096 (SVE_SIG_REGS_OFFSET): Likewise.
3097 (SVE_SIG_ZREGS_OFFSET): Likewise.
3098 (SVE_SIG_ZREG_OFFSET): Likewise.
3099 (SVE_SIG_ZREGS_SIZE): Likewise.
3100 (SVE_SIG_PREGS_OFFSET): Likewise.
3101 (SVE_SIG_PREG_OFFSET): Likewise.
3102 (SVE_SIG_PREGS_SIZE): Likewise.
3103 (SVE_SIG_FFR_OFFSET): Likewise.
3104 (SVE_SIG_REGS_SIZE): Likewise.
3105 (SVE_SIG_CONTEXT_SIZE): Likewise.
3106 (SVE_PT_REGS_MASK): Likewise.
3107 (SVE_PT_REGS_FPSIMD): Likewise.
3108 (SVE_PT_REGS_SVE): Likewise.
3109 (SVE_PT_VL_INHERIT): Likewise.
3110 (SVE_PT_VL_ONEXEC): Likewise.
3111 (SVE_PT_REGS_OFFSET): Likewise.
3112 (SVE_PT_FPSIMD_OFFSET): Likewise.
3113 (SVE_PT_FPSIMD_SIZE): Likewise.
3114 (SVE_PT_SVE_ZREG_SIZE): Likewise.
3115 (SVE_PT_SVE_PREG_SIZE): Likewise.
3116 (SVE_PT_SVE_FFR_SIZE): Likewise.
3117 (SVE_PT_SVE_FPSR_SIZE): Likewise.
3118 (SVE_PT_SVE_FPCR_SIZE): Likewise.
3119 (__SVE_SIG_TO_PT): Likewise.
3120 (SVE_PT_SVE_OFFSET): Likewise.
3121 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3122 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3123 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3124 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3125 (SVE_PT_SVE_PREG_OFFSET): Likewise.
3126 (SVE_PT_SVE_PREGS_SIZE): Likewise.
3127 (SVE_PT_SVE_FFR_OFFSET): Likewise.
3128 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3129 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3130 (SVE_PT_SVE_SIZE): Likewise.
3131 (SVE_PT_SIZE): Likewise.
3132 (HAS_SVE_STATE): New define.
3134 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3136 * nat/aarch64-sve-linux-sigcontext.h: New file.
3137 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3139 (SVE_VQ_MIN): Likewise.
3140 (SVE_VQ_MAX): Likewise.
3141 (SVE_VL_MIN): Likewise.
3142 (SVE_VL_MAX): Likewise.
3143 (SVE_NUM_ZREGS): Likewise.
3144 (SVE_NUM_PREGS): Likewise.
3145 (sve_vl_valid): Likewise.
3146 (struct user_sve_header): Likewise.
3148 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
3149 Richard Bunt <Richard.Bunt@arm.com>
3151 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3152 was requested by GDB.
3154 2018-06-15 Tom de Vries <tdevries@suse.de>
3156 * MAINTAINERS (Write After Approval): Add Tom de Vries.
3158 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
3160 * gnulib/update-gnulib.sh: Print expected versions of
3163 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
3165 * arch-utils.c (default_type_align): Use type_length_units.
3166 * gdbtypes.c (type_align): Use type_length_units.
3168 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3170 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3171 of 'define' command.
3173 2018-06-14 Tom de Vries <tdevries@suse.de>
3176 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3177 get_no_prettyformat_print_options.
3179 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
3181 * sparc-nat.h: Include target.h.
3182 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3183 <fetch_registers>: Remove this argument in function call.
3184 <store_registers>: Remove this argument in function call, remove
3186 <low_forget_process>: Call sparc64_forget_process instead of
3187 sparc_forget_process.
3189 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3191 * procfs.c (_initialize_procfs): Use add_inf_child_target.
3192 (procfs_target::make_corefile_notes): Adjust to new
3193 target_read_alloc return type.
3195 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3196 Stephen Roberts <stephen.roberts@arm.com>
3199 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3200 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3201 Move should_notify_stop local into more inner scope.
3203 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3204 Stephen Roberts <stephen.roberts@arm.com>
3207 * infrun.c (resume_1): Add call to mark_async_event_handler.
3209 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3211 * infrun.c (do_target_wait): Change old version of $pc printed.
3213 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
3215 * dwarf2read.c (read_index_from_section): Rename to...
3216 (read_gdb_index_from_section): ... this, update all callers.
3217 (dwarf2_read_index): Rename to...
3218 (dwarf2_read_gdb_index): ... this, update all callers.
3220 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
3222 * gdb/hppa-linux-nat.c
3223 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3224 hppa_linux_nat_target::fetch_registers.
3226 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3228 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3229 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3230 (AARCH64_DWARF_SVE_FFR): Likewise.
3231 (AARCH64_DWARF_SVE_P0): Likewise.
3232 (AARCH64_DWARF_SVE_Z0): Likewise.
3234 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3236 * common/common-regcache.h (raw_compare): New function.
3237 * regcache.c (regcache::raw_compare): Likewise.
3238 * regcache.h (regcache::raw_compare): New declaration.
3240 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3242 * common/common-regcache.h (reg_buffer_common): New structure.
3243 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3244 (reg_buffer::raw_supply): Likewise.
3245 (reg_buffer::raw_supply_integer): Likewise.
3246 (reg_buffer::raw_supply_zeroed): Likewise.
3247 (reg_buffer::raw_collect): Likewise.
3248 (reg_buffer::raw_collect_integer): Likewise.
3249 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
3250 (reg_buffer::raw_supply): Likewise.
3251 (reg_buffer::raw_supply_integer): Likewise.
3252 (reg_buffer::raw_supply_zeroed): Likewise.
3253 (reg_buffer::raw_collect): Likewise.
3254 (reg_buffer::raw_collect_integer): Likewise.
3256 2018-06-10 Tom Tromey <tom@tromey.com>
3258 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
3259 (class remote_state) <stop_reply_queue>: Now std::vector.
3260 (remote_state::~remote_state)
3261 (remote_target::stop_reply_queue_length): Update.
3262 (struct queue_iter_param, remove_child_of_pending_fork)
3263 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3264 (check_pending_event_prevents_wildcard_vcont_callback)
3265 (remove_stop_reply_for_inferior)
3266 (remove_stop_reply_of_remote_state)
3267 (remote_notif_remove_once_on_match)
3268 (stop_reply_match_ptid_and_ws)
3269 (remote_kill_child_of_pending_fork): Remove.
3270 (remote_target::remove_new_fork_children)
3271 (remote_target::check_pending_events_prevent_wildcard_vcont)
3272 (remote_target::discard_pending_stop_replies)
3273 (remote_target::discard_pending_stop_replies_in_queue)
3274 (remote_target::remote_notif_remove_queued_reply)
3275 (remote_target::queued_stop_reply)
3276 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
3277 (remote_target::wait, remote_target::kill_new_fork_children)
3278 (remote_target::async): Update.
3280 2018-06-10 Tom Tromey <tom@tromey.com>
3282 * record-full.c (record_full_arch_list_cleanups): Remove.
3283 (record_full_message): Use try/catch.
3284 (record_full_wait_cleanups): Remove.
3285 (record_full_wait_1): Use try/catch.
3286 (record_full_restore): Likewise.
3288 2018-06-10 Tom Tromey <tom@tromey.com>
3290 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
3291 declare VEC. Add constructor.
3292 <in_target_beneath>: Now bool.
3293 (record_full_breakpoints): Now a std::vector, static.
3294 (record_full_sync_record_breakpoints)
3295 (record_full_init_record_breakpoints)
3296 (record_full_target::insert_breakpoint)
3297 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
3299 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
3301 * dwarf2read.c (process_cu_includes): Remove struct keyword.
3302 * serial.c (serial_interface_lookup): Remove struct keyword.
3304 2018-06-10 Tom Tromey <tom@tromey.com>
3306 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3308 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3310 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3312 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3313 "beneath" as a method.
3314 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3315 Use "beneath" as a method.
3317 2018-06-10 Tom Tromey <tom@tromey.com>
3319 * tracefile.c (struct trace_file_writer_deleter): New.
3320 <operator()>: Rename from trace_file_writer_xfree.
3321 (trace_file_writer_up): New typedef.
3322 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3324 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3326 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3327 <m_registers, m_register_status>: Change type to
3329 * regcache.c (reg_buffer::reg_buffer): Use new instead of
3332 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3334 * common/common-regcache.h (enum register_status): Add
3335 underlying type "signed char".
3336 * regcache.h (reg_buffer) <m_register_status>: Change type to
3338 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3339 register_status instead of signed char.
3340 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3341 (reg_buffer::get_register_status): Remove cast.
3342 (readable_regcache::raw_read): Remove cast.
3343 (readable_regcache::cooked_read): Remove cast.
3345 2018-06-09 Tom Tromey <tom@tromey.com>
3347 * source.c (reverse_search_command, forward_search_command): Use
3350 2018-06-09 Tom Tromey <tom@tromey.com>
3352 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
3353 (serial_ops_list): Now static, std::vector.
3354 (serial_interface_lookup, serial_add_interface): Update.
3356 2018-06-09 Tom Tromey <tom@tromey.com>
3358 * dwarf2read.c (process_cu_includes): Update.
3359 (process_full_comp_unit): Update.
3360 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3363 2018-06-08 Paul Koning <paul_koning@dell.com>
3367 * python/python.c (do_start_initialization):
3368 Avoid call to internal Python API.
3369 (init__gdb_module): New function.
3371 2018-06-08 Gary Benson <gbenson@redhat.com>
3373 * linux-thread-db.c (valprint.h): New include.
3374 (struct check_thread_db_info): New structure.
3375 (check_thread_db_on_load, tdb_testinfo): New static globals.
3376 (check_thread_db, check_thread_db_callback): New functions.
3377 (try_thread_db_load_1): Run integrity checks if requested.
3378 (maintenance_check_libthread_db): New function.
3379 (_initialize_thread_db): Register "maint check libthread-db"
3380 and "maint set/show check-libthread-db".
3381 * NEWS: Mention the above new commands.
3383 2018-06-08 Tom Tromey <tom@tromey.com>
3385 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3388 2018-06-08 Tom Tromey <tom@tromey.com>
3390 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3392 2018-06-08 Tom Tromey <tom@tromey.com>
3394 * common/btrace-common.h (struct btrace_data): Add constructor,
3395 destructor, move assignment operator.
3396 <empty, clear, fini>: New methods.
3397 <format>: Initialize.
3398 (btrace_data_init, btrace_data_fini, btrace_data_clear)
3399 (btrace_data_empty): Don't declare.
3400 * common/btrace-common.c (btrace_data_init): Remove.
3401 (btrace_data::fini): Rename from btrace_data_fini.
3402 (btrace_data::empty): Rename from btrace_data_empty.
3403 (btrace_data::clear): Rename from btrace_data_clear. Return
3405 * btrace.h (make_cleanup_btrace_data): Don't declare.
3406 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3407 (parse_xml_btrace): Update.
3408 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3409 (maint_btrace_clear_packet_history_cmd): Update.
3411 2018-06-07 Pedro Alves <palves@redhat.com>
3413 * target.h (target_ops) <beneath>: Now a method. All references
3415 (class target_stack): New.
3416 * target.c (g_target_stack): New.
3417 (g_current_top_target): Delete.
3418 (current_top_target): Get the top target out of g_target_stack.
3419 (target_stack::push, target_stack::unpush): New.
3420 (push_target, unpush_target): Reimplement.
3421 (target_is_pushed): Reimplement in terms of g_target_stack.
3422 (target_ops::beneath, target_stack::find_beneath): New.
3424 2018-06-07 Pedro Alves <palves@redhat.com>
3426 * target.h (find_target_beneath): Delete declaration.
3427 * target.c (find_target_beneath): Delete definition.
3428 * aix-thread.c: All callers of find_target_beneath adjusted to
3429 call target_ops::beneath instead.
3430 * bsd-uthread.c: Likewise.
3431 * linux-thread-db.c: Likewise.
3432 * ravenscar-thread.c: Likewise.
3433 * sol-thread.c: Likewise.
3434 * spu-multiarch.c: Likewise.
3436 2018-06-07 Pedro Alves <palves@redhat.com>
3438 * target.h (target_ops) <beneath>: Now a method. All references
3440 (target_ops) <m_beneath>: New.
3441 * target.c (target_ops::beneath): New.
3442 * corelow.c: Adjust all references to target_ops::beneath.
3443 * linux-thread-db.c: Likewise.
3444 * make-target-delegates: Likewise.
3445 * record-btrace.c: Likewise.
3446 * record-full.c: Likewise.
3447 * remote.c: Likewise.
3448 * target.c: Likewise.
3449 * target-delegates.c: Regenerate.
3451 2018-06-07 Pedro Alves <palves@redhat.com>
3453 * target.h (target_stack): Delete.
3454 (current_top_target): Declare function.
3455 * target.c (target_stack): Delete.
3456 (g_current_top_target): New.
3457 (current_top_target): New function.
3458 * auxv.c: Use current_top_target instead of target_stack
3460 * avr-tdep.c: Likewise.
3461 * breakpoint.c: Likewise.
3462 * corefile.c: Likewise.
3463 * elfread.c: Likewise.
3465 * exceptions.c: Likewise.
3466 * frame.c: Likewise.
3467 * gdbarch-selftests.c: Likewise.
3468 * gnu-v3-abi.c: Likewise.
3469 * ia64-tdep.c: Likewise.
3470 * ia64-vms-tdep.c: Likewise.
3471 * infcall.c: Likewise.
3472 * infcmd.c: Likewise.
3473 * infrun.c: Likewise.
3474 * linespec.c: Likewise.
3475 * linux-tdep.c: Likewise.
3476 * minsyms.c: Likewise.
3477 * ppc-linux-nat.c: Likewise.
3478 * ppc-linux-tdep.c: Likewise.
3479 * procfs.c: Likewise.
3480 * regcache.c: Likewise.
3481 * remote.c: Likewise.
3482 * rs6000-tdep.c: Likewise.
3483 * s390-linux-nat.c: Likewise.
3484 * s390-tdep.c: Likewise.
3485 * solib-aix.c: Likewise.
3486 * solib-darwin.c: Likewise.
3487 * solib-dsbt.c: Likewise.
3488 * solib-spu.c: Likewise.
3489 * solib-svr4.c: Likewise.
3490 * solib-target.c: Likewise.
3491 * sparc-tdep.c: Likewise.
3492 * sparc64-tdep.c: Likewise.
3493 * spu-tdep.c: Likewise.
3494 * symfile.c: Likewise.
3495 * symtab.c: Likewise.
3496 * target-descriptions.c: Likewise.
3497 * target-memory.c: Likewise.
3498 * target.c: Likewise.
3499 * target.h: Likewise.
3500 * tracefile-tfile.c: Likewise.
3501 * tracepoint.c: Likewise.
3502 * valops.c: Likewise.
3503 * valprint.c: Likewise.
3504 * value.c: Likewise.
3505 * windows-tdep.c: Likewise.
3506 * mi/mi-main.c: Likewise.
3508 2018-06-07 Tom Tromey <tom@tromey.com>
3510 * valprint.h (build_address_symbolic): Declare.
3511 * printcmd.c (print_address_symbolic): Update.
3512 (build_address_symbolic): Change "name" and "filename" to
3514 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3516 * defs.h (build_address_symbolic): Remove declaration.
3518 2018-06-07 Alan Hayward <alan.hayward@arm.com>
3520 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3521 (aarch64_vnv_type): Add function.
3522 (aarch64_pseudo_register_name): Add V regs for SVE.
3523 (aarch64_pseudo_register_type): Likewise.
3524 (aarch64_pseudo_register_reggroup_p): Likewise.
3525 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3526 (aarch64_pseudo_read_value): Add V regs for SVE.
3527 (aarch64_pseudo_write_2): Use V0 offset for SVE
3528 (aarch64_pseudo_write): Add V regs for SVE.
3529 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3531 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3533 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3534 (sve_vl_from_vq): Likewise.
3536 2018-06-05 Tom Tromey <tom@tromey.com>
3538 * cli/cli-cmds.c (show_version): Update.
3539 * top.c (print_gdb_version): Add "interactive" parameter.
3541 * main.c (captured_main_1): Update.
3542 * top.h (print_gdb_version): Add "interactive" parameter and a
3545 2018-06-05 David Malcolm <dmalcolm@redhat.com>
3547 * common/enum-flags.h: Add trailing semicolon to example in
3550 2018-06-05 Tom Tromey <tom@tromey.com>
3553 * NEWS: Add entry about pager.
3554 * utils.c (pagination_disabled_for_command): New global.
3555 (prompt_for_continue): Allow "c" response to prompt.
3556 (reinitialize_more_filter): Clear
3557 pagination_disabled_for_command.
3558 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3560 2018-06-04 Tom Tromey <tom@tromey.com>
3562 * ada-lang.h (ada_lookup_symbol_list): Update.
3563 * ada-lang.c (resolve_subexp): Update.
3564 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3566 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3567 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3568 results parameter to std::vector.
3569 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3571 * ada-exp.y (block_lookup): Update.
3572 (select_possible_type_sym): Change type of syms. Remove nsyms
3574 (write_var_or_type, write_name_assoc): Update.
3576 2018-06-04 Joel Brobecker <brobecker@adacore.com>
3578 * windows-nat.c (windows_nat_target::xfer_partial): Return
3579 TARGET_XFER_E_IO if we need to delegate to the target beneath
3580 but BENEATH is NULL.
3582 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3584 * Makefile.in (config.status): Add configure.nat as a
3587 2018-06-04 Tom Tromey <tom@tromey.com>
3589 * cp-name-parser.y (cpname_state): Add method declarations.
3590 (HANDLE_QUAL): Update.
3591 (cpname_state::d_grab, cpname_state::fill_comp)
3592 (cpname_state::make_operator, cpname_state::make_dtor)
3593 (cpname_state::make_builtin_type, cpname_state::make_name)
3594 (cpname_state::d_qualify, cpname_state::d_int_type)
3595 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3596 (%union): Move earlier.
3598 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3600 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3602 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3604 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3605 (aarch64_pseudo_write_1): Likewise.
3606 (aarch64_pseudo_read_value): Use helper.
3607 (aarch64_pseudo_write): Likewise.
3609 2018-06-04 Pedro Alves <palves@redhat.com>
3611 * darwin-nat.c (darwin_ops): Delete.
3612 (darwin_attach_pid): Use get_native_target.
3614 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3616 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3617 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3619 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3621 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3622 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3623 (aarch64_gdbarch_init): Check for SVE.
3624 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3626 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3628 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3629 * aarch64-tdep.h (aarch64_read_description): Likewise.
3630 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3631 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3632 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3633 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3634 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3636 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3638 * value.c (value_fetch_lazy_bitfield): New.
3639 (value_fetch_lazy_memory): New.
3640 (value_fetch_lazy_register): New.
3641 (value_fetch_lazy): Factor out to smaller functions.
3643 2018-06-01 Tom Tromey <tom@tromey.com>
3645 * cp-name-parser.y (backslashable, represented): Now const.
3647 2018-06-01 Tom Tromey <tom@tromey.com>
3649 * cp-name-parser.y: Include parser-defs.h.
3650 (parser_fprintf): Remove declaration.
3652 2018-06-01 Tom Tromey <tom@tromey.com>
3654 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3656 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3657 (global_result): Remove globals.
3658 (struct cpname_state): New.
3659 (yyparse): Don't declare.
3660 (yylex, yyerror): Move declarations after %union.
3661 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3662 (make_name): Add state parameter.
3664 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3666 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3668 (yylex): Add lvalp, state parameters.
3669 (yyerror): Add state parameter.
3670 (cp_demangled_name_to_comp): Update.
3672 2018-06-01 Tom Tromey <tom@tromey.com>
3674 * cp-name-parser.y (parser_fprintf): Declare.
3675 (GDB_YY_REMAP_PREFIX): Define.
3676 Include yy-remap.h. Don't redefine yy* identifiers.
3678 2018-06-01 Tom Tromey <tom@tromey.com>
3680 * python/py-type.c (typy_legacy_template_argument): Update.
3681 * cp-support.h (cp_demangled_name_to_comp): Update.
3682 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3683 parameter to be a "std::string *".
3686 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3688 * ada-lex.l: Include "diagnostics.h" instead of
3689 "common/diagnostics.h".
3690 * unittests/environ-selftests.c: Likewise.
3691 * common/diagnostics.h: Moved to ../include.
3693 2018-06-01 Joel Brobecker <brobecker@adacore.com>
3695 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3696 to language_mode_manual while calling breakpoint_re_set_one.
3698 2018-06-01 Tom Tromey <tom@tromey.com>
3700 * valops.c (value_cast_structs, destructor_name_p): Update.
3701 * symtab.c (gdb_mangle_name): Update.
3702 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3704 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3705 (pascal_object_print_value_fields, pascal_object_print_value):
3707 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3708 * linespec.c (find_methods): Update.
3709 * gdbtypes.h (type_name_no_tag): Remove.
3710 (type_name_or_error): Rename from type_name_no_tag_or_error.
3711 * gdbtypes.c (type_name_no_tag): Remove.
3712 (type_name_or_error): Rename from type_name_no_tag_or_error.
3713 (lookup_struct_elt_type, check_typedef): Update.
3714 * expprint.c (print_subexp_standard): Update.
3715 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3716 * d-namespace.c (d_lookup_nested_symbol): Update.
3717 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3718 (cp_print_class_member): Update.
3719 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3720 * completer.c (add_struct_fields): Update.
3721 * c-typeprint.c (cp_type_print_derivation_info)
3722 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3724 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3725 (ada_prefer_type, ada_is_exception_sym): Update.
3727 2018-06-01 Tom Tromey <tom@tromey.com>
3729 * valops.c (enum_constant_from_type, value_namespace_elt)
3730 (value_maybe_namespace_elt): Update.
3731 * valarith.c (find_size_for_pointer_math): Update.
3732 * target-descriptions.c (make_gdb_type): Update.
3733 * symmisc.c (print_symbol): Update.
3734 * stabsread.c (define_symbol, read_type)
3735 (complain_about_struct_wipeout, add_undefined_type)
3736 (cleanup_undefined_types_1): Update.
3737 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3738 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3739 (rust_internal_print_type, rust_composite_type)
3740 (rust_evaluate_funcall, rust_evaluate_subexp)
3741 (rust_inclusive_range_type_p): Update.
3742 * python/py-type.c (typy_get_tag): Update.
3743 * p-typeprint.c (pascal_type_print_base): Update.
3744 * mdebugread.c (parse_symbol, parse_type): Update.
3745 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3747 * guile/scm-type.c (gdbscm_type_tag): Update.
3748 * go-lang.c (sixg_string_p): Update.
3749 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3751 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3752 (TYPE_TAG_NAME): Remove.
3753 * gdbtypes.c (type_name_no_tag): Simplify.
3754 (check_typedef, check_types_equal, recursive_dump_type)
3755 (copy_type_recursive, arch_composite_type): Update.
3756 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3757 in summary mode when needed.
3758 * eval.c (evaluate_funcall): Update.
3759 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3760 (process_structure_scope, read_enumeration_type)
3761 (read_namespace_type, read_module_type, determine_prefix): Update.
3762 * cp-support.c (inspect_type): Update.
3763 * coffread.c (process_coff_symbol, decode_base_type): Update.
3764 * c-varobj.c (c_is_path_expr_parent): Update.
3765 * c-typeprint.c (c_type_print_base_struct_union): Update.
3766 (c_type_print_base_1): Update. Print struct/class/union/enum in
3767 summary when using C language.
3768 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3769 (gen_maybe_namespace_elt): Update.
3770 * ada-lang.c (ada_type_name): Simplify.
3771 (empty_record, ada_template_to_fixed_record_type_1)
3772 (template_to_static_fixed_type)
3773 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3775 2018-06-01 Tom Tromey <tom@tromey.com>
3777 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3779 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3780 (c_print_type): Update.
3781 (c_print_type): New overload.
3782 (c_type_print_varspec_prefix, c_type_print_args)
3783 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3784 (c_type_print_base_struct_union, c_type_print_base_1)
3785 (cp_type_print_method_args): Add "language" parameter.
3786 (c_type_print_base): Update.
3787 * c-lang.h (c_print_type): Add new overload.
3789 2018-06-01 Tom Tromey <tom@tromey.com>
3791 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3792 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3794 2018-06-01 Alan Hayward <alan.hayward@arm.com>
3796 * aarch64-tdep.c (aarch64_sve_register_names): New const
3798 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3799 (AARCH64_SVE_Z_REGS_NUM): New define.
3800 (AARCH64_SVE_P_REGS_NUM): Likewise.
3801 (AARCH64_SVE_NUM_REGS): Likewise.
3803 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
3805 * nat/linux-ptrace.h [__alpha__]
3806 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3809 2018-05-31 Maciej W. Rozycki <macro@mips.com>
3811 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3812 the endianness selected.
3813 * NEWS: Document `set endian auto' mode operation update.
3815 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3817 * Makefile.in: Add new header.
3818 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3819 (sve_vl_from_vg): Likewise.
3820 (sve_vq_from_vl): Likewise.
3821 (sve_vl_from_vq): Likewise.
3822 (sve_vq_from_vg): Likewise.
3823 (sve_vg_from_vq): Likewise.
3824 * configure.nat: Add new c file.
3825 * nat/aarch64-sve-linux-ptrace.c: New file.
3826 * nat/aarch64-sve-linux-ptrace.h: New file.
3828 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3830 * aarch64-linux-nat.c (aarch64_linux_read_description):
3832 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3834 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3835 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3836 (aarch64_gdbarch_init): Add parmeter zero.
3837 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3838 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3839 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3841 * doc/gdb.texinfo: Describe SVE feature
3842 * features/aarch64-sve.c: New file.
3844 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
3847 * gdbarch.sh (significant_addr_bit): Default to zero when
3848 not set by target architecture.
3849 * gdbarch.c: Re-generated.
3850 * utils.c (address_significant): Update.
3852 2018-05-30 Joel Brobecker <brobecker@adacore.com>
3854 * stack.c (func_command): Remove trailing newline in call to error.
3856 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3858 * regcache.h (regcache_raw_collect): Remove, update callers to
3859 use regcache::raw_collect.
3860 * regcache.c (regcache_raw_collect): Remove.
3862 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3864 * regcache.h (regcache_raw_supply): Remove, update callers to
3865 use detached_regcache::raw_supply.
3866 * regcache.c (regcache_raw_supply): Remove.
3868 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3870 * regcache.h (regcache_cooked_write_part): Remove, update
3871 callers to use regcache::cooked_write_part.
3872 * regcache.c (regcache_cooked_write_part): Remove.
3874 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3876 * regcache.h (regcache_cooked_read_part): Remove, update callers
3877 to use readable_regcache::cooked_read_part.
3878 * regcache.c (regcache_cooked_read_part): Remove.
3880 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3882 * regcache.h (regcache_cooked_read_value): Remove, update
3883 callers to use readable_regcache::cooked_read_value.
3884 * regcache.c (regcache_cooked_read_value): Remove.
3886 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3888 * regcache.h (regcache_cooked_write): Remove, update callers to
3889 use regcache::cooked_write.
3890 * regcache.c (regcache_cooked_write): Remove.
3892 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3894 * regcache.h (regcache_invalidate): Remove, update callers to
3895 use detached_regcache::invalidate instead.
3896 * regcache.c (regcache_invalidate): Remove.
3898 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3900 * regcache.h (regcache_raw_write_part): Remove, update callers
3901 to use regcache::raw_write_part instead.
3902 * regcache.c (regcache_raw_write_part): Remove.
3904 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3906 * regcache.h (regcache_raw_read_part): Remove, update callers to
3907 use readable_regcache::raw_read_part instead.
3908 * regcache.c (regcache_raw_read_part): Remove.
3910 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3912 * regcache.h (regcache_cooked_read): Remove, update callers to
3913 use readable_regcache::cooked_read instead.
3914 * regcache.c (regcache_cooked_read): Remove.
3916 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3918 * regcache.h (regcache_raw_write): Remove, update callers to use
3919 regcache::raw_write instead.
3920 * regcache.c (regcache_raw_write): Remove.
3922 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3924 * regcache.h (regcache_raw_read): Remove, update callers to use
3925 readable_regcache::raw_read instead.
3926 * regcache.c (regcache_raw_read): Remove.
3928 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3930 * regcache.h (regcache_raw_update): Remove, update callers to
3931 use readable_regcache::raw_update instead.
3932 * regcache.c (regcache_raw_update): Remove.
3934 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3936 * regcache.h (regcache_register_status): Remove, update callers
3937 to use reg_buffer::get_register_status directly instead.
3938 * regcache.c (regcache_register_status): Remove.
3940 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3942 * regcache.h (regcache_get_ptid): Remove, update all callers to
3943 call regcache::ptid instead.
3944 * regcache.c (regcache_get_ptid): Remove.
3946 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3948 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3950 2018-05-30 Pedro Alves <palves@redhat.com>
3952 * common/common-exceptions.h (exception_rethrow): Use
3955 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
3957 * breakpoint.c (print_solib_event, check_status_catch_solib):
3958 Remove struct keyword in range-based for loops.
3959 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3960 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3962 * linespec.c (find_superclass_methods, search_minsyms_for_name):
3964 * symfile.c (addr_info_make_relative): Likewise.
3965 * thread.c (value_in_thread_stack_temporaries): Likewise.
3967 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
3970 * valops.c (value_struct_elt_for_reference): Call check_typedef on
3971 aggregate type to get its real type before accessing it.
3973 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
3975 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3976 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3977 * coff-pe-read.c (add_pe_forwarded_sym): Replace
3978 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3979 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3980 * jit.c (jit_breakpoint_re_set_internal): Likewise.
3981 * printcmd.c (info_address_command): Likewise.
3983 2018-05-29 Tom Tromey <tom@tromey.com>
3985 * windows-nat.c (handle_exception): Update fall-through comment.
3987 2018-05-29 Tom Tromey <tom@tromey.com>
3989 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
3990 (struct program_space) <added_solibs>: Now a std::vector.
3991 * breakpoint.c (print_solib_event): Update.
3992 (check_status_catch_solib): Update.
3993 * progspace.c (clear_program_space_solib_cache): Update.
3994 * solib.c (update_solib_list): Update.
3996 2018-05-29 Tom Tromey <tom@tromey.com>
3998 * python/py-type.c (typy_richcompare): Update.
3999 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4000 * gdbtypes.h (types_deeply_equal): Return bool.
4001 (types_equal): Likewise.
4002 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
4004 (check_types_equal): Change worklist to std::vector. Return
4006 (struct type_equality_entry): Add constructor.
4007 (compare_maybe_null_strings): Return bool.
4008 (check_types_worklist): Return bool. Change worklist to
4010 (types_deeply_equal): Use std::vector.
4011 (types_equal): Return bool.
4012 (compare_maybe_null_strings): Simplify.
4014 2018-05-29 Tom Tromey <tom@tromey.com>
4016 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
4018 2018-05-29 Tom Tromey <tom@tromey.com>
4020 * objc-lang.h: Don't include cp-support.h.
4021 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
4024 2018-05-27 Tom Tromey <tom@tromey.com>
4026 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4028 2018-05-25 Tom Tromey <tom@tromey.com>
4030 * value.c (value::location): Initialize.
4032 2018-05-25 Tom Tromey <tom@tromey.com>
4034 * dbxread.c (init_bincl_list): Remove.
4035 (bincl_list): Now a std::vector.
4036 (bincls_allocated, next_bincl): Remove.
4037 (free_bincl_list, do_free_bincl_list_cleanup)
4038 (make_cleanup_free_bincl_list): Remove.
4039 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4041 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4042 (struct header_file_location): Add constructor.
4043 (add_bincl_to_list): Remove.
4045 2018-05-25 Tom Tromey <tom@tromey.com>
4047 * tui/tui.c (tui_enable): Update.
4048 * mi/mi-interp.c (mi_interp::init): Update.
4049 * interps.h (class interp) <name>: New method.
4050 <m_name>: Rename from name.
4051 (~scoped_restore_interp): Update.
4052 * interps.c (interp::interp): Update.
4053 (interp_add, interp_set, interp_lookup_existing)
4054 (current_interp_named_p): Update.
4056 2018-05-25 Tom Tromey <tom@tromey.com>
4058 * interps.c (interp_name): Remove.
4059 * mi/mi-interp.c (mi_interp::init): Update.
4060 * interps.h (interp_name): Remove.
4061 (~scoped_restore_interp): Update.
4062 * tui/tui.c (tui_enable): Update.
4064 2018-05-25 Tom Tromey <tom@tromey.com>
4066 * utils.c (fputs_maybe_filtered): Update.
4067 * linespec.c (decode_line_full): Update.
4068 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4069 (mi_print_breakpoint_for_event, mi_solib_loaded)
4070 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4071 (mi_user_selected_context_changed): Update.
4072 * mi/mi-main.c (mi_execute_command): Update.
4073 * cli/cli-script.c (execute_control_command): Update.
4074 * python/python.c (execute_gdb_command): Update.
4075 * solib.c (info_sharedlibrary_command): Update.
4076 * interps.c (interp_ui_out): Remove.
4077 * interps.h (interp_ui_out): Remove.
4079 2018-05-25 Tom Tromey <tom@tromey.com>
4081 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4082 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4083 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4085 2018-05-25 Tom Tromey <tom@tromey.com>
4087 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4088 * interps.c (interp_exec): Use scoped_restore.
4090 2018-05-25 Tom Tromey <tom@tromey.com>
4092 * remote.c (remote_target::remote_file_get): Use
4094 (remote_target::remote_file_put): Likewise.
4096 2018-05-25 Tom Tromey <tom@tromey.com>
4098 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4100 (get_pe_section_index, add_pe_exported_sym): Update.
4101 (read_pe_exported_syms): Use gdb::def_vector.
4103 2018-05-25 Tom Tromey <tom@tromey.com>
4105 * frame.c (remove_prev_frame): Remove.
4106 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4108 2018-05-25 Maciej W. Rozycki <macro@mips.com>
4110 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4112 * mips-linux-nat.c (supply_fpregset): Always call
4113 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4114 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4115 `mips_fill_fpregset'.
4116 * mips-linux-tdep.c (mips_supply_fpregset)
4117 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4118 (mips_fill_fpregset_wrapper): Remove functions.
4119 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4120 (mips_linux_fpregset): Remove variable.
4121 (mips_linux_iterate_over_regset_sections): Use
4122 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4123 (mips_linux_o32_sigframe_init): Remove comment.
4125 2018-05-25 Pedro Alves <palves@redhat.com>
4127 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4128 (struct readahead_cache, struct packet_reg, struct
4129 remote_arch_state, class remote_state): Move higher up in the
4131 (remote_target::m_remote_state): Now an object instead of a pointer.
4132 (remote_target::get_remote_state): Adjust.
4134 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4136 * stack.c (select_and_print_frame): Delete.
4137 (struct function_bounds): Move struct within function.
4138 (func_command): Most content moved into new function
4139 find_frame_for_function, use new function, print result, add
4141 (find_frame_for_function): New function, now returns a result.
4143 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4145 * stack.c (iterate_over_block_arg_vars): Fix comment.
4146 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4148 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4152 (scoped_restore_selected_frame::scoped_restore_selected_frame):
4154 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4156 * frame.h (class scoped_restore_selected_frame): New class.
4157 * stack.c (print_frame_local_vars): Remove catching and rethrowing
4158 of any exception, use scoped_restore_selected_frame to restore the
4161 2018-05-24 Pedro Alves <palves@redhat.com>
4163 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4166 2018-05-23 Tom Tromey <tom@tromey.com>
4168 * complaints.c (struct complaints): Remove.
4169 (symfile_complaint_book): Remove.
4170 (series): New global.
4171 (complaint_internal): Update.
4172 (clear_complaints): Update.
4174 2018-05-23 Tom Tromey <tom@tromey.com>
4176 * complaints.c (counters): New global.
4177 (struct complain): Remove.
4178 (struct complaints) <root>: Remove.
4179 (complaint_sentinel): Remove.
4180 (symfile_complaint_book): Update.
4181 (find_complaint) Remove.
4182 (complaint_internal, clear_complaints): Update.
4184 2018-05-23 Tom Tromey <tom@tromey.com>
4186 * complaints.c (struct complain) <file, line>: Remove.
4187 (find_complaint): Remove file, line parameters.
4188 (complaint_internal): Update.
4190 2018-05-23 Tom Tromey <tom@tromey.com>
4192 * complaints.c (vcomplaint): Remove.
4193 (complaint_internal) Merge in contents of vcomplaint.
4195 2018-05-23 Tom Tromey <tom@tromey.com>
4197 * complaints.c (struct complaints) <explanation>: Remove.
4198 (symfile_explanations): Remove.
4199 (symfile_complaint_book): Update.
4200 (vcomplaint): Update.
4201 (struct explanation): Remove.
4203 2018-05-23 Tom Tromey <tom@tromey.com>
4205 * complaints.c (symfile_complaints): Remove.
4206 (complaint_internal): Remove "complaints" parameter.
4207 (clear_complaints, vcomplaint): Remove "c" parameter.
4208 (get_complaints): Remove.
4209 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4210 (dwarf2_debug_line_missing_file_complaint)
4211 (dwarf2_debug_line_missing_end_sequence_complaint)
4212 (dwarf2_complex_location_expr_complaint)
4213 (dwarf2_const_value_length_mismatch_complaint)
4214 (dwarf2_section_buffer_overflow_complaint)
4215 (dwarf2_macro_malformed_definition_complaint)
4216 (dwarf2_invalid_attrib_class_complaint)
4217 (create_addrmap_from_index, dw2_symtab_iter_next)
4218 (dw2_expand_marked_cus)
4219 (dw2_debug_names_iterator::find_vec_in_debug_names)
4220 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4221 (create_debug_type_hash_table, init_cutu_and_read_dies)
4222 (partial_die_parent_scope, add_partial_enumeration)
4223 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4224 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4225 (read_import_statement, read_file_scope, create_dwo_cu_reader)
4226 (create_cus_hash_table, create_dwp_hash_table)
4227 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4228 (dwarf2_rnglists_process, dwarf2_ranges_process)
4229 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4230 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4231 (handle_struct_member_die, process_structure_scope)
4232 (read_array_type, read_common_block, read_module_type)
4233 (read_tag_pointer_type, read_typedef, read_base_type)
4234 (read_subrange_type, load_partial_dies, partial_die_info::read)
4235 (partial_die_info::read, partial_die_info::read)
4236 (partial_die_info::read, read_checked_initial_length_and_offset)
4237 (dwarf2_string_attr, read_formatted_entries)
4238 (dwarf_decode_line_header)
4239 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4240 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
4241 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4242 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4243 (get_signatured_type, get_DW_AT_signature_type)
4244 (decode_locdesc, file_file_name, consume_improper_spaces)
4245 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4246 (dwarf_decode_macro_bytes, dwarf_decode_macros)
4247 (dwarf2_symbol_mark_computed, set_die_type)
4248 (read_attribute_value): Update.
4249 * stap-probe.c (handle_stap_probe, get_stap_base_address):
4251 * dbxread.c (unknown_symtype_complaint)
4252 (lbrac_mismatch_complaint, repeated_header_complaint)
4253 (set_namestring, function_outside_compilation_unit_complaint)
4254 (read_dbx_symtab, process_one_symbol): Update.
4255 * gdbtypes.c (stub_noname_complaint): Update.
4256 * windows-nat.c (handle_unload_dll): Update.
4257 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
4258 (decode_base_type): Update.
4259 * xcoffread.c (bf_notfound_complaint, ef_complaint)
4260 (eb_complaint, record_include_begin, record_include_end)
4261 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4262 (process_xcoff_symbol, read_symbol)
4263 (function_outside_compilation_unit_complaint)
4264 (scan_xcoff_symtab): Update.
4265 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4266 * buildsym.c (finish_block_internal, make_blockvector)
4267 (end_symtab_get_static_block, augment_type_symtab): Update.
4268 * dtrace-probe.c (dtrace_process_dof)
4269 (dtrace_static_probe_ops::get_probes): Update.
4270 * complaints.h (struct complaint): Don't declare.
4271 (symfile_complaints): Remove.
4272 (complaint_internal): Remove "complaints" parameter.
4273 (complaint): Likewise.
4274 (clear_complaints): Likewise.
4275 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4276 (reread_symbols): Update.
4277 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
4278 (dwarf2_frame_cache, decode_frame_entry): Update.
4279 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
4280 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4281 (info_selectors_command): Update.
4282 * macrotab.c (macro_include, check_for_redefinition)
4283 (macro_undef): Update.
4284 * objfiles.c (filter_overlapping_sections): Update.
4285 * stabsread.c (invalid_cpp_abbrev_complaint)
4286 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4287 (define_symbol, error_type, read_type, rs6000_builtin_type)
4288 (stabs_method_name_from_physname, read_member_functions)
4289 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4290 (attach_fields_to_type, complain_about_struct_wipeout)
4291 (read_range_type, read_args, common_block_start)
4292 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4294 * mdebugread.c (index_complaint, unknown_ext_complaint)
4295 (basic_type_complaint, bad_tag_guess_complaint)
4296 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4297 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4298 (parse_procedure, parse_lines)
4299 (function_outside_compilation_unit_complaint)
4300 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4301 (bad_tag_guess_complaint, reg_value_complaint): Update.
4302 * cp-support.c (demangled_name_complaint): Update.
4303 * macroscope.c (sal_macro_scope): Update.
4304 * dwarf-index-write.c (class debug_names): Update.
4306 2018-05-23 Tom Tromey <tom@tromey.com>
4308 * complaints.c (clear_complaints): Remove "noisy" parameter.
4309 * complaints.h (clear_complaints): Update.
4310 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4311 (reread_symbols): Update.
4313 2018-05-23 Tom Tromey <tom@tromey.com>
4315 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4317 (vcomplaint, clear_complaints): Update.
4318 (symfile_explanations): Remove some messages.
4320 2018-05-23 Tom Tromey <tom@tromey.com>
4322 * complaints.c (internal_complaint): Remove.
4323 * complaints.h (internal_complaint): Remove.
4325 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4327 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4329 2018-05-22 Pedro Alves <palves@redhat.com>
4331 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4332 (remote_fileio_badfd, remote_fileio_return_errno)
4333 (remote_fileio_return_success, remote_fileio_func_open)
4334 (remote_fileio_func_open, remote_fileio_func_close)
4335 (remote_fileio_func_read, remote_fileio_func_write)
4336 (remote_fileio_func_lseek, remote_fileio_func_rename)
4337 (remote_fileio_func_unlink, remote_fileio_func_stat)
4338 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4339 (remote_fileio_func_isatty, remote_fileio_func_system): Add
4340 remote_target parameter.
4341 (remote_fio_func_map) <func>: Add remote_target parameter.
4342 (do_remote_fileio_request, remote_fileio_request):
4343 * remote-fileio.h (remote_fileio_request):
4344 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4345 remote_target parameter.
4346 (remote_notif_process, handle_notification): Adjust to pass down
4348 (remote_notif_state_allocate): Add remote_target parameter. Save
4350 * remote-notif.h (struct remote_target): Forward declare.
4351 (struct notif_client) <parse, ack, can_get_pending_events>: Add
4352 remote_target parameter.
4353 (struct remote_notif_state) <remote>: New field.
4354 (remote_notif_ack, remote_notif_parse): Add remote_target
4356 (remote_notif_state_allocate, remote_notif_state_allocate): Add
4357 remote_target parameter.
4358 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4359 (threads_listing_context, rmt_thread_action, protocol_feature)
4360 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4361 (packet_result, struct threads_listing_context, remote_state):
4362 Move definitions and declarations higher up.
4363 (remote_target) <~remote_target>: Declare.
4364 (remote_download_command_source, remote_file_put, remote_file_get)
4365 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4366 (remote_hostio_pread_vFile, remote_hostio_send_command)
4367 (remote_hostio_set_filesystem, remote_hostio_open)
4368 (remote_hostio_close, remote_hostio_unlink, remote_state)
4369 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4370 (get_memory_write_packet_size, get_memory_read_packet_size)
4371 (append_pending_thread_resumptions, remote_detach_1)
4372 (append_resumption, remote_resume_with_vcont)
4373 (add_current_inferior_and_thread, wait_ns, wait_as)
4374 (process_stop_reply, remote_notice_new_inferior)
4375 (process_initial_stop_replies, remote_add_thread)
4376 (btrace_sync_conf, remote_btrace_maybe_reopen)
4377 (remove_new_fork_children, kill_new_fork_children)
4378 (discard_pending_stop_replies, stop_reply_queue_length)
4379 (check_pending_events_prevent_wildcard_vcont)
4380 (discard_pending_stop_replies_in_queue, stop_reply)
4381 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4382 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4383 (remote_interrupt_as, remote_interrupt_ns)
4384 (remote_get_noisy_reply, remote_query_attached)
4385 (remote_add_inferior, remote_current_thread, get_current_thread)
4386 (set_thread, set_general_thread, set_continue_thread)
4387 (set_general_process, write_ptid)
4388 (remote_unpack_thread_info_response, remote_get_threadinfo)
4389 (parse_threadlist_response, remote_get_threadlist)
4390 (remote_threadlist_iterator, remote_get_threads_with_ql)
4391 (remote_get_threads_with_qxfer)
4392 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4393 (get_offsets, remote_check_symbols, remote_supported_packet)
4394 (remote_query_supported, remote_packet_size)
4395 (remote_serial_quit_handler, remote_detach_pid)
4396 (remote_vcont_probe, remote_resume_with_hc)
4397 (send_interrupt_sequence, interrupt_query)
4398 (remote_notif_get_pending_events, fetch_register_using_p)
4399 (send_g_packet, process_g_packet, fetch_registers_using_g)
4400 (store_register_using_P, store_registers_using_G)
4401 (set_remote_traceframe, check_binary_download)
4402 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4403 (remote_xfer_live_readonly_partial, remote_read_bytes)
4404 (remote_send_printf, remote_flash_write, readchar)
4405 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4406 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4407 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4408 (extended_remote_disable_randomization, extended_remote_run)
4409 (send_environment_packet, extended_remote_environment_support)
4410 (extended_remote_set_inferior_cwd, remote_write_qxfer)
4411 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4412 (packet_command): Now methods of ...
4413 (remote_target): ... this class.
4414 (m_remote_state) <remote_target>: New field.
4415 (struct remote_state) <stop_reply_queue,
4416 remote_async_inferior_event_token, wait_forever_enabled_p>: New
4418 (remote_state::remote_state): Allocate stop_reply_queue.
4419 (remote_state): Delete global.
4420 (get_remote_state_raw): Delete.
4421 (remote_target::get_remote_state): Allocate m_remote_state on
4423 (get_current_remote_target): New.
4424 (remote_ops, extended_remote_ops): Delete.
4425 (wait_forever_enabled_p, remote_async_inferior_event_token):
4426 Delete, moved to struct remote_state.
4427 (remote_target::close): Delete self. Destruction bits split to
4429 (remote_target::~remote_target): ... this.
4430 (show_memory_packet_size): Adjust to use
4431 get_current_remote_target.
4432 (struct protocol_feature) <func>: Add remote_target parameter.
4433 All callers adjusted.
4434 (curr_quit_handler_target): New.
4435 (remote_serial_quit_handler): Reimplement.
4436 (remote_target::open_1): Adjust to use get_current_remote_target.
4437 Heap-allocate remote_target/extended_remote_target instances.
4438 (vcont_builder::vcont_builder): Add remote_target parameter, and
4439 save it in m_remote. All callers adjusted.
4440 (vcont_builder::m_remote): New field.
4441 (vcont_builder::restart, vcont_builder::flush)
4442 (vcont_builder::push_action): Use it.
4443 (remote_target::commit_resume): Use it.
4444 (struct queue_iter_param) <remote>: New field.
4445 (remote_target::remove_new_fork_children): Fill in 'remote' field.
4446 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4447 (check_pending_event_prevents_wildcard_vcont_callback)
4448 (remote_target::check_pending_events_prevent_wildcard_vcont)
4449 (remote_target::discard_pending_stop_replies)
4450 (remote_target::discard_pending_stop_replies_in_queue)
4451 (remote_target::remote_notif_remove_queued_reply): Fill in
4453 (remote_notif_get_pending_events): New.
4454 (remote_target::readchar, remote_target::remote_serial_write):
4455 Save/restore curr_quit_handler_target.
4457 (kill_new_fork_children): Fill in 'remote' field.
4458 (packet_command): Use get_current_remote_target, defer to
4459 remote_target method of same name.
4460 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4461 parameter, and save it in m_remote. All callers adjusted.
4462 (scoped_remote_fd::release): Use m_remote.
4463 (scoped_remote_fd::m_remote): New field.
4464 (remote_file_put, remote_file_get, remote_file_delete): Use
4465 get_current_remote_target, defer to remote_target method of same
4467 (remote_btrace_reset): Add remote_state paremeter. Update all
4469 (remote_async_inferior_event_handler). Pass down 'data'.
4470 (remote_new_objfile): Use get_current_remote_target.
4471 (remote_target::vcont_r_supported): New.
4472 (set_range_stepping): Use get_current_remote_target and
4473 remote_target::vcont_r_supported.
4474 (_initialize_remote): Don't allocate 'remote_state' and
4475 'stop_reply_queue' globals.
4476 * remote.h (struct remote_target): Forward declare.
4477 (getpkt, putpkt, remote_notif_get_pending_events): Add
4478 'remote_target' parameter.
4480 2018-05-22 Pedro Alves <palves@redhat.com>
4482 * remote.c (vcont_builder): Now a class. Make all data members
4484 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4486 (vcont_builder_restart): Rename to ...
4487 (vcont_builder::restart): ... this.
4488 (vcont_builder_flush): Rename to ...
4489 (vcont_builder::flush): ... this.
4490 (vcont_builder_push_action): Rename to ...
4491 (vcont_builder::push_action): ... this.
4492 (remote_target::commit_resume): Adjust.
4494 2018-05-22 Pedro Alves <palves@redhat.com>
4496 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4497 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4498 (get_fixed_memory_packet_size): New.
4499 (get_memory_packet_size): Use it.
4500 (set_memory_packet_size): Don't override the config size with
4501 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4502 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4503 Don't refer to get_memory_packet_size if not connected to a remote
4504 target. Show "(default)" if configured size is 0.
4506 2018-05-22 Pedro Alves <palves@redhat.com>
4508 * remote.c (remote_target::mourn_inferior): Move
4509 discard_pending_stop_replies call here from ...
4510 (_initialize_remote): ... here.
4512 2018-05-22 Pedro Alves <palves@redhat.com>
4514 * remote.c (compare_section_command): Remove set_general_process
4517 2018-05-22 Pedro Alves <palves@redhat.com>
4519 * remote.c (struct packet_reg, struct remote_arch_state):
4520 Move higher up in the file.
4521 (remote_state) <m_arch_states>: Store remote_arch_state values
4522 instead of remote_arch_state pointers.
4523 (remote_state::get_remote_arch_state): Adjust.
4525 2018-05-22 Pedro Alves <palves@redhat.com>
4527 * remote.c: Include <unordered_map>.
4528 (remote_state): Now a class.
4529 (remote_state) <get_remote_arch_state>: Declare method.
4530 <get_remote_arch_state>: New field.
4531 (remote_arch_state) <remote_arch_state>: Declare ctor.
4532 <regs>: Now a unique_ptr.
4533 (remote_gdbarch_data_handle): Delete.
4534 (get_remote_arch_state): Delete.
4535 (remote_state::get_remote_arch_state): New.
4536 (get_remote_state): Adjust to call remote_state's
4537 get_remote_arch_state method.
4538 (init_remote_state): Delete, bits factored out to ...
4539 (remote_arch_state::remote_arch_state): ... this new method.
4540 (get_remote_packet_size, get_memory_packet_size)
4541 (process_g_packet, remote_target::fetch_registers)
4542 (remote_target::prepare_to_store, store_registers_using_G)
4543 (remote_target::store_registers, remote_target::get_trace_status):
4544 Adjust to call remote_state's method.
4545 (_initialize_remote): Remove reference to
4546 remote_gdbarch_data_handle.
4548 2018-05-22 Pedro Alves <palves@redhat.com>
4550 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4551 pread>: New method declarations.
4552 (remote_target::open_1): Adjust.
4553 (readahead_cache_invalidate): Rename to ...
4554 (readahead_cache::invalidate): ... this, and adjust to be a class
4556 (readahead_cache_invalidate_fd): Rename to ...
4557 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4559 (remote_hostio_pwrite): Adjust.
4560 (remote_hostio_pread_from_cache): Rename to ...
4561 (readahead_cache::pread): ... this, and adjust to be a class
4563 (remote_hostio_close): Adjust.
4565 2018-05-22 Pedro Alves <palves@redhat.com>
4567 * remote.c (remote_hostio_close_cleanup): Delete.
4568 (class scoped_remote_fd): New.
4569 (remote_file_put, remote_file_get): Use it.
4571 2018-05-22 Pedro Alves <palves@redhat.com>
4573 (struct vCont_action_support): Use bool and initialize all fields.
4574 (struct readahead_cache): Initialize all fields.
4575 (remote_state): Use bool and initialize all fields.
4576 (remote_state::remote_state, remote_state::~remote_state): New.
4577 (new_remote_state): Delete.
4578 (_initialize_remote): Use new to allocate remote_state.
4580 2018-05-22 Pedro Alves <palves@redhat.com>
4584 * c-exp.y: Include "c-support.h".
4585 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4586 of tolower. Use c_ident_is_alpha to scan names.
4587 * c-lang.c: Include "c-support.h".
4588 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4589 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4590 * c-support.h: New file, with bits factored out from ...
4591 * cp-name-parser.y: ... this file.
4592 Include "c-support.h".
4593 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4594 c-support.h and renamed.
4595 (symbol_end, yylex): Adjust.
4597 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4599 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4600 parameter type to CORE_ADDR.
4601 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4602 parameter type in declaration to CORE_ADDR.
4603 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4604 target_auxv_search to get AT_HWCAP and use the result to get the
4606 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4607 to CORE_ADDR. Remove the cast of the return value to unsigned
4608 long. Fix error predicate of target_auxv_search.
4609 (ppc_linux_nat_target::read_description): Change the type of the
4610 hwcap variable to CORE_ADDR.
4612 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4614 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4615 if the size of fpscr is larger than 32 bits.
4617 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4619 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4620 (ppc32_linux_vsxregmap): New global.
4621 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4622 regcache_supply_regset, and regcache_collect_regset.
4623 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4624 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4625 (fetch_vsx_register, store_vsx_register): Remove.
4626 (fetch_vsx_registers): Add regno parameter. Get regset using
4627 ppc_linux_vsxregset. Use regset to supply registers.
4628 (store_vsx_registers): Add regno parameter. Get regset using
4629 ppc_linux_vsxregset. Use regset to collect registers.
4630 (fetch_register): Call fetch_vsx_registers instead of
4632 (store_register): Call store_vsx_registers instead of
4634 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4635 new regno parameter.
4636 (store_ppc_registers): Call store_vsx_registers with -1 for the
4637 new regno parameter.
4638 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4639 (ppc_collect_vsxregset): Remove.
4641 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4643 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4645 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4646 for vector register offset fields.
4647 (ppc64_fbsd_reg_offsets): Likewise.
4648 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4649 to vector register offset fields.
4650 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4651 to vector register offset fields.
4652 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4653 vector register offset fields.
4654 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4655 initializers for vector register offset fields.
4656 (rs6000_aix64_reg_offsets): Likewise.
4657 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4658 (ppc_supply_vrregset): Remove.
4659 (ppc_collect_vrregset): Remove.
4660 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4661 (ppc_linux_vrregset) : New function.
4662 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4663 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4664 (ppc32_linux_vrregset): Remove.
4665 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4666 and use result instead of ppc32_linux_vrregset.
4667 (ppc32_linux_reg_offsets): Remove initializers for vector register
4669 (ppc64_linux_reg_offsets): Likewise.
4670 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4671 * ppc-linux-nat.c: Include regset.h.
4672 (gdb_vrregset_t): Adjust comment to account for little-endian
4674 (supply_vrregset, fill_vrregset): Remove.
4675 (fetch_altivec_register, store_altivec_register): Remove.
4676 (fetch_altivec_registers): Add regno parameter. Get regset using
4677 ppc_linux_vrregset. Use regset to supply registers.
4678 (store_altivec_registers): Add regno parameter. Get regset using
4679 ppc_linux_vrregset. Use regset to collect registers.
4680 (fetch_register): Call fetch_altivec_registers instead of
4681 fetch_altivec_register.
4682 (store_register): Call store_altivec_registers instead of
4683 store_altivec_register.
4684 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4685 the new regno parameter.
4686 (store_ppc_registers): Call store_altivec_registers with -1 for
4687 the new regno parameter.
4689 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4691 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4692 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4693 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4694 (gdb_vrregset_t): Change array type size to
4695 PPC_LINUX_SIZEOF_VRREGSET.
4696 (gdb_vsxregset_t): Change array type size to
4697 PPC_LINUX_SIZEOF_VSXREGSET.
4698 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4699 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4700 PPC_LINUX_SIZEOF_VSXREGSET.
4702 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4704 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4705 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4707 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4708 ppc_linux_target_wordsize with tid.
4709 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4711 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4712 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4713 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4714 tid parameter. Remove static specifier.
4715 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4716 (ppc_linux_target_wordsize): New declaration.
4718 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4720 * arch/ppc-linux-common.c: New file.
4721 * arch/ppc-linux-common.h: New file.
4722 * arch/ppc-linux-tdesc.h: New file.
4723 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4724 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4725 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4726 arch/ppc-linux-tdesc.h.
4727 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4728 arch/ppc-linux-tdesc.h.
4729 (ppc_linux_nat_target::read_description): Remove target
4730 description matching code. Fill a ppc_linux_features struct and
4731 call ppc_linux_match_description with it. Move comment about ISA
4732 2.05 to ppc-linux-common.c.
4733 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4734 arch/ppc-linux-tdesc.h.
4735 (ppc_linux_core_read_description): Remove target description
4736 matching code. Fill a ppc_linux_features struct and call
4737 ppc_linux_match_description with it.
4738 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4739 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4740 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4741 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4742 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4743 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4744 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4745 (tdesc_powerpc_e500l): Remove.
4747 2018-05-22 Joel Brobecker <brobecker@adacore.com>
4749 * ada-lang.c (catch_assert_command): Pass empty string instead
4750 of NULL for excep_string argument.
4752 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4754 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4755 the width of the requested register exceeds the width of the
4758 2018-05-21 Tom Tromey <tom@tromey.com>
4760 * printcmd.c (output_command): Remove.
4761 (output_command_const): Rename to output_command.
4762 * valprint.h (output_command): Rename from output_command_const.
4763 * tracepoint.c (trace_dump_actions): Call output_command.
4765 2018-05-21 Tom Tromey <tom@tromey.com>
4767 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4768 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4769 * ada-lang.h (create_ada_exception_catchpoint): Update.
4770 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4772 (create_excep_cond_exprs, ~ada_catchpoint)
4773 (should_stop_exception, print_one_exception)
4774 (print_mention_exception, print_recreate_exception): Update.
4775 (ada_get_next_arg): Remove.
4776 (catch_ada_exception_command_split): Use std::string. Change type
4777 of "excep_string", "cond_string".
4778 (catch_ada_exception_command): Update.
4779 (create_ada_exception_catchpoint): Change type of excep_string.
4780 (ada_exception_sal): Remove excep_string parameter.
4781 (~ada_catchpoint): Remove.
4783 2018-05-21 Tom Tromey <tom@tromey.com>
4785 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4788 2018-05-21 Tom Tromey <tom@tromey.com>
4790 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4791 Return unique_xmalloc_ptr.
4792 (print_it_exception): Update.
4794 2018-05-21 Tom Tromey <tom@tromey.com>
4796 * tracepoint.c (trace_dump_actions): Use std::string.
4798 2018-05-21 Tom Tromey <tom@tromey.com>
4800 * symfile.c (reread_symbols): Use std::string for original_name.
4802 2018-05-21 Tom Tromey <tom@tromey.com>
4804 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4805 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4808 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4810 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4812 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4813 * objfiles.c (get_objfile_bfd_data): Allocate
4814 objfile_per_bfd_storage with obstack_new when allocating on
4817 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4819 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4821 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4822 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4823 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4824 (add_pending): Likewise.
4825 (parse_symbol): Likewise.
4826 (parse_partial_symbols): Likewise.
4827 (psymtab_to_symtab_1): Likewise.
4828 (new_psymtab): Likewise.
4829 (elfmdebug_build_psymtabs): Likewise.
4830 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4831 * objfiles.c (get_objfile_bfd_data): Likewise.
4832 (objfile_register_static_link): Likewise.
4833 * psymtab.c (allocate_psymtab): Likewise.
4834 * stabsread.c (read_member_functions): Likewise.
4835 * xcoffread.c (xcoff_end_psymtab): Likewise.
4837 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4839 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4840 compiler supports std::is_trivially_constructible.
4841 * common/poison.h: Include obstack.h.
4842 (IsMallocable): Define to is_trivially_constructible if the
4843 compiler supports it, define to true_type otherwise.
4847 (XOBNEWVEC): Redefine.
4848 * gdb_obstack.h (obstack_zalloc): New.
4849 (OBSTACK_ZALLOC): Redefine.
4850 (obstack_calloc): New.
4851 (OBSTACK_CALLOC): Redefine.
4853 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4854 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4856 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4857 obstack_calloc/obstack_zalloc.
4858 (gdbarch_obstack_zalloc): Remove.
4859 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4861 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4863 * stack.c (backtrace_command_1): Remove useless variable int i.
4865 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4867 * stack.c (print_frame_info): Fix comment.
4869 2018-05-18 Tom Tromey <tom@tromey.com>
4871 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4872 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4873 (~dwarf2_per_objfile): Update
4874 (dwarf2_get_dwz_file): Use new.
4875 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4878 2018-05-18 Tom Tromey <tom@tromey.com>
4880 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4882 * dwarf2read.c (struct dwp_file): Add constructor and
4884 (open_and_init_dwp_file): Return a unique_ptr.
4885 (dwarf2_per_objfile, create_dwp_hash_table)
4886 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4887 (lookup_dwo_unit_in_dwp): Update.
4888 (open_and_init_dwp_file, get_dwp_file): Update.
4890 2018-05-18 Tom Tromey <tom@tromey.com>
4892 * dwarf2read.c (dwarf2_per_objfile): Update.
4893 (struct mapped_index): Add initializers.
4894 (dwarf2_read_index): Use new.
4895 (dw2_symtab_iter_init): Update.
4896 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4899 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4901 * dwarf2read.c (mapped_index) <total_size>: Remove.
4903 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4905 * unittests/format_pieces-selftests.c (test_format_specifier):
4908 2018-05-18 Tom Tromey <tom@tromey.com>
4910 * c-typeprint.c (maybe_print_hole): New function.
4911 (c_print_type_struct_field_offset): Update.
4912 (c_type_print_base_struct_union): Call maybe_print_hole.
4914 2018-05-17 Keith Seitz <keiths@redhat.com>
4916 * breakpoint.c (build_bpstat_chain): New function, moved from
4918 (bpstat_stop_status): Add optional parameter, `stop_chain'.
4919 If no stop chain is passed, call build_bpstat_chain to build it.
4920 * breakpoint.h (build_bpstat_chain): Declare.
4921 (bpstat_stop_status): Move documentation here from breakpoint.c.
4922 * infrun.c (handle_signal_stop): Before eliding inlined frames,
4923 build the stop chain and pass it to skip_inline_frames.
4924 Pass this stop chain to bpstat_stop_status.
4925 * inline-frame.c: Include breakpoint.h.
4926 (stopped_by_user_bp_inline_frame): New function.
4927 (skip_inline_frames): Add parameter `stop_chain'.
4928 Move documention to inline-frame.h.
4929 If non-NULL, use stopped_by_user_bp_inline_frame to determine
4930 whether the frame should be elided.
4931 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4932 Add moved documentation and update for new parameter.
4934 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4937 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4938 unittests/format_pieces-selftests.c.
4939 * common/format.h (format_piece) <operator==>: New.
4940 (format_pieces) <operator[]>: Remove.
4941 * common/format.c (format_pieces::format_pieces): Handle \e.
4942 * unittests/format_pieces-selftests.c: New.
4944 2018-05-17 Tom Tromey <tom@tromey.com>
4947 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4948 (dw2_instantiate_symtab): Add skip_partial parameter.
4949 (dw2_find_last_source_symtab, dw2_map_expand_apply)
4950 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4951 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4952 (dw2_expand_symtabs_matching_one)
4953 (dw2_find_pc_sect_compunit_symtab)
4954 (dw2_debug_names_lookup_symbol)
4955 (dw2_debug_names_expand_symtabs_for_function): Update.
4956 (init_cutu_and_read_dies): Add skip_partial parameter.
4957 (process_psymtab_comp_unit, build_type_psymtabs_1)
4958 (process_skeletonless_type_unit, load_partial_comp_unit)
4959 (psymtab_to_symtab_1): Update.
4960 (load_full_comp_unit): Add skip_partial parameter.
4961 (process_imported_unit_die, dwarf2_read_addr_index)
4962 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4963 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4964 (read_signatured_type): Update.
4966 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4968 * value.c (release_value): Remove unused variable.
4969 (record_latest_value): Likewise.
4970 (access_value_history): Likewise.
4971 (preserve_values): Likewise.
4973 2018-05-17 Tom Tromey <tom@tromey.com>
4975 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4978 2018-05-16 Maciej W. Rozycki <macro@mips.com>
4981 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4982 Also handle registers whose width is not a multiple of
4984 (linux_nat_trad_target::store_register): Likewise.
4986 2018-05-16 Tom Tromey <tom@tromey.com>
4988 * gdbcore.h (core_bfd): Redefine.
4989 * corelow.c (core_target::close): Update.
4990 (core_target_open): Update.
4991 * progspace.h (struct program_space) <cbfd>: Now a
4994 2018-05-16 Tom Tromey <tom@tromey.com>
4997 * symfile-add-flags.h (enum symfile_add_flags)
4998 <SYMFILE_NOT_FILENAME>: New constant.
4999 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
5000 objfile name from BFD.
5001 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5002 * minidebug.c (find_separate_debug_file_in_section): Put
5003 ".gnu_debugdata" into BFD's file name.
5005 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
5007 * regcache.c (regcache_read_ftype, regcache_write_ftype):
5010 2018-05-15 Tamar Christina <tamar.christina@arm.com>
5013 * aarch64-tdep.c (aarch64_analyze_prologue,
5014 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5015 Indicate not interested in errors.
5017 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5019 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5020 Supply the MIPS_ZERO_REGNUM register.
5022 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5024 * mips-tdep.c (mask_address_var): Make variable static.
5026 2018-05-14 Tom Tromey <tom@tromey.com>
5028 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5030 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
5032 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5033 FXSAVE_ADDR for the mxcsr register.
5035 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
5037 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5039 2018-05-11 Pedro Alves <palves@redhat.com>
5041 * corelow.c (core_target) <core_target>: No longer inline.
5042 Initialize m_core_gdbarch, m_core_vec and build the section table
5044 <~core_target>: New.
5045 <core_gdbarch, get_core_register_section>: New methods.
5046 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5047 factored out from ...
5048 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5050 (sniff_core_bfd): Add gdbarch parameter.
5051 (core_close): Delete, merged into ...
5052 (core_target::close): ... here. Delete self.
5053 (core_close_cleanup): Delete.
5054 (core_target_open): Allocate a core_target on the heap. Use a
5055 unique_ptr instead of a cleanup. Bits moved into the core_target
5056 ctor. Adjust to use core_target methods instead of globals.
5057 (get_core_register_section): Rename to ...
5058 (core_target::get_core_register_section): ... this and adjust.
5059 (struct get_core_registers_cb_data): New.
5060 (get_core_registers_cb): Use it. Use bool.
5061 (core_target::fetch_registers, core_target::files_info)
5062 (core_target::xfer_partial, core_target::read_description)
5063 (core_target::pid_to, core_target::thread_name): Adjust to
5064 reference class fields instead of globals.
5065 * target.h (struct target_ops_deleter, target_ops_up): New.
5067 2018-05-11 Pedro Alves <palves@redhat.com>
5069 * corefile.c (core_file_command): Move to corelow.c.
5070 * corelow.c (the_core_target): Delete.
5071 (core_file_command): Moved from corefile.c. Check exec_bfd
5072 instead of the_core_target. Use target_detach instead of calling
5073 into the_core_target directly.
5074 (maybe_say_no_core_file_now): New.
5075 (core_target::detach): Use it.
5076 (_initialize_corelow): Remove references to the_core_target.
5077 * gdbcore.h (the_core_target): Delete.
5079 2018-05-11 Tom Tromey <tromey@redhat.com>
5080 Pedro Alves <palves@redhat.com>
5082 * corefile.c (core_bfd): Remove.
5083 * gdbcore.h (core_bfd): Now a macro.
5084 * progspace.h (struct program_space) <cbfd>: New field.
5086 2018-05-11 Tom Tromey <tom@tromey.com>
5088 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5091 2018-05-10 Tom Tromey <tom@tromey.com>
5093 * configure: Rebuild.
5094 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5096 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5099 * regformats/regdat.sh: Adjust script, following the addition
5100 of the new expedite_regs parameter to init_target_desc.
5102 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
5105 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5106 set_gdbarch_significant_addr_bit.
5107 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5108 set_gdbarch_significant_addr_bit.
5109 * utils.c (address_significant): Update to sign extend addr.
5111 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
5113 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5114 (xtensa_linux_init_abi): Limit tdep->num_regs by
5115 tdep->num_nopriv_regs.
5116 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5117 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5120 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
5122 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5124 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5126 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5127 (I387_MXCSR_INIT_VAL): New constant.
5128 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5129 buffer if it was supplied by the inferior.
5130 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5131 (i387_xsave_get_clear_bv): New function.
5132 (i387_supply_xsave): Only read x87 control registers from the
5133 xsave buffer if the feature is enabled, and the state will have
5134 been written, otherwise, provide a suitable default.
5135 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5136 including x87 control registers. Update control registers if they
5137 have changed from the default value, and mark features as enabled
5139 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5141 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5143 * spu-tdep.c (info_spu_event_command): Fix output formatting.
5145 2018-05-07 Tom Tromey <tom@tromey.com>
5147 * configure: Rebuild.
5148 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5150 2018-05-07 Tom Tromey <tom@tromey.com>
5153 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5154 bit. Use correct value for VDIV.
5156 2018-05-04 Tom Tromey <tom@tromey.com>
5158 * configure: Rebuild.
5159 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5161 2018-05-04 Tom Tromey <tom@tromey.com>
5163 * linux-record.c (record_linux_system_call) <case
5164 RECORD_SYS_RECVFROM>: Add "break".
5166 2018-05-04 Tom Tromey <tom@tromey.com>
5168 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5169 Add missing "break".
5170 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5171 Add missing "break".
5173 2018-05-04 Tom Tromey <tom@tromey.com>
5175 * rs6000-tdep.c (ppc_process_record_op4)
5176 (ppc_process_record_op63): Add fall-through comment.
5178 2018-05-04 Tom Tromey <tom@tromey.com>
5180 * i386-tdep.c (i386_process_record): Add fall-through comment.
5182 2018-05-04 Tom Tromey <tom@tromey.com>
5184 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5187 2018-05-04 Tom Tromey <tom@tromey.com>
5189 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5190 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5191 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5193 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5195 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5198 2018-05-04 Tom Tromey <tom@tromey.com>
5200 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5202 2018-05-04 Tom Tromey <tom@tromey.com>
5204 * s390-tdep.c (s390_process_record): Fix fall-through comments.
5205 * xcoffread.c (scan_xcoff_symtab): Move comment later.
5206 * symfile.c (section_is_mapped): Fix fall-through comment.
5207 * stabsread.c (define_symbol, read_member_functions): Fix
5208 fall-through comment.
5209 * s390-linux-tdep.c (s390_process_record): Fix fall-through
5211 * remote.c (remote_wait_as): Fix fall-through comment.
5212 * p-exp.y (yylex): Fix fall-through comment.
5213 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5215 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5216 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5217 * jv-exp.y (yylex): Fix fall-through comment.
5218 * go-exp.y (lex_one_token): Fix fall-through comment.
5219 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5220 fall-through comment.
5221 * f-exp.y (yylex): Fix fall-through comment.
5222 * dwarf2read.c (process_die): Fix fall-through comments.
5223 * dbxread.c (process_one_symbol): Fix fall-through comment.
5224 * d-exp.y (lex_one_token): Fix fall-through comment.
5225 * cp-name-parser.y (yylex): Fix fall-through comment.
5226 * coffread.c (coff_symtab_read): Fix fall-through comment.
5227 * c-exp.y (lex_one_token): Fix fall-through comment.
5228 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5230 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5233 2018-05-04 Tom Tromey <tom@tromey.com>
5236 * NEWS: Mention gdb.execute change.
5237 * gdbcmd.h (execute_control_command): Don't declare.
5238 * python/python.c (execute_gdb_command): Use read_command_lines_1,
5239 execute_control_commands, execute_control_commands_to_string.
5240 * cli/cli-script.h (execute_control_commands)
5241 (execute_control_commands_to_string): Declare.
5242 (execute_control_command): Add from_tty parameter.
5243 * cli/cli-script.c (execute_control_commands)
5244 (execute_control_commands_to_string): New functions.
5245 (execute_user_command): Use execute_control_commands.
5246 (execute_control_command_1): Add "from_tty" parameter. Update.
5247 (execute_control_command): Likewise.
5249 2018-05-04 Tom Tromey <tom@tromey.com>
5252 * NEWS: Mention that breakpoint commands are writable.
5253 * python/py-breakpoint.c (bppy_set_commands): New function.
5254 (breakpoint_object_getset) <"commands">: Use it.
5256 2018-05-04 Tom Tromey <tom@tromey.com>
5258 * tracepoint.c (actions_command): Update.
5259 * mi/mi-cmd-break.c (mi_command_line_array)
5260 (mi_command_line_array_cnt, mi_command_line_array_ptr)
5261 (mi_read_next_line): Remove.
5262 (mi_cmd_break_commands): Update.
5263 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5265 * cli/cli-script.c (get_command_line): Update.
5266 (process_next_line): Use function_view. Constify.
5267 (recurse_read_control_structure, read_command_lines)
5268 (read_command_lines_1): Change argument types to function_view.
5269 (do_define_command, document_command): Update.
5270 * breakpoint.h (check_tracepoint_command): Don't declare.
5271 * breakpoint.c (check_tracepoint_command): Remove.
5272 (commands_command_1, create_tracepoint_from_upload): Update.
5274 2018-05-04 Tom Tromey <tom@tromey.com>
5277 * cli/cli-script.h (enum command_control_type) <define_control>:
5279 * cli/cli-script.c (multi_line_command_p): Handle define_control.
5280 (build_command_line, execute_control_command_1)
5281 (process_next_line): Likewise.
5282 (do_define_command): New function, extracted from define_command.
5283 (define_command): Use it.
5285 2018-05-04 Tom Tromey <tom@tromey.com>
5287 * tracepoint.c (actions_command): Update.
5288 * cli/cli-script.h (read_command_lines): Update.
5289 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5290 (MAX_TMPBUF): Remove define.
5291 (define_command): Use string_printf.
5292 (document_command): Likewise.
5293 * breakpoint.c (commands_command_1): Update.
5295 2018-05-04 Tom Tromey <tom@tromey.com>
5297 * top.c (execute_command): Update.
5298 * cli/cli-script.h (print_command_lines): Now varargs.
5299 * cli/cli-script.c (print_command_lines): Now varargs.
5300 (execute_control_command_1) <case while_control, case if_control>:
5303 2018-05-04 Tom Tromey <tom@tromey.com>
5305 * tracepoint.c (all_tracepoint_actions): Rename from
5306 all_tracepoint_actions_and_cleanup. Change return type.
5307 (actions_command, encode_actions_1, encode_actions)
5308 (trace_dump_actions, tdump_command): Update.
5309 * remote.c (remote_download_command_source): Update.
5310 * python/python.c (gdbpy_eval_from_control_command)
5311 (python_command, python_interactive_command): Update.
5312 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5313 * guile/guile.c (guile_command)
5314 (gdbscm_eval_from_control_command, guile_command): Update.
5315 * compile/compile.c (compile_code_command)
5316 (compile_print_command, compile_to_object): Update.
5317 * cli/cli-script.h (struct command_lines_deleter): New.
5318 (counted_command_line): New typedef.
5319 (struct command_line): Add constructor, destructor.
5320 <body_list>: Remove.
5321 <body_list_0, body_list_1>: New members.
5322 (command_line_up): Remove typedef.
5323 (read_command_lines, read_command_lines_1, get_command_line):
5325 (copy_command_lines): Don't declare.
5326 * cli/cli-script.c (build_command_line): Use "new".
5327 (get_command_line): Return counted_command_line.
5328 (print_command_lines, execute_user_command)
5329 (execute_control_command_1, while_command, if_command): Update.
5330 (realloc_body_list): Remove.
5331 (process_next_line, recurse_read_control_structure): Update.
5332 (read_command_lines, read_command_lines_1): Return counted_command_line.
5333 (free_command_lines): Use "delete".
5334 (copy_command_lines): Remove.
5335 (define_command, document_command, show_user_1): Update.
5336 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5337 a counted_command_line.
5338 * breakpoint.h (counted_command_line): Remove typedef.
5339 (breakpoint_set_commands): Update.
5340 * breakpoint.c (check_no_tracepoint_commands)
5341 (validate_commands_for_breakpoint): Update.
5342 (breakpoint_set_commands): Change commands to be a
5343 counted_command_line.
5344 (commands_command_1, update_dprintf_command_list)
5345 (create_tracepoint_from_upload): Update.
5347 2018-05-04 Tom Tromey <tom@tromey.com>
5349 * cli/cli-decode.h (cmd_list_element): New constructor.
5350 (~cmd_list_element): New destructor.
5351 (struct cmd_list_element): Add initializers.
5352 * cli/cli-decode.c (do_add_cmd): Use "new".
5353 (delete_cmd): Use "delete".
5355 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5356 Pedro Alves <palves@redhat.com>
5358 PR breakpoints/19806 and support for PR external/20207.
5359 * NEWS: Mention Aarch64 watchpoint improvements.
5360 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5361 watchpoints and PR external/20207 watchpoints.
5362 * nat/aarch64-linux-hw-point.c
5363 (kernel_supports_any_contiguous_range): New.
5364 (aarch64_watchpoint_offset): New.
5365 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5366 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5367 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5368 (aarch64_align_watchpoint): New parameters aligned_offset_p and
5369 next_addr_orig_p. Support PR external/20207 watchpoints.
5370 (aarch64_downgrade_regs): New.
5371 (aarch64_dr_state_insert_one_point): New parameters offset and
5373 (aarch64_dr_state_remove_one_point): Likewise.
5374 (aarch64_handle_breakpoint): Update caller.
5375 (aarch64_handle_aligned_watchpoint): Likewise.
5376 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5378 (aarch64_linux_set_debug_regs): Remove const from state. Call
5379 aarch64_downgrade_regs.
5380 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5381 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5382 (DR_CONTROL_MASK): ... this.
5383 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5384 (unsigned int aarch64_watchpoint_offset): New prototype.
5385 (aarch64_linux_set_debug_regs): Remove const from state.
5386 * utils.c (align_up, align_down): Move to ...
5387 * common/common-utils.c (align_up, align_down): ... here.
5388 * utils.h (align_up, align_down): Move to ...
5389 * common/common-utils.h (align_up, align_down): ... here.
5391 2018-05-04 Joel Brobecker <brobecker@adacore.com>
5393 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5394 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5395 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5396 Re-implement to match the ABI as summarized in GCC's
5397 gcc/config/sparc/sparc.c. All callers updated.
5398 (sparc32_store_arguments): Remove assertion.
5400 2018-05-04 Tom Tromey <tom@tromey.com>
5402 * printcmd.c: Don't include tui.h.
5403 (decode_format): Use skip_spaces.
5405 2018-05-04 Tom Tromey <tom@tromey.com>
5408 * printcmd.c (last_count): New global.
5409 (x_command): Use saved count when repeating.
5411 2018-05-04 Tom Tromey <tom@tromey.com>
5413 * nto-procfs.c (do_closedir_cleanup): Remove.
5414 (procfs_pidlist): Use gdb_dir_up.
5415 * procfs.c (do_closedir_cleanup): Remove.
5416 (proc_update_threads): Use gdb_dir_up.
5417 * common/filestuff.h (struct gdb_dir_deleter): New.
5418 (gdb_dir_up): New typedef.
5420 2018-05-04 Tom Tromey <tom@tromey.com>
5422 * ada-lang.c (print_mention_exception): Use std::string.
5424 2018-05-04 Tom Tromey <tom@tromey.com>
5426 * ada-lang.c (create_excep_cond_exprs): Update.
5427 (ada_exception_catchpoint_cond_string): Use std::string.
5429 2018-05-04 Tom Tromey <tom@tromey.com>
5431 * ada-lang.c (xget_renaming_scope): Return std::string.
5432 (old_renaming_is_invisible): Update.
5434 2018-05-04 Tom Tromey <tom@tromey.com>
5436 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5437 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5439 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
5441 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5443 2018-05-04 Tom Tromey <tom@tromey.com>
5445 * remote.c (remote_query_supported_append): Change type.
5446 (remote_check_symbols): Update.
5448 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
5451 * configure.ac: Prepend libpython.
5452 * python/python-config.py: Likewise.
5453 * configure: Regenerate.
5455 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
5457 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5459 2018-05-03 Pedro Alves <palves@redhat.com>
5462 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5463 override. Write 'true' instead of '1'.
5464 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5467 2018-05-02 Pedro Alves <palves@redhat.com>
5469 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5470 add_inf_child_target.
5471 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5472 add_inf_child_target.
5473 * aix-thread.c (aix_thread_target_info): New.
5474 (aix_thread_target) <shortname, longname, doc>: Delete.
5476 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5477 add_inf_child_target.
5478 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5479 add_inf_child_target.
5480 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5481 add_inf_child_target.
5482 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5483 add_inf_child_target.
5484 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5485 add_inf_child_target.
5486 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5487 add_inf_child_target.
5488 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5489 add_inf_child_target.
5490 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5491 add_inf_child_target.
5492 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5493 add_inf_child_target.
5494 * bfd-target.c (target_bfd_target_info): New.
5495 (target_bfd) <shortname, longname, doc>: Delete.
5497 * bsd-kvm.c (bsd_kvm_target_info): New.
5498 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5500 (bsd_kvm_target::open): Rename to ...
5501 (bsd_kvm_target_open): ... this. Adjust.
5502 * bsd-uthread.c (bsd_uthread_target_info): New.
5503 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5505 * corefile.c (core_file_command): Adjust.
5506 * corelow.c (core_target_info): New.
5507 (core_target) <shortname, longname, doc>: Delete.
5509 (core_target::open): Rename to ...
5510 (core_target_open): ... this. Adjust.
5511 * ctf.c (ctf_target_info): New.
5512 (ctf_target) <shortname, longname, doc>: Delete.
5514 (ctf_target::open): Rename to ...
5515 (ctf_target_open): ... this.
5516 (_initialize_ctf): Adjust.
5517 * exec.c (exec_target_info): New.
5518 (exec_target) <shortname, longname, doc>: Delete.
5520 (exec_target::open): Rename to ...
5521 (exec_target_open): ... this.
5522 * gdbcore.h (core_target_open): Declare.
5523 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5524 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5525 add_inf_child_target.
5526 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5527 add_inf_child_target.
5528 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5529 add_inf_child_target.
5530 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5531 add_inf_child_target.
5532 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5533 add_inf_child_target.
5534 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5535 add_inf_child_target.
5536 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5537 add_inf_child_target.
5538 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5539 add_inf_child_target.
5540 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5541 add_inf_child_target.
5542 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5543 add_inf_child_target.
5544 * inf-child.c (inf_child_target_info): New.
5545 (inf_child_target::info): New.
5546 (inf_child_open_target): Remove 'target' parameter. Use
5547 get_native_target instead.
5548 (inf_child_target::open): Delete.
5549 (add_inf_child_target): New.
5550 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5553 (add_inf_child_target): Declare.
5554 (inf_child_open_target): Declare.
5555 * linux-thread-db.c (thread_db_target_info): New.
5556 (thread_db_target) <shortname, longname, doc>: Delete.
5558 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5559 add_inf_child_target.
5560 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5561 add_inf_child_target.
5562 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5563 add_inf_child_target.
5564 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5565 add_inf_child_target.
5566 * make-target-delegates (print_class): Adjust.
5567 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5568 add_inf_child_target.
5569 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5570 add_inf_child_target.
5571 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5572 add_inf_child_target.
5573 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5574 add_inf_child_target.
5575 * nto-procfs.c (nto_native_target_info): New.
5576 (nto_procfs_target_native) <shortname, longname, doc>:
5579 (nto_procfs_target_info): New.
5580 (nto_procfs_target_procfs) <shortname, longname, doc>:
5583 (init_procfs_targets): Adjust.
5584 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5585 add_inf_child_target.
5586 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5587 add_inf_child_target.
5588 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5589 add_inf_child_target.
5590 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5591 add_inf_child_target.
5592 * ravenscar-thread.c (ravenscar_target_info): New.
5593 (ravenscar_thread_target) <shortname, longname, doc>:
5596 * record-btrace.c (record_btrace_target_info):
5597 (record_btrace_target) <shortname, longname, doc>: Delete.
5599 (record_btrace_target::open): Rename to ...
5600 (record_btrace_target_open): ... this. Adjust.
5601 * record-full.c (record_longname, record_doc): New.
5602 (record_full_base_target) <shortname, longname, doc>: Delete.
5604 (record_full_target_info): New.
5605 (record_full_target): <shortname>: Delete.
5607 (record_full_core_open_1, record_full_open_1): Update comments.
5608 (record_full_base_target::open): Rename to ...
5609 (record_full_open): ... this.
5610 (cmd_record_full_restore): Update.
5611 (_initialize_record_full): Update.
5612 * remote-sim.c (remote_sim_target_info): New.
5613 (gdbsim_target) <shortname, longname, doc>: Delete.
5615 (gdbsim_target::open): Rename to ...
5616 (gdbsim_target_open): ... this.
5617 (_initialize_remote_sim): Adjust.
5618 * remote.c (remote_doc): New.
5619 (remote_target_info): New.
5620 (remote_target) <shortname, longname, doc>: Delete.
5622 (extended_remote_target_info): New.
5623 (extended_remote_target) <shortname, longname, doc>: Delete.
5625 (remote_target::open_1): Make static. Adjust.
5626 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5627 * s390-linux-nat.c (_initialize_s390_nat): Use
5628 add_inf_child_target.
5629 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5630 add_inf_child_target.
5631 * sol-thread.c (thread_db_target_info): New.
5632 (sol_thread_target) <shortname, longname, doc>: Delete.
5634 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5635 add_inf_child_target.
5636 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5637 add_inf_child_target.
5638 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5639 add_inf_child_target.
5640 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5641 add_inf_child_target.
5642 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5643 add_inf_child_target.
5644 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5645 add_inf_child_target.
5646 * spu-linux-nat.c (_initialize_spu_nat): Use
5647 add_inf_child_target.
5648 * spu-multiarch.c (spu_multiarch_target_info): New.
5649 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5651 * target-delegates.c: Regenerate.
5652 * target.c: Include <unordered_map>.
5653 (target_ops_p): Delete.
5654 (DEF_VEC_P(target_ops_p)): Delete.
5655 (target_factories): New.
5656 (test_target_info): New.
5657 (test_target_ops::info): New.
5658 (open_target): Adjust to use target_factories.
5659 (add_target_with_completer): Rename to ...
5660 (add_target): ... this. Change prototype. Register target_info
5661 and open callback in target_factories. Register target_info in
5662 command context instead of target_ops.
5663 (add_target): Delete old implementation.
5664 (add_deprecated_target_alias): Change prototype. Adjust.
5665 (the_native_target): New.
5666 (set_native_target, get_native_target): New.
5667 (find_default_run_target): Use the_native_target.
5668 (find_attach_target, find_run_target): Simplify.
5669 (target_ops::open): Delete.
5670 (dummy_target_info): New.
5671 (dummy_target::shortname, dummy_target::longname)
5672 (dummy_target::doc): Delete.
5673 (dummy_target::info): New.
5674 (debug_target::shortname, debug_target::longname)
5675 (debug_target::doc): Delete.
5676 (debug_target::info): New.
5677 * target.h (struct target_info): New.
5678 (target_ops::~target_ops): Add comment.
5679 (target_ops::info): New.
5680 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5681 longer virtual. Implement in terms of target_info.
5682 (set_native_target, get_native_target): Declare.
5683 (target_open_ftype): New.
5684 (add_target, add_target_with_completer)
5685 (add_deprecated_target_alias): Change prototype.
5686 (test_target) <shortname, longname, doc>: Delete.
5688 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5689 add_inf_child_target.
5690 * tracefile-tfile.c (tfile_target_info): New.
5691 (tfile_target) <shortname, longname, doc>: Delete.
5693 (tfile_target::open): Rename to ...
5694 (tfile_target_open): ... this.
5695 (_initialize_tracefile_tfile): Adjust.
5696 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5697 add_inf_child_target.
5698 * windows-nat.c (_initialize_windows_nat): Use
5699 add_inf_child_target.
5700 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5701 add_inf_child_target.
5703 2018-05-02 Pedro Alves <palves@redhat.com>
5705 * linux-nat.h (linux_nat_target) <low_new_thread,
5706 low_delete_thread, low_new_fork, low_forget_process,
5707 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5708 New virtual methods.
5709 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5710 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5711 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5712 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5713 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5715 * linux-fork.c (delete_fork): Adjust to call low method.
5716 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5717 (linux_nat_new_fork, linux_nat_forget_process_hook)
5718 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5719 (linux_nat_status_is_event):
5720 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5721 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5723 (sigtrap_is_event): Rename to ...
5724 (linux_nat_target::low_status_is_event): ... this.
5725 (linux_nat_set_status_is_event): Delete.
5726 (save_stop_reason, linux_nat_wait_1)
5727 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5729 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5730 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5731 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5732 (linux_nat_set_prepare_to_resume): Delete.
5733 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5734 low virtual methods.
5735 * amd64-linux-nat.c: Likewise.
5736 * arm-linux-nat.c: Likewise.
5737 * i386-linux-nat.c: Likewise.
5738 * ia64-linux-nat.c: Likewise.
5739 * mips-linux-nat.c: Likewise.
5740 * ppc-linux-nat.c: Likewise.
5741 * s390-linux-nat.c: Likewise.
5742 * sparc64-linux-nat.c: Likewise.
5743 * x86-linux-nat.c: Likewise.
5744 * x86-linux-nat.h: Include "nat/x86-linux.h".
5745 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5746 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5749 2018-05-02 Pedro Alves <palves@redhat.com>
5751 * target.h (target_ops)
5752 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5753 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5754 stopped_by_watchpoint, have_continuable_watchpoint,
5755 stopped_data_address, watchpoint_addr_within_range,
5756 can_accel_watchpoint_condition, can_run, thread_alive,
5757 has_all_memory, has_memory, has_stack, has_registers,
5758 has_execution, can_async_p, is_async_p, supports_non_stop,
5759 always_non_stop_p, can_execute_reverse, supports_multi_process,
5760 supports_enable_disable_tracepoint,
5761 supports_disable_randomization, supports_string_tracing,
5762 supports_evaluation_of_breakpoint_conditions,
5763 can_run_breakpoint_commands, filesystem_is_local,
5764 can_download_tracepoint, get_trace_state_variable_value,
5765 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5766 record_is_replaying, record_will_replay,
5767 augmented_libraries_svr4_read>: Adjust to return bool.
5768 * aarch64-linux-nat.c: All implementations adjusted.
5769 * aix-thread.c: All implementations adjusted.
5770 * arm-linux-nat.c: All implementations adjusted.
5771 * breakpoint.c: All implementations adjusted.
5772 * bsd-kvm.c: All implementations adjusted.
5773 * bsd-uthread.c: All implementations adjusted.
5774 * corelow.c: All implementations adjusted.
5775 * ctf.c: All implementations adjusted.
5776 * darwin-nat.c: All implementations adjusted.
5777 * darwin-nat.h: All implementations adjusted.
5778 * exec.c: All implementations adjusted.
5779 * fbsd-nat.c: All implementations adjusted.
5780 * fbsd-nat.h: All implementations adjusted.
5781 * gnu-nat.c: All implementations adjusted.
5782 * gnu-nat.h: All implementations adjusted.
5783 * go32-nat.c: All implementations adjusted.
5784 * ia64-linux-nat.c: All implementations adjusted.
5785 * inf-child.c: All implementations adjusted.
5786 * inf-child.h: All implementations adjusted.
5787 * inf-ptrace.c: All implementations adjusted.
5788 * inf-ptrace.h: All implementations adjusted.
5789 * linux-nat.c: All implementations adjusted.
5790 * linux-nat.h: All implementations adjusted.
5791 * mips-linux-nat.c: All implementations adjusted.
5792 * nto-procfs.c: All implementations adjusted.
5793 * ppc-linux-nat.c: All implementations adjusted.
5794 * procfs.c: All implementations adjusted.
5795 * ravenscar-thread.c: All implementations adjusted.
5796 * record-btrace.c: All implementations adjusted.
5797 * record-full.c: All implementations adjusted.
5798 * remote-sim.c: All implementations adjusted.
5799 * remote.c: All implementations adjusted.
5800 * s390-linux-nat.c: All implementations adjusted.
5801 * sol-thread.c: All implementations adjusted.
5802 * spu-multiarch.c: All implementations adjusted.
5803 * target-delegates.c: All implementations adjusted.
5804 * target.c: All implementations adjusted.
5805 * target.h: All implementations adjusted.
5806 * tracefile-tfile.c: All implementations adjusted.
5807 * tracefile.c: All implementations adjusted.
5808 * tracefile.h: All implementations adjusted.
5809 * windows-nat.c: All implementations adjusted.
5810 * x86-linux-nat.h: All implementations adjusted.
5811 * x86-nat.h: All implementations adjusted.
5813 2018-05-02 Pedro Alves <palves@redhat.com>
5815 * make-target-delegates (scan_target_h): Don't trim lines here.
5816 Replace sequences of tabs and/or whitespace with a single
5818 (top level, parsing methods): Trim each line before processing it
5821 2018-05-02 Pedro Alves <palves@redhat.com>
5822 John Baldwin <jhb@freebsd.org>
5824 * target.h (enum strata) <debug_stratum>: New.
5825 (struct target_ops) <all delegation methods>: Replace by C++
5826 virtual methods, and drop "to_" prefix. All references updated
5828 <to_shortname, to_longname, to_doc, to_data,
5829 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5830 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5831 virtual methods. All references updated throughout.
5832 <can_attach, supports_terminal_ours, can_create_inferior,
5833 get_thread_control_capabilities, attach_no_wait>: New
5835 <insert_breakpoint, remove_breakpoint>: Now
5836 TARGET_DEFAULT_NORETURN methods.
5837 <info_proc>: Now returns bool.
5839 (OPS_MAGIC): Delete.
5840 (current_target): Delete. All references replaced by references
5842 (target_stack): ... this. New.
5843 (target_shortname, target_longname): Adjust.
5844 (target_can_run): Now a function declaration.
5845 (default_child_has_all_memory, default_child_has_memory)
5846 (default_child_has_stack, default_child_has_registers)
5847 (default_child_has_execution): Remove target_ops parameter.
5848 (complete_target_initialization): Delete.
5849 (memory_breakpoint_target): New template class.
5850 (test_target_ops): Refactor as a C++ class with virtual methods.
5851 * make-target-delegates (NAME_PART): Tighten.
5852 (POINTER_PART, CP_SYMBOL): New.
5853 (SIMPLE_RETURN_PART): Reimplement.
5854 (VEC_RETURN_PART): Expect less.
5855 (RETURN_PART, VIRTUAL_PART): New.
5856 (METHOD): Adjust to C++ virtual methods.
5857 (scan_target_h): Remove reference to C99.
5858 (dname): Output "target_ops::" prefix.
5859 (write_function_header): Adjust to output a C++ class method.
5860 (write_declaration): New.
5861 (write_delegator): Adjust to output a C++ class method.
5862 (tdname): Output "dummy_target::" prefix.
5863 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5865 (tdefault_names, debug_names): Delete.
5866 (return_types, tdefaults, styles, argtypes_array): New.
5867 (top level): All methods are delegators.
5869 (top level): Print dummy_target and debug_target classes.
5870 * target-delegates.c: Regenerate.
5871 * target-debug.h (target_debug_print_enum_info_proc_what)
5872 (target_debug_print_thread_control_capabilities)
5873 (target_debug_print_thread_info_p): New.
5874 * target.c (dummy_target): Delete.
5875 (the_dummy_target, the_debug_target): New.
5876 (target_stack): Now extern.
5877 (set_targetdebug): Push/unpush debug target.
5878 (default_child_has_all_memory, default_child_has_memory)
5879 (default_child_has_stack, default_child_has_registers)
5880 (default_child_has_execution): Remove target_ops parameter.
5881 (complete_target_initialization): Delete.
5882 (add_target_with_completer): No longer call
5883 complete_target_initialization.
5884 (target_supports_terminal_ours): Use regular delegation.
5885 (update_current_target): Delete.
5886 (push_target): No longer check magic number. Don't call
5887 update_current_target.
5888 (unpush_target): Don't call update_current_target.
5889 (target_is_pushed): No longer check magic number.
5890 (target_require_runnable): Skip for all stratums over
5892 (target_ops::info_proc): New.
5893 (target_info_proc): Use find_target_at and
5894 find_default_run_target.
5895 (target_supports_disable_randomization): Use regular delegation.
5896 (target_get_osdata): Use find_target_at.
5897 (target_ops::open, target_ops::close, target_ops::can_attach)
5898 (target_ops::attach, target_ops::can_create_inferior)
5899 (target_ops::create_inferior, target_ops::can_run)
5900 (target_can_run): New.
5901 (default_fileio_target): Use regular delegation.
5902 (target_ops::fileio_open, target_ops::fileio_pwrite)
5903 (target_ops::fileio_pread, target_ops::fileio_fstat)
5904 (target_ops::fileio_close, target_ops::fileio_unlink)
5905 (target_ops::fileio_readlink): New.
5906 (target_fileio_open_1, target_fileio_unlink)
5907 (target_fileio_readlink): Always call the target method. Handle
5909 (return_zero, return_zero_has_execution): Delete.
5910 (init_dummy_target): Delete.
5911 (dummy_target::dummy_target, dummy_target::shortname)
5912 (dummy_target::longname, dummy_target::doc)
5913 (debug_target::debug_target, debug_target::shortname)
5914 (debug_target::longname, debug_target::doc): New.
5915 (target_supports_delete_record): Use regular delegation.
5916 (setup_target_debug): Delete.
5917 (maintenance_print_target_stack): Skip debug_stratum.
5918 (initialize_targets): Instantiate the_dummy_target and
5920 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
5922 (target_auxv_search, fprint_target_auxv): Adjust.
5923 (info_auxv_command): Adjust to use target_stack.
5924 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5925 * exceptions.c (print_flush): Handle a NULL target_stack.
5926 * regcache.c (target_ops_no_register): Refactor as class with
5929 * exec.c (exec_target): New class.
5930 (exec_ops): Now an exec_target.
5931 (exec_open, exec_close_1, exec_get_section_table)
5932 (exec_xfer_partial, exec_files_info, exec_has_memory)
5933 (exec_make_note_section): Refactor as exec_target methods.
5934 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5936 (exec_target::find_memory_regions): New.
5937 (_initialize_exec): Don't call init_exec_ops.
5938 * gdbcore.h (exec_file_clear): Delete.
5940 * corefile.c (core_target): Delete.
5941 (core_file_command): Adjust.
5942 * corelow.c (core_target): New class.
5943 (the_core_target): New.
5944 (core_close): Remove target_ops parameter.
5945 (core_close_cleanup): Adjust.
5946 (core_target::close): New.
5947 (core_open, core_detach, get_core_registers, core_files_info)
5948 (core_xfer_partial, core_thread_alive, core_read_description)
5949 (core_pid_to_str, core_thread_name, core_has_memory)
5950 (core_has_stack, core_has_registers, core_info_proc): Rework as
5951 core_target methods.
5952 (ignore, core_remove_breakpoint, init_core_ops): Delete.
5953 (_initialize_corelow): Initialize the_core_target.
5954 * gdbcore.h (core_target): Delete.
5955 (the_core_target): New.
5957 * ctf.c: (ctf_target): New class.
5958 (ctf_ops): Now a ctf_target.
5959 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5960 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5961 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5963 (init_ctf_ops): Delete.
5964 (_initialize_ctf): Don't call it.
5965 * tracefile-tfile.c (tfile_target): New class.
5966 (tfile_ops): Now a tfile_target.
5967 (tfile_open, tfile_close, tfile_files_info)
5968 (tfile_get_tracepoint_status, tfile_trace_find)
5969 (tfile_fetch_registers, tfile_xfer_partial)
5970 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5971 Refactor as tfile_target methods.
5972 (tfile_xfer_partial_features): Remove target_ops parameter.
5973 (init_tfile_ops): Delete.
5974 (_initialize_tracefile_tfile): Don't call it.
5975 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5976 (tracefile_has_stack, tracefile_has_registers)
5977 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5978 tracefile_target methods.
5979 (init_tracefile_ops): Delete.
5980 (tracefile_target::tracefile_target): New.
5981 * tracefile.h: Include "target.h".
5982 (tracefile_target): New class.
5983 (init_tracefile_ops): Delete.
5985 * spu-multiarch.c (spu_multiarch_target): New class.
5986 (spu_ops): Now a spu_multiarch_target.
5987 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5988 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5989 (spu_search_memory, spu_mourn_inferior): Refactor as
5990 spu_multiarch_target methods.
5991 (init_spu_ops): Delete.
5992 (_initialize_spu_multiarch): Remove references to init_spu_ops,
5993 complete_target_initialization.
5995 * ravenscar-thread.c (ravenscar_thread_target): New class.
5996 (ravenscar_ops): Now a ravenscar_thread_target.
5997 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5998 (ravenscar_thread_alive, ravenscar_pid_to_str)
5999 (ravenscar_fetch_registers, ravenscar_store_registers)
6000 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6001 (ravenscar_stopped_by_hw_breakpoint)
6002 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6003 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6004 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6006 (init_ravenscar_thread_ops): Delete.
6007 (_initialize_ravenscar): Remove references to
6008 init_ravenscar_thread_ops and complete_target_initialization.
6010 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6011 (bsd_uthread_target): New class.
6012 (bsd_uthread_ops): Now a bsd_uthread_target.
6013 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6014 (bsd_uthread_close, bsd_uthread_mourn_inferior)
6015 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6016 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6017 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6018 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6019 (bsd_uthread_target): Delete function.
6020 (_initialize_bsd_uthread): Remove reference to
6021 complete_target_initialization.
6023 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
6024 (target_bfd): ... this new class.
6025 (target_bfd_xfer_partial, target_bfd_get_section_table)
6026 (target_bfd_close): Refactor as target_bfd methods.
6027 (target_bfd::~target_bfd): New.
6028 (target_bfd_reopen): Adjust.
6029 (target_bfd::close): New.
6031 * record-btrace.c (record_btrace_target): New class.
6032 (record_btrace_ops): Now a record_btrace_target.
6033 (record_btrace_open, record_btrace_stop_recording)
6034 (record_btrace_disconnect, record_btrace_close)
6035 (record_btrace_async, record_btrace_info)
6036 (record_btrace_insn_history, record_btrace_insn_history_range)
6037 (record_btrace_insn_history_from, record_btrace_call_history)
6038 (record_btrace_call_history_range)
6039 (record_btrace_call_history_from, record_btrace_record_method)
6040 (record_btrace_is_replaying, record_btrace_will_replay)
6041 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6042 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6043 (record_btrace_store_registers, record_btrace_prepare_to_store)
6044 (record_btrace_to_get_unwinder)
6045 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6046 (record_btrace_commit_resume, record_btrace_wait)
6047 (record_btrace_stop, record_btrace_can_execute_reverse)
6048 (record_btrace_stopped_by_sw_breakpoint)
6049 (record_btrace_supports_stopped_by_sw_breakpoint)
6050 (record_btrace_stopped_by_hw_breakpoint)
6051 (record_btrace_supports_stopped_by_hw_breakpoint)
6052 (record_btrace_update_thread_list, record_btrace_thread_alive)
6053 (record_btrace_goto_begin, record_btrace_goto_end)
6054 (record_btrace_goto, record_btrace_stop_replaying_all)
6055 (record_btrace_execution_direction)
6056 (record_btrace_prepare_to_generate_core)
6057 (record_btrace_done_generating_core): Refactor as
6058 record_btrace_target methods.
6059 (init_record_btrace_ops): Delete.
6060 (_initialize_record_btrace): Remove reference to
6061 init_record_btrace_ops.
6062 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6063 the execution_direction global.
6064 (record_full_base_target, record_full_target)
6065 (record_full_core_target): New classes.
6066 (record_full_ops): Now a record_full_target.
6067 (record_full_core_ops): Now a record_full_core_target.
6068 (record_full_target::detach, record_full_target::disconnect)
6069 (record_full_core_target::disconnect)
6070 (record_full_target::mourn_inferior, record_full_target::kill):
6072 (record_full_open, record_full_close, record_full_async): Refactor
6073 as methods of the record_full_base_target class.
6074 (record_full_resume, record_full_commit_resume): Refactor
6075 as methods of the record_full_target class.
6076 (record_full_wait, record_full_stopped_by_watchpoint)
6077 (record_full_stopped_data_address)
6078 (record_full_stopped_by_sw_breakpoint)
6079 (record_full_supports_stopped_by_sw_breakpoint)
6080 (record_full_stopped_by_hw_breakpoint)
6081 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6082 methods of the record_full_base_target class.
6083 (record_full_store_registers, record_full_xfer_partial)
6084 (record_full_insert_breakpoint, record_full_remove_breakpoint):
6085 Refactor as methods of the record_full_target class.
6086 (record_full_can_execute_reverse, record_full_get_bookmark)
6087 (record_full_goto_bookmark, record_full_execution_direction)
6088 (record_full_record_method, record_full_info, record_full_delete)
6089 (record_full_is_replaying, record_full_will_replay)
6090 (record_full_goto_begin, record_full_goto_end, record_full_goto)
6091 (record_full_stop_replaying): Refactor as methods of the
6092 record_full_base_target class.
6093 (record_full_core_resume, record_full_core_kill)
6094 (record_full_core_fetch_registers)
6095 (record_full_core_prepare_to_store)
6096 (record_full_core_store_registers, record_full_core_xfer_partial)
6097 (record_full_core_insert_breakpoint)
6098 (record_full_core_remove_breakpoint)
6099 (record_full_core_has_execution): Refactor
6100 as methods of the record_full_core_target class.
6101 (record_full_base_target::supports_delete_record): New.
6102 (init_record_full_ops): Delete.
6103 (init_record_full_core_ops): Delete.
6104 (record_full_save): Refactor as method of the
6105 record_full_base_target class.
6106 (_initialize_record_full): Remove references to
6107 init_record_full_ops and init_record_full_core_ops.
6109 * remote.c (remote_target, extended_remote_target): New classes.
6110 (remote_ops): Now a remote_target.
6111 (extended_remote_ops): Now an extended_remote_target.
6112 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6113 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6114 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6115 (remote_pass_signals, remote_set_syscall_catchpoint)
6116 (remote_program_signals, )
6117 (remote_thread_always_alive): Remove target_ops parameter.
6118 (remote_thread_alive, remote_thread_name)
6119 (remote_update_thread_list, remote_threads_extra_info)
6120 (remote_static_tracepoint_marker_at)
6121 (remote_static_tracepoint_markers_by_strid)
6122 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6123 (remote_open): Refactor as methods of remote_target.
6124 (extended_remote_open, extended_remote_detach)
6125 (extended_remote_attach, extended_remote_post_attach):
6126 (extended_remote_supports_disable_randomization)
6127 (extended_remote_create_inferior): : Refactor as method of
6128 extended_remote_target.
6129 (remote_set_permissions, remote_open_1, remote_detach)
6130 (remote_follow_fork, remote_follow_exec, remote_disconnect)
6131 (remote_resume, remote_commit_resume, remote_stop)
6132 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6133 (remote_terminal_ours, remote_wait, remote_fetch_registers)
6134 (remote_prepare_to_store, remote_store_registers)
6135 (remote_flash_erase, remote_flash_done, remote_files_info)
6136 (remote_kill, remote_mourn, remote_insert_breakpoint)
6137 (remote_remove_breakpoint, remote_insert_watchpoint)
6138 (remote_watchpoint_addr_within_range)
6139 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6140 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6141 (remote_supports_stopped_by_sw_breakpoint)
6142 (remote_stopped_by_hw_breakpoint)
6143 (remote_supports_stopped_by_hw_breakpoint)
6144 (remote_stopped_by_watchpoint, remote_stopped_data_address)
6145 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6146 (remote_verify_memory): Refactor as methods of remote_target.
6147 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6149 (remote_xfer_partial, remote_get_memory_xfer_limit)
6150 (remote_search_memory, remote_rcmd, remote_memory_map)
6151 (remote_pid_to_str, remote_get_thread_local_address)
6152 (remote_get_tib_address, remote_read_description): Refactor as
6153 methods of remote_target.
6154 (remote_target::fileio_open, remote_target::fileio_pwrite)
6155 (remote_target::fileio_pread, remote_target::fileio_close): New.
6156 (remote_hostio_readlink, remote_hostio_fstat)
6157 (remote_filesystem_is_local, remote_can_execute_reverse)
6158 (remote_supports_non_stop, remote_supports_disable_randomization)
6159 (remote_supports_multi_process, remote_supports_cond_breakpoints)
6160 (remote_supports_enable_disable_tracepoint)
6161 (remote_supports_string_tracing)
6162 (remote_can_run_breakpoint_commands, remote_trace_init)
6163 (remote_download_tracepoint, remote_can_download_tracepoint)
6164 (remote_download_trace_state_variable, remote_enable_tracepoint)
6165 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6166 (remote_trace_start, remote_get_trace_status)
6167 (remote_get_tracepoint_status, remote_trace_stop)
6168 (remote_trace_find, remote_get_trace_state_variable_value)
6169 (remote_save_trace_data, remote_get_raw_trace_data)
6170 (remote_set_disconnected_tracing, remote_core_of_thread)
6171 (remote_set_circular_trace_buffer, remote_traceframe_info)
6172 (remote_get_min_fast_tracepoint_insn_len)
6173 (remote_set_trace_buffer_size, remote_set_trace_notes)
6174 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6175 (remote_disable_btrace, remote_teardown_btrace)
6176 (remote_read_btrace, remote_btrace_conf)
6177 (remote_augmented_libraries_svr4_read, remote_load)
6178 (remote_pid_to_exec_file, remote_can_do_single_step)
6179 (remote_execution_direction, remote_thread_handle_to_thread_info):
6180 Refactor as methods of remote_target.
6181 (init_remote_ops, init_extended_remote_ops): Delete.
6182 (remote_can_async_p, remote_is_async_p, remote_async)
6183 (remote_thread_events, remote_upload_tracepoints)
6184 (remote_upload_trace_state_variables): Refactor as methods of
6186 (_initialize_remote): Remove references to init_remote_ops and
6187 init_extended_remote_ops.
6189 * remote-sim.c (gdbsim_target): New class.
6190 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6191 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6192 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6193 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6194 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6195 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6196 Refactor as methods of gdbsim_target.
6197 (gdbsim_ops): Now a gdbsim_target.
6198 (init_gdbsim_ops): Delete.
6199 (gdbsim_cntrl_c): Adjust.
6200 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6202 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6203 (the_amd64_linux_nat_target): New.
6204 (amd64_linux_fetch_inferior_registers)
6205 (amd64_linux_store_inferior_registers): Refactor as methods of
6206 amd64_linux_nat_target.
6207 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
6208 * i386-linux-nat.c: Don't include "linux-nat.h".
6209 (i386_linux_nat_target): New class.
6210 (the_i386_linux_nat_target): New.
6211 (i386_linux_fetch_inferior_registers)
6212 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6213 as methods of i386_linux_nat_target.
6214 (_initialize_i386_linux_nat): Adjust. Set linux_target.
6215 * inf-child.c (inf_child_ops): Delete.
6216 (inf_child_fetch_inferior_registers)
6217 (inf_child_store_inferior_registers): Delete.
6218 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6219 methods of inf_child_target.
6220 (inf_child_target::supports_terminal_ours)
6221 (inf_child_target::terminal_init)
6222 (inf_child_target::terminal_inferior)
6223 (inf_child_target::terminal_ours_for_output)
6224 (inf_child_target::terminal_ours, inf_child_target::interrupt)
6225 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6227 (inf_child_open, inf_child_disconnect, inf_child_close)
6228 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6229 (inf_child_post_startup_inferior, inf_child_can_run)
6230 (inf_child_pid_to_exec_file): Refactor as methods of
6232 (inf_child_follow_fork): Delete.
6233 (inf_child_target::can_create_inferior)
6234 (inf_child_target::can_attach): New.
6235 (inf_child_target::has_all_memory, inf_child_target::has_memory)
6236 (inf_child_target::has_stack, inf_child_target::has_registers)
6237 (inf_child_target::has_execution): New.
6238 (inf_child_fileio_open, inf_child_fileio_pwrite)
6239 (inf_child_fileio_pread, inf_child_fileio_fstat)
6240 (inf_child_fileio_close, inf_child_fileio_unlink)
6241 (inf_child_fileio_readlink, inf_child_use_agent)
6242 (inf_child_can_use_agent): Refactor as methods of
6244 (return_zero, inf_child_target): Delete.
6245 (inf_child_target::inf_child_target): New.
6246 * inf-child.h: Include "target.h".
6247 (inf_child_target): Delete function prototype.
6248 (inf_child_target): New class.
6249 (inf_child_open_target, inf_child_mourn_inferior)
6250 (inf_child_maybe_unpush_target): Delete.
6251 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6252 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6253 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
6254 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
6255 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
6256 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
6257 (inf_ptrace_wait, inf_ptrace_xfer_partial)
6258 (inf_ptrace_thread_alive, inf_ptrace_files_info)
6259 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
6260 methods of inf_ptrace_target.
6261 (inf_ptrace_target): Delete function.
6262 * inf-ptrace.h: Include "inf-child.h".
6263 (inf_ptrace_target): Delete function declaration.
6264 (inf_ptrace_target): New class.
6265 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6266 * linux-nat.c (linux_target): New.
6267 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6268 (linux_nat_target::~linux_nat_target): New.
6269 (linux_child_post_attach, linux_child_post_startup_inferior)
6270 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
6271 (linux_child_remove_fork_catchpoint)
6272 (linux_child_insert_vfork_catchpoint)
6273 (linux_child_remove_vfork_catchpoint)
6274 (linux_child_insert_exec_catchpoint)
6275 (linux_child_remove_exec_catchpoint)
6276 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
6277 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
6278 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
6279 (linux_nat_stopped_data_address)
6280 (linux_nat_stopped_by_sw_breakpoint)
6281 (linux_nat_supports_stopped_by_sw_breakpoint)
6282 (linux_nat_stopped_by_hw_breakpoint)
6283 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
6284 (linux_nat_kill, linux_nat_mourn_inferior)
6285 (linux_nat_xfer_partial, linux_nat_thread_alive)
6286 (linux_nat_update_thread_list, linux_nat_pid_to_str)
6287 (linux_nat_thread_name, linux_child_pid_to_exec_file)
6288 (linux_child_static_tracepoint_markers_by_strid)
6289 (linux_nat_is_async_p, linux_nat_can_async_p)
6290 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6291 (linux_nat_supports_multi_process)
6292 (linux_nat_supports_disable_randomization, linux_nat_async)
6293 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6294 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6295 (linux_nat_fileio_open, linux_nat_fileio_readlink)
6296 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6297 methods of linux_nat_target.
6298 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6299 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6301 (check_stopped_by_watchpoint): Adjust.
6302 (linux_xfer_partial): Delete.
6303 (linux_target_install_ops, linux_target, linux_nat_add_target):
6305 (linux_nat_target::linux_nat_target): New.
6306 * linux-nat.h: Include "inf-ptrace.h".
6307 (linux_nat_target): New.
6308 (linux_target, linux_target_install_ops, linux_nat_add_target):
6309 Delete function declarations.
6310 (linux_target): Declare global.
6311 * linux-thread-db.c (thread_db_target): New.
6312 (thread_db_target::thread_db_target): New.
6313 (thread_db_ops): Delete.
6314 (the_thread_db_target): New.
6315 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6316 (thread_db_update_thread_list, thread_db_pid_to_str)
6317 (thread_db_extra_thread_info)
6318 (thread_db_thread_handle_to_thread_info)
6319 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6320 (thread_db_resume): Refactor as methods of thread_db_target.
6321 (init_thread_db_ops): Delete.
6322 (_initialize_thread_db): Remove reference to init_thread_db_ops.
6323 * x86-linux-nat.c: Don't include "linux-nat.h".
6324 (super_post_startup_inferior): Delete.
6325 (x86_linux_nat_target::~x86_linux_nat_target): New.
6326 (x86_linux_child_post_startup_inferior)
6327 (x86_linux_read_description, x86_linux_enable_btrace)
6328 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6329 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6330 methods of x86_linux_nat_target.
6331 (x86_linux_create_target): Delete. Bits folded ...
6332 (x86_linux_add_target): ... here. Now takes a linux_nat_target
6334 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6335 (x86_linux_nat_target): New class.
6336 (x86_linux_create_target): Delete.
6337 (x86_linux_add_target): Now takes a linux_nat_target pointer.
6338 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6339 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6340 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6341 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6342 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6344 (x86_use_watchpoints): Delete.
6345 * x86-nat.h: Include "breakpoint.h" and "target.h".
6346 (x86_use_watchpoints): Delete.
6347 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6348 (x86_stopped_by_watchpoint, x86_stopped_data_address)
6349 (x86_insert_watchpoint, x86_remove_watchpoint)
6350 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6351 (x86_stopped_by_hw_breakpoint): New declarations.
6352 (x86_nat_target): New template class.
6354 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6355 (the_ppc_linux_nat_target): New.
6356 (ppc_linux_fetch_inferior_registers)
6357 (ppc_linux_can_use_hw_breakpoint)
6358 (ppc_linux_region_ok_for_hw_watchpoint)
6359 (ppc_linux_ranged_break_num_registers)
6360 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6361 (ppc_linux_insert_mask_watchpoint)
6362 (ppc_linux_remove_mask_watchpoint)
6363 (ppc_linux_can_accel_watchpoint_condition)
6364 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6365 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6366 (ppc_linux_watchpoint_addr_within_range)
6367 (ppc_linux_masked_watch_num_registers)
6368 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6369 (ppc_linux_read_description): Refactor as methods of
6370 ppc_linux_nat_target.
6371 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
6373 * procfs.c (procfs_xfer_partial): Delete forward declaration.
6374 (procfs_target): New class.
6375 (the_procfs_target): New.
6376 (procfs_target): Delete function.
6377 (procfs_auxv_parse, procfs_attach, procfs_detach)
6378 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6379 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6380 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6381 (procfs_create_inferior, procfs_update_thread_list)
6382 (procfs_thread_alive, procfs_pid_to_str)
6383 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6384 (procfs_stopped_data_address, procfs_insert_watchpoint)
6385 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6386 (proc_find_memory_regions, procfs_info_proc)
6387 (procfs_make_note_section): Refactor as methods of procfs_target.
6388 (_initialize_procfs): Adjust.
6389 * sol-thread.c (sol_thread_target): New class.
6390 (sol_thread_ops): Now a sol_thread_target.
6391 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6392 (sol_thread_fetch_registers, sol_thread_store_registers)
6393 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6394 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6395 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6396 (init_sol_thread_ops): Delete.
6397 (_initialize_sol_thread): Adjust. Remove references to
6398 init_sol_thread_ops and complete_target_initialization.
6400 * windows-nat.c (windows_nat_target): New class.
6401 (windows_fetch_inferior_registers)
6402 (windows_store_inferior_registers, windows_resume, windows_wait)
6403 (windows_attach, windows_detach, windows_pid_to_exec_file)
6404 (windows_files_info, windows_create_inferior)
6405 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6406 (windows_close, windows_pid_to_str, windows_xfer_partial)
6407 (windows_get_tib_address, windows_get_ada_task_ptid)
6408 (windows_thread_name, windows_thread_alive): Refactor as
6409 windows_nat_target methods.
6410 (do_initial_windows_stuff): Adjust.
6411 (windows_target): Delete function.
6412 (_initialize_windows_nat): Adjust.
6414 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6415 (darwin_mourn_inferior, darwin_kill_inferior)
6416 (darwin_create_inferior, darwin_attach, darwin_detach)
6417 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6418 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6419 (darwin_supports_multi_process): Refactor as darwin_nat_target
6421 (darwin_resume_to, darwin_files_info): Delete.
6422 (_initialize_darwin_inferior): Rename to ...
6423 (_initialize_darwin_nat): ... this. Adjust to C++ification.
6424 * darwin-nat.h: Include "inf-child.h".
6425 (darwin_nat_target): New class.
6426 (darwin_complete_target): Delete.
6427 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6428 (darwin_target): New.
6429 (i386_darwin_fetch_inferior_registers)
6430 (i386_darwin_store_inferior_registers): Refactor as methods of
6432 (darwin_complete_target): Delete, with ...
6433 (_initialize_i386_darwin_nat): ... bits factored out here.
6435 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6436 (the_alpha_linux_nat_target): New.
6437 (alpha_linux_register_u_offset): Refactor as
6438 alpha_linux_nat_target method.
6439 (_initialize_alpha_linux_nat): Adjust.
6440 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6441 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6442 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6443 methods of linux_nat_trad_target.
6444 (linux_trad_target): Delete.
6445 * linux-nat-trad.h (linux_trad_target): Delete function.
6446 (linux_nat_trad_target): New class.
6447 * mips-linux-nat.c (mips_linux_nat_target): New class.
6448 (super_fetch_registers, super_store_registers, super_close):
6450 (the_mips_linux_nat_target): New.
6451 (mips64_linux_regsets_fetch_registers)
6452 (mips64_linux_regsets_store_registers)
6453 (mips64_linux_fetch_registers, mips64_linux_store_registers)
6454 (mips_linux_register_u_offset, mips_linux_read_description)
6455 (mips_linux_can_use_hw_breakpoint)
6456 (mips_linux_stopped_by_watchpoint)
6457 (mips_linux_stopped_data_address)
6458 (mips_linux_region_ok_for_hw_watchpoint)
6459 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6460 (mips_linux_close): Refactor as methods of mips_linux_nat.
6461 (_initialize_mips_linux_nat): Adjust to C++ification.
6463 * aix-thread.c (aix_thread_target): New class.
6464 (aix_thread_ops): Now an aix_thread_target.
6465 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6466 (aix_thread_fetch_registers, aix_thread_store_registers)
6467 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6468 (aix_thread_thread_alive, aix_thread_pid_to_str)
6469 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6470 Refactor as methods of aix_thread_target.
6471 (init_aix_thread_ops): Delete.
6472 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6473 and complete_target_initialization.
6474 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6475 (rs6000_nat_target): New class.
6476 (the_rs6000_nat_target): New.
6477 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6478 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6479 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6480 (super_create_inferior): Delete.
6481 (_initialize_rs6000_nat): Adjust to C++ification.
6483 * arm-linux-nat.c (arm_linux_nat_target): New class.
6484 (the_arm_linux_nat_target): New.
6485 (arm_linux_fetch_inferior_registers)
6486 (arm_linux_store_inferior_registers, arm_linux_read_description)
6487 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6488 (arm_linux_remove_hw_breakpoint)
6489 (arm_linux_region_ok_for_hw_watchpoint)
6490 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6491 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6492 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6493 arm_linux_nat_target.
6494 (_initialize_arm_linux_nat): Adjust to C++ification.
6496 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6497 (the_aarch64_linux_nat_target): New.
6498 (aarch64_linux_fetch_inferior_registers)
6499 (aarch64_linux_store_inferior_registers)
6500 (aarch64_linux_child_post_startup_inferior)
6501 (aarch64_linux_read_description)
6502 (aarch64_linux_can_use_hw_breakpoint)
6503 (aarch64_linux_insert_hw_breakpoint)
6504 (aarch64_linux_remove_hw_breakpoint)
6505 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6506 (aarch64_linux_region_ok_for_hw_watchpoint)
6507 (aarch64_linux_stopped_data_address)
6508 (aarch64_linux_stopped_by_watchpoint)
6509 (aarch64_linux_watchpoint_addr_within_range)
6510 (aarch64_linux_can_do_single_step): Refactor as methods of
6511 aarch64_linux_nat_target.
6512 (super_post_startup_inferior): Delete.
6513 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6515 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6516 (the_hppa_linux_nat_target): New.
6517 (hppa_linux_fetch_inferior_registers)
6518 (hppa_linux_store_inferior_registers): Refactor as methods of
6519 hppa_linux_nat_target.
6520 (_initialize_hppa_linux_nat): Adjust to C++ification.
6522 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6523 (the_ia64_linux_nat_target): New.
6524 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6525 (ia64_linux_stopped_data_address)
6526 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6527 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6528 ia64_linux_nat_target methods.
6529 (super_xfer_partial): Delete.
6530 (_initialize_ia64_linux_nat): Adjust to C++ification.
6532 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6533 (the_m32r_linux_nat_target): New.
6534 (m32r_linux_fetch_inferior_registers)
6535 (m32r_linux_store_inferior_registers): Refactor as
6536 m32r_linux_nat_target methods.
6537 (_initialize_m32r_linux_nat): Adjust to C++ification.
6539 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6540 (the_m68k_linux_nat_target): New.
6541 (m68k_linux_fetch_inferior_registers)
6542 (m68k_linux_store_inferior_registers): Refactor as
6543 m68k_linux_nat_target methods.
6544 (_initialize_m68k_linux_nat): Adjust to C++ification.
6546 * s390-linux-nat.c (s390_linux_nat_target): New class.
6547 (the_s390_linux_nat_target): New.
6548 (s390_linux_fetch_inferior_registers)
6549 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6550 (s390_insert_watchpoint, s390_remove_watchpoint)
6551 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6552 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6553 (s390_auxv_parse, s390_read_description): Refactor as methods of
6554 s390_linux_nat_target.
6555 (_initialize_s390_nat): Adjust to C++ification.
6557 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6558 (the_sparc_linux_nat_target): New.
6559 (_initialize_sparc_linux_nat): Adjust to C++ification.
6560 * sparc-nat.c (sparc_fetch_inferior_registers)
6561 (sparc_store_inferior_registers): Remove target_ops parameter.
6562 * sparc-nat.h (sparc_fetch_inferior_registers)
6563 (sparc_store_inferior_registers): Remove target_ops parameter.
6564 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6565 (the_sparc64_linux_nat_target): New.
6566 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6568 * spu-linux-nat.c (spu_linux_nat_target): New class.
6569 (the_spu_linux_nat_target): New.
6570 (spu_child_post_startup_inferior, spu_child_post_attach)
6571 (spu_child_wait, spu_fetch_inferior_registers)
6572 (spu_store_inferior_registers, spu_xfer_partial)
6573 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6575 (_initialize_spu_nat): Adjust to C++ification.
6577 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6578 (the_tilegx_linux_nat_target): New.
6579 (fetch_inferior_registers, store_inferior_registers):
6580 Refactor as methods.
6581 (_initialize_tile_linux_nat): Adjust to C++ification.
6583 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6584 (the_xtensa_linux_nat_target): New.
6585 (xtensa_linux_fetch_inferior_registers)
6586 (xtensa_linux_store_inferior_registers): Refactor as
6587 xtensa_linux_nat_target methods.
6588 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6590 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6591 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6592 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6593 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6594 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6595 (fbsd_stopped_by_sw_breakpoint)
6596 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6597 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6598 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6599 (fbsd_post_startup_inferior, fbsd_post_attach)
6600 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6601 (fbsd_set_syscall_catchpoint)
6602 (super_xfer_partial, super_resume, super_wait)
6603 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6604 (fbsd_handle_debug_trap): Remove target_ops parameter.
6605 (fbsd_nat_add_target): Delete.
6606 * fbsd-nat.h: Include "inf-ptrace.h".
6607 (fbsd_nat_add_target): Delete.
6608 (USE_SIGTRAP_SIGINFO): Define.
6609 (fbsd_nat_target): New class.
6611 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6612 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6613 (amd64bsd_target): Delete.
6614 * amd64-bsd-nat.h: New file.
6615 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6617 (amd64_fbsd_nat_target): New class.
6618 (the_amd64_fbsd_nat_target): New.
6619 (amd64fbsd_read_description): Refactor as method of
6620 amd64_fbsd_nat_target.
6621 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6622 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6623 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6624 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6625 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6626 (i386bsd_target): Delete.
6627 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6628 (i386bsd_fetch_inferior_registers)
6629 (i386bsd_store_inferior_registers): Declare.
6630 (i386_bsd_nat_target): New class.
6631 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6632 (the_i386_fbsd_nat_target): New.
6633 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6634 i386_fbsd_nat_target methods.
6635 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6636 (_initialize_i386fbsd_nat): Adjust to C++ification.
6637 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6638 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6639 (_initialize_x86_bsd_nat): Adjust to C++ification.
6640 * x86-bsd-nat.h: Include "x86-nat.h".
6641 (x86bsd_target): Delete declaration.
6642 (x86bsd_nat_target): New class.
6644 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6645 (the_aarch64_fbsd_nat_target): New.
6646 (aarch64_fbsd_fetch_inferior_registers)
6647 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6648 aarch64_fbsd_nat_target.
6649 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6650 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6651 (the_alpha_bsd_nat_target): New.
6652 (alphabsd_fetch_inferior_registers)
6653 (alphabsd_store_inferior_registers): Refactor as
6654 alpha_bsd_nat_target methods.
6655 (_initialize_alphabsd_nat): Refactor as methods of
6656 alpha_bsd_nat_target.
6657 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6658 (the_amd64_nbsd_nat_target): New.
6659 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6660 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6661 (the_amd64_obsd_nat_target): New.
6662 (_initialize_amd64obsd_nat): Adjust to C++ification.
6663 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6664 (the_arm_fbsd_nat_target): New.
6665 (arm_fbsd_fetch_inferior_registers)
6666 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6667 (_initialize_arm_fbsd_nat): Refactor as methods of
6668 arm_fbsd_nat_target.
6669 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6670 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6671 (the_arm_netbsd_nat_target): New.
6672 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6673 arm_netbsd_nat_target.
6674 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6675 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6676 (the_hppa_nbsd_nat_target): New.
6677 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6678 hppa_nbsd_nat_target methods.
6679 (_initialize_hppanbsd_nat): Adjust to C++ification.
6680 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6681 (the_hppa_obsd_nat_target): New.
6682 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6683 methods of hppa_obsd_nat_target.
6684 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6686 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6687 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6689 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6690 (_initialize_i386obsd_nat): Use add_target.
6691 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6692 (the_m68k_bsd_nat_target): New.
6693 (m68kbsd_fetch_inferior_registers)
6694 (m68kbsd_store_inferior_registers): Refactor as methods of
6695 m68k_bsd_nat_target.
6696 (_initialize_m68kbsd_nat): Adjust to C++ification.
6697 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6698 (the_mips_fbsd_nat_target): New.
6699 (mips_fbsd_fetch_inferior_registers)
6700 (mips_fbsd_store_inferior_registers): Refactor as methods of
6701 mips_fbsd_nat_target.
6702 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6704 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6705 (the_mips_nbsd_nat_target): New.
6706 (mipsnbsd_fetch_inferior_registers)
6707 (mipsnbsd_store_inferior_registers): Refactor as methods of
6708 mips_nbsd_nat_target.
6709 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6710 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6711 (the_mips64_obsd_nat_target): New.
6712 (mips64obsd_fetch_inferior_registers)
6713 (mips64obsd_store_inferior_registers): Refactor as methods of
6714 mips64_obsd_nat_target.
6715 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6717 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6719 * nbsd-nat.h: Include "inf-ptrace.h".
6720 (nbsd_nat_target): New class.
6721 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6722 (obsd_wait): Refactor as methods of obsd_nat_target.
6723 (obsd_add_target): Delete.
6724 * obsd-nat.h: Include "inf-ptrace.h".
6725 (obsd_nat_target): New class.
6726 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6727 (the_ppc_fbsd_nat_target): New.
6728 (ppcfbsd_fetch_inferior_registers)
6729 (ppcfbsd_store_inferior_registers): Refactor as methods of
6730 ppc_fbsd_nat_target.
6731 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6733 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6734 (the_ppc_nbsd_nat_target): New.
6735 (ppcnbsd_fetch_inferior_registers)
6736 (ppcnbsd_store_inferior_registers): Refactor as methods of
6737 ppc_nbsd_nat_target.
6738 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6739 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6740 (the_ppc_obsd_nat_target): New.
6741 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6742 methods of ppc_obsd_nat_target.
6743 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6745 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6746 (the_sh_nbsd_nat_target): New.
6747 (shnbsd_fetch_inferior_registers)
6748 (shnbsd_store_inferior_registers): Refactor as methods of
6750 (_initialize_shnbsd_nat): Adjust to C++ification.
6751 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6752 (inf_ptrace_xfer_partial): Delete.
6753 (sparc_xfer_partial, sparc_target): Delete.
6754 * sparc-nat.h (sparc_fetch_inferior_registers)
6755 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6756 (sparc_target): Delete function declaration.
6757 (sparc_target): New template class.
6758 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6759 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6760 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6761 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6763 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6764 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6765 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6766 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6768 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6769 (the_vax_bsd_nat_target): New.
6770 (vaxbsd_fetch_inferior_registers)
6771 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6773 (_initialize_vaxbsd_nat): Adjust to C++ification.
6775 * bsd-kvm.c (bsd_kvm_target): New class.
6776 (bsd_kvm_ops): Now a bsd_kvm_target.
6777 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6778 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6779 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6781 (bsd_kvm_return_one): Delete.
6782 (bsd_kvm_add_target): Adjust to C++ification.
6784 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6785 (nto_procfs_target_procfs): New classes.
6786 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6787 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6788 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6789 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6790 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6791 (procfs_remove_hw_breakpoint, procfs_resume)
6792 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6793 (procfs_kill_inferior, procfs_store_registers)
6794 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6795 as methods of nto_procfs_target.
6796 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6797 (nto_native_ops): Delete.
6798 (procfs_open, procfs_native_open): Delete.
6799 (nto_native_ops): Now an nto_procfs_target_native.
6800 (init_procfs_targets): Adjust to C++ification.
6801 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6802 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6803 Refactor as methods of nto_procfs_target.
6805 * go32-nat.c (go32_nat_target): New class.
6806 (the_go32_nat_target): New.
6807 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6808 (go32_store_registers, go32_xfer_partial, go32_files_info)
6809 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6810 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6811 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6812 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6813 (go32_target): Delete.
6814 (_initialize_go32_nat): Adjust to C++ification.
6816 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6817 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6818 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6819 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6821 (gnu_target): Delete.
6822 * gnu-nat.h (gnu_target): Delete.
6823 (gnu_nat_target): New class.
6824 * i386-gnu-nat.c (gnu_base_target): New.
6825 (i386_gnu_nat_target): New class.
6826 (the_i386_gnu_nat_target): New.
6827 (_initialize_i386gnu_nat): Adjust to C++ification.
6829 2018-05-02 Pedro Alves <palves@redhat.com>
6831 * bfd-target.c (target_bfd_xclose): Rename to ...
6832 (target_bfd_close): ... this.
6833 (target_bfd_reopen): Adjust.
6834 * target.c (target_close): Remove references to to_xclose.
6835 * target.h (target_ops::to_xclose): Delete.
6836 (target_ops::to_close): Update comments.
6838 2018-05-02 Pedro Alves <palves@redhat.com>
6840 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6842 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6843 * inf-ptrace.c (inf_ptrace_register_u_offset)
6844 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6845 (inf_ptrace_store_register, inf_ptrace_store_registers)
6846 (inf_ptrace_trad_target): Move to ...
6847 * linux-nat-trad.c: ... this new file.
6848 * linux-nat-trad.h: New file.
6849 * linux-nat.c (linux_target_install_ops): Make extern.
6850 (linux_trad_target): Delete.
6851 * linux-nat.h (linux_trad_target): Delete declaration.
6852 (linux_target_install_ops): Declare.
6853 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6856 2018-05-02 Pedro Alves <palves@redhat.com>
6858 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6859 procfs_target/add_target here.
6860 * procfs.c (procfs_target): Make static.
6861 (_initialize_procfs): Call add_target here.
6862 * procfs.h (struct target_ops): Remove forward declaration.
6863 (procfs_target): Remove declaration.
6864 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6866 2018-05-02 Pedro Alves <palves@redhat.com>
6868 * procfs.c (procfs_stopped_by_watchpoint)
6869 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6870 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6872 (procfs_use_watchpoints): Delete, move contents...
6873 (procfs_target): ... here.
6874 * procfs.h (procfs_use_watchpoints): Delete declaration.
6875 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6876 procfs_use_watchpoints.
6877 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6878 procfs_use_watchpoints.
6880 2018-05-02 Tom Tromey <tom@tromey.com>
6883 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6884 and var_zuinteger_unlimited.
6885 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6886 and PARAM_ZUINTEGER_UNLIMITED.
6887 (set_parameter_value): Handle var_zuinteger and
6888 var_zuinteger_unlimited.
6889 (add_setshow_generic): Likewise.
6890 (parmpy_init): Likewise.
6892 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6895 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6896 pointer is not null before dereferencing it.
6898 2018-04-30 Tom Tromey <tom@tromey.com>
6900 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6903 2018-04-30 Tom Tromey <tom@tromey.com>
6905 * breakpoint.c (mention): Remove use of is_mi_like_p.
6906 (print_mention_ranged_breakpoint): Likewise.
6907 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6910 2018-04-30 Tom Tromey <tom@tromey.com>
6912 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6914 2018-04-30 Tom Tromey <tom@tromey.com>
6916 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6917 (info_spu_event_command): Remove some uses of is_mi_like_p.
6919 2018-04-30 Tom Tromey <tom@tromey.com>
6921 * python/py-framefilter.c (py_print_single_arg)
6922 (enumerate_locals, py_print_args, py_print_frame): Remove some
6923 uses of is_mi_like_p.
6925 2018-04-30 Tom Tromey <tom@tromey.com>
6928 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6929 * ui-out.h (ui_out::is_mi_like_p): Now const.
6930 (ui_out::do_is_mi_like_p): Now const.
6931 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6933 2018-04-30 Tom Tromey <tom@tromey.com>
6935 * varobj.c (varobj_set_visualizer): Use new_reference.
6936 * python/python.c (gdbpy_decode_line): Use new_reference.
6937 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6940 2018-04-30 Tom Tromey <tom@tromey.com>
6942 * varobj.c (install_new_value): Use new_reference.
6943 * value.h (value_incref): Return void. Swap intro comment with
6945 * value.c (set_value_parent): Use new_reference.
6946 (value_incref): Return void. Update intro comment.
6947 (release_value): Use new_reference.
6948 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6950 2018-04-30 Tom Tromey <tom@tromey.com>
6952 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6953 * gdb_bfd.h (new_bfd_ref): Remove.
6954 (gdb_bfd_open): Update comment.
6955 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6956 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6957 (gdb_bfd_fdopenr): Use new_reference.
6958 * exec.c (exec_file_attach): Use new_reference.
6960 2018-04-30 Tom Tromey <tom@tromey.com>
6962 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6965 2018-04-30 Tom Tromey <tom@tromey.com>
6967 * jit.c (jit_read_code_entry): Use type_align.
6968 * i386-tdep.c (i386_gdbarch_init): Don't call
6969 set_gdbarch_long_long_align_bit.
6970 * gdbarch.sh: Remove long_long_align_bit.
6971 * gdbarch.c, gdbarch.h: Rebuild.
6972 * arc-tdep.c (arc_type_align): New function.
6973 (arc_gdbarch_init): Use arc_type_align. Don't call
6974 set_gdbarch_long_long_align_bit.
6976 2018-04-30 Tom Tromey <tom@tromey.com>
6978 * rust-lang.c (rust_type_alignment): Remove.
6979 (rust_composite_type): Use type_align.
6981 2018-04-30 Tom Tromey <tom@tromey.com>
6983 * NEWS: Mention Type.align.
6984 * python/py-type.c (typy_get_alignof): New function.
6985 (type_object_getset): Add "alignof".
6987 2018-04-30 Tom Tromey <tom@tromey.com>
6991 * std-operator.def (UNOP_ALIGNOF): New operator.
6992 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6994 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6995 * c-lang.c (c_op_print_tab): Add alignof.
6996 * c-exp.y (ALIGNOF): New token.
6997 (exp): Add "ALIGNOF" production.
6998 (ident_tokens): Add _Alignof and alignof.
7000 2018-04-30 Tom Tromey <tom@tromey.com>
7002 * i386-tdep.c (i386_type_align): New function.
7003 (i386_gdbarch_init): Update.
7004 * gdbarch.sh (type_align): New method.
7005 * gdbarch.c, gdbarch.h: Rebuild.
7006 * arch-utils.h (default_type_align): Declare.
7007 * arch-utils.c (default_type_align): New function.
7008 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7009 (struct type) <align_log2>: New field.
7010 <instance_flags>: Now a bitfield.
7011 (TYPE_RAW_ALIGN): New macro.
7012 (type_align, type_raw_align, set_type_align): Declare.
7013 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7015 * dwarf2read.c (quirk_rust_enum): Set type alignment.
7016 (get_alignment, maybe_set_alignment): New functions.
7017 (read_structure_type, read_enumeration_type, read_array_type)
7018 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7019 (read_subrange_type, read_base_type): Set type alignment.
7021 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
7023 * dwarf2read.c (read_index_from_section): Use bool.
7025 2018-04-29 Fabian Groffen <grobian@gentoo.org>
7028 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7031 2018-04-29 John Reiser <jreiser@BitWagon.com>
7034 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7035 last step, and do it atomically.
7037 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
7039 * compile/compile-c-types.c (convert_int, convert_float):
7042 2018-04-27 Tom Tromey <tom@tromey.com>
7045 * rust-lang.c (rust_inclusive_range_type_p): New function.
7046 (rust_range): Handle inclusive ranges.
7047 (rust_compute_range): Likewise.
7048 * rust-exp.y (struct rust_op) <inclusive>: New field.
7049 (DOTDOTEQ): New constant.
7050 (range_expr): Add "..=" productions.
7051 (operator_tokens): Add "..=" token.
7052 (ast_range): Add "inclusive" parameter.
7053 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7055 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7057 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7058 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7060 * expprint.c (print_subexp_standard): Handle new bounds values.
7061 (dump_subexp_body_standard): Likewise.
7063 2018-04-27 Tom Tromey <tom@tromey.com>
7065 * configure: Rebuild.
7066 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7067 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7069 (class symbol_needs_eval_context): Likewise.
7070 * dwarf2read.c (mock_mapped_index::symbol_name_count)
7071 (mock_mapped_index::symbol_name_at): Use "override". Remove
7073 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7075 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7076 * aarch64-tdep.c (instruction_reader::read): Use "override".
7077 (instruction_reader_test::read): Likewise.
7078 * arm-tdep.c (instruction_reader::read): Use "override".
7079 (instruction_reader_thumb::read): Likewise.
7081 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
7084 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7085 instead of remote_send.
7086 (remote_send): Remove.
7088 2018-04-26 Pedro Alves <palves@redhat.com>
7090 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7091 find_function_start_sal instead of find_pc_line.
7093 2018-04-26 Pedro Alves <palves@redhat.com>
7095 * breakpoint.c (set_breakpoint_location_function): Handle
7097 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7098 * elfread.c (elf_symtab_read): Give data symbols with
7099 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7100 (elf_rel_plt_read): Update comment.
7101 * linespec.c (convert_linespec_to_sals): Handle
7103 (minsym_found): Handle mst_data_gnu_ifunc.
7104 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7105 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7106 * parse.c (find_minsym_type_and_address): Handle
7108 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7109 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7110 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7112 <mst_data_gnu_ifunc>: New enumerator.
7114 2018-04-26 Pedro Alves <palves@redhat.com>
7116 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7117 (lookup_minimal_symbol_by_pc_section): ... this. Replace
7118 'want_trampoline' parameter by a lookup_msym_prefer parameter.
7120 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7121 (lookup_minimal_symbol_by_pc): Adjust.
7122 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7123 (lookup_solib_trampoline_symbol_by_pc): Adjust.
7124 * minsyms.h (lookup_msym_prefer): New enum.
7125 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7126 parameter by a lookup_msym_prefer parameter.
7128 2018-04-26 Pedro Alves <palves@redhat.com>
7130 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7131 ends in "@plt" instead of looking at the symbol's section.
7133 2018-04-26 Pedro Alves <palves@redhat.com>
7135 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
7137 (find_pc_partial_function_gnu_ifunc): Rename to ...
7138 (find_pc_partial_function): ... this, and remove references to
7140 (find_pc_partial_function): Delete old implementation.
7141 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7143 2018-04-26 Pedro Alves <palves@redhat.com>
7145 * linespec.c (struct bound_minimal_symbol_search_key): New.
7146 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
7147 skip first line if we found a GNU ifunc minimal symbol by name.
7148 (compare_msymbols): Change parameters to work with a destructured
7150 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7153 2018-04-26 Pedro Alves <palves@redhat.com>
7155 * breakpoint.c (set_breakpoint_location_function): Don't resolve
7156 ifunc targets here. Instead, if we have an ifunc minsym, use its
7158 (add_location_to_breakpoint): Store the minsym and the objfile in
7159 the breakpoint location.
7160 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7161 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7162 Record the minsym in the sal.
7163 * symtab.h (symtab_and_line) <msymbol>: New field.
7165 2018-04-26 Pedro Alves <palves@redhat.com>
7167 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7168 unless we actually resolved the ifunc.
7170 2018-04-26 Pedro Alves <palves@redhat.com>
7172 * c-exp.y (variable production): Prefer ifunc minsyms over
7173 regular function symbols.
7174 * symtab.c (find_gnu_ifunc): New function.
7175 * minsyms.h (lookup_msym_prefer): New enum.
7176 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7177 parameter by a lookup_msym_prefer parameter.
7178 * symtab.h (find_gnu_ifunc): New declaration.
7180 2018-04-26 Pedro Alves <palves@redhat.com>
7182 * blockframe.c (find_gnu_ifunc_target_type): New function.
7183 (find_function_type): New.
7184 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7185 return a value with a memory address.
7186 (eval_call): For calls to GNU ifunc functions, try to find the
7187 type of the target function from the type that the resolver
7189 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7191 * infcall.c (find_function_return_type): Delete.
7192 (find_function_addr): Add 'function_type' parameter. For calls to
7193 GNU ifunc functions, try to find the type of the target function
7194 from the type that the resolver returns, and return it via
7196 (call_function_by_hand_dummy): Adjust to use the function type
7197 returned by find_function_addr.
7198 (find_function_addr): Add 'function_type' parameter and move
7200 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7203 2018-04-26 Pedro Alves <palves@redhat.com>
7205 * c-exp.y (variable production): Skip finding an alias for ifunc
7208 2018-04-26 Pedro Alves <palves@redhat.com>
7210 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7212 2018-04-25 Pedro Alves <palves@redhat.com>
7214 * infcmd.c (kill_command): Print the pid as string, not the whole
7215 thread's ptid. Add comment. s/has been killed/killed/ in output
7217 * remote.c (remote_detach_1): Print the pid as string, not the
7218 whole thread's ptid.
7220 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7221 Sergio Durigan Junior <sergiodj@redhat.com>
7222 Pedro Alves <palves@redhat.com>
7224 * infcmd.c (kill_command): Print message when inferior has
7226 * inferior.c (print_inferior_events): Remove 'static'. Set as
7228 (add_inferior): Improve message printed when
7229 'print_inferior_events' is on.
7230 (exit_inferior): Remove message printed when
7231 'print_inferior_events' is on.
7232 (detach_inferior): Improve message printed when
7233 'print_inferior_events' is on.
7234 (initialize_inferiors): Use 'add_inferior_silent' to set
7235 'current_inferior_'.
7236 * inferior.h (print_inferior_events): Declare here as
7238 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7239 '[Detaching...]' messages when 'print_inferior_events' is on.
7240 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
7241 as prefix/suffix for messages. Remove periods. Fix erroneous
7242 'Detaching after fork from child...', replace it by '... from
7244 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7245 prefix/suffix when printing 'Detaching...' messages. Print
7246 them when 'print_inferior_events' is on.
7247 * remote.c (remote_detach_1): Print message when detaching
7248 from inferior and '!is_fork_parent'.
7250 2018-04-24 Tom Tromey <tom@tromey.com>
7252 * cli-out.h: Reindent.
7254 2018-04-24 Tom Tromey <tom@tromey.com>
7256 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
7257 (cli_ui_out::do_field_string): Use fputs_filtered.
7258 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
7260 2018-04-23 Tom Tromey <tom@tromey.com>
7262 * guile/scm-frame.c (gdbscm_frame_read_var): Use
7263 gdb::unique_xmalloc_ptr.
7265 2018-04-23 Tom Tromey <tom@tromey.com>
7267 * configure: Rebuild.
7269 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
7272 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
7273 prepare_for_testing. Set normal_bp to r_debug_state if target
7276 2018-04-21 Pedro Alves <palves@redhat.com>
7277 Rajendra SY <rajendra.sy@gmail.com>
7279 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
7280 * remote.c (extended_remote_attach): In all-stop mode, mark the
7281 thread as executing.
7283 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7285 * thread.c (thread_apply_all_command): Fix comment.
7286 (thread_command): Fix comment.
7288 2018-04-10 Alan Hayward <alan.hayward@arm.com>
7290 * common/tdesc.h (tdesc_create_feature): Remove xml filename
7292 * features/aarch64-core.c (create_feature_aarch64_core):
7294 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7296 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7298 * features/i386/32bit-avx512.c
7299 (create_feature_i386_32bit_avx512): Likewise.
7300 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7302 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7304 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7306 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7308 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7310 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7312 * features/i386/64bit-avx512.c
7313 (create_feature_i386_64bit_avx512): Likewise.
7314 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7316 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7318 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7320 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7322 * features/i386/64bit-segments.c
7323 (create_feature_i386_64bit_segments): Likewise.
7324 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7326 * features/i386/x32-core.c
7327 (create_feature_i386_x32_core): Likewise.
7328 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7329 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7330 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7331 * target-descriptions.c: In generated code, don't pass xml
7334 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7336 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7337 (print_xml_feature::visit_post): Likewise.
7338 (print_xml_feature::visit): Likewise.
7339 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7340 (print_xml_feature): Add new class.
7341 * regformats/regdat.sh: Null xmltarget on feature targets.
7342 * target-descriptions.c (struct target_desc): Add xmltarget.
7343 (maintenance_check_tdesc_xml_convert): Add unittest function.
7344 (tdesc_get_features_xml): Add function to get xml.
7345 (maintenance_check_xml_descriptions): Test xml generation.
7346 * xml-tdesc.c (string_read_description_xml): Add function.
7347 * xml-tdesc.h (string_read_description_xml): Add declaration.
7349 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7351 * features/Makefile: Add feature marker to targets with new style
7352 target descriptions.
7353 * regformats/aarch64.dat: Regenerate.
7354 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7355 * regformats/i386/amd64-avx-linux.dat: Likewise.
7356 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7357 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7358 * regformats/i386/amd64-linux.dat: Likewise.
7359 * regformats/i386/amd64-mpx-linux.dat: Likewise.
7360 * regformats/i386/amd64.dat: Likewise.
7361 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7362 * regformats/i386/i386-avx-linux.dat: Likewise.
7363 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7364 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7365 * regformats/i386/i386-linux.dat: Likewise.
7366 * regformats/i386/i386-mmx-linux.dat: Likewise.
7367 * regformats/i386/i386-mpx-linux.dat: Likewise.
7368 * regformats/i386/i386.dat: Likewise.
7369 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7370 * regformats/i386/x32-avx-linux.dat: Likewise.
7371 * regformats/i386/x32-linux.dat: Likewise.
7372 * regformats/tic6x-c62x-linux.dat: Likewise.
7373 * regformats/tic6x-c64x-linux.dat: Likewise.
7374 * regformats/tic6x-c64xp-linux.dat: Likewise.
7375 * regformats/regdat.sh: Parse feature marker.
7377 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7379 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7380 (tdesc_osabi_name): Likewise.
7381 * target-descriptions.c (tdesc_architecture_name): Add new
7383 (tdesc_osabi_name): Likewise.
7385 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7387 * common/tdesc.c (tdesc_predefined_type): Move to here.
7388 (tdesc_named_type): Likewise.
7389 (tdesc_create_vector): Likewise.
7390 (tdesc_create_struct): Likewise.
7391 (tdesc_set_struct_size): Likewise.
7392 (tdesc_create_union): Likewise.
7393 (tdesc_create_flags): Likewise.
7394 (tdesc_create_enum): Likewise.
7395 (tdesc_add_field): Likewise.
7396 (tdesc_add_typed_bitfield): Likewise.
7397 (tdesc_add_bitfield): Likewise.
7398 (tdesc_add_flag): Likewise.
7399 (tdesc_add_enum_value): Likewise.
7400 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7401 (struct tdesc_type_vector): Likewise.
7402 (struct tdesc_type_field): Likewise.
7403 (struct tdesc_type_with_fields): Likewise.
7404 (tdesc_create_enum): Add declaration.
7405 (tdesc_add_typed_bitfield): Likewise.
7406 (tdesc_add_enum_value): Likewise.
7407 * target-descriptions.c (tdesc_type_field): Move from here.
7408 (tdesc_type_builtin): Likewise.
7409 (tdesc_type_vector): Likewise.
7410 (tdesc_type_with_fields): Likewise.
7411 (tdesc_predefined_types): Likewise.
7412 (tdesc_named_type): Likewise.
7413 (tdesc_create_vector): Likewise.
7414 (tdesc_create_struct): Likewise.
7415 (tdesc_set_struct_size): Likewise.
7416 (tdesc_create_union): Likewise.
7417 (tdesc_create_flags): Likewise.
7418 (tdesc_create_enum): Likewise.
7419 (tdesc_add_field): Likewise.
7420 (tdesc_add_typed_bitfield): Likewise.
7421 (tdesc_add_bitfield): Likewise.
7422 (tdesc_add_flag): Likewise.
7423 (tdesc_add_enum_value): Likewise.
7424 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7425 (tdesc_add_typed_bitfield): Likewise.
7426 (tdesc_add_enum_value): Likewise.
7428 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7430 * common/tdesc.c (tdesc_feature::accept): Move to here.
7431 (tdesc_feature::operator==): Likewise.
7432 (tdesc_create_reg): Likewise.
7433 * common/tdesc.h (tdesc_type_kind): Likewise.
7434 (struct tdesc_type): Likewise.
7435 (struct tdesc_feature): Likewise.
7436 * regformats/regdat.sh: Create a feature.
7437 * target-descriptions.c (tdesc_type_kind): Move from here.
7438 (tdesc_type): Likewise.
7439 (tdesc_type_up): Likewise.
7440 (tdesc_feature): Likewise.
7441 (tdesc_create_reg): Likewise.
7443 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7445 * Makefile.in: Add arch/tdesc.c
7446 * common/tdesc.c: New file.
7447 * common/tdesc.h (tdesc_element_visitor): Move to here.
7448 (tdesc_element): Likewise.
7449 (tdesc_reg): Likewise.
7450 (tdesc_reg_up): Likewise.
7451 * regformats/regdef.h (reg): Add offset to constructors.
7452 * target-descriptions.c (tdesc_element_visitor): Move from here.
7453 (tdesc_element): Likewise.
7454 (tdesc_reg): Likewise.
7455 (tdesc_reg_up): Likewise.
7457 2018-04-17 Tom Tromey <tom@tromey.com>
7459 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7462 2018-04-17 Tom Tromey <tom@tromey.com>
7464 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7466 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
7468 * symtab.c (print_symbol_info): Skip printing filename and line
7469 number when `last' is NULL.
7470 (symtab_symbol_info): Use empty string instead of NULL for first
7471 invocation of print_symbol_info.
7472 (rbreak_command): Pass NULL to `last' parameter of
7475 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
7477 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7480 2018-04-16 Pedro Alves <palves@redhat.com>
7482 * MAINTAINERS (sh): Remove.
7483 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7484 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7485 (ALLDEPFILES): Remove sh64-tdep.c.
7486 * NEWS: Mentions that support for SH-5/SH64 is removed.
7487 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7488 (sh*-*-openbsd*): Ditto.
7489 (sh64-*-elf*): Remove.
7491 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7492 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7493 * sh-tdep.c: No longer include "sh64-tdep.h".
7494 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7495 * sh64-tdep.c, sh64-tdep.h: Remove files.
7497 2018-04-16 Pedro Alves <palves@redhat.com>
7499 * MAINTAINERS: Remove m88k.
7500 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7501 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7502 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7503 * NEWS: Mention that support for m88k was removed.
7504 * configure.host (m88*-*-*): Remove support.
7505 * configure.nat (m88k-*-*): Remove support.
7506 * configure.tgt (m88*-*-openbsd*): Remove.
7507 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7509 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7511 * configure.tgt (x86_tobjs): New variable.
7512 (amd64_tobjs, i386_tobjs): Use it.
7514 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7516 * symtab.c (print_symbol_info): Precede the symbol definition by
7517 the line number when available.
7518 * NEWS: Advertise this enhancement.
7520 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7522 * NEWS (New options): announce set/show record btrace cpu.
7523 * btrace.c: Include record-btrace.h.
7524 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7525 the vendor is unknown.
7526 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7527 Maybe overwrite the btrace configuration's cpu.
7528 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7529 (btrace_fetch): Add cpu parameter. Update callers.
7530 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7531 Maybe overwrite the btrace configuration's cpu. Skip enabling
7532 errata workarounds if the vendor is unknown.
7533 * python/py-record-btrace.c: Include record-btrace.h.
7534 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7535 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7536 * record-btrace.c (record_btrace_cpu_state_kind): New.
7537 (record_btrace_cpu): New.
7538 (set_record_btrace_cpu_cmdlist): New.
7539 (record_btrace_get_cpu): New.
7540 (require_btrace_thread, record_btrace_info)
7541 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7542 (cmd_set_record_btrace_cpu_none): New.
7543 (cmd_set_record_btrace_cpu_auto): New.
7544 (cmd_set_record_btrace_cpu): New.
7545 (cmd_show_record_btrace_cpu): New.
7546 (_initialize_record_btrace): Initialize set/show record btrace cpu
7548 * record-btrace.h (record_btrace_get_cpu): New.
7550 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7552 * record.c (set_record_command): Fix typo in message.
7554 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7556 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7558 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7560 * infrun.c (process_event_stop_test): Call
7561 gdbarch_in_indirect_branch_thunk.
7562 * gdbarch.sh (in_indirect_branch_thunk): New.
7563 * gdbarch.c: Regenerated.
7564 * gdbarch.h: Regenerated.
7567 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7568 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7569 (ALLDEPFILES): Add x86-tdep.c.
7570 * arch-utils.h (default_in_indirect_branch_thunk): New.
7571 * arch-utils.c (default_in_indirect_branch_thunk): New.
7572 * i386-tdep: Include x86-tdep.h.
7573 (i386_in_indirect_branch_thunk): New.
7574 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7576 * amd64-tdep: Include x86-tdep.h.
7577 (amd64_in_indirect_branch_thunk): New.
7578 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7580 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7583 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7584 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7585 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7588 2018-04-12 Tom Tromey <tom@tromey.com>
7590 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7591 (rust_evaluate_subexp): Likewise.
7593 2018-04-12 Pedro Alves <palves@redhat.com>
7595 * procfs.c (procfs_detach): Make forward declaration's prototype
7596 match definition's protototype.
7597 (proc_get_LDT_entry): Remove stale do_cleanups call.
7599 2018-04-12 Pedro Alves <palves@redhat.com>
7601 * target.h (target_ops::to_has_exited): Delete.
7602 (target_has_exited): Delete.
7603 * target-delegates.c: Regenerate.
7605 2018-04-11 Pedro Alves <palves@redhat.com>
7607 * target.c (fileio_fh_t::t): Add comment.
7608 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7609 (target_fileio_close): Handle a NULL target.
7610 (invalidate_fileio_fh): New.
7611 (target_close): Call it.
7612 * remote.c (remote_hostio_send_command): No longer check whether
7613 remote_desc is open.
7615 2018-04-11 Pedro Alves <palves@redhat.com>
7617 * target.c (fileio_fh_t): Make it a named struct instead of a
7619 (fileio_fh_t::is_closed): New method.
7620 (DEF_VEC_O (fileio_fh_t)): Remove.
7621 (fileio_fhandles): Now a std::vector.
7622 (is_closed_fileio_fh): Delete.
7623 (acquire_fileio_fd): Adjust. Rename parameters.
7624 (release_fileio_fd): Adjust.
7625 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7626 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7627 (target_fileio_close): Adjust.
7629 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7631 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7634 2018-04-10 Pedro Alves <palves@redhat.com>
7636 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7637 (scoped_finish_thread_state): New class.
7638 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7640 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7641 (fetch_inferior_event, normal_stop): Likewise.
7642 * thread.c (finish_thread_state_cleanup): Delete.
7644 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7645 Pedro Alves <palves@redhat.com>
7647 * value.c: Include "selftest.h" and "common/array-view.h".
7648 (struct range) <operator ==>: New.
7649 (test_ranges_contain): New.
7650 (check_ranges_vector): New.
7651 (test_insert_into_bit_range_vector): New.
7652 (_initialize_values): Register selftests.
7653 * common/array-view.h (operator==, operator!=): New.
7655 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7657 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7659 * inline-frame.c: Include <algorithm>.
7660 (struct inline_state): Add constructor.
7661 (inline_state_s): Remove.
7662 (DEF_VEC_O(inline_state_s)): Remove.
7663 (inline_states): Change type to std::vector.
7664 (find_inline_frame_state): Adjust to std::vector.
7665 (allocate_inline_frame_state): Remove.
7666 (clear_inline_frame_state): Adjust to std::vector.
7667 (skip_inline_frames): Adjust to std::vector.
7669 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7671 * tracepoint.h (struct trace_state_variable): Add constructor.
7672 <name>: Change type to std::string.
7673 * tracepoint.c (tsv_s): Remove.
7674 (DEF_VEC_O(tsv_s)): Remove.
7675 (tvariables): Change to std::vector.
7676 (create_trace_state_variable): Adjust to std::vector.
7677 (find_trace_state_variable): Likewise.
7678 (find_trace_state_variable_by_number): Likewise.
7679 (delete_trace_state_variable): Likewise.
7680 (trace_variable_command): Adjust to std::string.
7681 (delete_trace_variable_command): Likewise.
7682 (tvariables_info_1): Adjust to std::vector.
7683 (save_trace_state_variables): Likewise.
7684 (start_tracing): Likewise.
7685 (merge_uploaded_trace_state_variables): Adjust to std::vector
7687 * target.h (struct target_ops)
7688 <to_download_trace_state_variable>: Pass reference to
7689 trace_state_variable.
7690 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7691 * target-delegates.c: Re-generate.
7692 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7693 (mi_tsv_deleted): Likewise.
7694 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7695 * remote.c (remote_download_trace_state_variable): Change
7696 pointer to reference and adjust.
7697 * make-target-delegates (parse_argtypes): Handle references.
7698 (write_function_header): Likewise.
7699 (munge_type): Likewise.
7701 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7703 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7704 string_view-selftests.c.
7705 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7707 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7708 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7709 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7710 * unittests/basic_string_view/element_access/char/1.cc:
7712 * unittests/basic_string_view/element_access/char/empty.cc:
7714 * unittests/basic_string_view/element_access/char/front_back.cc:
7716 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7717 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7719 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7721 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7723 * unittests/basic_string_view/operations/compare/char/1.cc:
7725 * unittests/basic_string_view/operations/compare/char/13650.cc:
7727 * unittests/basic_string_view/operations/copy/char/1.cc:
7729 * unittests/basic_string_view/operations/data/char/1.cc:
7731 * unittests/basic_string_view/operations/find/char/1.cc:
7733 * unittests/basic_string_view/operations/find/char/2.cc:
7735 * unittests/basic_string_view/operations/find/char/3.cc:
7737 * unittests/basic_string_view/operations/find/char/4.cc:
7739 * unittests/basic_string_view/operations/rfind/char/1.cc:
7741 * unittests/basic_string_view/operations/rfind/char/2.cc:
7743 * unittests/basic_string_view/operations/rfind/char/3.cc:
7745 * unittests/basic_string_view/operations/substr/char/1.cc:
7747 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7748 * unittests/string_view-selftests.c: New file.
7750 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7752 * unittests/basic_string_view/capacity/1.cc: New file.
7753 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7754 * unittests/basic_string_view/cons/char/1.cc: New file.
7755 * unittests/basic_string_view/cons/char/2.cc: New file.
7756 * unittests/basic_string_view/cons/char/3.cc: New file.
7757 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7758 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7759 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7760 * unittests/basic_string_view/element_access/char/1.cc: New file.
7761 * unittests/basic_string_view/element_access/char/2.cc: New file.
7762 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7763 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7764 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7765 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7766 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7767 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7768 * unittests/basic_string_view/include.cc: New file.
7769 * unittests/basic_string_view/inserters/char/1.cc: New file.
7770 * unittests/basic_string_view/inserters/char/2.cc: New file.
7771 * unittests/basic_string_view/inserters/char/3.cc: New file.
7772 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7773 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7774 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7775 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7776 * unittests/basic_string_view/literals/types.cc: New file.
7777 * unittests/basic_string_view/literals/values.cc: New file.
7778 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7779 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7780 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7781 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7782 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7783 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7784 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7785 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7786 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7787 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7788 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7789 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7790 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7791 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7792 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7793 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7794 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7795 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7796 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7797 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7798 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7799 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7800 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7801 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7802 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7803 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7804 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7805 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7806 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7807 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7808 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7809 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7810 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7811 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7812 * unittests/basic_string_view/operators/char/2.cc: New file.
7813 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7814 * unittests/basic_string_view/range_access/char/1.cc: New file.
7815 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7816 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7817 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7818 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7819 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7820 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7821 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7822 * unittests/basic_string_view/typedefs.cc: New file.
7823 * unittests/basic_string_view/types/1.cc: New file.
7825 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7827 * common/gdb_string_view.h: Remove libstdc++ implementation
7828 details, adjust to gdb reality.
7829 * common/gdb_string_view.tcc: Likewise.
7830 * cli/cli-script.c (struct string_view): Remove.
7831 (user_args) <m_args>: Change element type to gdb::string_view.
7832 (user_args::insert_args): Adjust.
7834 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7836 * common/gdb_string_view.h: New file.
7837 * common/gdb_string_view.tcc: New file.
7839 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7841 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7842 * configure: Re-generate.
7844 2018-04-09 Pedro Alves <palves@redhat.com>
7846 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7847 (set_target_gdbarch): Call
7848 gdb::observers::architecture_changed.notify instead of
7849 observer_notify_architecture_changed.
7851 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7853 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7854 (do_restore_current_traceframe_cleanup): Remove.
7855 (restore_current_traceframe_cleanup_dtor): Remove.
7856 (make_cleanup_restore_current_traceframe): Remove.
7857 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7859 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7860 * infrun.c (fetch_inferior_event): Use
7861 scoped_restore_current_traceframe.
7863 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7865 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7867 <n_allocated_type_units>: Remove.
7868 <all_type_units>: Change to std::vector.
7869 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7870 to std::vector change.
7871 (dwarf2_per_objfile::get_cutu): Likewise.
7872 (dwarf2_per_objfile::get_tu): Likewise.
7873 (create_signatured_type_table_from_index): Likewise.
7874 (create_signatured_type_table_from_debug_names): Likewise.
7875 (dw2_symtab_iter_next): Likewise.
7876 (dw2_print_stats): Likewise.
7877 (dw2_expand_all_symtabs): Likewise.
7878 (dw2_expand_marked_cus): Likewise.
7879 (dw2_debug_names_iterator::next): Likewise.
7880 (dwarf2_initialize_objfile): Likewise.
7881 (add_signatured_type_cu_to_table): Likewise.
7882 (create_all_type_units): Likewise.
7883 (add_type_unit): Likewise.
7884 (struct tu_abbrev_offset): Add constructor.
7885 (build_type_psymtabs_1): Adjust to std::vector change.
7886 (print_tu_stats): Likewise.
7887 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7888 (write_debug_names): Likewise.
7890 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7892 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7893 Make an std::vector.
7894 <n_comp_units>: Remove.
7895 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7896 to std::vector change.
7897 (dwarf2_per_objfile::get_cutu): Likewise.
7898 (dwarf2_per_objfile::get_cu): Likewise.
7899 (create_cus_from_index): Likewise.
7900 (create_addrmap_from_index): Likewise.
7901 (create_addrmap_from_aranges): Likewise.
7902 (dwarf2_read_index): Likewise.
7903 (dw2_find_last_source_symtab): Likewise.
7904 (dw2_map_symtabs_matching_filename): Likewise.
7905 (dw2_symtab_iter_next): Likewise.
7906 (dw2_print_stats): Likewise.
7907 (dw2_expand_all_symtabs): Likewise.
7908 (dw2_expand_symtabs_with_fullname): Likewise.
7909 (dw2_expand_marked_cus): Likewise.
7910 (dw2_map_symbol_filenames): Likewise.
7911 (create_cus_from_debug_names): Likewise.
7912 (dwarf2_read_debug_names): Likewise.
7913 (dw2_debug_names_iterator::next): Likewise.
7914 (dwarf2_initialize_objfile): Likewise.
7915 (set_partial_user): Likewise.
7916 (dwarf2_build_psymtabs_hard): Likewise.
7917 (read_comp_units_from_section): Remove arguments, adjust to
7919 (create_all_comp_units): Adjust to std::vector and
7920 read_comp_units_from_section changes.
7921 (dwarf2_find_containing_comp_unit): Adjust to std::vector
7923 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7924 (psyms_seen_size): Likewise.
7925 (write_gdbindex): Likewise.
7926 (write_debug_names): Likewise.
7928 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7930 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7931 with dwarf2_per_objfile.
7932 (create_cus_from_index): Likewise.
7933 (create_signatured_type_table_from_index): Likewise.
7934 (dwarf2_read_index): Likewise.
7935 (dwarf2_initialize_objfile): Likewise.
7936 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
7937 per_cu rather than get_dwarf2_per_objfile.
7939 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7941 * dwarf2read.h (struct signatured_type): Forward declare.
7942 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7944 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7945 (dw2_get_cutu): ...this.
7946 (dwarf2_per_objfile::get_cu): Rename from...
7947 (dw2_get_cu): ...this.
7948 (dwarf2_per_objfile::get_tu): New.
7949 (create_addrmap_from_index): Adjust.
7950 (create_addrmap_from_aranges): Adjust.
7951 (dw2_find_last_source_symtab): Adjust.
7952 (dw2_map_symtabs_matching_filename): Adjust.
7953 (dw2_symtab_iter_next): Adjust.
7954 (dw2_print_stats): Adjust.
7955 (dw2_expand_all_symtabs): Adjust.
7956 (dw2_expand_symtabs_with_fullname): Adjust.
7957 (dw2_expand_marked_cus): Adjust.
7958 (dw_expand_symtabs_matching_file_matcher): Adjust.
7959 (dw2_map_symbol_filenames): Adjust.
7960 (dw2_debug_names_iterator::next): Adjust.
7961 (dwarf2_initialize_objfile): Adjust.
7962 (set_partial_user): Adjust.
7963 (dwarf2_build_psymtabs_hard): Adjust.
7965 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7967 * dwarf2read.c (create_signatured_type_table_from_debug_names):
7968 Remove unused variables.
7969 (dw2_map_symtabs_matching_filename): Likewise.
7970 (dwarf2_record_block_ranges): Likewise.
7971 (dwarf2_read_addr_index): Likewise.
7972 (follow_die_offset): Likewise.
7974 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7976 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7977 to symbol_file_add_main.
7979 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7982 * mi/mi-console.c (do_fputc_async_safe): New.
7983 (mi_console_file::write_async_safe): New.
7984 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7985 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7987 * ui-file.c (ui_file::putstrn): Adjust call to
7988 fputstrn_unfiltered.
7989 * utils.c (printchar): Replace do_fputs and do_fprintf
7990 parameters by do_fputc.
7991 (fputstr_filtered): Adjust call to printchar.
7992 (fputstr_unfiltered): Likewise.
7993 (fputstrn_filtered): Likewise.
7994 (fputstrn_unfiltered): Add do_fputc parameter, pass to
7996 * utils.h (do_fputc_ftype): New typedef.
7997 (fputstrn_unfiltered): Add do_fputc parameter.
7999 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8001 * regformats/i386/i386-avx.dat: Remove.
8003 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8006 * amd64-tdep.c (amd64_none_init_abi): New function.
8007 (amd64_x32_none_init_abi): New function.
8008 (_initialize_amd64_tdep): Register handlers for x86-64 and
8009 x64_32 with GDB_OSABI_NONE.
8010 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8011 GDB_OSABI_NONE osabi.
8013 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8016 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8018 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8019 * osabi.c (gdb_osabi_names): Add "unknown" entry.
8021 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8023 * common/byte-vector.h (char_vector): New type.
8024 * target.h (target_read_alloc): Return
8025 gdb::optional<byte_vector>.
8026 (target_read_stralloc): Return gdb::optional<char_vector>.
8027 (target_get_osdata): Return gdb::optional<char_vector>.
8028 * target.c (target_read_alloc_1): Templatize. Replacement
8029 manual memory management with vector.
8030 (target_read_alloc): Change return type, adjust.
8031 (target_read_stralloc): Change return type, adjust.
8032 (target_get_osdata): Change return type, adjust.
8033 * auxv.c (struct auxv_info) <length>: Remove.
8034 <data>: Change type to gdb::optional<byte_vector>.
8035 (auxv_inferior_data_cleanup): Free auxv_info with delete.
8036 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8037 (target_auxv_search): Adjust.
8038 (fprint_target_auxv): Adjust.
8039 * avr-tdep.c (avr_io_reg_read_command): Adjust.
8040 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8041 (linux_make_corefile_notes): Adjust.
8042 * osdata.c (get_osdata): Adjust.
8043 * remote.c (remote_get_threads_with_qxfer): Adjust.
8044 (remote_memory_map): Adjust.
8045 (remote_traceframe_info): Adjust.
8046 (btrace_read_config): Adjust.
8047 (remote_read_btrace): Adjust.
8048 (remote_pid_to_exec_file): Adjust.
8049 * solib-aix.c (solib_aix_get_library_list): Adjust.
8050 * solib-dsbt.c (decode_loadmap): Don't free buf.
8051 (dsbt_get_initial_loadmaps): Adjust.
8052 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8053 * solib-target.c (solib_target_current_sos): Adjust.
8054 * tracepoint.c (sdata_make_value): Adjust.
8055 * xml-support.c (xinclude_start_include): Adjust.
8056 (xml_fetch_content_from_file): Adjust.
8057 * xml-support.h (xml_fetch_another): Change return type.
8058 (xml_fetch_content_from_file): Change return type.
8059 * xml-syscall.c (xml_init_syscalls_info): Adjust.
8060 * xml-tdesc.c (file_read_description_xml): Adjust.
8061 (fetch_available_features_from_target): Change return type.
8062 (target_fetch_description_xml): Adjust.
8063 (target_read_description_xml): Adjust.
8065 2018-04-06 Tom Tromey <tom@tromey.com>
8067 * value.c (~value): Update.
8068 (struct value) <contents>: Now unique_xmalloc_ptr.
8069 (value_contents_bits_eq, allocate_value_contents)
8070 (value_contents_raw, value_contents_all_raw)
8071 (value_contents_for_printing, value_contents_for_printing_const)
8072 (set_value_enclosing_type): Update.
8074 2018-04-06 Tom Tromey <tom@tromey.com>
8076 * value.c (range_s): Remove typedef, VEC.
8077 (struct range): Add operator<.
8078 (range_lessthan): Remove.
8079 (ranges_contain): Change type.
8081 (struct value) <unavailable, optimized_out>: Now std::vector.
8082 (value_entirely_available)
8083 (value_entirely_covered_by_range_vector)
8084 (value_entirely_unavailable, value_entirely_optimized_out):
8086 (insert_into_bit_range_vector): Change argument type.
8087 (find_first_range_overlap): Likewise.
8088 (struct ranges_and_idx, value_contents_bits_eq)
8089 (require_not_optimized_out, require_available): Update.
8090 (ranges_copy_adjusted): Change argument types.
8091 (value_optimized_out, value_copy, value_fetch_lazy): Update.
8093 2018-04-06 Tom Tromey <tom@tromey.com>
8095 * value.c (~value): Update.
8096 (struct value) <parent>: Now a value_ref_ptr.
8097 (value_parent, set_value_parent, value_address, value_copy):
8100 2018-04-06 Tom Tromey <tom@tromey.com>
8102 * value.c (struct value): Add constructor, destructor, and member
8104 (allocate_value_lazy, value_decref): Update.
8106 2018-04-06 Tom Tromey <tom@tromey.com>
8108 * value.c (struct value) <released, next>: Remove.
8109 (all_values): Now a std::vector.
8110 (allocate_value_lazy): Update.
8111 (value_next): Remove.
8112 (value_mark, value_free_to_mark, release_value)
8113 (value_release_to_mark): Update.
8115 2018-04-06 Tom Tromey <tom@tromey.com>
8117 * value.h (fetch_subexp_value, value_release_to_mark): Update.
8118 (free_value_chain): Remove.
8119 * value.c (free_value_chain): Remove.
8120 (value_release_to_mark): Return a std::vector.
8121 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8123 (check_condition): Update.
8124 * eval.c (fetch_subexp_value): Change "val_chain" to a
8126 * breakpoint.c (update_watchpoint): Update.
8127 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8129 2018-04-06 Tom Tromey <tom@tromey.com>
8131 * value.h (free_all_values): Remove.
8132 * value.c (free_all_values): Remove.
8134 2018-04-06 Tom Tromey <tom@tromey.com>
8136 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8137 (value_history_chain, value_history_count): Remove.
8138 (value_history): New global.
8139 (record_latest_value, access_value_history, show_values)
8140 (preserve_values): Update.
8142 2018-04-06 Tom Tromey <tom@tromey.com>
8144 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8145 * varobj.c (varobj_set_display_format, varobj_set_value)
8146 (install_default_visualizer, construct_visualizer)
8147 (install_new_value, ~varobj, varobj_get_value_type)
8148 (my_value_of_variable, varobj_editable_p): Update.
8149 * c-varobj.c (c_describe_child, c_value_of_variable)
8150 (cplus_number_of_children, cplus_describe_child): Update.
8151 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8152 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8153 (ada_value_of_variable, ada_value_is_changeable_p): Update.
8155 2018-04-06 Tom Tromey <tom@tromey.com>
8157 * printcmd.c (last_examine_address): Change type to
8159 (do_examine, x_command): Update.
8161 2018-04-06 Tom Tromey <tom@tromey.com>
8163 * value.c (release_value): Update.
8164 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8165 (struct bpstats) <val>: Now a value_ref_ptr.
8166 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8167 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8168 (~watchpoint, print_it_watchpoint, watch_command_1)
8169 (invalidate_bp_value_on_memory_change): Update.
8171 2018-04-06 Tom Tromey <tom@tromey.com>
8173 * varobj.c (varobj_clear_saved_item)
8174 (update_dynamic_varobj_children, install_new_value, ~varobj):
8176 * value.h (value_incref): Move declaration earlier.
8177 (value_decref): Rename from value_free.
8178 (struct value_ref_policy): New.
8179 (value_ref_ptr): New typedef.
8180 (struct value_deleter): Remove.
8181 (gdb_value_up): Remove typedef.
8182 (release_value): Change return type.
8183 (release_value_or_incref): Remove.
8184 * value.c (set_value_parent): Update.
8185 (value_incref): Change return type.
8186 (value_decref): Rename from value_free.
8187 (value_free_to_mark, free_all_values, free_value_chain): Update.
8188 (release_value): Return value_ref_ptr.
8189 (release_value_or_incref): Remove.
8190 (record_latest_value, set_internalvar, clear_internalvar):
8192 * stack.c (info_frame_command): Don't call value_free.
8193 * python/py-value.c (valpy_dealloc, valpy_new)
8194 (value_to_value_object): Update.
8195 * printcmd.c (do_examine): Update.
8196 * opencl-lang.c (lval_func_free_closure): Update.
8197 * mi/mi-main.c (register_changed_p): Don't call value_free.
8198 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8199 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8200 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8202 * guile/scm-value.c (vlscm_free_value_smob)
8203 (vlscm_scm_from_value): Update.
8204 * frame.c (frame_register_unwind, frame_unwind_register_signed)
8205 (frame_unwind_register_unsigned, get_frame_register_bytes)
8206 (put_frame_register_bytes): Don't call value_free.
8207 * findvar.c (address_from_register): Don't call value_free.
8208 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8209 * dwarf2loc.c (entry_data_value_free_closure)
8210 (value_of_dwarf_reg_entry, free_pieced_value_closure)
8211 (dwarf2_evaluate_loc_desc_full): Update.
8212 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8213 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8214 (~watchpoint, watch_command_1)
8215 (invalidate_bp_value_on_memory_change): Update.
8216 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8218 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
8221 * warning.m4: Add -Wno-error=deprecated-register.
8222 * configure: Re-generate.
8224 2018-04-05 Tom Tromey <tom@tromey.com>
8226 * linespec.h: Remove include of "vec.h".
8228 2018-04-05 Tom Tromey <tom@tromey.com>
8230 * linespec.c (typep): Remove typedef.
8231 (find_methods, find_superclass_methods): Take a std::vector.
8232 (find_method): Use std::vector.
8234 2018-04-05 Tom Tromey <tom@tromey.com>
8236 * utils.c (compare_strings): Remove.
8237 * utils.h (compare_strings): Remove.
8238 * objc-lang.h (find_imps): Update.
8239 * objc-lang.c (find_methods): Take a std::vector.
8240 (uniquify_strings, find_imps): Likewise.
8241 * linespec.c (find_methods): Take a std::vector.
8242 (decode_objc): Use std::vector.
8243 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8245 (find_method, find_function_symbols): Use std::vector.
8247 2018-04-05 Tom Tromey <tom@tromey.com>
8249 * completer.c (completion_tracker::completion_tracker): Remove
8251 (completion_tracker::discard_completions): Likewise.
8252 * breakpoint.c (ambiguous_names_p): Remove cast.
8253 * ada-lang.c (_initialize_ada_language): Remove cast.
8254 * utils.h (streq): Update.
8255 (streq_hash): Add new declaration.
8256 * utils.c (streq): Return bool.
8257 (streq_hash): New function.
8259 2018-04-05 Tom Tromey <tom@tromey.com>
8261 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8262 Remove a string copy.
8264 2018-04-05 Tom Tromey <tom@tromey.com>
8266 * linespec.c (filter_results): Use std::vector.
8267 (decode_line_2, decode_line_full): Update.
8269 2018-04-05 Tom Tromey <tom@tromey.com>
8271 * linespec.c (canonical_to_fullform): Return std::string.
8272 (filter_results): Update.
8273 (struct decode_line_2_item): Add constructor.
8274 <fullform, displayform>: Now std::string.
8275 (decode_line_2_compare_items): Now a std::sort comparator.
8276 (decode_line_2): Update.
8278 2018-04-05 Tom Tromey <tom@tromey.com>
8280 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8281 (unexpected_linespec_error): Update.
8282 (linespec_parse_basic, parse_linespec): Update.
8284 2018-04-05 Tom Tromey <tom@tromey.com>
8286 * linespec.c (linespec_parse_basic): Reindent.
8288 2018-04-05 Tom Tromey <tom@tromey.com>
8290 * minsyms.h (iterate_over_minimal_symbols): Update.
8291 * minsyms.c (iterate_over_minimal_symbols): Take a
8293 * linespec.c (struct collect_minsyms): Remove.
8294 (compare_msyms): Now a std::sort comparator.
8295 (add_minsym): Add parameters.
8296 (search_minsyms_for_name): Update. Use std::vector.
8298 2018-04-03 Tom Tromey <tom@tromey.com>
8300 * mipsread.c (read_alphacoff_dynamic_symtab): Use
8303 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8305 * MAINTAINERS (Write After Approval): Add Weimin Pan.
8307 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8310 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
8311 printing static type.
8313 2018-04-01 Tom Tromey <tom@tromey.com>
8315 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8316 (rs6000_xfer_shared_libraries): Update.
8318 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
8320 * common/gdb_vecs.h (char_ptr): Remove.
8321 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8323 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8325 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8327 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8329 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8331 * tracepoint.h (struct uploaded_tp): Initialize fields.
8332 <actions, step_actions, cmd_strings>: Change type to
8333 std::vector<char *>.
8334 * tracepoint.c (get_uploaded_tp): Allocate with new.
8335 (free_uploaded_tps): Free with delete.
8336 (parse_tracepoint_definition): Adjust to std::vector change.
8337 * breakpoint.c (read_uploaded_action): Likewise.
8338 (create_tracepoint_from_upload): Likewise.
8339 * ctf.c (ctf_write_uploaded_tp): Likewise.
8340 (SET_ARRAY_FIELD): Likewise.
8341 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8343 2018-03-30 Tom Tromey <tom@tromey.com>
8345 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
8347 (svr4_keep_data_in_core): Update.
8348 (svr4_read_so_list): Update.
8350 2018-03-30 Tom Tromey <tom@tromey.com>
8352 * windows-nat.c (handle_output_debug_string, handle_exception):
8354 * target.h (target_read_string): Update.
8355 * target.c (target_read_string): Change "string" to
8357 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8359 * solib-frv.c (frv_current_sos): Update.
8360 * solib-dsbt.c (dsbt_current_sos): Update.
8361 * solib-darwin.c (darwin_current_sos): Update.
8362 * linux-thread-db.c (inferior_has_bug): Update.
8363 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8364 Update. Remove alloca.
8365 * ada-lang.c (ada_main_name): Update.
8367 2018-03-30 Tom Tromey <tom@tromey.com>
8369 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8370 (struct dwo_file_deleter): New.
8371 (dwo_file_up): New typedef.
8372 (open_and_init_dwo_file): Use dwo_file_up.
8373 (free_dwo_file_cleanup): Remove.
8375 2018-03-30 Tom Tromey <tom@tromey.com>
8377 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8378 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8380 2018-03-30 Tom Tromey <tom@tromey.com>
8382 * dwarf2read.c (class free_cached_comp_units): New class.
8383 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8384 (free_cached_comp_units): Remove function.
8386 2018-03-30 Tom Tromey <tom@tromey.com>
8388 * utils.h (make_cleanup_unpush_target): Remove.
8389 * inf-ptrace.c (struct target_unpusher): New.
8390 (target_unpush_up) New typedef.
8391 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8393 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8395 2018-03-27 Tom Tromey <tom@tromey.com>
8397 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8399 2018-03-27 Pedro Alves <palves@redhat.com>
8400 Tom Tromey <tom@tromey.com>
8402 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8403 destructor. Now a class.
8404 (gdb_readline_wrapper_cleanup): Remove function.
8405 (gdb_readline_wrapper): Remove cleanups.
8407 2018-03-27 Tom Tromey <tom@tromey.com>
8409 * typeprint.h (struct type_print_options) <local_typedefs,
8410 global_typedefs>: Remove "struct" keyword.
8411 (class typedef_hash_table): New class.
8412 (recursively_update_typedef_hash, add_template_parameters)
8413 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8414 (find_typedef_in_hash): Don't declare.
8415 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8416 (typedef_hash_table::recursively_update): Rename from
8417 recursively_update_typedef_hash. Now a member.
8418 (typedef_hash_table::add_template_parameters): Rename from
8419 add_template_parameters. Now a member.
8420 (typedef_hash_table::typedef_hash_table): Now a constructor;
8421 rename from create_typedef_hash.
8422 (typedef_hash_table::~typedef_hash_table): Now a destructor;
8423 rename from free_typedef_hash.
8424 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8425 (do_free_global_table): Remove.
8426 (typedef_hash_table::typedef_hash_table): New constructor; renamed
8427 from copy_type_recursive.
8428 (create_global_typedef_table): Remove.
8429 (typedef_hash_table::find_global_typedef): Now a member of
8431 (typedef_hash_table::find_typedef): Rename from
8432 find_typedef_in_hash; now a member.
8433 (whatis_exp): Update.
8434 * extension.h (struct ext_lang_type_printers): Add constructor and
8436 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8438 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8439 Now a constructor; rename from start_ext_lang_type_printers.
8440 (ext_lang_type_printers): Now a destructor; rename from
8441 free_ext_lang_type_printers.
8442 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8444 (c_type_print_base_struct_union): Update. Remove cleanups.
8446 2018-03-27 Tom Tromey <tom@tromey.com>
8448 * dwarf-index-write.c: Include <cmath>.
8450 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8452 * NEWS: Add entry describing new "set|show varsize-limit" command.
8453 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8455 * printcmd.c (_initialize_printcmd): Add "set var" alias of
8458 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
8460 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8462 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8463 * dwarf-index-common.c: New file.
8464 * dwarf-index-common.h: New file.
8465 * dwarf-index-write.c: New file.
8466 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8467 (struct dwarf2_section_info): Move from here.
8468 (dwarf2_section_info_def): Likewise.
8469 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8470 (offset_type): Likewise.
8471 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8472 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8473 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8474 (byte_swap): Likewise.
8475 (MAYBE_SWAP): Likewise.
8476 (dwarf2_per_cu_ptr): Likewise.
8477 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8478 (struct tu_stats): Likewise.
8479 (struct dwarf2_per_objfile): Likewise.
8480 (struct dwarf2_per_cu_data): Likewise.
8481 (struct signatured_type): Likewise.
8482 (sig_type_ptr): Likewise.
8483 (DEF_VEC_P (sig_type_ptr)): Likewise.
8484 (INDEX4_SUFFIX): Likewise.
8485 (INDEX5_SUFFIX): Likewise.
8486 (DEBUG_STR_SUFFIX): Likewise.
8487 (dwarf2_read_section): Make non-static.
8488 (mapped_index_string_hash): Move from here.
8489 (dwarf5_djb_hash): Likewise.
8490 (file_write): Likewise.
8491 (class data_buf): Likewise.
8492 (struct symtab_index_entry): Likewise.
8493 (struct mapped_symtab): Likewise.
8494 (find_slot): Likewise.
8495 (hash_expand): Likewise.
8496 (add_index_entry): Likewise.
8497 (uniquify_cu_indices): Likewise.
8498 (class c_str_view): Likewise.
8499 (class c_str_view_hasher): Likewise.
8500 (class vector_hasher): Likewise.
8501 (write_hash_table): Likewise.
8502 (psym_index_map): Likewise.
8503 (struct addrmap_index_data): Likewise.
8504 (add_address_entry): Likewise.
8505 (add_address_entry_worker): Likewise.
8506 (write_address_map): Likewise.
8507 (symbol_kind): Likewise.
8508 (write_psymbols): Likewise.
8509 (struct signatured_type_index_data): Likewise.
8510 (write_one_signatured_type): Likewise.
8511 (recursively_count_psymbols): Likewise.
8512 (recursively_write_psymbols): Likewise.
8513 (class debug_names): Likewise.
8514 (check_dwarf64_offsets): Likewise.
8515 (psyms_seen_size): Likewise.
8516 (write_gdbindex): Likewise.
8517 (write_debug_names): Likewise.
8518 (assert_file_size): Likewise.
8519 (write_psymtabs_to_index): Likewise.
8520 (save_gdb_index_command): Likewise.
8521 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8523 * dwarf2read.h: New file.
8525 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8528 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8529 symbol name if the CU's language stores symbol names in linkage
8531 * language.h (struct language_defn)
8532 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8533 all instances of this struct.
8535 2018-03-26 Tom Tromey <tom@tromey.com>
8537 * stack.c (backtrace_command_1): Remove verbose code.
8539 2018-03-26 Tom Tromey <tom@tromey.com>
8541 * python/py-framefilter.c (py_print_type): Don't catch
8542 exceptions. Return void.
8543 (py_print_value): Likewise.
8544 (py_print_single_arg): Likewise.
8545 (enumerate_args): Don't catch exceptions.
8546 (py_print_args): Likewise.
8547 (py_print_frame): Likewise.
8548 (gdbpy_apply_frame_filter): Catch exceptions here.
8550 2018-03-26 Tom Tromey <tom@tromey.com>
8552 * stack.c (_initialize_stack): Remove trailing newlines from help
8553 text. Add "Usage" line to "backtrace" help.
8555 2018-03-26 Tom Tromey <tom@tromey.com>
8558 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8560 2018-03-26 Tom Tromey <tom@tromey.com>
8562 * python/py-framefilter.c (py_print_single_arg): Return
8563 EXT_LANG_BT_ERROR from catch.
8565 2018-03-26 Tom Tromey <tom@tromey.com>
8568 * stack.c (backtrace_command_1): Move some code into no-filters
8571 2018-03-26 Tom Tromey <tom@tromey.com>
8573 * python/py-framefilter.c (throw_quit_or_print_exception): New
8575 (gdbpy_apply_frame_filter): Use it.
8577 2018-03-26 Tom Tromey <tom@tromey.com>
8580 * python/py-framefilter.c (py_print_type, py_print_value)
8581 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8584 2018-03-26 Tom Tromey <tom@tromey.com>
8586 * python/py-framefilter.c (enumerate_args): Use
8587 gdb::unique_xmalloc_ptr.
8589 2018-03-26 Tom Tromey <tom@tromey.com>
8591 * python/py-framefilter.c (py_print_frame): Return
8593 (gdbpy_apply_frame_filter): Update comment.
8594 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8596 <EXT_LANG_BT_NO_FILTERS>: Change value.
8598 2018-03-26 Tom Tromey <tom@tromey.com>
8601 * stack.c (backtrace_command): Parse "hide" argument.
8602 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8603 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8606 2018-03-26 Tom Tromey <tom@tromey.com>
8608 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8610 (backtrace_command): Remove "fulltrace", add "flags".
8612 2018-03-26 Tom Tromey <tom@tromey.com>
8614 * stack.c (backtrace_command): Rewrite command line parsing.
8616 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8618 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8620 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8622 * filename-seen-cache.h: Add include guard.
8624 2018-03-26 Keith Seitz <keiths@redhat.com>
8626 * symfile.c (place_section): Remove "struct" from section_addr_info
8628 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8629 "struct" keyword from section_addr_info.
8631 2018-03-26 Alan Hayward <alan.hayward@arm.com>
8633 * regformats/regdef.h (reg): Add constructors.
8635 2018-03-25 Pedro Alves <palves@redhat.com>
8637 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8638 if then/else bodies in var_func_name extraction.
8640 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
8642 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8643 lookup_minimal_symbol() to find symbol entry.
8644 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8646 2018-03-23 Keith Seitz <keiths@redhat.com>
8649 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8650 nested type definitions for C++, too.
8652 2018-03-23 Tom Tromey <tom@tromey.com>
8654 * machoread.c (struct oso_el): Add a constructor. Don't define as
8656 (macho_register_oso): Remove.
8657 (macho_symtab_read): Take a std::vector.
8658 (oso_el_compare_name): Now a std::sort comparator.
8659 (macho_symfile_read_all_oso): Take a std::vector.
8660 (macho_symfile_read): Use std::vector. Remove cleanups.
8662 2018-03-22 Tom Tromey <tom@tromey.com>
8664 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8665 (record_full_goto_bookmark): Use std::string.
8667 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8670 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8673 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8675 * rs6000-tdep.c (store_insn_p): New function.
8676 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8677 and cr_reg to their unshifted values. Use store_insn_p to
8678 match LR saves using either R1 or fdata->alloca_reg. Use
8679 store_insn_p to match CR saves. Set alloca_reg_offset
8680 when alloca_reg and framep are set. Remove lr_reg shift
8681 when assigning to fdata->lr_register.
8683 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8685 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8686 command line args instead of emitting a warning.
8688 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8690 * tracepoint.h (struct static_tracepoint_marker): Initialize
8691 fields, define default constructor, move constructor and move
8692 assignment, disable the rest.
8693 <str_id, extra>: Make std::string.
8694 (release_static_tracepoint_marker): Remove.
8695 (free_current_marker): Remove.
8696 * tracepoint.c (free_current_marker): Remove.
8697 (parse_static_tracepoint_marker_definition): Adjust to
8698 std::string, use new hex2str overload.
8699 (release_static_tracepoint_marker): Remove.
8700 (print_one_static_tracepoint_marker): Get marker by reference
8701 and adjust to std::string.
8702 (info_static_tracepoint_markers_command): Adjust to std::vector
8704 * target.h (static_tracepoint_marker_p): Remove typedef.
8705 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8706 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8708 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8710 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8711 (target_debug_print_std_vector_static_tracepoint_marker): New.
8712 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8714 (target_debug_print_static_tracepoint_marker_p): ... this.
8715 * target-delegates.c: Re-generate.
8716 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8718 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8719 (decode_static_tracepoint_spec): Adjust to std::vector.
8720 (tracepoint_print_one_detail): Adjust to std::string.
8721 (strace_marker_decode_location): Adjust to std::string.
8722 (update_static_tracepoint): Adjust to std::string, remove call
8723 to release_static_tracepoint_marker.
8724 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8725 Adjust to std::vector.
8726 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8727 (remote_static_tracepoint_markers_by_strid): Adjust to
8729 * common/rsp-low.h (hex2str): New overload with explicit count
8731 * common/rsp-low.c (hex2str): New overload with explicit count
8733 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8734 (_initialize_rsp_low_selftests): Add test_hex2str test.
8735 * unittests/tracepoint-selftests.c
8736 (test_parse_static_tracepoint_marker_definition): Adjust to
8739 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8741 * tracepoint.c (parse_static_tracepoint_marker_definition):
8742 Consider case where the definition is followed by more
8744 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8745 tracepoint-selftests.c.
8746 * unittests/tracepoint-selftests.c: New.
8748 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8750 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8753 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8755 * symtab.c (find_pc_sect_line): fixed indentation.
8757 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8759 * symtab.c (find_pc_sect_line): now uses binary search.
8761 2018-03-19 Tom Tromey <tom@tromey.com>
8763 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8766 2018-03-19 Pedro Alves <palves@redhat.com>
8767 Tom Tromey <tom@tromey.com>
8769 * unittests/observable-selftests.c: New file.
8770 * common/observable.h: New file.
8771 * observable.h: New file.
8772 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8773 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8774 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8775 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8776 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8777 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8778 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8779 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8780 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8781 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8782 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8783 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8784 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8785 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8786 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8787 tui/tui-interp.c, valops.c: Update all users.
8788 * tui/tui-hooks.c (tui_bp_created_observer)
8789 (tui_bp_deleted_observer, tui_bp_modified_observer)
8790 (tui_inferior_exit_observer, tui_before_prompt_observer)
8791 (tui_normal_stop_observer, tui_register_changed_observer):
8793 (tui_observers_token): New global.
8794 (attach_or_detach, tui_attach_detach_observers): New functions.
8795 (tui_install_hooks, tui_remove_hooks): Use
8796 tui_attach_detach_observers.
8797 * record-btrace.c (record_btrace_thread_observer): Remove.
8798 (record_btrace_thread_observer_token): New global.
8799 * observer.sh: Remove.
8800 * observer.c: Rename to observable.c.
8801 * observable.c (namespace gdb_observers): Define new objects.
8802 (observer_debug): Move into gdb_observers namespace.
8803 (struct observer, struct observer_list, xalloc_observer_list_node)
8804 (xfree_observer_list_node, generic_observer_attach)
8805 (generic_observer_detach, generic_observer_notify): Remove.
8806 (_initialize_observer): Update.
8807 Don't include observer.inc.
8808 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8809 (clean mostlyclean): Likewise.
8810 (observer.h, observer.inc): Remove targets.
8811 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8812 (COMMON_SFILES): Use observable.c, not observer.c.
8813 * .gitignore: Remove observer.h.
8815 2018-03-18 Tom Tromey <tom@tromey.com>
8817 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8819 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8821 2018-03-17 Tom Tromey <tom@tromey.com>
8823 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8825 2018-03-17 Tom Tromey <tom@tromey.com>
8827 * target.c (class scoped_target_fd): New.
8828 (target_fileio_close_cleanup): Remove.
8829 (target_fileio_read_alloc_1): Use scoped_target_fd.
8831 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8833 * silent-rules.mk: New.
8834 * Makefile.in: Include silent-rules.mk
8835 (srcdir, VPATH, top_srcdir): Move up.
8836 (COMPILE): Add ECHO_CXX.
8837 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8838 (init.c): Add ECHO_INIT_C.
8839 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8840 (version.c): Add ECHO_GEN.
8841 (printcmd.o): Add ECHO_CXX.
8842 (target-float.o): Add ECHO_CXX.
8843 (ada-exp.o): Add ECHO_CXX.
8844 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8845 (insight$(EXEEXT)): Add ECHO_CXXLD.
8846 * gnulib/configure.ac: Add AM_SILENT_RULES.
8847 * gnulib/aclocal.m4: Re-generate.
8848 * gnulib/configure: Re-generate.
8849 * gnulib/import/Makefile.in: Re-generate.
8851 2018-03-16 Tom Tromey <tom@tromey.com>
8853 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8854 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8855 * utils.c (do_free_section_addr_info)
8856 (make_cleanup_free_section_addr_info): Remove.
8857 * symfile.h (struct other_sections): Add constructor.
8858 (struct section_addr_info): Remove.
8859 (section_addr_info): New typedef.
8860 (struct sym_fns) <sym_offsets>: Change type of parameter.
8861 (build_section_addr_info_from_objfile)
8862 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8863 (default_symfile_offsets, symbol_file_add)
8864 (symbol_file_add_from_bfd)
8865 (build_section_addr_info_from_section_table): Update.
8866 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8867 * symfile.c (alloc_section_addr_info): Remove.
8868 (build_section_addr_info_from_section_table): Change return type.
8870 (build_section_addr_info_from_bfd)
8871 (build_section_addr_info_from_objfile): Likewise.
8872 (free_section_addr_info): Remove.
8873 (relative_addr_info_to_section_offsets): Change type of "addrs".
8874 (addrs_section_compar): Now a std::sort comparator.
8875 (addrs_section_sort): Change return type.
8876 (addr_info_make_relative): Change type of "addrs". Update.
8877 (default_symfile_offsets, syms_from_objfile_1)
8878 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8879 (symbol_file_add_separate): Update.
8880 (symbol_file_add): Change type of "addrs". Update.
8881 (add_symbol_file_command): Update. Remove cleanups.
8882 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8884 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8885 * solib.c (solib_read_symbols): Update.
8886 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8887 * machoread.c (macho_symfile_offsets): Update.
8888 * jit.c (jit_bfd_try_read_symtab): Update.
8890 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8892 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8893 unittests/utils-selftests.c.
8894 * unittests/utils-selftests.c: New file.
8896 2018-03-14 Tom Tromey <tom@tromey.com>
8899 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8902 2018-03-14 Tom Tromey <tom@tromey.com>
8905 * printcmd.c (printf_pointer): Allow "-" in format.
8907 2018-03-14 Tom Tromey <tom@tromey.com>
8909 * printcmd.c (_initialize_printcmd): Add usage to printf.
8911 2018-03-14 Yao Qi <qiyao@sourceware.org>
8913 * MAINTAINERS: Update my email address.
8915 2018-03-13 Tom Tromey <tom@tromey.com>
8917 * machoread.c (macho_check_dsym): Change filenamep to a
8919 (macho_symfile_read): Update.
8920 * symfile.c (load_command): Use std::string.
8922 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
8924 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8925 to error message string.
8926 (riscv_register_name): Use xsnprintf instead of sprintf.
8927 (riscv_insn::fetch_instruction): Use gdb_assert instead of
8929 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8931 (riscv_push_dummy_call): Likewise.
8933 2018-03-12 Tom Tromey <tom@tromey.com>
8935 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8936 Use gdb::byte_vector.
8937 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8939 2018-03-12 Yao Qi <yao.qi@linaro.org>
8941 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8942 parameter type to readable_regcache.
8943 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8946 2018-03-11 Tom Tromey <tom@tromey.com>
8948 * dwarf2read.c (struct nextfield): Add initializers.
8949 (struct nextfnfield): Remove.
8950 (struct fnfieldlist): Add initializers. Remove "length" and
8951 "head", use std::vector.
8952 (struct decl_field_list): Remove.
8953 (struct field_info): Add initializers.
8954 <fields, baseclasses>: Now std::vector.
8955 <nbaseclasses, nfnfields, typedef_field_list_count,
8956 nested_types_list_count>: Remove.
8957 (dwarf2_add_field, dwarf2_add_type_defn)
8958 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8959 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8960 (process_structure_scope): Update.
8962 2018-03-11 Tom Tromey <tom@tromey.com>
8964 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8965 for use by std::sort.
8966 (build_type_psymtabs_1): Use std::vector.
8968 2018-03-09 Eli Zaretskii <eliz@gnu.org>
8970 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8971 and LIBMPFR in the printed configuration.
8973 2018-03-08 Tom Tromey <tom@tromey.com>
8975 * source.c (get_filename_and_charpos): Use scoped_fd.
8976 * nto-procfs.c (procfs_open_1): Use scoped_fd.
8977 (procfs_pidlist): Likewise.
8978 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8979 (iterate_over_mappings): Likewise.
8981 2018-03-08 Tom Tromey <tom@tromey.com>
8983 * infcall.c (struct call_return_meta_info)
8984 <stack_temporaries_enabled>: Remove.
8985 (get_call_return_value, call_function_by_hand_dummy): Update.
8986 * thread.c (disable_thread_stack_temporaries): Remove.
8987 (enable_thread_stack_temporaries): Remove.
8988 (thread_stack_temporaries_enabled_p): Return bool.
8989 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8990 (get_last_thread_stack_temporary): Update.
8991 * eval.c (evaluate_subexp): Update.
8992 * gdbthread.h (class enable_thread_stack_temporaries): Now a
8993 class, not a function.
8994 (value_ptr, value_vec): Remove typedefs.
8995 (class thread_info) <stack_temporaries_enabled>: Now bool.
8996 <stack_temporaries>: Now a std::vector.
8997 (thread_stack_temporaries_enabled_p)
8998 (value_in_thread_stack_temporaries): Return bool.
9000 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
9002 * remote.c (putpkt_binary): Fix omitted bytes reporting.
9003 (getpkt_or_notif_sane_1): Likewise.
9005 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9007 * build-id.c (build_id_to_debug_bfd): Use std::string.
9009 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9011 * build-id.c (find_separate_debug_file_by_buildid): Return
9013 * build-id.h (find_separate_debug_file_by_buildid): Return
9015 * coffread.c (coff_symfile_read): Adjust to std::string.
9016 * elfread.c (elf_symfile_read): Adjust to std::string.
9017 * symfile.c (separate_debug_file_exists): Change parameter to
9019 (find_separate_debug_file): Return std::string.
9020 (find_separate_debug_file_by_debuglink): Return std::string.
9021 * symfile.h (find_separate_debug_file_by_debuglink): Return
9024 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9026 * common/xml-utils.c (xml_escape_text): Move code to...
9027 (xml_escape_text_append): ... this new function.
9028 * common/xml-utils.h (xml_escape_text_append): New declaration.
9029 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9031 (_initialize_xml_utils): register test_xml_escape_text_append as
9034 2018-03-07 Alan Hayward <alan.hayward@arm.com>
9036 * defs.h: Remove MAX_REGISTER_SIZE.
9037 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9039 * python/py-unwind.c (pyuw_sniffer): Likewise.
9041 2018-03-07 Tom Tromey <tom@tromey.com>
9043 * linux-tdep.c (linux_info_proc): Update.
9044 * target.h (struct target_ops) <to_fileio_readlink>: Return
9046 (target_fileio_readlink): Return optional<string>.
9047 * remote.c (remote_hostio_readlink): Return optional<string>.
9048 * inf-child.c (inf_child_fileio_readlink): Return
9050 * target.c (target_fileio_readlink): Return optional<string>.
9052 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
9054 * regcache.c (cooked_read_test): Add riscv to the list of
9055 architectures that have a save_reggroup.
9057 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
9059 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9060 value is not a dynamic class object.
9062 2018-03-06 Tom Tromey <tom@tromey.com>
9064 * rust-exp.y: Formatting fixes.
9066 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9068 * riscv-tdep.c (riscv_register_name): Remove target description
9070 (riscv_gdbarch_init): Remove target description check.
9072 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9074 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9076 * riscv-tdep.h: Likewise.
9078 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9080 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9081 (riscv_pseudo_register_write): Delete.
9082 (riscv_gdbarch_init): Remove all use of pseudo registers.
9084 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9086 * record-btrace.c (btrace_print_lines): Replace cleanup
9087 parameter with RAII equivalents.
9088 (btrace_insn_history): Replace cleanup with RAII equivalents.
9089 * ui-out.h (make_cleanup_ui_out_list_begin_end,
9090 make_cleanup_ui_out_tuple_begin_end): Remove.
9091 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9092 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9093 make_cleanup_ui_out_list_begin_end): Remove.
9095 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9097 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9098 parameter types to std::vector. Use bool.
9099 (record_btrace_wait): Replace VEC(tp_t) with
9100 std::vector<thread_info *>.
9101 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9103 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9105 * record-btrace.c (record_btrace_disable_callback): Remove.
9106 (struct scoped_btrace_disable): New.
9107 (record_btrace_open): Use scoped_btrace_disable.
9109 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9111 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9112 reading values from registers.
9114 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9116 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9119 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9121 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9122 change parameter type. Use GDB's print functions, and use
9123 core_addr_to_string where appropriate.
9124 (riscv_push_dummy_call): Use core_addr_to_string where
9125 appropriate, update call to riscv_print_arg_location, and reindent
9127 (riscv_return_value): Update call to riscv_print_arg_location.
9129 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9130 Tim Newsome <tim@sifive.com>
9131 Albert Ou <a0u@eecs.berkeley.edu>
9132 Darius Rad <darius@bluespec.com>
9134 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9135 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9136 (ALLDEPFILES): Add riscv-tdep.c
9137 * configure.tgt: Add riscv support.
9138 * riscv-tdep.c: New file.
9139 * riscv-tdep.h: New file.
9140 * NEWS: Mention new target.
9141 * MAINTAINERS: Add entry for riscv.
9143 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9145 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9146 fields within aggregates.
9148 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
9150 * record-btrace.c (btrace_print_lines): Change type of flags to
9151 gdb_disassembly_flags.
9153 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9155 * fbsd-nat.c: Include "inf-ptrace.h".
9156 (USE_SIGTRAP_SIGINFO): Conditionally define.
9157 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9158 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9159 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9161 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9163 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9165 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9166 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9167 "supports_stopped_by_hw_breakpoint" target methods.
9169 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9171 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9172 * fbsd-nat.c (debug_fbsd_nat): New variable.
9173 (show_fbsd_nat_debug): New function.
9174 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9175 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9177 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9179 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9180 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9182 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9183 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9186 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9188 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9189 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9191 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9193 * charset.c (struct charset_vector): New.
9194 (charsets): Change type to charset_vector.
9195 (find_charset_names): Adjust.
9197 (_initialize_charset): Adjust.
9199 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9201 * progspace.h (struct program_space) <deleted_solibs>: Change
9202 type to std::vector<std::string>.
9203 * progspace.c (clear_program_space_solib_cache): Adjust.
9204 * breakpoint.c (print_solib_event): Adjust.
9205 (check_status_catch_solib): Adjust.
9206 * solib.c (update_solib_list): Adjust.
9207 * ui-out.h (class ui_out) <field_string>: New overload.
9208 * ui-out.c (ui_out::field_string): New overload.
9210 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9212 * progspace.h (struct program_space): Add constructor and
9213 destructor, initialize fields.
9214 (add_program_space): Remove.
9215 * progspace.c (add_program_space): Rename to...
9216 (program_space::program_space): ... this.
9217 (release_program_space): Rename to...
9218 (program_space::~program_space): ... this.
9219 (delete_program_space): Use delete to delete program_space.
9220 (initialize_progspace): Use new to allocate program_space.
9221 * inferior.c (add_inferior_with_spaces): Likewise.
9222 (clone_inferior_command): Likewise.
9223 * infrun.c (follow_fork_inferior): Likewise.
9224 (handle_vfork_child_exec_or_exit): Likewise.
9226 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9228 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9229 (delim_string_to_char_ptr_vec): Return std::vector of
9230 gdb::unique_xmalloc_ptr.
9231 (dirnames_to_char_ptr_vec_append): Take std::vector of
9232 gdb::unique_xmalloc_ptr.
9233 (dirnames_to_char_ptr_vec): Return std::vector of
9234 gdb::unique_xmalloc_ptr.
9235 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9236 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9237 (delim_string_to_char_ptr_vec): Return an std::vector of
9238 gdb::unique_xmalloc_ptr, adjust the code.
9239 (dirnames_to_char_ptr_vec_append): Take an std::vector of
9240 gdb::unique_xmalloc_ptr, adjust the code.
9241 (dirnames_to_char_ptr_vec): Return an std::vector of
9242 gdb::unique_xmalloc_ptr, adjust the code.
9243 * auto-load.c (auto_load_safe_path_vec): Change type to
9244 std::vector of gdb::unique_xmalloc_ptr.
9245 (auto_load_expand_dir_vars): Return an std::vector of
9246 gdb::unique_xmalloc_ptr, adjust the code.
9247 (auto_load_safe_path_vec_update): Adjust.
9248 (filename_is_in_auto_load_safe_path_vec): Adjust.
9249 (auto_load_objfile_script_1): Adjust.
9250 * build-id.c (build_id_to_debug_bfd): Adjust.
9251 * linux-thread-db.c (thread_db_load_search): Adjust.
9252 * source.c (add_path): Adjust.
9254 * symfile.c (find_separate_debug_file): Adjust.
9255 * utils.c (do_free_char_ptr_vec): Remove.
9256 (make_cleanup_free_char_ptr_vec): Remove.
9258 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
9261 * common/pathstuff.c: Conditionally include "<windows.h>".
9263 2018-03-01 Georg Sauthoff <mail@georg.so>
9266 * gcore.in: Quote variables and switch interpreter to bash.
9268 2018-03-01 Tom Tromey <tom@tromey.com>
9270 * dwarf2read.c (alloc_discriminant_info): Fix default_index
9271 assertion. Add assertion for discriminant_index.
9272 (quirk_rust_enum): Use correct base type name in univariant case.
9274 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
9276 * record.c (get_call_history_modifiers): Return a
9278 (cmd_record_call_history): Adjust.
9279 * record-btrace.c (record_btrace_call_history): Adjust.
9280 (record_btrace_call_history_range): Adjust.
9281 (record_btrace_call_history_from): Adjust.
9282 * target-debug.h (target_debug_print_record_print_flags): New.
9283 * target-delegates.c: Re-generate.
9284 * target.c (target_call_history): Change flags type.
9285 (target_call_history_from): Likewise.
9286 (target_call_history_range): Likewise.
9287 * target.h (struct target_ops) <target_call_history>: Likewise.
9288 (target_call_history_from): Likewise.
9289 (target_call_history_range): Likewise.
9291 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9292 Simon Marchi <simon.marchi@polymtl.ca>
9294 * common/common-utils.c: Include "sys/stat.h".
9295 (is_regular_file): Move here from "source.c"; change return
9297 * common/common-utils.h (is_regular_file): New prototype.
9298 * common/pathstuff.c (contains_dir_separator): New function.
9299 * common/pathstuff.h (contains_dir_separator): New prototype.
9300 * source.c: Don't include "sys/stat.h".
9301 (is_regular_file): Move to "common/common-utils.c".
9303 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9305 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9306 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9307 * auto-load.c: Include "common/pathstuff.h".
9308 * common/common-def.h (current_directory): Move here.
9309 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9311 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9313 * common/pathstuff.c: New file.
9314 * common/pathstuff.h: New file.
9315 * compile/compile.c: Include "common/pathstuff.h".
9316 * defs.h (current_directory): Move to "common/common-defs.h".
9317 * dwarf2read.c: Include "common/pathstuff.h".
9319 * guile/scm-safe-call.c: Likewise.
9320 * linux-thread-db.c: Likewise.
9322 * nto-tdep.c: Likewise.
9323 * objfiles.c: Likewise.
9324 * source.c: Likewise.
9325 * symtab.c: Likewise.
9326 * utils.c: Include "common/pathstuff.h".
9327 (gdb_realpath): Move to "common/pathstuff.c".
9328 (gdb_realpath_keepfile): Likewise.
9329 (gdb_abspath): Likewise.
9330 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9331 (gdb_realpath_keepfile): Likewise.
9332 (gdb_abspath): Likewise.
9334 2018-02-28 John Baldwin <jhb@FreeBSD.org>
9336 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9337 wildcard process pid for super_resume for kernels with a
9340 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
9342 * compile/compile.c (get_args): Add additional comments
9343 explaining function.
9345 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
9346 Tom Tromey <tom@tromey.com>
9348 * target.h (memory_write_request_s): Remove typedef. Don't define
9350 (target_write_memory_blocks): Change argument to std::vector.
9351 (struct memory_write_request): Add constructor.
9352 * target-memory.c (compare_block_starting_address): Return bool.
9353 Change argument types.
9354 (claim_memory): Change arguments to use std::vector.
9355 (split_regular_and_flash_blocks, blocks_to_erase)
9356 (compute_garbled_blocks): Likewise.
9357 (cleanup_request_data, cleanup_write_requests_vector): Remove.
9358 (target_write_memory_blocks): Change argument to std::vector.
9359 * symfile.c (struct load_section_data): Add constructor and
9360 destructor. Use std::vector for "requests".
9361 (struct load_progress_data): Add initializers.
9362 (load_section_callback): Update. Use "new".
9363 (clear_memory_write_data): Remove.
9364 (generic_load): Update.
9366 2018-02-27 Alan Hayward <alan.hayward@arm.com>
9368 * arch/aarch64.h: Use common/tdesc.h.
9370 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9372 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9373 architecture with a 64-bit ABI.
9375 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9377 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9378 ahead of target description loading.
9380 2018-02-26 Tom Tromey <tom@tromey.com>
9382 * stack.c (backtrace_command_1): Update.
9383 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9385 * python/py-framefilter.c (py_print_frame)
9386 (gdbpy_apply_frame_filter): Change type of "flags".
9387 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9389 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9390 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9391 * extension.h (enum frame_filter_flag): Rename from
9393 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9394 (apply_ext_lang_frame_filter): Change type of "flags".
9395 * extension.c (apply_ext_lang_frame_filter): Change type of
9397 * extension-priv.h (struct extension_language_ops)
9398 <apply_frame_filter>: Change type of "flags".
9400 2018-02-26 Tom Tromey <tom@tromey.com>
9403 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
9404 off-by-one in py_end computation.
9405 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9407 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9410 2018-02-26 Tom Tromey <tom@tromey.com>
9412 * dwarf2read.c (struct variant_field): New.
9413 (struct nextfield) <variant>: New field.
9414 (dwarf2_add_field): Handle DW_TAG_variant_part.
9415 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9416 discriminated union.
9417 (read_structure_type): Handle DW_TAG_variant_part.
9418 (handle_struct_member_die): New function, extracted from
9419 process_structure_scope. Handle DW_TAG_variant.
9420 (process_structure_scope): Handle discriminated unions. Call
9421 handle_struct_member_die.
9423 2018-02-26 Tom Tromey <tom@tromey.com>
9425 * rust-lang.h (rust_last_path_segment): Declare.
9426 * rust-lang.c (rust_last_path_segment): Now public. Change
9428 (struct disr_info): Remove.
9429 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9430 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9431 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9432 (rust_enum_p, rust_enum_variant): New function.
9433 (rust_underscore_fields): Remove "offset" parameter.
9434 (rust_print_enum): New function.
9435 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9436 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9437 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
9439 (rust_internal_print_type): New function, from rust_print_type.
9441 (rust_print_type): Call rust_internal_print_type.
9442 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9443 Update enum handling.
9444 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9445 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9446 (rust_union_quirks): New functions.
9447 (process_full_comp_unit, process_full_type_unit): Call
9449 (process_structure_scope): Update rust_unions if necessary.
9451 2018-02-26 Tom Tromey <tom@tromey.com>
9453 * value.h (value_union_variant): Declare.
9454 * valops.c (value_union_variant): New function.
9455 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9456 (struct discriminant_info): New.
9457 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9459 (struct main_type) <flag_discriminated_union>: New field.
9461 2018-02-26 Tom Tromey <tom@tromey.com>
9463 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9464 unittests/unpack-selftests.c.
9465 * unittests/unpack-selftests.c: New file.
9466 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9468 2018-02-26 Yao Qi <yao.qi@linaro.org>
9470 * dwarf2read.c (struct partial_die_info) <read>: New method.
9471 (read_partial_die): Remove the declaration.
9472 (load_partial_dies): Update.
9473 (partial_die_info::partial_die_info):
9474 (read_partial_die): Change it to partial_die_info::read.
9476 2018-02-26 Yao Qi <yao.qi@linaro.org>
9478 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9479 (fixup_partial_die): Remove declaration.
9480 (scan_partial_symbols): Update.
9481 (partial_die_parent_scope): Likewise.
9482 (partial_die_full_name): Likewise.
9483 (fixup_partial_die): Change it to partial_die_info::fixup.
9485 2018-02-26 Yao Qi <yao.qi@linaro.org>
9487 * dwarf2read.c (read_partial_die): Update the declaration.
9488 (load_partial_dies): Caller update.
9489 (read_partial_die): Remove one argument abbrev_len.
9491 2018-02-26 Yao Qi <yao.qi@linaro.org>
9493 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9494 assignment operator.
9495 (load_partial_dies): Use ctor and copy ctor.
9496 (read_partial_die): Update.
9497 (dwarf2_cu::find_partial_die): Use ctor.
9499 2018-02-26 Yao Qi <yao.qi@linaro.org>
9501 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9502 (find_partial_die_in_comp_unit): Change it to
9503 dwarf2_cu::find_partial_die.
9504 (find_partial_die): Update.
9506 2018-02-26 Yao Qi <yao.qi@linaro.org>
9508 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9511 2018-02-26 Yao Qi <yao.qi@linaro.org>
9513 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9515 2018-02-26 Alan Hayward <alan.hayward@arm.com>
9517 * arch/amd64.h: Use common/tdesc.h.
9518 * arch/i386.c: Likewise.
9519 * arch/i386.h: Likewise.
9520 * arch/tic6x.c: Likewise.
9521 * arch/tdesc.h: Move file from here...
9522 * common/tdesc.h: ...to here.
9523 * features/aarch64-core.c: Regenerate.
9524 * features/aarch64-fpu.c: Regenerate.
9525 * features/i386/32bit-avx.c: Regenerate.
9526 * features/i386/32bit-avx512.c: Regenerate.
9527 * features/i386/32bit-core.c: Regenerate.
9528 * features/i386/32bit-linux.c: Regenerate.
9529 * features/i386/32bit-mpx.c: Regenerate.
9530 * features/i386/32bit-pkeys.c: Regenerate.
9531 * features/i386/32bit-sse.c: Regenerate.
9532 * features/i386/64bit-avx.c: Regenerate.
9533 * features/i386/64bit-avx512.c: Regenerate.
9534 * features/i386/64bit-core.c: Regenerate.
9535 * features/i386/64bit-linux.c: Regenerate.
9536 * features/i386/64bit-mpx.c: Regenerate.
9537 * features/i386/64bit-pkeys.c: Regenerate.
9538 * features/i386/64bit-segments.c: Regenerate.
9539 * features/i386/64bit-sse.c: Regenerate.
9540 * features/i386/x32-core.c: Regenerate.
9541 * features/tic6x-c6xp.c: Regenerate.
9542 * features/tic6x-core.c: Regenerate.
9543 * features/tic6x-gp.c: Regenerate.
9544 * target-descriptions.c: Use common/tdesc.h.
9545 * target-descriptions.h: Likewise.
9547 2018-02-24 Tom Tromey <tom@tromey.com>
9549 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9550 (try_thread_db_load_from_dir, thread_db_load_search): Use
9552 (info_auto_load_libthread_db_compare): Return bool. Change
9554 (info_auto_load_libthread_db): Use std::vector, std::string.
9557 2018-02-24 Tom Tromey <tom@tromey.com>
9559 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9561 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9563 * gdbarch.c: Rebuild.
9564 * gdbarch.h: Rebuild.
9565 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9566 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9567 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9570 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9572 * gdbtypes.h (sect_offset): Change type to uint64_t.
9573 (sect_offset_str): New function.
9574 * dwarf2read.c (create_addrmap_from_aranges): Use
9576 (error_check_comp_unit_head): Likewise.
9577 (create_debug_type_hash_table): Likewise.
9578 (read_cutu_die_from_dwo): Likewise.
9579 (init_cutu_and_read_dies): Likewise.
9580 (init_cutu_and_read_dies_no_follow): Likewise.
9581 (process_psymtab_comp_unit_reader): Likewise.
9582 (partial_die_parent_scope): Likewise.
9583 (peek_die_abbrev): Likewise.
9584 (process_queue): Likewise.
9585 (dwarf2_physname): Likewise.
9586 (read_namespace_alias): Likewise.
9587 (read_import_statement): Likewise.
9588 (create_dwo_cu_reader): Likewise.
9589 (create_cus_hash_table): Likewise.
9590 (lookup_dwo_cutu): Likewise.
9591 (inherit_abstract_dies): Likewise.
9592 (read_func_scope): Likewise.
9593 (read_call_site_scope): Likewise.
9594 (dwarf2_add_member_fn): Likewise.
9595 (read_common_block): Likewise.
9596 (read_module_type): Likewise.
9597 (read_typedef): Likewise.
9598 (read_subrange_type): Likewise.
9599 (load_partial_dies): Likewise.
9600 (read_partial_die): Likewise.
9601 (find_partial_die): Likewise.
9602 (read_str_index): Likewise.
9603 (dwarf2_string_attr): Likewise.
9604 (build_error_marker_type): Likewise.
9605 (lookup_die_type): Likewise.
9606 (dump_die_shallow): Likewise.
9607 (follow_die_ref): Likewise.
9608 (dwarf2_fetch_die_loc_sect_off): Likewise.
9609 (dwarf2_fetch_constant_bytes): Likewise.
9610 (follow_die_sig): Likewise.
9611 (get_signatured_type): Likewise.
9612 (get_DW_AT_signature_type): Likewise.
9613 (dwarf2_find_containing_comp_unit): Likewise.
9614 (set_die_type): Likewise.
9616 2018-02-21 John Baldwin <jhb@FreeBSD.org>
9618 * arch/aarch64.c: Include "common-defs.h".
9619 * arch/amd64.c: Likewise.
9620 * arch/i386.c: Likewise.
9622 2018-02-21 Tom Tromey <tom@tromey.com>
9624 * value.h: (extract_field_op): Update.
9625 * eval.c (extract_field_op): Return a const char *.
9626 * expression.h (parse_expression_for_completion): Update.
9627 * completer.c (complete_expression): Update.
9628 (add_struct_fields): Make fieldname const.
9629 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9630 (mark_completion_tag, parse_exp_in_context_1): Update.
9631 (parse_expression_for_completion): Change "name" to
9632 unique_xmalloc_ptr*.
9634 2018-02-21 Tom Tromey <tom@tromey.com>
9636 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9638 2018-02-21 Yao Qi <yao.qi@linaro.org>
9640 * avr-tdep.c (avr_read_pc): Change parameter type to
9642 * gdbarch.sh (read_pc): Likewise.
9643 * gdbarch.c: Re-generated.
9644 * gdbarch.h: Re-generated.
9645 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9647 * ia64-tdep.c (ia64_read_pc): Likewise.
9648 * mips-tdep.c (mips_read_pc): Likewise.
9649 * spu-tdep.c (spu_read_pc): Likewise.
9651 2018-02-21 Yao Qi <yao.qi@linaro.org>
9653 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9654 * regcache-dump.c: New file.
9655 * regcache.c: Move register_dump to regcache-dump.c.
9656 (maintenance_print_registers): Likewise.
9657 (maintenance_print_raw_registers): Likewise.
9658 (maintenance_print_cooked_registers): Likewise.
9659 (maintenance_print_register_groups): Likewise.
9660 (maintenance_print_remote_registers): Likewise.
9661 (_initialize_regcache): Likewise.
9662 * regcache.h (register_dump): Moved from regcache.c.
9664 2018-02-21 Yao Qi <yao.qi@linaro.org>
9666 * regcache.c (regcache::regcache): Update.
9667 (regcache::invalidate): Move it to detached_regcache::invalidate.
9668 (get_thread_arch_aspace_regcache): Update.
9669 (regcache::raw_update): Update.
9670 (regcache::cooked_read): Remove some code.
9671 (regcache::cooked_read_value): Likewise.
9672 (regcache::raw_write): Remove assert on m_readonly_p.
9673 (regcache::raw_supply_integer): Move it to
9674 detached_regcache::raw_supply_integer.
9675 (regcache::raw_supply_zeroed): Likewise.
9676 * regcache.h (detached_regcache) <raw_supply_integer>: New
9678 <raw_supply_zeroed, invalidate>: Likewise.
9679 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9680 <invalidate>: Likewise.
9681 <m_readonly_p>: Removed.
9683 2018-02-21 Yao Qi <yao.qi@linaro.org>
9685 * infcmd.c (get_return_value): Let stop_regs point to
9686 get_current_regcache.
9687 * regcache.c (regcache::regcache): Remove.
9688 (register_dump_reg_buffer): New class.
9689 (regcache_print): Adjust.
9690 * regcache.h (regcache): Remove constructors.
9692 2018-02-21 Yao Qi <yao.qi@linaro.org>
9694 * regcache.c (class register_dump): New class.
9695 (register_dump_regcache, register_dump_none): New class.
9696 (register_dump_remote, register_dump_groups): New class.
9697 (regcache_print): Update.
9698 * regcache.h (regcache_dump_what): Move it to regcache.c.
9699 (regcache) <dump>: Remove.
9701 2018-02-21 Yao Qi <yao.qi@linaro.org>
9703 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9705 (jit_unwind_reg_set_impl): Call raw_supply.
9706 (jit_frame_sniffer): Use reg_buffer_rw.
9707 * record-full.c (record_full_core_regbuf): Change its type.
9708 (record_full_core_open_1): Use reg_buffer_rw.
9709 (record_full_close): Likewise.
9710 (record_full_core_fetch_registers): Use regcache->raw_supply.
9711 (record_full_core_store_registers): Likewise.
9712 * regcache.c (regcache::get_register_status): Move it to
9714 (regcache_raw_set_cached_value): Remove.
9715 (regcache::raw_set_cached_value): Remove.
9716 (regcache::raw_write): Call raw_supply.
9717 (regcache::raw_supply): Move it to reg_buffer_rw.
9718 * regcache.h (regcache_raw_set_cached_value): Remove.
9719 (reg_buffer_rw): New class.
9721 2018-02-21 Yao Qi <yao.qi@linaro.org>
9723 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9724 readonly_detached_regcache.
9725 (dummy_frame_prev_register): Use regcache->cooked_read.
9726 * frame.c (frame_save_as_regcache): Change return type.
9727 (frame_pop): Update.
9728 * frame.h (frame_save_as_regcache): Update declaration.
9729 * inferior.h (get_infcall_suspend_state_regcache): Update
9731 * infrun.c (infcall_suspend_state) <registers>: use
9732 readonly_detached_regcache.
9733 (save_infcall_suspend_state): Don't use regcache_dup.
9734 (get_infcall_suspend_state_regcache): Change return type.
9735 * linux-fork.c (struct fork_info) <savedregs>: Change to
9736 readonly_detached_regcache.
9738 (fork_save_infrun_state): Don't use regcache_dup.
9739 (info_checkpoints_command): Adjust.
9740 * mi/mi-main.c (register_changed_p): Update declaration.
9741 (mi_cmd_data_list_changed_registers): Use
9742 readonly_detached_regcache.
9743 (register_changed_p): Change parameter type to
9744 readonly_detached_regcache.
9745 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9746 readonly_detached_regcache.
9747 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9748 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9750 (regcache::save): Move it to reg_buffer.
9751 (regcache::restore): Change parameter type.
9752 (regcache_dup): Remove.
9753 * regcache.h (reg_buffer) <save>: New method.
9754 (readonly_detached_regcache): New class.
9755 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9756 readonly_detached_regcache.
9757 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9759 2018-02-21 Yao Qi <yao.qi@linaro.org>
9761 * frame.c (frame_save_as_regcache): Use regcache method save.
9762 (frame_pop): Use regcache method restore.
9763 * infrun.c (restore_infcall_suspend_state): Likewise.
9764 * linux-fork.c (fork_load_infrun_state): Likewise.
9765 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9767 * regcache.c (regcache_save): Remove.
9768 (regcache::restore): More asserts.
9769 (regcache_cpy): Remove.
9770 * regcache.h (regcache_save): Remove the declaration.
9771 (regcache::restore): Move from private to public.
9772 Remove the friend declaration of regcache_cpy.
9773 (regcache_cpy): Remove declaration.
9775 2018-02-21 Yao Qi <yao.qi@linaro.org>
9777 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9778 parameter type to 'readable_regcache *'.
9779 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9780 * arm-tdep.c (arm_neon_quad_read): Likewise.
9781 (arm_pseudo_read): Likewise.
9782 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9783 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9784 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9785 * gdbarch.c: Re-generated.
9786 * gdbarch.h: Re-generated.
9787 * gdbarch.sh (pseudo_register_read): Change parameter type to
9788 'readable_regcache *'.
9789 (pseudo_register_read_value): Likewise.
9790 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9791 (h8300_pseudo_register_read): Likewise.
9792 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9793 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9794 (i386_pseudo_register_read_into_value): Likewise.
9795 (i386_pseudo_register_read_value): Likewise.
9796 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9798 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9799 * m32c-tdep.c (m32c_raw_read): Likewise.
9800 (m32c_read_flg): Likewise.
9801 (m32c_banked_register): Likewise.
9802 (m32c_banked_read): Likewise.
9803 (m32c_sb_read): Likewise.
9804 (m32c_part_read): Likewise.
9805 (m32c_cat_read): Likewise.
9806 (m32c_r3r2r1r0_read): Likewise.
9807 (m32c_pseudo_register_read): Likewise.
9808 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9809 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9810 (mep_pseudo_cr64_read): Likewise.
9811 (mep_pseudo_register_read): Likewise.
9812 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9813 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9814 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9815 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9816 (regcache::cooked_read): Likewise.
9817 (regcache::cooked_read_value): Likewise.
9818 (regcache_cooked_read_signed):
9819 (regcache::cooked_read): Likewise.
9820 * regcache.h (readable_regcache): New class.
9821 (regcache): Inherit readable_regcache. Move some methods to
9823 * rl78-tdep.c (rl78_pseudo_register_read): Change
9824 parameter type to 'readable_regcache *'.
9825 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9826 (e500_pseudo_register_read): Change parameter type to
9827 'readable_regcache *'.
9828 (dfp_pseudo_register_read): Likewise.
9829 (vsx_pseudo_register_read): Likewise.
9830 (efpr_pseudo_register_read): Likewise.
9831 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9832 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9833 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9834 (sh64_pseudo_register_read): Likewise.
9835 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9836 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9837 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9838 (spu_pseudo_register_read): Likewise.
9839 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9840 (xtensa_pseudo_register_read): Likewise.
9842 2018-02-21 Yao Qi <yao.qi@linaro.org>
9844 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9845 (regcache::arch): Move it to reg_buffer::arch.
9846 (regcache::register_buffer): Likewise.
9847 (regcache::assert_regnum): Likewise.
9848 (regcache::num_raw_registers): Likewise.
9849 * regcache.h (reg_buffer): New class.
9850 (regcache): Inherit reg_buffer.
9852 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9854 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9855 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9857 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9859 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9861 2018-02-19 Alan Hayward <alan.hayward@arm.com>
9863 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9864 (SFILES): Remove common/*.c files.
9865 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9866 * common/common.host: Add common reference.
9867 * configure.ac: Likewise.
9868 * configure: Regenerate.
9870 2018-02-16 Yao Qi <yao.qi@linaro.org>
9872 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9873 (block_initialize_namespace): Use new.
9874 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9875 (dwarf2_free_objfile): Use delete.
9876 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9877 (copy_type_recursive): Use new.
9878 * gdb_obstack.h (allocate_on_obstack): New.
9880 2018-02-15 Yao Qi <yao.qi@linaro.org>
9883 * inferior.c (exit_inferior_1): Reset inf->control.
9885 2018-02-15 Joel Brobecker <brobecker@adacore.com>
9887 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9890 2018-02-14 Pedro Alves <palves@redhat.com>
9892 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9893 frame_cleanup_after_sniffer on exception.
9895 2018-02-14 Tom Tromey <tom@tromey.com>
9897 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9899 (solib_bfd_open): Make pathname const.
9900 * solib.c (solib_bfd_open): Make pathname const.
9901 * solib-spu.c (spu_bfd_fopen): Make name const.
9902 (spu_bfd_open): Make pathname const.
9903 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9904 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9906 2018-02-14 Tom Tromey <tom@tromey.com>
9908 * symfile.c (symfile_bfd_open): Update.
9909 * source.h (openp, source_full_path_of, find_and_open_source):
9910 Change argument type to unique_xmalloc_ptr.
9911 * source.c (openp): Take a unique_xmalloc_ptr.
9912 (source_full_path_of, find_and_open_source): Likewise.
9913 (open_source_file, symtab_to_fullname): Update.
9914 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9916 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9917 (exec_file_find): Update.
9918 * psymtab.c (psymtab_to_fullname): Update.
9919 * nto-tdep.h (nto_find_and_open_solib): Update.
9920 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9922 * exec.c (exec_file_attach): Update.
9923 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9924 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9926 2018-02-14 Tom Tromey <tom@tromey.com>
9928 * solib.c: Include source.h.
9929 * nto-tdep.c: Include source.h.
9930 * mi/mi-cmd-env.c: Include source.h.
9931 * infcmd.c: Include source.h.
9932 * exec.c: Include source.h.
9933 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9934 (add_path, directory_switch, source_path, init_source_path): Move
9936 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9937 (add_path, directory_switch, source_path, init_source_path):
9940 2018-02-14 Tom Tromey <tom@tromey.com>
9942 * solist.h (exec_file_find, solib_find): Return
9944 (solib_bfd_fopen): Take a const char *.
9945 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9946 (exec_file_find, solib_find): Likewise.
9947 (solib_bfd_fopen): Do not take ownership of "pathname".
9948 (solib_bfd_open): Use unique_xmalloc_ptr.
9949 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9950 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9951 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9952 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9954 2018-02-14 Joel Brobecker <brobecker@adacore.com>
9956 * ada-lang.c (name_match_type_from_name): Remove reference to
9957 ada_name_for_lookup in function's documentation.
9958 * ada-lang.h (ada_name_for_lookup): Delete declaration.
9960 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9962 * defs.h (enum openp_flags): New enum.
9963 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9964 Move to enum openp_flags.
9965 (openp_flags): New enum flags.
9966 (openp): Change parameter type to openp_flags.
9967 * source.c (openp): Change parameter type to openp_flags.
9968 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9969 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9971 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9973 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9976 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
9978 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9980 (class dwarf2_queue_guard): ...the destructor of this new class.
9981 (dw2_do_instantiate_symtab): Create instance of the new class
9982 dwarf2_queue_guard, remove cleanup.
9984 2018-02-09 Tom Tromey <tom@tromey.com>
9986 * source.c (find_source_lines): Don't reference past the end of
9989 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9991 * remote.c (remote_btrace_maybe_reopen): Change error message.
9992 * btrace.c (btrace_enable): Likewise.
9993 (parse_xml_btrace): Likewise.
9994 (parse_xml_btrace_conf): Likewise.
9996 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9998 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9999 (linux_enable_pt, linux_enable_bts): Call
10000 diagnose_perf_event_open_fail.
10002 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10004 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10005 Remove parameter and change return type. Update callers. Move it.
10006 (linux_enable_bts, linux_enable_pt): Improve error message.
10007 (linux_enable_pt): Remove zero buffer size check.
10008 (linux_enable_btrace): Improve error messages. Remove NULL return
10011 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10013 * btrace.c (btrace_enable): Remove target_supports_btrace call.
10014 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10015 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10016 (linux_supports_pt, linux_supports_btrace): Remove.
10017 (linux_enable_bts): Call cpu_supports_bts.
10018 * nat/linux-btrace.h (linux_supports_btrace): Remove.
10019 * remote.c (remote_supports_btrace): Remove.
10020 (init_remote_ops): Remove remote_supports_btrace.
10021 * target-delegates.c: Regenerated.
10022 * target.c (target_supports_btrace): Remove.
10023 * target.h (target_ops) <to_supports_btrace>: Remove
10024 (target_supports_btrace): Remove.
10025 * x86-linux-nat.c (x86_linux_create_target): Remove
10026 linux_supports_btrace.
10028 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10030 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10032 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10033 exception and use message in own exception.
10035 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10037 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10038 (perf_event_pt_event_type): Use gdb_file_up.
10039 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10040 scoped_fd, and scoped_mmap.
10042 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10044 * common/scoped_mmap.h: New.
10045 * unittests/scoped_mmap-selftest.c: New.
10046 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10047 unittests/scoped_mmap-selftest.c.
10049 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10051 * common/scoped_fd.h: New.
10052 * unittests/scoped_fd-selftest.c: New.
10053 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10054 unittests/scoped_fd-selftest.c.
10056 2018-02-09 Tom Tromey <tom@tromey.com>
10058 * auto-load.c (auto_load_section_scripts): Use
10059 gdb::unique_xmalloc_ptr.
10061 2018-02-09 Tom Tromey <tom@tromey.com>
10063 * auto-load.c (execute_script_contents): Use std::string.
10065 2018-02-09 Joel Brobecker <brobecker@adacore.com>
10067 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10068 Python function, rather than a new command.
10070 2018-02-08 Tom Tromey <tom@tromey.com>
10072 * solib.c (solib_find_1): Use std::string.
10073 (solib_bfd_fopen): Use unique_xmalloc_ptr.
10075 2018-02-08 Tom Tromey <tom@tromey.com>
10077 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10079 2018-02-08 Tom Tromey <tom@tromey.com>
10081 * source.c (find_source_lines): Use gdb::def_vector.
10083 2018-02-08 Tom Tromey <tom@tromey.com>
10085 * macrocmd.c (struct temporary_macro_definition): New.
10086 (macro_define_command): Use temporary_macro_definition. Remove
10088 (free_macro_definition_ptr): Remove.
10090 2018-02-08 Tom Tromey <tom@tromey.com>
10092 * macroexp.c (maybe_expand): Use std::string.
10094 2018-02-08 Tom Tromey <tom@tromey.com>
10096 * macroexp.c (struct macro_buffer): Add initializers for some
10098 (init_buffer, init_shared_buffer, free_buffer)
10099 (free_buffer_return_text): Remove.
10100 (macro_buffer): New constructors.
10101 (~macro_buffer): New destructor.
10102 (macro_buffer::set_shared): New method.
10103 (macro_buffer::resize_buffer, macro_buffer::appendc)
10104 (macro_buffer::appendmem): Now methods, not free functions.
10105 (set_token, append_tokens_without_splicing, stringify)
10106 (macro_stringify): Update.
10107 (gather_arguments): Change return type. Remove argc_p argument,
10108 add args_ptr argument. Use std::vector.
10109 (substitute_args): Remove argc argument. Accept std::vector.
10110 (expand): Update. Use std::vector.
10111 (scan, macro_expand, macro_expand_next): Update.
10113 2018-02-08 Tom Tromey <tom@tromey.com>
10115 * symtab.c (default_collect_symbol_completion_matches_break_on):
10116 Use unique_xmalloc_ptr.
10117 * macroscope.h: (sal_macro_scope, user_macro_scope)
10118 (default_macro_scope): Return unique_xmalloc_ptr.
10119 * macroscope.c (sal_macro_scope, user_macro_scope)
10120 (default_macro_scope): Return unique_xmalloc_ptr.
10121 * macroexp.h (macro_expand, macro_expand_once): Return
10122 unique_xmalloc_ptr.
10123 * macroexp.c (macro_expand, macro_expand_once): Return
10124 unique_xmalloc_ptr.
10125 * macrocmd.c (macro_expand_command, macro_expand_once_command)
10126 (info_macro_command, info_macros_command): Use
10127 unique_xmalloc_ptr.
10128 * compile/compile-c-support.c (write_macro_definitions): Use
10129 unique_xmalloc_ptr.
10130 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10132 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
10134 * value.c (value_static_field): Assign field type instead of
10135 containing type when returning an optimized out value.
10137 2018-02-06 Yao Qi <yao.qi@linaro.org>
10139 * ft32-tdep.c (ft32_read_pc): Remove.
10140 (ft32_write_pc): Remove.
10141 (ft32_gdbarch_init): Update.
10142 * m32r-tdep.c (m32r_read_pc): Remove.
10143 (m32r_gdbarch_init): Update.
10144 * mep-tdep.c (mep_read_pc): Remove.
10145 (mep_gdbarch_init): Update.
10146 * microblaze-tdep.c (microblaze_write_pc): Remove.
10147 (microblaze_gdbarch_init): Update.
10148 * mn10300-tdep.c (mn10300_read_pc): Remove.
10149 (mn10300_write_pc): Remove.
10150 (mn10300_gdbarch_init): Update.
10151 * moxie-tdep.c (moxie_read_pc): Remove.
10152 (moxie_write_pc): Remove.
10153 (moxie_gdbarch_init): Update.
10155 2018-02-06 Yao Qi <yao.qi@linaro.org>
10157 * expprint.c (print_subexp_standard): Handle
10158 OP_F77_UNDETERMINED_ARGLIST.
10159 (dump_subexp_body_standard): Likewise.
10161 2018-02-05 Alan Hayward <alan.hayward@arm.com>
10163 * target-descriptions.c (tdesc_element_visitor) Add empty
10165 (tdesc_type): Move make_gdb_type from here.
10166 (tdesc_type_builtin): Likewise.
10167 (tdesc_type_vector): Likewise.
10168 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10169 (make_gdb_type_struct): Move from tdesc_type_with_fields.
10170 (make_gdb_type_union): Likewise.
10171 (make_gdb_type_flags): Likewise.
10172 (make_gdb_type_enum): Likewise.
10173 (make_gdb_type): New function.
10174 (tdesc_register_type): Use static make_gdb_type.
10176 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
10178 * infcmd.c (default_print_one_register_info): Align natural-format
10179 column values consistently one under another.
10180 (pad_to_column): New function.
10182 2018-02-05 Joel Brobecker <brobecker@adacore.com>
10184 * dwarf2read.c (dwarf2_physname): Move commment.
10186 2018-02-01 Leszek Swirski <leszeks@google.com>
10188 * varobj.c (varobj_formatted_print_options): Allow recursive
10189 pretty printing if pretty printing is enabled.
10191 2018-02-01 Leszek Swirski <leszeks@google.com>
10193 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10194 names after a structop as a filename.
10196 2018-02-01 Yao Qi <yao.qi@linaro.org>
10198 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10199 (arm_record_coproc_data_proc): Likewise.
10201 2018-02-01 Yao Qi <yao.qi@linaro.org>
10203 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10205 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
10207 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10208 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10210 2018-01-31 Pedro Alves <palves@redhat.com>
10212 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10213 * inflow.c (child_terminal_save_inferior): Wrap reference to
10214 tcgetpgrp in HAVE_TERMIOS_H.
10215 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10217 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10218 always iterate over all inferiors.
10219 (gdbsim_cntrl_c): Adjust.
10220 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10222 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10224 * gdbtypes.c (lookup_array_range_type): Make sure the array's
10225 index type is objfile-owned if the element type is as well.
10227 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10231 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
10233 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10234 "features/s390x-linux64.c".
10235 (_initialize_s390_linux_tdep): Remove initialization of tdescs
10236 s390_linux32 and s390x_linux64.
10237 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10239 * s390-tdep.c: Include "features/s390-linux32.c" and
10240 "features/s390x-linux64.c".
10241 (s390_tdesc_valid): Add check for tdesc_has_registers.
10242 (s390_gdbarch_init): Make sure there is always a valid tdesc.
10243 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10244 tdesc_s390x_linux64.
10245 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10246 tdesc_s390x_linux64 to...
10247 * s390-tdep.h: ...here.
10249 2018-01-30 Pedro Alves <palves@redhat.com>
10252 * config.in, configure: Regenerate.
10253 * configure.ac: Check for getpgid.
10254 * go32-nat.c (go32_pass_ctrlc): New.
10255 (go32_target): Install it.
10256 * inf-child.c (inf_child_target): Install
10257 child_terminal_save_inferior, child_pass_ctrlc and
10259 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
10260 (inf_ptrace_target): No longer install it.
10261 * infcmd.c (interrupt_target_1): Adjust.
10262 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10263 (child_interrupt): Declare.
10264 (inferior::terminal_state): New.
10265 * inflow.c (struct terminal_info): Update comments.
10266 (inferior_process_group): Delete.
10267 (terminal_is_ours): Delete.
10268 (gdb_tty_state): New.
10269 (child_terminal_init): Adjust.
10270 (is_gdb_terminal, sharing_input_terminal_1)
10271 (sharing_input_terminal): New functions.
10272 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
10273 Set the process's actual process group in the foreground if
10274 possible. Handle is_ours_for_output/is_ours distinction. Don't
10275 mark terminal as the inferior's if not sharing GDB's terminal.
10276 Don't check attach_flag.
10277 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
10278 pass down a target_terminal_state.
10279 (child_terminal_save_inferior): New, factored out from ...
10280 (child_terminal_ours_1): ... this. Handle
10281 target_terminal_state::is_ours_for_output.
10282 (child_interrupt, child_pass_ctrlc): New.
10283 (inflow_inferior_exit): Clear the inferior's terminal_state.
10284 (copy_terminal_info): Copy the inferior's terminal state.
10285 (_initialize_inflow): Remove reference to terminal_is_ours.
10286 * inflow.h (inferior_process_group): Delete.
10287 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10288 * procfs.c (procfs_target): Don't install procfs_interrupt.
10289 (procfs_interrupt): Delete.
10290 * remote.c (remote_serial_quit_handler): Adjust.
10291 (remote_interrupt): Remove ptid parameter. Adjust.
10292 * target-delegates.c: Regenerate.
10293 * target.c: Include "terminal.h".
10294 (target_terminal::terminal_state): Rename to ...
10295 (target_terminal::m_terminal_state): ... this.
10296 (target_terminal::init): Adjust.
10297 (target_terminal::inferior): Adjust to per-inferior
10299 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10300 (target_terminal::ours, target_terminal::ours_for_output): Use
10301 target_terminal_is_ours_kind.
10302 (target_interrupt): Remove ptid parameter. Adjust.
10303 (default_target_pass_ctrlc): Adjust.
10304 * target.h (target_ops::to_terminal_save_inferior): New field.
10305 (target_ops::to_interrupt): Remove ptid_t parameter.
10306 (target_interrupt): Remove ptid_t parameter. Update comment.
10307 (target_pass_ctrlc): Update comment.
10308 * target/target.h (target_terminal_state): New scoped enum,
10309 factored out of ...
10310 (target_terminal::terminal_state): ... here.
10311 (target_terminal::inferior): Update comments.
10312 (target_terminal::restore_inferior): New.
10313 (target_terminal::is_inferior, target_terminal::is_ours)
10314 (target_terminal::is_ours_for_output): Adjust.
10315 (target_terminal::scoped_restore_terminal_state): Adjust to
10316 rename, and call restore_inferior() instead of inferior().
10317 (target_terminal::scoped_restore_terminal_state::m_state): Change
10319 (target_terminal::terminal_state): Rename to ...
10320 (target_terminal::m_terminal_state): ... this and change type.
10322 2018-01-30 Pedro Alves <palves@redhat.com>
10324 * linux-nat.c (wait_for_signal): New function.
10325 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10327 (async_terminal_is_ours)
10328 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10329 (linux_nat_add_target): Don't override
10330 to_terminal_inferior/to_terminal_ours.
10332 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
10334 * remote.c (remote_follow_fork): Don't call "detach_inferior".
10336 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
10338 * dwarf2read.c (free_dwo_files): Add forward-declaration.
10339 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10340 dwarf2_per_objfile_free here.
10341 (dwarf2_per_objfile_free): Remove.
10342 (_initialize_dwarf2_read): Don't register
10343 dwarf2_per_objfile_free as a registry cleanup.
10345 2018-01-27 Eli Zaretskii <eliz@gnu.org>
10347 Avoid compilation errors in MinGW native builds
10349 The error is triggered by including python-internal.h, and the
10352 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10353 from build-gnulib/import/math.h:27,
10354 from d:/usr/Python26/include/pyport.h:235,
10355 from d:/usr/Python26/include/Python.h:58,
10356 from python/python-internal.h:94,
10357 from python/py-arch.c:24:
10358 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10362 This happens because Python headers define 'hypot' to expand t
10363 '_hypot' in the Windows builds.
10364 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10365 'hypoth'. This avoids a compilation error.
10367 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10369 * MAINTAINERS (Write After Approval): Fix ordering.
10371 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10373 * MAINTAINERS (Write After Approval): Add Alan Hayward.
10375 2018-01-26 Alan Modra <amodra@gmail.com>
10377 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10378 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10379 Remove nop. Make const. Comment.
10380 (powerpc32_plt_stub_so_2): New.
10381 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10382 Correct count. Update uses.
10383 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10384 Move common code reading PLT entry word. Correct
10385 powerpc32_plt_stub PLT address calculation.
10386 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10387 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10388 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10389 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10390 (ppc64_standard_linkage8): Likewise.
10391 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10392 Correct insns description.
10393 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10395 2018-01-24 Pedro Alves <palves@redhat.com>
10397 GCC PR libstdc++/83906
10398 * gdbtypes.c (operator==(const dynamic_prop &,
10399 const dynamic_prop &)): New.
10400 (operator==(const range_bounds &, const range_bounds &)): New.
10401 (check_types_equal): Use them instead of memcmp.
10402 * gdbtypes.h (operator==(const dynamic_prop &,
10403 const dynamic_prop &)): Declare.
10404 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10405 (operator==(const range_bounds &, const range_bounds &)): Declare.
10406 (operator!=(const range_bounds &, const range_bounds &)): Declare.
10408 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10410 * s390-linux-tdep.c (s390_record_address_mask)
10411 (s390_record_calc_disp_common, s390_record_calc_disp)
10412 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10413 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10414 (s390_process_record): Move to s390-tdep.c.
10415 (s390_linux_init_abi_any): Adjust.
10416 * s390-tdep.c (s390_record_address_mask)
10417 (s390_record_calc_disp_common, s390_record_calc_disp)
10418 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10419 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10420 (s390_process_record): Moved from s390-linux-tdep.c
10421 (s390_gdbarch_init): Adjust.
10423 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10425 * s390-linux-nat.c (s390-tdep.h): New include.
10426 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10427 (HFILES_NO_SRCDIR): Add s390-tdep.h.
10428 (ALLDEPFILES): Add s390-tdep.c.
10429 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10430 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10431 * s390-tdep.h: ...this. New file.
10432 * s390-linux-tdep.c (s390-tdep.h): New include.
10433 (_initialize_s390_tdep): Rename to...
10434 (_initialize_s390_linux_tdep): ...this and adjust.
10435 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10436 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10438 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10439 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10440 (s390_is_partial_instruction, s390_software_single_step)
10441 (is_non_branch_ril, s390_displaced_step_copy_insn)
10442 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10443 (s390_prologue_data, s390_addr, s390_store, s390_load)
10444 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10445 (s390_register_call_saved, s390_guess_tracepoint_registers)
10446 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10447 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10448 (s390_pseudo_register_name, s390_pseudo_register_type)
10449 (s390_pseudo_register_read, s390_pseudo_register_write)
10450 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10451 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10452 (s390_addr_bits_remove, s390_address_class_type_flags)
10453 (s390_address_class_type_flags_to_name)
10454 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10455 (s390_function_arg_float, s390_function_arg_vector)
10456 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10457 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10458 (s390_frame_align, s390_register_return_value, s390_return_value)
10459 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10460 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10461 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10462 (s390_trad_frame_prev_register, s390_unwind_cache)
10463 (s390_prologue_frame_unwind_cache)
10464 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10465 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10466 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10467 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10468 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10469 (s390_frame_base_address, s390_local_base_address)
10470 (s390_frame_base, s390_gcc_target_options)
10471 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10472 (s390_validate_reg_range, s390_tdesc_valid)
10473 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10474 * s390-tdep.c: ...this. New file.
10476 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10478 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10479 (s390_process_record, s390_gdbarch_tdep_alloc)
10480 (s390_linux_init_abi_any): Use/set new hook.
10482 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10484 * s390-linux-tdep.c (osabi.h): New include.
10485 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10486 (s390_linux_init_abi_any): New functions.
10487 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10489 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10491 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10492 tdesc_has_registers check
10494 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10496 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10497 (s390_validate_reg_range): New macro.
10498 (s390_gdbarch_init): Adjust.
10500 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10502 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10503 (s390_gdbarch_tdep_alloc): Adjust.
10504 (s390_gdbarch_init): Adjust.
10506 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10508 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10509 <have_tdb>: Change type to bool.
10510 (s390_gdbarch_tdep_alloc): Adjust.
10511 (s390_gdbarch_init): Adjust.
10513 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10515 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10516 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10517 (s390_gdbarch_tdep_alloc): New function.
10518 (s390_gdbarch_init): Allocate tdep at start and use its fields
10519 instead of separate variables.
10521 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10523 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10524 when looking for cached gdbarch and add comment for remaining.
10526 2018-01-22 Pedro Alves <palves@redhat.com>
10527 Sergio Durigan Junior <sergiodj@redhat.com>
10529 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10532 2018-01-22 Maciej W. Rozycki <macro@mips.com>
10534 * MAINTAINERS: Update my company e-mail address.
10536 2018-01-22 Yao Qi <yao.qi@linaro.org>
10538 * regcache.c (cooked_write_test): New function.
10539 (_initialize_regcache): Register the test.
10541 2018-01-22 Yao Qi <yao.qi@linaro.org>
10543 * ia64-tdep.c (ia64_pseudo_register_read): Call
10544 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10545 * m32c-tdep.c (m32c_cat_read): Likewise.
10546 (m32c_r3r2r1r0_read): Likewise.
10547 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10548 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10550 2018-01-22 Yao Qi <yao.qi@linaro.org>
10552 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10553 method raw_read instead of regcache_raw_read.
10554 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10555 * arm-tdep.c (arm_neon_quad_read): Likewise.
10556 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10557 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10558 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10559 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10560 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10561 (i386_pseudo_register_read_into_value): Likewise.
10562 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10563 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10564 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10565 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10566 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10567 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10568 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10569 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10570 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10572 2018-01-22 Yao Qi <yao.qi@linaro.org>
10574 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10575 * configure.tgt: Remove target mt.
10576 * mt-tdep.c: Remove.
10577 * regcache.c (cooked_read_test): Remove the check for mt.
10579 2018-01-22 Yao Qi <yao.qi@linaro.org>
10581 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10582 instead of gdbarch_pseudo_register_read_value.
10584 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10586 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10589 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10591 * linespec.c (create_sals_line_offset): Remove code that preserved
10592 the symtab_and_line's line number.
10594 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10596 * varobj.c (varobj_create): Don't set valid_block when creating a
10599 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10601 * varobj.c (varobj_create): Remove out of date comment.
10603 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10606 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10607 updating innermost block.
10608 * parse.c (innermost_block_tracker::update): Take extra type
10609 parameter, and check types match before updating innermost block.
10610 (write_dollar_variable): Update innermost block for registers.
10611 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10612 (innermost_block_tracker::innermost_block_tracker): Initialise
10614 (innermost_block_tracker::reset): Take type parameter.
10615 (innermost_block_tracker::update): Take type parameter, and pass
10616 type through as needed.
10617 (innermost_block_tracker::m_types): New member.
10618 * varobj.c (varobj_create): Pass type when reseting innermost
10621 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10623 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10624 * ada-lang.c (resolve_subexp): Likewise.
10625 * breakpoint.c (set_breakpoint_condition) Likewise.
10626 (watch_command_1) Likewise.
10627 * c-exp.y (variable): Likewise.
10628 * d-exp.y (PrimaryExpression): Likewise.
10629 * f-exp.y (variable): Likewise.
10630 * go-exp.y (variable): Likewise.
10631 * m2-exp.y (variable): Likewise.
10632 * objfiles.c (objfile::~objfile): Likewise.
10633 * p-exp.y (variable): Likewise.
10634 * parse.c (innermost_block): Change type.
10635 * parser-defs.h (class innermost_block_tracker): New.
10636 (innermost_block): Change to innermost_block_tracker.
10637 * printcmd.c (display_command): Switch to innermost_block API.
10638 (do_one_display): Likewise.
10639 * rust-exp.y (do_one_display): Likewise.
10640 * symfile.c (clear_symtab_users): Likewise.
10641 * varobj.c (varobj_create): Switch to innermost_block API, replace
10642 use of innermost_block with block stored on varobj object.
10644 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10646 * expression.h (innermost_block): Remove declaration.
10647 * varobj.c: Add 'parser-defs.h' include.
10649 2018-01-19 Tom Tromey <tom@tromey.com>
10651 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10652 symbols in the static and global blocks.
10654 2018-01-19 James Clarke <jrtc27@jrtc27.com>
10656 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10657 gdb_ptrace.h, and move including gdb_wait.h ...
10658 * nat/linux-ptrace.h: ... to here.
10660 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10662 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10663 inf_ptrace_detach_success.
10664 (inf_ptrace_detach_success): Add inferior parameter, use it
10665 instead of inferior_ptid, pass it to detach_inferior.
10666 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10668 * inferior.c (detach_inferior): Add overload that takes an
10670 * inferior.h (detach_inferior): Likewise.
10671 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10672 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10673 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10675 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10677 * target.h (struct target_ops) <to_detach>: Add inferior
10679 (target_detach): Likewise.
10680 * target.c (dispose_inferior): Pass inferior down.
10681 (target_detach): Pass inferior down. Assert that it is equal to
10682 the current inferior.
10683 * aix-thread.c (aix_thread_detach): Pass inferior down.
10684 * corefile.c (core_file_command): Pass current_inferior() down.
10685 * corelow.c (core_detach): Add inferior parameter.
10686 * darwin-nat.c (darwin_detach): Likewise.
10687 * gnu-nat.c (gnu_detach): Likewise.
10688 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10689 * infcmd.c (detach_command): Pass current_inferior() down to
10691 * infrun.c (follow_fork_inferior): Pass parent_inf to
10693 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10695 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10696 * linux-thread-db.c (thread_db_detach): Likewise.
10697 * nto-procfs.c (procfs_detach): Likewise.
10698 * procfs.c (procfs_detach): Likewise.
10699 * record.c (record_detach): Likewise.
10700 * record.h (struct inferior): Forward-declare.
10701 (record_detach): Add inferior parameter.
10702 * remote-sim.c (gdbsim_detach): Likewise.
10703 * remote.c (remote_detach_1): Likewise.
10704 (remote_detach): Likewise.
10705 (extended_remote_detach): Likewise.
10706 * sol-thread.c (sol_thread_detach): Likewise.
10707 * target-debug.h (target_debug_print_inferior_p): New macro.
10708 * target-delegates.c: Re-generate.
10709 * top.c (kill_or_detach): Pass inferior down to target_detach.
10710 * windows-nat.c (windows_detach): Add inferior parameter.
10712 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10714 * target.h (struct target_ops) <to_detach>: Remove args
10716 (target_detach): Likewise.
10717 * target.c (dispose_inferior): Adjust.
10718 (target_detach): Remove args parameter, adjust.
10719 * aix-thread.c (aix_thread_detach): Adjust.
10720 * corefile.c (core_file_command): Adjust.
10721 * corelow.c (core_detach): Adjust.
10722 * darwin-nat.c (darwin_detach): Adjust.
10723 * gnu-nat.c (gnu_detach): Adjust.
10724 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10725 * infcmd.c (detach_command): Adjust
10726 * infrun.c (follow_fork_inferior): Adjust.
10727 (handle_vfork_child_exec_or_exit): Adjust.
10728 * linux-fork.c (linux_fork_detach): Remove args parameter.
10729 * linux-fork.h (linux_fork_detach): Likewise.
10730 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10731 * linux-thread-db.c (thread_db_detach): Likewise.
10732 * nto-procfs.c (procfs_detach): Likewise.
10733 * procfs.c (procfs_detach): Likewise.
10734 (do_detach): Remove signo parameter.
10735 * record.c (record_detach): Remove args parameter.
10736 * record.h (record_detach): Likewise.
10737 * remote-sim.c (gdbsim_detach): Likewise.
10738 * remote.c (remote_detach_1): Likewise.
10739 (remote_detach): Likewise.
10740 (extended_remote_detach): Likewise.
10741 * sol-thread.c (sol_thread_detach): Likewise.
10742 * target-delegates.c: Re-generate.
10743 * top.c (struct qt_args) <args>: Remove field.
10744 (kill_or_detach): Don't pass args.
10745 (quit_force): Don't set args.
10746 * windows-nat.c (windows_detach): Remove args parameter.
10748 2018-01-19 Yao Qi <yao.qi@linaro.org>
10750 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10751 (arm_linux_init_abi): Install it.
10753 2018-01-19 Yao Qi <yao.qi@linaro.org>
10755 * osabi.c (gdb_osabi_names): Extend the regexp for
10756 arm-linux-gnueabihf.
10758 2018-01-18 Yao Qi <yao.qi@linaro.org>
10760 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10762 (abbrev_table::add_abbrev): Update.
10763 (abbrev_table::lookup_abbrev): Update.
10765 2018-01-18 Yao Qi <yao.qi@linaro.org>
10767 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10769 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10771 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10774 2018-01-17 Tom Tromey <tom@tromey.com>
10776 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10778 2018-01-17 Tom Tromey <tom@tromey.com>
10780 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10781 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10782 (create_array_type_with_stride): Update.
10783 * dwarf2read.c (set_die_type): Update.
10785 2018-01-17 Tom Tromey <tom@tromey.com>
10787 * dwarf2read.c (delayed_method_info): Remove typedef.
10788 (dwarf2_cu::method_info): Now a std::vector.
10789 (add_to_method_list): Update.
10790 (free_delayed_list): Remove.
10791 (compute_delayed_physnames): Update.
10792 (process_full_comp_unit, process_full_type_unit): Clear the method
10793 list. Remove cleanups.
10794 (psymtab_include_file_name): Add name_holder parameter. Use
10795 unique_xmalloc_ptr.
10796 (dwarf_decode_lines): Update.
10798 2018-01-17 Tom Tromey <tom@tromey.com>
10799 Simon Marchi <simon.marchi@ericsson.com>
10801 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10802 (dwarf2_per_objfile::free_cached_comp_units)
10803 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10804 (init_cutu_and_read_dies_no_follow): Update.
10805 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10806 (dwarf2_cu::~dwarf2_cu): New.
10807 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10808 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10810 2018-01-17 Tom Tromey <tom@tromey.com>
10811 Simon Marchi <simon.marchi@ericsson.com>
10813 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10814 (struct die_reader_specs) <abbrev_table>: New member.
10815 (struct abbrev_table): Add constructor.
10816 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10817 <abbrev_obstack>: Now an auto_obstack.
10818 (abbrev_table_up): New typedef.
10819 (init_cu_die_reader): Add abbrev_table parameter.
10820 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10821 Add result_dwo_abbrev_table.
10822 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10823 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10825 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10827 (skip_children): Update.
10828 (abbrev_table::alloc_abbrev): Rename from
10829 abbrev_table_alloc_abbrev.
10830 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10831 (abbrev_table::lookup_abbrev): Rename from
10832 abbrev_table_lookup_abbrev.
10833 (abbrev_table_read_table): Return abbrev_table_up.
10834 (abbrev_table_free, abbrev_table_free_cleanup)
10835 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10836 (load_partial_dies): Update.
10838 2018-01-17 Tom Tromey <tom@tromey.com>
10840 * dwarf2read.c (dwarf2_compute_name): Update comment.
10841 (read_func_scope, read_variable): Update.
10842 (new_symbol): Remove.
10843 (new_symbol_full): Rename to new_symbol.
10845 2018-01-17 Mike Gulick <mgulick@mathworks.com>
10848 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10849 a warning instead of throwing an error, set section size to 0 and return
10851 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10853 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10855 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10857 (linux_ptrace_attach_fail_reason_string): Likewise.
10858 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10860 (linux_ptrace_attach_fail_reason_string): Likewise.
10861 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10863 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10865 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10867 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10870 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10871 checking for fs_base/gs_base fields in struct user_regs_struct.
10872 * configure: Regenerate.
10874 2018-01-17 Yao Qi <yao.qi@linaro.org>
10876 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10878 (aarch64_linux_init_abi): Install it to gdbarch hook
10879 gcc_target_options.
10881 2018-01-15 Pedro Alves <palves@redhat.com>
10883 * common/signals-state-save-restore.c
10884 (save_original_signals_state): Fix typos.
10886 2017-01-12 Tom Tromey <tom@tromey.com>
10887 Sergio Durigan Junior <sergiodj@redhat.com>
10889 * Makefile.in (install-only): Install gdb-add-index.
10891 2018-01-12 John Baldwin <jhb@FreeBSD.org>
10893 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10895 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10897 * infrun.c (keep_going_pass_signal): Clear step-over info when
10898 insert_breakpoints fails.
10900 2018-01-11 Pedro Alves <palves@redhat.com>
10903 * infrun.c (resume): Rename to ...
10904 (resume_1): ... this.
10905 (resume): Reimplement as wrapper around resume_1.
10907 2018-01-11 Pedro Alves <palves@redhat.com>
10910 * remote.c (remote_parse_stop_reply): Default to the last-set
10911 general thread instead of to 'magic_null_ptid'.
10913 2018-01-10 Pedro Alves <palves@redhat.com>
10915 * language.h (language_get_symbol_name_matcher): Rename ...
10916 (get_symbol_name_matcher): ... this.
10917 * language.c (language_get_symbol_name_matcher): Ditto.
10918 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10921 2018-01-10 Pedro Alves <palves@redhat.com>
10925 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10926 Adjust to use language_get_symbol_name_matcher instead of
10927 language_defn::la_get_symbol_name_matcher.
10928 * language.c (language_get_symbol_name_matcher): If in Ada mode
10929 and the lookup name is a verbatim match, return Ada's matcher.
10930 * language.h (language_get_symbol_name_matcher): Adjust comment.
10931 (ada_lookup_name_info::verbatim_p):: New method.
10933 2018-01-10 Pedro Alves <palves@redhat.com>
10936 * ada-lang.c (ada_collect_symbol_completion_matches): If the
10937 minsym's language is language_auto or language_cplus, pass down
10938 language_ada instead.
10939 * symtab.c (compare_symbol_name): Don't frob symbol language here.
10941 2018-01-10 Pedro Alves <palves@redhat.com>
10944 * minsyms.c (linkage_name_str): New function.
10945 (iterate_over_minimal_symbols): Use it.
10947 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10949 * NEWS: Document that 'info proc' now works on FreeBSD.
10951 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10953 * configure.ac: Check for kinfo_getfile in libutil.
10954 * configure: Regenerate.
10955 * config.in: Regenerate.
10956 * fbsd-nat.c: Include "fbsd-tdep.h".
10957 (fbsd_fetch_cmdline): New.
10958 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10959 rather than calling error.
10960 (fbsd_info_proc): New.
10961 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10962 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10963 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10965 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10967 * fbsd-nat.c (struct free_deleter): Remove.
10968 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10970 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10972 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10973 NULL for an empty pathname.
10975 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10977 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10978 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10979 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10980 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10981 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10982 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10983 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10984 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10985 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10986 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10987 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10988 (fbsd_core_fetch_timeval, fbsd_print_sigset)
10989 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10990 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
10991 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10993 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
10995 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10996 (gnu_xfer_auxv): New function.
10997 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10998 TARGET_OBJECT_AUXV.
11000 2018-01-08 Yao Qi <yao.qi@linaro.org>
11001 Simon Marchi <simon.marchi@ericsson.com>
11003 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11005 (COMMON_OBS): Remove selftest.o.
11006 * configure.ac: Append selftest-arch.c and common/selftest.c to
11007 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
11008 * configure: Re-generated.
11009 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11011 (maintenance_info_selftests): Likewise.
11013 2018-01-08 Xavier Roirand <roirand@adacore.com>
11015 * ada-valprint.c (val_print_packed_array_elements): Use
11016 proper number of elements when printing an array indexed
11017 by an enumeration type.
11019 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11021 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11022 (dw2_get_file_names_reader): Adjust.
11023 (lookup_dwo_signatured_type): Adjust.
11024 (lookup_dwp_signatured_type): Adjust.
11025 (lookup_signatured_type): Adjust.
11026 (create_type_unit_group): Adjust.
11027 (get_type_unit_group): Adjust.
11028 (process_psymtab_comp_unit_reader): Adjust.
11029 (build_type_psymtabs_reader): Adjust.
11030 (scan_partial_symbols): Adjust.
11031 (add_partial_symbol): Adjust.
11032 (add_partial_subprogram): Adjust.
11033 (peek_die_abbrev): Adjust.
11034 (fixup_go_packaging): Adjust.
11035 (process_imported_unit_die): Adjust.
11036 (dwarf2_compute_name): Adjust.
11037 (dwarf2_physname): Adjust.
11038 (read_import_statement): Adjust.
11039 (handle_DW_AT_stmt_list): Adjust.
11040 (read_file_scope): Adjust.
11041 (read_func_scope): Adjust.
11042 (read_lexical_block_scope): Adjust.
11043 (read_call_site_scope): Adjust.
11044 (read_variable): Adjust.
11045 (dwarf2_rnglists_process): Adjust.
11046 (dwarf2_ranges_process): Adjust.
11047 (dwarf2_ranges_read): Adjust.
11048 (dwarf2_get_pc_bounds): Adjust.
11049 (dwarf2_record_block_ranges): Adjust.
11050 (dwarf2_add_field): Adjust.
11051 (dwarf2_add_member_fn): Adjust.
11052 (read_structure_type): Adjust.
11053 (process_structure_scope): Adjust.
11054 (read_enumeration_type): Adjust.
11055 (read_array_type): Adjust.
11056 (mark_common_block_symbol_computed): Adjust.
11057 (read_common_block): Adjust.
11058 (read_namespace_type): Adjust.
11059 (read_namespace): Adjust.
11060 (read_module_type): Adjust.
11061 (read_tag_pointer_type): Adjust.
11062 (read_tag_ptr_to_member_type): Adjust.
11063 (read_tag_string_type): Adjust.
11064 (read_subroutine_type): Adjust.
11065 (read_typedef): Adjust.
11066 (read_base_type): Adjust.
11067 (attr_to_dynamic_prop): Adjust.
11068 (read_subrange_type): Adjust.
11069 (read_unspecified_type): Adjust.
11070 (dwarf2_read_abbrevs): Adjust.
11071 (load_partial_dies): Adjust.
11072 (read_partial_die): Adjust.
11073 (find_partial_die): Adjust.
11074 (guess_partial_die_structure_name): Adjust.
11075 (fixup_partial_die): Adjust.
11076 (read_attribute_value): Adjust.
11077 (read_addr_index): Adjust.
11078 (read_addr_index_from_leb128): Adjust.
11079 (read_str_index): Adjust.
11080 (dwarf2_string_attr): Adjust.
11081 (get_debug_line_section): Adjust.
11082 (dwarf_decode_line_header): Adjust.
11083 (lnp_state_machine::check_line_address): Adjust.
11084 (dwarf_decode_lines_1): Adjust.
11085 (dwarf_decode_lines): Adjust.
11086 (dwarf2_start_symtab): Adjust.
11087 (var_decode_location): Adjust.
11088 (new_symbol_full): Adjust.
11089 (dwarf2_const_value_data): Adjust.
11090 (dwarf2_const_value_attr): Adjust.
11091 (dwarf2_const_value): Adjust.
11092 (die_type): Adjust.
11093 (die_containing_type): Adjust.
11094 (build_error_marker_type): Adjust.
11095 (lookup_die_type): Adjust.
11096 (guess_full_die_structure_name): Adjust.
11097 (anonymous_struct_prefix): Adjust.
11098 (determine_prefix): Adjust.
11099 (dwarf2_name): Adjust.
11100 (follow_die_ref_or_sig): Adjust.
11101 (follow_die_offset): Adjust.
11102 (follow_die_ref): Adjust.
11103 (follow_die_sig_1): Adjust.
11104 (follow_die_sig): Adjust.
11105 (get_signatured_type): Adjust.
11106 (get_DW_AT_signature_type): Adjust.
11107 (decode_locdesc): Adjust.
11108 (dwarf_decode_macros): Adjust.
11109 (cu_debug_loc_section): Adjust.
11110 (fill_in_loclist_baton): Adjust.
11111 (dwarf2_symbol_mark_computed): Adjust.
11112 (init_one_comp_unit): Don't assign
11113 dwarf2_cu::dwarf2_per_objfile.
11114 (set_die_type): Adjust.
11116 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11118 * dwarf2read.c (struct mapped_debug_names): Add constructor.
11119 <dwarf2_per_objfile>: New field.
11120 (dwarf2_per_objfile): Remove global.
11121 (get_dwarf2_per_objfile): New function.
11122 (set_dwarf2_per_objfile): New function.
11123 (dwarf2_build_psymtabs_hard): Change objfile parameter to
11124 dwarf2_per_objfile.
11125 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11126 (read_abbrev_offset): Likewise.
11127 (read_indirect_string): Likewise.
11128 (read_indirect_line_string): Likewise.
11129 (read_indirect_string_at_offset): Likewise.
11130 (read_indirect_string_from_dwz): Likewise.
11131 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11132 dwarf2_per_objfile.
11133 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11134 (create_all_comp_units): Change objfile parameter to
11135 dwarf2_per_objfile.
11136 (create_all_type_units): Likewise.
11137 (process_queue): Add dwarf2_per_objfile parameter.
11138 (read_and_check_comp_unit_head): Likewise.
11139 (lookup_dwo_unit_in_dwp): Likewise.
11140 (get_dwp_file): Likewise.
11141 (process_cu_includes): Likewise.
11142 (struct free_dwo_file_cleanup_data): New struct.
11143 (dwarf2_has_info): Use get_dwarf2_per_objfile and
11144 set_dwarf2_per_objfile.
11145 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11146 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11147 context, adjust calls.
11148 (dw2_instantiate_symtab): Likewise.
11149 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11150 (dw2_get_cu): Likewise.
11151 (create_cu_from_index_list): Change objfile parameter to
11152 dwarf2_per_objfile.
11153 (create_cus_from_index_list): Get dwarf2_per_objfile from
11154 context, adjust calls.
11155 (create_cus_from_index): Likewise.
11156 (create_signatured_type_table_from_index): Change objfile
11157 parameter to dwarf2_per_objfile.
11158 (create_signatured_type_table_from_debug_names): Change objfile
11159 parameter to dwarf2_per_objfile.
11160 (create_addrmap_from_index): Likewise.
11161 (create_addrmap_from_aranges): Likewise.
11162 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11163 (dw2_setup): Remove.
11164 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11166 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11167 get_dwarf2_per_objfile.
11168 (dw2_forget_cached_source_info): Likewise.
11169 (dw2_map_symtabs_matching_filename): Likewise.
11170 (struct dw2_symtab_iterator) <index>: Remove.
11171 <dwarf2_per_objfile>: New field.
11172 (dw2_symtab_iter_init): Replace index parameter with
11173 dwarf2_per_objfile.
11174 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11175 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11176 (dw2_print_stats): Likewise.
11177 (dw2_dump): Likewise.
11178 (dw2_expand_symtabs_for_function): Likewise.
11179 (dw2_expand_all_symtabs): Likewise.
11180 (dw2_expand_symtabs_with_fullname): Likewise.
11181 (dw2_expand_marked_cus): Replace index and objfile parameters
11182 with dwarf2_per_objfile.
11183 (dw_expand_symtabs_matching_file_matcher): Add
11184 dwarf2_per_objfile parameter and adjust calls.
11185 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11187 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11188 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11190 (create_cus_from_debug_names_list): Replace objfile parameter
11191 with dwarf2_per_objfile and adjust calls.
11192 (create_cus_from_debug_names): Likewise.
11193 (dwarf2_read_debug_names): Likewise.
11194 (mapped_debug_names::namei_to_name): Adjust call.
11195 (dw2_debug_names_iterator::next): Likewise.
11196 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11197 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11198 (dw2_debug_names_dump): Likewise.
11199 (dw2_debug_names_expand_symtabs_for_function): Likewise.
11200 (dw2_debug_names_expand_symtabs_matching): Likewise.
11201 (dwarf2_initialize_objfile): Likewise.
11202 (dwarf2_build_psymtabs): Likewise.
11203 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11205 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11206 (read_and_check_comp_unit_head): Likewise.
11207 (read_abbrev_offset): Likewise.
11208 (create_debug_type_hash_table): Likewise.
11209 (create_debug_types_hash_table): Likewise.
11210 (create_all_type_units): Replace objfile parameter with
11211 dwarf2_per_objfile.
11212 (add_type_unit): Add dwarf2_per_objfile parameter.
11213 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11214 with dwarf2_per_objfile.
11215 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11216 (lookup_dwp_signatured_type): Likewise.
11217 (lookup_signatured_type): Likewise.
11218 (read_cutu_die_from_dwo): Likewise.
11219 (init_tu_and_read_dwo_dies): Likewise.
11220 (init_cutu_and_read_dies): Likewise.
11221 (init_cutu_and_read_dies_no_follow): Likewise.
11222 (allocate_type_unit_groups_table): Add objfile parameter.
11223 (create_type_unit_group): Use dwarf2_per_objfile from cu.
11224 (get_type_unit_group): Likewise.
11225 (process_psymtab_comp_unit): Update call.
11226 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11227 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11228 (print_tu_stats): Likewise.
11229 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11230 in void* parameter.
11231 (build_type_psymtabs): Change objfile parameter to
11232 dwarf2_per_objfile.
11233 (process_skeletonless_type_unit): Use dwarf2_per_objfile
11234 passed in void* parameter.
11235 (process_skeletonless_type_units): Change objfile parameter to
11236 dwarf2_per_objfile.
11237 (set_partial_user): Likewise.
11238 (dwarf2_build_psymtabs_hard): Likewise.
11239 (read_comp_units_from_section): Likewise.
11240 (create_all_comp_units): Likewise.
11241 (scan_partial_symbols): Update calls.
11242 (add_partial_symbol): Likewise.
11243 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11244 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11245 (process_queue): Add dwarf2_per_objfile parameter.
11246 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11247 (compute_compunit_symtab_includes): Likewise.
11248 (process_cu_includes): Add dwarf2_per_objfile parameter.
11249 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11250 (process_full_type_unit): Likewise.
11251 (process_imported_unit_die): Update call.
11252 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11253 (read_file_scope): Likewise.
11254 (allocate_dwo_file_hash_table): Add objfile parameter.
11255 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
11256 (create_cus_hash_table): Likewise.
11257 (create_dwp_hash_table): Likewise.
11258 (create_dwo_unit_in_dwp_v1): Likewise.
11259 (create_dwp_v2_section): Likewise.
11260 (create_dwo_unit_in_dwp_v2): Likewise.
11261 (lookup_dwo_unit_in_dwp): Likewise.
11262 (try_open_dwop_file): Likewise.
11263 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11264 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11265 cleanup to include a reference to dwarf2_per_objfile.
11266 (open_dwp_file): Add dwarf2_per_objfile parameter.
11267 (open_and_init_dwp_file): Likewise.
11268 (get_dwp_file): Likewise.
11269 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11270 (queue_and_load_all_dwo_tus): Update call.
11271 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
11273 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
11274 (dwarf2_ranges_process): Likewise.
11275 (dwarf2_get_pc_bounds): Likewise.
11276 (mark_common_block_symbol_computed): Likewise.
11277 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11278 (dwarf2_read_abbrevs): Update call.
11279 (read_partial_die): Use dwarf2_per_objfile from cu.
11280 (find_partial_die): Likewise.
11281 (fixup_partial_die): Likewise.
11282 (read_attribute_value): Likewise.
11283 (read_indirect_string_at_offset_from): Add objfile parameter.
11284 (read_indirect_string_at_offset): Add dwarf2_per_objfile
11286 (read_indirect_string_from_dwz): Add objfile parameter.
11287 (read_indirect_string): Add objfile parameter.
11288 (read_addr_index_1): Add dwarf2_per_objfile parameter.
11289 (read_addr_index): Use dwarf2_per_objfile from cu.
11290 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11292 (read_str_index): Use dwarf2_per_objfile from cu.
11293 (get_debug_line_section): Likewise.
11294 (read_formatted_entries): Add dwarf2_per_objfile parameter.
11295 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11296 (new_symbol_full): Use dwarf2_per_objfile from cu.
11297 (build_error_marker_type): Likewise.
11298 (lookup_die_type): Likewise.
11299 (determine_prefix): Likewise.
11300 (follow_die_offset): Likewise.
11301 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11302 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11303 (dwarf2_fetch_die_type_sect_off): Likewise.
11304 (dwarf2_get_die_type): Likewise.
11305 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11306 (get_signatured_type): Likewise.
11307 (get_DW_AT_signature_type): Likewise.
11308 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11309 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11310 (cu_debug_loc_section): Likewise.
11311 (fill_in_loclist_baton): Likewise.
11312 (dwarf2_symbol_mark_computed): Likewise.
11313 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11314 dwarf2_per_objfile.
11315 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11317 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11318 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11319 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11320 (set_die_type): Use dwarf2_free_objfile from cu.
11321 (get_die_type_at_offset): Likewise.
11322 (dwarf2_per_objfile_free): Don't assign global variable.
11323 (debug_names) <constructor>: Add dwarf2_per_objfile
11324 parameter, update m_debugstrlookup construction.
11325 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11327 <m_dwarf2_per_objfile>: New field.
11328 <lookup>: Use m_dwarf2_per_objfile.
11329 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11330 (psyms_seen_size): Likewise.
11331 (write_gdbindex): Replace objfile parameter with
11332 dwarf2_per_objfile.
11333 (write_debug_names): Likewise.
11334 (write_psymtabs_to_index): Likewise.
11335 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11338 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11340 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11341 <dwarf2_per_objfile>: New field.
11342 (struct dwarf2_per_cu_data) <objfile>: Remove.
11343 <dwarf2_per_objfile>: New field.
11344 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11346 (create_signatured_type_table_from_index): Likewise.
11347 (create_debug_type_hash_table): Likewise.
11348 (fill_in_sig_entry_from_dwo_entry): Likewise.
11349 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11350 (create_type_unit_group): Assign dwarf2_per_objfile instead of
11352 (create_partial_symtab): Access objfile through
11353 dwarf2_per_objfile.
11354 (process_psymtab_comp_unit_reader): Likewise.
11355 (read_comp_units_from_section): Likewise.
11356 (scan_partial_symbols): Likewise.
11357 (add_partial_symbol): Likewise.
11358 (add_partial_subprogram): Likewise.
11359 (peek_die_abbrev): Likewise.
11360 (fixup_go_packaging): Likewise.
11361 (process_full_comp_unit): Likewise.
11362 (process_full_type_unit): Likewise.
11363 (process_imported_unit_die): Likewise.
11364 (dwarf2_compute_name): Likewise.
11365 (dwarf2_physname): Likewise.
11366 (read_import_statement): Likewise.
11367 (create_cus_hash_table): Assign dwarf2_physname instead of
11369 (read_func_scope): Access objfile through dwarf2_per_objfile.
11370 (read_lexical_block_scope): Likewise.
11371 (read_call_site_scope): Likewise.
11372 (read_variable): Likewise.
11373 (dwarf2_rnglists_process): Likewise.
11374 (dwarf2_ranges_process): Likewise.
11375 (dwarf2_ranges_read): Likewise.
11376 (dwarf2_record_block_ranges): Likewise.
11377 (dwarf2_add_field): Likewise.
11378 (dwarf2_add_member_fn): Likewise.
11379 (read_structure_type): Likewise.
11380 (process_structure_scope): Likewise.
11381 (read_enumeration_type): Likewise.
11382 (read_array_type): Likewise.
11383 (read_common_block): Likewise.
11384 (read_namespace_type): Likewise.
11385 (read_namespace): Likewise.
11386 (read_module_type): Likewise.
11387 (read_tag_pointer_type): Likewise.
11388 (read_tag_ptr_to_member_type): Likewise.
11389 (read_tag_string_type): Likewise.
11390 (read_subroutine_type): Likewise.
11391 (read_typedef): Likewise.
11392 (read_base_type): Likewise.
11393 (attr_to_dynamic_prop): Likewise.
11394 (read_subrange_type): Likewise.
11395 (read_unspecified_type): Likewise.
11396 (load_partial_dies): Likewise.
11397 (read_partial_die): Likewise.
11398 (find_partial_die): Likewise.
11399 (guess_partial_die_structure_name): Likewise.
11400 (fixup_partial_die): Likewise.
11401 (read_attribute_value): Likewise.
11402 (read_addr_index_from_leb128): Likewise.
11403 (dwarf2_read_addr_index): Likewise.
11404 (dwarf2_string_attr): Likewise.
11405 (lnp_state_machine::check_line_address): Likewise.
11406 (dwarf_decode_lines_1): Likewise.
11407 (dwarf_decode_lines): Likewise.
11408 (dwarf2_start_symtab): Likewise.
11409 (var_decode_location): Likewise.
11410 (new_symbol_full): Likewise.
11411 (dwarf2_const_value_data): Likewise.
11412 (dwarf2_const_value_attr): Likewise.
11413 (dwarf2_const_value): Likewise.
11414 (die_type): Likewise.
11415 (die_containing_type): Likewise.
11416 (lookup_die_type): Likewise.
11417 (guess_full_die_structure_name): Likewise.
11418 (anonymous_struct_prefix): Likewise.
11419 (dwarf2_name): Likewise.
11420 (follow_die_ref_or_sig): Likewise.
11421 (follow_die_offset): Likewise.
11422 (follow_die_ref): Likewise.
11423 (dwarf2_fetch_die_loc_sect_off): Likewise.
11424 (dwarf2_fetch_constant_bytes): Likewise.
11425 (dwarf2_fetch_die_type_sect_off): Likewise.
11426 (dwarf2_get_die_type): Likewise.
11427 (follow_die_sig): Likewise.
11428 (decode_locdesc): Likewise.
11429 (dwarf2_per_cu_objfile): Likewise.
11430 (dwarf2_per_cu_text_offset): Likewise.
11431 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11433 (set_die_type): Access objfile through
11434 dwarf2_per_objfile.
11436 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11438 * valprint.c (converted_character_d): Remove typedef.
11439 (DEF_VEC_O (converted_character_d)): Remove.
11440 (count_next_character): Use std::vector.
11441 (print_converted_chars_to_obstack): Likewise.
11442 (generic_printstr): Likewise.
11444 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11446 * xml-support.h (struct gdb_xml_value): Add constructor.
11447 <value>: Change type to unique_xmalloc_ptr.
11448 (gdb_xml_value_s): Remove typedef.
11449 (DEF_VEC_O (gdb_xml_value_s)): Remove.
11450 (gdb_xml_element_start_handler): Change parameter type to
11452 (xml_find_attribute): Likewise.
11453 * xml-support.c (xml_find_attribute): Change parameter type to
11454 std::vector and adjust.
11455 (gdb_xml_values_cleanup): Remove.
11456 (gdb_xml_parser::start_element): Adjust to std::vector.
11457 (xinclude_start_include): Change paraeter type to std::vector
11459 * btrace.c (check_xml_btrace_version): Likewise.
11460 (parse_xml_btrace_block): Likewise.
11461 (parse_xml_btrace_pt_config_cpu): Likewise.
11462 (parse_xml_btrace_pt): Likewise.
11463 (parse_xml_btrace_conf_bts): Likewise.
11464 (parse_xml_btrace_conf_pt): Likewise.
11465 * memory-map.c (memory_map_start_memory): Likewise.
11466 (memory_map_start_property): Likewise.
11467 * osdata.c (osdata_start_osdata): Likewise.
11468 (osdata_start_item): Likewise.
11469 (osdata_start_column): Likewise.
11470 * remote.c (start_thread): Likewise.
11471 * solib-aix.c (library_list_start_library): Likewise.
11472 (library_list_start_list): Likewise.
11473 * solib-svr4.c (library_list_start_library): Likewise.
11474 (svr4_library_list_start_list): Likewise.
11475 * solib-target.c (library_list_start_segment): Likewise.
11476 (library_list_start_section): Likewise.
11477 (library_list_start_library): Likewise.
11478 (library_list_start_list): Likewise.
11479 * tracepoint.c (traceframe_info_start_memory): Likewise.
11480 (traceframe_info_start_tvar): Likewise.
11481 * xml-syscall.c (syscall_start_syscall): Likewise.
11482 * xml-tdesc.c (tdesc_start_target): Likewise.
11483 (tdesc_start_feature): Likewise.
11484 (tdesc_start_reg): Likewise.
11485 (tdesc_start_union): Likewise.
11486 (tdesc_start_struct): Likewise.
11487 (tdesc_start_flags): Likewise.
11488 (tdesc_start_enum): Likewise.
11489 (tdesc_start_field): Likewise.
11490 (tdesc_start_enum_value): Likewise.
11491 (tdesc_start_vector): Likewise.
11493 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11495 * extension.h (struct xmethod_worker) <clone>: Remove.
11496 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11498 (python_xmethod_worker::clone): Remove.
11499 * valops.c (find_overload_match): Use std::move instead of
11502 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11504 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11505 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11506 <free_xmethod_worker_data>: Remove.
11507 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11508 <get_xmethod_arg_types>: Remove.
11509 <get_xmethod_result_type>: Remove.
11510 <invoke_xmethod>: Remove.
11511 * extension.c (new_xmethod_worker): Remove.
11512 (clone_xmethod_worker): Remove.
11513 (get_matching_xmethod_workers): Return void, pass std::vector by
11515 (get_xmethod_arg_types): Rename to...
11516 (xmethod_worker::get_arg_types): ... this, and adjust.
11517 (get_xmethod_result_type): Rename to...
11518 (xmethod_worker::get_result_type): ... this, and adjust.
11519 (invoke_xmethod): Remove.
11520 (free_xmethod_worker): Remove.
11521 (free_xmethod_worker_vec): Remove.
11522 * extension.h (enum ext_lang_rc): Move here from
11524 (struct xmethod_worker): Add constructor and destructor.
11527 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11528 virtual pure methods.
11529 <get_arg_types, get_result_type>: New methods.
11530 (xmethod_worker_ptr): Remove typedef.
11531 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11532 (xmethod_worker_vec): Remove typedef.
11533 (xmethod_worker_up): New typedef.
11534 (invoke_xmethod): Remove.
11535 (clone_xmethod_worker): Remove.
11536 (free_xmethod_worker): Remove.
11537 (free_xmethod_worker_vec): Remove.
11538 (get_xmethod_arg_types): Remove.
11539 (get_xmethod_result_type): Remove.
11540 * valops.c (find_method_list): Use std::vector, don't use
11541 intermediate vector.
11542 (value_find_oload_method_list): Use std::vector.
11543 (find_overload_match): Use std::vector.
11544 (find_oload_champ): Use std::vector.
11545 * value.c (value_free): Use operator delete.
11546 (value_of_xmethod): Rename to...
11547 (value_from_xmethod): ... this. Don't assign
11548 xmethod_worker::value, take rvalue-reference.
11549 (result_type_of_xmethod): Adjust.
11550 (call_xmethod): Adjust.
11551 * value.h: Include extension.h.
11552 (struct xmethod_worker): Don't forward-declare.
11553 (value_of_xmethod): Rename to...
11554 (value_from_xmethod): ... this, take rvalue-reference.
11555 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11556 (struct python_xmethod_worker): ... this, add constructor and
11558 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11559 (gdbpy_free_xmethod_worker_data): Rename to...
11560 (python_xmethod_worker::~python_xmethod_worker): ... this and
11562 (gdbpy_clone_xmethod_worker_data): Rename to...
11563 (python_xmethod_worker::clone): ... this and adjust.
11564 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11566 (gdbpy_get_xmethod_arg_types): Rename to...
11567 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11568 (gdbpy_get_xmethod_result_type): Rename to...
11569 (python_xmethod_worker::do_get_result_type): ... this and
11571 (gdbpy_invoke_xmethod): Rename to...
11572 (python_xmethod_worker::invoke): ... this and adjust.
11573 (new_python_xmethod_worker): Rename to...
11574 (python_xmethod_worker::python_xmethod_worker): ... this and
11576 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11578 (gdbpy_free_xmethod_worker_data): Remove.
11579 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11580 (gdbpy_get_xmethod_arg_types): Remove.
11581 (gdbpy_get_xmethod_result_type): Remove.
11582 (gdbpy_invoke_xmethod): Remove.
11583 * python/python.c (python_extension_ops): Remove obsolete
11586 2018-01-05 Pedro Alves <palves@redhat.com>
11589 * common/signals-state-save-restore.c
11590 (save_original_signals_state): New parameter 'quiet'. Warn if we
11591 find a custom handler preinstalled, instead of internal erroring.
11592 But only warn if !quiet.
11593 * common/signals-state-save-restore.h
11594 (save_original_signals_state): New parameter 'quiet'.
11595 * main.c (captured_main_1): Move save_original_signals_state call
11596 after option handling, and pass QUIET.
11598 2018-01-05 Pedro Alves <palves@redhat.com>
11600 * spu-tdep.c (spu_catch_start): Pass
11601 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11603 2018-01-05 Pedro Alves <palves@redhat.com>
11606 * ada-lang.c (literal_symbol_name_matcher): New function.
11607 (ada_get_symbol_name_matcher): Use it for
11608 symbol_name_match_type::SEARCH_NAME.
11609 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11610 it down instead of assuming symbol_name_match_type::FULL.
11611 * block.h (block_lookup_symbol): New parameter 'match_type'.
11612 * c-valprint.c (print_unpacked_pointer): Use
11613 lookup_symbol_search_name instead of lookup_symbol.
11614 * compile/compile-object-load.c (get_out_value_type): Pass down
11615 symbol_name_match_type::SEARCH_NAME.
11616 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11617 symbol_name_match_type::FULL.
11618 * cp-support.c (cp_get_symbol_name_matcher): Handle
11619 symbol_name_match_type::SEARCH_NAME.
11620 * infrun.c (insert_exception_resume_breakpoint): Use
11621 lookup_symbol_search_name.
11622 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11623 * psymtab.c (maintenance_check_psymtabs): Use
11624 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11625 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11626 SYMBOL_SEARCH_NAME.
11627 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11628 if symbol_name_match_type::SEARCH_NAME.
11629 (lookup_symbol_in_language): Pass down
11630 symbol_name_match_type::FULL.
11631 (lookup_symbol_search_name): New.
11632 (lookup_language_this): Pass down
11633 symbol_name_match_type::SEARCH_NAME.
11634 (lookup_symbol_aux, lookup_local_symbol): New parameter
11635 'match_type'. Pass it down.
11636 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11637 (lookup_symbol_search_name): New declaration.
11638 (lookup_symbol_in_block): New 'match_type' parameter.
11640 2018-01-05 Pedro Alves <palves@redhat.com>
11643 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11645 (ada_lookup_symbol): Reimplement in terms of
11646 ada_lookup_symbol_list, bits factored out from
11647 ada_lookup_encoded_symbol.
11649 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11651 * ada-exp.y (write_object_renaming): When subscripting an array
11652 using a symbol as the index, pass the block in call to
11653 ada_lookup_encoded_symbol when looking that symbol up.
11655 2018-01-05 Jerome Guitton <guitton@adacore.com>
11657 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11660 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11662 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11663 the case where VALUE_LVAL (val0) is not lval_memory.
11665 2018-01-05 Xavier Roirand <roirand@adacore.com>
11667 * ada-valprint.c (print_optional_low_bound): Handle
11668 character-indexed array printing like boolean-indexed array
11671 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11673 * NEWS: Create a new section for the next release branch.
11674 Rename the section of the current branch, now that it has
11677 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11679 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11680 * version.in: Bump version to 8.1.50.DATE-git.
11682 2018-01-03 Xavier Roirand <roirand@adacore.com>
11684 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11686 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11688 (default_exception_support_info) <catch_handlers_sym>: Add field.
11689 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11690 (ada_exception_name_addr_1): Add "catch handlers" handling.
11691 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11692 Update all callers.
11693 (create_excep_cond_exprs) <ex>: Add parameter.
11694 (re_set_exception): Update create_excep_cond_exprs call.
11695 (print_it_exception, print_one_exception, print_mention_exception)
11696 (print_recreate_exception): Add "catch handler" handling.
11697 (allocate_location_catch_handlers, re_set_catch_handlers)
11698 (check_status_catch_handlers, print_it_catch_handlers)
11699 (print_one_catch_handlers, print_mention_catch_handlers)
11700 (print_recreate_catch_handlers): New function.
11701 (catch_handlers_breakpoint_ops): New variable.
11702 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11703 Add parameter. Add "catch handler" handling.
11704 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11705 Add "catch handler" handling.
11706 (ada_exception_catchpoint_cond_string): Add "catch handler"
11708 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11710 (catch_ada_handlers_command): New function.
11711 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11712 operations structure.
11713 (_initialize_ada_language): Add "catch handlers" command entry.
11714 * NEWS: Document "catch handlers" feature.
11716 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11718 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11719 account when creating the array type of the slice.
11720 (ada_value_slice): Likewise.
11722 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11724 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11726 (create_array_type_with_stride): Add byte_stride_prop parameter.
11727 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11728 New parameter. Update all callers in this file.
11729 (array_type_has_dynamic_stride): New function.
11730 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11731 of arrays with dynamic byte strides.
11732 * dwarf2read.c (read_array_type): Add support for dynamic
11733 DW_AT_byte_stride attributes.
11735 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11737 * dwarf2read.c (read_unspecified_type): Treat
11738 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11740 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11742 Update copyright year range in all GDB files.
11744 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11746 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11747 and gdb/testsuite/gdb.base/step-line.c.
11749 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11751 * copyright.py (main): Dump the contents of
11752 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11753 even if BY_HAND is empty.
11755 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11757 * top.c (print_gdb_version): Update Copyright year in version
11760 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11762 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11764 For older changes see ChangeLog-2017.
11770 version-control: never