1 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
4 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
7 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
9 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
11 2018-08-19 Michael Spang <spang@google.com>
14 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
17 2018-08-18 Kevin Buettner <kevinb@redhat.com>
19 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
21 * dwarf2-frame.c (class dwarf_expr_executor):
22 Add override for dwarf_variable_value.
23 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
24 (class symbol_needs_eval_context): Likewise.
25 (indirect_synthetic_pointer): Add forward declaration.
26 (sect_variable_value): New function.
27 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
28 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
29 for DW_OP_GNU_variable_value.
31 2018-08-16 Tom Tromey <tom@tromey.com>
33 * top.c (read_command_file): Update.
34 (command_line_input): Remove "repeat" argument.
35 * ada-lang.c (get_selections): Update.
36 * linespec.c (decode_line_2): Update.
37 * defs.h (command_line_input): Remove argument.
38 * cli/cli-script.c (read_next_line): Update.
39 * python/py-gdb-readline.c: Update.
41 2018-08-17 Tom Tromey <tom@tromey.com>
43 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
46 2018-08-15 Tom Tromey <tom@tromey.com>
48 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
50 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
52 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
53 If used, use find_pc_partial_function to find address range
55 * mi/mi-main.c (mi_cmd_list_features): Report
56 "data-disassemble-a-option" feature.
57 * NEWS: Mention new -data-disassemble option -a.
59 2018-08-13 Tom Tromey <tom@tromey.com>
61 * common/common-defs.h (_FORTIFY_SOURCE): Define.
63 2018-08-13 Alan Hayward <alan.hayward@arm.com>
65 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
66 (aarch64_linux_collect_sve_regset): Likewise.
67 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
68 * regcache.h (regcache_map_entry_size): New function.
70 2018-08-13 Alan Hayward <alan.hayward@arm.com>
72 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
73 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
74 (SVE_HEADER_VL_LENGTH): Likewise.
75 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
76 (SVE_HEADER_FLAGS_LENGTH): Likewise.
77 (SVE_HEADER_RESERVED_LENGTH): Likewise.
78 (SVE_HEADER_SIZE_OFFSET): Likewise.
79 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
80 (SVE_HEADER_VL_OFFSET): Likewise.
81 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
82 (SVE_HEADER_FLAGS_OFFSET): Likewise.
83 (SVE_HEADER_RESERVED_OFFSET): Likewise.
84 (SVE_HEADER_SIZE): Likewise.
85 (aarch64_linux_core_read_vq): Add function.
86 (aarch64_linux_core_read_description): Check for SVE section.
88 2018-08-13 Alan Hayward <alan.hayward@arm.com>
91 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
93 * aarch64-linux-tdep.c
94 (aarch64_linux_iterate_over_regset_sections): Likewise.
96 (alpha_linux_iterate_over_regset_sections):
98 (alphanbsd_iterate_over_regset_sections): Likewise.
100 (amd64fbsd_iterate_over_regset_sections): Likewise.
102 (amd64_linux_iterate_over_regset_sections): Likewise.
104 (armbsd_iterate_over_regset_sections): Likewise.
106 (arm_fbsd_iterate_over_regset_sections): Likewise.
108 (arm_linux_iterate_over_regset_sections): Likewise.
109 * corelow.c (get_core_registers_cb): Likewise.
110 (core_target::fetch_registers): Likewise.
111 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
112 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
113 * gdbarch.h (void): Regenerate.
114 * gdbarch.sh: Add supply_size and collect_size.
115 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
116 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
117 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
118 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
119 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
120 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
121 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
122 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
123 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
124 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
125 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
126 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
127 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
128 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
129 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
130 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
131 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
132 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
133 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
134 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
135 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
136 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
137 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
138 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
139 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
140 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
141 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
142 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
143 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
144 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
146 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
148 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
151 2018-08-10 Keith Seitz <keiths@redhat.com>
153 * compile/compile-c-support.c (add_code_header, add_code_footer):
154 Move into policy class.
155 (c_push_user_expression, pop_user_expression_nop)
156 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
157 (compile_program): New host class.
158 (c_compile_program): New typedef.
159 (c_compute_porgram): Use c_compile_program.
161 2018-08-10 Keith Seitz <keiths@redhat.com>
163 * compile/compile-internal.h (compile_instance::~compile_instance):
164 Remove calls to htab_delete.
165 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
166 * compile.c (compile_instance::compile_instance): Initialize
167 htab unique pointers.
168 (compile_instance::get_cached_type, compile_instance::insert_type)
169 (compile_instance::error_symbol_once): Update for unique_ptr.
171 2018-08-10 Keith Seitz <keiths@redhat.com>
173 * compile/compile-c-symbols.c (struct symbol_error)
174 (hash_symbol_error, eq_symbol_error, del_symbol_error)
175 (compile_instance::insert_symbol_error)
176 (compile_instance::error_symbol_once): Move to ...
177 * compile/compile.c: ... here.
179 2018-08-10 Keith Seitz <keiths@redhat.com>
181 * compile/compile-c-support.c (c_get_compile_context): Use `new'
182 instead of `new_compile_instance'.
183 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
185 If the symbol error map is not initialized, create it.
186 (generate_c_for_for_one_symbol): Do not check/initialize
187 the symbol error map.
188 * compile/compile-c-types.c (compile_c_instance): Make a class.
190 (compile_instance::compile_instance): Initialize the type cache.
191 (get_cached_type): New function.
192 (insert_type): Update description.
193 (compile_c_instance::m_default_cflags): Define.
194 (convert_type): Update description. Use get_cached_type.
195 (delete_instance): Moved to destructor.
196 (new_compile_instance): Moved to constructor.
197 * compile/compile-c.h (compile_c_instance): Make class inheriting
198 from compile_instance.
199 <base>: Remove field.
200 <type_map, symbol_err_map>: Move to base class.
201 <c_plugin>: Rename to `m_plugin' and remove pointer type.
202 * compile/compile-internal.h (compile_instance): Make class.
203 <type_map_t, symbol_err_map_t>: Define.
204 <fe>: Rename to `m_gcc_fe'.
205 <scope, block, gcc_target_options>: Add `m_' prefix.
206 <m_type_map, m_symbol_err_map>: New fields, moved from
209 (convert_type, new_compile_instance): Remove.
210 * compile/compile.c (cleanup_compile_instance): Remove.
211 (compile_to_object): Use unique_ptr to eliminate cleanups.
212 (compile_instance::set_print_callback, compile_instance::version)
213 (compile_instance::set_verbose)
214 (compile_instance::set_driver_filename)
215 (compile_instance::set_triplet_regexp)
216 (compile_instance::set_arguments)
217 (compile_instance::set_source_file)
218 (compile_instance::compile): Define.
220 2018-08-10 Keith Seitz <keiths@redhat.com>
222 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
223 * compile/compile-c-types.c: Define GCC_METHODN macros and include
224 gcc-c-fe.def to define C plugin.
225 (delete_instance): Delete `c_plugin'.
226 (new_compile_instance): Initialize `c_plugin'.
227 * compile/compile-c.h: Include gcc_c_plugin.h.
228 (struct compile_c_instance) <c_plugin>: New member.
229 * gcc-c-plugin.h: New file.
230 Update all callers with API change.
232 2018-08-10 Keith Seitz <keiths@redhat.com>
234 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
235 (HFILES_NO_SRCDIR): ... to here.
236 Add compile-internal.h and compile-c.h.
237 * compile/compile-c-support.c: Include compile-c.h.
238 * compile/compile-c-symbols.c: Include compile-c.h.
239 (generate_c_for_variable_locations): Update comment.
240 * compile/compile-c-types.c: Include compile-c.h.
241 * compile/compile-c.h: New file -- moved C language declarations
242 from other files here.
243 * compile/compile-internal.h: Do not include hashtab.h or
245 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
246 (gcc_convert_symbol, gcc_symbol_address)
247 (generate_c_for_variable_locations, c_get_mode_for_size)
248 (c_get_range_decl_name): Definitions moved to compile-c.h.
249 * compile/compile-loc2c.c: Include compile-c.h.
251 2018-08-10 Keith Seitz <keiths@redhat.com>
253 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
254 (c_symbol_substitution_name): ... this.
257 2018-08-10 Keith Seitz <keiths@redhat.com>
259 * compile/compile-c-support.c (c_compute_program): Use
260 unique_xmalloc_ptr to eliminate cleanup.
261 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
262 Return a unique_xmalloc_ptr and eliminate cleanup.
263 * compile/compile-internal.h (generate_c_for_variable_locations):
264 Return unique_xmalloc_ptr and update description.
266 2018-08-10 Alan Hayward <alan.hayward@arm.com>
268 * corelow.c (core_target::get_core_register_section): Rename
269 min_size to section_min_size.
271 2018-08-09 Jim Wilson <jimw@sifive.com>
273 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
274 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
275 * NEWS: Mention new GNU/Linux RISC-V target.
276 * configure.host: Add riscv*-*-linux*.
277 * configure.nat: Add riscv*.
278 * configure.tgt: Add riscv*-*-linux*.
279 * riscv-linux-nat.c: New file.
280 * riscv-linux-tdep.c: New file.
282 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
284 * infrun.c (resume): Make static, add forward declaration.
285 (proceed): Update header comment.
286 * infrun.h (resume): Delete declaration.
288 2018-08-09 Tom Tromey <tom@tromey.com>
290 * riscv-tdep.h: Minor formatting fixes.
292 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
294 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
295 * dwarf-index-cache.c (create_dir_and_check): Likewise.
296 (test_mkdir_recursive): Likewise.
297 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
299 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
301 * valarith.c (value_subscripted_rvalue): If an array is not in
302 memory, and we don't know the upper bound, then we can't know that
303 the requested element exists or not.
305 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
307 * target.c (str_comma_list_concat_elem): Fix typo in comment.
308 (target_options_to_string): Add comment.
310 2018-08-08 Tom Tromey <tom@tromey.com>
312 * unittests/scoped_mmap-selftests.c: Check result of "write".
314 2018-08-08 Jim Wilson <jimw@sifive.com>
316 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
317 (decode_register_index_short): New.
318 (decode_j_type_insn, decode_cj_type_insn): New.
319 (decode_b_type_insn, decode_cb_type_insn): New.
320 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
321 local xlen. Check xlen when decoding ambiguous compressed insns. In
322 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
323 is_c_sw_insn instead of is_sw_insn.
324 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
325 (riscv_software_single_step): New.
326 * riscv-tdep.h (riscv_software_single_step): Declare.
328 * riscv-tdep.c (riscv_isa_xlen): Drop static.
329 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
331 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
334 * target.c (dispose_inferior): Don't dispose of inferiors that are
337 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
339 * remote.c (remote_target::download_tracepoint): Change char* to
342 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
344 * target.h (target_options_to_string): Return an std::string.
345 * target.c (str_comma_list_concat_elem): Return void, use
347 (do_option): Likewise.
348 (target_options_to_string): Return an std::string.
349 * linux-nat.c (linux_nat_target::wait): Adjust.
350 * target-debug.h (target_debug_print_options): Adjust.
352 2018-08-07 Tom Tromey <tom@tromey.com>
354 * Makefile.in (CPPFLAGS): New variable.
355 (INTERNAL_CPPFLAGS): Use it.
357 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
359 * NEWS: Mention the index cache.
361 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
363 * common/pathstuff.h (get_standard_cache_dir): New.
364 * common/pathstuff.c (get_standard_cache_dir): New.
365 * build-id.h (build_id_to_string): New.
366 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
367 DEBUG_STR_SUFFIX): Move to here.
368 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
369 DEBUG_STR_SUFFIX): Move from there.
370 (write_psymtabs_to_index): Make non-static, add basename
371 parameter. Write to temporary files, rename when done.
372 (save_gdb_index_command): Adjust call to
373 write_psymtabs_to_index.
374 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
376 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
377 (get_gdb_index_contents_from_cache): New.
378 (get_gdb_index_contents_from_cache_dwz): New.
379 (dwarf2_initialize_objfile): Read index from cache.
380 (dwarf2_build_psymtabs): Save to index.
381 * dwarf-index-cache.h: New file.
382 * dwarf-index-cache.c: New file.
383 * dwarf-index-write.h: New file.
385 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
387 * gnulib/aclocal.m4: Re-generate.
388 * gnulib/config.in: Re-generate.
389 * gnulib/configure: Re-generate.
390 * gnulib/import/Makefile.am: Re-generate.
391 * gnulib/import/Makefile.in: Re-generate.
392 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
393 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
394 * gnulib/import/m4/mkdir.m4: New file.
395 * gnulib/import/mkdir.c: New file.
396 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
399 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
401 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
402 * common/scoped_mmap.c: New file.
403 * common/scoped_mmap.h (destroy): New method.
404 (~scoped_mmap, reset): Use destroy.
405 (scoped_mmap): New move constructor.
406 (mmap_file): New declaration.
407 * unittests/scoped_mmap-selftests.c (test_normal,
408 test_invalid_filename, run_tests): New functions.
409 (_initialize_scoped_mmap_selftests): Register selftest.
411 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
413 * dwarf2read.c (read_gdb_index_from_section): Rename to...
414 (read_gdb_index_from_buffer): ... this. Remove section
415 parameter, add buffer parameter.
416 (get_gdb_index_contents_ftype,
417 get_gdb_index_contents_dwz_ftype): New typedefs.
418 (dwarf2_read_gdb_index): Add callback parameters to get the
420 (get_gdb_index_contents_from_section): New.
421 (dwarf2_initialize_objfile): Update call to
422 dwarf2_read_gdb_index.
424 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
426 * common/filestuff.h (gdb_fopen_cloexec): New overload.
427 (gdb_open_cloexec): Likewise.
428 * nat/linux-osdata.c (command_from_pid): Use string_printf.
429 (commandline_from_pid): Likewise.
430 (linux_xfer_osdata_threads): Likewise.
431 (linux_xfer_osdata_fds): Likewise.
432 * ada-lang.c (is_package_name): Likewise.
433 * auxv.c (procfs_xfer_auxv): Likewise.
434 * breakpoint.c (print_one_breakpoint_location): Use
436 (print_one_catch_solib): Use string_printf.
437 * coff-pe-read.c (add_pe_exported_sym): Likewise.
438 (add_pe_forwarded_sym): Likewise.
439 * dwarf2read.c (create_type_unit_group): Likewise.
440 (build_error_marker_type): Likewise.
441 * infcall.c (get_function_name): Likewise.
442 * valprint.c (print_converted_chars_to_obstack): Likewise.
443 * xtensa-tdep.c (xtensa_register_type): Likewise.
445 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
447 * remote.c (remote_target::download_tracepoint): Fix format
450 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
452 * tracefile.c: Include common/byte-vector.h.
453 (trace_save): Change type of buf to gdb::byte_vector. Initialize
454 with trace_regblock_size if needed. Update uses of buf.
456 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
458 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
459 std::vector<unsigned char>.
460 * tracepoint.c (collection_list::collection_list): Remove
461 m_regs_mask initializer from initializer list. Resize
462 m_regs_mask using the largest remote register number.
463 (collection_list::add_remote_register): Remove size check on
464 m_regs_mask. Use at to access element.
465 (collection_list::stringify): Change type of temp_buf to
466 gdb::char_vector. Update uses of temp_buf. Resize if needed to
467 stringify the register mask. Use pack_hex_byte for the register
470 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
472 * tracepoint.h (class collection_list) <add_register>: Remove.
473 <add_remote_register, add_ax_registers, add_local_register>:
475 <add_memrange>: Add scope parameter.
476 * tracepoint.c (encode_actions_1): Likewise.
477 (collection_list::add_register): Rename to ...
478 (collection_list::add_remote_register): ... this. Update
480 (collection_list::add_ax_registers, add_local_register): New
482 (collection_list::add_memrange): Add scope parameter. Call
483 add_local_register instead of add_register.
484 (finalize_tracepoint_aexpr): New function.
485 (collection_list::collect_symbol): Update calls to add_memrange.
486 Call add_local_register instead of add_register. Call
487 add_ax_registers. Call finalize_tracepoint_aexpr.
488 (encode_actions_1): Get remote regnos for $reg action. Call
489 add_remote_register, add_ax_registers, and add_local_register.
490 Update call to add_memrange. Call finalize_tracepoint_aexpr.
491 (validate_actionline): Call finalize_tracepoint_aexpr.
493 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
495 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
496 Replace array buf with gdb::char_vector buf, of size
497 get_remote_packet_size (). Replace references to buf and
498 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
499 and xsnprintf with snprintf. Raise errors if the buffer is too
502 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
504 * remote.c (remote_target::download_tracepoint): Fix the has_more
505 predicate in the QTDP action list iteration.
507 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
509 * remote.c (remote_target::download_tracepoint): Fix indentation
512 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
514 * proc-api.c (_initialize_proc_api): Remove c, unused.
515 * procfs.c (procfs_init_inferior): Remove signals, unused.
516 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
519 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
520 Andrew Burgess <andrew.burgess@embecosm.com>
522 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
523 'W_STOPCODE (0)' as this could be ambiguous.
525 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
527 * ser-tcp.c (net_open): Fix thinko when deciding whether to
528 disable TCP's Nagle algorithm (use "ai_protocol" instead of
531 2018-08-02 Tom Tromey <tom@tromey.com>
534 * dwarf2read.c (read_func_scope): Set symtab on template parameter
536 (process_structure_scope): Likewise.
538 2018-08-02 Xavier Roirand <roirand@adacore.com>
541 * darwin-nat.c (darwin_kill_inferior): Fix handling of
544 2018-08-02 Tom Tromey <tom@tromey.com>
546 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
547 (darwin_suspend_inferior, darwin_resume_inferior)
548 (darwin_decode_notify_message, darwin_resume_inferior_threads)
549 (darwin_check_new_threads): Check result of get_darwin_inferior.
551 2018-07-31 Joel Brobecker <brobecker@adacore.com>
555 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
557 * varobj.c (varobj_get_path_expr_parent): Report an error if
558 parent is a dynamic varobj.
560 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
562 * gnulib/aclocal.m4: Re-generate.
563 * gnulib/config.in: Re-generate.
564 * gnulib/configure: Re-generate.
565 * gnulib/import/Makefile.in: Re-generate.
566 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
567 * gnulib/import/m4/onceonly.m4: Re-generate.
569 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
571 * target-descriptions.c (struct xml_test_tdesc): New.
572 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
573 (record_xml_tdesc): Update.
574 (maintenance_check_xml_descriptions): Update.
575 * target-descriptions.h (record_xml_tdesc): Update comment.
577 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
579 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
580 checking array bounds are defined.
582 2018-07-30 Tom Tromey <tom@tromey.com>
584 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
585 irreflexivity violation.
587 2018-07-30 Tom Tromey <tom@tromey.com>
589 * cli/cli-decode.c (lookup_cmd): Remove lint code.
590 * value.c (unpack_long): Remove lint code.
591 * valops.c (value_ind): Remove lint code.
592 * valarith.c (value_x_binop, value_x_unop, value_equal)
593 (value_pos): Remove lint code.
595 2018-07-28 Tom de Vries <tdevries@suse.de>
597 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
598 with undefined upper bound as <optimized out>.
600 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
602 * gcore.in: Rename variable "name" to "prefix". Expand
605 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
607 * windows-nat.c (windows_nat_target::create_inferior): Update to
608 call close() in global namespace.
610 2018-07-26 Tom Tromey <tom@tromey.com>
612 * dwarf-index-write.c (add_address_entry): Don't add objfile
614 * dbxread.c (find_stab_function): Rename from
615 find_stab_function_addr. Return a bound_minimal_symbol.
616 (read_dbx_symtab): Use raw_text_low, raw_text_high.
617 Don't add objfile offsets.
618 (end_psymtab): Use raw_text_low, raw_text_high,
619 MSYMBOL_VALUE_RAW_ADDRESS.
620 (read_ofile_symtab): Update.
621 (process_one_symbol): Update.
622 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
624 (dw2_relocate): Remove.
625 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
627 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
629 (process_psymtab_comp_unit_reader, add_partial_symbol)
630 (add_partial_subprogram, dwarf2_ranges_read): Update.
631 (load_partial_dies): Update.
632 (add_address_entry): Don't add objfile offsets.
633 (dwarf2_build_include_psymtabs): Update.
634 (create_addrmap_from_aranges): Don't add objfile offsets.
635 (dw2_find_pc_sect_compunit_symtab): Update.
636 * mdebugread.c (parse_symbol): Don't add objfile offsets.
637 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
639 (parse_partial_symbols): Don't add objfile offsets. Use
640 raw_text_low, raw_text_high. Update.
641 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
642 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
643 or call 'relocate' quick function. Clear psymbol_map.
644 * psympriv.h (struct partial_symbol) <address>: Add section
646 <set_unrelocated_address>: Rename from set_address.
647 <raw_text_low, raw_text_high>: New methods.
648 <text_low, text_high>: Add objfile parameter.
649 (add_psymbol_to_bcache): Add 'section' parameter. Call
650 set_unrelocated_address.
651 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
652 (find_pc_psymbol): Update.
653 (fixup_psymbol_section, relocate_psymtabs): Remove.
654 (dump_psymtab, psym_functions): Update.
655 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
657 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
658 (start_psymtab_common): Update.
659 * symfile-debug.c (debug_qf_relocate): Remove.
660 (debug_sym_quick_functions): Update.
661 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
662 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
665 2018-07-26 Tom Tromey <tromey@redhat.com>
667 * dbxread.c (end_psymtab): Use text_high_valid and
669 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
670 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
671 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
673 <text_low_valid, text_high_valid>: New fields.
674 <set_text_low, set_text_high>: Update.
675 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
677 2018-07-26 Tom Tromey <tom@tromey.com>
679 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
681 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
682 textlow and texthigh fields.
683 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
685 * mdebugread.c (parse_lines, parse_partial_symbols)
686 (psymtab_to_symtab_1): Update.
687 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
688 Rename fields. Update comment. Now private.
689 <text_low, text_high, set_text_low, set_text_high>: New methods.
690 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
691 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
692 (start_psymtab_common, maintenance_info_psymtabs)
693 (maintenance_check_psymtabs): Update.
694 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
696 (scan_xcoff_symtab): Update.
698 2018-07-26 Tom Tromey <tromey@redhat.com>
700 * psympriv.h (struct partial_symbol) <unrelocated_address,
701 address, set_address>: New methods.
702 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
703 (fixup_psymbol_section, relocate_psymtabs): Update.
704 (print_partial_symbols): Add 'objfile' parameter. Update.
705 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
708 2018-07-26 Tom Tromey <tom@tromey.com>
710 * dwarf-index-write.c (write_psymbols, debug_names::insert)
711 (debug_names::write_psymbols): Update.
712 * psympriv.h (struct partial_symbol): Derive from
714 <obj_section>: New method.
715 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
716 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
717 (find_pc_sect_psymbol, fixup_psymbol_section)
718 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
719 (print_partial_symbols, recursively_search_psymtabs)
720 (compare_psymbols, psymbol_hash, psymbol_compare)
721 (add_psymbol_to_bcache, maintenance_check_psymtabs)
722 (psymbol_name_matches, psym_fill_psymbol_map): Update.
724 2018-07-26 Tom Tromey <tromey@redhat.com>
726 * dbxread.c (end_psymtab): Remove dead code.
728 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
730 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
731 DWARF unwinders are disabled.
732 * dwarf2-frame.c: Add dwarf2read.h include.
733 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
735 (dwarf2_frame_unwinders_enabled_p): Define.
736 (show_dwarf_unwinders_enabled_p): New function.
737 (_initialize_dwarf2_frame): Register switch to control DWARF
739 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
740 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
741 (show_dwarf_cmdlist): Remove static keyword.
742 * dwarf2read.h (set_dwarf_cmdlist): Declare.
743 (show_dwarf_cmdlist): Declare.
744 * NEWS: Document new feature.
746 2018-07-26 Tom de Vries <tdevries@suse.de>
749 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
751 2018-07-26 Tom de Vries <tdevries@suse.de>
753 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
754 DW_AT_count can't be translated to a dynamic prop.
756 2018-07-25 Tom de Vries <tdevries@suse.de>
758 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
761 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
763 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
765 2018-07-25 Joel Brobecker <brobecker@adacore.com>
767 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
769 2018-07-24 Keith Seitz <keiths@redhat.comt
772 * dwarf2read.c (dw2_add_symbol_to_list): New function.
773 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
774 instead of add_symbol_to_list.
775 (read_file_scope): Call prepare_one_comp_unit before reading
778 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
780 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
782 2018-07-24 Tom Tromey <tom@tromey.com>
784 * utils.c (malloc, realloc, free): Don't declare.
785 * configure, config.in: Rebuild.
786 * configure.ac: Don't check for declarations of free, malloc, or
789 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
791 * aarch64-linux-nat.c
792 (aarch64_linux_nat_target::stopped_data_address): Remove unused
794 * arm-linux-nat.c (fetch_regs): Likewise.
795 (store_regs): Likewise.
796 (fetch_vfp_regs): Likewise.
797 (store_vfp_regs): Likewise.
798 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
799 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
800 (arm_linux_nat_target::insert_watchpoint): Likewise.
801 (arm_linux_nat_target::remove_watchpoint): Likewise.
802 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
804 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
806 * ppc-linux-nat.c (fetch_register): Likewise.
807 (fetch_all_gp_regs): Likewise.
808 (fetch_ppc_registers): Likewise.
809 (store_all_gp_regs): Likewise.
810 (store_ppc_registers): Likewise.
811 (hwdebug_insert_point): Likewise.
812 (can_use_watchpoint_cond_accel): Likewise.
813 * remote-sim.c (gdb_os_write_stdout): Likewise.
815 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
816 Tom Tromey <tom@tromey.com>
818 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
820 * configure: Rebuild.
822 2018-07-22 Tom Tromey <tom@tromey.com>
824 * regformats/regdat.sh: Define xmltarget_${name} inside
825 #ifndef IN_PROCESS_AGENT.
827 2018-07-22 Tom Tromey <tom@tromey.com>
829 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
831 2018-07-22 Tom Tromey <tom@tromey.com>
833 * symfile.c (reread_symbols): Notify iter, not objfile.
835 2018-07-22 Tom Tromey <tom@tromey.com>
837 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
839 (ravenscar_thread_target::prepare_to_store): Likewise.
841 2018-07-22 Tom Tromey <tom@tromey.com>
843 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
844 unused variable. Call value_fetch_lazy when needed.
845 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
846 Remove unused variable. Call value_fetch_lazy when needed.
848 2018-07-22 Tom Tromey <tom@tromey.com>
850 * m32c-tdep.c (mark_dma): Return void.
851 (make_regs): Remove unused declarations.
853 2018-07-22 Tom Tromey <tom@tromey.com>
855 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
856 cmdscm_get_valid_command_smob_arg_unsafe for effect.
857 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
858 bkscm_get_valid_block_smob_arg_unsafe for effect.
860 2018-07-22 Tom Tromey <tom@tromey.com>
862 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
865 2018-07-22 Tom Tromey <tom@tromey.com>
867 * windows-nat.c (saved_context): Conditionally define.
868 * remote.c (remote_target::remote_btrace_maybe_reopen):
869 Conditionally declare "warned".
870 * inflow.c (sigquit_ours): Conditionally define.
871 (new_tty): Move "tty" declaration inside #if.
872 * guile/guile.c (guile_datadir): Conditionally define.
873 * charset.c (set_be_le_names): Move some declarations inside #if.
874 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
876 (parse_xml_btrace_conf): Likewise.
878 2018-07-22 Tom Tromey <tom@tromey.com>
880 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
882 2018-07-22 Tom Tromey <tom@tromey.com>
884 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
885 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
886 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
887 * buildsym-legacy.c (get_macro_table): Remove unused variable.
888 * stack.c (frame_apply_level_command): Remove unused variable.
889 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
890 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
891 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
893 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
894 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
895 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
897 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
898 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
900 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
901 Remove unused variable.
902 * cli/cli-script.c (recurse_read_control_structure): Remove unused
904 * common/tdesc.c (print_xml_feature::visit): Remove unused
906 * compile/compile-object-load.c (store_regs): Remove unused
908 * complaints.c (clear_complaints): Remove unused variable.
909 * corelow.c (core_target_open): Remove unused variable.
910 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
912 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
914 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
916 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
918 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
920 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
922 * ia64-tdep.c (examine_prologue): Remove unused variable.
923 * infcall.c (run_inferior_call): Remove unused variable.
924 * inferior.c (exit_inferior): Remove unused variable.
925 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
926 * linespec.c (decode_line_2): Remove unused variable.
927 * linux-nat.c (super_close): Remove.
928 * linux-tdep.c (linux_info_proc): Remove unused variable.
929 * mi/mi-main.c (mi_execute_command): Remove unused variable.
930 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
931 Remove unused variable.
932 * parse.c (find_minsym_type_and_address): Remove unused variable.
933 * printcmd.c (info_symbol_command, printf_floating): Remove unused
935 * python/py-breakpoint.c (bppy_set_commands): Remove unused
937 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
939 * record-btrace.c (record_btrace_target::store_registers): Remove
941 (cmd_show_record_btrace_cpu): Remove unused variable.
942 * riscv-tdep.c (riscv_register_reggroup_p)
943 (riscv_push_dummy_call, riscv_return_value): Remove unused
945 * rust-exp.y (literal): Remove unused variable.
946 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
948 <STRUCTOP_ANONYMOUS>: Likewise.
949 * s390-linux-tdep.c (s390_linux_init_abi_31)
950 (s390_linux_init_abi_64): Remove unused variable.
951 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
952 (file_select_thread, net_windows_open, _initialize_ser_windows):
953 Remove unused variables.
954 * symtab.c (find_pc_sect_line): Remove unused variable.
955 * target-memory.c (compute_garbled_blocks): Remove unused
957 (target_write_memory_blocks): Remove unused variable.
958 * target.c (target_stack::unpush): Remove unused variables.
959 * tracepoint.c (start_tracing, all_tracepoint_actions)
960 (merge_uploaded_trace_state_variables)
961 (print_one_static_tracepoint_marker): Remove unused variable.
962 * unittests/basic_string_view/element_access/char/1.cc (test01):
963 Remove unused variable.
964 * windows-nat.c (windows_continue, windows_add_all_dlls)
965 (do_initial_windows_stuff, windows_nat_target::create_inferior):
966 Remove unused variables.
968 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
970 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
971 attr_profile in HAVE_ELF.
972 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
975 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
977 * frame.c (frame_register_unwind): Change parameter name.
978 (frame_unwind_register): Likewise.
979 (frame_unwind_register_value): Likewise.
980 (frame_unwind_register_signed): Likewise.
981 (frame_unwind_register_unsigned): Likewise.
982 * frame.h (frame_register_unwind): Likewise.
983 (frame_unwind_register): Likewise.
984 (frame_unwind_register_value): Likewise.
985 (frame_unwind_register_signed): Likewise.
986 (frame_unwind_register_unsigned): Likewise.
987 (frame_unwind_arch): Likewise.
989 2018-07-20 Maciej W. Rozycki <macro@mips.com>
991 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
994 2018-07-20 Maciej W. Rozycki <macro@mips.com>
996 * mips-linux-nat.c (mips_linux_nat_target::read_description):
997 Call `get_ptrace_pid' rather than extracting the ptrace PID by
1000 2018-07-20 Keith Seitz <keiths@redhat.com>
1002 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1003 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1004 m_compunit_symtab, m_language>: Add "m_" prefix.
1006 * buildsym.c: Update all uses.
1008 2018-07-20 Tom Tromey <tom@tromey.com>
1010 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1011 * buildsym.h (record_line_ftype): Remove typedef.
1013 2018-07-20 Tom Tromey <tom@tromey.com>
1015 * buildsym-legacy.h (augment_type_symtab): Don't declare.
1016 (end_expandable_symtab): Likewise.
1017 (end_symtab_get_static_block): Likewise.
1018 (end_symtab_from_static_block): Likewise.
1019 * buildsym-legacy.c (augment_type_symtab): Remove.
1020 (end_expandable_symtab): Remove.
1021 (end_symtab_get_static_block): Remove.
1022 (end_symtab_from_static_block): Remove.
1024 2018-07-20 Tom Tromey <tom@tromey.com>
1026 * dwarf2read.c: Include buildsym.h.
1027 (struct dwarf2_cu) <builder>: New method.
1028 (fixup_go_packaging): Update.
1029 (process_full_comp_unit, process_full_type_unit): Update. Don't
1030 use scoped_free_pendings.
1031 (using_directives): Add "cu" parameter, remove "language".
1032 (read_import_statement, setup_type_unit_groups, )
1033 (read_func_scope, read_lexical_block_scope)
1034 (dwarf2_record_block_ranges, read_namespace): Update.
1035 (lnp_state_machine::lnp_state_machine): Add cu parameter.
1036 (lnp_state_machine::handle_end_sequence): Update.
1037 (class lnp_state_machine) <m_cu>: New member.
1038 <m_record_line_callback>: Remove.
1039 <m_currently_recording_lines>: New member.
1040 (lnp_state_machine::handle_set_file): Update.
1041 (noop_record_line): Remove.
1042 (dwarf_record_line_p): Add cu parameter.
1043 (dwarf_record_line_1, dwarf_finish_line): Likewise.
1044 (lnp_state_machine::record_line)
1045 (lnp_state_machine::lnp_state_machine)
1046 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1047 (dwarf_decode_lines): Update.
1048 (dwarf2_start_subfile): Add cu parameter.
1049 (dwarf2_start_symtab, new_symbol): Update.
1050 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1051 Remove dwarf2_per_objfile parameter.
1052 (dwarf_decode_macros): Update.
1054 2018-07-20 Tom Tromey <tom@tromey.com>
1056 * stabsread.c (define_symbol): Update.
1057 * buildsym-legacy.h (get_buildsym_compunit): Declare.
1058 * dwarf2read.c (new_symbol): Update.
1059 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1060 * cp-namespace.c: Include buildsym.h.
1061 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1062 * buildsym-legacy.c (get_buildsym_compunit): New function.
1064 2018-07-20 Tom Tromey <tom@tromey.com>
1066 * xcoffread.c: Include buildsym-legacy.h.
1067 * windows-nat.c: Include buildsym-legacy.h.
1068 * stabsread.c: Include buildsym-legacy.h.
1069 * mdebugread.c: Include buildsym-legacy.h.
1070 * buildsym-legacy.h: New file.
1071 * buildsym-legacy.c: New file, from buildsym.c.
1072 * go32-nat.c: Include buildsym-legacy.h.
1073 * dwarf2read.c: Include buildsym-legacy.h.
1074 * dbxread.c: Include buildsym-legacy.h.
1075 * cp-namespace.c: Include buildsym-legacy.h.
1076 * coffread.c: Include buildsym-legacy.h.
1077 * buildsym.h: Move some contents to buildsym-legacy.h.
1078 * buildsym.c: Include buildsym-legacy.h. Move many functions to
1080 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1082 2018-07-20 Tom Tromey <tom@tromey.com>
1084 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1085 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1086 (buildsym_compunit::buildsym_compunit)
1087 (buildsym_compunit::~buildsym_compunit)
1088 (buildsym_compunit::get_macro_table): Define.
1090 2018-07-20 Tom Tromey <tom@tromey.com>
1092 * buildsym.c (reset_symtab_globals): Remove.
1093 (buildsym_compunit::end_symtab_from_static_block): Update.
1094 (buildsym_compunit::augment_type_symtab): Update.
1095 (end_symtab_from_static_block): Call free_buildsym_compunit.
1096 (augment_type_symtab, end_symtab, end_expandable_symtab):
1099 2018-07-20 Tom Tromey <tom@tromey.com>
1101 * arch-utils.c: Do not include buildsym.h.
1102 * mipsread.c: Do not include buildsym.h.
1103 * machoread.c: Do not include buildsym.h.
1104 * elfread.c: Do not include buildsym.h.
1106 2018-07-20 Tom Tromey <tom@tromey.com>
1108 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1110 (buildsym_compunit): Add new constructor.
1111 (struct buildsym_compunit) <get_last_source_file, finish_block,
1112 record_block_range, start_subfile, patch_subfile_names,
1113 push_subfile, pop_subfile, record_line, get_compunit_symtab,
1114 set_last_source_start_addr, get_last_source_start_addr,
1115 get_local_using_directives, set_local_using_directives,
1116 get_global_using_directives, outermost_context_p,
1117 get_current_context_stack, get_context_stack_depth,
1118 get_current_subfile, get_local_symbols, get_file_symbols,
1119 get_global_symbols, record_debugformat, record_producer,
1120 push_context, pop_context, end_symtab_get_static_block,
1121 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1123 <record_pending_block, finish_block_internal, make_blockvector,
1124 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1128 2018-05-22 Tom Tromey <tom@tromey.com>
1130 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1132 (finish_block_internal): Update.
1134 2018-07-20 Tom Tromey <tom@tromey.com>
1136 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1138 (finish_block_internal): Update.
1140 2018-07-20 Tom Tromey <tom@tromey.com>
1142 * buildsym.h (EXTERN): Don't define or undef.
1143 * buildsym.c (EXTERN): Don't define.
1145 2018-07-20 Tom Tromey <tom@tromey.com>
1147 * buildsym.c: Remove TODO comment.
1149 2018-07-20 Tom Tromey <tom@tromey.com>
1151 * coffread.c (coff_symtab_read): Update.
1152 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1153 (xcoff_new_init): Update.
1154 * mipsread.c (mipscoff_new_init): Update.
1155 * mdebugread.c (mdebug_build_psymtabs): Update.
1156 * elfread.c (elf_new_init): Update.
1157 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1159 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1160 (coffstab_build_psymtabs, elfstab_build_psymtabs)
1161 (stabsect_build_psymtabs): Update.
1162 * buildsym.h (buildsym_init): Don't declare.
1163 * buildsym.c: Update comment.
1164 (prepare_for_building): Remove.
1165 (start_symtab, restart_symtab): Update.
1166 (reset_symtab_globals): Update comment.
1167 (buildsym_init): Remove.
1169 2018-07-20 Tom Tromey <tom@tromey.com>
1171 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1172 * stabsread.c (patch_block_stabs, define_symbol, read_type)
1173 (read_enum_type, common_block_start, common_block_end)
1174 (cleanup_undefined_types_1, finish_global_stabs): Update.
1175 * mdebugread.c (psymtab_to_symtab_1): Update.
1176 * dwarf2read.c (fixup_go_packaging, read_func_scope)
1177 (read_lexical_block_scope, new_symbol): Update.
1178 * dbxread.c (process_one_symbol): Update.
1179 * coffread.c (coff_symtab_read, process_coff_symbol)
1180 (coff_read_enum_type): Update.
1181 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1183 (get_local_symbols, get_file_symbols, get_global_symbols): New
1185 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1187 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1188 (~scoped_free_pendings): Update.
1189 (finish_block, prepare_for_building, reset_symtab_globals)
1190 (end_symtab_get_static_block, end_symtab_with_blockvector)
1191 (augment_type_symtab, push_context): Update.
1192 (get_local_symbols, get_file_symbols, get_global_symbols): New
1194 (buildsym_init): Update.
1196 2018-07-20 Tom Tromey <tom@tromey.com>
1198 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1199 (process_full_type_unit): Likewise.
1200 (dwarf2_start_symtab): Set list_in_scope.
1202 2018-07-20 Tom Tromey <tom@tromey.com>
1204 * dwarf2read.c (process_psymtab_comp_unit_reader)
1205 (build_type_psymtabs_reader): Do not set list_in_scope.
1207 2018-07-20 Tom Tromey <tom@tromey.com>
1209 * buildsym.c (free_pendings): Remove.
1210 (add_symbol_to_list, scoped_free_pendings)
1211 (finish_block_internal, buildsym_init): Update.
1213 2018-07-20 Tom Tromey <tom@tromey.com>
1215 * xcoffread.c (read_xcoff_symtab): Update.
1216 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1218 * dbxread.c (process_one_symbol): Update.
1219 * coffread.c (coff_symtab_read): Update.
1220 * buildsym.h (finish_block): Update.
1221 * buildsym.c (finish_block): Remove "listhead" argument.
1222 (end_symtab_get_static_block): Update.
1224 2018-07-20 Tom Tromey <tom@tromey.com>
1226 * buildsym.h (class scoped_free_pendings): Remove constructor.
1227 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1229 <m_pending_block_obstack, m_pending_blocks>: New members.
1230 (pending_block_obstack, pending_blocks): Remove.
1231 (scoped_free_pendings::scoped_free_pendings): Default.
1232 (~scoped_free_pendings): Update.
1233 (free_pending_blocks): Remove.
1234 (finish_block_internal, record_pending_block, make_blockvector)
1235 (end_symtab_get_static_block, augment_type_symtab, push_context)
1236 (buildsym_init): Update.
1238 2018-07-20 Tom Tromey <tom@tromey.com>
1240 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1241 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
1243 (pending_addrmap, pending_addrmap_obstack)
1244 (pending_addrmap_interesting): Remove.
1245 (scoped_free_pendings, record_block_range, make_blockvector)
1246 (prepare_for_building, reset_symtab_globals, buildsym_init):
1249 2018-07-20 Tom Tromey <tom@tromey.com>
1251 * xcoffread.c (process_linenos): Update.
1252 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1253 * mdebugread.c (psymtab_to_symtab_1): Update.
1254 * dwarf2read.c (setup_type_unit_groups)
1255 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1256 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1257 * dbxread.c (process_one_symbol): Update.
1258 * coffread.c (coff_symtab_read, enter_linenos)
1259 (process_coff_symbol): Update.
1260 * buildsym.h (current_subfile): Don't declare.
1261 (get_current_subfile): Declare.
1262 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
1264 (start_subfile, free_buildsym_compunit, push_subfile)
1265 (prepare_for_building, start_symtab): Update.
1266 (get_current_subfile): New function.
1268 2018-07-20 Tom Tromey <tom@tromey.com>
1270 * coffread.c (coff_symtab_read): Update.
1271 * xcoffread.c (read_xcoff_symtab): Update.
1272 * dwarf2read.c (new_symbol): Update.
1273 (read_func_scope, read_lexical_block_scope): Update.
1274 * dbxread.c (process_one_symbol): Update.
1275 * buildsym.h (context_stack, context_stack_depth): Don't declare.
1276 (outermost_context_p): Remove macro.
1277 (outermost_context_p, get_current_context_stack)
1278 (get_context_stack_depth): Declare.
1279 (pop_context): Return struct context_stack.
1280 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1282 (context_stack_size): Remove.
1283 (INITIAL_CONTEXT_STACK_SIZE): Remove.
1284 (prepare_for_building, end_symtab_get_static_block)
1285 (augment_type_symtab, push_context): Update.
1286 (pop_context): Return struct context_stack.
1287 (outermost_context_p, get_current_context_stack)
1288 (get_context_stack_depth): New functions.
1289 (buildsym_init): Update.
1291 2018-07-20 Tom Tromey <tom@tromey.com>
1293 * rust-exp.y: Now a pure parser. Update all rules.
1294 (%union): Move earlier.
1295 (current_parser, work_obstack): Remove globals.
1296 (rust_parser, ~rust_parser): Update.
1297 (class rust_parser) <copy_name, concat3, crate_name, super_name,
1298 lex_character, lex_number, lex_string, lex_identifier,
1299 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1300 convert_name, convert_params_to_expression,
1301 convert_ast_to_expression, ast_basic_type, ast_operation,
1302 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1303 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1304 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1305 ast_array_type, ast_slice_type, ast_reference_type,
1306 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1307 (rust_parse): Update.
1308 (rustyyerror, rustyylex): Add parser parameter.
1309 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1310 (rust_lex_stringish_test, rust_lex_test_sequence)
1311 (rust_lex_test_trailing_dot, rust_lex_test_completion)
1312 (rust_lex_test_push_back, rust_lex_tests): Update.
1314 2018-07-19 Pedro Alves <palves@redhat.com>
1316 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1317 gdb::unique_xmalloc_ptr.
1318 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1319 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1320 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1321 copy-initialization.
1322 * guile/scm-pretty-print.c (ppscm_print_children): Use
1323 gdb::unique_xmalloc_ptr instead of cleanups.
1324 (gdbscm_apply_val_pretty_printer): Remove cleanups.
1325 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1326 gdb::unique_xmalloc_ptr.
1327 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1328 Adjust to use gdb::unique_xmalloc_ptr.
1329 * guile/scm-utils.c (extract_arg): Adjust.
1330 * guile/scm-value.c (gdbscm_value_field): Adjust to use
1331 gdb::unique_xmalloc_ptr instead of a cleanup.
1333 2018-07-19 Tom Tromey <tom@tromey.com>
1335 * utils.c (do_value_free_to_mark)
1336 (make_cleanup_value_free_to_mark): Remove.
1337 * utils.h (make_cleanup_value_free_to_mark): Remove.
1339 2018-07-19 Pedro Alves <palves@redhat.com>
1341 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1342 forwarding reference.
1344 2018-07-18 Pedro Alves <palves@redhat.com>
1346 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1347 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
1350 2018-07-18 Pedro Alves <palves@redhat.com>
1352 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1354 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1356 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1357 directly instead of a cleanup.
1358 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1359 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
1360 (vlscm_binop_gdbthrow): New, factored out from ...
1361 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
1362 (vlscm_rich_compare): Use gdbscm_wrap.
1363 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1364 instead of a cleanup.
1365 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1367 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1368 Use xfree directly instead of a cleanup.
1369 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1370 Adjust to use gdbscm_wrap and scoped_value_mark.
1371 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1372 (gdbscm_value_address, gdbscm_value_dereference)
1373 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1375 (gdbscm_value_dynamic_type): Use scoped_value_mark.
1376 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1378 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1379 gdbscm_wrap and scoped_value_mark.
1380 (gdbscm_value_to_string): Use xfree directly instead of a
1381 cleanup. Move 'buffer' unique_ptr to TRY scope.
1382 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1383 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
1385 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1386 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1388 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1391 2018-07-18 Tom de Vries <tdevries@suse.de>
1393 * findvar.c (default_read_var_value): Also resolve dynamic type for
1394 LOC_OPTIMIZED_OUT vars.
1396 2018-07-18 Maciej W. Rozycki <macro@mips.com>
1398 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1401 2018-07-17 Tom Tromey <tom@tromey.com>
1403 * guile/scm-param.c (pascm_set_func, pascm_show_func)
1404 (compute_enum_list, pascm_set_param_value_x)
1405 (gdbscm_parameter_value): Update.
1406 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1407 (gdbscm_scm_to_host_string): Update.
1408 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1410 * guile/scm-cmd.c (cmdscm_add_completion): Update.
1411 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1412 * guile/scm-string.c (gdbscm_scm_to_string): Return
1414 (gdbscm_scm_to_host_string): Likewise.
1416 2018-07-17 Tom Tromey <tom@tromey.com>
1418 * guile/guile.c (gdbscm_eval_from_control_command): Update.
1419 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1420 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1421 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1424 2018-07-17 Tom Tromey <tom@tromey.com>
1426 * guile/scm-param.c (pascm_signal_setshow_error): Update.
1427 * guile/guile-internal.h (gdbscm_exception_message_to_string):
1429 * guile/scm-cmd.c (cmdscm_function): Update.
1430 * guile/scm-pretty-print.c
1431 (ppscm_print_exception_unless_memory_error): Update.
1432 * guile/scm-exception.c (gdbscm_exception_message_to_string):
1433 Return unique_xmalloc_ptr.
1435 2018-07-17 Tom Tromey <tom@tromey.com>
1437 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1440 2018-07-17 Jim Wilson <jimw@sifive.com>
1442 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1443 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
1444 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
1445 unecessary braces after EF_RISCV_RVC test. Delete call to
1446 set_gdbarch_decr_pc_after_break.
1448 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1449 RISCV_LAST_FP_REGNUM + 1.
1450 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1452 2018-07-17 Tom Tromey <tom@tromey.com>
1454 * configure.ac: Remove --disable-gdbcli.
1455 * configure: Rebuild.
1456 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1457 (SUBDIR_CLI_CFLAGS): Remove.
1458 (SFILES): Use SUBDIR_CLI_SRCS.
1459 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1461 2018-07-17 Tom Tromey <tom@tromey.com>
1464 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1466 2018-07-16 Jim Wilson <jimw@sifive.com>
1468 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1470 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1472 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1474 (libunwind_frame_sniffer): Likewise.
1475 (libunwind_frame_prev_register): Likewise.
1476 (libunwind_sigtramp_frame_sniffer): Likewise.
1477 * ia64-tdep.c (ia64_access_reg): Likewise.
1478 (ia64_access_rse_reg): Likewise.
1479 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1480 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1482 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1484 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1486 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1488 * remote-sim.c (gdbsim_target::close,
1489 gdbsim_target::mourn_inferior): Remove unused variables.
1491 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1493 * ia64-tdep.c (ktab_buf): New global.
1494 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1495 (get_kernel_table): Adjust.
1497 2018-07-16 Tom Tromey <tom@tromey.com>
1499 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1500 * dwarf2read.c (using_directives, new_symbol): Use
1501 outermost_context_p.
1502 * dbxread.c (process_one_symbol): Use outermost_context_p.
1503 * coffread.c (coff_symtab_read): Use outermost_context_p.
1505 2018-07-16 Tom Tromey <tom@tromey.com>
1507 * dwarf2read.c (using_directives, read_func_scope)
1508 (read_lexical_block_scope): Update.
1509 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1510 * buildsym.h (local_using_directives, global_using_directives):
1512 (get_local_using_directives, set_local_using_directives)
1513 (get_global_using_directives): Declare.
1514 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1515 m_global_using_directives>: New members.
1516 (finish_block_internal, prepare_for_building)
1517 (reset_symtab_globals, end_symtab_get_static_block)
1518 (push_context): Update.
1519 (get_local_using_directives, set_local_using_directives)
1520 (get_global_using_directives): New functions.
1521 (buildsym_init): Update.
1523 2018-07-16 Tom Tromey <tom@tromey.com>
1525 * xcoffread.c (xcoff_initial_scan): Don't call
1526 free_pending_blocks.
1527 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1528 * buildsym.h (class scoped_free_pendings): Add constructor.
1529 (free_pending_blocks): Don't declare.
1530 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1531 (free_pending_blocks): Now static.
1533 2018-07-16 Tom Tromey <tom@tromey.com>
1535 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1536 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1538 (struct subfile_stack): Remove.
1539 (subfile_stack): Remove.
1540 (push_subfile, pop_subfile, buildsym_init): Update.
1542 2018-07-16 Tom Tromey <tom@tromey.com>
1544 * buildsym.c (push_subfile): Use gdb_assert.
1545 (pop_subfile): Use gdb_assert.
1547 2018-07-16 Tom Tromey <tom@tromey.com>
1549 * buildsym.h (merge_symbol_lists): Remove.
1550 * buildsym.c (merge_symbol_lists): Remove.
1552 2018-07-16 Tom Tromey <tom@tromey.com>
1554 * stabsread.c (scan_file_globals): Update comment.
1555 * stabsread.h (scan_file_globals): Move from buildsym.h.
1556 * buildsym.h (scan_file_globals): Move to stabsread.h.
1558 2018-07-16 Tom Tromey <tom@tromey.com>
1560 * xcoffread.c (xcoff_new_init): Update.
1561 * mipsread.c (mipscoff_new_init): Update.
1562 * mdebugread.c (mdebug_build_psymtabs): Update.
1563 * elfread.c (elf_new_init): Update.
1564 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1565 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1566 * buildsym.h (buildsym_new_init): Don't declare.
1567 * buildsym.c (buildsym_new_init): Remove.
1569 2018-07-16 Tom Tromey <tom@tromey.com>
1571 * stabsread.h (within_function): Move from buildsym.h.
1572 * stabsread.c (start_stabs): Clear within_function.
1573 * coffread.c (coff_start_symtab): Clear within_function.
1574 * buildsym.h (within_function): Move to stabsread.h.
1575 * buildsym.c (prepare_for_building): Update.
1577 2018-07-16 Tom Tromey <tom@tromey.com>
1579 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1580 * dwarf2read.c (dwarf2_start_symtab): Don't set
1581 processing_gcc_compilation.
1582 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1584 2018-07-16 Tom Tromey <tom@tromey.com>
1586 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1587 (next_symbol_text_func): Move from buildsym.h.
1588 * stabsread.c (hashname): Move from buildsym.c.
1589 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1590 (next_symbol_text_func, hashname): Move to stabsread.h.
1591 * buildsym.c: Don't include bcache.h
1592 (hashname): Move to stasbread.c.
1594 2018-07-16 Tom Tromey <tom@tromey.com>
1596 * buildsym.h (context_stack_size): Don't declare.
1597 * buildsym.c (context_stack_size): New global.
1599 2018-07-16 Tom Tromey <tom@tromey.com>
1601 * dbxread.c (processing_acc_compilation): New global.
1602 * buildsym.h (processing_acc_compilation): Don't declare.
1604 2018-07-16 Tom Tromey <tom@tromey.com>
1606 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1607 * dbxread.c (read_ofile_symtab): Update.
1608 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1609 * buildsym.h (last_source_start_addr): Remove.
1610 (set_last_source_start_addr, get_last_source_start_addr):
1612 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1614 (struct buildsym_compunit) <m_last_source_start_addr>: New
1616 (prepare_for_building): Remove start_addr parameter.
1617 (start_symtab, restart_symtab, end_symtab_get_static_block)
1618 (end_symtab_with_blockvector): Update.
1619 (set_last_source_start_addr, get_last_source_start_addr): New
1622 2018-07-16 Tom Tromey <tom@tromey.com>
1624 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1626 (have_line_numbers): Remove.
1627 (record_line, prepare_for_building, end_symtab_get_static_block)
1628 (augment_type_symtab): Update.
1630 2018-07-16 Tom Tromey <tom@tromey.com>
1632 * buildsym.c (~buildsym_compunit): Free the macro table.
1633 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1635 <m_pending_macros>: New member.
1636 (pending_macros): Remove.
1637 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1638 (reset_symtab_globals, end_symtab_get_static_block)
1639 (end_symtab_with_blockvector, augment_type_symtab)
1640 (buildsym_init): Update.
1642 2018-07-16 Tom Tromey <tom@tromey.com>
1644 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1646 (buildsym_compunit::set_last_source_file): New method.
1647 <m_last_source_file>: New member.
1648 (prepare_for_building): Remove "name" parameter.
1649 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1650 (last_source_file): Remove.
1651 (set_last_source_file, get_last_source_file): Update.
1653 2018-07-16 Tom Tromey <tom@tromey.com>
1655 * buildsym.c (prepare_for_building): Add assert.
1657 2018-07-16 Tom Tromey <tom@tromey.com>
1659 * buildsym.c (~buildsym_compunit): Update.
1660 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1661 (start_subfile, patch_subfile_names)
1662 (end_symtab_with_blockvector): Update.
1664 2018-07-16 Tom Tromey <tom@tromey.com>
1666 * buildsym.c (struct buildsym_compunit): Add constructor,
1667 destructor, initializers.
1668 (start_buildsym_compunit): Remove.
1669 (free_buildsym_compunit): Use "delete".
1670 (start_symtab, restart_symtab): Use "new".
1672 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1674 * symfile.c (set_objfile_default_section_offset): Remove struct
1677 2018-07-14 Stafford Horne <shorne@gmail.com>
1679 * (Responsible Maintainers): Add myself as or1k maintainer.
1681 2018-07-13 Tom Tromey <tom@tromey.com>
1683 * symfile.c (set_objfile_default_section_offset): Use extra braces
1686 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1688 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1691 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1693 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1694 unittests/cli-utils-selftests.c
1695 * unittests/cli-utils-selftests.c: New file.
1697 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1699 * NEWS: Mention new commands. Mention change to 'thread apply'.
1701 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1703 * thread.c (thr_try_catch_cmd): New function.
1704 (thread_apply_all_command): Handle qcs flags.
1705 (thread_apply_command): Handle qcs flags.
1706 (taas_command): New function.
1707 (tfaas_command): New function.
1708 (_initialize_thread): Update to setup the new commands 'taas
1709 and 'tfaas'. Change doc string for 'thread apply'.
1711 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1713 * stack.c: (trailing_outermost_frame): New function, mostly
1714 extracted from backtrace_command_1.
1715 (leading_innermost_frame): New function.
1716 (backtrace_command_1): Update to call trailing_outermost_frame.
1717 (frame_apply_command_count): New function.
1718 (frame_apply_level_command): New function.
1719 (frame_apply_all_command): New function.
1720 (frame_apply_command): New function.
1721 (faas_command): New function.
1722 (frame_cmd_list): New variable.
1723 (_initialize_stack): Update to setup the new commands 'frame apply'
1726 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1728 * cli-utils.c (number_or_range_parser::get_number): Only handle
1729 numbers or convenience var as numbers.
1730 (parse_flags): New function.
1731 (parse_flags_qcs): New function.
1732 (number_or_range_parser::finished): Ensure parsing end is detected
1733 before end of string.
1734 * cli-utils.h (parse_flags): New function.
1735 (parse_flags_qcs): New function.
1736 (number_or_range_parser): Remove m_finished bool.
1737 (number_or_range_parser::skip_range): Set m_in_range to false.
1739 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
1741 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1744 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1745 Jan Kratochvil <jan.kratochvil@redhat.com>
1746 Paul Fertser <fercerpav@gmail.com>
1747 Tsutomu Seki <sekiriki@gmail.com>
1748 Pedro Alves <palves@redhat.com>
1750 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1751 'unittests/parse-connection-spec-selftests.c'.
1752 (COMMON_SFILES): Add 'common/netstuff.c'.
1753 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1754 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1755 * common/netstuff.c: New file.
1756 * common/netstuff.h: New file.
1757 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1758 (wait_for_connect): Update comment. New parameter
1759 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1760 Use 'sock' directly instead of 'scb->fd'.
1761 (try_connect): New function, with code from 'net_open'.
1762 (net_open): Rewrite main loop to deal with multiple
1763 sockets/addresses. Handle IPv6-style hostnames; implement
1764 support for IPv6 connections.
1765 * unittests/parse-connection-spec-selftests.c: New file.
1767 2018-07-11 Pedro Alves <palves@redhat.com>
1770 * remote.c (remote_target::remote_detach_pid): Call
1771 set_current_process.
1773 2018-07-11 Pedro Alves <palves@redhat.com>
1775 * h8300-tdep.c (h8300_gdbarch_init): Remove
1776 set_gdbarch_ecoff_reg_to_regnum calls.
1778 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1781 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1782 offsets/sizes for static members of a class/struct.
1784 2018-07-11 Alan Hayward <alan.hayward@arm.com>
1786 * target-descriptions.c (tdesc_register_bitsize): Rename.
1787 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1788 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1789 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1791 2018-07-10 Tom Tromey <tom@tromey.com>
1793 * breakpoint.c (moribund_locations): Now static and a
1795 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1796 (build_bpstat_chain, update_global_location_list)
1797 (breakpoint_retire_moribund): Update.
1798 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1801 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1803 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1804 (riscv_register_reggroup_p): Use new function, remove unneeded
1806 (riscv_push_dummy_call): Extend assert to compare against xlen or
1807 flen based on register type.
1809 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1811 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1813 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1815 * remote.c (show_hardware_watchpoint_limit): New function.
1816 (show_hardware_watchpoint_length_limit): New function.
1817 (show_hardware_breakpoint_limit): New function.
1818 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1819 where appropriate, update help text.
1821 2018-07-09 Tom Tromey <tom@tromey.com>
1823 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1824 (CLIBS): Don't mention NAT_CLIBS.
1826 2018-07-09 Tom Tromey <tom@tromey.com>
1828 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1829 (LIBGDB_OBS, clean mostlyclean): Update.
1830 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1832 2018-07-09 Tom Tromey <tom@tromey.com>
1834 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1835 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1836 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1838 2018-07-09 Tom Tromey <tom@tromey.com>
1840 * Makefile.in (ALLDEPFILES): Remove exec.c.
1841 (COMMON_OBS): Remove exec.o.
1842 (COMMON_SFILES): Add exec.c.
1844 2018-07-09 Tom Tromey <tom@tromey.com>
1846 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1848 2018-07-09 Tom Tromey <tom@tromey.com>
1850 * Makefile.in (clean mostlyclean): Remove stamp-version.
1851 (version.c): Depend on stamp-version.
1852 (stamp-version): New rule, from version.c rule.
1854 2018-07-09 Tom Tromey <tom@tromey.com>
1856 * Makefile.in (init.c): Depend on stamp-init.
1857 (stamp-init): New rule, from init.c rule.
1858 (clean mostlyclean): Remove stamp-init.
1860 2018-07-09 Tom Tromey <tom@tromey.com>
1862 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1863 SUBDIR_GCC_COMPILE_SRCS.
1865 2018-07-09 Tom Tromey <tom@tromey.com>
1867 * Makefile.in (init.c): Remove some unused sed rules.
1869 2018-07-09 Tom Tromey <tom@tromey.com>
1871 * Makefile.in (TSOBS): Remove.
1872 (INIT_FILES): Update.
1873 (LIBGDB_OBS): Update.
1874 (COMMON_SFILES): Add inflow.c.
1875 (SFILES): Remove inflow.c.
1877 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1879 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1881 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1883 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1884 get_saveloc_name, is_signal_frame_name, step_name,
1885 init_remote_name, create_addr_space_name,
1886 destroy_addr_space_name, search_unwind_table_name,
1887 find_dyn_list_name): Constify.
1889 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1891 * darwin-nat.c (darwin_pthread_kill): New function.
1892 (darwin_resume_thread): Use darwin_pthread_kill.
1894 2018-07-05 Tom de Vries <tdevries@suse.de>
1896 * macroexp.c (macro_buffer) <operator=>: New member function.
1898 2018-07-04 Tom Tromey <tom@tromey.com>
1900 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1902 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
1904 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1905 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1906 * maint.c: Likewise.
1909 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1911 * NEWS: Create a new section for the next release branch.
1912 Rename the section of the current branch, now that it has
1915 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1917 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1918 * version.in: Bump version to 8.2.50.DATE-git.
1920 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1921 Pedro Alves <palves@redhat.com>
1923 * linux-nat.c (linux_init_ptrace): Rename to ...
1924 (linux_init_ptrace_procfs): ... this. Call
1925 linux_proc_init_warnings.
1926 (linux_nat_target::post_attach)
1927 (linux_nat_target::post_startup_inferior): Adjust.
1928 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1929 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1931 2018-07-04 Tom de Vries <tdevries@suse.de>
1933 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1935 (read_comp_unit_head): ... here.
1937 2018-07-03 Tom Tromey <tom@tromey.com>
1939 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1940 (stop_tracing, tstatus_command)
1941 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1942 (print_one_static_tracepoint_marker): Update.
1943 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1945 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
1947 (all_tracepoints, static_tracepoints_here): Return std::vector.
1949 2018-07-03 Tom Tromey <tom@tromey.com>
1951 * common/ptid.c (ptid_equal): Remove.
1952 * common/ptid.h (ptid_equal): Don't declare.
1953 * ada-tasks.c: Update.
1954 * breakpoint.c: Update.
1955 * common/agent.c: Update.
1956 * corelow.c: Update.
1957 * darwin-nat-info.c: Update.
1958 * darwin-nat.c: Update.
1960 * dtrace-probe.c: Update.
1961 * dummy-frame.c: Update.
1962 * fbsd-nat.c: Update.
1964 * gdbthread.h: Update.
1965 * gnu-nat.c: Update.
1966 * go32-nat.c: Update.
1967 * inf-loop.c: Update.
1968 * inf-ptrace.c: Update.
1969 * infcall.c: Update.
1973 * linux-fork.c: Update.
1974 * linux-nat.c: Update.
1975 * linux-thread-db.c: Update.
1976 * mi/mi-cmd-var.c: Update.
1977 * mi/mi-interp.c: Update.
1978 * mi/mi-main.c: Update.
1979 * nto-procfs.c: Update.
1980 * ppc-linux-tdep.c: Update.
1982 * python/py-inferior.c: Update.
1983 * python/py-record-btrace.c: Update.
1984 * python/py-record.c: Update.
1985 * ravenscar-thread.c: Update.
1986 * regcache.c: Update.
1987 * remote-sim.c: Update.
1989 * sol-thread.c: Update.
1992 * tui/tui-stack.c: Update.
1994 * windows-nat.c: Update.
1995 * windows-tdep.c: Update.
1997 2018-07-03 Tom Tromey <tom@tromey.com>
1999 * common/ptid.c (ptid_match): Remove.
2000 * common/ptid.h (ptid_match): Don't declare.
2001 * fbsd-nat.c: Update.
2004 * linux-nat.c: Update.
2005 * record-btrace.c: Update.
2006 * regcache.c: Update.
2009 2018-07-03 Tom Tromey <tom@tromey.com>
2011 * common/ptid.c (ptid_tid_p): Remove.
2012 * common/ptid.h (ptid_tid_p): Don't declare.
2013 * sol-thread.c: Update.
2015 2018-07-03 Tom Tromey <tom@tromey.com>
2017 * common/ptid.c (ptid_lwp_p): Remove.
2018 * common/ptid.h (ptid_lwp_p): Don't declare.
2019 * fbsd-nat.c: Update.
2020 * linux-nat.c: Update.
2021 * nat/linux-procfs.c: Update.
2022 * nat/x86-linux-dregs.c: Update.
2023 * sol-thread.c: Update.
2025 2018-07-03 Tom Tromey <tom@tromey.com>
2027 * common/ptid.c (ptid_is_pid): Remove.
2028 * common/ptid.h (ptid_is_pid): Don't declare.
2030 * linux-nat.c: Update.
2031 * mi/mi-interp.c: Update.
2035 2018-07-03 Tom Tromey <tom@tromey.com>
2037 * common/ptid.c (ptid_get_tid): Remove.
2038 * common/ptid.h (ptid_get_tid): Don't declare.
2039 * ada-tasks.c: Update.
2040 * aix-thread.c: Update.
2041 * bsd-uthread.c: Update.
2042 * darwin-nat.c: Update.
2043 * fbsd-nat.c: Update.
2044 * i386-darwin-nat.c: Update.
2046 * linux-tdep.c: Update.
2047 * nto-procfs.c: Update.
2048 * ppc-ravenscar-thread.c: Update.
2049 * python/py-infthread.c: Update.
2050 * ravenscar-thread.c: Update.
2051 * sol-thread.c: Update.
2052 * sparc-ravenscar-thread.c: Update.
2053 * windows-nat.c: Update.
2055 2018-07-03 Tom Tromey <tom@tromey.com>
2057 * common/ptid.c (ptid_get_lwp): Remove.
2058 * common/ptid.h (ptid_get_lwp): Don't declare.
2059 * aarch64-linux-nat.c: Update.
2060 * ada-tasks.c: Update.
2061 * aix-thread.c: Update.
2062 * amd64-linux-nat.c: Update.
2063 * arm-linux-nat.c: Update.
2064 * corelow.c: Update.
2065 * fbsd-nat.c: Update.
2066 * fbsd-tdep.c: Update.
2067 * gnu-nat.c: Update.
2068 * i386-cygwin-tdep.c: Update.
2069 * i386-gnu-nat.c: Update.
2070 * i386-linux-nat.c: Update.
2071 * ia64-linux-nat.c: Update.
2072 * inf-ptrace.c: Update.
2074 * linux-fork.c: Update.
2075 * linux-nat.c: Update.
2076 * linux-tdep.c: Update.
2077 * linux-thread-db.c: Update.
2078 * mips-linux-nat.c: Update.
2079 * nat/aarch64-linux-hw-point.c: Update.
2080 * nat/aarch64-linux.c: Update.
2081 * nat/linux-btrace.c: Update.
2082 * nat/linux-osdata.c: Update.
2083 * nat/linux-procfs.c: Update.
2084 * nat/x86-linux-dregs.c: Update.
2085 * obsd-nat.c: Update.
2086 * ppc-fbsd-nat.c: Update.
2087 * ppc-linux-nat.c: Update.
2089 * python/py-infthread.c: Update.
2090 * ravenscar-thread.c: Update.
2092 * s390-linux-nat.c: Update.
2093 * sol-thread.c: Update.
2094 * sol2-tdep.c: Update.
2095 * spu-linux-nat.c: Update.
2096 * x86-linux-nat.c: Update.
2097 * xtensa-linux-nat.c: Update.
2099 2018-07-03 Tom Tromey <tom@tromey.com>
2101 * common/ptid.c (ptid_get_pid): Remove.
2102 * common/ptid.h (ptid_get_pid): Don't declare.
2103 * aarch64-linux-nat.c: Update.
2104 * ada-lang.c: Update.
2105 * aix-thread.c: Update.
2106 * alpha-bsd-nat.c: Update.
2107 * amd64-fbsd-nat.c: Update.
2108 * amd64-linux-nat.c: Update.
2109 * arm-linux-nat.c: Update.
2110 * arm-nbsd-nat.c: Update.
2112 * break-catch-syscall.c: Update.
2113 * breakpoint.c: Update.
2114 * bsd-uthread.c: Update.
2115 * corelow.c: Update.
2117 * darwin-nat.c: Update.
2118 * fbsd-nat.c: Update.
2119 * fbsd-tdep.c: Update.
2121 * gnu-nat.c: Update.
2122 * hppa-nbsd-nat.c: Update.
2123 * hppa-obsd-nat.c: Update.
2124 * i386-fbsd-nat.c: Update.
2125 * ia64-linux-nat.c: Update.
2126 * inf-ptrace.c: Update.
2128 * inferior.c: Update.
2129 * inferior.h: Update.
2132 * linux-fork.c: Update.
2133 * linux-nat.c: Update.
2134 * linux-tdep.c: Update.
2135 * linux-thread-db.c: Update.
2136 * m68k-bsd-nat.c: Update.
2137 * mi/mi-interp.c: Update.
2138 * mi/mi-main.c: Update.
2139 * mips-linux-nat.c: Update.
2140 * mips-nbsd-nat.c: Update.
2141 * mips64-obsd-nat.c: Update.
2142 * nat/aarch64-linux-hw-point.c: Update.
2143 * nat/aarch64-linux.c: Update.
2144 * nat/linux-btrace.c: Update.
2145 * nat/linux-osdata.c: Update.
2146 * nat/linux-procfs.c: Update.
2147 * nat/x86-linux-dregs.c: Update.
2148 * nto-procfs.c: Update.
2149 * obsd-nat.c: Update.
2150 * ppc-linux-nat.c: Update.
2151 * ppc-nbsd-nat.c: Update.
2152 * ppc-obsd-nat.c: Update.
2153 * proc-service.c: Update.
2155 * python/py-inferior.c: Update.
2156 * python/py-infthread.c: Update.
2157 * ravenscar-thread.c: Update.
2159 * remote-sim.c: Update.
2161 * rs6000-nat.c: Update.
2162 * s390-linux-nat.c: Update.
2163 * sh-nbsd-nat.c: Update.
2164 * sol-thread.c: Update.
2165 * sparc-nat.c: Update.
2166 * sparc64-tdep.c: Update.
2167 * spu-linux-nat.c: Update.
2168 * spu-tdep.c: Update.
2169 * target-debug.h: Update.
2172 * tid-parse.c: Update.
2173 * tracefile-tfile.c: Update.
2174 * vax-bsd-nat.c: Update.
2175 * windows-nat.c: Update.
2176 * x86-linux-nat.c: Update.
2177 * x86-nat.c: Update.
2179 2018-07-03 Tom Tromey <tom@tromey.com>
2181 * common/ptid.c (pid_to_ptid): Remove.
2182 * common/ptid.h (pid_to_ptid): Don't declare.
2183 * aix-thread.c: Update.
2184 * arm-linux-nat.c: Update.
2185 * common/ptid.c: Update.
2186 * common/ptid.h: Update.
2187 * corelow.c: Update.
2189 * darwin-nat.c: Update.
2190 * fbsd-nat.c: Update.
2191 * fork-child.c: Update.
2192 * gnu-nat.c: Update.
2193 * go32-nat.c: Update.
2194 * inf-ptrace.c: Update.
2196 * inferior.c: Update.
2198 * linux-fork.c: Update.
2199 * linux-nat.c: Update.
2200 * nat/aarch64-linux-hw-point.c: Update.
2201 * nat/fork-inferior.c: Update.
2202 * nat/x86-linux-dregs.c: Update.
2203 * nto-procfs.c: Update.
2204 * obsd-nat.c: Update.
2206 * progspace.c: Update.
2208 * rs6000-nat.c: Update.
2209 * s390-linux-nat.c: Update.
2210 * sol-thread.c: Update.
2211 * spu-linux-nat.c: Update.
2214 * tracefile-tfile.c: Update.
2215 * windows-nat.c: Update.
2217 2018-07-03 Tom Tromey <tom@tromey.com>
2219 * common/ptid.h (ptid_build): Don't declare.
2220 * common/ptid.c (ptid_build): Remove.
2221 * aix-thread.c: Update.
2222 * bsd-kvm.c: Update.
2223 * bsd-uthread.c: Update.
2224 * common/agent.c: Update.
2225 * common/ptid.c: Update.
2226 * common/ptid.h: Update.
2227 * corelow.c: Update.
2228 * darwin-nat.c: Update.
2229 * fbsd-nat.c: Update.
2230 * gnu-nat.c: Update.
2231 * linux-fork.c: Update.
2232 * linux-nat.c: Update.
2233 * linux-thread-db.c: Update.
2234 * nat/linux-osdata.c: Update.
2235 * nat/linux-procfs.c: Update.
2236 * nto-procfs.c: Update.
2237 * obsd-nat.c: Update.
2238 * proc-service.c: Update.
2240 * ravenscar-thread.c: Update.
2241 * remote-sim.c: Update.
2243 * sol-thread.c: Update.
2245 * windows-nat.c: Update.
2247 2018-07-03 Tom Tromey <tom@tromey.com>
2249 * infrun.c (follow_exec): Use exit_inferior_silent.
2250 * inferior.c (exit_inferior_num_silent): Remove.
2251 * inferior.h (exit_inferior_num_silent): Don't declare.
2253 2018-07-03 Tom Tromey <tom@tromey.com>
2256 * darwin-nat.c (darwin_attach_pid): Reset inferior and
2257 inferior_ptid on error.
2259 2018-07-02 Maciej W. Rozycki <macro@mips.com>
2260 Simon Marchi <simon.marchi@polymtl.ca>
2263 * disasm.h (gdb_disassembler): Add
2264 `m_disassembler_options_holder'. member
2265 * disasm.c (get_all_disassembler_options): New function.
2266 (gdb_disassembler::gdb_disassembler): Use it.
2267 (gdb_buffered_insn_length_init_dis): Likewise.
2268 (gdb_buffered_insn_length): Adjust accordingly.
2269 (set_disassembler_options): Handle options with arguments.
2270 (show_disassembler_options_sfunc): Likewise. Add a leading new
2271 line if showing options with descriptions.
2272 (disassembler_options_completer): Adapt to using the
2273 `disasm_options_and_args_t' structure.
2274 * mips-tdep.c (mips_disassembler_options): New variable.
2275 (mips_disassembler_options_o32): Likewise.
2276 (mips_disassembler_options_n32): Likewise.
2277 (mips_disassembler_options_n64): Likewise.
2278 (gdb_print_insn_mips): Don't set `disassembler_options'.
2279 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2281 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2282 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
2283 `gdbarch_disassembler_options_implicit' and
2284 `gdbarch_valid_disassembler_options'.
2285 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2286 `disasm_options_and_args_t' structure.
2287 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2289 (valid_disassembler_options): Switch from `disasm_options_t' to
2290 the `disasm_options_and_args_t' structure.
2291 * NEWS: Document `set disassembler-options' support for the MIPS
2293 * gdbarch.h: Regenerate.
2294 * gdbarch.c: Regenerate.
2296 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
2298 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2300 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2302 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2303 parameter in call to amd64_target_description.
2304 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2305 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2306 (amd64fbsd_init_abi): Likewise.
2307 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2308 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2309 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2310 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2312 2018-06-29 Pedro Alves <palves@redhat.com>
2314 * gdb/amd64-tdep.h (amd64_create_target_description): Add
2315 "segments" parameter.
2316 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2317 (_initialize_amd64_tdep): Update call to
2318 amd64_create_target_description.
2319 (amd64_target_description): Add "segments" parameter. Adjust
2320 the implementation to use it.
2321 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2322 call to amd64_create_target_description.
2323 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2324 * gdb/arch/amd64.h (amd64_create_target_description): Add
2325 "segments" register.
2326 * gdb/arch/amd64.c (amd64_create_target_description): Add
2327 "segments" parameter. Call create_feature_i386_64bit_segments
2328 only if SEGMENTS is true.
2329 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2330 call to amd64_create_target_description.
2332 2018-06-29 Pedro Alves <palves@redhat.com>
2334 * thread.c (thread_target_id_str): New, factored out from ...
2335 (print_thread_info_1): ... here. Use it to compute the max
2336 "Target Id" column width.
2338 2018-06-29 Pedro Alves <palves@redhat.com>
2340 * remote.c (remote_target::extra_thread_info): Delete
2341 'display_buf' and 'n' locals. from the cache, regardless of
2342 packet mechanims is in use. Use cache for qThreadExtra and qP
2345 2018-06-29 Pedro Alves <palves@redhat.com>
2347 * blockframe.c (find_pc_sect_containing_function): New function.
2348 * breakpoint.c (print_breakpoint_location): Don't call
2349 find_pc_sect_function.
2350 * linespec.c (create_sals_line_offset): Record the location's
2352 * linespec.c (convert_address_location_to_sals): Fill in sal's
2353 symbol with find_pc_sect_containing_function.
2354 * symtab.c (find_function_start_sal): Rename to ...
2355 (find_function_start_sal_1): ... this.
2356 (find_function_start_sal): Reimplement as wrapper around
2357 find_function_start_sal_1, and use
2358 find_pc_sect_containing_function to fill in the sal's symbol.
2359 (find_function_start_sal(symbol*, bool)): Adjust.
2360 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2362 (find_pc_sect_containing_function): Declare.
2364 2018-06-29 Pedro Alves <palves@redhat.com>
2366 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2367 true if the the location has no symbol.
2369 2018-06-28 Tom Tromey <tom@tromey.com>
2371 * NEWS: Mention --enable-codesign.
2372 * silent-rules.mk (ECHO_SIGN): New variable.
2373 * configure.ac: Add --enable-codesign.
2374 * configure: Rebuild.
2375 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2376 (gdb$(EXEEXT)): Optionally invoke codesign.
2378 2018-06-28 Pedro Alves <palves@redhat.com>
2380 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2382 (switch_to_thread_no_regs): Adjust comment.
2383 * infcmd.c (stop_pc): Delete.
2384 (post_create_inferior, info_program_command): Replace references
2385 to stop_pc with references to thread_info->suspend.stop_pc.
2386 * inferior.h (stop_pc): Delete declaration.
2387 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2388 (handle_inferior_event_1, handle_signal_stop)
2389 (process_event_stop_test, keep_going_stepped_thread)
2390 (handle_step_into_function, handle_step_into_function_backward)
2391 (print_stop_location): Replace references to stop_pc with
2392 references to thread_info->suspend.stop_pc.
2393 (struct infcall_suspend_state) <stop_pc>: Delete field.
2394 (save_infcall_suspend_state, restore_infcall_suspend_state):
2395 Remove references to inf_stat->stop_pc.
2396 * linux-fork.c (fork_load_infrun_state): Likewise.
2397 * record-btrace.c (record_btrace_set_replay): Likewise.
2398 * record-full.c (record_full_goto_entry): Likewise.
2399 * remote.c (print_one_stopped_thread): Likewise.
2400 * target.c (target_resume): Extend comment.
2401 * thread.c (set_executing_thread): New.
2402 (set_executing): Use it.
2403 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2404 Remove references to stop_pc.
2406 2018-06-28 Pedro Alves <palves@redhat.com>
2408 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2409 Moving fetching stop_pc until after ecs->event_thread is refreshed.
2411 2018-06-28 Tom Tromey <tom@tromey.com>
2413 * coffread.c (coff_symfile_finish): Update.
2414 * xcoffread.c (xcoff_symfile_finish): Update.
2415 * elfread.c (elf_symfile_finish): Update.
2416 * symfile.h (dwarf2_free_objfile): Don't declare.
2417 * dwarf2read.c (_initialize_dwarf2_read): Use
2418 register_objfile_data_with_cleanup.
2419 (dwarf2_free_objfile): Now static. Change signature.
2421 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2423 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2424 option "-o" to add-symbol-file-load to add an offset to each
2425 section's load address.
2426 * symfile.c (set_objfile_default_section_offset): New function.
2428 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2430 * symfile.c (add_symbol_file_command): Make sure that sections
2431 with the same name are sorted in the same order.
2433 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2435 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2436 require the second argument. If omitted, load sections at the
2437 addresses specified in the file.
2439 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2441 * symfile.c (symbol_file_command, symbol_file_add_main_1)
2442 (_initialize_symfile): Add option "-o" to symbol-file to add an
2443 offset to each section of the symbol file.
2445 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2447 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2449 2018-06-27 Tom Tromey <tom@tromey.com>
2451 * stack.c (_initialize_stack): Update "func" help text.
2453 2018-06-27 Tom Tromey <tom@tromey.com>
2455 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2457 (unwind_infopy_str, pyuw_create_unwind_info)
2458 (unwind_infopy_add_saved_register, pyuw_sniffer)
2459 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2461 (struct saved_reg): Add constructor.
2462 <value>: Now a gdbpy_ref<>.
2464 2018-06-27 Tom Tromey <tom@tromey.com>
2466 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2468 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2470 * gdb-gdb.py.in: Format using autopep8.
2472 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2474 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2475 (type_lookup_function): Recognize CORE_ADDR values.
2477 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2479 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2482 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2484 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2487 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2489 * gdb-gdb.py: Move to...
2490 * gdb-gdb.py.in: ... here.
2491 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2492 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2494 (distclean): Remove gdb-gdb.py when cleaning.
2495 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2496 * configure: Re-generate.
2498 2018-06-27 Pedro Alves <palves@redhat.com>
2500 * proc-service.c (get_ps_regcache): New.
2501 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2502 (ps_lsetfpregs): Use it.
2504 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
2507 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2508 (dwarf_decode_lines_1): Adjust.
2510 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2512 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2514 <info_proc>: Likewise.
2516 2018-06-26 Joel Brobecker <brobecker@adacore.com>
2518 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2519 to windows_fetch_one_register, and only handle the case of
2520 fetching one register. Move the code that reloads the context
2521 and iterates over all registers if R is negative to...
2522 (windows_nat_target::fetch_registers): ... here.
2523 (do_windows_store_inferior_registers): Rename to
2524 windows_store_one_register, and only handle the case of storing
2525 one register. Move the code that handles the case where r is
2527 (windows_nat_target::store_registers) ... here.
2529 2018-06-26 Tom Tromey <tom@tromey.com>
2532 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2533 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2535 (rust_internal_print_type): Add podata parameter.
2536 (rust_print_type): Update.
2538 2018-06-26 Tom Tromey <tom@tromey.com>
2540 * typeprint.h (struct print_offset_data) <update, finish,
2541 maybe_print_hole>: New methods.
2542 <indentation>: New constant.
2543 * typeprint.c (print_offset_data::indentation): Define.
2544 (print_offset_data::maybe_print_hole, print_offset_data::update)
2545 (print_offset_data::finish): Move from c-typeprint.c and rename.
2546 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2547 (print_spaces_filtered_with_print_options): Update.
2548 (c_print_type_union_field_offset, maybe_print_hole)
2549 (c_print_type_struct_field_offset): Move to typeprint.c and
2551 (c_type_print_base_struct_union): Update.
2553 2018-06-25 Pedro Alves <palves@redhat.com>
2555 * gdbthread.h (thread_info_ref, delete_thread)
2556 (delete_thread_silent, first_thread_of_inferior)
2557 (any_thread_of_inferior, switch_to_thread)
2558 (enable_thread_stack_temporaries)
2559 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2560 (get_last_thread_stack_temporary)
2561 (value_in_thread_stack_temporaries, can_access_registers_thread):
2562 Spell out "struct thread_info" instead of just "thread_info".
2563 * inferior.h (notice_new_inferior): Likewise.
2565 2018-06-25 Pedro Alves <palves@redhat.com>
2567 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2568 pass thread_info pointer to delete_thread.
2569 (windows_nat_target::detach): Pass inferior pointer to
2571 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2573 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2574 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2575 and pass a thread_info pointer to delete_thread.
2576 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2577 pass thread_info pointer to delete_thread.
2578 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2579 delete_thread_silent call.
2580 * procfs.c (procfs_target::detach): Pass inferior pointer to
2582 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2583 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2584 delete_thread_silent call.
2585 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2586 pass thread_info pointer to delete_thread.
2587 (windows_nat_target::detach): Pass inferior pointer to
2590 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2592 * regcache.c (readable_regcache::read_part): Fix asserts.
2593 (reg_buffer::raw_collect_part): New function.
2594 (regcache::write_part): Fix asserts.
2595 (reg_buffer::raw_supply_part): New function.
2596 (regcache::transfer_regset_register): New helper function.
2597 (regcache::transfer_regset): Call new functions.
2598 (regcache_supply_regset): Use gdb_byte*.
2599 (regcache::supply_regset): Likewise.
2600 (regcache_collect_regset): Likewise.
2601 (regcache::collect_regset): Likewise.
2602 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2603 (reg_buffer::raw_supply_part): Likewise.
2604 (regcache::transfer_regset_register): Likewise.
2605 (regcache::transfer_regset): Use gdb_byte*.
2607 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2609 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2611 2018-06-21 Pedro Alves <palves@redhat.com>
2613 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2614 instead of a ptid_t. All callers adjusted.
2615 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2617 (print_ada_task_info, display_current_task_id, task_command_1):
2619 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2621 (breakpoint_kind): Adjust.
2622 (remove_breakpoints_pid): Rename to ...
2623 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2624 pointer. All callers adjusted.
2625 (bpstat_clear_actions): Use inferior_thread.
2626 (get_bpstat_thread): New.
2627 (bpstat_do_actions): Use it.
2628 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2629 to take a thread_info pointer. All callers adjusted.
2630 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2631 (breakpoint_re_set_thread): Use inferior_thread.
2632 * breakpoint.h (struct inferior): Forward declare.
2633 (bpstat_stop_status): Update.
2634 (remove_breakpoints_pid): Delete.
2635 (remove_breakpoints_inf): New.
2636 * bsd-uthread.c (bsd_uthread_target::wait)
2637 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2638 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2639 (maint_btrace_packet_history_cmd)
2640 (maint_btrace_clear_packet_history_cmd): Adjust.
2641 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2643 * cli/cli-interp.c: Include "inferior.h".
2644 * common/refcounted-object.h (struct
2645 refcounted_object_ref_policy): New.
2646 * compile/compile-object-load.c: Include gdbthread.h.
2647 (store_regs): Use inferior_thread.
2648 * corelow.c (core_target::close): Use current_inferior.
2649 (core_target_open): Adjust to use first_thread_of_inferior and use
2650 the current inferior.
2651 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2652 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2653 <thread>: ... this new field. All references adjusted.
2654 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2655 Take a thread_info pointer instead of a ptid_t.
2656 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2657 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2658 thread_info pointer instead of a ptid_t.
2659 * elfread.c: Include "inferior.h".
2660 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2661 Use inferior_thread.
2662 * eval.c (evaluate_subexp): Likewise.
2663 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2665 * gdb_proc_service.h (struct thread_info): Forward declare.
2666 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2667 <thread>: ... this new field. All references adjusted.
2668 * gdbarch.h, gdbarch.c: Regenerate.
2669 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2670 'thread' parameter. All implementations and callers adjusted.
2671 * gdbthread.h (thread_info) <set_running>: New method.
2672 (delete_thread, delete_thread_silent): Take a thread_info pointer
2674 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2675 (first_thread_of_process): Delete, replaced by ...
2676 (first_thread_of_inferior): ... this new function. All callers
2678 (any_live_thread_of_process): Delete, replaced by ...
2679 (any_live_thread_of_inferior): ... this new function. All callers
2681 (switch_to_thread, switch_to_no_thread): Declare.
2682 (is_executing): Delete.
2683 (enable_thread_stack_temporaries): Update comment.
2684 <enable_thread_stack_temporaries>: Take a thread_info pointer
2685 instead of a ptid_t. Incref the thread.
2686 <~enable_thread_stack_temporaries>: Decref the thread.
2689 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2690 (get_last_thread_stack_temporary)
2691 (value_in_thread_stack_temporaries, can_access_registers_thread):
2692 Take a thread_info pointer instead of a ptid_t. All callers
2694 * infcall.c (get_call_return_value): Use inferior_thread.
2695 (run_inferior_call): Work with thread pointers instead of ptid_t.
2696 (call_function_by_hand_dummy): Work with thread pointers instead
2697 of ptid_t. Use thread_info_ref.
2698 * infcmd.c (proceed_thread_callback): Access thread's state
2700 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2701 access thread's state directly.
2702 (continue_command): Use inferior_thread.
2703 (info_program_command): Use find_thread_ptid and access thread
2705 (proceed_after_attach_callback): Use thread state directly.
2706 (notice_new_inferior): Take a thread_info pointer instead of a
2707 ptid_t. All callers adjusted.
2708 (exit_inferior): Take an inferior pointer instead of a pid. All
2710 (exit_inferior_silent): New.
2711 (detach_inferior): Delete.
2712 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2713 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2714 (detach_inferior_command, kill_inferior_command): Use
2715 find_inferior_id instead of valid_gdb_inferior_id and
2716 gdb_inferior_id_to_pid.
2717 (inferior_command): Use inferior and thread pointers.
2718 * inferior.h (struct thread_info): Forward declare.
2719 (notice_new_inferior): Take a thread_info pointer instead of a
2720 ptid_t. All callers adjusted.
2721 (detach_inferior): Delete declaration.
2722 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2723 instead of a pid. All callers adjusted.
2724 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2725 (valid_gdb_inferior_id): Delete.
2726 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2727 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2728 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2730 <inf>: ... this new field.
2731 <step_ptid>: Delete, replaced by ...
2732 <step_thread>: ... this new field.
2733 (get_displaced_stepping_state): Take an inferior pointer instead
2734 of a pid. All callers adjusted.
2735 (displaced_step_in_progress_any_inferior): Adjust.
2736 (displaced_step_in_progress_thread): Take a thread pointer instead
2737 of a ptid_t. All callers adjusted.
2738 (displaced_step_in_progress, add_displaced_stepping_state): Take
2739 an inferior pointer instead of a pid. All callers adjusted.
2740 (get_displaced_step_closure_by_addr): Adjust.
2741 (remove_displaced_stepping_state): Take an inferior pointer
2742 instead of a pid. All callers adjusted.
2743 (displaced_step_prepare_throw, displaced_step_prepare)
2744 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2745 All callers adjusted.
2746 (start_step_over): Adjust.
2747 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2748 displaced step queue.
2749 (do_target_resume): Adjust.
2750 (fetch_inferior_event): Use inferior_thread.
2751 (context_switch, get_inferior_stop_soon): Take an
2752 execution_control_state pointer instead of a ptid_t. All callers
2754 (switch_to_thread_cleanup): Delete.
2755 (stop_all_threads): Use scoped_restore_current_thread.
2756 * inline-frame.c: Include "gdbthread.h".
2757 (inline_state) <inline_state>: Take a thread pointer instead of a
2758 ptid_t. All callers adjusted.
2759 <ptid>: Delete, replaced by ...
2760 <thread>: ... this new field.
2761 (find_inline_frame_state): Take a thread pointer instead of a
2762 ptid_t. All callers adjusted.
2763 (skip_inline_frames, step_into_inline_frame)
2764 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2765 pointer instead of a ptid_t. All callers adjusted.
2766 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2767 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2768 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2770 * linux-nat.c (get_detach_signal): Likewise.
2771 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2772 (thread_db_notice_clone): Adjust.
2773 (thread_db_find_new_threads_silently)
2774 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2775 a thread pointer instead of a ptid_t. All callers adjusted.
2776 * mi/mi-cmd-var.c: Include "inferior.h".
2777 (mi_cmd_var_update_iter): Update to use thread pointers.
2778 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2780 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2782 (mi_output_running): ... this new function.
2783 (mi_on_resume_1): Adjust to use it.
2784 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2785 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2787 (interrupt_thread_callback): : Adjust to use thread and inferior
2789 * proc-service.c: Include "gdbthread.h".
2790 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2791 * progspace-and-thread.c: Include "inferior.h".
2792 * progspace.c: Include "inferior.h".
2793 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2794 hold a reference to an inferior_object.
2795 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2797 * python/py-inferior.c (struct inferior_object): Give the type a
2798 tag name instead of a typedef.
2799 (python_on_normal_stop): No need to check if the current thread is
2801 (inferior_to_inferior_object): Change return type to
2802 inferior_object. All callers adjusted.
2803 (find_thread_object): Delete, bits factored out to ...
2804 (thread_to_thread_object): ... this new function.
2805 * python/py-infthread.c (create_thread_object): Use
2806 inferior_to_inferior_object.
2807 (thpy_is_stopped): Use thread pointer directly.
2808 (gdbpy_selected_thread): Use inferior_thread.
2809 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2810 field, replaced with ...
2811 <thread>: ... this new field. All users adjusted.
2812 (btpy_insn_or_gap_new): Drop const.
2813 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2815 * python/py-record.c: Include "gdbthread.h".
2816 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2817 a ptid_t. All callers adjusted.
2818 (gdbpy_current_recording): Use inferior_thread.
2819 * python/py-record.h (recpy_record_object) <ptid>: Delete
2820 field, replaced with ...
2821 <thread>: ... this new field. All users adjusted.
2822 (recpy_element_object) <ptid>: Delete
2823 field, replaced with ...
2824 <thread>: ... this new field. All users adjusted.
2825 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2826 a ptid_t. All callers adjusted.
2827 * python/py-threadevent.c: Include "gdbthread.h".
2828 (get_event_thread): Use thread_to_thread_object.
2829 * python/python-internal.h (struct inferior_object): Forward
2831 (find_thread_object, find_inferior_object): Delete declarations.
2832 (thread_to_thread_object, inferior_to_inferior_object): New
2834 * record-btrace.c: Include "inferior.h".
2835 (require_btrace_thread): Use inferior_thread.
2836 (record_btrace_frame_sniffer)
2837 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2838 (get_thread_current_frame): Use scoped_restore_current_thread and
2840 (get_thread_current_frame): Use thread pointer directly.
2841 (record_btrace_replay_at_breakpoint): Use thread's inferior
2843 * record-full.c: Include "inferior.h".
2844 * regcache.c: Include "gdbthread.h".
2845 (get_thread_arch_regcache): Use the inferior's address space
2847 (get_thread_regcache, registers_changed_thread): New.
2848 * regcache.h (get_thread_regcache(thread_info *thread)): New
2850 (registers_changed_thread): New.
2851 (remote_target) <remote_detach_1>: Swap order of parameters.
2852 (remote_add_thread): <remote_add_thread>: Return the new thread.
2853 (get_remote_thread_info(ptid_t)): New overload.
2854 (remote_target::remote_notice_new_inferior): Use thread pointers
2856 (remote_target::process_initial_stop_replies): Use
2857 thread_info::set_running.
2858 (remote_target::remote_detach_1, remote_target::detach)
2859 (extended_remote_target::detach): Adjust.
2860 * stack.c (frame_show_address): Use inferior_thread.
2861 * target-debug.h (target_debug_print_thread_info_pp): New.
2862 * target-delegates.c: Regenerate.
2863 * target.c (default_thread_address_space): Delete.
2864 (memory_xfer_partial_1): Use current_inferior.
2865 (target_detach): Use current_inferior.
2866 (target_thread_address_space): Delete.
2867 (generic_mourn_inferior): Use current_inferior.
2868 * target.h (struct target_ops) <thread_address_space>: Delete.
2869 (target_thread_address_space): Delete.
2870 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2872 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2873 thread pointer instead of a ptid_t. Adjust all callers.
2874 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2875 (first_thread_of_process): Delete, replaced by ...
2876 (first_thread_of_inferior): ... this new function. All callers
2878 (any_thread_of_process): Rename to ...
2879 (any_thread_of_inferior): ... this, and take an inferior pointer.
2880 (any_live_thread_of_process): Rename to ...
2881 (any_live_thread_of_inferior): ... this, and take an inferior
2883 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2884 (value_in_thread_stack_temporaries)
2885 (get_last_thread_stack_temporary): Take a thread pointer instead
2886 of a ptid_t. Adjust all callers.
2887 (thread_info::set_running): New.
2888 (validate_registers_access): Use inferior_thread.
2889 (can_access_registers_ptid): Rename to ...
2890 (can_access_registers_thread): ... this, and take a thread
2892 (print_thread_info_1): Adjust to compare thread pointers instead
2894 (switch_to_no_thread, switch_to_thread): Make extern.
2895 (scoped_restore_current_thread::~scoped_restore_current_thread):
2896 Use m_thread pointer directly.
2897 (scoped_restore_current_thread::scoped_restore_current_thread):
2898 Use inferior_thread.
2899 (thread_command): Use thread pointer directly.
2900 (thread_num_make_value_helper): Use inferior_thread.
2901 * top.c (execute_command): Use inferior_thread.
2902 * tui/tui-interp.c: Include "inferior.h".
2903 * varobj.c (varobj_create): Use inferior_thread.
2904 (value_of_root_1): Use find_thread_global_id instead of
2905 global_thread_id_to_ptid.
2907 2018-06-21 Alan Hayward <alan.hayward@arm.com>
2909 * regcache.c (readable_regcache::read_part): Avoid memcpy when
2911 (regcache::write_part): Likewise.
2912 (readable_regcache::cooked_read_part): Update comment.
2913 (readable_regcache::cooked_write_part): Likewise.
2914 * regcache.h: (readable_regcache::read_part): Likewise.
2915 (regcache::write_part): Likewise.
2917 2018-06-21 Richard Bunt <richard.bunt@arm.com>
2918 Dirk Schubert <dirk.schubert@arm.com>
2920 * aarch64-linux-nat.c (post_attach): New.
2921 (aarch64_linux_nat_target::post_attach): Override post_attach to
2922 record the number of hardware debug registers.
2924 2018-06-20 Tom Tromey <tom@tromey.com>
2926 * python/py-param.c (add_setshow_generic): Make parameters const.
2927 (parmpy_init): Update.
2929 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2931 * regcache.h (regcache_cooked_read_ftype): Rename to...
2932 (register_read_ftype): ...this, change type to function_view.
2933 (class reg_buffer) <save>: Remove src parameter.
2934 (readonly_detached_regcache) <readonly_detached_regcache>: Make
2935 parameter non-const in first overload. Remove src parameter in
2937 * regcache.c (do_cooked_read): Remove.
2938 (readonly_detached_regcache::readonly_detached_regcache): Make
2939 parameter non-const, adjust call to other constructor.
2940 (reg_buffer::save): Remove src parameter.
2941 * frame.c (do_frame_register_read): Remove.
2942 (frame_save_as_regcache): Use lambda function.
2943 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2944 parameter to ppu2spu_data *.
2945 (ppu2spu_sniffer): Use lambda function.
2947 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2949 * record-full.c (record_full_target::insert_breakpoint): Remove
2950 "struct" keyword, add const.
2952 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2954 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2955 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2956 * configure.ac: Remove AC_PREREQ, add missing quoting.
2957 * gnulib/configure.ac: Modernize usage of
2958 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
2959 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2960 (AUTOMAKE_VERSION): Bump to 1.15.1.
2961 * configure: Re-generate.
2962 * config.in: Re-generate.
2963 * aclocal.m4: Re-generate.
2964 * gnulib/aclocal.m4: Re-generate.
2965 * gnulib/config.in: Re-generate.
2966 * gnulib/configure: Re-generate.
2967 * gnulib/import/Makefile.in: Re-generate.
2969 2018-06-19 Pedro Alves <palves@redhat.com>
2971 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2972 (lookup_minimal_symbol_by_pc_section): ... here with
2973 gdb_assert_not_reached added.
2975 2018-06-19 Pedro Alves <palves@redhat.com>
2977 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2978 parameter with a block parameter. Compare location's block symbol
2979 with the frame's block instead of addresses.
2980 (skip_inline_frames): Pass the current block instead of the
2981 frame's address. Break out as soon as we determine the frame
2982 should not be skipped.
2984 2018-06-18 Tom Tromey <tom@tromey.com>
2986 * solib-aix.c (solib_aix_get_section_offsets): Return
2988 (solib_aix_solib_create_inferior_hook): Update.
2990 2018-06-18 Tom Tromey <tom@tromey.com>
2992 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2994 2018-06-18 Tom Tromey <tom@tromey.com>
2996 * solib-frv.c (frv_relocate_main_executable): Use
2998 * solib-dsbt.c (dsbt_relocate_main_executable): Use
3001 2018-06-18 Tom Tromey <tom@tromey.com>
3003 * objfiles.h (inhibit_section_map_updates): Update.
3004 (resume_section_map_updates, resume_section_map_updates_cleanup):
3006 * solib-svr4.c (svr4_handle_solib_event): Update.
3007 * objfiles.c (inhibit_section_map_updates): Return
3008 scoped_restore_tmpl<int>.
3009 (resume_section_map_updates, resume_section_map_updates_cleanup):
3012 2018-06-18 Tom Tromey <tom@tromey.com>
3014 * valprint.h (read_string): Update.
3015 * valprint.c (read_string): Change type of "buffer".
3016 (val_print_string): Update.
3017 * python/py-value.c (valpy_string): Update.
3018 * language.h (struct language_defn) <la_get_string>: Change
3020 (default_get_string, c_get_string): Update.
3021 * language.c (default_get_string): Change type of "buffer".
3022 * guile/scm-value.c (gdbscm_value_to_string): Update.
3023 * c-lang.c (c_get_string): Change type of "buffer".
3025 2018-06-18 Tom Tromey <tom@tromey.com>
3027 * ser-mingw.c (struct pipe_state_destroyer): New.
3028 (pipe_state_up): New typedef.
3029 (cleanup_pipe_state): Remove.
3030 (pipe_windows_open): Use pipe_state_up. Don't release argv.
3032 2018-06-18 Tom Tromey <tom@tromey.com>
3034 * rust-lang.h (rust_yyerror): Don't declare.
3035 * rust-lang.c (rust_language_defn): Update.
3036 * rust-exp.y (yyerror): Now static.
3037 * parse.c (parse_exp_in_context_1): Update.
3038 * p-lang.h (p_yyerror): Don't declare.
3039 * p-lang.c (p_language_defn): Update.
3040 * p-exp.y (yyerror): Now static.
3041 * opencl-lang.c (opencl_language_defn): Update.
3042 * objc-lang.c (objc_language_defn): Update.
3043 * m2-lang.h (m2_yyerror): Don't declare.
3044 * m2-lang.c (m2_language_defn): Update.
3045 * m2-exp.y (yyerror): Now static.
3046 * language.h (struct language_defn) <la_error>: Remove.
3047 * language.c (unk_lang_error): Remove.
3048 (unknown_language_defn, auto_language_defn): Remove.
3049 * go-lang.h (go_yyerror): Don't declare.
3050 * go-lang.c (go_language_defn): Update.
3051 * go-exp.y (yyerror): Now static.
3052 * f-lang.h (f_yyerror): Don't declare.
3053 * f-lang.c (f_language_defn): Update.
3054 * f-exp.y (yyerror): Now static.
3055 * d-lang.h (d_yyerror): Don't declare.
3056 * d-lang.c (d_language_defn): Update.
3057 * d-exp.y (yyerror): Now static.
3058 * c-lang.h (c_yyerror): Don't declare.
3059 * c-lang.c (c_language_defn, cplus_language_defn)
3060 (asm_language_defn, minimal_language_defn): Update.
3061 * c-exp.y (yyerror): Now static.
3062 * ada-lang.h (ada_yyerror): Don't declare.
3063 * ada-lang.c (ada_language_defn): Update.
3064 * ada-exp.y (yyerror): Now static.
3066 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3068 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3069 (store_sveregs_to_thread): Likewise.
3070 (aarch64_linux_fetch_inferior_registers): Check for SVE.
3071 (aarch64_linux_store_inferior_registers): Likewise.
3072 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3074 (aarch64_sve_regs_copy_to_regcache): Likewise.
3075 (aarch64_sve_regs_copy_from_regcache): Likewise.
3076 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3078 (aarch64_sve_regs_copy_to_regcache): Likewise.
3079 (aarch64_sve_regs_copy_from_regcache): Likewise.
3080 (sve_context): Structure from Linux headers.
3081 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3082 (SVE_SIG_ZREG_SIZE): Likewise.
3083 (SVE_SIG_PREG_SIZE): Likewise.
3084 (SVE_SIG_FFR_SIZE): Likewise.
3085 (SVE_SIG_REGS_OFFSET): Likewise.
3086 (SVE_SIG_ZREGS_OFFSET): Likewise.
3087 (SVE_SIG_ZREG_OFFSET): Likewise.
3088 (SVE_SIG_ZREGS_SIZE): Likewise.
3089 (SVE_SIG_PREGS_OFFSET): Likewise.
3090 (SVE_SIG_PREG_OFFSET): Likewise.
3091 (SVE_SIG_PREGS_SIZE): Likewise.
3092 (SVE_SIG_FFR_OFFSET): Likewise.
3093 (SVE_SIG_REGS_SIZE): Likewise.
3094 (SVE_SIG_CONTEXT_SIZE): Likewise.
3095 (SVE_PT_REGS_MASK): Likewise.
3096 (SVE_PT_REGS_FPSIMD): Likewise.
3097 (SVE_PT_REGS_SVE): Likewise.
3098 (SVE_PT_VL_INHERIT): Likewise.
3099 (SVE_PT_VL_ONEXEC): Likewise.
3100 (SVE_PT_REGS_OFFSET): Likewise.
3101 (SVE_PT_FPSIMD_OFFSET): Likewise.
3102 (SVE_PT_FPSIMD_SIZE): Likewise.
3103 (SVE_PT_SVE_ZREG_SIZE): Likewise.
3104 (SVE_PT_SVE_PREG_SIZE): Likewise.
3105 (SVE_PT_SVE_FFR_SIZE): Likewise.
3106 (SVE_PT_SVE_FPSR_SIZE): Likewise.
3107 (SVE_PT_SVE_FPCR_SIZE): Likewise.
3108 (__SVE_SIG_TO_PT): Likewise.
3109 (SVE_PT_SVE_OFFSET): Likewise.
3110 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3111 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3112 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3113 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3114 (SVE_PT_SVE_PREG_OFFSET): Likewise.
3115 (SVE_PT_SVE_PREGS_SIZE): Likewise.
3116 (SVE_PT_SVE_FFR_OFFSET): Likewise.
3117 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3118 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3119 (SVE_PT_SVE_SIZE): Likewise.
3120 (SVE_PT_SIZE): Likewise.
3121 (HAS_SVE_STATE): New define.
3123 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3125 * nat/aarch64-sve-linux-sigcontext.h: New file.
3126 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3128 (SVE_VQ_MIN): Likewise.
3129 (SVE_VQ_MAX): Likewise.
3130 (SVE_VL_MIN): Likewise.
3131 (SVE_VL_MAX): Likewise.
3132 (SVE_NUM_ZREGS): Likewise.
3133 (SVE_NUM_PREGS): Likewise.
3134 (sve_vl_valid): Likewise.
3135 (struct user_sve_header): Likewise.
3137 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
3138 Richard Bunt <Richard.Bunt@arm.com>
3140 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3141 was requested by GDB.
3143 2018-06-15 Tom de Vries <tdevries@suse.de>
3145 * MAINTAINERS (Write After Approval): Add Tom de Vries.
3147 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
3149 * gnulib/update-gnulib.sh: Print expected versions of
3152 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
3154 * arch-utils.c (default_type_align): Use type_length_units.
3155 * gdbtypes.c (type_align): Use type_length_units.
3157 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3159 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3160 of 'define' command.
3162 2018-06-14 Tom de Vries <tdevries@suse.de>
3165 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3166 get_no_prettyformat_print_options.
3168 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
3170 * sparc-nat.h: Include target.h.
3171 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3172 <fetch_registers>: Remove this argument in function call.
3173 <store_registers>: Remove this argument in function call, remove
3175 <low_forget_process>: Call sparc64_forget_process instead of
3176 sparc_forget_process.
3178 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3180 * procfs.c (_initialize_procfs): Use add_inf_child_target.
3181 (procfs_target::make_corefile_notes): Adjust to new
3182 target_read_alloc return type.
3184 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3185 Stephen Roberts <stephen.roberts@arm.com>
3188 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3189 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3190 Move should_notify_stop local into more inner scope.
3192 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3193 Stephen Roberts <stephen.roberts@arm.com>
3196 * infrun.c (resume_1): Add call to mark_async_event_handler.
3198 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3200 * infrun.c (do_target_wait): Change old version of $pc printed.
3202 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
3204 * dwarf2read.c (read_index_from_section): Rename to...
3205 (read_gdb_index_from_section): ... this, update all callers.
3206 (dwarf2_read_index): Rename to...
3207 (dwarf2_read_gdb_index): ... this, update all callers.
3209 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
3211 * gdb/hppa-linux-nat.c
3212 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3213 hppa_linux_nat_target::fetch_registers.
3215 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3217 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3218 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3219 (AARCH64_DWARF_SVE_FFR): Likewise.
3220 (AARCH64_DWARF_SVE_P0): Likewise.
3221 (AARCH64_DWARF_SVE_Z0): Likewise.
3223 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3225 * common/common-regcache.h (raw_compare): New function.
3226 * regcache.c (regcache::raw_compare): Likewise.
3227 * regcache.h (regcache::raw_compare): New declaration.
3229 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3231 * common/common-regcache.h (reg_buffer_common): New structure.
3232 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3233 (reg_buffer::raw_supply): Likewise.
3234 (reg_buffer::raw_supply_integer): Likewise.
3235 (reg_buffer::raw_supply_zeroed): Likewise.
3236 (reg_buffer::raw_collect): Likewise.
3237 (reg_buffer::raw_collect_integer): Likewise.
3238 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
3239 (reg_buffer::raw_supply): Likewise.
3240 (reg_buffer::raw_supply_integer): Likewise.
3241 (reg_buffer::raw_supply_zeroed): Likewise.
3242 (reg_buffer::raw_collect): Likewise.
3243 (reg_buffer::raw_collect_integer): Likewise.
3245 2018-06-10 Tom Tromey <tom@tromey.com>
3247 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
3248 (class remote_state) <stop_reply_queue>: Now std::vector.
3249 (remote_state::~remote_state)
3250 (remote_target::stop_reply_queue_length): Update.
3251 (struct queue_iter_param, remove_child_of_pending_fork)
3252 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3253 (check_pending_event_prevents_wildcard_vcont_callback)
3254 (remove_stop_reply_for_inferior)
3255 (remove_stop_reply_of_remote_state)
3256 (remote_notif_remove_once_on_match)
3257 (stop_reply_match_ptid_and_ws)
3258 (remote_kill_child_of_pending_fork): Remove.
3259 (remote_target::remove_new_fork_children)
3260 (remote_target::check_pending_events_prevent_wildcard_vcont)
3261 (remote_target::discard_pending_stop_replies)
3262 (remote_target::discard_pending_stop_replies_in_queue)
3263 (remote_target::remote_notif_remove_queued_reply)
3264 (remote_target::queued_stop_reply)
3265 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
3266 (remote_target::wait, remote_target::kill_new_fork_children)
3267 (remote_target::async): Update.
3269 2018-06-10 Tom Tromey <tom@tromey.com>
3271 * record-full.c (record_full_arch_list_cleanups): Remove.
3272 (record_full_message): Use try/catch.
3273 (record_full_wait_cleanups): Remove.
3274 (record_full_wait_1): Use try/catch.
3275 (record_full_restore): Likewise.
3277 2018-06-10 Tom Tromey <tom@tromey.com>
3279 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
3280 declare VEC. Add constructor.
3281 <in_target_beneath>: Now bool.
3282 (record_full_breakpoints): Now a std::vector, static.
3283 (record_full_sync_record_breakpoints)
3284 (record_full_init_record_breakpoints)
3285 (record_full_target::insert_breakpoint)
3286 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
3288 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
3290 * dwarf2read.c (process_cu_includes): Remove struct keyword.
3291 * serial.c (serial_interface_lookup): Remove struct keyword.
3293 2018-06-10 Tom Tromey <tom@tromey.com>
3295 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3297 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3299 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3301 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3302 "beneath" as a method.
3303 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3304 Use "beneath" as a method.
3306 2018-06-10 Tom Tromey <tom@tromey.com>
3308 * tracefile.c (struct trace_file_writer_deleter): New.
3309 <operator()>: Rename from trace_file_writer_xfree.
3310 (trace_file_writer_up): New typedef.
3311 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3313 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3315 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3316 <m_registers, m_register_status>: Change type to
3318 * regcache.c (reg_buffer::reg_buffer): Use new instead of
3321 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3323 * common/common-regcache.h (enum register_status): Add
3324 underlying type "signed char".
3325 * regcache.h (reg_buffer) <m_register_status>: Change type to
3327 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3328 register_status instead of signed char.
3329 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3330 (reg_buffer::get_register_status): Remove cast.
3331 (readable_regcache::raw_read): Remove cast.
3332 (readable_regcache::cooked_read): Remove cast.
3334 2018-06-09 Tom Tromey <tom@tromey.com>
3336 * source.c (reverse_search_command, forward_search_command): Use
3339 2018-06-09 Tom Tromey <tom@tromey.com>
3341 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
3342 (serial_ops_list): Now static, std::vector.
3343 (serial_interface_lookup, serial_add_interface): Update.
3345 2018-06-09 Tom Tromey <tom@tromey.com>
3347 * dwarf2read.c (process_cu_includes): Update.
3348 (process_full_comp_unit): Update.
3349 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3352 2018-06-08 Paul Koning <paul_koning@dell.com>
3356 * python/python.c (do_start_initialization):
3357 Avoid call to internal Python API.
3358 (init__gdb_module): New function.
3360 2018-06-08 Gary Benson <gbenson@redhat.com>
3362 * linux-thread-db.c (valprint.h): New include.
3363 (struct check_thread_db_info): New structure.
3364 (check_thread_db_on_load, tdb_testinfo): New static globals.
3365 (check_thread_db, check_thread_db_callback): New functions.
3366 (try_thread_db_load_1): Run integrity checks if requested.
3367 (maintenance_check_libthread_db): New function.
3368 (_initialize_thread_db): Register "maint check libthread-db"
3369 and "maint set/show check-libthread-db".
3370 * NEWS: Mention the above new commands.
3372 2018-06-08 Tom Tromey <tom@tromey.com>
3374 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3377 2018-06-08 Tom Tromey <tom@tromey.com>
3379 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3381 2018-06-08 Tom Tromey <tom@tromey.com>
3383 * common/btrace-common.h (struct btrace_data): Add constructor,
3384 destructor, move assignment operator.
3385 <empty, clear, fini>: New methods.
3386 <format>: Initialize.
3387 (btrace_data_init, btrace_data_fini, btrace_data_clear)
3388 (btrace_data_empty): Don't declare.
3389 * common/btrace-common.c (btrace_data_init): Remove.
3390 (btrace_data::fini): Rename from btrace_data_fini.
3391 (btrace_data::empty): Rename from btrace_data_empty.
3392 (btrace_data::clear): Rename from btrace_data_clear. Return
3394 * btrace.h (make_cleanup_btrace_data): Don't declare.
3395 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3396 (parse_xml_btrace): Update.
3397 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3398 (maint_btrace_clear_packet_history_cmd): Update.
3400 2018-06-07 Pedro Alves <palves@redhat.com>
3402 * target.h (target_ops) <beneath>: Now a method. All references
3404 (class target_stack): New.
3405 * target.c (g_target_stack): New.
3406 (g_current_top_target): Delete.
3407 (current_top_target): Get the top target out of g_target_stack.
3408 (target_stack::push, target_stack::unpush): New.
3409 (push_target, unpush_target): Reimplement.
3410 (target_is_pushed): Reimplement in terms of g_target_stack.
3411 (target_ops::beneath, target_stack::find_beneath): New.
3413 2018-06-07 Pedro Alves <palves@redhat.com>
3415 * target.h (find_target_beneath): Delete declaration.
3416 * target.c (find_target_beneath): Delete definition.
3417 * aix-thread.c: All callers of find_target_beneath adjusted to
3418 call target_ops::beneath instead.
3419 * bsd-uthread.c: Likewise.
3420 * linux-thread-db.c: Likewise.
3421 * ravenscar-thread.c: Likewise.
3422 * sol-thread.c: Likewise.
3423 * spu-multiarch.c: Likewise.
3425 2018-06-07 Pedro Alves <palves@redhat.com>
3427 * target.h (target_ops) <beneath>: Now a method. All references
3429 (target_ops) <m_beneath>: New.
3430 * target.c (target_ops::beneath): New.
3431 * corelow.c: Adjust all references to target_ops::beneath.
3432 * linux-thread-db.c: Likewise.
3433 * make-target-delegates: Likewise.
3434 * record-btrace.c: Likewise.
3435 * record-full.c: Likewise.
3436 * remote.c: Likewise.
3437 * target.c: Likewise.
3438 * target-delegates.c: Regenerate.
3440 2018-06-07 Pedro Alves <palves@redhat.com>
3442 * target.h (target_stack): Delete.
3443 (current_top_target): Declare function.
3444 * target.c (target_stack): Delete.
3445 (g_current_top_target): New.
3446 (current_top_target): New function.
3447 * auxv.c: Use current_top_target instead of target_stack
3449 * avr-tdep.c: Likewise.
3450 * breakpoint.c: Likewise.
3451 * corefile.c: Likewise.
3452 * elfread.c: Likewise.
3454 * exceptions.c: Likewise.
3455 * frame.c: Likewise.
3456 * gdbarch-selftests.c: Likewise.
3457 * gnu-v3-abi.c: Likewise.
3458 * ia64-tdep.c: Likewise.
3459 * ia64-vms-tdep.c: Likewise.
3460 * infcall.c: Likewise.
3461 * infcmd.c: Likewise.
3462 * infrun.c: Likewise.
3463 * linespec.c: Likewise.
3464 * linux-tdep.c: Likewise.
3465 * minsyms.c: Likewise.
3466 * ppc-linux-nat.c: Likewise.
3467 * ppc-linux-tdep.c: Likewise.
3468 * procfs.c: Likewise.
3469 * regcache.c: Likewise.
3470 * remote.c: Likewise.
3471 * rs6000-tdep.c: Likewise.
3472 * s390-linux-nat.c: Likewise.
3473 * s390-tdep.c: Likewise.
3474 * solib-aix.c: Likewise.
3475 * solib-darwin.c: Likewise.
3476 * solib-dsbt.c: Likewise.
3477 * solib-spu.c: Likewise.
3478 * solib-svr4.c: Likewise.
3479 * solib-target.c: Likewise.
3480 * sparc-tdep.c: Likewise.
3481 * sparc64-tdep.c: Likewise.
3482 * spu-tdep.c: Likewise.
3483 * symfile.c: Likewise.
3484 * symtab.c: Likewise.
3485 * target-descriptions.c: Likewise.
3486 * target-memory.c: Likewise.
3487 * target.c: Likewise.
3488 * target.h: Likewise.
3489 * tracefile-tfile.c: Likewise.
3490 * tracepoint.c: Likewise.
3491 * valops.c: Likewise.
3492 * valprint.c: Likewise.
3493 * value.c: Likewise.
3494 * windows-tdep.c: Likewise.
3495 * mi/mi-main.c: Likewise.
3497 2018-06-07 Tom Tromey <tom@tromey.com>
3499 * valprint.h (build_address_symbolic): Declare.
3500 * printcmd.c (print_address_symbolic): Update.
3501 (build_address_symbolic): Change "name" and "filename" to
3503 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3505 * defs.h (build_address_symbolic): Remove declaration.
3507 2018-06-07 Alan Hayward <alan.hayward@arm.com>
3509 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3510 (aarch64_vnv_type): Add function.
3511 (aarch64_pseudo_register_name): Add V regs for SVE.
3512 (aarch64_pseudo_register_type): Likewise.
3513 (aarch64_pseudo_register_reggroup_p): Likewise.
3514 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3515 (aarch64_pseudo_read_value): Add V regs for SVE.
3516 (aarch64_pseudo_write_2): Use V0 offset for SVE
3517 (aarch64_pseudo_write): Add V regs for SVE.
3518 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3520 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3522 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3523 (sve_vl_from_vq): Likewise.
3525 2018-06-05 Tom Tromey <tom@tromey.com>
3527 * cli/cli-cmds.c (show_version): Update.
3528 * top.c (print_gdb_version): Add "interactive" parameter.
3530 * main.c (captured_main_1): Update.
3531 * top.h (print_gdb_version): Add "interactive" parameter and a
3534 2018-06-05 David Malcolm <dmalcolm@redhat.com>
3536 * common/enum-flags.h: Add trailing semicolon to example in
3539 2018-06-05 Tom Tromey <tom@tromey.com>
3542 * NEWS: Add entry about pager.
3543 * utils.c (pagination_disabled_for_command): New global.
3544 (prompt_for_continue): Allow "c" response to prompt.
3545 (reinitialize_more_filter): Clear
3546 pagination_disabled_for_command.
3547 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3549 2018-06-04 Tom Tromey <tom@tromey.com>
3551 * ada-lang.h (ada_lookup_symbol_list): Update.
3552 * ada-lang.c (resolve_subexp): Update.
3553 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3555 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3556 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3557 results parameter to std::vector.
3558 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3560 * ada-exp.y (block_lookup): Update.
3561 (select_possible_type_sym): Change type of syms. Remove nsyms
3563 (write_var_or_type, write_name_assoc): Update.
3565 2018-06-04 Joel Brobecker <brobecker@adacore.com>
3567 * windows-nat.c (windows_nat_target::xfer_partial): Return
3568 TARGET_XFER_E_IO if we need to delegate to the target beneath
3569 but BENEATH is NULL.
3571 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3573 * Makefile.in (config.status): Add configure.nat as a
3576 2018-06-04 Tom Tromey <tom@tromey.com>
3578 * cp-name-parser.y (cpname_state): Add method declarations.
3579 (HANDLE_QUAL): Update.
3580 (cpname_state::d_grab, cpname_state::fill_comp)
3581 (cpname_state::make_operator, cpname_state::make_dtor)
3582 (cpname_state::make_builtin_type, cpname_state::make_name)
3583 (cpname_state::d_qualify, cpname_state::d_int_type)
3584 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3585 (%union): Move earlier.
3587 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3589 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3591 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3593 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3594 (aarch64_pseudo_write_1): Likewise.
3595 (aarch64_pseudo_read_value): Use helper.
3596 (aarch64_pseudo_write): Likewise.
3598 2018-06-04 Pedro Alves <palves@redhat.com>
3600 * darwin-nat.c (darwin_ops): Delete.
3601 (darwin_attach_pid): Use get_native_target.
3603 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3605 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3606 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3608 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3610 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3611 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3612 (aarch64_gdbarch_init): Check for SVE.
3613 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3615 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3617 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3618 * aarch64-tdep.h (aarch64_read_description): Likewise.
3619 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3620 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3621 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3622 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3623 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3625 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3627 * value.c (value_fetch_lazy_bitfield): New.
3628 (value_fetch_lazy_memory): New.
3629 (value_fetch_lazy_register): New.
3630 (value_fetch_lazy): Factor out to smaller functions.
3632 2018-06-01 Tom Tromey <tom@tromey.com>
3634 * cp-name-parser.y (backslashable, represented): Now const.
3636 2018-06-01 Tom Tromey <tom@tromey.com>
3638 * cp-name-parser.y: Include parser-defs.h.
3639 (parser_fprintf): Remove declaration.
3641 2018-06-01 Tom Tromey <tom@tromey.com>
3643 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3645 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3646 (global_result): Remove globals.
3647 (struct cpname_state): New.
3648 (yyparse): Don't declare.
3649 (yylex, yyerror): Move declarations after %union.
3650 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3651 (make_name): Add state parameter.
3653 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3655 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3657 (yylex): Add lvalp, state parameters.
3658 (yyerror): Add state parameter.
3659 (cp_demangled_name_to_comp): Update.
3661 2018-06-01 Tom Tromey <tom@tromey.com>
3663 * cp-name-parser.y (parser_fprintf): Declare.
3664 (GDB_YY_REMAP_PREFIX): Define.
3665 Include yy-remap.h. Don't redefine yy* identifiers.
3667 2018-06-01 Tom Tromey <tom@tromey.com>
3669 * python/py-type.c (typy_legacy_template_argument): Update.
3670 * cp-support.h (cp_demangled_name_to_comp): Update.
3671 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3672 parameter to be a "std::string *".
3675 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3677 * ada-lex.l: Include "diagnostics.h" instead of
3678 "common/diagnostics.h".
3679 * unittests/environ-selftests.c: Likewise.
3680 * common/diagnostics.h: Moved to ../include.
3682 2018-06-01 Joel Brobecker <brobecker@adacore.com>
3684 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3685 to language_mode_manual while calling breakpoint_re_set_one.
3687 2018-06-01 Tom Tromey <tom@tromey.com>
3689 * valops.c (value_cast_structs, destructor_name_p): Update.
3690 * symtab.c (gdb_mangle_name): Update.
3691 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3693 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3694 (pascal_object_print_value_fields, pascal_object_print_value):
3696 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3697 * linespec.c (find_methods): Update.
3698 * gdbtypes.h (type_name_no_tag): Remove.
3699 (type_name_or_error): Rename from type_name_no_tag_or_error.
3700 * gdbtypes.c (type_name_no_tag): Remove.
3701 (type_name_or_error): Rename from type_name_no_tag_or_error.
3702 (lookup_struct_elt_type, check_typedef): Update.
3703 * expprint.c (print_subexp_standard): Update.
3704 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3705 * d-namespace.c (d_lookup_nested_symbol): Update.
3706 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3707 (cp_print_class_member): Update.
3708 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3709 * completer.c (add_struct_fields): Update.
3710 * c-typeprint.c (cp_type_print_derivation_info)
3711 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3713 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3714 (ada_prefer_type, ada_is_exception_sym): Update.
3716 2018-06-01 Tom Tromey <tom@tromey.com>
3718 * valops.c (enum_constant_from_type, value_namespace_elt)
3719 (value_maybe_namespace_elt): Update.
3720 * valarith.c (find_size_for_pointer_math): Update.
3721 * target-descriptions.c (make_gdb_type): Update.
3722 * symmisc.c (print_symbol): Update.
3723 * stabsread.c (define_symbol, read_type)
3724 (complain_about_struct_wipeout, add_undefined_type)
3725 (cleanup_undefined_types_1): Update.
3726 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3727 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3728 (rust_internal_print_type, rust_composite_type)
3729 (rust_evaluate_funcall, rust_evaluate_subexp)
3730 (rust_inclusive_range_type_p): Update.
3731 * python/py-type.c (typy_get_tag): Update.
3732 * p-typeprint.c (pascal_type_print_base): Update.
3733 * mdebugread.c (parse_symbol, parse_type): Update.
3734 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3736 * guile/scm-type.c (gdbscm_type_tag): Update.
3737 * go-lang.c (sixg_string_p): Update.
3738 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3740 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3741 (TYPE_TAG_NAME): Remove.
3742 * gdbtypes.c (type_name_no_tag): Simplify.
3743 (check_typedef, check_types_equal, recursive_dump_type)
3744 (copy_type_recursive, arch_composite_type): Update.
3745 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3746 in summary mode when needed.
3747 * eval.c (evaluate_funcall): Update.
3748 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3749 (process_structure_scope, read_enumeration_type)
3750 (read_namespace_type, read_module_type, determine_prefix): Update.
3751 * cp-support.c (inspect_type): Update.
3752 * coffread.c (process_coff_symbol, decode_base_type): Update.
3753 * c-varobj.c (c_is_path_expr_parent): Update.
3754 * c-typeprint.c (c_type_print_base_struct_union): Update.
3755 (c_type_print_base_1): Update. Print struct/class/union/enum in
3756 summary when using C language.
3757 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3758 (gen_maybe_namespace_elt): Update.
3759 * ada-lang.c (ada_type_name): Simplify.
3760 (empty_record, ada_template_to_fixed_record_type_1)
3761 (template_to_static_fixed_type)
3762 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3764 2018-06-01 Tom Tromey <tom@tromey.com>
3766 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3768 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3769 (c_print_type): Update.
3770 (c_print_type): New overload.
3771 (c_type_print_varspec_prefix, c_type_print_args)
3772 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3773 (c_type_print_base_struct_union, c_type_print_base_1)
3774 (cp_type_print_method_args): Add "language" parameter.
3775 (c_type_print_base): Update.
3776 * c-lang.h (c_print_type): Add new overload.
3778 2018-06-01 Tom Tromey <tom@tromey.com>
3780 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3781 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3783 2018-06-01 Alan Hayward <alan.hayward@arm.com>
3785 * aarch64-tdep.c (aarch64_sve_register_names): New const
3787 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3788 (AARCH64_SVE_Z_REGS_NUM): New define.
3789 (AARCH64_SVE_P_REGS_NUM): Likewise.
3790 (AARCH64_SVE_NUM_REGS): Likewise.
3792 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
3794 * nat/linux-ptrace.h [__alpha__]
3795 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3798 2018-05-31 Maciej W. Rozycki <macro@mips.com>
3800 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3801 the endianness selected.
3802 * NEWS: Document `set endian auto' mode operation update.
3804 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3806 * Makefile.in: Add new header.
3807 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3808 (sve_vl_from_vg): Likewise.
3809 (sve_vq_from_vl): Likewise.
3810 (sve_vl_from_vq): Likewise.
3811 (sve_vq_from_vg): Likewise.
3812 (sve_vg_from_vq): Likewise.
3813 * configure.nat: Add new c file.
3814 * nat/aarch64-sve-linux-ptrace.c: New file.
3815 * nat/aarch64-sve-linux-ptrace.h: New file.
3817 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3819 * aarch64-linux-nat.c (aarch64_linux_read_description):
3821 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3823 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3824 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3825 (aarch64_gdbarch_init): Add parmeter zero.
3826 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3827 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3828 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3830 * doc/gdb.texinfo: Describe SVE feature
3831 * features/aarch64-sve.c: New file.
3833 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
3836 * gdbarch.sh (significant_addr_bit): Default to zero when
3837 not set by target architecture.
3838 * gdbarch.c: Re-generated.
3839 * utils.c (address_significant): Update.
3841 2018-05-30 Joel Brobecker <brobecker@adacore.com>
3843 * stack.c (func_command): Remove trailing newline in call to error.
3845 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3847 * regcache.h (regcache_raw_collect): Remove, update callers to
3848 use regcache::raw_collect.
3849 * regcache.c (regcache_raw_collect): Remove.
3851 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3853 * regcache.h (regcache_raw_supply): Remove, update callers to
3854 use detached_regcache::raw_supply.
3855 * regcache.c (regcache_raw_supply): Remove.
3857 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3859 * regcache.h (regcache_cooked_write_part): Remove, update
3860 callers to use regcache::cooked_write_part.
3861 * regcache.c (regcache_cooked_write_part): Remove.
3863 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3865 * regcache.h (regcache_cooked_read_part): Remove, update callers
3866 to use readable_regcache::cooked_read_part.
3867 * regcache.c (regcache_cooked_read_part): Remove.
3869 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3871 * regcache.h (regcache_cooked_read_value): Remove, update
3872 callers to use readable_regcache::cooked_read_value.
3873 * regcache.c (regcache_cooked_read_value): Remove.
3875 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3877 * regcache.h (regcache_cooked_write): Remove, update callers to
3878 use regcache::cooked_write.
3879 * regcache.c (regcache_cooked_write): Remove.
3881 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3883 * regcache.h (regcache_invalidate): Remove, update callers to
3884 use detached_regcache::invalidate instead.
3885 * regcache.c (regcache_invalidate): Remove.
3887 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3889 * regcache.h (regcache_raw_write_part): Remove, update callers
3890 to use regcache::raw_write_part instead.
3891 * regcache.c (regcache_raw_write_part): Remove.
3893 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3895 * regcache.h (regcache_raw_read_part): Remove, update callers to
3896 use readable_regcache::raw_read_part instead.
3897 * regcache.c (regcache_raw_read_part): Remove.
3899 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3901 * regcache.h (regcache_cooked_read): Remove, update callers to
3902 use readable_regcache::cooked_read instead.
3903 * regcache.c (regcache_cooked_read): Remove.
3905 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3907 * regcache.h (regcache_raw_write): Remove, update callers to use
3908 regcache::raw_write instead.
3909 * regcache.c (regcache_raw_write): Remove.
3911 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3913 * regcache.h (regcache_raw_read): Remove, update callers to use
3914 readable_regcache::raw_read instead.
3915 * regcache.c (regcache_raw_read): Remove.
3917 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3919 * regcache.h (regcache_raw_update): Remove, update callers to
3920 use readable_regcache::raw_update instead.
3921 * regcache.c (regcache_raw_update): Remove.
3923 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3925 * regcache.h (regcache_register_status): Remove, update callers
3926 to use reg_buffer::get_register_status directly instead.
3927 * regcache.c (regcache_register_status): Remove.
3929 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3931 * regcache.h (regcache_get_ptid): Remove, update all callers to
3932 call regcache::ptid instead.
3933 * regcache.c (regcache_get_ptid): Remove.
3935 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3937 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3939 2018-05-30 Pedro Alves <palves@redhat.com>
3941 * common/common-exceptions.h (exception_rethrow): Use
3944 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
3946 * breakpoint.c (print_solib_event, check_status_catch_solib):
3947 Remove struct keyword in range-based for loops.
3948 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3949 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3951 * linespec.c (find_superclass_methods, search_minsyms_for_name):
3953 * symfile.c (addr_info_make_relative): Likewise.
3954 * thread.c (value_in_thread_stack_temporaries): Likewise.
3956 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
3959 * valops.c (value_struct_elt_for_reference): Call check_typedef on
3960 aggregate type to get its real type before accessing it.
3962 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
3964 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3965 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3966 * coff-pe-read.c (add_pe_forwarded_sym): Replace
3967 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3968 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3969 * jit.c (jit_breakpoint_re_set_internal): Likewise.
3970 * printcmd.c (info_address_command): Likewise.
3972 2018-05-29 Tom Tromey <tom@tromey.com>
3974 * windows-nat.c (handle_exception): Update fall-through comment.
3976 2018-05-29 Tom Tromey <tom@tromey.com>
3978 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
3979 (struct program_space) <added_solibs>: Now a std::vector.
3980 * breakpoint.c (print_solib_event): Update.
3981 (check_status_catch_solib): Update.
3982 * progspace.c (clear_program_space_solib_cache): Update.
3983 * solib.c (update_solib_list): Update.
3985 2018-05-29 Tom Tromey <tom@tromey.com>
3987 * python/py-type.c (typy_richcompare): Update.
3988 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3989 * gdbtypes.h (types_deeply_equal): Return bool.
3990 (types_equal): Likewise.
3991 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
3993 (check_types_equal): Change worklist to std::vector. Return
3995 (struct type_equality_entry): Add constructor.
3996 (compare_maybe_null_strings): Return bool.
3997 (check_types_worklist): Return bool. Change worklist to
3999 (types_deeply_equal): Use std::vector.
4000 (types_equal): Return bool.
4001 (compare_maybe_null_strings): Simplify.
4003 2018-05-29 Tom Tromey <tom@tromey.com>
4005 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
4007 2018-05-29 Tom Tromey <tom@tromey.com>
4009 * objc-lang.h: Don't include cp-support.h.
4010 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
4013 2018-05-27 Tom Tromey <tom@tromey.com>
4015 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4017 2018-05-25 Tom Tromey <tom@tromey.com>
4019 * value.c (value::location): Initialize.
4021 2018-05-25 Tom Tromey <tom@tromey.com>
4023 * dbxread.c (init_bincl_list): Remove.
4024 (bincl_list): Now a std::vector.
4025 (bincls_allocated, next_bincl): Remove.
4026 (free_bincl_list, do_free_bincl_list_cleanup)
4027 (make_cleanup_free_bincl_list): Remove.
4028 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4030 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4031 (struct header_file_location): Add constructor.
4032 (add_bincl_to_list): Remove.
4034 2018-05-25 Tom Tromey <tom@tromey.com>
4036 * tui/tui.c (tui_enable): Update.
4037 * mi/mi-interp.c (mi_interp::init): Update.
4038 * interps.h (class interp) <name>: New method.
4039 <m_name>: Rename from name.
4040 (~scoped_restore_interp): Update.
4041 * interps.c (interp::interp): Update.
4042 (interp_add, interp_set, interp_lookup_existing)
4043 (current_interp_named_p): Update.
4045 2018-05-25 Tom Tromey <tom@tromey.com>
4047 * interps.c (interp_name): Remove.
4048 * mi/mi-interp.c (mi_interp::init): Update.
4049 * interps.h (interp_name): Remove.
4050 (~scoped_restore_interp): Update.
4051 * tui/tui.c (tui_enable): Update.
4053 2018-05-25 Tom Tromey <tom@tromey.com>
4055 * utils.c (fputs_maybe_filtered): Update.
4056 * linespec.c (decode_line_full): Update.
4057 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4058 (mi_print_breakpoint_for_event, mi_solib_loaded)
4059 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4060 (mi_user_selected_context_changed): Update.
4061 * mi/mi-main.c (mi_execute_command): Update.
4062 * cli/cli-script.c (execute_control_command): Update.
4063 * python/python.c (execute_gdb_command): Update.
4064 * solib.c (info_sharedlibrary_command): Update.
4065 * interps.c (interp_ui_out): Remove.
4066 * interps.h (interp_ui_out): Remove.
4068 2018-05-25 Tom Tromey <tom@tromey.com>
4070 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4071 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4072 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4074 2018-05-25 Tom Tromey <tom@tromey.com>
4076 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4077 * interps.c (interp_exec): Use scoped_restore.
4079 2018-05-25 Tom Tromey <tom@tromey.com>
4081 * remote.c (remote_target::remote_file_get): Use
4083 (remote_target::remote_file_put): Likewise.
4085 2018-05-25 Tom Tromey <tom@tromey.com>
4087 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4089 (get_pe_section_index, add_pe_exported_sym): Update.
4090 (read_pe_exported_syms): Use gdb::def_vector.
4092 2018-05-25 Tom Tromey <tom@tromey.com>
4094 * frame.c (remove_prev_frame): Remove.
4095 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4097 2018-05-25 Maciej W. Rozycki <macro@mips.com>
4099 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4101 * mips-linux-nat.c (supply_fpregset): Always call
4102 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4103 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4104 `mips_fill_fpregset'.
4105 * mips-linux-tdep.c (mips_supply_fpregset)
4106 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4107 (mips_fill_fpregset_wrapper): Remove functions.
4108 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4109 (mips_linux_fpregset): Remove variable.
4110 (mips_linux_iterate_over_regset_sections): Use
4111 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4112 (mips_linux_o32_sigframe_init): Remove comment.
4114 2018-05-25 Pedro Alves <palves@redhat.com>
4116 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4117 (struct readahead_cache, struct packet_reg, struct
4118 remote_arch_state, class remote_state): Move higher up in the
4120 (remote_target::m_remote_state): Now an object instead of a pointer.
4121 (remote_target::get_remote_state): Adjust.
4123 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4125 * stack.c (select_and_print_frame): Delete.
4126 (struct function_bounds): Move struct within function.
4127 (func_command): Most content moved into new function
4128 find_frame_for_function, use new function, print result, add
4130 (find_frame_for_function): New function, now returns a result.
4132 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4134 * stack.c (iterate_over_block_arg_vars): Fix comment.
4135 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4137 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4141 (scoped_restore_selected_frame::scoped_restore_selected_frame):
4143 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4145 * frame.h (class scoped_restore_selected_frame): New class.
4146 * stack.c (print_frame_local_vars): Remove catching and rethrowing
4147 of any exception, use scoped_restore_selected_frame to restore the
4150 2018-05-24 Pedro Alves <palves@redhat.com>
4152 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4155 2018-05-23 Tom Tromey <tom@tromey.com>
4157 * complaints.c (struct complaints): Remove.
4158 (symfile_complaint_book): Remove.
4159 (series): New global.
4160 (complaint_internal): Update.
4161 (clear_complaints): Update.
4163 2018-05-23 Tom Tromey <tom@tromey.com>
4165 * complaints.c (counters): New global.
4166 (struct complain): Remove.
4167 (struct complaints) <root>: Remove.
4168 (complaint_sentinel): Remove.
4169 (symfile_complaint_book): Update.
4170 (find_complaint) Remove.
4171 (complaint_internal, clear_complaints): Update.
4173 2018-05-23 Tom Tromey <tom@tromey.com>
4175 * complaints.c (struct complain) <file, line>: Remove.
4176 (find_complaint): Remove file, line parameters.
4177 (complaint_internal): Update.
4179 2018-05-23 Tom Tromey <tom@tromey.com>
4181 * complaints.c (vcomplaint): Remove.
4182 (complaint_internal) Merge in contents of vcomplaint.
4184 2018-05-23 Tom Tromey <tom@tromey.com>
4186 * complaints.c (struct complaints) <explanation>: Remove.
4187 (symfile_explanations): Remove.
4188 (symfile_complaint_book): Update.
4189 (vcomplaint): Update.
4190 (struct explanation): Remove.
4192 2018-05-23 Tom Tromey <tom@tromey.com>
4194 * complaints.c (symfile_complaints): Remove.
4195 (complaint_internal): Remove "complaints" parameter.
4196 (clear_complaints, vcomplaint): Remove "c" parameter.
4197 (get_complaints): Remove.
4198 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4199 (dwarf2_debug_line_missing_file_complaint)
4200 (dwarf2_debug_line_missing_end_sequence_complaint)
4201 (dwarf2_complex_location_expr_complaint)
4202 (dwarf2_const_value_length_mismatch_complaint)
4203 (dwarf2_section_buffer_overflow_complaint)
4204 (dwarf2_macro_malformed_definition_complaint)
4205 (dwarf2_invalid_attrib_class_complaint)
4206 (create_addrmap_from_index, dw2_symtab_iter_next)
4207 (dw2_expand_marked_cus)
4208 (dw2_debug_names_iterator::find_vec_in_debug_names)
4209 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4210 (create_debug_type_hash_table, init_cutu_and_read_dies)
4211 (partial_die_parent_scope, add_partial_enumeration)
4212 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4213 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4214 (read_import_statement, read_file_scope, create_dwo_cu_reader)
4215 (create_cus_hash_table, create_dwp_hash_table)
4216 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4217 (dwarf2_rnglists_process, dwarf2_ranges_process)
4218 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4219 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4220 (handle_struct_member_die, process_structure_scope)
4221 (read_array_type, read_common_block, read_module_type)
4222 (read_tag_pointer_type, read_typedef, read_base_type)
4223 (read_subrange_type, load_partial_dies, partial_die_info::read)
4224 (partial_die_info::read, partial_die_info::read)
4225 (partial_die_info::read, read_checked_initial_length_and_offset)
4226 (dwarf2_string_attr, read_formatted_entries)
4227 (dwarf_decode_line_header)
4228 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4229 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
4230 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4231 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4232 (get_signatured_type, get_DW_AT_signature_type)
4233 (decode_locdesc, file_file_name, consume_improper_spaces)
4234 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4235 (dwarf_decode_macro_bytes, dwarf_decode_macros)
4236 (dwarf2_symbol_mark_computed, set_die_type)
4237 (read_attribute_value): Update.
4238 * stap-probe.c (handle_stap_probe, get_stap_base_address):
4240 * dbxread.c (unknown_symtype_complaint)
4241 (lbrac_mismatch_complaint, repeated_header_complaint)
4242 (set_namestring, function_outside_compilation_unit_complaint)
4243 (read_dbx_symtab, process_one_symbol): Update.
4244 * gdbtypes.c (stub_noname_complaint): Update.
4245 * windows-nat.c (handle_unload_dll): Update.
4246 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
4247 (decode_base_type): Update.
4248 * xcoffread.c (bf_notfound_complaint, ef_complaint)
4249 (eb_complaint, record_include_begin, record_include_end)
4250 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4251 (process_xcoff_symbol, read_symbol)
4252 (function_outside_compilation_unit_complaint)
4253 (scan_xcoff_symtab): Update.
4254 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4255 * buildsym.c (finish_block_internal, make_blockvector)
4256 (end_symtab_get_static_block, augment_type_symtab): Update.
4257 * dtrace-probe.c (dtrace_process_dof)
4258 (dtrace_static_probe_ops::get_probes): Update.
4259 * complaints.h (struct complaint): Don't declare.
4260 (symfile_complaints): Remove.
4261 (complaint_internal): Remove "complaints" parameter.
4262 (complaint): Likewise.
4263 (clear_complaints): Likewise.
4264 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4265 (reread_symbols): Update.
4266 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
4267 (dwarf2_frame_cache, decode_frame_entry): Update.
4268 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
4269 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4270 (info_selectors_command): Update.
4271 * macrotab.c (macro_include, check_for_redefinition)
4272 (macro_undef): Update.
4273 * objfiles.c (filter_overlapping_sections): Update.
4274 * stabsread.c (invalid_cpp_abbrev_complaint)
4275 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4276 (define_symbol, error_type, read_type, rs6000_builtin_type)
4277 (stabs_method_name_from_physname, read_member_functions)
4278 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4279 (attach_fields_to_type, complain_about_struct_wipeout)
4280 (read_range_type, read_args, common_block_start)
4281 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4283 * mdebugread.c (index_complaint, unknown_ext_complaint)
4284 (basic_type_complaint, bad_tag_guess_complaint)
4285 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4286 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4287 (parse_procedure, parse_lines)
4288 (function_outside_compilation_unit_complaint)
4289 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4290 (bad_tag_guess_complaint, reg_value_complaint): Update.
4291 * cp-support.c (demangled_name_complaint): Update.
4292 * macroscope.c (sal_macro_scope): Update.
4293 * dwarf-index-write.c (class debug_names): Update.
4295 2018-05-23 Tom Tromey <tom@tromey.com>
4297 * complaints.c (clear_complaints): Remove "noisy" parameter.
4298 * complaints.h (clear_complaints): Update.
4299 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4300 (reread_symbols): Update.
4302 2018-05-23 Tom Tromey <tom@tromey.com>
4304 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4306 (vcomplaint, clear_complaints): Update.
4307 (symfile_explanations): Remove some messages.
4309 2018-05-23 Tom Tromey <tom@tromey.com>
4311 * complaints.c (internal_complaint): Remove.
4312 * complaints.h (internal_complaint): Remove.
4314 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4316 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4318 2018-05-22 Pedro Alves <palves@redhat.com>
4320 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4321 (remote_fileio_badfd, remote_fileio_return_errno)
4322 (remote_fileio_return_success, remote_fileio_func_open)
4323 (remote_fileio_func_open, remote_fileio_func_close)
4324 (remote_fileio_func_read, remote_fileio_func_write)
4325 (remote_fileio_func_lseek, remote_fileio_func_rename)
4326 (remote_fileio_func_unlink, remote_fileio_func_stat)
4327 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4328 (remote_fileio_func_isatty, remote_fileio_func_system): Add
4329 remote_target parameter.
4330 (remote_fio_func_map) <func>: Add remote_target parameter.
4331 (do_remote_fileio_request, remote_fileio_request):
4332 * remote-fileio.h (remote_fileio_request):
4333 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4334 remote_target parameter.
4335 (remote_notif_process, handle_notification): Adjust to pass down
4337 (remote_notif_state_allocate): Add remote_target parameter. Save
4339 * remote-notif.h (struct remote_target): Forward declare.
4340 (struct notif_client) <parse, ack, can_get_pending_events>: Add
4341 remote_target parameter.
4342 (struct remote_notif_state) <remote>: New field.
4343 (remote_notif_ack, remote_notif_parse): Add remote_target
4345 (remote_notif_state_allocate, remote_notif_state_allocate): Add
4346 remote_target parameter.
4347 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4348 (threads_listing_context, rmt_thread_action, protocol_feature)
4349 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4350 (packet_result, struct threads_listing_context, remote_state):
4351 Move definitions and declarations higher up.
4352 (remote_target) <~remote_target>: Declare.
4353 (remote_download_command_source, remote_file_put, remote_file_get)
4354 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4355 (remote_hostio_pread_vFile, remote_hostio_send_command)
4356 (remote_hostio_set_filesystem, remote_hostio_open)
4357 (remote_hostio_close, remote_hostio_unlink, remote_state)
4358 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4359 (get_memory_write_packet_size, get_memory_read_packet_size)
4360 (append_pending_thread_resumptions, remote_detach_1)
4361 (append_resumption, remote_resume_with_vcont)
4362 (add_current_inferior_and_thread, wait_ns, wait_as)
4363 (process_stop_reply, remote_notice_new_inferior)
4364 (process_initial_stop_replies, remote_add_thread)
4365 (btrace_sync_conf, remote_btrace_maybe_reopen)
4366 (remove_new_fork_children, kill_new_fork_children)
4367 (discard_pending_stop_replies, stop_reply_queue_length)
4368 (check_pending_events_prevent_wildcard_vcont)
4369 (discard_pending_stop_replies_in_queue, stop_reply)
4370 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4371 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4372 (remote_interrupt_as, remote_interrupt_ns)
4373 (remote_get_noisy_reply, remote_query_attached)
4374 (remote_add_inferior, remote_current_thread, get_current_thread)
4375 (set_thread, set_general_thread, set_continue_thread)
4376 (set_general_process, write_ptid)
4377 (remote_unpack_thread_info_response, remote_get_threadinfo)
4378 (parse_threadlist_response, remote_get_threadlist)
4379 (remote_threadlist_iterator, remote_get_threads_with_ql)
4380 (remote_get_threads_with_qxfer)
4381 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4382 (get_offsets, remote_check_symbols, remote_supported_packet)
4383 (remote_query_supported, remote_packet_size)
4384 (remote_serial_quit_handler, remote_detach_pid)
4385 (remote_vcont_probe, remote_resume_with_hc)
4386 (send_interrupt_sequence, interrupt_query)
4387 (remote_notif_get_pending_events, fetch_register_using_p)
4388 (send_g_packet, process_g_packet, fetch_registers_using_g)
4389 (store_register_using_P, store_registers_using_G)
4390 (set_remote_traceframe, check_binary_download)
4391 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4392 (remote_xfer_live_readonly_partial, remote_read_bytes)
4393 (remote_send_printf, remote_flash_write, readchar)
4394 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4395 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4396 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4397 (extended_remote_disable_randomization, extended_remote_run)
4398 (send_environment_packet, extended_remote_environment_support)
4399 (extended_remote_set_inferior_cwd, remote_write_qxfer)
4400 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4401 (packet_command): Now methods of ...
4402 (remote_target): ... this class.
4403 (m_remote_state) <remote_target>: New field.
4404 (struct remote_state) <stop_reply_queue,
4405 remote_async_inferior_event_token, wait_forever_enabled_p>: New
4407 (remote_state::remote_state): Allocate stop_reply_queue.
4408 (remote_state): Delete global.
4409 (get_remote_state_raw): Delete.
4410 (remote_target::get_remote_state): Allocate m_remote_state on
4412 (get_current_remote_target): New.
4413 (remote_ops, extended_remote_ops): Delete.
4414 (wait_forever_enabled_p, remote_async_inferior_event_token):
4415 Delete, moved to struct remote_state.
4416 (remote_target::close): Delete self. Destruction bits split to
4418 (remote_target::~remote_target): ... this.
4419 (show_memory_packet_size): Adjust to use
4420 get_current_remote_target.
4421 (struct protocol_feature) <func>: Add remote_target parameter.
4422 All callers adjusted.
4423 (curr_quit_handler_target): New.
4424 (remote_serial_quit_handler): Reimplement.
4425 (remote_target::open_1): Adjust to use get_current_remote_target.
4426 Heap-allocate remote_target/extended_remote_target instances.
4427 (vcont_builder::vcont_builder): Add remote_target parameter, and
4428 save it in m_remote. All callers adjusted.
4429 (vcont_builder::m_remote): New field.
4430 (vcont_builder::restart, vcont_builder::flush)
4431 (vcont_builder::push_action): Use it.
4432 (remote_target::commit_resume): Use it.
4433 (struct queue_iter_param) <remote>: New field.
4434 (remote_target::remove_new_fork_children): Fill in 'remote' field.
4435 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4436 (check_pending_event_prevents_wildcard_vcont_callback)
4437 (remote_target::check_pending_events_prevent_wildcard_vcont)
4438 (remote_target::discard_pending_stop_replies)
4439 (remote_target::discard_pending_stop_replies_in_queue)
4440 (remote_target::remote_notif_remove_queued_reply): Fill in
4442 (remote_notif_get_pending_events): New.
4443 (remote_target::readchar, remote_target::remote_serial_write):
4444 Save/restore curr_quit_handler_target.
4446 (kill_new_fork_children): Fill in 'remote' field.
4447 (packet_command): Use get_current_remote_target, defer to
4448 remote_target method of same name.
4449 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4450 parameter, and save it in m_remote. All callers adjusted.
4451 (scoped_remote_fd::release): Use m_remote.
4452 (scoped_remote_fd::m_remote): New field.
4453 (remote_file_put, remote_file_get, remote_file_delete): Use
4454 get_current_remote_target, defer to remote_target method of same
4456 (remote_btrace_reset): Add remote_state paremeter. Update all
4458 (remote_async_inferior_event_handler). Pass down 'data'.
4459 (remote_new_objfile): Use get_current_remote_target.
4460 (remote_target::vcont_r_supported): New.
4461 (set_range_stepping): Use get_current_remote_target and
4462 remote_target::vcont_r_supported.
4463 (_initialize_remote): Don't allocate 'remote_state' and
4464 'stop_reply_queue' globals.
4465 * remote.h (struct remote_target): Forward declare.
4466 (getpkt, putpkt, remote_notif_get_pending_events): Add
4467 'remote_target' parameter.
4469 2018-05-22 Pedro Alves <palves@redhat.com>
4471 * remote.c (vcont_builder): Now a class. Make all data members
4473 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4475 (vcont_builder_restart): Rename to ...
4476 (vcont_builder::restart): ... this.
4477 (vcont_builder_flush): Rename to ...
4478 (vcont_builder::flush): ... this.
4479 (vcont_builder_push_action): Rename to ...
4480 (vcont_builder::push_action): ... this.
4481 (remote_target::commit_resume): Adjust.
4483 2018-05-22 Pedro Alves <palves@redhat.com>
4485 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4486 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4487 (get_fixed_memory_packet_size): New.
4488 (get_memory_packet_size): Use it.
4489 (set_memory_packet_size): Don't override the config size with
4490 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4491 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4492 Don't refer to get_memory_packet_size if not connected to a remote
4493 target. Show "(default)" if configured size is 0.
4495 2018-05-22 Pedro Alves <palves@redhat.com>
4497 * remote.c (remote_target::mourn_inferior): Move
4498 discard_pending_stop_replies call here from ...
4499 (_initialize_remote): ... here.
4501 2018-05-22 Pedro Alves <palves@redhat.com>
4503 * remote.c (compare_section_command): Remove set_general_process
4506 2018-05-22 Pedro Alves <palves@redhat.com>
4508 * remote.c (struct packet_reg, struct remote_arch_state):
4509 Move higher up in the file.
4510 (remote_state) <m_arch_states>: Store remote_arch_state values
4511 instead of remote_arch_state pointers.
4512 (remote_state::get_remote_arch_state): Adjust.
4514 2018-05-22 Pedro Alves <palves@redhat.com>
4516 * remote.c: Include <unordered_map>.
4517 (remote_state): Now a class.
4518 (remote_state) <get_remote_arch_state>: Declare method.
4519 <get_remote_arch_state>: New field.
4520 (remote_arch_state) <remote_arch_state>: Declare ctor.
4521 <regs>: Now a unique_ptr.
4522 (remote_gdbarch_data_handle): Delete.
4523 (get_remote_arch_state): Delete.
4524 (remote_state::get_remote_arch_state): New.
4525 (get_remote_state): Adjust to call remote_state's
4526 get_remote_arch_state method.
4527 (init_remote_state): Delete, bits factored out to ...
4528 (remote_arch_state::remote_arch_state): ... this new method.
4529 (get_remote_packet_size, get_memory_packet_size)
4530 (process_g_packet, remote_target::fetch_registers)
4531 (remote_target::prepare_to_store, store_registers_using_G)
4532 (remote_target::store_registers, remote_target::get_trace_status):
4533 Adjust to call remote_state's method.
4534 (_initialize_remote): Remove reference to
4535 remote_gdbarch_data_handle.
4537 2018-05-22 Pedro Alves <palves@redhat.com>
4539 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4540 pread>: New method declarations.
4541 (remote_target::open_1): Adjust.
4542 (readahead_cache_invalidate): Rename to ...
4543 (readahead_cache::invalidate): ... this, and adjust to be a class
4545 (readahead_cache_invalidate_fd): Rename to ...
4546 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4548 (remote_hostio_pwrite): Adjust.
4549 (remote_hostio_pread_from_cache): Rename to ...
4550 (readahead_cache::pread): ... this, and adjust to be a class
4552 (remote_hostio_close): Adjust.
4554 2018-05-22 Pedro Alves <palves@redhat.com>
4556 * remote.c (remote_hostio_close_cleanup): Delete.
4557 (class scoped_remote_fd): New.
4558 (remote_file_put, remote_file_get): Use it.
4560 2018-05-22 Pedro Alves <palves@redhat.com>
4562 (struct vCont_action_support): Use bool and initialize all fields.
4563 (struct readahead_cache): Initialize all fields.
4564 (remote_state): Use bool and initialize all fields.
4565 (remote_state::remote_state, remote_state::~remote_state): New.
4566 (new_remote_state): Delete.
4567 (_initialize_remote): Use new to allocate remote_state.
4569 2018-05-22 Pedro Alves <palves@redhat.com>
4573 * c-exp.y: Include "c-support.h".
4574 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4575 of tolower. Use c_ident_is_alpha to scan names.
4576 * c-lang.c: Include "c-support.h".
4577 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4578 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4579 * c-support.h: New file, with bits factored out from ...
4580 * cp-name-parser.y: ... this file.
4581 Include "c-support.h".
4582 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4583 c-support.h and renamed.
4584 (symbol_end, yylex): Adjust.
4586 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4588 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4589 parameter type to CORE_ADDR.
4590 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4591 parameter type in declaration to CORE_ADDR.
4592 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4593 target_auxv_search to get AT_HWCAP and use the result to get the
4595 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4596 to CORE_ADDR. Remove the cast of the return value to unsigned
4597 long. Fix error predicate of target_auxv_search.
4598 (ppc_linux_nat_target::read_description): Change the type of the
4599 hwcap variable to CORE_ADDR.
4601 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4603 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4604 if the size of fpscr is larger than 32 bits.
4606 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4608 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4609 (ppc32_linux_vsxregmap): New global.
4610 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4611 regcache_supply_regset, and regcache_collect_regset.
4612 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4613 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4614 (fetch_vsx_register, store_vsx_register): Remove.
4615 (fetch_vsx_registers): Add regno parameter. Get regset using
4616 ppc_linux_vsxregset. Use regset to supply registers.
4617 (store_vsx_registers): Add regno parameter. Get regset using
4618 ppc_linux_vsxregset. Use regset to collect registers.
4619 (fetch_register): Call fetch_vsx_registers instead of
4621 (store_register): Call store_vsx_registers instead of
4623 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4624 new regno parameter.
4625 (store_ppc_registers): Call store_vsx_registers with -1 for the
4626 new regno parameter.
4627 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4628 (ppc_collect_vsxregset): Remove.
4630 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4632 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4634 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4635 for vector register offset fields.
4636 (ppc64_fbsd_reg_offsets): Likewise.
4637 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4638 to vector register offset fields.
4639 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4640 to vector register offset fields.
4641 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4642 vector register offset fields.
4643 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4644 initializers for vector register offset fields.
4645 (rs6000_aix64_reg_offsets): Likewise.
4646 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4647 (ppc_supply_vrregset): Remove.
4648 (ppc_collect_vrregset): Remove.
4649 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4650 (ppc_linux_vrregset) : New function.
4651 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4652 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4653 (ppc32_linux_vrregset): Remove.
4654 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4655 and use result instead of ppc32_linux_vrregset.
4656 (ppc32_linux_reg_offsets): Remove initializers for vector register
4658 (ppc64_linux_reg_offsets): Likewise.
4659 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4660 * ppc-linux-nat.c: Include regset.h.
4661 (gdb_vrregset_t): Adjust comment to account for little-endian
4663 (supply_vrregset, fill_vrregset): Remove.
4664 (fetch_altivec_register, store_altivec_register): Remove.
4665 (fetch_altivec_registers): Add regno parameter. Get regset using
4666 ppc_linux_vrregset. Use regset to supply registers.
4667 (store_altivec_registers): Add regno parameter. Get regset using
4668 ppc_linux_vrregset. Use regset to collect registers.
4669 (fetch_register): Call fetch_altivec_registers instead of
4670 fetch_altivec_register.
4671 (store_register): Call store_altivec_registers instead of
4672 store_altivec_register.
4673 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4674 the new regno parameter.
4675 (store_ppc_registers): Call store_altivec_registers with -1 for
4676 the new regno parameter.
4678 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4680 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4681 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4682 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4683 (gdb_vrregset_t): Change array type size to
4684 PPC_LINUX_SIZEOF_VRREGSET.
4685 (gdb_vsxregset_t): Change array type size to
4686 PPC_LINUX_SIZEOF_VSXREGSET.
4687 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4688 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4689 PPC_LINUX_SIZEOF_VSXREGSET.
4691 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4693 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4694 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4696 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4697 ppc_linux_target_wordsize with tid.
4698 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4700 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4701 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4702 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4703 tid parameter. Remove static specifier.
4704 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4705 (ppc_linux_target_wordsize): New declaration.
4707 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4709 * arch/ppc-linux-common.c: New file.
4710 * arch/ppc-linux-common.h: New file.
4711 * arch/ppc-linux-tdesc.h: New file.
4712 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4713 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4714 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4715 arch/ppc-linux-tdesc.h.
4716 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4717 arch/ppc-linux-tdesc.h.
4718 (ppc_linux_nat_target::read_description): Remove target
4719 description matching code. Fill a ppc_linux_features struct and
4720 call ppc_linux_match_description with it. Move comment about ISA
4721 2.05 to ppc-linux-common.c.
4722 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4723 arch/ppc-linux-tdesc.h.
4724 (ppc_linux_core_read_description): Remove target description
4725 matching code. Fill a ppc_linux_features struct and call
4726 ppc_linux_match_description with it.
4727 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4728 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4729 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4730 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4731 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4732 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4733 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4734 (tdesc_powerpc_e500l): Remove.
4736 2018-05-22 Joel Brobecker <brobecker@adacore.com>
4738 * ada-lang.c (catch_assert_command): Pass empty string instead
4739 of NULL for excep_string argument.
4741 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4743 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4744 the width of the requested register exceeds the width of the
4747 2018-05-21 Tom Tromey <tom@tromey.com>
4749 * printcmd.c (output_command): Remove.
4750 (output_command_const): Rename to output_command.
4751 * valprint.h (output_command): Rename from output_command_const.
4752 * tracepoint.c (trace_dump_actions): Call output_command.
4754 2018-05-21 Tom Tromey <tom@tromey.com>
4756 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4757 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4758 * ada-lang.h (create_ada_exception_catchpoint): Update.
4759 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4761 (create_excep_cond_exprs, ~ada_catchpoint)
4762 (should_stop_exception, print_one_exception)
4763 (print_mention_exception, print_recreate_exception): Update.
4764 (ada_get_next_arg): Remove.
4765 (catch_ada_exception_command_split): Use std::string. Change type
4766 of "excep_string", "cond_string".
4767 (catch_ada_exception_command): Update.
4768 (create_ada_exception_catchpoint): Change type of excep_string.
4769 (ada_exception_sal): Remove excep_string parameter.
4770 (~ada_catchpoint): Remove.
4772 2018-05-21 Tom Tromey <tom@tromey.com>
4774 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4777 2018-05-21 Tom Tromey <tom@tromey.com>
4779 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4780 Return unique_xmalloc_ptr.
4781 (print_it_exception): Update.
4783 2018-05-21 Tom Tromey <tom@tromey.com>
4785 * tracepoint.c (trace_dump_actions): Use std::string.
4787 2018-05-21 Tom Tromey <tom@tromey.com>
4789 * symfile.c (reread_symbols): Use std::string for original_name.
4791 2018-05-21 Tom Tromey <tom@tromey.com>
4793 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4794 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4797 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4799 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4801 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4802 * objfiles.c (get_objfile_bfd_data): Allocate
4803 objfile_per_bfd_storage with obstack_new when allocating on
4806 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4808 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4810 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4811 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4812 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4813 (add_pending): Likewise.
4814 (parse_symbol): Likewise.
4815 (parse_partial_symbols): Likewise.
4816 (psymtab_to_symtab_1): Likewise.
4817 (new_psymtab): Likewise.
4818 (elfmdebug_build_psymtabs): Likewise.
4819 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4820 * objfiles.c (get_objfile_bfd_data): Likewise.
4821 (objfile_register_static_link): Likewise.
4822 * psymtab.c (allocate_psymtab): Likewise.
4823 * stabsread.c (read_member_functions): Likewise.
4824 * xcoffread.c (xcoff_end_psymtab): Likewise.
4826 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4828 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4829 compiler supports std::is_trivially_constructible.
4830 * common/poison.h: Include obstack.h.
4831 (IsMallocable): Define to is_trivially_constructible if the
4832 compiler supports it, define to true_type otherwise.
4836 (XOBNEWVEC): Redefine.
4837 * gdb_obstack.h (obstack_zalloc): New.
4838 (OBSTACK_ZALLOC): Redefine.
4839 (obstack_calloc): New.
4840 (OBSTACK_CALLOC): Redefine.
4842 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4843 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4845 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4846 obstack_calloc/obstack_zalloc.
4847 (gdbarch_obstack_zalloc): Remove.
4848 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4850 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4852 * stack.c (backtrace_command_1): Remove useless variable int i.
4854 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4856 * stack.c (print_frame_info): Fix comment.
4858 2018-05-18 Tom Tromey <tom@tromey.com>
4860 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4861 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4862 (~dwarf2_per_objfile): Update
4863 (dwarf2_get_dwz_file): Use new.
4864 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4867 2018-05-18 Tom Tromey <tom@tromey.com>
4869 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4871 * dwarf2read.c (struct dwp_file): Add constructor and
4873 (open_and_init_dwp_file): Return a unique_ptr.
4874 (dwarf2_per_objfile, create_dwp_hash_table)
4875 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4876 (lookup_dwo_unit_in_dwp): Update.
4877 (open_and_init_dwp_file, get_dwp_file): Update.
4879 2018-05-18 Tom Tromey <tom@tromey.com>
4881 * dwarf2read.c (dwarf2_per_objfile): Update.
4882 (struct mapped_index): Add initializers.
4883 (dwarf2_read_index): Use new.
4884 (dw2_symtab_iter_init): Update.
4885 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4888 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4890 * dwarf2read.c (mapped_index) <total_size>: Remove.
4892 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4894 * unittests/format_pieces-selftests.c (test_format_specifier):
4897 2018-05-18 Tom Tromey <tom@tromey.com>
4899 * c-typeprint.c (maybe_print_hole): New function.
4900 (c_print_type_struct_field_offset): Update.
4901 (c_type_print_base_struct_union): Call maybe_print_hole.
4903 2018-05-17 Keith Seitz <keiths@redhat.com>
4905 * breakpoint.c (build_bpstat_chain): New function, moved from
4907 (bpstat_stop_status): Add optional parameter, `stop_chain'.
4908 If no stop chain is passed, call build_bpstat_chain to build it.
4909 * breakpoint.h (build_bpstat_chain): Declare.
4910 (bpstat_stop_status): Move documentation here from breakpoint.c.
4911 * infrun.c (handle_signal_stop): Before eliding inlined frames,
4912 build the stop chain and pass it to skip_inline_frames.
4913 Pass this stop chain to bpstat_stop_status.
4914 * inline-frame.c: Include breakpoint.h.
4915 (stopped_by_user_bp_inline_frame): New function.
4916 (skip_inline_frames): Add parameter `stop_chain'.
4917 Move documention to inline-frame.h.
4918 If non-NULL, use stopped_by_user_bp_inline_frame to determine
4919 whether the frame should be elided.
4920 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4921 Add moved documentation and update for new parameter.
4923 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4926 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4927 unittests/format_pieces-selftests.c.
4928 * common/format.h (format_piece) <operator==>: New.
4929 (format_pieces) <operator[]>: Remove.
4930 * common/format.c (format_pieces::format_pieces): Handle \e.
4931 * unittests/format_pieces-selftests.c: New.
4933 2018-05-17 Tom Tromey <tom@tromey.com>
4936 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4937 (dw2_instantiate_symtab): Add skip_partial parameter.
4938 (dw2_find_last_source_symtab, dw2_map_expand_apply)
4939 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4940 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4941 (dw2_expand_symtabs_matching_one)
4942 (dw2_find_pc_sect_compunit_symtab)
4943 (dw2_debug_names_lookup_symbol)
4944 (dw2_debug_names_expand_symtabs_for_function): Update.
4945 (init_cutu_and_read_dies): Add skip_partial parameter.
4946 (process_psymtab_comp_unit, build_type_psymtabs_1)
4947 (process_skeletonless_type_unit, load_partial_comp_unit)
4948 (psymtab_to_symtab_1): Update.
4949 (load_full_comp_unit): Add skip_partial parameter.
4950 (process_imported_unit_die, dwarf2_read_addr_index)
4951 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4952 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4953 (read_signatured_type): Update.
4955 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4957 * value.c (release_value): Remove unused variable.
4958 (record_latest_value): Likewise.
4959 (access_value_history): Likewise.
4960 (preserve_values): Likewise.
4962 2018-05-17 Tom Tromey <tom@tromey.com>
4964 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4967 2018-05-16 Maciej W. Rozycki <macro@mips.com>
4970 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4971 Also handle registers whose width is not a multiple of
4973 (linux_nat_trad_target::store_register): Likewise.
4975 2018-05-16 Tom Tromey <tom@tromey.com>
4977 * gdbcore.h (core_bfd): Redefine.
4978 * corelow.c (core_target::close): Update.
4979 (core_target_open): Update.
4980 * progspace.h (struct program_space) <cbfd>: Now a
4983 2018-05-16 Tom Tromey <tom@tromey.com>
4986 * symfile-add-flags.h (enum symfile_add_flags)
4987 <SYMFILE_NOT_FILENAME>: New constant.
4988 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
4989 objfile name from BFD.
4990 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4991 * minidebug.c (find_separate_debug_file_in_section): Put
4992 ".gnu_debugdata" into BFD's file name.
4994 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
4996 * regcache.c (regcache_read_ftype, regcache_write_ftype):
4999 2018-05-15 Tamar Christina <tamar.christina@arm.com>
5002 * aarch64-tdep.c (aarch64_analyze_prologue,
5003 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5004 Indicate not interested in errors.
5006 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5008 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5009 Supply the MIPS_ZERO_REGNUM register.
5011 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5013 * mips-tdep.c (mask_address_var): Make variable static.
5015 2018-05-14 Tom Tromey <tom@tromey.com>
5017 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5019 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
5021 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5022 FXSAVE_ADDR for the mxcsr register.
5024 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
5026 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5028 2018-05-11 Pedro Alves <palves@redhat.com>
5030 * corelow.c (core_target) <core_target>: No longer inline.
5031 Initialize m_core_gdbarch, m_core_vec and build the section table
5033 <~core_target>: New.
5034 <core_gdbarch, get_core_register_section>: New methods.
5035 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5036 factored out from ...
5037 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5039 (sniff_core_bfd): Add gdbarch parameter.
5040 (core_close): Delete, merged into ...
5041 (core_target::close): ... here. Delete self.
5042 (core_close_cleanup): Delete.
5043 (core_target_open): Allocate a core_target on the heap. Use a
5044 unique_ptr instead of a cleanup. Bits moved into the core_target
5045 ctor. Adjust to use core_target methods instead of globals.
5046 (get_core_register_section): Rename to ...
5047 (core_target::get_core_register_section): ... this and adjust.
5048 (struct get_core_registers_cb_data): New.
5049 (get_core_registers_cb): Use it. Use bool.
5050 (core_target::fetch_registers, core_target::files_info)
5051 (core_target::xfer_partial, core_target::read_description)
5052 (core_target::pid_to, core_target::thread_name): Adjust to
5053 reference class fields instead of globals.
5054 * target.h (struct target_ops_deleter, target_ops_up): New.
5056 2018-05-11 Pedro Alves <palves@redhat.com>
5058 * corefile.c (core_file_command): Move to corelow.c.
5059 * corelow.c (the_core_target): Delete.
5060 (core_file_command): Moved from corefile.c. Check exec_bfd
5061 instead of the_core_target. Use target_detach instead of calling
5062 into the_core_target directly.
5063 (maybe_say_no_core_file_now): New.
5064 (core_target::detach): Use it.
5065 (_initialize_corelow): Remove references to the_core_target.
5066 * gdbcore.h (the_core_target): Delete.
5068 2018-05-11 Tom Tromey <tromey@redhat.com>
5069 Pedro Alves <palves@redhat.com>
5071 * corefile.c (core_bfd): Remove.
5072 * gdbcore.h (core_bfd): Now a macro.
5073 * progspace.h (struct program_space) <cbfd>: New field.
5075 2018-05-11 Tom Tromey <tom@tromey.com>
5077 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5080 2018-05-10 Tom Tromey <tom@tromey.com>
5082 * configure: Rebuild.
5083 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5085 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5088 * regformats/regdat.sh: Adjust script, following the addition
5089 of the new expedite_regs parameter to init_target_desc.
5091 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
5094 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5095 set_gdbarch_significant_addr_bit.
5096 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5097 set_gdbarch_significant_addr_bit.
5098 * utils.c (address_significant): Update to sign extend addr.
5100 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
5102 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5103 (xtensa_linux_init_abi): Limit tdep->num_regs by
5104 tdep->num_nopriv_regs.
5105 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5106 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5109 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
5111 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5113 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5115 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5116 (I387_MXCSR_INIT_VAL): New constant.
5117 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5118 buffer if it was supplied by the inferior.
5119 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5120 (i387_xsave_get_clear_bv): New function.
5121 (i387_supply_xsave): Only read x87 control registers from the
5122 xsave buffer if the feature is enabled, and the state will have
5123 been written, otherwise, provide a suitable default.
5124 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5125 including x87 control registers. Update control registers if they
5126 have changed from the default value, and mark features as enabled
5128 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5130 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5132 * spu-tdep.c (info_spu_event_command): Fix output formatting.
5134 2018-05-07 Tom Tromey <tom@tromey.com>
5136 * configure: Rebuild.
5137 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5139 2018-05-07 Tom Tromey <tom@tromey.com>
5142 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5143 bit. Use correct value for VDIV.
5145 2018-05-04 Tom Tromey <tom@tromey.com>
5147 * configure: Rebuild.
5148 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5150 2018-05-04 Tom Tromey <tom@tromey.com>
5152 * linux-record.c (record_linux_system_call) <case
5153 RECORD_SYS_RECVFROM>: Add "break".
5155 2018-05-04 Tom Tromey <tom@tromey.com>
5157 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5158 Add missing "break".
5159 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5160 Add missing "break".
5162 2018-05-04 Tom Tromey <tom@tromey.com>
5164 * rs6000-tdep.c (ppc_process_record_op4)
5165 (ppc_process_record_op63): Add fall-through comment.
5167 2018-05-04 Tom Tromey <tom@tromey.com>
5169 * i386-tdep.c (i386_process_record): Add fall-through comment.
5171 2018-05-04 Tom Tromey <tom@tromey.com>
5173 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5176 2018-05-04 Tom Tromey <tom@tromey.com>
5178 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5179 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5180 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5182 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5184 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5187 2018-05-04 Tom Tromey <tom@tromey.com>
5189 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5191 2018-05-04 Tom Tromey <tom@tromey.com>
5193 * s390-tdep.c (s390_process_record): Fix fall-through comments.
5194 * xcoffread.c (scan_xcoff_symtab): Move comment later.
5195 * symfile.c (section_is_mapped): Fix fall-through comment.
5196 * stabsread.c (define_symbol, read_member_functions): Fix
5197 fall-through comment.
5198 * s390-linux-tdep.c (s390_process_record): Fix fall-through
5200 * remote.c (remote_wait_as): Fix fall-through comment.
5201 * p-exp.y (yylex): Fix fall-through comment.
5202 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5204 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5205 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5206 * jv-exp.y (yylex): Fix fall-through comment.
5207 * go-exp.y (lex_one_token): Fix fall-through comment.
5208 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5209 fall-through comment.
5210 * f-exp.y (yylex): Fix fall-through comment.
5211 * dwarf2read.c (process_die): Fix fall-through comments.
5212 * dbxread.c (process_one_symbol): Fix fall-through comment.
5213 * d-exp.y (lex_one_token): Fix fall-through comment.
5214 * cp-name-parser.y (yylex): Fix fall-through comment.
5215 * coffread.c (coff_symtab_read): Fix fall-through comment.
5216 * c-exp.y (lex_one_token): Fix fall-through comment.
5217 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5219 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5222 2018-05-04 Tom Tromey <tom@tromey.com>
5225 * NEWS: Mention gdb.execute change.
5226 * gdbcmd.h (execute_control_command): Don't declare.
5227 * python/python.c (execute_gdb_command): Use read_command_lines_1,
5228 execute_control_commands, execute_control_commands_to_string.
5229 * cli/cli-script.h (execute_control_commands)
5230 (execute_control_commands_to_string): Declare.
5231 (execute_control_command): Add from_tty parameter.
5232 * cli/cli-script.c (execute_control_commands)
5233 (execute_control_commands_to_string): New functions.
5234 (execute_user_command): Use execute_control_commands.
5235 (execute_control_command_1): Add "from_tty" parameter. Update.
5236 (execute_control_command): Likewise.
5238 2018-05-04 Tom Tromey <tom@tromey.com>
5241 * NEWS: Mention that breakpoint commands are writable.
5242 * python/py-breakpoint.c (bppy_set_commands): New function.
5243 (breakpoint_object_getset) <"commands">: Use it.
5245 2018-05-04 Tom Tromey <tom@tromey.com>
5247 * tracepoint.c (actions_command): Update.
5248 * mi/mi-cmd-break.c (mi_command_line_array)
5249 (mi_command_line_array_cnt, mi_command_line_array_ptr)
5250 (mi_read_next_line): Remove.
5251 (mi_cmd_break_commands): Update.
5252 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5254 * cli/cli-script.c (get_command_line): Update.
5255 (process_next_line): Use function_view. Constify.
5256 (recurse_read_control_structure, read_command_lines)
5257 (read_command_lines_1): Change argument types to function_view.
5258 (do_define_command, document_command): Update.
5259 * breakpoint.h (check_tracepoint_command): Don't declare.
5260 * breakpoint.c (check_tracepoint_command): Remove.
5261 (commands_command_1, create_tracepoint_from_upload): Update.
5263 2018-05-04 Tom Tromey <tom@tromey.com>
5266 * cli/cli-script.h (enum command_control_type) <define_control>:
5268 * cli/cli-script.c (multi_line_command_p): Handle define_control.
5269 (build_command_line, execute_control_command_1)
5270 (process_next_line): Likewise.
5271 (do_define_command): New function, extracted from define_command.
5272 (define_command): Use it.
5274 2018-05-04 Tom Tromey <tom@tromey.com>
5276 * tracepoint.c (actions_command): Update.
5277 * cli/cli-script.h (read_command_lines): Update.
5278 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5279 (MAX_TMPBUF): Remove define.
5280 (define_command): Use string_printf.
5281 (document_command): Likewise.
5282 * breakpoint.c (commands_command_1): Update.
5284 2018-05-04 Tom Tromey <tom@tromey.com>
5286 * top.c (execute_command): Update.
5287 * cli/cli-script.h (print_command_lines): Now varargs.
5288 * cli/cli-script.c (print_command_lines): Now varargs.
5289 (execute_control_command_1) <case while_control, case if_control>:
5292 2018-05-04 Tom Tromey <tom@tromey.com>
5294 * tracepoint.c (all_tracepoint_actions): Rename from
5295 all_tracepoint_actions_and_cleanup. Change return type.
5296 (actions_command, encode_actions_1, encode_actions)
5297 (trace_dump_actions, tdump_command): Update.
5298 * remote.c (remote_download_command_source): Update.
5299 * python/python.c (gdbpy_eval_from_control_command)
5300 (python_command, python_interactive_command): Update.
5301 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5302 * guile/guile.c (guile_command)
5303 (gdbscm_eval_from_control_command, guile_command): Update.
5304 * compile/compile.c (compile_code_command)
5305 (compile_print_command, compile_to_object): Update.
5306 * cli/cli-script.h (struct command_lines_deleter): New.
5307 (counted_command_line): New typedef.
5308 (struct command_line): Add constructor, destructor.
5309 <body_list>: Remove.
5310 <body_list_0, body_list_1>: New members.
5311 (command_line_up): Remove typedef.
5312 (read_command_lines, read_command_lines_1, get_command_line):
5314 (copy_command_lines): Don't declare.
5315 * cli/cli-script.c (build_command_line): Use "new".
5316 (get_command_line): Return counted_command_line.
5317 (print_command_lines, execute_user_command)
5318 (execute_control_command_1, while_command, if_command): Update.
5319 (realloc_body_list): Remove.
5320 (process_next_line, recurse_read_control_structure): Update.
5321 (read_command_lines, read_command_lines_1): Return counted_command_line.
5322 (free_command_lines): Use "delete".
5323 (copy_command_lines): Remove.
5324 (define_command, document_command, show_user_1): Update.
5325 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5326 a counted_command_line.
5327 * breakpoint.h (counted_command_line): Remove typedef.
5328 (breakpoint_set_commands): Update.
5329 * breakpoint.c (check_no_tracepoint_commands)
5330 (validate_commands_for_breakpoint): Update.
5331 (breakpoint_set_commands): Change commands to be a
5332 counted_command_line.
5333 (commands_command_1, update_dprintf_command_list)
5334 (create_tracepoint_from_upload): Update.
5336 2018-05-04 Tom Tromey <tom@tromey.com>
5338 * cli/cli-decode.h (cmd_list_element): New constructor.
5339 (~cmd_list_element): New destructor.
5340 (struct cmd_list_element): Add initializers.
5341 * cli/cli-decode.c (do_add_cmd): Use "new".
5342 (delete_cmd): Use "delete".
5344 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5345 Pedro Alves <palves@redhat.com>
5347 PR breakpoints/19806 and support for PR external/20207.
5348 * NEWS: Mention Aarch64 watchpoint improvements.
5349 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5350 watchpoints and PR external/20207 watchpoints.
5351 * nat/aarch64-linux-hw-point.c
5352 (kernel_supports_any_contiguous_range): New.
5353 (aarch64_watchpoint_offset): New.
5354 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5355 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5356 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5357 (aarch64_align_watchpoint): New parameters aligned_offset_p and
5358 next_addr_orig_p. Support PR external/20207 watchpoints.
5359 (aarch64_downgrade_regs): New.
5360 (aarch64_dr_state_insert_one_point): New parameters offset and
5362 (aarch64_dr_state_remove_one_point): Likewise.
5363 (aarch64_handle_breakpoint): Update caller.
5364 (aarch64_handle_aligned_watchpoint): Likewise.
5365 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5367 (aarch64_linux_set_debug_regs): Remove const from state. Call
5368 aarch64_downgrade_regs.
5369 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5370 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5371 (DR_CONTROL_MASK): ... this.
5372 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5373 (unsigned int aarch64_watchpoint_offset): New prototype.
5374 (aarch64_linux_set_debug_regs): Remove const from state.
5375 * utils.c (align_up, align_down): Move to ...
5376 * common/common-utils.c (align_up, align_down): ... here.
5377 * utils.h (align_up, align_down): Move to ...
5378 * common/common-utils.h (align_up, align_down): ... here.
5380 2018-05-04 Joel Brobecker <brobecker@adacore.com>
5382 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5383 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5384 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5385 Re-implement to match the ABI as summarized in GCC's
5386 gcc/config/sparc/sparc.c. All callers updated.
5387 (sparc32_store_arguments): Remove assertion.
5389 2018-05-04 Tom Tromey <tom@tromey.com>
5391 * printcmd.c: Don't include tui.h.
5392 (decode_format): Use skip_spaces.
5394 2018-05-04 Tom Tromey <tom@tromey.com>
5397 * printcmd.c (last_count): New global.
5398 (x_command): Use saved count when repeating.
5400 2018-05-04 Tom Tromey <tom@tromey.com>
5402 * nto-procfs.c (do_closedir_cleanup): Remove.
5403 (procfs_pidlist): Use gdb_dir_up.
5404 * procfs.c (do_closedir_cleanup): Remove.
5405 (proc_update_threads): Use gdb_dir_up.
5406 * common/filestuff.h (struct gdb_dir_deleter): New.
5407 (gdb_dir_up): New typedef.
5409 2018-05-04 Tom Tromey <tom@tromey.com>
5411 * ada-lang.c (print_mention_exception): Use std::string.
5413 2018-05-04 Tom Tromey <tom@tromey.com>
5415 * ada-lang.c (create_excep_cond_exprs): Update.
5416 (ada_exception_catchpoint_cond_string): Use std::string.
5418 2018-05-04 Tom Tromey <tom@tromey.com>
5420 * ada-lang.c (xget_renaming_scope): Return std::string.
5421 (old_renaming_is_invisible): Update.
5423 2018-05-04 Tom Tromey <tom@tromey.com>
5425 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5426 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5428 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
5430 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5432 2018-05-04 Tom Tromey <tom@tromey.com>
5434 * remote.c (remote_query_supported_append): Change type.
5435 (remote_check_symbols): Update.
5437 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
5440 * configure.ac: Prepend libpython.
5441 * python/python-config.py: Likewise.
5442 * configure: Regenerate.
5444 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
5446 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5448 2018-05-03 Pedro Alves <palves@redhat.com>
5451 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5452 override. Write 'true' instead of '1'.
5453 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5456 2018-05-02 Pedro Alves <palves@redhat.com>
5458 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5459 add_inf_child_target.
5460 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5461 add_inf_child_target.
5462 * aix-thread.c (aix_thread_target_info): New.
5463 (aix_thread_target) <shortname, longname, doc>: Delete.
5465 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5466 add_inf_child_target.
5467 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5468 add_inf_child_target.
5469 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5470 add_inf_child_target.
5471 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5472 add_inf_child_target.
5473 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5474 add_inf_child_target.
5475 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5476 add_inf_child_target.
5477 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5478 add_inf_child_target.
5479 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5480 add_inf_child_target.
5481 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5482 add_inf_child_target.
5483 * bfd-target.c (target_bfd_target_info): New.
5484 (target_bfd) <shortname, longname, doc>: Delete.
5486 * bsd-kvm.c (bsd_kvm_target_info): New.
5487 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5489 (bsd_kvm_target::open): Rename to ...
5490 (bsd_kvm_target_open): ... this. Adjust.
5491 * bsd-uthread.c (bsd_uthread_target_info): New.
5492 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5494 * corefile.c (core_file_command): Adjust.
5495 * corelow.c (core_target_info): New.
5496 (core_target) <shortname, longname, doc>: Delete.
5498 (core_target::open): Rename to ...
5499 (core_target_open): ... this. Adjust.
5500 * ctf.c (ctf_target_info): New.
5501 (ctf_target) <shortname, longname, doc>: Delete.
5503 (ctf_target::open): Rename to ...
5504 (ctf_target_open): ... this.
5505 (_initialize_ctf): Adjust.
5506 * exec.c (exec_target_info): New.
5507 (exec_target) <shortname, longname, doc>: Delete.
5509 (exec_target::open): Rename to ...
5510 (exec_target_open): ... this.
5511 * gdbcore.h (core_target_open): Declare.
5512 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5513 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5514 add_inf_child_target.
5515 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5516 add_inf_child_target.
5517 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5518 add_inf_child_target.
5519 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5520 add_inf_child_target.
5521 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5522 add_inf_child_target.
5523 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5524 add_inf_child_target.
5525 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5526 add_inf_child_target.
5527 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5528 add_inf_child_target.
5529 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5530 add_inf_child_target.
5531 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5532 add_inf_child_target.
5533 * inf-child.c (inf_child_target_info): New.
5534 (inf_child_target::info): New.
5535 (inf_child_open_target): Remove 'target' parameter. Use
5536 get_native_target instead.
5537 (inf_child_target::open): Delete.
5538 (add_inf_child_target): New.
5539 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5542 (add_inf_child_target): Declare.
5543 (inf_child_open_target): Declare.
5544 * linux-thread-db.c (thread_db_target_info): New.
5545 (thread_db_target) <shortname, longname, doc>: Delete.
5547 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5548 add_inf_child_target.
5549 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5550 add_inf_child_target.
5551 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5552 add_inf_child_target.
5553 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5554 add_inf_child_target.
5555 * make-target-delegates (print_class): Adjust.
5556 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5557 add_inf_child_target.
5558 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5559 add_inf_child_target.
5560 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5561 add_inf_child_target.
5562 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5563 add_inf_child_target.
5564 * nto-procfs.c (nto_native_target_info): New.
5565 (nto_procfs_target_native) <shortname, longname, doc>:
5568 (nto_procfs_target_info): New.
5569 (nto_procfs_target_procfs) <shortname, longname, doc>:
5572 (init_procfs_targets): Adjust.
5573 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5574 add_inf_child_target.
5575 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5576 add_inf_child_target.
5577 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5578 add_inf_child_target.
5579 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5580 add_inf_child_target.
5581 * ravenscar-thread.c (ravenscar_target_info): New.
5582 (ravenscar_thread_target) <shortname, longname, doc>:
5585 * record-btrace.c (record_btrace_target_info):
5586 (record_btrace_target) <shortname, longname, doc>: Delete.
5588 (record_btrace_target::open): Rename to ...
5589 (record_btrace_target_open): ... this. Adjust.
5590 * record-full.c (record_longname, record_doc): New.
5591 (record_full_base_target) <shortname, longname, doc>: Delete.
5593 (record_full_target_info): New.
5594 (record_full_target): <shortname>: Delete.
5596 (record_full_core_open_1, record_full_open_1): Update comments.
5597 (record_full_base_target::open): Rename to ...
5598 (record_full_open): ... this.
5599 (cmd_record_full_restore): Update.
5600 (_initialize_record_full): Update.
5601 * remote-sim.c (remote_sim_target_info): New.
5602 (gdbsim_target) <shortname, longname, doc>: Delete.
5604 (gdbsim_target::open): Rename to ...
5605 (gdbsim_target_open): ... this.
5606 (_initialize_remote_sim): Adjust.
5607 * remote.c (remote_doc): New.
5608 (remote_target_info): New.
5609 (remote_target) <shortname, longname, doc>: Delete.
5611 (extended_remote_target_info): New.
5612 (extended_remote_target) <shortname, longname, doc>: Delete.
5614 (remote_target::open_1): Make static. Adjust.
5615 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5616 * s390-linux-nat.c (_initialize_s390_nat): Use
5617 add_inf_child_target.
5618 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5619 add_inf_child_target.
5620 * sol-thread.c (thread_db_target_info): New.
5621 (sol_thread_target) <shortname, longname, doc>: Delete.
5623 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5624 add_inf_child_target.
5625 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5626 add_inf_child_target.
5627 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5628 add_inf_child_target.
5629 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5630 add_inf_child_target.
5631 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5632 add_inf_child_target.
5633 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5634 add_inf_child_target.
5635 * spu-linux-nat.c (_initialize_spu_nat): Use
5636 add_inf_child_target.
5637 * spu-multiarch.c (spu_multiarch_target_info): New.
5638 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5640 * target-delegates.c: Regenerate.
5641 * target.c: Include <unordered_map>.
5642 (target_ops_p): Delete.
5643 (DEF_VEC_P(target_ops_p)): Delete.
5644 (target_factories): New.
5645 (test_target_info): New.
5646 (test_target_ops::info): New.
5647 (open_target): Adjust to use target_factories.
5648 (add_target_with_completer): Rename to ...
5649 (add_target): ... this. Change prototype. Register target_info
5650 and open callback in target_factories. Register target_info in
5651 command context instead of target_ops.
5652 (add_target): Delete old implementation.
5653 (add_deprecated_target_alias): Change prototype. Adjust.
5654 (the_native_target): New.
5655 (set_native_target, get_native_target): New.
5656 (find_default_run_target): Use the_native_target.
5657 (find_attach_target, find_run_target): Simplify.
5658 (target_ops::open): Delete.
5659 (dummy_target_info): New.
5660 (dummy_target::shortname, dummy_target::longname)
5661 (dummy_target::doc): Delete.
5662 (dummy_target::info): New.
5663 (debug_target::shortname, debug_target::longname)
5664 (debug_target::doc): Delete.
5665 (debug_target::info): New.
5666 * target.h (struct target_info): New.
5667 (target_ops::~target_ops): Add comment.
5668 (target_ops::info): New.
5669 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5670 longer virtual. Implement in terms of target_info.
5671 (set_native_target, get_native_target): Declare.
5672 (target_open_ftype): New.
5673 (add_target, add_target_with_completer)
5674 (add_deprecated_target_alias): Change prototype.
5675 (test_target) <shortname, longname, doc>: Delete.
5677 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5678 add_inf_child_target.
5679 * tracefile-tfile.c (tfile_target_info): New.
5680 (tfile_target) <shortname, longname, doc>: Delete.
5682 (tfile_target::open): Rename to ...
5683 (tfile_target_open): ... this.
5684 (_initialize_tracefile_tfile): Adjust.
5685 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5686 add_inf_child_target.
5687 * windows-nat.c (_initialize_windows_nat): Use
5688 add_inf_child_target.
5689 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5690 add_inf_child_target.
5692 2018-05-02 Pedro Alves <palves@redhat.com>
5694 * linux-nat.h (linux_nat_target) <low_new_thread,
5695 low_delete_thread, low_new_fork, low_forget_process,
5696 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5697 New virtual methods.
5698 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5699 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5700 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5701 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5702 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5704 * linux-fork.c (delete_fork): Adjust to call low method.
5705 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5706 (linux_nat_new_fork, linux_nat_forget_process_hook)
5707 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5708 (linux_nat_status_is_event):
5709 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5710 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5712 (sigtrap_is_event): Rename to ...
5713 (linux_nat_target::low_status_is_event): ... this.
5714 (linux_nat_set_status_is_event): Delete.
5715 (save_stop_reason, linux_nat_wait_1)
5716 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5718 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5719 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5720 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5721 (linux_nat_set_prepare_to_resume): Delete.
5722 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5723 low virtual methods.
5724 * amd64-linux-nat.c: Likewise.
5725 * arm-linux-nat.c: Likewise.
5726 * i386-linux-nat.c: Likewise.
5727 * ia64-linux-nat.c: Likewise.
5728 * mips-linux-nat.c: Likewise.
5729 * ppc-linux-nat.c: Likewise.
5730 * s390-linux-nat.c: Likewise.
5731 * sparc64-linux-nat.c: Likewise.
5732 * x86-linux-nat.c: Likewise.
5733 * x86-linux-nat.h: Include "nat/x86-linux.h".
5734 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5735 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5738 2018-05-02 Pedro Alves <palves@redhat.com>
5740 * target.h (target_ops)
5741 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5742 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5743 stopped_by_watchpoint, have_continuable_watchpoint,
5744 stopped_data_address, watchpoint_addr_within_range,
5745 can_accel_watchpoint_condition, can_run, thread_alive,
5746 has_all_memory, has_memory, has_stack, has_registers,
5747 has_execution, can_async_p, is_async_p, supports_non_stop,
5748 always_non_stop_p, can_execute_reverse, supports_multi_process,
5749 supports_enable_disable_tracepoint,
5750 supports_disable_randomization, supports_string_tracing,
5751 supports_evaluation_of_breakpoint_conditions,
5752 can_run_breakpoint_commands, filesystem_is_local,
5753 can_download_tracepoint, get_trace_state_variable_value,
5754 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5755 record_is_replaying, record_will_replay,
5756 augmented_libraries_svr4_read>: Adjust to return bool.
5757 * aarch64-linux-nat.c: All implementations adjusted.
5758 * aix-thread.c: All implementations adjusted.
5759 * arm-linux-nat.c: All implementations adjusted.
5760 * breakpoint.c: All implementations adjusted.
5761 * bsd-kvm.c: All implementations adjusted.
5762 * bsd-uthread.c: All implementations adjusted.
5763 * corelow.c: All implementations adjusted.
5764 * ctf.c: All implementations adjusted.
5765 * darwin-nat.c: All implementations adjusted.
5766 * darwin-nat.h: All implementations adjusted.
5767 * exec.c: All implementations adjusted.
5768 * fbsd-nat.c: All implementations adjusted.
5769 * fbsd-nat.h: All implementations adjusted.
5770 * gnu-nat.c: All implementations adjusted.
5771 * gnu-nat.h: All implementations adjusted.
5772 * go32-nat.c: All implementations adjusted.
5773 * ia64-linux-nat.c: All implementations adjusted.
5774 * inf-child.c: All implementations adjusted.
5775 * inf-child.h: All implementations adjusted.
5776 * inf-ptrace.c: All implementations adjusted.
5777 * inf-ptrace.h: All implementations adjusted.
5778 * linux-nat.c: All implementations adjusted.
5779 * linux-nat.h: All implementations adjusted.
5780 * mips-linux-nat.c: All implementations adjusted.
5781 * nto-procfs.c: All implementations adjusted.
5782 * ppc-linux-nat.c: All implementations adjusted.
5783 * procfs.c: All implementations adjusted.
5784 * ravenscar-thread.c: All implementations adjusted.
5785 * record-btrace.c: All implementations adjusted.
5786 * record-full.c: All implementations adjusted.
5787 * remote-sim.c: All implementations adjusted.
5788 * remote.c: All implementations adjusted.
5789 * s390-linux-nat.c: All implementations adjusted.
5790 * sol-thread.c: All implementations adjusted.
5791 * spu-multiarch.c: All implementations adjusted.
5792 * target-delegates.c: All implementations adjusted.
5793 * target.c: All implementations adjusted.
5794 * target.h: All implementations adjusted.
5795 * tracefile-tfile.c: All implementations adjusted.
5796 * tracefile.c: All implementations adjusted.
5797 * tracefile.h: All implementations adjusted.
5798 * windows-nat.c: All implementations adjusted.
5799 * x86-linux-nat.h: All implementations adjusted.
5800 * x86-nat.h: All implementations adjusted.
5802 2018-05-02 Pedro Alves <palves@redhat.com>
5804 * make-target-delegates (scan_target_h): Don't trim lines here.
5805 Replace sequences of tabs and/or whitespace with a single
5807 (top level, parsing methods): Trim each line before processing it
5810 2018-05-02 Pedro Alves <palves@redhat.com>
5811 John Baldwin <jhb@freebsd.org>
5813 * target.h (enum strata) <debug_stratum>: New.
5814 (struct target_ops) <all delegation methods>: Replace by C++
5815 virtual methods, and drop "to_" prefix. All references updated
5817 <to_shortname, to_longname, to_doc, to_data,
5818 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5819 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5820 virtual methods. All references updated throughout.
5821 <can_attach, supports_terminal_ours, can_create_inferior,
5822 get_thread_control_capabilities, attach_no_wait>: New
5824 <insert_breakpoint, remove_breakpoint>: Now
5825 TARGET_DEFAULT_NORETURN methods.
5826 <info_proc>: Now returns bool.
5828 (OPS_MAGIC): Delete.
5829 (current_target): Delete. All references replaced by references
5831 (target_stack): ... this. New.
5832 (target_shortname, target_longname): Adjust.
5833 (target_can_run): Now a function declaration.
5834 (default_child_has_all_memory, default_child_has_memory)
5835 (default_child_has_stack, default_child_has_registers)
5836 (default_child_has_execution): Remove target_ops parameter.
5837 (complete_target_initialization): Delete.
5838 (memory_breakpoint_target): New template class.
5839 (test_target_ops): Refactor as a C++ class with virtual methods.
5840 * make-target-delegates (NAME_PART): Tighten.
5841 (POINTER_PART, CP_SYMBOL): New.
5842 (SIMPLE_RETURN_PART): Reimplement.
5843 (VEC_RETURN_PART): Expect less.
5844 (RETURN_PART, VIRTUAL_PART): New.
5845 (METHOD): Adjust to C++ virtual methods.
5846 (scan_target_h): Remove reference to C99.
5847 (dname): Output "target_ops::" prefix.
5848 (write_function_header): Adjust to output a C++ class method.
5849 (write_declaration): New.
5850 (write_delegator): Adjust to output a C++ class method.
5851 (tdname): Output "dummy_target::" prefix.
5852 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5854 (tdefault_names, debug_names): Delete.
5855 (return_types, tdefaults, styles, argtypes_array): New.
5856 (top level): All methods are delegators.
5858 (top level): Print dummy_target and debug_target classes.
5859 * target-delegates.c: Regenerate.
5860 * target-debug.h (target_debug_print_enum_info_proc_what)
5861 (target_debug_print_thread_control_capabilities)
5862 (target_debug_print_thread_info_p): New.
5863 * target.c (dummy_target): Delete.
5864 (the_dummy_target, the_debug_target): New.
5865 (target_stack): Now extern.
5866 (set_targetdebug): Push/unpush debug target.
5867 (default_child_has_all_memory, default_child_has_memory)
5868 (default_child_has_stack, default_child_has_registers)
5869 (default_child_has_execution): Remove target_ops parameter.
5870 (complete_target_initialization): Delete.
5871 (add_target_with_completer): No longer call
5872 complete_target_initialization.
5873 (target_supports_terminal_ours): Use regular delegation.
5874 (update_current_target): Delete.
5875 (push_target): No longer check magic number. Don't call
5876 update_current_target.
5877 (unpush_target): Don't call update_current_target.
5878 (target_is_pushed): No longer check magic number.
5879 (target_require_runnable): Skip for all stratums over
5881 (target_ops::info_proc): New.
5882 (target_info_proc): Use find_target_at and
5883 find_default_run_target.
5884 (target_supports_disable_randomization): Use regular delegation.
5885 (target_get_osdata): Use find_target_at.
5886 (target_ops::open, target_ops::close, target_ops::can_attach)
5887 (target_ops::attach, target_ops::can_create_inferior)
5888 (target_ops::create_inferior, target_ops::can_run)
5889 (target_can_run): New.
5890 (default_fileio_target): Use regular delegation.
5891 (target_ops::fileio_open, target_ops::fileio_pwrite)
5892 (target_ops::fileio_pread, target_ops::fileio_fstat)
5893 (target_ops::fileio_close, target_ops::fileio_unlink)
5894 (target_ops::fileio_readlink): New.
5895 (target_fileio_open_1, target_fileio_unlink)
5896 (target_fileio_readlink): Always call the target method. Handle
5898 (return_zero, return_zero_has_execution): Delete.
5899 (init_dummy_target): Delete.
5900 (dummy_target::dummy_target, dummy_target::shortname)
5901 (dummy_target::longname, dummy_target::doc)
5902 (debug_target::debug_target, debug_target::shortname)
5903 (debug_target::longname, debug_target::doc): New.
5904 (target_supports_delete_record): Use regular delegation.
5905 (setup_target_debug): Delete.
5906 (maintenance_print_target_stack): Skip debug_stratum.
5907 (initialize_targets): Instantiate the_dummy_target and
5909 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
5911 (target_auxv_search, fprint_target_auxv): Adjust.
5912 (info_auxv_command): Adjust to use target_stack.
5913 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5914 * exceptions.c (print_flush): Handle a NULL target_stack.
5915 * regcache.c (target_ops_no_register): Refactor as class with
5918 * exec.c (exec_target): New class.
5919 (exec_ops): Now an exec_target.
5920 (exec_open, exec_close_1, exec_get_section_table)
5921 (exec_xfer_partial, exec_files_info, exec_has_memory)
5922 (exec_make_note_section): Refactor as exec_target methods.
5923 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5925 (exec_target::find_memory_regions): New.
5926 (_initialize_exec): Don't call init_exec_ops.
5927 * gdbcore.h (exec_file_clear): Delete.
5929 * corefile.c (core_target): Delete.
5930 (core_file_command): Adjust.
5931 * corelow.c (core_target): New class.
5932 (the_core_target): New.
5933 (core_close): Remove target_ops parameter.
5934 (core_close_cleanup): Adjust.
5935 (core_target::close): New.
5936 (core_open, core_detach, get_core_registers, core_files_info)
5937 (core_xfer_partial, core_thread_alive, core_read_description)
5938 (core_pid_to_str, core_thread_name, core_has_memory)
5939 (core_has_stack, core_has_registers, core_info_proc): Rework as
5940 core_target methods.
5941 (ignore, core_remove_breakpoint, init_core_ops): Delete.
5942 (_initialize_corelow): Initialize the_core_target.
5943 * gdbcore.h (core_target): Delete.
5944 (the_core_target): New.
5946 * ctf.c: (ctf_target): New class.
5947 (ctf_ops): Now a ctf_target.
5948 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5949 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5950 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5952 (init_ctf_ops): Delete.
5953 (_initialize_ctf): Don't call it.
5954 * tracefile-tfile.c (tfile_target): New class.
5955 (tfile_ops): Now a tfile_target.
5956 (tfile_open, tfile_close, tfile_files_info)
5957 (tfile_get_tracepoint_status, tfile_trace_find)
5958 (tfile_fetch_registers, tfile_xfer_partial)
5959 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5960 Refactor as tfile_target methods.
5961 (tfile_xfer_partial_features): Remove target_ops parameter.
5962 (init_tfile_ops): Delete.
5963 (_initialize_tracefile_tfile): Don't call it.
5964 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5965 (tracefile_has_stack, tracefile_has_registers)
5966 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5967 tracefile_target methods.
5968 (init_tracefile_ops): Delete.
5969 (tracefile_target::tracefile_target): New.
5970 * tracefile.h: Include "target.h".
5971 (tracefile_target): New class.
5972 (init_tracefile_ops): Delete.
5974 * spu-multiarch.c (spu_multiarch_target): New class.
5975 (spu_ops): Now a spu_multiarch_target.
5976 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5977 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5978 (spu_search_memory, spu_mourn_inferior): Refactor as
5979 spu_multiarch_target methods.
5980 (init_spu_ops): Delete.
5981 (_initialize_spu_multiarch): Remove references to init_spu_ops,
5982 complete_target_initialization.
5984 * ravenscar-thread.c (ravenscar_thread_target): New class.
5985 (ravenscar_ops): Now a ravenscar_thread_target.
5986 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5987 (ravenscar_thread_alive, ravenscar_pid_to_str)
5988 (ravenscar_fetch_registers, ravenscar_store_registers)
5989 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5990 (ravenscar_stopped_by_hw_breakpoint)
5991 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5992 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5993 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5995 (init_ravenscar_thread_ops): Delete.
5996 (_initialize_ravenscar): Remove references to
5997 init_ravenscar_thread_ops and complete_target_initialization.
5999 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6000 (bsd_uthread_target): New class.
6001 (bsd_uthread_ops): Now a bsd_uthread_target.
6002 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6003 (bsd_uthread_close, bsd_uthread_mourn_inferior)
6004 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6005 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6006 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6007 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6008 (bsd_uthread_target): Delete function.
6009 (_initialize_bsd_uthread): Remove reference to
6010 complete_target_initialization.
6012 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
6013 (target_bfd): ... this new class.
6014 (target_bfd_xfer_partial, target_bfd_get_section_table)
6015 (target_bfd_close): Refactor as target_bfd methods.
6016 (target_bfd::~target_bfd): New.
6017 (target_bfd_reopen): Adjust.
6018 (target_bfd::close): New.
6020 * record-btrace.c (record_btrace_target): New class.
6021 (record_btrace_ops): Now a record_btrace_target.
6022 (record_btrace_open, record_btrace_stop_recording)
6023 (record_btrace_disconnect, record_btrace_close)
6024 (record_btrace_async, record_btrace_info)
6025 (record_btrace_insn_history, record_btrace_insn_history_range)
6026 (record_btrace_insn_history_from, record_btrace_call_history)
6027 (record_btrace_call_history_range)
6028 (record_btrace_call_history_from, record_btrace_record_method)
6029 (record_btrace_is_replaying, record_btrace_will_replay)
6030 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6031 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6032 (record_btrace_store_registers, record_btrace_prepare_to_store)
6033 (record_btrace_to_get_unwinder)
6034 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6035 (record_btrace_commit_resume, record_btrace_wait)
6036 (record_btrace_stop, record_btrace_can_execute_reverse)
6037 (record_btrace_stopped_by_sw_breakpoint)
6038 (record_btrace_supports_stopped_by_sw_breakpoint)
6039 (record_btrace_stopped_by_hw_breakpoint)
6040 (record_btrace_supports_stopped_by_hw_breakpoint)
6041 (record_btrace_update_thread_list, record_btrace_thread_alive)
6042 (record_btrace_goto_begin, record_btrace_goto_end)
6043 (record_btrace_goto, record_btrace_stop_replaying_all)
6044 (record_btrace_execution_direction)
6045 (record_btrace_prepare_to_generate_core)
6046 (record_btrace_done_generating_core): Refactor as
6047 record_btrace_target methods.
6048 (init_record_btrace_ops): Delete.
6049 (_initialize_record_btrace): Remove reference to
6050 init_record_btrace_ops.
6051 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6052 the execution_direction global.
6053 (record_full_base_target, record_full_target)
6054 (record_full_core_target): New classes.
6055 (record_full_ops): Now a record_full_target.
6056 (record_full_core_ops): Now a record_full_core_target.
6057 (record_full_target::detach, record_full_target::disconnect)
6058 (record_full_core_target::disconnect)
6059 (record_full_target::mourn_inferior, record_full_target::kill):
6061 (record_full_open, record_full_close, record_full_async): Refactor
6062 as methods of the record_full_base_target class.
6063 (record_full_resume, record_full_commit_resume): Refactor
6064 as methods of the record_full_target class.
6065 (record_full_wait, record_full_stopped_by_watchpoint)
6066 (record_full_stopped_data_address)
6067 (record_full_stopped_by_sw_breakpoint)
6068 (record_full_supports_stopped_by_sw_breakpoint)
6069 (record_full_stopped_by_hw_breakpoint)
6070 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6071 methods of the record_full_base_target class.
6072 (record_full_store_registers, record_full_xfer_partial)
6073 (record_full_insert_breakpoint, record_full_remove_breakpoint):
6074 Refactor as methods of the record_full_target class.
6075 (record_full_can_execute_reverse, record_full_get_bookmark)
6076 (record_full_goto_bookmark, record_full_execution_direction)
6077 (record_full_record_method, record_full_info, record_full_delete)
6078 (record_full_is_replaying, record_full_will_replay)
6079 (record_full_goto_begin, record_full_goto_end, record_full_goto)
6080 (record_full_stop_replaying): Refactor as methods of the
6081 record_full_base_target class.
6082 (record_full_core_resume, record_full_core_kill)
6083 (record_full_core_fetch_registers)
6084 (record_full_core_prepare_to_store)
6085 (record_full_core_store_registers, record_full_core_xfer_partial)
6086 (record_full_core_insert_breakpoint)
6087 (record_full_core_remove_breakpoint)
6088 (record_full_core_has_execution): Refactor
6089 as methods of the record_full_core_target class.
6090 (record_full_base_target::supports_delete_record): New.
6091 (init_record_full_ops): Delete.
6092 (init_record_full_core_ops): Delete.
6093 (record_full_save): Refactor as method of the
6094 record_full_base_target class.
6095 (_initialize_record_full): Remove references to
6096 init_record_full_ops and init_record_full_core_ops.
6098 * remote.c (remote_target, extended_remote_target): New classes.
6099 (remote_ops): Now a remote_target.
6100 (extended_remote_ops): Now an extended_remote_target.
6101 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6102 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6103 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6104 (remote_pass_signals, remote_set_syscall_catchpoint)
6105 (remote_program_signals, )
6106 (remote_thread_always_alive): Remove target_ops parameter.
6107 (remote_thread_alive, remote_thread_name)
6108 (remote_update_thread_list, remote_threads_extra_info)
6109 (remote_static_tracepoint_marker_at)
6110 (remote_static_tracepoint_markers_by_strid)
6111 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6112 (remote_open): Refactor as methods of remote_target.
6113 (extended_remote_open, extended_remote_detach)
6114 (extended_remote_attach, extended_remote_post_attach):
6115 (extended_remote_supports_disable_randomization)
6116 (extended_remote_create_inferior): : Refactor as method of
6117 extended_remote_target.
6118 (remote_set_permissions, remote_open_1, remote_detach)
6119 (remote_follow_fork, remote_follow_exec, remote_disconnect)
6120 (remote_resume, remote_commit_resume, remote_stop)
6121 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6122 (remote_terminal_ours, remote_wait, remote_fetch_registers)
6123 (remote_prepare_to_store, remote_store_registers)
6124 (remote_flash_erase, remote_flash_done, remote_files_info)
6125 (remote_kill, remote_mourn, remote_insert_breakpoint)
6126 (remote_remove_breakpoint, remote_insert_watchpoint)
6127 (remote_watchpoint_addr_within_range)
6128 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6129 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6130 (remote_supports_stopped_by_sw_breakpoint)
6131 (remote_stopped_by_hw_breakpoint)
6132 (remote_supports_stopped_by_hw_breakpoint)
6133 (remote_stopped_by_watchpoint, remote_stopped_data_address)
6134 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6135 (remote_verify_memory): Refactor as methods of remote_target.
6136 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6138 (remote_xfer_partial, remote_get_memory_xfer_limit)
6139 (remote_search_memory, remote_rcmd, remote_memory_map)
6140 (remote_pid_to_str, remote_get_thread_local_address)
6141 (remote_get_tib_address, remote_read_description): Refactor as
6142 methods of remote_target.
6143 (remote_target::fileio_open, remote_target::fileio_pwrite)
6144 (remote_target::fileio_pread, remote_target::fileio_close): New.
6145 (remote_hostio_readlink, remote_hostio_fstat)
6146 (remote_filesystem_is_local, remote_can_execute_reverse)
6147 (remote_supports_non_stop, remote_supports_disable_randomization)
6148 (remote_supports_multi_process, remote_supports_cond_breakpoints)
6149 (remote_supports_enable_disable_tracepoint)
6150 (remote_supports_string_tracing)
6151 (remote_can_run_breakpoint_commands, remote_trace_init)
6152 (remote_download_tracepoint, remote_can_download_tracepoint)
6153 (remote_download_trace_state_variable, remote_enable_tracepoint)
6154 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6155 (remote_trace_start, remote_get_trace_status)
6156 (remote_get_tracepoint_status, remote_trace_stop)
6157 (remote_trace_find, remote_get_trace_state_variable_value)
6158 (remote_save_trace_data, remote_get_raw_trace_data)
6159 (remote_set_disconnected_tracing, remote_core_of_thread)
6160 (remote_set_circular_trace_buffer, remote_traceframe_info)
6161 (remote_get_min_fast_tracepoint_insn_len)
6162 (remote_set_trace_buffer_size, remote_set_trace_notes)
6163 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6164 (remote_disable_btrace, remote_teardown_btrace)
6165 (remote_read_btrace, remote_btrace_conf)
6166 (remote_augmented_libraries_svr4_read, remote_load)
6167 (remote_pid_to_exec_file, remote_can_do_single_step)
6168 (remote_execution_direction, remote_thread_handle_to_thread_info):
6169 Refactor as methods of remote_target.
6170 (init_remote_ops, init_extended_remote_ops): Delete.
6171 (remote_can_async_p, remote_is_async_p, remote_async)
6172 (remote_thread_events, remote_upload_tracepoints)
6173 (remote_upload_trace_state_variables): Refactor as methods of
6175 (_initialize_remote): Remove references to init_remote_ops and
6176 init_extended_remote_ops.
6178 * remote-sim.c (gdbsim_target): New class.
6179 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6180 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6181 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6182 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6183 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6184 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6185 Refactor as methods of gdbsim_target.
6186 (gdbsim_ops): Now a gdbsim_target.
6187 (init_gdbsim_ops): Delete.
6188 (gdbsim_cntrl_c): Adjust.
6189 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6191 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6192 (the_amd64_linux_nat_target): New.
6193 (amd64_linux_fetch_inferior_registers)
6194 (amd64_linux_store_inferior_registers): Refactor as methods of
6195 amd64_linux_nat_target.
6196 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
6197 * i386-linux-nat.c: Don't include "linux-nat.h".
6198 (i386_linux_nat_target): New class.
6199 (the_i386_linux_nat_target): New.
6200 (i386_linux_fetch_inferior_registers)
6201 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6202 as methods of i386_linux_nat_target.
6203 (_initialize_i386_linux_nat): Adjust. Set linux_target.
6204 * inf-child.c (inf_child_ops): Delete.
6205 (inf_child_fetch_inferior_registers)
6206 (inf_child_store_inferior_registers): Delete.
6207 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6208 methods of inf_child_target.
6209 (inf_child_target::supports_terminal_ours)
6210 (inf_child_target::terminal_init)
6211 (inf_child_target::terminal_inferior)
6212 (inf_child_target::terminal_ours_for_output)
6213 (inf_child_target::terminal_ours, inf_child_target::interrupt)
6214 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6216 (inf_child_open, inf_child_disconnect, inf_child_close)
6217 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6218 (inf_child_post_startup_inferior, inf_child_can_run)
6219 (inf_child_pid_to_exec_file): Refactor as methods of
6221 (inf_child_follow_fork): Delete.
6222 (inf_child_target::can_create_inferior)
6223 (inf_child_target::can_attach): New.
6224 (inf_child_target::has_all_memory, inf_child_target::has_memory)
6225 (inf_child_target::has_stack, inf_child_target::has_registers)
6226 (inf_child_target::has_execution): New.
6227 (inf_child_fileio_open, inf_child_fileio_pwrite)
6228 (inf_child_fileio_pread, inf_child_fileio_fstat)
6229 (inf_child_fileio_close, inf_child_fileio_unlink)
6230 (inf_child_fileio_readlink, inf_child_use_agent)
6231 (inf_child_can_use_agent): Refactor as methods of
6233 (return_zero, inf_child_target): Delete.
6234 (inf_child_target::inf_child_target): New.
6235 * inf-child.h: Include "target.h".
6236 (inf_child_target): Delete function prototype.
6237 (inf_child_target): New class.
6238 (inf_child_open_target, inf_child_mourn_inferior)
6239 (inf_child_maybe_unpush_target): Delete.
6240 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6241 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6242 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
6243 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
6244 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
6245 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
6246 (inf_ptrace_wait, inf_ptrace_xfer_partial)
6247 (inf_ptrace_thread_alive, inf_ptrace_files_info)
6248 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
6249 methods of inf_ptrace_target.
6250 (inf_ptrace_target): Delete function.
6251 * inf-ptrace.h: Include "inf-child.h".
6252 (inf_ptrace_target): Delete function declaration.
6253 (inf_ptrace_target): New class.
6254 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6255 * linux-nat.c (linux_target): New.
6256 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6257 (linux_nat_target::~linux_nat_target): New.
6258 (linux_child_post_attach, linux_child_post_startup_inferior)
6259 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
6260 (linux_child_remove_fork_catchpoint)
6261 (linux_child_insert_vfork_catchpoint)
6262 (linux_child_remove_vfork_catchpoint)
6263 (linux_child_insert_exec_catchpoint)
6264 (linux_child_remove_exec_catchpoint)
6265 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
6266 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
6267 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
6268 (linux_nat_stopped_data_address)
6269 (linux_nat_stopped_by_sw_breakpoint)
6270 (linux_nat_supports_stopped_by_sw_breakpoint)
6271 (linux_nat_stopped_by_hw_breakpoint)
6272 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
6273 (linux_nat_kill, linux_nat_mourn_inferior)
6274 (linux_nat_xfer_partial, linux_nat_thread_alive)
6275 (linux_nat_update_thread_list, linux_nat_pid_to_str)
6276 (linux_nat_thread_name, linux_child_pid_to_exec_file)
6277 (linux_child_static_tracepoint_markers_by_strid)
6278 (linux_nat_is_async_p, linux_nat_can_async_p)
6279 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6280 (linux_nat_supports_multi_process)
6281 (linux_nat_supports_disable_randomization, linux_nat_async)
6282 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6283 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6284 (linux_nat_fileio_open, linux_nat_fileio_readlink)
6285 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6286 methods of linux_nat_target.
6287 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6288 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6290 (check_stopped_by_watchpoint): Adjust.
6291 (linux_xfer_partial): Delete.
6292 (linux_target_install_ops, linux_target, linux_nat_add_target):
6294 (linux_nat_target::linux_nat_target): New.
6295 * linux-nat.h: Include "inf-ptrace.h".
6296 (linux_nat_target): New.
6297 (linux_target, linux_target_install_ops, linux_nat_add_target):
6298 Delete function declarations.
6299 (linux_target): Declare global.
6300 * linux-thread-db.c (thread_db_target): New.
6301 (thread_db_target::thread_db_target): New.
6302 (thread_db_ops): Delete.
6303 (the_thread_db_target): New.
6304 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6305 (thread_db_update_thread_list, thread_db_pid_to_str)
6306 (thread_db_extra_thread_info)
6307 (thread_db_thread_handle_to_thread_info)
6308 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6309 (thread_db_resume): Refactor as methods of thread_db_target.
6310 (init_thread_db_ops): Delete.
6311 (_initialize_thread_db): Remove reference to init_thread_db_ops.
6312 * x86-linux-nat.c: Don't include "linux-nat.h".
6313 (super_post_startup_inferior): Delete.
6314 (x86_linux_nat_target::~x86_linux_nat_target): New.
6315 (x86_linux_child_post_startup_inferior)
6316 (x86_linux_read_description, x86_linux_enable_btrace)
6317 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6318 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6319 methods of x86_linux_nat_target.
6320 (x86_linux_create_target): Delete. Bits folded ...
6321 (x86_linux_add_target): ... here. Now takes a linux_nat_target
6323 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6324 (x86_linux_nat_target): New class.
6325 (x86_linux_create_target): Delete.
6326 (x86_linux_add_target): Now takes a linux_nat_target pointer.
6327 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6328 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6329 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6330 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6331 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6333 (x86_use_watchpoints): Delete.
6334 * x86-nat.h: Include "breakpoint.h" and "target.h".
6335 (x86_use_watchpoints): Delete.
6336 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6337 (x86_stopped_by_watchpoint, x86_stopped_data_address)
6338 (x86_insert_watchpoint, x86_remove_watchpoint)
6339 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6340 (x86_stopped_by_hw_breakpoint): New declarations.
6341 (x86_nat_target): New template class.
6343 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6344 (the_ppc_linux_nat_target): New.
6345 (ppc_linux_fetch_inferior_registers)
6346 (ppc_linux_can_use_hw_breakpoint)
6347 (ppc_linux_region_ok_for_hw_watchpoint)
6348 (ppc_linux_ranged_break_num_registers)
6349 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6350 (ppc_linux_insert_mask_watchpoint)
6351 (ppc_linux_remove_mask_watchpoint)
6352 (ppc_linux_can_accel_watchpoint_condition)
6353 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6354 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6355 (ppc_linux_watchpoint_addr_within_range)
6356 (ppc_linux_masked_watch_num_registers)
6357 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6358 (ppc_linux_read_description): Refactor as methods of
6359 ppc_linux_nat_target.
6360 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
6362 * procfs.c (procfs_xfer_partial): Delete forward declaration.
6363 (procfs_target): New class.
6364 (the_procfs_target): New.
6365 (procfs_target): Delete function.
6366 (procfs_auxv_parse, procfs_attach, procfs_detach)
6367 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6368 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6369 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6370 (procfs_create_inferior, procfs_update_thread_list)
6371 (procfs_thread_alive, procfs_pid_to_str)
6372 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6373 (procfs_stopped_data_address, procfs_insert_watchpoint)
6374 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6375 (proc_find_memory_regions, procfs_info_proc)
6376 (procfs_make_note_section): Refactor as methods of procfs_target.
6377 (_initialize_procfs): Adjust.
6378 * sol-thread.c (sol_thread_target): New class.
6379 (sol_thread_ops): Now a sol_thread_target.
6380 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6381 (sol_thread_fetch_registers, sol_thread_store_registers)
6382 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6383 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6384 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6385 (init_sol_thread_ops): Delete.
6386 (_initialize_sol_thread): Adjust. Remove references to
6387 init_sol_thread_ops and complete_target_initialization.
6389 * windows-nat.c (windows_nat_target): New class.
6390 (windows_fetch_inferior_registers)
6391 (windows_store_inferior_registers, windows_resume, windows_wait)
6392 (windows_attach, windows_detach, windows_pid_to_exec_file)
6393 (windows_files_info, windows_create_inferior)
6394 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6395 (windows_close, windows_pid_to_str, windows_xfer_partial)
6396 (windows_get_tib_address, windows_get_ada_task_ptid)
6397 (windows_thread_name, windows_thread_alive): Refactor as
6398 windows_nat_target methods.
6399 (do_initial_windows_stuff): Adjust.
6400 (windows_target): Delete function.
6401 (_initialize_windows_nat): Adjust.
6403 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6404 (darwin_mourn_inferior, darwin_kill_inferior)
6405 (darwin_create_inferior, darwin_attach, darwin_detach)
6406 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6407 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6408 (darwin_supports_multi_process): Refactor as darwin_nat_target
6410 (darwin_resume_to, darwin_files_info): Delete.
6411 (_initialize_darwin_inferior): Rename to ...
6412 (_initialize_darwin_nat): ... this. Adjust to C++ification.
6413 * darwin-nat.h: Include "inf-child.h".
6414 (darwin_nat_target): New class.
6415 (darwin_complete_target): Delete.
6416 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6417 (darwin_target): New.
6418 (i386_darwin_fetch_inferior_registers)
6419 (i386_darwin_store_inferior_registers): Refactor as methods of
6421 (darwin_complete_target): Delete, with ...
6422 (_initialize_i386_darwin_nat): ... bits factored out here.
6424 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6425 (the_alpha_linux_nat_target): New.
6426 (alpha_linux_register_u_offset): Refactor as
6427 alpha_linux_nat_target method.
6428 (_initialize_alpha_linux_nat): Adjust.
6429 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6430 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6431 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6432 methods of linux_nat_trad_target.
6433 (linux_trad_target): Delete.
6434 * linux-nat-trad.h (linux_trad_target): Delete function.
6435 (linux_nat_trad_target): New class.
6436 * mips-linux-nat.c (mips_linux_nat_target): New class.
6437 (super_fetch_registers, super_store_registers, super_close):
6439 (the_mips_linux_nat_target): New.
6440 (mips64_linux_regsets_fetch_registers)
6441 (mips64_linux_regsets_store_registers)
6442 (mips64_linux_fetch_registers, mips64_linux_store_registers)
6443 (mips_linux_register_u_offset, mips_linux_read_description)
6444 (mips_linux_can_use_hw_breakpoint)
6445 (mips_linux_stopped_by_watchpoint)
6446 (mips_linux_stopped_data_address)
6447 (mips_linux_region_ok_for_hw_watchpoint)
6448 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6449 (mips_linux_close): Refactor as methods of mips_linux_nat.
6450 (_initialize_mips_linux_nat): Adjust to C++ification.
6452 * aix-thread.c (aix_thread_target): New class.
6453 (aix_thread_ops): Now an aix_thread_target.
6454 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6455 (aix_thread_fetch_registers, aix_thread_store_registers)
6456 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6457 (aix_thread_thread_alive, aix_thread_pid_to_str)
6458 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6459 Refactor as methods of aix_thread_target.
6460 (init_aix_thread_ops): Delete.
6461 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6462 and complete_target_initialization.
6463 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6464 (rs6000_nat_target): New class.
6465 (the_rs6000_nat_target): New.
6466 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6467 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6468 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6469 (super_create_inferior): Delete.
6470 (_initialize_rs6000_nat): Adjust to C++ification.
6472 * arm-linux-nat.c (arm_linux_nat_target): New class.
6473 (the_arm_linux_nat_target): New.
6474 (arm_linux_fetch_inferior_registers)
6475 (arm_linux_store_inferior_registers, arm_linux_read_description)
6476 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6477 (arm_linux_remove_hw_breakpoint)
6478 (arm_linux_region_ok_for_hw_watchpoint)
6479 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6480 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6481 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6482 arm_linux_nat_target.
6483 (_initialize_arm_linux_nat): Adjust to C++ification.
6485 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6486 (the_aarch64_linux_nat_target): New.
6487 (aarch64_linux_fetch_inferior_registers)
6488 (aarch64_linux_store_inferior_registers)
6489 (aarch64_linux_child_post_startup_inferior)
6490 (aarch64_linux_read_description)
6491 (aarch64_linux_can_use_hw_breakpoint)
6492 (aarch64_linux_insert_hw_breakpoint)
6493 (aarch64_linux_remove_hw_breakpoint)
6494 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6495 (aarch64_linux_region_ok_for_hw_watchpoint)
6496 (aarch64_linux_stopped_data_address)
6497 (aarch64_linux_stopped_by_watchpoint)
6498 (aarch64_linux_watchpoint_addr_within_range)
6499 (aarch64_linux_can_do_single_step): Refactor as methods of
6500 aarch64_linux_nat_target.
6501 (super_post_startup_inferior): Delete.
6502 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6504 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6505 (the_hppa_linux_nat_target): New.
6506 (hppa_linux_fetch_inferior_registers)
6507 (hppa_linux_store_inferior_registers): Refactor as methods of
6508 hppa_linux_nat_target.
6509 (_initialize_hppa_linux_nat): Adjust to C++ification.
6511 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6512 (the_ia64_linux_nat_target): New.
6513 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6514 (ia64_linux_stopped_data_address)
6515 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6516 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6517 ia64_linux_nat_target methods.
6518 (super_xfer_partial): Delete.
6519 (_initialize_ia64_linux_nat): Adjust to C++ification.
6521 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6522 (the_m32r_linux_nat_target): New.
6523 (m32r_linux_fetch_inferior_registers)
6524 (m32r_linux_store_inferior_registers): Refactor as
6525 m32r_linux_nat_target methods.
6526 (_initialize_m32r_linux_nat): Adjust to C++ification.
6528 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6529 (the_m68k_linux_nat_target): New.
6530 (m68k_linux_fetch_inferior_registers)
6531 (m68k_linux_store_inferior_registers): Refactor as
6532 m68k_linux_nat_target methods.
6533 (_initialize_m68k_linux_nat): Adjust to C++ification.
6535 * s390-linux-nat.c (s390_linux_nat_target): New class.
6536 (the_s390_linux_nat_target): New.
6537 (s390_linux_fetch_inferior_registers)
6538 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6539 (s390_insert_watchpoint, s390_remove_watchpoint)
6540 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6541 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6542 (s390_auxv_parse, s390_read_description): Refactor as methods of
6543 s390_linux_nat_target.
6544 (_initialize_s390_nat): Adjust to C++ification.
6546 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6547 (the_sparc_linux_nat_target): New.
6548 (_initialize_sparc_linux_nat): Adjust to C++ification.
6549 * sparc-nat.c (sparc_fetch_inferior_registers)
6550 (sparc_store_inferior_registers): Remove target_ops parameter.
6551 * sparc-nat.h (sparc_fetch_inferior_registers)
6552 (sparc_store_inferior_registers): Remove target_ops parameter.
6553 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6554 (the_sparc64_linux_nat_target): New.
6555 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6557 * spu-linux-nat.c (spu_linux_nat_target): New class.
6558 (the_spu_linux_nat_target): New.
6559 (spu_child_post_startup_inferior, spu_child_post_attach)
6560 (spu_child_wait, spu_fetch_inferior_registers)
6561 (spu_store_inferior_registers, spu_xfer_partial)
6562 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6564 (_initialize_spu_nat): Adjust to C++ification.
6566 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6567 (the_tilegx_linux_nat_target): New.
6568 (fetch_inferior_registers, store_inferior_registers):
6569 Refactor as methods.
6570 (_initialize_tile_linux_nat): Adjust to C++ification.
6572 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6573 (the_xtensa_linux_nat_target): New.
6574 (xtensa_linux_fetch_inferior_registers)
6575 (xtensa_linux_store_inferior_registers): Refactor as
6576 xtensa_linux_nat_target methods.
6577 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6579 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6580 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6581 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6582 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6583 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6584 (fbsd_stopped_by_sw_breakpoint)
6585 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6586 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6587 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6588 (fbsd_post_startup_inferior, fbsd_post_attach)
6589 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6590 (fbsd_set_syscall_catchpoint)
6591 (super_xfer_partial, super_resume, super_wait)
6592 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6593 (fbsd_handle_debug_trap): Remove target_ops parameter.
6594 (fbsd_nat_add_target): Delete.
6595 * fbsd-nat.h: Include "inf-ptrace.h".
6596 (fbsd_nat_add_target): Delete.
6597 (USE_SIGTRAP_SIGINFO): Define.
6598 (fbsd_nat_target): New class.
6600 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6601 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6602 (amd64bsd_target): Delete.
6603 * amd64-bsd-nat.h: New file.
6604 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6606 (amd64_fbsd_nat_target): New class.
6607 (the_amd64_fbsd_nat_target): New.
6608 (amd64fbsd_read_description): Refactor as method of
6609 amd64_fbsd_nat_target.
6610 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6611 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6612 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6613 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6614 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6615 (i386bsd_target): Delete.
6616 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6617 (i386bsd_fetch_inferior_registers)
6618 (i386bsd_store_inferior_registers): Declare.
6619 (i386_bsd_nat_target): New class.
6620 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6621 (the_i386_fbsd_nat_target): New.
6622 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6623 i386_fbsd_nat_target methods.
6624 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6625 (_initialize_i386fbsd_nat): Adjust to C++ification.
6626 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6627 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6628 (_initialize_x86_bsd_nat): Adjust to C++ification.
6629 * x86-bsd-nat.h: Include "x86-nat.h".
6630 (x86bsd_target): Delete declaration.
6631 (x86bsd_nat_target): New class.
6633 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6634 (the_aarch64_fbsd_nat_target): New.
6635 (aarch64_fbsd_fetch_inferior_registers)
6636 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6637 aarch64_fbsd_nat_target.
6638 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6639 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6640 (the_alpha_bsd_nat_target): New.
6641 (alphabsd_fetch_inferior_registers)
6642 (alphabsd_store_inferior_registers): Refactor as
6643 alpha_bsd_nat_target methods.
6644 (_initialize_alphabsd_nat): Refactor as methods of
6645 alpha_bsd_nat_target.
6646 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6647 (the_amd64_nbsd_nat_target): New.
6648 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6649 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6650 (the_amd64_obsd_nat_target): New.
6651 (_initialize_amd64obsd_nat): Adjust to C++ification.
6652 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6653 (the_arm_fbsd_nat_target): New.
6654 (arm_fbsd_fetch_inferior_registers)
6655 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6656 (_initialize_arm_fbsd_nat): Refactor as methods of
6657 arm_fbsd_nat_target.
6658 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6659 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6660 (the_arm_netbsd_nat_target): New.
6661 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6662 arm_netbsd_nat_target.
6663 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6664 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6665 (the_hppa_nbsd_nat_target): New.
6666 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6667 hppa_nbsd_nat_target methods.
6668 (_initialize_hppanbsd_nat): Adjust to C++ification.
6669 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6670 (the_hppa_obsd_nat_target): New.
6671 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6672 methods of hppa_obsd_nat_target.
6673 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6675 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6676 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6678 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6679 (_initialize_i386obsd_nat): Use add_target.
6680 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6681 (the_m68k_bsd_nat_target): New.
6682 (m68kbsd_fetch_inferior_registers)
6683 (m68kbsd_store_inferior_registers): Refactor as methods of
6684 m68k_bsd_nat_target.
6685 (_initialize_m68kbsd_nat): Adjust to C++ification.
6686 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6687 (the_mips_fbsd_nat_target): New.
6688 (mips_fbsd_fetch_inferior_registers)
6689 (mips_fbsd_store_inferior_registers): Refactor as methods of
6690 mips_fbsd_nat_target.
6691 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6693 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6694 (the_mips_nbsd_nat_target): New.
6695 (mipsnbsd_fetch_inferior_registers)
6696 (mipsnbsd_store_inferior_registers): Refactor as methods of
6697 mips_nbsd_nat_target.
6698 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6699 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6700 (the_mips64_obsd_nat_target): New.
6701 (mips64obsd_fetch_inferior_registers)
6702 (mips64obsd_store_inferior_registers): Refactor as methods of
6703 mips64_obsd_nat_target.
6704 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6706 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6708 * nbsd-nat.h: Include "inf-ptrace.h".
6709 (nbsd_nat_target): New class.
6710 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6711 (obsd_wait): Refactor as methods of obsd_nat_target.
6712 (obsd_add_target): Delete.
6713 * obsd-nat.h: Include "inf-ptrace.h".
6714 (obsd_nat_target): New class.
6715 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6716 (the_ppc_fbsd_nat_target): New.
6717 (ppcfbsd_fetch_inferior_registers)
6718 (ppcfbsd_store_inferior_registers): Refactor as methods of
6719 ppc_fbsd_nat_target.
6720 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6722 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6723 (the_ppc_nbsd_nat_target): New.
6724 (ppcnbsd_fetch_inferior_registers)
6725 (ppcnbsd_store_inferior_registers): Refactor as methods of
6726 ppc_nbsd_nat_target.
6727 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6728 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6729 (the_ppc_obsd_nat_target): New.
6730 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6731 methods of ppc_obsd_nat_target.
6732 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6734 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6735 (the_sh_nbsd_nat_target): New.
6736 (shnbsd_fetch_inferior_registers)
6737 (shnbsd_store_inferior_registers): Refactor as methods of
6739 (_initialize_shnbsd_nat): Adjust to C++ification.
6740 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6741 (inf_ptrace_xfer_partial): Delete.
6742 (sparc_xfer_partial, sparc_target): Delete.
6743 * sparc-nat.h (sparc_fetch_inferior_registers)
6744 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6745 (sparc_target): Delete function declaration.
6746 (sparc_target): New template class.
6747 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6748 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6749 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6750 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6752 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6753 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6754 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6755 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6757 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6758 (the_vax_bsd_nat_target): New.
6759 (vaxbsd_fetch_inferior_registers)
6760 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6762 (_initialize_vaxbsd_nat): Adjust to C++ification.
6764 * bsd-kvm.c (bsd_kvm_target): New class.
6765 (bsd_kvm_ops): Now a bsd_kvm_target.
6766 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6767 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6768 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6770 (bsd_kvm_return_one): Delete.
6771 (bsd_kvm_add_target): Adjust to C++ification.
6773 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6774 (nto_procfs_target_procfs): New classes.
6775 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6776 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6777 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6778 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6779 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6780 (procfs_remove_hw_breakpoint, procfs_resume)
6781 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6782 (procfs_kill_inferior, procfs_store_registers)
6783 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6784 as methods of nto_procfs_target.
6785 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6786 (nto_native_ops): Delete.
6787 (procfs_open, procfs_native_open): Delete.
6788 (nto_native_ops): Now an nto_procfs_target_native.
6789 (init_procfs_targets): Adjust to C++ification.
6790 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6791 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6792 Refactor as methods of nto_procfs_target.
6794 * go32-nat.c (go32_nat_target): New class.
6795 (the_go32_nat_target): New.
6796 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6797 (go32_store_registers, go32_xfer_partial, go32_files_info)
6798 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6799 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6800 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6801 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6802 (go32_target): Delete.
6803 (_initialize_go32_nat): Adjust to C++ification.
6805 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6806 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6807 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6808 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6810 (gnu_target): Delete.
6811 * gnu-nat.h (gnu_target): Delete.
6812 (gnu_nat_target): New class.
6813 * i386-gnu-nat.c (gnu_base_target): New.
6814 (i386_gnu_nat_target): New class.
6815 (the_i386_gnu_nat_target): New.
6816 (_initialize_i386gnu_nat): Adjust to C++ification.
6818 2018-05-02 Pedro Alves <palves@redhat.com>
6820 * bfd-target.c (target_bfd_xclose): Rename to ...
6821 (target_bfd_close): ... this.
6822 (target_bfd_reopen): Adjust.
6823 * target.c (target_close): Remove references to to_xclose.
6824 * target.h (target_ops::to_xclose): Delete.
6825 (target_ops::to_close): Update comments.
6827 2018-05-02 Pedro Alves <palves@redhat.com>
6829 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6831 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6832 * inf-ptrace.c (inf_ptrace_register_u_offset)
6833 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6834 (inf_ptrace_store_register, inf_ptrace_store_registers)
6835 (inf_ptrace_trad_target): Move to ...
6836 * linux-nat-trad.c: ... this new file.
6837 * linux-nat-trad.h: New file.
6838 * linux-nat.c (linux_target_install_ops): Make extern.
6839 (linux_trad_target): Delete.
6840 * linux-nat.h (linux_trad_target): Delete declaration.
6841 (linux_target_install_ops): Declare.
6842 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6845 2018-05-02 Pedro Alves <palves@redhat.com>
6847 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6848 procfs_target/add_target here.
6849 * procfs.c (procfs_target): Make static.
6850 (_initialize_procfs): Call add_target here.
6851 * procfs.h (struct target_ops): Remove forward declaration.
6852 (procfs_target): Remove declaration.
6853 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6855 2018-05-02 Pedro Alves <palves@redhat.com>
6857 * procfs.c (procfs_stopped_by_watchpoint)
6858 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6859 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6861 (procfs_use_watchpoints): Delete, move contents...
6862 (procfs_target): ... here.
6863 * procfs.h (procfs_use_watchpoints): Delete declaration.
6864 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6865 procfs_use_watchpoints.
6866 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6867 procfs_use_watchpoints.
6869 2018-05-02 Tom Tromey <tom@tromey.com>
6872 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6873 and var_zuinteger_unlimited.
6874 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6875 and PARAM_ZUINTEGER_UNLIMITED.
6876 (set_parameter_value): Handle var_zuinteger and
6877 var_zuinteger_unlimited.
6878 (add_setshow_generic): Likewise.
6879 (parmpy_init): Likewise.
6881 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6884 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6885 pointer is not null before dereferencing it.
6887 2018-04-30 Tom Tromey <tom@tromey.com>
6889 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6892 2018-04-30 Tom Tromey <tom@tromey.com>
6894 * breakpoint.c (mention): Remove use of is_mi_like_p.
6895 (print_mention_ranged_breakpoint): Likewise.
6896 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6899 2018-04-30 Tom Tromey <tom@tromey.com>
6901 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6903 2018-04-30 Tom Tromey <tom@tromey.com>
6905 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6906 (info_spu_event_command): Remove some uses of is_mi_like_p.
6908 2018-04-30 Tom Tromey <tom@tromey.com>
6910 * python/py-framefilter.c (py_print_single_arg)
6911 (enumerate_locals, py_print_args, py_print_frame): Remove some
6912 uses of is_mi_like_p.
6914 2018-04-30 Tom Tromey <tom@tromey.com>
6917 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6918 * ui-out.h (ui_out::is_mi_like_p): Now const.
6919 (ui_out::do_is_mi_like_p): Now const.
6920 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6922 2018-04-30 Tom Tromey <tom@tromey.com>
6924 * varobj.c (varobj_set_visualizer): Use new_reference.
6925 * python/python.c (gdbpy_decode_line): Use new_reference.
6926 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6929 2018-04-30 Tom Tromey <tom@tromey.com>
6931 * varobj.c (install_new_value): Use new_reference.
6932 * value.h (value_incref): Return void. Swap intro comment with
6934 * value.c (set_value_parent): Use new_reference.
6935 (value_incref): Return void. Update intro comment.
6936 (release_value): Use new_reference.
6937 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6939 2018-04-30 Tom Tromey <tom@tromey.com>
6941 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6942 * gdb_bfd.h (new_bfd_ref): Remove.
6943 (gdb_bfd_open): Update comment.
6944 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6945 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6946 (gdb_bfd_fdopenr): Use new_reference.
6947 * exec.c (exec_file_attach): Use new_reference.
6949 2018-04-30 Tom Tromey <tom@tromey.com>
6951 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6954 2018-04-30 Tom Tromey <tom@tromey.com>
6956 * jit.c (jit_read_code_entry): Use type_align.
6957 * i386-tdep.c (i386_gdbarch_init): Don't call
6958 set_gdbarch_long_long_align_bit.
6959 * gdbarch.sh: Remove long_long_align_bit.
6960 * gdbarch.c, gdbarch.h: Rebuild.
6961 * arc-tdep.c (arc_type_align): New function.
6962 (arc_gdbarch_init): Use arc_type_align. Don't call
6963 set_gdbarch_long_long_align_bit.
6965 2018-04-30 Tom Tromey <tom@tromey.com>
6967 * rust-lang.c (rust_type_alignment): Remove.
6968 (rust_composite_type): Use type_align.
6970 2018-04-30 Tom Tromey <tom@tromey.com>
6972 * NEWS: Mention Type.align.
6973 * python/py-type.c (typy_get_alignof): New function.
6974 (type_object_getset): Add "alignof".
6976 2018-04-30 Tom Tromey <tom@tromey.com>
6980 * std-operator.def (UNOP_ALIGNOF): New operator.
6981 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6983 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6984 * c-lang.c (c_op_print_tab): Add alignof.
6985 * c-exp.y (ALIGNOF): New token.
6986 (exp): Add "ALIGNOF" production.
6987 (ident_tokens): Add _Alignof and alignof.
6989 2018-04-30 Tom Tromey <tom@tromey.com>
6991 * i386-tdep.c (i386_type_align): New function.
6992 (i386_gdbarch_init): Update.
6993 * gdbarch.sh (type_align): New method.
6994 * gdbarch.c, gdbarch.h: Rebuild.
6995 * arch-utils.h (default_type_align): Declare.
6996 * arch-utils.c (default_type_align): New function.
6997 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6998 (struct type) <align_log2>: New field.
6999 <instance_flags>: Now a bitfield.
7000 (TYPE_RAW_ALIGN): New macro.
7001 (type_align, type_raw_align, set_type_align): Declare.
7002 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7004 * dwarf2read.c (quirk_rust_enum): Set type alignment.
7005 (get_alignment, maybe_set_alignment): New functions.
7006 (read_structure_type, read_enumeration_type, read_array_type)
7007 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7008 (read_subrange_type, read_base_type): Set type alignment.
7010 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
7012 * dwarf2read.c (read_index_from_section): Use bool.
7014 2018-04-29 Fabian Groffen <grobian@gentoo.org>
7017 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7020 2018-04-29 John Reiser <jreiser@BitWagon.com>
7023 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7024 last step, and do it atomically.
7026 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
7028 * compile/compile-c-types.c (convert_int, convert_float):
7031 2018-04-27 Tom Tromey <tom@tromey.com>
7034 * rust-lang.c (rust_inclusive_range_type_p): New function.
7035 (rust_range): Handle inclusive ranges.
7036 (rust_compute_range): Likewise.
7037 * rust-exp.y (struct rust_op) <inclusive>: New field.
7038 (DOTDOTEQ): New constant.
7039 (range_expr): Add "..=" productions.
7040 (operator_tokens): Add "..=" token.
7041 (ast_range): Add "inclusive" parameter.
7042 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7044 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7046 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7047 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7049 * expprint.c (print_subexp_standard): Handle new bounds values.
7050 (dump_subexp_body_standard): Likewise.
7052 2018-04-27 Tom Tromey <tom@tromey.com>
7054 * configure: Rebuild.
7055 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7056 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7058 (class symbol_needs_eval_context): Likewise.
7059 * dwarf2read.c (mock_mapped_index::symbol_name_count)
7060 (mock_mapped_index::symbol_name_at): Use "override". Remove
7062 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7064 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7065 * aarch64-tdep.c (instruction_reader::read): Use "override".
7066 (instruction_reader_test::read): Likewise.
7067 * arm-tdep.c (instruction_reader::read): Use "override".
7068 (instruction_reader_thumb::read): Likewise.
7070 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
7073 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7074 instead of remote_send.
7075 (remote_send): Remove.
7077 2018-04-26 Pedro Alves <palves@redhat.com>
7079 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7080 find_function_start_sal instead of find_pc_line.
7082 2018-04-26 Pedro Alves <palves@redhat.com>
7084 * breakpoint.c (set_breakpoint_location_function): Handle
7086 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7087 * elfread.c (elf_symtab_read): Give data symbols with
7088 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7089 (elf_rel_plt_read): Update comment.
7090 * linespec.c (convert_linespec_to_sals): Handle
7092 (minsym_found): Handle mst_data_gnu_ifunc.
7093 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7094 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7095 * parse.c (find_minsym_type_and_address): Handle
7097 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7098 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7099 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7101 <mst_data_gnu_ifunc>: New enumerator.
7103 2018-04-26 Pedro Alves <palves@redhat.com>
7105 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7106 (lookup_minimal_symbol_by_pc_section): ... this. Replace
7107 'want_trampoline' parameter by a lookup_msym_prefer parameter.
7109 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7110 (lookup_minimal_symbol_by_pc): Adjust.
7111 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7112 (lookup_solib_trampoline_symbol_by_pc): Adjust.
7113 * minsyms.h (lookup_msym_prefer): New enum.
7114 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7115 parameter by a lookup_msym_prefer parameter.
7117 2018-04-26 Pedro Alves <palves@redhat.com>
7119 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7120 ends in "@plt" instead of looking at the symbol's section.
7122 2018-04-26 Pedro Alves <palves@redhat.com>
7124 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
7126 (find_pc_partial_function_gnu_ifunc): Rename to ...
7127 (find_pc_partial_function): ... this, and remove references to
7129 (find_pc_partial_function): Delete old implementation.
7130 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7132 2018-04-26 Pedro Alves <palves@redhat.com>
7134 * linespec.c (struct bound_minimal_symbol_search_key): New.
7135 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
7136 skip first line if we found a GNU ifunc minimal symbol by name.
7137 (compare_msymbols): Change parameters to work with a destructured
7139 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7142 2018-04-26 Pedro Alves <palves@redhat.com>
7144 * breakpoint.c (set_breakpoint_location_function): Don't resolve
7145 ifunc targets here. Instead, if we have an ifunc minsym, use its
7147 (add_location_to_breakpoint): Store the minsym and the objfile in
7148 the breakpoint location.
7149 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7150 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7151 Record the minsym in the sal.
7152 * symtab.h (symtab_and_line) <msymbol>: New field.
7154 2018-04-26 Pedro Alves <palves@redhat.com>
7156 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7157 unless we actually resolved the ifunc.
7159 2018-04-26 Pedro Alves <palves@redhat.com>
7161 * c-exp.y (variable production): Prefer ifunc minsyms over
7162 regular function symbols.
7163 * symtab.c (find_gnu_ifunc): New function.
7164 * minsyms.h (lookup_msym_prefer): New enum.
7165 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7166 parameter by a lookup_msym_prefer parameter.
7167 * symtab.h (find_gnu_ifunc): New declaration.
7169 2018-04-26 Pedro Alves <palves@redhat.com>
7171 * blockframe.c (find_gnu_ifunc_target_type): New function.
7172 (find_function_type): New.
7173 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7174 return a value with a memory address.
7175 (eval_call): For calls to GNU ifunc functions, try to find the
7176 type of the target function from the type that the resolver
7178 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7180 * infcall.c (find_function_return_type): Delete.
7181 (find_function_addr): Add 'function_type' parameter. For calls to
7182 GNU ifunc functions, try to find the type of the target function
7183 from the type that the resolver returns, and return it via
7185 (call_function_by_hand_dummy): Adjust to use the function type
7186 returned by find_function_addr.
7187 (find_function_addr): Add 'function_type' parameter and move
7189 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7192 2018-04-26 Pedro Alves <palves@redhat.com>
7194 * c-exp.y (variable production): Skip finding an alias for ifunc
7197 2018-04-26 Pedro Alves <palves@redhat.com>
7199 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7201 2018-04-25 Pedro Alves <palves@redhat.com>
7203 * infcmd.c (kill_command): Print the pid as string, not the whole
7204 thread's ptid. Add comment. s/has been killed/killed/ in output
7206 * remote.c (remote_detach_1): Print the pid as string, not the
7207 whole thread's ptid.
7209 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7210 Sergio Durigan Junior <sergiodj@redhat.com>
7211 Pedro Alves <palves@redhat.com>
7213 * infcmd.c (kill_command): Print message when inferior has
7215 * inferior.c (print_inferior_events): Remove 'static'. Set as
7217 (add_inferior): Improve message printed when
7218 'print_inferior_events' is on.
7219 (exit_inferior): Remove message printed when
7220 'print_inferior_events' is on.
7221 (detach_inferior): Improve message printed when
7222 'print_inferior_events' is on.
7223 (initialize_inferiors): Use 'add_inferior_silent' to set
7224 'current_inferior_'.
7225 * inferior.h (print_inferior_events): Declare here as
7227 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7228 '[Detaching...]' messages when 'print_inferior_events' is on.
7229 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
7230 as prefix/suffix for messages. Remove periods. Fix erroneous
7231 'Detaching after fork from child...', replace it by '... from
7233 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7234 prefix/suffix when printing 'Detaching...' messages. Print
7235 them when 'print_inferior_events' is on.
7236 * remote.c (remote_detach_1): Print message when detaching
7237 from inferior and '!is_fork_parent'.
7239 2018-04-24 Tom Tromey <tom@tromey.com>
7241 * cli-out.h: Reindent.
7243 2018-04-24 Tom Tromey <tom@tromey.com>
7245 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
7246 (cli_ui_out::do_field_string): Use fputs_filtered.
7247 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
7249 2018-04-23 Tom Tromey <tom@tromey.com>
7251 * guile/scm-frame.c (gdbscm_frame_read_var): Use
7252 gdb::unique_xmalloc_ptr.
7254 2018-04-23 Tom Tromey <tom@tromey.com>
7256 * configure: Rebuild.
7258 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
7261 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
7262 prepare_for_testing. Set normal_bp to r_debug_state if target
7265 2018-04-21 Pedro Alves <palves@redhat.com>
7266 Rajendra SY <rajendra.sy@gmail.com>
7268 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
7269 * remote.c (extended_remote_attach): In all-stop mode, mark the
7270 thread as executing.
7272 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7274 * thread.c (thread_apply_all_command): Fix comment.
7275 (thread_command): Fix comment.
7277 2018-04-10 Alan Hayward <alan.hayward@arm.com>
7279 * common/tdesc.h (tdesc_create_feature): Remove xml filename
7281 * features/aarch64-core.c (create_feature_aarch64_core):
7283 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7285 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7287 * features/i386/32bit-avx512.c
7288 (create_feature_i386_32bit_avx512): Likewise.
7289 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7291 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7293 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7295 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7297 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7299 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7301 * features/i386/64bit-avx512.c
7302 (create_feature_i386_64bit_avx512): Likewise.
7303 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7305 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7307 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7309 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7311 * features/i386/64bit-segments.c
7312 (create_feature_i386_64bit_segments): Likewise.
7313 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7315 * features/i386/x32-core.c
7316 (create_feature_i386_x32_core): Likewise.
7317 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7318 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7319 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7320 * target-descriptions.c: In generated code, don't pass xml
7323 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7325 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7326 (print_xml_feature::visit_post): Likewise.
7327 (print_xml_feature::visit): Likewise.
7328 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7329 (print_xml_feature): Add new class.
7330 * regformats/regdat.sh: Null xmltarget on feature targets.
7331 * target-descriptions.c (struct target_desc): Add xmltarget.
7332 (maintenance_check_tdesc_xml_convert): Add unittest function.
7333 (tdesc_get_features_xml): Add function to get xml.
7334 (maintenance_check_xml_descriptions): Test xml generation.
7335 * xml-tdesc.c (string_read_description_xml): Add function.
7336 * xml-tdesc.h (string_read_description_xml): Add declaration.
7338 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7340 * features/Makefile: Add feature marker to targets with new style
7341 target descriptions.
7342 * regformats/aarch64.dat: Regenerate.
7343 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7344 * regformats/i386/amd64-avx-linux.dat: Likewise.
7345 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7346 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7347 * regformats/i386/amd64-linux.dat: Likewise.
7348 * regformats/i386/amd64-mpx-linux.dat: Likewise.
7349 * regformats/i386/amd64.dat: Likewise.
7350 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7351 * regformats/i386/i386-avx-linux.dat: Likewise.
7352 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7353 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7354 * regformats/i386/i386-linux.dat: Likewise.
7355 * regformats/i386/i386-mmx-linux.dat: Likewise.
7356 * regformats/i386/i386-mpx-linux.dat: Likewise.
7357 * regformats/i386/i386.dat: Likewise.
7358 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7359 * regformats/i386/x32-avx-linux.dat: Likewise.
7360 * regformats/i386/x32-linux.dat: Likewise.
7361 * regformats/tic6x-c62x-linux.dat: Likewise.
7362 * regformats/tic6x-c64x-linux.dat: Likewise.
7363 * regformats/tic6x-c64xp-linux.dat: Likewise.
7364 * regformats/regdat.sh: Parse feature marker.
7366 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7368 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7369 (tdesc_osabi_name): Likewise.
7370 * target-descriptions.c (tdesc_architecture_name): Add new
7372 (tdesc_osabi_name): Likewise.
7374 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7376 * common/tdesc.c (tdesc_predefined_type): Move to here.
7377 (tdesc_named_type): Likewise.
7378 (tdesc_create_vector): Likewise.
7379 (tdesc_create_struct): Likewise.
7380 (tdesc_set_struct_size): Likewise.
7381 (tdesc_create_union): Likewise.
7382 (tdesc_create_flags): Likewise.
7383 (tdesc_create_enum): Likewise.
7384 (tdesc_add_field): Likewise.
7385 (tdesc_add_typed_bitfield): Likewise.
7386 (tdesc_add_bitfield): Likewise.
7387 (tdesc_add_flag): Likewise.
7388 (tdesc_add_enum_value): Likewise.
7389 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7390 (struct tdesc_type_vector): Likewise.
7391 (struct tdesc_type_field): Likewise.
7392 (struct tdesc_type_with_fields): Likewise.
7393 (tdesc_create_enum): Add declaration.
7394 (tdesc_add_typed_bitfield): Likewise.
7395 (tdesc_add_enum_value): Likewise.
7396 * target-descriptions.c (tdesc_type_field): Move from here.
7397 (tdesc_type_builtin): Likewise.
7398 (tdesc_type_vector): Likewise.
7399 (tdesc_type_with_fields): Likewise.
7400 (tdesc_predefined_types): Likewise.
7401 (tdesc_named_type): Likewise.
7402 (tdesc_create_vector): Likewise.
7403 (tdesc_create_struct): Likewise.
7404 (tdesc_set_struct_size): Likewise.
7405 (tdesc_create_union): Likewise.
7406 (tdesc_create_flags): Likewise.
7407 (tdesc_create_enum): Likewise.
7408 (tdesc_add_field): Likewise.
7409 (tdesc_add_typed_bitfield): Likewise.
7410 (tdesc_add_bitfield): Likewise.
7411 (tdesc_add_flag): Likewise.
7412 (tdesc_add_enum_value): Likewise.
7413 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7414 (tdesc_add_typed_bitfield): Likewise.
7415 (tdesc_add_enum_value): Likewise.
7417 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7419 * common/tdesc.c (tdesc_feature::accept): Move to here.
7420 (tdesc_feature::operator==): Likewise.
7421 (tdesc_create_reg): Likewise.
7422 * common/tdesc.h (tdesc_type_kind): Likewise.
7423 (struct tdesc_type): Likewise.
7424 (struct tdesc_feature): Likewise.
7425 * regformats/regdat.sh: Create a feature.
7426 * target-descriptions.c (tdesc_type_kind): Move from here.
7427 (tdesc_type): Likewise.
7428 (tdesc_type_up): Likewise.
7429 (tdesc_feature): Likewise.
7430 (tdesc_create_reg): Likewise.
7432 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7434 * Makefile.in: Add arch/tdesc.c
7435 * common/tdesc.c: New file.
7436 * common/tdesc.h (tdesc_element_visitor): Move to here.
7437 (tdesc_element): Likewise.
7438 (tdesc_reg): Likewise.
7439 (tdesc_reg_up): Likewise.
7440 * regformats/regdef.h (reg): Add offset to constructors.
7441 * target-descriptions.c (tdesc_element_visitor): Move from here.
7442 (tdesc_element): Likewise.
7443 (tdesc_reg): Likewise.
7444 (tdesc_reg_up): Likewise.
7446 2018-04-17 Tom Tromey <tom@tromey.com>
7448 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7451 2018-04-17 Tom Tromey <tom@tromey.com>
7453 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7455 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
7457 * symtab.c (print_symbol_info): Skip printing filename and line
7458 number when `last' is NULL.
7459 (symtab_symbol_info): Use empty string instead of NULL for first
7460 invocation of print_symbol_info.
7461 (rbreak_command): Pass NULL to `last' parameter of
7464 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
7466 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7469 2018-04-16 Pedro Alves <palves@redhat.com>
7471 * MAINTAINERS (sh): Remove.
7472 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7473 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7474 (ALLDEPFILES): Remove sh64-tdep.c.
7475 * NEWS: Mentions that support for SH-5/SH64 is removed.
7476 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7477 (sh*-*-openbsd*): Ditto.
7478 (sh64-*-elf*): Remove.
7480 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7481 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7482 * sh-tdep.c: No longer include "sh64-tdep.h".
7483 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7484 * sh64-tdep.c, sh64-tdep.h: Remove files.
7486 2018-04-16 Pedro Alves <palves@redhat.com>
7488 * MAINTAINERS: Remove m88k.
7489 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7490 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7491 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7492 * NEWS: Mention that support for m88k was removed.
7493 * configure.host (m88*-*-*): Remove support.
7494 * configure.nat (m88k-*-*): Remove support.
7495 * configure.tgt (m88*-*-openbsd*): Remove.
7496 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7498 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7500 * configure.tgt (x86_tobjs): New variable.
7501 (amd64_tobjs, i386_tobjs): Use it.
7503 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7505 * symtab.c (print_symbol_info): Precede the symbol definition by
7506 the line number when available.
7507 * NEWS: Advertise this enhancement.
7509 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7511 * NEWS (New options): announce set/show record btrace cpu.
7512 * btrace.c: Include record-btrace.h.
7513 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7514 the vendor is unknown.
7515 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7516 Maybe overwrite the btrace configuration's cpu.
7517 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7518 (btrace_fetch): Add cpu parameter. Update callers.
7519 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7520 Maybe overwrite the btrace configuration's cpu. Skip enabling
7521 errata workarounds if the vendor is unknown.
7522 * python/py-record-btrace.c: Include record-btrace.h.
7523 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7524 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7525 * record-btrace.c (record_btrace_cpu_state_kind): New.
7526 (record_btrace_cpu): New.
7527 (set_record_btrace_cpu_cmdlist): New.
7528 (record_btrace_get_cpu): New.
7529 (require_btrace_thread, record_btrace_info)
7530 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7531 (cmd_set_record_btrace_cpu_none): New.
7532 (cmd_set_record_btrace_cpu_auto): New.
7533 (cmd_set_record_btrace_cpu): New.
7534 (cmd_show_record_btrace_cpu): New.
7535 (_initialize_record_btrace): Initialize set/show record btrace cpu
7537 * record-btrace.h (record_btrace_get_cpu): New.
7539 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7541 * record.c (set_record_command): Fix typo in message.
7543 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7545 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7547 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7549 * infrun.c (process_event_stop_test): Call
7550 gdbarch_in_indirect_branch_thunk.
7551 * gdbarch.sh (in_indirect_branch_thunk): New.
7552 * gdbarch.c: Regenerated.
7553 * gdbarch.h: Regenerated.
7556 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7557 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7558 (ALLDEPFILES): Add x86-tdep.c.
7559 * arch-utils.h (default_in_indirect_branch_thunk): New.
7560 * arch-utils.c (default_in_indirect_branch_thunk): New.
7561 * i386-tdep: Include x86-tdep.h.
7562 (i386_in_indirect_branch_thunk): New.
7563 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7565 * amd64-tdep: Include x86-tdep.h.
7566 (amd64_in_indirect_branch_thunk): New.
7567 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7569 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7572 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7573 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7574 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7577 2018-04-12 Tom Tromey <tom@tromey.com>
7579 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7580 (rust_evaluate_subexp): Likewise.
7582 2018-04-12 Pedro Alves <palves@redhat.com>
7584 * procfs.c (procfs_detach): Make forward declaration's prototype
7585 match definition's protototype.
7586 (proc_get_LDT_entry): Remove stale do_cleanups call.
7588 2018-04-12 Pedro Alves <palves@redhat.com>
7590 * target.h (target_ops::to_has_exited): Delete.
7591 (target_has_exited): Delete.
7592 * target-delegates.c: Regenerate.
7594 2018-04-11 Pedro Alves <palves@redhat.com>
7596 * target.c (fileio_fh_t::t): Add comment.
7597 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7598 (target_fileio_close): Handle a NULL target.
7599 (invalidate_fileio_fh): New.
7600 (target_close): Call it.
7601 * remote.c (remote_hostio_send_command): No longer check whether
7602 remote_desc is open.
7604 2018-04-11 Pedro Alves <palves@redhat.com>
7606 * target.c (fileio_fh_t): Make it a named struct instead of a
7608 (fileio_fh_t::is_closed): New method.
7609 (DEF_VEC_O (fileio_fh_t)): Remove.
7610 (fileio_fhandles): Now a std::vector.
7611 (is_closed_fileio_fh): Delete.
7612 (acquire_fileio_fd): Adjust. Rename parameters.
7613 (release_fileio_fd): Adjust.
7614 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7615 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7616 (target_fileio_close): Adjust.
7618 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7620 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7623 2018-04-10 Pedro Alves <palves@redhat.com>
7625 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7626 (scoped_finish_thread_state): New class.
7627 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7629 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7630 (fetch_inferior_event, normal_stop): Likewise.
7631 * thread.c (finish_thread_state_cleanup): Delete.
7633 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7634 Pedro Alves <palves@redhat.com>
7636 * value.c: Include "selftest.h" and "common/array-view.h".
7637 (struct range) <operator ==>: New.
7638 (test_ranges_contain): New.
7639 (check_ranges_vector): New.
7640 (test_insert_into_bit_range_vector): New.
7641 (_initialize_values): Register selftests.
7642 * common/array-view.h (operator==, operator!=): New.
7644 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7646 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7648 * inline-frame.c: Include <algorithm>.
7649 (struct inline_state): Add constructor.
7650 (inline_state_s): Remove.
7651 (DEF_VEC_O(inline_state_s)): Remove.
7652 (inline_states): Change type to std::vector.
7653 (find_inline_frame_state): Adjust to std::vector.
7654 (allocate_inline_frame_state): Remove.
7655 (clear_inline_frame_state): Adjust to std::vector.
7656 (skip_inline_frames): Adjust to std::vector.
7658 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7660 * tracepoint.h (struct trace_state_variable): Add constructor.
7661 <name>: Change type to std::string.
7662 * tracepoint.c (tsv_s): Remove.
7663 (DEF_VEC_O(tsv_s)): Remove.
7664 (tvariables): Change to std::vector.
7665 (create_trace_state_variable): Adjust to std::vector.
7666 (find_trace_state_variable): Likewise.
7667 (find_trace_state_variable_by_number): Likewise.
7668 (delete_trace_state_variable): Likewise.
7669 (trace_variable_command): Adjust to std::string.
7670 (delete_trace_variable_command): Likewise.
7671 (tvariables_info_1): Adjust to std::vector.
7672 (save_trace_state_variables): Likewise.
7673 (start_tracing): Likewise.
7674 (merge_uploaded_trace_state_variables): Adjust to std::vector
7676 * target.h (struct target_ops)
7677 <to_download_trace_state_variable>: Pass reference to
7678 trace_state_variable.
7679 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7680 * target-delegates.c: Re-generate.
7681 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7682 (mi_tsv_deleted): Likewise.
7683 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7684 * remote.c (remote_download_trace_state_variable): Change
7685 pointer to reference and adjust.
7686 * make-target-delegates (parse_argtypes): Handle references.
7687 (write_function_header): Likewise.
7688 (munge_type): Likewise.
7690 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7692 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7693 string_view-selftests.c.
7694 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7696 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7697 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7698 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7699 * unittests/basic_string_view/element_access/char/1.cc:
7701 * unittests/basic_string_view/element_access/char/empty.cc:
7703 * unittests/basic_string_view/element_access/char/front_back.cc:
7705 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7706 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7708 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7710 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7712 * unittests/basic_string_view/operations/compare/char/1.cc:
7714 * unittests/basic_string_view/operations/compare/char/13650.cc:
7716 * unittests/basic_string_view/operations/copy/char/1.cc:
7718 * unittests/basic_string_view/operations/data/char/1.cc:
7720 * unittests/basic_string_view/operations/find/char/1.cc:
7722 * unittests/basic_string_view/operations/find/char/2.cc:
7724 * unittests/basic_string_view/operations/find/char/3.cc:
7726 * unittests/basic_string_view/operations/find/char/4.cc:
7728 * unittests/basic_string_view/operations/rfind/char/1.cc:
7730 * unittests/basic_string_view/operations/rfind/char/2.cc:
7732 * unittests/basic_string_view/operations/rfind/char/3.cc:
7734 * unittests/basic_string_view/operations/substr/char/1.cc:
7736 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7737 * unittests/string_view-selftests.c: New file.
7739 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7741 * unittests/basic_string_view/capacity/1.cc: New file.
7742 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7743 * unittests/basic_string_view/cons/char/1.cc: New file.
7744 * unittests/basic_string_view/cons/char/2.cc: New file.
7745 * unittests/basic_string_view/cons/char/3.cc: New file.
7746 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7747 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7748 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7749 * unittests/basic_string_view/element_access/char/1.cc: New file.
7750 * unittests/basic_string_view/element_access/char/2.cc: New file.
7751 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7752 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7753 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7754 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7755 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7756 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7757 * unittests/basic_string_view/include.cc: New file.
7758 * unittests/basic_string_view/inserters/char/1.cc: New file.
7759 * unittests/basic_string_view/inserters/char/2.cc: New file.
7760 * unittests/basic_string_view/inserters/char/3.cc: New file.
7761 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7762 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7763 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7764 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7765 * unittests/basic_string_view/literals/types.cc: New file.
7766 * unittests/basic_string_view/literals/values.cc: New file.
7767 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7768 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7769 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7770 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7771 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7772 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7773 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7774 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7775 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7776 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7777 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7778 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7779 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7780 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7781 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7782 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7783 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7784 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7785 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7786 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7787 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7788 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7789 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7790 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7791 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7792 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7793 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7794 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7795 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7796 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7797 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7798 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7799 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7800 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7801 * unittests/basic_string_view/operators/char/2.cc: New file.
7802 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7803 * unittests/basic_string_view/range_access/char/1.cc: New file.
7804 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7805 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7806 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7807 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7808 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7809 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7810 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7811 * unittests/basic_string_view/typedefs.cc: New file.
7812 * unittests/basic_string_view/types/1.cc: New file.
7814 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7816 * common/gdb_string_view.h: Remove libstdc++ implementation
7817 details, adjust to gdb reality.
7818 * common/gdb_string_view.tcc: Likewise.
7819 * cli/cli-script.c (struct string_view): Remove.
7820 (user_args) <m_args>: Change element type to gdb::string_view.
7821 (user_args::insert_args): Adjust.
7823 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7825 * common/gdb_string_view.h: New file.
7826 * common/gdb_string_view.tcc: New file.
7828 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7830 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7831 * configure: Re-generate.
7833 2018-04-09 Pedro Alves <palves@redhat.com>
7835 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7836 (set_target_gdbarch): Call
7837 gdb::observers::architecture_changed.notify instead of
7838 observer_notify_architecture_changed.
7840 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7842 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7843 (do_restore_current_traceframe_cleanup): Remove.
7844 (restore_current_traceframe_cleanup_dtor): Remove.
7845 (make_cleanup_restore_current_traceframe): Remove.
7846 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7848 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7849 * infrun.c (fetch_inferior_event): Use
7850 scoped_restore_current_traceframe.
7852 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7854 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7856 <n_allocated_type_units>: Remove.
7857 <all_type_units>: Change to std::vector.
7858 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7859 to std::vector change.
7860 (dwarf2_per_objfile::get_cutu): Likewise.
7861 (dwarf2_per_objfile::get_tu): Likewise.
7862 (create_signatured_type_table_from_index): Likewise.
7863 (create_signatured_type_table_from_debug_names): Likewise.
7864 (dw2_symtab_iter_next): Likewise.
7865 (dw2_print_stats): Likewise.
7866 (dw2_expand_all_symtabs): Likewise.
7867 (dw2_expand_marked_cus): Likewise.
7868 (dw2_debug_names_iterator::next): Likewise.
7869 (dwarf2_initialize_objfile): Likewise.
7870 (add_signatured_type_cu_to_table): Likewise.
7871 (create_all_type_units): Likewise.
7872 (add_type_unit): Likewise.
7873 (struct tu_abbrev_offset): Add constructor.
7874 (build_type_psymtabs_1): Adjust to std::vector change.
7875 (print_tu_stats): Likewise.
7876 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7877 (write_debug_names): Likewise.
7879 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7881 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7882 Make an std::vector.
7883 <n_comp_units>: Remove.
7884 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7885 to std::vector change.
7886 (dwarf2_per_objfile::get_cutu): Likewise.
7887 (dwarf2_per_objfile::get_cu): Likewise.
7888 (create_cus_from_index): Likewise.
7889 (create_addrmap_from_index): Likewise.
7890 (create_addrmap_from_aranges): Likewise.
7891 (dwarf2_read_index): Likewise.
7892 (dw2_find_last_source_symtab): Likewise.
7893 (dw2_map_symtabs_matching_filename): Likewise.
7894 (dw2_symtab_iter_next): Likewise.
7895 (dw2_print_stats): Likewise.
7896 (dw2_expand_all_symtabs): Likewise.
7897 (dw2_expand_symtabs_with_fullname): Likewise.
7898 (dw2_expand_marked_cus): Likewise.
7899 (dw2_map_symbol_filenames): Likewise.
7900 (create_cus_from_debug_names): Likewise.
7901 (dwarf2_read_debug_names): Likewise.
7902 (dw2_debug_names_iterator::next): Likewise.
7903 (dwarf2_initialize_objfile): Likewise.
7904 (set_partial_user): Likewise.
7905 (dwarf2_build_psymtabs_hard): Likewise.
7906 (read_comp_units_from_section): Remove arguments, adjust to
7908 (create_all_comp_units): Adjust to std::vector and
7909 read_comp_units_from_section changes.
7910 (dwarf2_find_containing_comp_unit): Adjust to std::vector
7912 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7913 (psyms_seen_size): Likewise.
7914 (write_gdbindex): Likewise.
7915 (write_debug_names): Likewise.
7917 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7919 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7920 with dwarf2_per_objfile.
7921 (create_cus_from_index): Likewise.
7922 (create_signatured_type_table_from_index): Likewise.
7923 (dwarf2_read_index): Likewise.
7924 (dwarf2_initialize_objfile): Likewise.
7925 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
7926 per_cu rather than get_dwarf2_per_objfile.
7928 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7930 * dwarf2read.h (struct signatured_type): Forward declare.
7931 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7933 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7934 (dw2_get_cutu): ...this.
7935 (dwarf2_per_objfile::get_cu): Rename from...
7936 (dw2_get_cu): ...this.
7937 (dwarf2_per_objfile::get_tu): New.
7938 (create_addrmap_from_index): Adjust.
7939 (create_addrmap_from_aranges): Adjust.
7940 (dw2_find_last_source_symtab): Adjust.
7941 (dw2_map_symtabs_matching_filename): Adjust.
7942 (dw2_symtab_iter_next): Adjust.
7943 (dw2_print_stats): Adjust.
7944 (dw2_expand_all_symtabs): Adjust.
7945 (dw2_expand_symtabs_with_fullname): Adjust.
7946 (dw2_expand_marked_cus): Adjust.
7947 (dw_expand_symtabs_matching_file_matcher): Adjust.
7948 (dw2_map_symbol_filenames): Adjust.
7949 (dw2_debug_names_iterator::next): Adjust.
7950 (dwarf2_initialize_objfile): Adjust.
7951 (set_partial_user): Adjust.
7952 (dwarf2_build_psymtabs_hard): Adjust.
7954 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7956 * dwarf2read.c (create_signatured_type_table_from_debug_names):
7957 Remove unused variables.
7958 (dw2_map_symtabs_matching_filename): Likewise.
7959 (dwarf2_record_block_ranges): Likewise.
7960 (dwarf2_read_addr_index): Likewise.
7961 (follow_die_offset): Likewise.
7963 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7965 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7966 to symbol_file_add_main.
7968 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7971 * mi/mi-console.c (do_fputc_async_safe): New.
7972 (mi_console_file::write_async_safe): New.
7973 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7974 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7976 * ui-file.c (ui_file::putstrn): Adjust call to
7977 fputstrn_unfiltered.
7978 * utils.c (printchar): Replace do_fputs and do_fprintf
7979 parameters by do_fputc.
7980 (fputstr_filtered): Adjust call to printchar.
7981 (fputstr_unfiltered): Likewise.
7982 (fputstrn_filtered): Likewise.
7983 (fputstrn_unfiltered): Add do_fputc parameter, pass to
7985 * utils.h (do_fputc_ftype): New typedef.
7986 (fputstrn_unfiltered): Add do_fputc parameter.
7988 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7990 * regformats/i386/i386-avx.dat: Remove.
7992 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7995 * amd64-tdep.c (amd64_none_init_abi): New function.
7996 (amd64_x32_none_init_abi): New function.
7997 (_initialize_amd64_tdep): Register handlers for x86-64 and
7998 x64_32 with GDB_OSABI_NONE.
7999 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8000 GDB_OSABI_NONE osabi.
8002 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8005 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8007 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8008 * osabi.c (gdb_osabi_names): Add "unknown" entry.
8010 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8012 * common/byte-vector.h (char_vector): New type.
8013 * target.h (target_read_alloc): Return
8014 gdb::optional<byte_vector>.
8015 (target_read_stralloc): Return gdb::optional<char_vector>.
8016 (target_get_osdata): Return gdb::optional<char_vector>.
8017 * target.c (target_read_alloc_1): Templatize. Replacement
8018 manual memory management with vector.
8019 (target_read_alloc): Change return type, adjust.
8020 (target_read_stralloc): Change return type, adjust.
8021 (target_get_osdata): Change return type, adjust.
8022 * auxv.c (struct auxv_info) <length>: Remove.
8023 <data>: Change type to gdb::optional<byte_vector>.
8024 (auxv_inferior_data_cleanup): Free auxv_info with delete.
8025 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8026 (target_auxv_search): Adjust.
8027 (fprint_target_auxv): Adjust.
8028 * avr-tdep.c (avr_io_reg_read_command): Adjust.
8029 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8030 (linux_make_corefile_notes): Adjust.
8031 * osdata.c (get_osdata): Adjust.
8032 * remote.c (remote_get_threads_with_qxfer): Adjust.
8033 (remote_memory_map): Adjust.
8034 (remote_traceframe_info): Adjust.
8035 (btrace_read_config): Adjust.
8036 (remote_read_btrace): Adjust.
8037 (remote_pid_to_exec_file): Adjust.
8038 * solib-aix.c (solib_aix_get_library_list): Adjust.
8039 * solib-dsbt.c (decode_loadmap): Don't free buf.
8040 (dsbt_get_initial_loadmaps): Adjust.
8041 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8042 * solib-target.c (solib_target_current_sos): Adjust.
8043 * tracepoint.c (sdata_make_value): Adjust.
8044 * xml-support.c (xinclude_start_include): Adjust.
8045 (xml_fetch_content_from_file): Adjust.
8046 * xml-support.h (xml_fetch_another): Change return type.
8047 (xml_fetch_content_from_file): Change return type.
8048 * xml-syscall.c (xml_init_syscalls_info): Adjust.
8049 * xml-tdesc.c (file_read_description_xml): Adjust.
8050 (fetch_available_features_from_target): Change return type.
8051 (target_fetch_description_xml): Adjust.
8052 (target_read_description_xml): Adjust.
8054 2018-04-06 Tom Tromey <tom@tromey.com>
8056 * value.c (~value): Update.
8057 (struct value) <contents>: Now unique_xmalloc_ptr.
8058 (value_contents_bits_eq, allocate_value_contents)
8059 (value_contents_raw, value_contents_all_raw)
8060 (value_contents_for_printing, value_contents_for_printing_const)
8061 (set_value_enclosing_type): Update.
8063 2018-04-06 Tom Tromey <tom@tromey.com>
8065 * value.c (range_s): Remove typedef, VEC.
8066 (struct range): Add operator<.
8067 (range_lessthan): Remove.
8068 (ranges_contain): Change type.
8070 (struct value) <unavailable, optimized_out>: Now std::vector.
8071 (value_entirely_available)
8072 (value_entirely_covered_by_range_vector)
8073 (value_entirely_unavailable, value_entirely_optimized_out):
8075 (insert_into_bit_range_vector): Change argument type.
8076 (find_first_range_overlap): Likewise.
8077 (struct ranges_and_idx, value_contents_bits_eq)
8078 (require_not_optimized_out, require_available): Update.
8079 (ranges_copy_adjusted): Change argument types.
8080 (value_optimized_out, value_copy, value_fetch_lazy): Update.
8082 2018-04-06 Tom Tromey <tom@tromey.com>
8084 * value.c (~value): Update.
8085 (struct value) <parent>: Now a value_ref_ptr.
8086 (value_parent, set_value_parent, value_address, value_copy):
8089 2018-04-06 Tom Tromey <tom@tromey.com>
8091 * value.c (struct value): Add constructor, destructor, and member
8093 (allocate_value_lazy, value_decref): Update.
8095 2018-04-06 Tom Tromey <tom@tromey.com>
8097 * value.c (struct value) <released, next>: Remove.
8098 (all_values): Now a std::vector.
8099 (allocate_value_lazy): Update.
8100 (value_next): Remove.
8101 (value_mark, value_free_to_mark, release_value)
8102 (value_release_to_mark): Update.
8104 2018-04-06 Tom Tromey <tom@tromey.com>
8106 * value.h (fetch_subexp_value, value_release_to_mark): Update.
8107 (free_value_chain): Remove.
8108 * value.c (free_value_chain): Remove.
8109 (value_release_to_mark): Return a std::vector.
8110 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8112 (check_condition): Update.
8113 * eval.c (fetch_subexp_value): Change "val_chain" to a
8115 * breakpoint.c (update_watchpoint): Update.
8116 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8118 2018-04-06 Tom Tromey <tom@tromey.com>
8120 * value.h (free_all_values): Remove.
8121 * value.c (free_all_values): Remove.
8123 2018-04-06 Tom Tromey <tom@tromey.com>
8125 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8126 (value_history_chain, value_history_count): Remove.
8127 (value_history): New global.
8128 (record_latest_value, access_value_history, show_values)
8129 (preserve_values): Update.
8131 2018-04-06 Tom Tromey <tom@tromey.com>
8133 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8134 * varobj.c (varobj_set_display_format, varobj_set_value)
8135 (install_default_visualizer, construct_visualizer)
8136 (install_new_value, ~varobj, varobj_get_value_type)
8137 (my_value_of_variable, varobj_editable_p): Update.
8138 * c-varobj.c (c_describe_child, c_value_of_variable)
8139 (cplus_number_of_children, cplus_describe_child): Update.
8140 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8141 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8142 (ada_value_of_variable, ada_value_is_changeable_p): Update.
8144 2018-04-06 Tom Tromey <tom@tromey.com>
8146 * printcmd.c (last_examine_address): Change type to
8148 (do_examine, x_command): Update.
8150 2018-04-06 Tom Tromey <tom@tromey.com>
8152 * value.c (release_value): Update.
8153 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8154 (struct bpstats) <val>: Now a value_ref_ptr.
8155 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8156 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8157 (~watchpoint, print_it_watchpoint, watch_command_1)
8158 (invalidate_bp_value_on_memory_change): Update.
8160 2018-04-06 Tom Tromey <tom@tromey.com>
8162 * varobj.c (varobj_clear_saved_item)
8163 (update_dynamic_varobj_children, install_new_value, ~varobj):
8165 * value.h (value_incref): Move declaration earlier.
8166 (value_decref): Rename from value_free.
8167 (struct value_ref_policy): New.
8168 (value_ref_ptr): New typedef.
8169 (struct value_deleter): Remove.
8170 (gdb_value_up): Remove typedef.
8171 (release_value): Change return type.
8172 (release_value_or_incref): Remove.
8173 * value.c (set_value_parent): Update.
8174 (value_incref): Change return type.
8175 (value_decref): Rename from value_free.
8176 (value_free_to_mark, free_all_values, free_value_chain): Update.
8177 (release_value): Return value_ref_ptr.
8178 (release_value_or_incref): Remove.
8179 (record_latest_value, set_internalvar, clear_internalvar):
8181 * stack.c (info_frame_command): Don't call value_free.
8182 * python/py-value.c (valpy_dealloc, valpy_new)
8183 (value_to_value_object): Update.
8184 * printcmd.c (do_examine): Update.
8185 * opencl-lang.c (lval_func_free_closure): Update.
8186 * mi/mi-main.c (register_changed_p): Don't call value_free.
8187 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8188 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8189 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8191 * guile/scm-value.c (vlscm_free_value_smob)
8192 (vlscm_scm_from_value): Update.
8193 * frame.c (frame_register_unwind, frame_unwind_register_signed)
8194 (frame_unwind_register_unsigned, get_frame_register_bytes)
8195 (put_frame_register_bytes): Don't call value_free.
8196 * findvar.c (address_from_register): Don't call value_free.
8197 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8198 * dwarf2loc.c (entry_data_value_free_closure)
8199 (value_of_dwarf_reg_entry, free_pieced_value_closure)
8200 (dwarf2_evaluate_loc_desc_full): Update.
8201 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8202 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8203 (~watchpoint, watch_command_1)
8204 (invalidate_bp_value_on_memory_change): Update.
8205 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8207 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
8210 * warning.m4: Add -Wno-error=deprecated-register.
8211 * configure: Re-generate.
8213 2018-04-05 Tom Tromey <tom@tromey.com>
8215 * linespec.h: Remove include of "vec.h".
8217 2018-04-05 Tom Tromey <tom@tromey.com>
8219 * linespec.c (typep): Remove typedef.
8220 (find_methods, find_superclass_methods): Take a std::vector.
8221 (find_method): Use std::vector.
8223 2018-04-05 Tom Tromey <tom@tromey.com>
8225 * utils.c (compare_strings): Remove.
8226 * utils.h (compare_strings): Remove.
8227 * objc-lang.h (find_imps): Update.
8228 * objc-lang.c (find_methods): Take a std::vector.
8229 (uniquify_strings, find_imps): Likewise.
8230 * linespec.c (find_methods): Take a std::vector.
8231 (decode_objc): Use std::vector.
8232 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8234 (find_method, find_function_symbols): Use std::vector.
8236 2018-04-05 Tom Tromey <tom@tromey.com>
8238 * completer.c (completion_tracker::completion_tracker): Remove
8240 (completion_tracker::discard_completions): Likewise.
8241 * breakpoint.c (ambiguous_names_p): Remove cast.
8242 * ada-lang.c (_initialize_ada_language): Remove cast.
8243 * utils.h (streq): Update.
8244 (streq_hash): Add new declaration.
8245 * utils.c (streq): Return bool.
8246 (streq_hash): New function.
8248 2018-04-05 Tom Tromey <tom@tromey.com>
8250 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8251 Remove a string copy.
8253 2018-04-05 Tom Tromey <tom@tromey.com>
8255 * linespec.c (filter_results): Use std::vector.
8256 (decode_line_2, decode_line_full): Update.
8258 2018-04-05 Tom Tromey <tom@tromey.com>
8260 * linespec.c (canonical_to_fullform): Return std::string.
8261 (filter_results): Update.
8262 (struct decode_line_2_item): Add constructor.
8263 <fullform, displayform>: Now std::string.
8264 (decode_line_2_compare_items): Now a std::sort comparator.
8265 (decode_line_2): Update.
8267 2018-04-05 Tom Tromey <tom@tromey.com>
8269 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8270 (unexpected_linespec_error): Update.
8271 (linespec_parse_basic, parse_linespec): Update.
8273 2018-04-05 Tom Tromey <tom@tromey.com>
8275 * linespec.c (linespec_parse_basic): Reindent.
8277 2018-04-05 Tom Tromey <tom@tromey.com>
8279 * minsyms.h (iterate_over_minimal_symbols): Update.
8280 * minsyms.c (iterate_over_minimal_symbols): Take a
8282 * linespec.c (struct collect_minsyms): Remove.
8283 (compare_msyms): Now a std::sort comparator.
8284 (add_minsym): Add parameters.
8285 (search_minsyms_for_name): Update. Use std::vector.
8287 2018-04-03 Tom Tromey <tom@tromey.com>
8289 * mipsread.c (read_alphacoff_dynamic_symtab): Use
8292 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8294 * MAINTAINERS (Write After Approval): Add Weimin Pan.
8296 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8299 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
8300 printing static type.
8302 2018-04-01 Tom Tromey <tom@tromey.com>
8304 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8305 (rs6000_xfer_shared_libraries): Update.
8307 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
8309 * common/gdb_vecs.h (char_ptr): Remove.
8310 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8312 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8314 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8316 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8318 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8320 * tracepoint.h (struct uploaded_tp): Initialize fields.
8321 <actions, step_actions, cmd_strings>: Change type to
8322 std::vector<char *>.
8323 * tracepoint.c (get_uploaded_tp): Allocate with new.
8324 (free_uploaded_tps): Free with delete.
8325 (parse_tracepoint_definition): Adjust to std::vector change.
8326 * breakpoint.c (read_uploaded_action): Likewise.
8327 (create_tracepoint_from_upload): Likewise.
8328 * ctf.c (ctf_write_uploaded_tp): Likewise.
8329 (SET_ARRAY_FIELD): Likewise.
8330 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8332 2018-03-30 Tom Tromey <tom@tromey.com>
8334 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
8336 (svr4_keep_data_in_core): Update.
8337 (svr4_read_so_list): Update.
8339 2018-03-30 Tom Tromey <tom@tromey.com>
8341 * windows-nat.c (handle_output_debug_string, handle_exception):
8343 * target.h (target_read_string): Update.
8344 * target.c (target_read_string): Change "string" to
8346 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8348 * solib-frv.c (frv_current_sos): Update.
8349 * solib-dsbt.c (dsbt_current_sos): Update.
8350 * solib-darwin.c (darwin_current_sos): Update.
8351 * linux-thread-db.c (inferior_has_bug): Update.
8352 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8353 Update. Remove alloca.
8354 * ada-lang.c (ada_main_name): Update.
8356 2018-03-30 Tom Tromey <tom@tromey.com>
8358 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8359 (struct dwo_file_deleter): New.
8360 (dwo_file_up): New typedef.
8361 (open_and_init_dwo_file): Use dwo_file_up.
8362 (free_dwo_file_cleanup): Remove.
8364 2018-03-30 Tom Tromey <tom@tromey.com>
8366 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8367 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8369 2018-03-30 Tom Tromey <tom@tromey.com>
8371 * dwarf2read.c (class free_cached_comp_units): New class.
8372 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8373 (free_cached_comp_units): Remove function.
8375 2018-03-30 Tom Tromey <tom@tromey.com>
8377 * utils.h (make_cleanup_unpush_target): Remove.
8378 * inf-ptrace.c (struct target_unpusher): New.
8379 (target_unpush_up) New typedef.
8380 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8382 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8384 2018-03-27 Tom Tromey <tom@tromey.com>
8386 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8388 2018-03-27 Pedro Alves <palves@redhat.com>
8389 Tom Tromey <tom@tromey.com>
8391 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8392 destructor. Now a class.
8393 (gdb_readline_wrapper_cleanup): Remove function.
8394 (gdb_readline_wrapper): Remove cleanups.
8396 2018-03-27 Tom Tromey <tom@tromey.com>
8398 * typeprint.h (struct type_print_options) <local_typedefs,
8399 global_typedefs>: Remove "struct" keyword.
8400 (class typedef_hash_table): New class.
8401 (recursively_update_typedef_hash, add_template_parameters)
8402 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8403 (find_typedef_in_hash): Don't declare.
8404 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8405 (typedef_hash_table::recursively_update): Rename from
8406 recursively_update_typedef_hash. Now a member.
8407 (typedef_hash_table::add_template_parameters): Rename from
8408 add_template_parameters. Now a member.
8409 (typedef_hash_table::typedef_hash_table): Now a constructor;
8410 rename from create_typedef_hash.
8411 (typedef_hash_table::~typedef_hash_table): Now a destructor;
8412 rename from free_typedef_hash.
8413 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8414 (do_free_global_table): Remove.
8415 (typedef_hash_table::typedef_hash_table): New constructor; renamed
8416 from copy_type_recursive.
8417 (create_global_typedef_table): Remove.
8418 (typedef_hash_table::find_global_typedef): Now a member of
8420 (typedef_hash_table::find_typedef): Rename from
8421 find_typedef_in_hash; now a member.
8422 (whatis_exp): Update.
8423 * extension.h (struct ext_lang_type_printers): Add constructor and
8425 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8427 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8428 Now a constructor; rename from start_ext_lang_type_printers.
8429 (ext_lang_type_printers): Now a destructor; rename from
8430 free_ext_lang_type_printers.
8431 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8433 (c_type_print_base_struct_union): Update. Remove cleanups.
8435 2018-03-27 Tom Tromey <tom@tromey.com>
8437 * dwarf-index-write.c: Include <cmath>.
8439 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8441 * NEWS: Add entry describing new "set|show varsize-limit" command.
8442 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8444 * printcmd.c (_initialize_printcmd): Add "set var" alias of
8447 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
8449 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8451 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8452 * dwarf-index-common.c: New file.
8453 * dwarf-index-common.h: New file.
8454 * dwarf-index-write.c: New file.
8455 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8456 (struct dwarf2_section_info): Move from here.
8457 (dwarf2_section_info_def): Likewise.
8458 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8459 (offset_type): Likewise.
8460 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8461 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8462 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8463 (byte_swap): Likewise.
8464 (MAYBE_SWAP): Likewise.
8465 (dwarf2_per_cu_ptr): Likewise.
8466 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8467 (struct tu_stats): Likewise.
8468 (struct dwarf2_per_objfile): Likewise.
8469 (struct dwarf2_per_cu_data): Likewise.
8470 (struct signatured_type): Likewise.
8471 (sig_type_ptr): Likewise.
8472 (DEF_VEC_P (sig_type_ptr)): Likewise.
8473 (INDEX4_SUFFIX): Likewise.
8474 (INDEX5_SUFFIX): Likewise.
8475 (DEBUG_STR_SUFFIX): Likewise.
8476 (dwarf2_read_section): Make non-static.
8477 (mapped_index_string_hash): Move from here.
8478 (dwarf5_djb_hash): Likewise.
8479 (file_write): Likewise.
8480 (class data_buf): Likewise.
8481 (struct symtab_index_entry): Likewise.
8482 (struct mapped_symtab): Likewise.
8483 (find_slot): Likewise.
8484 (hash_expand): Likewise.
8485 (add_index_entry): Likewise.
8486 (uniquify_cu_indices): Likewise.
8487 (class c_str_view): Likewise.
8488 (class c_str_view_hasher): Likewise.
8489 (class vector_hasher): Likewise.
8490 (write_hash_table): Likewise.
8491 (psym_index_map): Likewise.
8492 (struct addrmap_index_data): Likewise.
8493 (add_address_entry): Likewise.
8494 (add_address_entry_worker): Likewise.
8495 (write_address_map): Likewise.
8496 (symbol_kind): Likewise.
8497 (write_psymbols): Likewise.
8498 (struct signatured_type_index_data): Likewise.
8499 (write_one_signatured_type): Likewise.
8500 (recursively_count_psymbols): Likewise.
8501 (recursively_write_psymbols): Likewise.
8502 (class debug_names): Likewise.
8503 (check_dwarf64_offsets): Likewise.
8504 (psyms_seen_size): Likewise.
8505 (write_gdbindex): Likewise.
8506 (write_debug_names): Likewise.
8507 (assert_file_size): Likewise.
8508 (write_psymtabs_to_index): Likewise.
8509 (save_gdb_index_command): Likewise.
8510 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8512 * dwarf2read.h: New file.
8514 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8517 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8518 symbol name if the CU's language stores symbol names in linkage
8520 * language.h (struct language_defn)
8521 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8522 all instances of this struct.
8524 2018-03-26 Tom Tromey <tom@tromey.com>
8526 * stack.c (backtrace_command_1): Remove verbose code.
8528 2018-03-26 Tom Tromey <tom@tromey.com>
8530 * python/py-framefilter.c (py_print_type): Don't catch
8531 exceptions. Return void.
8532 (py_print_value): Likewise.
8533 (py_print_single_arg): Likewise.
8534 (enumerate_args): Don't catch exceptions.
8535 (py_print_args): Likewise.
8536 (py_print_frame): Likewise.
8537 (gdbpy_apply_frame_filter): Catch exceptions here.
8539 2018-03-26 Tom Tromey <tom@tromey.com>
8541 * stack.c (_initialize_stack): Remove trailing newlines from help
8542 text. Add "Usage" line to "backtrace" help.
8544 2018-03-26 Tom Tromey <tom@tromey.com>
8547 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8549 2018-03-26 Tom Tromey <tom@tromey.com>
8551 * python/py-framefilter.c (py_print_single_arg): Return
8552 EXT_LANG_BT_ERROR from catch.
8554 2018-03-26 Tom Tromey <tom@tromey.com>
8557 * stack.c (backtrace_command_1): Move some code into no-filters
8560 2018-03-26 Tom Tromey <tom@tromey.com>
8562 * python/py-framefilter.c (throw_quit_or_print_exception): New
8564 (gdbpy_apply_frame_filter): Use it.
8566 2018-03-26 Tom Tromey <tom@tromey.com>
8569 * python/py-framefilter.c (py_print_type, py_print_value)
8570 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8573 2018-03-26 Tom Tromey <tom@tromey.com>
8575 * python/py-framefilter.c (enumerate_args): Use
8576 gdb::unique_xmalloc_ptr.
8578 2018-03-26 Tom Tromey <tom@tromey.com>
8580 * python/py-framefilter.c (py_print_frame): Return
8582 (gdbpy_apply_frame_filter): Update comment.
8583 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8585 <EXT_LANG_BT_NO_FILTERS>: Change value.
8587 2018-03-26 Tom Tromey <tom@tromey.com>
8590 * stack.c (backtrace_command): Parse "hide" argument.
8591 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8592 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8595 2018-03-26 Tom Tromey <tom@tromey.com>
8597 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8599 (backtrace_command): Remove "fulltrace", add "flags".
8601 2018-03-26 Tom Tromey <tom@tromey.com>
8603 * stack.c (backtrace_command): Rewrite command line parsing.
8605 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8607 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8609 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8611 * filename-seen-cache.h: Add include guard.
8613 2018-03-26 Keith Seitz <keiths@redhat.com>
8615 * symfile.c (place_section): Remove "struct" from section_addr_info
8617 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8618 "struct" keyword from section_addr_info.
8620 2018-03-26 Alan Hayward <alan.hayward@arm.com>
8622 * regformats/regdef.h (reg): Add constructors.
8624 2018-03-25 Pedro Alves <palves@redhat.com>
8626 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8627 if then/else bodies in var_func_name extraction.
8629 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
8631 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8632 lookup_minimal_symbol() to find symbol entry.
8633 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8635 2018-03-23 Keith Seitz <keiths@redhat.com>
8638 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8639 nested type definitions for C++, too.
8641 2018-03-23 Tom Tromey <tom@tromey.com>
8643 * machoread.c (struct oso_el): Add a constructor. Don't define as
8645 (macho_register_oso): Remove.
8646 (macho_symtab_read): Take a std::vector.
8647 (oso_el_compare_name): Now a std::sort comparator.
8648 (macho_symfile_read_all_oso): Take a std::vector.
8649 (macho_symfile_read): Use std::vector. Remove cleanups.
8651 2018-03-22 Tom Tromey <tom@tromey.com>
8653 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8654 (record_full_goto_bookmark): Use std::string.
8656 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8659 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8662 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8664 * rs6000-tdep.c (store_insn_p): New function.
8665 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8666 and cr_reg to their unshifted values. Use store_insn_p to
8667 match LR saves using either R1 or fdata->alloca_reg. Use
8668 store_insn_p to match CR saves. Set alloca_reg_offset
8669 when alloca_reg and framep are set. Remove lr_reg shift
8670 when assigning to fdata->lr_register.
8672 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8674 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8675 command line args instead of emitting a warning.
8677 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8679 * tracepoint.h (struct static_tracepoint_marker): Initialize
8680 fields, define default constructor, move constructor and move
8681 assignment, disable the rest.
8682 <str_id, extra>: Make std::string.
8683 (release_static_tracepoint_marker): Remove.
8684 (free_current_marker): Remove.
8685 * tracepoint.c (free_current_marker): Remove.
8686 (parse_static_tracepoint_marker_definition): Adjust to
8687 std::string, use new hex2str overload.
8688 (release_static_tracepoint_marker): Remove.
8689 (print_one_static_tracepoint_marker): Get marker by reference
8690 and adjust to std::string.
8691 (info_static_tracepoint_markers_command): Adjust to std::vector
8693 * target.h (static_tracepoint_marker_p): Remove typedef.
8694 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8695 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8697 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8699 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8700 (target_debug_print_std_vector_static_tracepoint_marker): New.
8701 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8703 (target_debug_print_static_tracepoint_marker_p): ... this.
8704 * target-delegates.c: Re-generate.
8705 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8707 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8708 (decode_static_tracepoint_spec): Adjust to std::vector.
8709 (tracepoint_print_one_detail): Adjust to std::string.
8710 (strace_marker_decode_location): Adjust to std::string.
8711 (update_static_tracepoint): Adjust to std::string, remove call
8712 to release_static_tracepoint_marker.
8713 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8714 Adjust to std::vector.
8715 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8716 (remote_static_tracepoint_markers_by_strid): Adjust to
8718 * common/rsp-low.h (hex2str): New overload with explicit count
8720 * common/rsp-low.c (hex2str): New overload with explicit count
8722 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8723 (_initialize_rsp_low_selftests): Add test_hex2str test.
8724 * unittests/tracepoint-selftests.c
8725 (test_parse_static_tracepoint_marker_definition): Adjust to
8728 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8730 * tracepoint.c (parse_static_tracepoint_marker_definition):
8731 Consider case where the definition is followed by more
8733 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8734 tracepoint-selftests.c.
8735 * unittests/tracepoint-selftests.c: New.
8737 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8739 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8742 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8744 * symtab.c (find_pc_sect_line): fixed indentation.
8746 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8748 * symtab.c (find_pc_sect_line): now uses binary search.
8750 2018-03-19 Tom Tromey <tom@tromey.com>
8752 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8755 2018-03-19 Pedro Alves <palves@redhat.com>
8756 Tom Tromey <tom@tromey.com>
8758 * unittests/observable-selftests.c: New file.
8759 * common/observable.h: New file.
8760 * observable.h: New file.
8761 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8762 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8763 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8764 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8765 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8766 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8767 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8768 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8769 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8770 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8771 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8772 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8773 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8774 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8775 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8776 tui/tui-interp.c, valops.c: Update all users.
8777 * tui/tui-hooks.c (tui_bp_created_observer)
8778 (tui_bp_deleted_observer, tui_bp_modified_observer)
8779 (tui_inferior_exit_observer, tui_before_prompt_observer)
8780 (tui_normal_stop_observer, tui_register_changed_observer):
8782 (tui_observers_token): New global.
8783 (attach_or_detach, tui_attach_detach_observers): New functions.
8784 (tui_install_hooks, tui_remove_hooks): Use
8785 tui_attach_detach_observers.
8786 * record-btrace.c (record_btrace_thread_observer): Remove.
8787 (record_btrace_thread_observer_token): New global.
8788 * observer.sh: Remove.
8789 * observer.c: Rename to observable.c.
8790 * observable.c (namespace gdb_observers): Define new objects.
8791 (observer_debug): Move into gdb_observers namespace.
8792 (struct observer, struct observer_list, xalloc_observer_list_node)
8793 (xfree_observer_list_node, generic_observer_attach)
8794 (generic_observer_detach, generic_observer_notify): Remove.
8795 (_initialize_observer): Update.
8796 Don't include observer.inc.
8797 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8798 (clean mostlyclean): Likewise.
8799 (observer.h, observer.inc): Remove targets.
8800 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8801 (COMMON_SFILES): Use observable.c, not observer.c.
8802 * .gitignore: Remove observer.h.
8804 2018-03-18 Tom Tromey <tom@tromey.com>
8806 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8808 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8810 2018-03-17 Tom Tromey <tom@tromey.com>
8812 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8814 2018-03-17 Tom Tromey <tom@tromey.com>
8816 * target.c (class scoped_target_fd): New.
8817 (target_fileio_close_cleanup): Remove.
8818 (target_fileio_read_alloc_1): Use scoped_target_fd.
8820 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8822 * silent-rules.mk: New.
8823 * Makefile.in: Include silent-rules.mk
8824 (srcdir, VPATH, top_srcdir): Move up.
8825 (COMPILE): Add ECHO_CXX.
8826 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8827 (init.c): Add ECHO_INIT_C.
8828 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8829 (version.c): Add ECHO_GEN.
8830 (printcmd.o): Add ECHO_CXX.
8831 (target-float.o): Add ECHO_CXX.
8832 (ada-exp.o): Add ECHO_CXX.
8833 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8834 (insight$(EXEEXT)): Add ECHO_CXXLD.
8835 * gnulib/configure.ac: Add AM_SILENT_RULES.
8836 * gnulib/aclocal.m4: Re-generate.
8837 * gnulib/configure: Re-generate.
8838 * gnulib/import/Makefile.in: Re-generate.
8840 2018-03-16 Tom Tromey <tom@tromey.com>
8842 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8843 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8844 * utils.c (do_free_section_addr_info)
8845 (make_cleanup_free_section_addr_info): Remove.
8846 * symfile.h (struct other_sections): Add constructor.
8847 (struct section_addr_info): Remove.
8848 (section_addr_info): New typedef.
8849 (struct sym_fns) <sym_offsets>: Change type of parameter.
8850 (build_section_addr_info_from_objfile)
8851 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8852 (default_symfile_offsets, symbol_file_add)
8853 (symbol_file_add_from_bfd)
8854 (build_section_addr_info_from_section_table): Update.
8855 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8856 * symfile.c (alloc_section_addr_info): Remove.
8857 (build_section_addr_info_from_section_table): Change return type.
8859 (build_section_addr_info_from_bfd)
8860 (build_section_addr_info_from_objfile): Likewise.
8861 (free_section_addr_info): Remove.
8862 (relative_addr_info_to_section_offsets): Change type of "addrs".
8863 (addrs_section_compar): Now a std::sort comparator.
8864 (addrs_section_sort): Change return type.
8865 (addr_info_make_relative): Change type of "addrs". Update.
8866 (default_symfile_offsets, syms_from_objfile_1)
8867 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8868 (symbol_file_add_separate): Update.
8869 (symbol_file_add): Change type of "addrs". Update.
8870 (add_symbol_file_command): Update. Remove cleanups.
8871 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8873 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8874 * solib.c (solib_read_symbols): Update.
8875 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8876 * machoread.c (macho_symfile_offsets): Update.
8877 * jit.c (jit_bfd_try_read_symtab): Update.
8879 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8881 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8882 unittests/utils-selftests.c.
8883 * unittests/utils-selftests.c: New file.
8885 2018-03-14 Tom Tromey <tom@tromey.com>
8888 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8891 2018-03-14 Tom Tromey <tom@tromey.com>
8894 * printcmd.c (printf_pointer): Allow "-" in format.
8896 2018-03-14 Tom Tromey <tom@tromey.com>
8898 * printcmd.c (_initialize_printcmd): Add usage to printf.
8900 2018-03-14 Yao Qi <qiyao@sourceware.org>
8902 * MAINTAINERS: Update my email address.
8904 2018-03-13 Tom Tromey <tom@tromey.com>
8906 * machoread.c (macho_check_dsym): Change filenamep to a
8908 (macho_symfile_read): Update.
8909 * symfile.c (load_command): Use std::string.
8911 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
8913 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8914 to error message string.
8915 (riscv_register_name): Use xsnprintf instead of sprintf.
8916 (riscv_insn::fetch_instruction): Use gdb_assert instead of
8918 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8920 (riscv_push_dummy_call): Likewise.
8922 2018-03-12 Tom Tromey <tom@tromey.com>
8924 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8925 Use gdb::byte_vector.
8926 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8928 2018-03-12 Yao Qi <yao.qi@linaro.org>
8930 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8931 parameter type to readable_regcache.
8932 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8935 2018-03-11 Tom Tromey <tom@tromey.com>
8937 * dwarf2read.c (struct nextfield): Add initializers.
8938 (struct nextfnfield): Remove.
8939 (struct fnfieldlist): Add initializers. Remove "length" and
8940 "head", use std::vector.
8941 (struct decl_field_list): Remove.
8942 (struct field_info): Add initializers.
8943 <fields, baseclasses>: Now std::vector.
8944 <nbaseclasses, nfnfields, typedef_field_list_count,
8945 nested_types_list_count>: Remove.
8946 (dwarf2_add_field, dwarf2_add_type_defn)
8947 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8948 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8949 (process_structure_scope): Update.
8951 2018-03-11 Tom Tromey <tom@tromey.com>
8953 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8954 for use by std::sort.
8955 (build_type_psymtabs_1): Use std::vector.
8957 2018-03-09 Eli Zaretskii <eliz@gnu.org>
8959 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8960 and LIBMPFR in the printed configuration.
8962 2018-03-08 Tom Tromey <tom@tromey.com>
8964 * source.c (get_filename_and_charpos): Use scoped_fd.
8965 * nto-procfs.c (procfs_open_1): Use scoped_fd.
8966 (procfs_pidlist): Likewise.
8967 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8968 (iterate_over_mappings): Likewise.
8970 2018-03-08 Tom Tromey <tom@tromey.com>
8972 * infcall.c (struct call_return_meta_info)
8973 <stack_temporaries_enabled>: Remove.
8974 (get_call_return_value, call_function_by_hand_dummy): Update.
8975 * thread.c (disable_thread_stack_temporaries): Remove.
8976 (enable_thread_stack_temporaries): Remove.
8977 (thread_stack_temporaries_enabled_p): Return bool.
8978 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8979 (get_last_thread_stack_temporary): Update.
8980 * eval.c (evaluate_subexp): Update.
8981 * gdbthread.h (class enable_thread_stack_temporaries): Now a
8982 class, not a function.
8983 (value_ptr, value_vec): Remove typedefs.
8984 (class thread_info) <stack_temporaries_enabled>: Now bool.
8985 <stack_temporaries>: Now a std::vector.
8986 (thread_stack_temporaries_enabled_p)
8987 (value_in_thread_stack_temporaries): Return bool.
8989 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
8991 * remote.c (putpkt_binary): Fix omitted bytes reporting.
8992 (getpkt_or_notif_sane_1): Likewise.
8994 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8996 * build-id.c (build_id_to_debug_bfd): Use std::string.
8998 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9000 * build-id.c (find_separate_debug_file_by_buildid): Return
9002 * build-id.h (find_separate_debug_file_by_buildid): Return
9004 * coffread.c (coff_symfile_read): Adjust to std::string.
9005 * elfread.c (elf_symfile_read): Adjust to std::string.
9006 * symfile.c (separate_debug_file_exists): Change parameter to
9008 (find_separate_debug_file): Return std::string.
9009 (find_separate_debug_file_by_debuglink): Return std::string.
9010 * symfile.h (find_separate_debug_file_by_debuglink): Return
9013 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9015 * common/xml-utils.c (xml_escape_text): Move code to...
9016 (xml_escape_text_append): ... this new function.
9017 * common/xml-utils.h (xml_escape_text_append): New declaration.
9018 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9020 (_initialize_xml_utils): register test_xml_escape_text_append as
9023 2018-03-07 Alan Hayward <alan.hayward@arm.com>
9025 * defs.h: Remove MAX_REGISTER_SIZE.
9026 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9028 * python/py-unwind.c (pyuw_sniffer): Likewise.
9030 2018-03-07 Tom Tromey <tom@tromey.com>
9032 * linux-tdep.c (linux_info_proc): Update.
9033 * target.h (struct target_ops) <to_fileio_readlink>: Return
9035 (target_fileio_readlink): Return optional<string>.
9036 * remote.c (remote_hostio_readlink): Return optional<string>.
9037 * inf-child.c (inf_child_fileio_readlink): Return
9039 * target.c (target_fileio_readlink): Return optional<string>.
9041 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
9043 * regcache.c (cooked_read_test): Add riscv to the list of
9044 architectures that have a save_reggroup.
9046 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
9048 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9049 value is not a dynamic class object.
9051 2018-03-06 Tom Tromey <tom@tromey.com>
9053 * rust-exp.y: Formatting fixes.
9055 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9057 * riscv-tdep.c (riscv_register_name): Remove target description
9059 (riscv_gdbarch_init): Remove target description check.
9061 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9063 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9065 * riscv-tdep.h: Likewise.
9067 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9069 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9070 (riscv_pseudo_register_write): Delete.
9071 (riscv_gdbarch_init): Remove all use of pseudo registers.
9073 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9075 * record-btrace.c (btrace_print_lines): Replace cleanup
9076 parameter with RAII equivalents.
9077 (btrace_insn_history): Replace cleanup with RAII equivalents.
9078 * ui-out.h (make_cleanup_ui_out_list_begin_end,
9079 make_cleanup_ui_out_tuple_begin_end): Remove.
9080 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9081 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9082 make_cleanup_ui_out_list_begin_end): Remove.
9084 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9086 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9087 parameter types to std::vector. Use bool.
9088 (record_btrace_wait): Replace VEC(tp_t) with
9089 std::vector<thread_info *>.
9090 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9092 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9094 * record-btrace.c (record_btrace_disable_callback): Remove.
9095 (struct scoped_btrace_disable): New.
9096 (record_btrace_open): Use scoped_btrace_disable.
9098 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9100 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9101 reading values from registers.
9103 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9105 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9108 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9110 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9111 change parameter type. Use GDB's print functions, and use
9112 core_addr_to_string where appropriate.
9113 (riscv_push_dummy_call): Use core_addr_to_string where
9114 appropriate, update call to riscv_print_arg_location, and reindent
9116 (riscv_return_value): Update call to riscv_print_arg_location.
9118 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9119 Tim Newsome <tim@sifive.com>
9120 Albert Ou <a0u@eecs.berkeley.edu>
9121 Darius Rad <darius@bluespec.com>
9123 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9124 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9125 (ALLDEPFILES): Add riscv-tdep.c
9126 * configure.tgt: Add riscv support.
9127 * riscv-tdep.c: New file.
9128 * riscv-tdep.h: New file.
9129 * NEWS: Mention new target.
9130 * MAINTAINERS: Add entry for riscv.
9132 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9134 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9135 fields within aggregates.
9137 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
9139 * record-btrace.c (btrace_print_lines): Change type of flags to
9140 gdb_disassembly_flags.
9142 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9144 * fbsd-nat.c: Include "inf-ptrace.h".
9145 (USE_SIGTRAP_SIGINFO): Conditionally define.
9146 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9147 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9148 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9150 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9152 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9154 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9155 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9156 "supports_stopped_by_hw_breakpoint" target methods.
9158 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9160 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9161 * fbsd-nat.c (debug_fbsd_nat): New variable.
9162 (show_fbsd_nat_debug): New function.
9163 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9164 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9166 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9168 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9169 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9171 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9172 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9175 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9177 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9178 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9180 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9182 * charset.c (struct charset_vector): New.
9183 (charsets): Change type to charset_vector.
9184 (find_charset_names): Adjust.
9186 (_initialize_charset): Adjust.
9188 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9190 * progspace.h (struct program_space) <deleted_solibs>: Change
9191 type to std::vector<std::string>.
9192 * progspace.c (clear_program_space_solib_cache): Adjust.
9193 * breakpoint.c (print_solib_event): Adjust.
9194 (check_status_catch_solib): Adjust.
9195 * solib.c (update_solib_list): Adjust.
9196 * ui-out.h (class ui_out) <field_string>: New overload.
9197 * ui-out.c (ui_out::field_string): New overload.
9199 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9201 * progspace.h (struct program_space): Add constructor and
9202 destructor, initialize fields.
9203 (add_program_space): Remove.
9204 * progspace.c (add_program_space): Rename to...
9205 (program_space::program_space): ... this.
9206 (release_program_space): Rename to...
9207 (program_space::~program_space): ... this.
9208 (delete_program_space): Use delete to delete program_space.
9209 (initialize_progspace): Use new to allocate program_space.
9210 * inferior.c (add_inferior_with_spaces): Likewise.
9211 (clone_inferior_command): Likewise.
9212 * infrun.c (follow_fork_inferior): Likewise.
9213 (handle_vfork_child_exec_or_exit): Likewise.
9215 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9217 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9218 (delim_string_to_char_ptr_vec): Return std::vector of
9219 gdb::unique_xmalloc_ptr.
9220 (dirnames_to_char_ptr_vec_append): Take std::vector of
9221 gdb::unique_xmalloc_ptr.
9222 (dirnames_to_char_ptr_vec): Return std::vector of
9223 gdb::unique_xmalloc_ptr.
9224 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9225 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9226 (delim_string_to_char_ptr_vec): Return an std::vector of
9227 gdb::unique_xmalloc_ptr, adjust the code.
9228 (dirnames_to_char_ptr_vec_append): Take an std::vector of
9229 gdb::unique_xmalloc_ptr, adjust the code.
9230 (dirnames_to_char_ptr_vec): Return an std::vector of
9231 gdb::unique_xmalloc_ptr, adjust the code.
9232 * auto-load.c (auto_load_safe_path_vec): Change type to
9233 std::vector of gdb::unique_xmalloc_ptr.
9234 (auto_load_expand_dir_vars): Return an std::vector of
9235 gdb::unique_xmalloc_ptr, adjust the code.
9236 (auto_load_safe_path_vec_update): Adjust.
9237 (filename_is_in_auto_load_safe_path_vec): Adjust.
9238 (auto_load_objfile_script_1): Adjust.
9239 * build-id.c (build_id_to_debug_bfd): Adjust.
9240 * linux-thread-db.c (thread_db_load_search): Adjust.
9241 * source.c (add_path): Adjust.
9243 * symfile.c (find_separate_debug_file): Adjust.
9244 * utils.c (do_free_char_ptr_vec): Remove.
9245 (make_cleanup_free_char_ptr_vec): Remove.
9247 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
9250 * common/pathstuff.c: Conditionally include "<windows.h>".
9252 2018-03-01 Georg Sauthoff <mail@georg.so>
9255 * gcore.in: Quote variables and switch interpreter to bash.
9257 2018-03-01 Tom Tromey <tom@tromey.com>
9259 * dwarf2read.c (alloc_discriminant_info): Fix default_index
9260 assertion. Add assertion for discriminant_index.
9261 (quirk_rust_enum): Use correct base type name in univariant case.
9263 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
9265 * record.c (get_call_history_modifiers): Return a
9267 (cmd_record_call_history): Adjust.
9268 * record-btrace.c (record_btrace_call_history): Adjust.
9269 (record_btrace_call_history_range): Adjust.
9270 (record_btrace_call_history_from): Adjust.
9271 * target-debug.h (target_debug_print_record_print_flags): New.
9272 * target-delegates.c: Re-generate.
9273 * target.c (target_call_history): Change flags type.
9274 (target_call_history_from): Likewise.
9275 (target_call_history_range): Likewise.
9276 * target.h (struct target_ops) <target_call_history>: Likewise.
9277 (target_call_history_from): Likewise.
9278 (target_call_history_range): Likewise.
9280 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9281 Simon Marchi <simon.marchi@polymtl.ca>
9283 * common/common-utils.c: Include "sys/stat.h".
9284 (is_regular_file): Move here from "source.c"; change return
9286 * common/common-utils.h (is_regular_file): New prototype.
9287 * common/pathstuff.c (contains_dir_separator): New function.
9288 * common/pathstuff.h (contains_dir_separator): New prototype.
9289 * source.c: Don't include "sys/stat.h".
9290 (is_regular_file): Move to "common/common-utils.c".
9292 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9294 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9295 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9296 * auto-load.c: Include "common/pathstuff.h".
9297 * common/common-def.h (current_directory): Move here.
9298 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9300 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9302 * common/pathstuff.c: New file.
9303 * common/pathstuff.h: New file.
9304 * compile/compile.c: Include "common/pathstuff.h".
9305 * defs.h (current_directory): Move to "common/common-defs.h".
9306 * dwarf2read.c: Include "common/pathstuff.h".
9308 * guile/scm-safe-call.c: Likewise.
9309 * linux-thread-db.c: Likewise.
9311 * nto-tdep.c: Likewise.
9312 * objfiles.c: Likewise.
9313 * source.c: Likewise.
9314 * symtab.c: Likewise.
9315 * utils.c: Include "common/pathstuff.h".
9316 (gdb_realpath): Move to "common/pathstuff.c".
9317 (gdb_realpath_keepfile): Likewise.
9318 (gdb_abspath): Likewise.
9319 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9320 (gdb_realpath_keepfile): Likewise.
9321 (gdb_abspath): Likewise.
9323 2018-02-28 John Baldwin <jhb@FreeBSD.org>
9325 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9326 wildcard process pid for super_resume for kernels with a
9329 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
9331 * compile/compile.c (get_args): Add additional comments
9332 explaining function.
9334 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
9335 Tom Tromey <tom@tromey.com>
9337 * target.h (memory_write_request_s): Remove typedef. Don't define
9339 (target_write_memory_blocks): Change argument to std::vector.
9340 (struct memory_write_request): Add constructor.
9341 * target-memory.c (compare_block_starting_address): Return bool.
9342 Change argument types.
9343 (claim_memory): Change arguments to use std::vector.
9344 (split_regular_and_flash_blocks, blocks_to_erase)
9345 (compute_garbled_blocks): Likewise.
9346 (cleanup_request_data, cleanup_write_requests_vector): Remove.
9347 (target_write_memory_blocks): Change argument to std::vector.
9348 * symfile.c (struct load_section_data): Add constructor and
9349 destructor. Use std::vector for "requests".
9350 (struct load_progress_data): Add initializers.
9351 (load_section_callback): Update. Use "new".
9352 (clear_memory_write_data): Remove.
9353 (generic_load): Update.
9355 2018-02-27 Alan Hayward <alan.hayward@arm.com>
9357 * arch/aarch64.h: Use common/tdesc.h.
9359 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9361 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9362 architecture with a 64-bit ABI.
9364 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9366 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9367 ahead of target description loading.
9369 2018-02-26 Tom Tromey <tom@tromey.com>
9371 * stack.c (backtrace_command_1): Update.
9372 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9374 * python/py-framefilter.c (py_print_frame)
9375 (gdbpy_apply_frame_filter): Change type of "flags".
9376 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9378 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9379 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9380 * extension.h (enum frame_filter_flag): Rename from
9382 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9383 (apply_ext_lang_frame_filter): Change type of "flags".
9384 * extension.c (apply_ext_lang_frame_filter): Change type of
9386 * extension-priv.h (struct extension_language_ops)
9387 <apply_frame_filter>: Change type of "flags".
9389 2018-02-26 Tom Tromey <tom@tromey.com>
9392 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
9393 off-by-one in py_end computation.
9394 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9396 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9399 2018-02-26 Tom Tromey <tom@tromey.com>
9401 * dwarf2read.c (struct variant_field): New.
9402 (struct nextfield) <variant>: New field.
9403 (dwarf2_add_field): Handle DW_TAG_variant_part.
9404 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9405 discriminated union.
9406 (read_structure_type): Handle DW_TAG_variant_part.
9407 (handle_struct_member_die): New function, extracted from
9408 process_structure_scope. Handle DW_TAG_variant.
9409 (process_structure_scope): Handle discriminated unions. Call
9410 handle_struct_member_die.
9412 2018-02-26 Tom Tromey <tom@tromey.com>
9414 * rust-lang.h (rust_last_path_segment): Declare.
9415 * rust-lang.c (rust_last_path_segment): Now public. Change
9417 (struct disr_info): Remove.
9418 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9419 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9420 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9421 (rust_enum_p, rust_enum_variant): New function.
9422 (rust_underscore_fields): Remove "offset" parameter.
9423 (rust_print_enum): New function.
9424 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9425 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9426 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
9428 (rust_internal_print_type): New function, from rust_print_type.
9430 (rust_print_type): Call rust_internal_print_type.
9431 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9432 Update enum handling.
9433 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9434 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9435 (rust_union_quirks): New functions.
9436 (process_full_comp_unit, process_full_type_unit): Call
9438 (process_structure_scope): Update rust_unions if necessary.
9440 2018-02-26 Tom Tromey <tom@tromey.com>
9442 * value.h (value_union_variant): Declare.
9443 * valops.c (value_union_variant): New function.
9444 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9445 (struct discriminant_info): New.
9446 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9448 (struct main_type) <flag_discriminated_union>: New field.
9450 2018-02-26 Tom Tromey <tom@tromey.com>
9452 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9453 unittests/unpack-selftests.c.
9454 * unittests/unpack-selftests.c: New file.
9455 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9457 2018-02-26 Yao Qi <yao.qi@linaro.org>
9459 * dwarf2read.c (struct partial_die_info) <read>: New method.
9460 (read_partial_die): Remove the declaration.
9461 (load_partial_dies): Update.
9462 (partial_die_info::partial_die_info):
9463 (read_partial_die): Change it to partial_die_info::read.
9465 2018-02-26 Yao Qi <yao.qi@linaro.org>
9467 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9468 (fixup_partial_die): Remove declaration.
9469 (scan_partial_symbols): Update.
9470 (partial_die_parent_scope): Likewise.
9471 (partial_die_full_name): Likewise.
9472 (fixup_partial_die): Change it to partial_die_info::fixup.
9474 2018-02-26 Yao Qi <yao.qi@linaro.org>
9476 * dwarf2read.c (read_partial_die): Update the declaration.
9477 (load_partial_dies): Caller update.
9478 (read_partial_die): Remove one argument abbrev_len.
9480 2018-02-26 Yao Qi <yao.qi@linaro.org>
9482 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9483 assignment operator.
9484 (load_partial_dies): Use ctor and copy ctor.
9485 (read_partial_die): Update.
9486 (dwarf2_cu::find_partial_die): Use ctor.
9488 2018-02-26 Yao Qi <yao.qi@linaro.org>
9490 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9491 (find_partial_die_in_comp_unit): Change it to
9492 dwarf2_cu::find_partial_die.
9493 (find_partial_die): Update.
9495 2018-02-26 Yao Qi <yao.qi@linaro.org>
9497 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9500 2018-02-26 Yao Qi <yao.qi@linaro.org>
9502 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9504 2018-02-26 Alan Hayward <alan.hayward@arm.com>
9506 * arch/amd64.h: Use common/tdesc.h.
9507 * arch/i386.c: Likewise.
9508 * arch/i386.h: Likewise.
9509 * arch/tic6x.c: Likewise.
9510 * arch/tdesc.h: Move file from here...
9511 * common/tdesc.h: ...to here.
9512 * features/aarch64-core.c: Regenerate.
9513 * features/aarch64-fpu.c: Regenerate.
9514 * features/i386/32bit-avx.c: Regenerate.
9515 * features/i386/32bit-avx512.c: Regenerate.
9516 * features/i386/32bit-core.c: Regenerate.
9517 * features/i386/32bit-linux.c: Regenerate.
9518 * features/i386/32bit-mpx.c: Regenerate.
9519 * features/i386/32bit-pkeys.c: Regenerate.
9520 * features/i386/32bit-sse.c: Regenerate.
9521 * features/i386/64bit-avx.c: Regenerate.
9522 * features/i386/64bit-avx512.c: Regenerate.
9523 * features/i386/64bit-core.c: Regenerate.
9524 * features/i386/64bit-linux.c: Regenerate.
9525 * features/i386/64bit-mpx.c: Regenerate.
9526 * features/i386/64bit-pkeys.c: Regenerate.
9527 * features/i386/64bit-segments.c: Regenerate.
9528 * features/i386/64bit-sse.c: Regenerate.
9529 * features/i386/x32-core.c: Regenerate.
9530 * features/tic6x-c6xp.c: Regenerate.
9531 * features/tic6x-core.c: Regenerate.
9532 * features/tic6x-gp.c: Regenerate.
9533 * target-descriptions.c: Use common/tdesc.h.
9534 * target-descriptions.h: Likewise.
9536 2018-02-24 Tom Tromey <tom@tromey.com>
9538 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9539 (try_thread_db_load_from_dir, thread_db_load_search): Use
9541 (info_auto_load_libthread_db_compare): Return bool. Change
9543 (info_auto_load_libthread_db): Use std::vector, std::string.
9546 2018-02-24 Tom Tromey <tom@tromey.com>
9548 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9550 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9552 * gdbarch.c: Rebuild.
9553 * gdbarch.h: Rebuild.
9554 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9555 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9556 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9559 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9561 * gdbtypes.h (sect_offset): Change type to uint64_t.
9562 (sect_offset_str): New function.
9563 * dwarf2read.c (create_addrmap_from_aranges): Use
9565 (error_check_comp_unit_head): Likewise.
9566 (create_debug_type_hash_table): Likewise.
9567 (read_cutu_die_from_dwo): Likewise.
9568 (init_cutu_and_read_dies): Likewise.
9569 (init_cutu_and_read_dies_no_follow): Likewise.
9570 (process_psymtab_comp_unit_reader): Likewise.
9571 (partial_die_parent_scope): Likewise.
9572 (peek_die_abbrev): Likewise.
9573 (process_queue): Likewise.
9574 (dwarf2_physname): Likewise.
9575 (read_namespace_alias): Likewise.
9576 (read_import_statement): Likewise.
9577 (create_dwo_cu_reader): Likewise.
9578 (create_cus_hash_table): Likewise.
9579 (lookup_dwo_cutu): Likewise.
9580 (inherit_abstract_dies): Likewise.
9581 (read_func_scope): Likewise.
9582 (read_call_site_scope): Likewise.
9583 (dwarf2_add_member_fn): Likewise.
9584 (read_common_block): Likewise.
9585 (read_module_type): Likewise.
9586 (read_typedef): Likewise.
9587 (read_subrange_type): Likewise.
9588 (load_partial_dies): Likewise.
9589 (read_partial_die): Likewise.
9590 (find_partial_die): Likewise.
9591 (read_str_index): Likewise.
9592 (dwarf2_string_attr): Likewise.
9593 (build_error_marker_type): Likewise.
9594 (lookup_die_type): Likewise.
9595 (dump_die_shallow): Likewise.
9596 (follow_die_ref): Likewise.
9597 (dwarf2_fetch_die_loc_sect_off): Likewise.
9598 (dwarf2_fetch_constant_bytes): Likewise.
9599 (follow_die_sig): Likewise.
9600 (get_signatured_type): Likewise.
9601 (get_DW_AT_signature_type): Likewise.
9602 (dwarf2_find_containing_comp_unit): Likewise.
9603 (set_die_type): Likewise.
9605 2018-02-21 John Baldwin <jhb@FreeBSD.org>
9607 * arch/aarch64.c: Include "common-defs.h".
9608 * arch/amd64.c: Likewise.
9609 * arch/i386.c: Likewise.
9611 2018-02-21 Tom Tromey <tom@tromey.com>
9613 * value.h: (extract_field_op): Update.
9614 * eval.c (extract_field_op): Return a const char *.
9615 * expression.h (parse_expression_for_completion): Update.
9616 * completer.c (complete_expression): Update.
9617 (add_struct_fields): Make fieldname const.
9618 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9619 (mark_completion_tag, parse_exp_in_context_1): Update.
9620 (parse_expression_for_completion): Change "name" to
9621 unique_xmalloc_ptr*.
9623 2018-02-21 Tom Tromey <tom@tromey.com>
9625 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9627 2018-02-21 Yao Qi <yao.qi@linaro.org>
9629 * avr-tdep.c (avr_read_pc): Change parameter type to
9631 * gdbarch.sh (read_pc): Likewise.
9632 * gdbarch.c: Re-generated.
9633 * gdbarch.h: Re-generated.
9634 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9636 * ia64-tdep.c (ia64_read_pc): Likewise.
9637 * mips-tdep.c (mips_read_pc): Likewise.
9638 * spu-tdep.c (spu_read_pc): Likewise.
9640 2018-02-21 Yao Qi <yao.qi@linaro.org>
9642 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9643 * regcache-dump.c: New file.
9644 * regcache.c: Move register_dump to regcache-dump.c.
9645 (maintenance_print_registers): Likewise.
9646 (maintenance_print_raw_registers): Likewise.
9647 (maintenance_print_cooked_registers): Likewise.
9648 (maintenance_print_register_groups): Likewise.
9649 (maintenance_print_remote_registers): Likewise.
9650 (_initialize_regcache): Likewise.
9651 * regcache.h (register_dump): Moved from regcache.c.
9653 2018-02-21 Yao Qi <yao.qi@linaro.org>
9655 * regcache.c (regcache::regcache): Update.
9656 (regcache::invalidate): Move it to detached_regcache::invalidate.
9657 (get_thread_arch_aspace_regcache): Update.
9658 (regcache::raw_update): Update.
9659 (regcache::cooked_read): Remove some code.
9660 (regcache::cooked_read_value): Likewise.
9661 (regcache::raw_write): Remove assert on m_readonly_p.
9662 (regcache::raw_supply_integer): Move it to
9663 detached_regcache::raw_supply_integer.
9664 (regcache::raw_supply_zeroed): Likewise.
9665 * regcache.h (detached_regcache) <raw_supply_integer>: New
9667 <raw_supply_zeroed, invalidate>: Likewise.
9668 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9669 <invalidate>: Likewise.
9670 <m_readonly_p>: Removed.
9672 2018-02-21 Yao Qi <yao.qi@linaro.org>
9674 * infcmd.c (get_return_value): Let stop_regs point to
9675 get_current_regcache.
9676 * regcache.c (regcache::regcache): Remove.
9677 (register_dump_reg_buffer): New class.
9678 (regcache_print): Adjust.
9679 * regcache.h (regcache): Remove constructors.
9681 2018-02-21 Yao Qi <yao.qi@linaro.org>
9683 * regcache.c (class register_dump): New class.
9684 (register_dump_regcache, register_dump_none): New class.
9685 (register_dump_remote, register_dump_groups): New class.
9686 (regcache_print): Update.
9687 * regcache.h (regcache_dump_what): Move it to regcache.c.
9688 (regcache) <dump>: Remove.
9690 2018-02-21 Yao Qi <yao.qi@linaro.org>
9692 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9694 (jit_unwind_reg_set_impl): Call raw_supply.
9695 (jit_frame_sniffer): Use reg_buffer_rw.
9696 * record-full.c (record_full_core_regbuf): Change its type.
9697 (record_full_core_open_1): Use reg_buffer_rw.
9698 (record_full_close): Likewise.
9699 (record_full_core_fetch_registers): Use regcache->raw_supply.
9700 (record_full_core_store_registers): Likewise.
9701 * regcache.c (regcache::get_register_status): Move it to
9703 (regcache_raw_set_cached_value): Remove.
9704 (regcache::raw_set_cached_value): Remove.
9705 (regcache::raw_write): Call raw_supply.
9706 (regcache::raw_supply): Move it to reg_buffer_rw.
9707 * regcache.h (regcache_raw_set_cached_value): Remove.
9708 (reg_buffer_rw): New class.
9710 2018-02-21 Yao Qi <yao.qi@linaro.org>
9712 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9713 readonly_detached_regcache.
9714 (dummy_frame_prev_register): Use regcache->cooked_read.
9715 * frame.c (frame_save_as_regcache): Change return type.
9716 (frame_pop): Update.
9717 * frame.h (frame_save_as_regcache): Update declaration.
9718 * inferior.h (get_infcall_suspend_state_regcache): Update
9720 * infrun.c (infcall_suspend_state) <registers>: use
9721 readonly_detached_regcache.
9722 (save_infcall_suspend_state): Don't use regcache_dup.
9723 (get_infcall_suspend_state_regcache): Change return type.
9724 * linux-fork.c (struct fork_info) <savedregs>: Change to
9725 readonly_detached_regcache.
9727 (fork_save_infrun_state): Don't use regcache_dup.
9728 (info_checkpoints_command): Adjust.
9729 * mi/mi-main.c (register_changed_p): Update declaration.
9730 (mi_cmd_data_list_changed_registers): Use
9731 readonly_detached_regcache.
9732 (register_changed_p): Change parameter type to
9733 readonly_detached_regcache.
9734 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9735 readonly_detached_regcache.
9736 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9737 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9739 (regcache::save): Move it to reg_buffer.
9740 (regcache::restore): Change parameter type.
9741 (regcache_dup): Remove.
9742 * regcache.h (reg_buffer) <save>: New method.
9743 (readonly_detached_regcache): New class.
9744 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9745 readonly_detached_regcache.
9746 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9748 2018-02-21 Yao Qi <yao.qi@linaro.org>
9750 * frame.c (frame_save_as_regcache): Use regcache method save.
9751 (frame_pop): Use regcache method restore.
9752 * infrun.c (restore_infcall_suspend_state): Likewise.
9753 * linux-fork.c (fork_load_infrun_state): Likewise.
9754 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9756 * regcache.c (regcache_save): Remove.
9757 (regcache::restore): More asserts.
9758 (regcache_cpy): Remove.
9759 * regcache.h (regcache_save): Remove the declaration.
9760 (regcache::restore): Move from private to public.
9761 Remove the friend declaration of regcache_cpy.
9762 (regcache_cpy): Remove declaration.
9764 2018-02-21 Yao Qi <yao.qi@linaro.org>
9766 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9767 parameter type to 'readable_regcache *'.
9768 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9769 * arm-tdep.c (arm_neon_quad_read): Likewise.
9770 (arm_pseudo_read): Likewise.
9771 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9772 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9773 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9774 * gdbarch.c: Re-generated.
9775 * gdbarch.h: Re-generated.
9776 * gdbarch.sh (pseudo_register_read): Change parameter type to
9777 'readable_regcache *'.
9778 (pseudo_register_read_value): Likewise.
9779 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9780 (h8300_pseudo_register_read): Likewise.
9781 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9782 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9783 (i386_pseudo_register_read_into_value): Likewise.
9784 (i386_pseudo_register_read_value): Likewise.
9785 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9787 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9788 * m32c-tdep.c (m32c_raw_read): Likewise.
9789 (m32c_read_flg): Likewise.
9790 (m32c_banked_register): Likewise.
9791 (m32c_banked_read): Likewise.
9792 (m32c_sb_read): Likewise.
9793 (m32c_part_read): Likewise.
9794 (m32c_cat_read): Likewise.
9795 (m32c_r3r2r1r0_read): Likewise.
9796 (m32c_pseudo_register_read): Likewise.
9797 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9798 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9799 (mep_pseudo_cr64_read): Likewise.
9800 (mep_pseudo_register_read): Likewise.
9801 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9802 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9803 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9804 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9805 (regcache::cooked_read): Likewise.
9806 (regcache::cooked_read_value): Likewise.
9807 (regcache_cooked_read_signed):
9808 (regcache::cooked_read): Likewise.
9809 * regcache.h (readable_regcache): New class.
9810 (regcache): Inherit readable_regcache. Move some methods to
9812 * rl78-tdep.c (rl78_pseudo_register_read): Change
9813 parameter type to 'readable_regcache *'.
9814 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9815 (e500_pseudo_register_read): Change parameter type to
9816 'readable_regcache *'.
9817 (dfp_pseudo_register_read): Likewise.
9818 (vsx_pseudo_register_read): Likewise.
9819 (efpr_pseudo_register_read): Likewise.
9820 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9821 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9822 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9823 (sh64_pseudo_register_read): Likewise.
9824 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9825 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9826 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9827 (spu_pseudo_register_read): Likewise.
9828 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9829 (xtensa_pseudo_register_read): Likewise.
9831 2018-02-21 Yao Qi <yao.qi@linaro.org>
9833 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9834 (regcache::arch): Move it to reg_buffer::arch.
9835 (regcache::register_buffer): Likewise.
9836 (regcache::assert_regnum): Likewise.
9837 (regcache::num_raw_registers): Likewise.
9838 * regcache.h (reg_buffer): New class.
9839 (regcache): Inherit reg_buffer.
9841 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9843 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9844 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9846 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9848 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9850 2018-02-19 Alan Hayward <alan.hayward@arm.com>
9852 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9853 (SFILES): Remove common/*.c files.
9854 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9855 * common/common.host: Add common reference.
9856 * configure.ac: Likewise.
9857 * configure: Regenerate.
9859 2018-02-16 Yao Qi <yao.qi@linaro.org>
9861 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9862 (block_initialize_namespace): Use new.
9863 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9864 (dwarf2_free_objfile): Use delete.
9865 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9866 (copy_type_recursive): Use new.
9867 * gdb_obstack.h (allocate_on_obstack): New.
9869 2018-02-15 Yao Qi <yao.qi@linaro.org>
9872 * inferior.c (exit_inferior_1): Reset inf->control.
9874 2018-02-15 Joel Brobecker <brobecker@adacore.com>
9876 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9879 2018-02-14 Pedro Alves <palves@redhat.com>
9881 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9882 frame_cleanup_after_sniffer on exception.
9884 2018-02-14 Tom Tromey <tom@tromey.com>
9886 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9888 (solib_bfd_open): Make pathname const.
9889 * solib.c (solib_bfd_open): Make pathname const.
9890 * solib-spu.c (spu_bfd_fopen): Make name const.
9891 (spu_bfd_open): Make pathname const.
9892 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9893 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9895 2018-02-14 Tom Tromey <tom@tromey.com>
9897 * symfile.c (symfile_bfd_open): Update.
9898 * source.h (openp, source_full_path_of, find_and_open_source):
9899 Change argument type to unique_xmalloc_ptr.
9900 * source.c (openp): Take a unique_xmalloc_ptr.
9901 (source_full_path_of, find_and_open_source): Likewise.
9902 (open_source_file, symtab_to_fullname): Update.
9903 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9905 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9906 (exec_file_find): Update.
9907 * psymtab.c (psymtab_to_fullname): Update.
9908 * nto-tdep.h (nto_find_and_open_solib): Update.
9909 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9911 * exec.c (exec_file_attach): Update.
9912 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9913 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9915 2018-02-14 Tom Tromey <tom@tromey.com>
9917 * solib.c: Include source.h.
9918 * nto-tdep.c: Include source.h.
9919 * mi/mi-cmd-env.c: Include source.h.
9920 * infcmd.c: Include source.h.
9921 * exec.c: Include source.h.
9922 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9923 (add_path, directory_switch, source_path, init_source_path): Move
9925 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9926 (add_path, directory_switch, source_path, init_source_path):
9929 2018-02-14 Tom Tromey <tom@tromey.com>
9931 * solist.h (exec_file_find, solib_find): Return
9933 (solib_bfd_fopen): Take a const char *.
9934 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9935 (exec_file_find, solib_find): Likewise.
9936 (solib_bfd_fopen): Do not take ownership of "pathname".
9937 (solib_bfd_open): Use unique_xmalloc_ptr.
9938 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9939 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9940 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9941 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9943 2018-02-14 Joel Brobecker <brobecker@adacore.com>
9945 * ada-lang.c (name_match_type_from_name): Remove reference to
9946 ada_name_for_lookup in function's documentation.
9947 * ada-lang.h (ada_name_for_lookup): Delete declaration.
9949 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9951 * defs.h (enum openp_flags): New enum.
9952 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9953 Move to enum openp_flags.
9954 (openp_flags): New enum flags.
9955 (openp): Change parameter type to openp_flags.
9956 * source.c (openp): Change parameter type to openp_flags.
9957 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9958 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9960 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9962 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9965 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
9967 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9969 (class dwarf2_queue_guard): ...the destructor of this new class.
9970 (dw2_do_instantiate_symtab): Create instance of the new class
9971 dwarf2_queue_guard, remove cleanup.
9973 2018-02-09 Tom Tromey <tom@tromey.com>
9975 * source.c (find_source_lines): Don't reference past the end of
9978 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9980 * remote.c (remote_btrace_maybe_reopen): Change error message.
9981 * btrace.c (btrace_enable): Likewise.
9982 (parse_xml_btrace): Likewise.
9983 (parse_xml_btrace_conf): Likewise.
9985 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9987 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9988 (linux_enable_pt, linux_enable_bts): Call
9989 diagnose_perf_event_open_fail.
9991 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9993 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9994 Remove parameter and change return type. Update callers. Move it.
9995 (linux_enable_bts, linux_enable_pt): Improve error message.
9996 (linux_enable_pt): Remove zero buffer size check.
9997 (linux_enable_btrace): Improve error messages. Remove NULL return
10000 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10002 * btrace.c (btrace_enable): Remove target_supports_btrace call.
10003 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10004 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10005 (linux_supports_pt, linux_supports_btrace): Remove.
10006 (linux_enable_bts): Call cpu_supports_bts.
10007 * nat/linux-btrace.h (linux_supports_btrace): Remove.
10008 * remote.c (remote_supports_btrace): Remove.
10009 (init_remote_ops): Remove remote_supports_btrace.
10010 * target-delegates.c: Regenerated.
10011 * target.c (target_supports_btrace): Remove.
10012 * target.h (target_ops) <to_supports_btrace>: Remove
10013 (target_supports_btrace): Remove.
10014 * x86-linux-nat.c (x86_linux_create_target): Remove
10015 linux_supports_btrace.
10017 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10019 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10021 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10022 exception and use message in own exception.
10024 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10026 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10027 (perf_event_pt_event_type): Use gdb_file_up.
10028 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10029 scoped_fd, and scoped_mmap.
10031 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10033 * common/scoped_mmap.h: New.
10034 * unittests/scoped_mmap-selftest.c: New.
10035 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10036 unittests/scoped_mmap-selftest.c.
10038 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10040 * common/scoped_fd.h: New.
10041 * unittests/scoped_fd-selftest.c: New.
10042 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10043 unittests/scoped_fd-selftest.c.
10045 2018-02-09 Tom Tromey <tom@tromey.com>
10047 * auto-load.c (auto_load_section_scripts): Use
10048 gdb::unique_xmalloc_ptr.
10050 2018-02-09 Tom Tromey <tom@tromey.com>
10052 * auto-load.c (execute_script_contents): Use std::string.
10054 2018-02-09 Joel Brobecker <brobecker@adacore.com>
10056 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10057 Python function, rather than a new command.
10059 2018-02-08 Tom Tromey <tom@tromey.com>
10061 * solib.c (solib_find_1): Use std::string.
10062 (solib_bfd_fopen): Use unique_xmalloc_ptr.
10064 2018-02-08 Tom Tromey <tom@tromey.com>
10066 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10068 2018-02-08 Tom Tromey <tom@tromey.com>
10070 * source.c (find_source_lines): Use gdb::def_vector.
10072 2018-02-08 Tom Tromey <tom@tromey.com>
10074 * macrocmd.c (struct temporary_macro_definition): New.
10075 (macro_define_command): Use temporary_macro_definition. Remove
10077 (free_macro_definition_ptr): Remove.
10079 2018-02-08 Tom Tromey <tom@tromey.com>
10081 * macroexp.c (maybe_expand): Use std::string.
10083 2018-02-08 Tom Tromey <tom@tromey.com>
10085 * macroexp.c (struct macro_buffer): Add initializers for some
10087 (init_buffer, init_shared_buffer, free_buffer)
10088 (free_buffer_return_text): Remove.
10089 (macro_buffer): New constructors.
10090 (~macro_buffer): New destructor.
10091 (macro_buffer::set_shared): New method.
10092 (macro_buffer::resize_buffer, macro_buffer::appendc)
10093 (macro_buffer::appendmem): Now methods, not free functions.
10094 (set_token, append_tokens_without_splicing, stringify)
10095 (macro_stringify): Update.
10096 (gather_arguments): Change return type. Remove argc_p argument,
10097 add args_ptr argument. Use std::vector.
10098 (substitute_args): Remove argc argument. Accept std::vector.
10099 (expand): Update. Use std::vector.
10100 (scan, macro_expand, macro_expand_next): Update.
10102 2018-02-08 Tom Tromey <tom@tromey.com>
10104 * symtab.c (default_collect_symbol_completion_matches_break_on):
10105 Use unique_xmalloc_ptr.
10106 * macroscope.h: (sal_macro_scope, user_macro_scope)
10107 (default_macro_scope): Return unique_xmalloc_ptr.
10108 * macroscope.c (sal_macro_scope, user_macro_scope)
10109 (default_macro_scope): Return unique_xmalloc_ptr.
10110 * macroexp.h (macro_expand, macro_expand_once): Return
10111 unique_xmalloc_ptr.
10112 * macroexp.c (macro_expand, macro_expand_once): Return
10113 unique_xmalloc_ptr.
10114 * macrocmd.c (macro_expand_command, macro_expand_once_command)
10115 (info_macro_command, info_macros_command): Use
10116 unique_xmalloc_ptr.
10117 * compile/compile-c-support.c (write_macro_definitions): Use
10118 unique_xmalloc_ptr.
10119 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10121 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
10123 * value.c (value_static_field): Assign field type instead of
10124 containing type when returning an optimized out value.
10126 2018-02-06 Yao Qi <yao.qi@linaro.org>
10128 * ft32-tdep.c (ft32_read_pc): Remove.
10129 (ft32_write_pc): Remove.
10130 (ft32_gdbarch_init): Update.
10131 * m32r-tdep.c (m32r_read_pc): Remove.
10132 (m32r_gdbarch_init): Update.
10133 * mep-tdep.c (mep_read_pc): Remove.
10134 (mep_gdbarch_init): Update.
10135 * microblaze-tdep.c (microblaze_write_pc): Remove.
10136 (microblaze_gdbarch_init): Update.
10137 * mn10300-tdep.c (mn10300_read_pc): Remove.
10138 (mn10300_write_pc): Remove.
10139 (mn10300_gdbarch_init): Update.
10140 * moxie-tdep.c (moxie_read_pc): Remove.
10141 (moxie_write_pc): Remove.
10142 (moxie_gdbarch_init): Update.
10144 2018-02-06 Yao Qi <yao.qi@linaro.org>
10146 * expprint.c (print_subexp_standard): Handle
10147 OP_F77_UNDETERMINED_ARGLIST.
10148 (dump_subexp_body_standard): Likewise.
10150 2018-02-05 Alan Hayward <alan.hayward@arm.com>
10152 * target-descriptions.c (tdesc_element_visitor) Add empty
10154 (tdesc_type): Move make_gdb_type from here.
10155 (tdesc_type_builtin): Likewise.
10156 (tdesc_type_vector): Likewise.
10157 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10158 (make_gdb_type_struct): Move from tdesc_type_with_fields.
10159 (make_gdb_type_union): Likewise.
10160 (make_gdb_type_flags): Likewise.
10161 (make_gdb_type_enum): Likewise.
10162 (make_gdb_type): New function.
10163 (tdesc_register_type): Use static make_gdb_type.
10165 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
10167 * infcmd.c (default_print_one_register_info): Align natural-format
10168 column values consistently one under another.
10169 (pad_to_column): New function.
10171 2018-02-05 Joel Brobecker <brobecker@adacore.com>
10173 * dwarf2read.c (dwarf2_physname): Move commment.
10175 2018-02-01 Leszek Swirski <leszeks@google.com>
10177 * varobj.c (varobj_formatted_print_options): Allow recursive
10178 pretty printing if pretty printing is enabled.
10180 2018-02-01 Leszek Swirski <leszeks@google.com>
10182 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10183 names after a structop as a filename.
10185 2018-02-01 Yao Qi <yao.qi@linaro.org>
10187 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10188 (arm_record_coproc_data_proc): Likewise.
10190 2018-02-01 Yao Qi <yao.qi@linaro.org>
10192 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10194 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
10196 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10197 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10199 2018-01-31 Pedro Alves <palves@redhat.com>
10201 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10202 * inflow.c (child_terminal_save_inferior): Wrap reference to
10203 tcgetpgrp in HAVE_TERMIOS_H.
10204 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10206 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10207 always iterate over all inferiors.
10208 (gdbsim_cntrl_c): Adjust.
10209 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10211 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10213 * gdbtypes.c (lookup_array_range_type): Make sure the array's
10214 index type is objfile-owned if the element type is as well.
10216 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10220 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
10222 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10223 "features/s390x-linux64.c".
10224 (_initialize_s390_linux_tdep): Remove initialization of tdescs
10225 s390_linux32 and s390x_linux64.
10226 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10228 * s390-tdep.c: Include "features/s390-linux32.c" and
10229 "features/s390x-linux64.c".
10230 (s390_tdesc_valid): Add check for tdesc_has_registers.
10231 (s390_gdbarch_init): Make sure there is always a valid tdesc.
10232 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10233 tdesc_s390x_linux64.
10234 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10235 tdesc_s390x_linux64 to...
10236 * s390-tdep.h: ...here.
10238 2018-01-30 Pedro Alves <palves@redhat.com>
10241 * config.in, configure: Regenerate.
10242 * configure.ac: Check for getpgid.
10243 * go32-nat.c (go32_pass_ctrlc): New.
10244 (go32_target): Install it.
10245 * inf-child.c (inf_child_target): Install
10246 child_terminal_save_inferior, child_pass_ctrlc and
10248 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
10249 (inf_ptrace_target): No longer install it.
10250 * infcmd.c (interrupt_target_1): Adjust.
10251 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10252 (child_interrupt): Declare.
10253 (inferior::terminal_state): New.
10254 * inflow.c (struct terminal_info): Update comments.
10255 (inferior_process_group): Delete.
10256 (terminal_is_ours): Delete.
10257 (gdb_tty_state): New.
10258 (child_terminal_init): Adjust.
10259 (is_gdb_terminal, sharing_input_terminal_1)
10260 (sharing_input_terminal): New functions.
10261 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
10262 Set the process's actual process group in the foreground if
10263 possible. Handle is_ours_for_output/is_ours distinction. Don't
10264 mark terminal as the inferior's if not sharing GDB's terminal.
10265 Don't check attach_flag.
10266 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
10267 pass down a target_terminal_state.
10268 (child_terminal_save_inferior): New, factored out from ...
10269 (child_terminal_ours_1): ... this. Handle
10270 target_terminal_state::is_ours_for_output.
10271 (child_interrupt, child_pass_ctrlc): New.
10272 (inflow_inferior_exit): Clear the inferior's terminal_state.
10273 (copy_terminal_info): Copy the inferior's terminal state.
10274 (_initialize_inflow): Remove reference to terminal_is_ours.
10275 * inflow.h (inferior_process_group): Delete.
10276 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10277 * procfs.c (procfs_target): Don't install procfs_interrupt.
10278 (procfs_interrupt): Delete.
10279 * remote.c (remote_serial_quit_handler): Adjust.
10280 (remote_interrupt): Remove ptid parameter. Adjust.
10281 * target-delegates.c: Regenerate.
10282 * target.c: Include "terminal.h".
10283 (target_terminal::terminal_state): Rename to ...
10284 (target_terminal::m_terminal_state): ... this.
10285 (target_terminal::init): Adjust.
10286 (target_terminal::inferior): Adjust to per-inferior
10288 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10289 (target_terminal::ours, target_terminal::ours_for_output): Use
10290 target_terminal_is_ours_kind.
10291 (target_interrupt): Remove ptid parameter. Adjust.
10292 (default_target_pass_ctrlc): Adjust.
10293 * target.h (target_ops::to_terminal_save_inferior): New field.
10294 (target_ops::to_interrupt): Remove ptid_t parameter.
10295 (target_interrupt): Remove ptid_t parameter. Update comment.
10296 (target_pass_ctrlc): Update comment.
10297 * target/target.h (target_terminal_state): New scoped enum,
10298 factored out of ...
10299 (target_terminal::terminal_state): ... here.
10300 (target_terminal::inferior): Update comments.
10301 (target_terminal::restore_inferior): New.
10302 (target_terminal::is_inferior, target_terminal::is_ours)
10303 (target_terminal::is_ours_for_output): Adjust.
10304 (target_terminal::scoped_restore_terminal_state): Adjust to
10305 rename, and call restore_inferior() instead of inferior().
10306 (target_terminal::scoped_restore_terminal_state::m_state): Change
10308 (target_terminal::terminal_state): Rename to ...
10309 (target_terminal::m_terminal_state): ... this and change type.
10311 2018-01-30 Pedro Alves <palves@redhat.com>
10313 * linux-nat.c (wait_for_signal): New function.
10314 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10316 (async_terminal_is_ours)
10317 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10318 (linux_nat_add_target): Don't override
10319 to_terminal_inferior/to_terminal_ours.
10321 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
10323 * remote.c (remote_follow_fork): Don't call "detach_inferior".
10325 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
10327 * dwarf2read.c (free_dwo_files): Add forward-declaration.
10328 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10329 dwarf2_per_objfile_free here.
10330 (dwarf2_per_objfile_free): Remove.
10331 (_initialize_dwarf2_read): Don't register
10332 dwarf2_per_objfile_free as a registry cleanup.
10334 2018-01-27 Eli Zaretskii <eliz@gnu.org>
10336 Avoid compilation errors in MinGW native builds
10338 The error is triggered by including python-internal.h, and the
10341 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10342 from build-gnulib/import/math.h:27,
10343 from d:/usr/Python26/include/pyport.h:235,
10344 from d:/usr/Python26/include/Python.h:58,
10345 from python/python-internal.h:94,
10346 from python/py-arch.c:24:
10347 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10351 This happens because Python headers define 'hypot' to expand t
10352 '_hypot' in the Windows builds.
10353 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10354 'hypoth'. This avoids a compilation error.
10356 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10358 * MAINTAINERS (Write After Approval): Fix ordering.
10360 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10362 * MAINTAINERS (Write After Approval): Add Alan Hayward.
10364 2018-01-26 Alan Modra <amodra@gmail.com>
10366 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10367 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10368 Remove nop. Make const. Comment.
10369 (powerpc32_plt_stub_so_2): New.
10370 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10371 Correct count. Update uses.
10372 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10373 Move common code reading PLT entry word. Correct
10374 powerpc32_plt_stub PLT address calculation.
10375 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10376 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10377 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10378 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10379 (ppc64_standard_linkage8): Likewise.
10380 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10381 Correct insns description.
10382 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10384 2018-01-24 Pedro Alves <palves@redhat.com>
10386 GCC PR libstdc++/83906
10387 * gdbtypes.c (operator==(const dynamic_prop &,
10388 const dynamic_prop &)): New.
10389 (operator==(const range_bounds &, const range_bounds &)): New.
10390 (check_types_equal): Use them instead of memcmp.
10391 * gdbtypes.h (operator==(const dynamic_prop &,
10392 const dynamic_prop &)): Declare.
10393 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10394 (operator==(const range_bounds &, const range_bounds &)): Declare.
10395 (operator!=(const range_bounds &, const range_bounds &)): Declare.
10397 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10399 * s390-linux-tdep.c (s390_record_address_mask)
10400 (s390_record_calc_disp_common, s390_record_calc_disp)
10401 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10402 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10403 (s390_process_record): Move to s390-tdep.c.
10404 (s390_linux_init_abi_any): Adjust.
10405 * s390-tdep.c (s390_record_address_mask)
10406 (s390_record_calc_disp_common, s390_record_calc_disp)
10407 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10408 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10409 (s390_process_record): Moved from s390-linux-tdep.c
10410 (s390_gdbarch_init): Adjust.
10412 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10414 * s390-linux-nat.c (s390-tdep.h): New include.
10415 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10416 (HFILES_NO_SRCDIR): Add s390-tdep.h.
10417 (ALLDEPFILES): Add s390-tdep.c.
10418 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10419 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10420 * s390-tdep.h: ...this. New file.
10421 * s390-linux-tdep.c (s390-tdep.h): New include.
10422 (_initialize_s390_tdep): Rename to...
10423 (_initialize_s390_linux_tdep): ...this and adjust.
10424 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10425 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10427 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10428 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10429 (s390_is_partial_instruction, s390_software_single_step)
10430 (is_non_branch_ril, s390_displaced_step_copy_insn)
10431 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10432 (s390_prologue_data, s390_addr, s390_store, s390_load)
10433 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10434 (s390_register_call_saved, s390_guess_tracepoint_registers)
10435 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10436 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10437 (s390_pseudo_register_name, s390_pseudo_register_type)
10438 (s390_pseudo_register_read, s390_pseudo_register_write)
10439 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10440 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10441 (s390_addr_bits_remove, s390_address_class_type_flags)
10442 (s390_address_class_type_flags_to_name)
10443 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10444 (s390_function_arg_float, s390_function_arg_vector)
10445 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10446 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10447 (s390_frame_align, s390_register_return_value, s390_return_value)
10448 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10449 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10450 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10451 (s390_trad_frame_prev_register, s390_unwind_cache)
10452 (s390_prologue_frame_unwind_cache)
10453 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10454 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10455 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10456 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10457 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10458 (s390_frame_base_address, s390_local_base_address)
10459 (s390_frame_base, s390_gcc_target_options)
10460 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10461 (s390_validate_reg_range, s390_tdesc_valid)
10462 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10463 * s390-tdep.c: ...this. New file.
10465 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10467 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10468 (s390_process_record, s390_gdbarch_tdep_alloc)
10469 (s390_linux_init_abi_any): Use/set new hook.
10471 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10473 * s390-linux-tdep.c (osabi.h): New include.
10474 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10475 (s390_linux_init_abi_any): New functions.
10476 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10478 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10480 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10481 tdesc_has_registers check
10483 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10485 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10486 (s390_validate_reg_range): New macro.
10487 (s390_gdbarch_init): Adjust.
10489 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10491 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10492 (s390_gdbarch_tdep_alloc): Adjust.
10493 (s390_gdbarch_init): Adjust.
10495 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10497 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10498 <have_tdb>: Change type to bool.
10499 (s390_gdbarch_tdep_alloc): Adjust.
10500 (s390_gdbarch_init): Adjust.
10502 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10504 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10505 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10506 (s390_gdbarch_tdep_alloc): New function.
10507 (s390_gdbarch_init): Allocate tdep at start and use its fields
10508 instead of separate variables.
10510 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10512 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10513 when looking for cached gdbarch and add comment for remaining.
10515 2018-01-22 Pedro Alves <palves@redhat.com>
10516 Sergio Durigan Junior <sergiodj@redhat.com>
10518 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10521 2018-01-22 Maciej W. Rozycki <macro@mips.com>
10523 * MAINTAINERS: Update my company e-mail address.
10525 2018-01-22 Yao Qi <yao.qi@linaro.org>
10527 * regcache.c (cooked_write_test): New function.
10528 (_initialize_regcache): Register the test.
10530 2018-01-22 Yao Qi <yao.qi@linaro.org>
10532 * ia64-tdep.c (ia64_pseudo_register_read): Call
10533 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10534 * m32c-tdep.c (m32c_cat_read): Likewise.
10535 (m32c_r3r2r1r0_read): Likewise.
10536 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10537 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10539 2018-01-22 Yao Qi <yao.qi@linaro.org>
10541 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10542 method raw_read instead of regcache_raw_read.
10543 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10544 * arm-tdep.c (arm_neon_quad_read): Likewise.
10545 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10546 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10547 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10548 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10549 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10550 (i386_pseudo_register_read_into_value): Likewise.
10551 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10552 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10553 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10554 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10555 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10556 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10557 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10558 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10559 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10561 2018-01-22 Yao Qi <yao.qi@linaro.org>
10563 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10564 * configure.tgt: Remove target mt.
10565 * mt-tdep.c: Remove.
10566 * regcache.c (cooked_read_test): Remove the check for mt.
10568 2018-01-22 Yao Qi <yao.qi@linaro.org>
10570 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10571 instead of gdbarch_pseudo_register_read_value.
10573 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10575 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10578 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10580 * linespec.c (create_sals_line_offset): Remove code that preserved
10581 the symtab_and_line's line number.
10583 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10585 * varobj.c (varobj_create): Don't set valid_block when creating a
10588 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10590 * varobj.c (varobj_create): Remove out of date comment.
10592 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10595 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10596 updating innermost block.
10597 * parse.c (innermost_block_tracker::update): Take extra type
10598 parameter, and check types match before updating innermost block.
10599 (write_dollar_variable): Update innermost block for registers.
10600 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10601 (innermost_block_tracker::innermost_block_tracker): Initialise
10603 (innermost_block_tracker::reset): Take type parameter.
10604 (innermost_block_tracker::update): Take type parameter, and pass
10605 type through as needed.
10606 (innermost_block_tracker::m_types): New member.
10607 * varobj.c (varobj_create): Pass type when reseting innermost
10610 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10612 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10613 * ada-lang.c (resolve_subexp): Likewise.
10614 * breakpoint.c (set_breakpoint_condition) Likewise.
10615 (watch_command_1) Likewise.
10616 * c-exp.y (variable): Likewise.
10617 * d-exp.y (PrimaryExpression): Likewise.
10618 * f-exp.y (variable): Likewise.
10619 * go-exp.y (variable): Likewise.
10620 * m2-exp.y (variable): Likewise.
10621 * objfiles.c (objfile::~objfile): Likewise.
10622 * p-exp.y (variable): Likewise.
10623 * parse.c (innermost_block): Change type.
10624 * parser-defs.h (class innermost_block_tracker): New.
10625 (innermost_block): Change to innermost_block_tracker.
10626 * printcmd.c (display_command): Switch to innermost_block API.
10627 (do_one_display): Likewise.
10628 * rust-exp.y (do_one_display): Likewise.
10629 * symfile.c (clear_symtab_users): Likewise.
10630 * varobj.c (varobj_create): Switch to innermost_block API, replace
10631 use of innermost_block with block stored on varobj object.
10633 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10635 * expression.h (innermost_block): Remove declaration.
10636 * varobj.c: Add 'parser-defs.h' include.
10638 2018-01-19 Tom Tromey <tom@tromey.com>
10640 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10641 symbols in the static and global blocks.
10643 2018-01-19 James Clarke <jrtc27@jrtc27.com>
10645 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10646 gdb_ptrace.h, and move including gdb_wait.h ...
10647 * nat/linux-ptrace.h: ... to here.
10649 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10651 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10652 inf_ptrace_detach_success.
10653 (inf_ptrace_detach_success): Add inferior parameter, use it
10654 instead of inferior_ptid, pass it to detach_inferior.
10655 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10657 * inferior.c (detach_inferior): Add overload that takes an
10659 * inferior.h (detach_inferior): Likewise.
10660 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10661 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10662 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10664 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10666 * target.h (struct target_ops) <to_detach>: Add inferior
10668 (target_detach): Likewise.
10669 * target.c (dispose_inferior): Pass inferior down.
10670 (target_detach): Pass inferior down. Assert that it is equal to
10671 the current inferior.
10672 * aix-thread.c (aix_thread_detach): Pass inferior down.
10673 * corefile.c (core_file_command): Pass current_inferior() down.
10674 * corelow.c (core_detach): Add inferior parameter.
10675 * darwin-nat.c (darwin_detach): Likewise.
10676 * gnu-nat.c (gnu_detach): Likewise.
10677 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10678 * infcmd.c (detach_command): Pass current_inferior() down to
10680 * infrun.c (follow_fork_inferior): Pass parent_inf to
10682 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10684 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10685 * linux-thread-db.c (thread_db_detach): Likewise.
10686 * nto-procfs.c (procfs_detach): Likewise.
10687 * procfs.c (procfs_detach): Likewise.
10688 * record.c (record_detach): Likewise.
10689 * record.h (struct inferior): Forward-declare.
10690 (record_detach): Add inferior parameter.
10691 * remote-sim.c (gdbsim_detach): Likewise.
10692 * remote.c (remote_detach_1): Likewise.
10693 (remote_detach): Likewise.
10694 (extended_remote_detach): Likewise.
10695 * sol-thread.c (sol_thread_detach): Likewise.
10696 * target-debug.h (target_debug_print_inferior_p): New macro.
10697 * target-delegates.c: Re-generate.
10698 * top.c (kill_or_detach): Pass inferior down to target_detach.
10699 * windows-nat.c (windows_detach): Add inferior parameter.
10701 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10703 * target.h (struct target_ops) <to_detach>: Remove args
10705 (target_detach): Likewise.
10706 * target.c (dispose_inferior): Adjust.
10707 (target_detach): Remove args parameter, adjust.
10708 * aix-thread.c (aix_thread_detach): Adjust.
10709 * corefile.c (core_file_command): Adjust.
10710 * corelow.c (core_detach): Adjust.
10711 * darwin-nat.c (darwin_detach): Adjust.
10712 * gnu-nat.c (gnu_detach): Adjust.
10713 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10714 * infcmd.c (detach_command): Adjust
10715 * infrun.c (follow_fork_inferior): Adjust.
10716 (handle_vfork_child_exec_or_exit): Adjust.
10717 * linux-fork.c (linux_fork_detach): Remove args parameter.
10718 * linux-fork.h (linux_fork_detach): Likewise.
10719 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10720 * linux-thread-db.c (thread_db_detach): Likewise.
10721 * nto-procfs.c (procfs_detach): Likewise.
10722 * procfs.c (procfs_detach): Likewise.
10723 (do_detach): Remove signo parameter.
10724 * record.c (record_detach): Remove args parameter.
10725 * record.h (record_detach): Likewise.
10726 * remote-sim.c (gdbsim_detach): Likewise.
10727 * remote.c (remote_detach_1): Likewise.
10728 (remote_detach): Likewise.
10729 (extended_remote_detach): Likewise.
10730 * sol-thread.c (sol_thread_detach): Likewise.
10731 * target-delegates.c: Re-generate.
10732 * top.c (struct qt_args) <args>: Remove field.
10733 (kill_or_detach): Don't pass args.
10734 (quit_force): Don't set args.
10735 * windows-nat.c (windows_detach): Remove args parameter.
10737 2018-01-19 Yao Qi <yao.qi@linaro.org>
10739 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10740 (arm_linux_init_abi): Install it.
10742 2018-01-19 Yao Qi <yao.qi@linaro.org>
10744 * osabi.c (gdb_osabi_names): Extend the regexp for
10745 arm-linux-gnueabihf.
10747 2018-01-18 Yao Qi <yao.qi@linaro.org>
10749 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10751 (abbrev_table::add_abbrev): Update.
10752 (abbrev_table::lookup_abbrev): Update.
10754 2018-01-18 Yao Qi <yao.qi@linaro.org>
10756 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10758 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10760 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10763 2018-01-17 Tom Tromey <tom@tromey.com>
10765 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10767 2018-01-17 Tom Tromey <tom@tromey.com>
10769 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10770 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10771 (create_array_type_with_stride): Update.
10772 * dwarf2read.c (set_die_type): Update.
10774 2018-01-17 Tom Tromey <tom@tromey.com>
10776 * dwarf2read.c (delayed_method_info): Remove typedef.
10777 (dwarf2_cu::method_info): Now a std::vector.
10778 (add_to_method_list): Update.
10779 (free_delayed_list): Remove.
10780 (compute_delayed_physnames): Update.
10781 (process_full_comp_unit, process_full_type_unit): Clear the method
10782 list. Remove cleanups.
10783 (psymtab_include_file_name): Add name_holder parameter. Use
10784 unique_xmalloc_ptr.
10785 (dwarf_decode_lines): Update.
10787 2018-01-17 Tom Tromey <tom@tromey.com>
10788 Simon Marchi <simon.marchi@ericsson.com>
10790 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10791 (dwarf2_per_objfile::free_cached_comp_units)
10792 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10793 (init_cutu_and_read_dies_no_follow): Update.
10794 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10795 (dwarf2_cu::~dwarf2_cu): New.
10796 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10797 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10799 2018-01-17 Tom Tromey <tom@tromey.com>
10800 Simon Marchi <simon.marchi@ericsson.com>
10802 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10803 (struct die_reader_specs) <abbrev_table>: New member.
10804 (struct abbrev_table): Add constructor.
10805 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10806 <abbrev_obstack>: Now an auto_obstack.
10807 (abbrev_table_up): New typedef.
10808 (init_cu_die_reader): Add abbrev_table parameter.
10809 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10810 Add result_dwo_abbrev_table.
10811 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10812 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10814 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10816 (skip_children): Update.
10817 (abbrev_table::alloc_abbrev): Rename from
10818 abbrev_table_alloc_abbrev.
10819 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10820 (abbrev_table::lookup_abbrev): Rename from
10821 abbrev_table_lookup_abbrev.
10822 (abbrev_table_read_table): Return abbrev_table_up.
10823 (abbrev_table_free, abbrev_table_free_cleanup)
10824 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10825 (load_partial_dies): Update.
10827 2018-01-17 Tom Tromey <tom@tromey.com>
10829 * dwarf2read.c (dwarf2_compute_name): Update comment.
10830 (read_func_scope, read_variable): Update.
10831 (new_symbol): Remove.
10832 (new_symbol_full): Rename to new_symbol.
10834 2018-01-17 Mike Gulick <mgulick@mathworks.com>
10837 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10838 a warning instead of throwing an error, set section size to 0 and return
10840 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10842 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10844 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10846 (linux_ptrace_attach_fail_reason_string): Likewise.
10847 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10849 (linux_ptrace_attach_fail_reason_string): Likewise.
10850 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10852 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10854 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10856 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10859 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10860 checking for fs_base/gs_base fields in struct user_regs_struct.
10861 * configure: Regenerate.
10863 2018-01-17 Yao Qi <yao.qi@linaro.org>
10865 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10867 (aarch64_linux_init_abi): Install it to gdbarch hook
10868 gcc_target_options.
10870 2018-01-15 Pedro Alves <palves@redhat.com>
10872 * common/signals-state-save-restore.c
10873 (save_original_signals_state): Fix typos.
10875 2017-01-12 Tom Tromey <tom@tromey.com>
10876 Sergio Durigan Junior <sergiodj@redhat.com>
10878 * Makefile.in (install-only): Install gdb-add-index.
10880 2018-01-12 John Baldwin <jhb@FreeBSD.org>
10882 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10884 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10886 * infrun.c (keep_going_pass_signal): Clear step-over info when
10887 insert_breakpoints fails.
10889 2018-01-11 Pedro Alves <palves@redhat.com>
10892 * infrun.c (resume): Rename to ...
10893 (resume_1): ... this.
10894 (resume): Reimplement as wrapper around resume_1.
10896 2018-01-11 Pedro Alves <palves@redhat.com>
10899 * remote.c (remote_parse_stop_reply): Default to the last-set
10900 general thread instead of to 'magic_null_ptid'.
10902 2018-01-10 Pedro Alves <palves@redhat.com>
10904 * language.h (language_get_symbol_name_matcher): Rename ...
10905 (get_symbol_name_matcher): ... this.
10906 * language.c (language_get_symbol_name_matcher): Ditto.
10907 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10910 2018-01-10 Pedro Alves <palves@redhat.com>
10914 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10915 Adjust to use language_get_symbol_name_matcher instead of
10916 language_defn::la_get_symbol_name_matcher.
10917 * language.c (language_get_symbol_name_matcher): If in Ada mode
10918 and the lookup name is a verbatim match, return Ada's matcher.
10919 * language.h (language_get_symbol_name_matcher): Adjust comment.
10920 (ada_lookup_name_info::verbatim_p):: New method.
10922 2018-01-10 Pedro Alves <palves@redhat.com>
10925 * ada-lang.c (ada_collect_symbol_completion_matches): If the
10926 minsym's language is language_auto or language_cplus, pass down
10927 language_ada instead.
10928 * symtab.c (compare_symbol_name): Don't frob symbol language here.
10930 2018-01-10 Pedro Alves <palves@redhat.com>
10933 * minsyms.c (linkage_name_str): New function.
10934 (iterate_over_minimal_symbols): Use it.
10936 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10938 * NEWS: Document that 'info proc' now works on FreeBSD.
10940 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10942 * configure.ac: Check for kinfo_getfile in libutil.
10943 * configure: Regenerate.
10944 * config.in: Regenerate.
10945 * fbsd-nat.c: Include "fbsd-tdep.h".
10946 (fbsd_fetch_cmdline): New.
10947 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10948 rather than calling error.
10949 (fbsd_info_proc): New.
10950 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10951 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10952 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10954 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10956 * fbsd-nat.c (struct free_deleter): Remove.
10957 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10959 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10961 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10962 NULL for an empty pathname.
10964 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10966 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10967 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10968 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10969 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10970 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10971 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10972 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10973 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10974 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10975 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10976 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10977 (fbsd_core_fetch_timeval, fbsd_print_sigset)
10978 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10979 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
10980 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10982 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
10984 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10985 (gnu_xfer_auxv): New function.
10986 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10987 TARGET_OBJECT_AUXV.
10989 2018-01-08 Yao Qi <yao.qi@linaro.org>
10990 Simon Marchi <simon.marchi@ericsson.com>
10992 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10994 (COMMON_OBS): Remove selftest.o.
10995 * configure.ac: Append selftest-arch.c and common/selftest.c to
10996 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
10997 * configure: Re-generated.
10998 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11000 (maintenance_info_selftests): Likewise.
11002 2018-01-08 Xavier Roirand <roirand@adacore.com>
11004 * ada-valprint.c (val_print_packed_array_elements): Use
11005 proper number of elements when printing an array indexed
11006 by an enumeration type.
11008 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11010 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11011 (dw2_get_file_names_reader): Adjust.
11012 (lookup_dwo_signatured_type): Adjust.
11013 (lookup_dwp_signatured_type): Adjust.
11014 (lookup_signatured_type): Adjust.
11015 (create_type_unit_group): Adjust.
11016 (get_type_unit_group): Adjust.
11017 (process_psymtab_comp_unit_reader): Adjust.
11018 (build_type_psymtabs_reader): Adjust.
11019 (scan_partial_symbols): Adjust.
11020 (add_partial_symbol): Adjust.
11021 (add_partial_subprogram): Adjust.
11022 (peek_die_abbrev): Adjust.
11023 (fixup_go_packaging): Adjust.
11024 (process_imported_unit_die): Adjust.
11025 (dwarf2_compute_name): Adjust.
11026 (dwarf2_physname): Adjust.
11027 (read_import_statement): Adjust.
11028 (handle_DW_AT_stmt_list): Adjust.
11029 (read_file_scope): Adjust.
11030 (read_func_scope): Adjust.
11031 (read_lexical_block_scope): Adjust.
11032 (read_call_site_scope): Adjust.
11033 (read_variable): Adjust.
11034 (dwarf2_rnglists_process): Adjust.
11035 (dwarf2_ranges_process): Adjust.
11036 (dwarf2_ranges_read): Adjust.
11037 (dwarf2_get_pc_bounds): Adjust.
11038 (dwarf2_record_block_ranges): Adjust.
11039 (dwarf2_add_field): Adjust.
11040 (dwarf2_add_member_fn): Adjust.
11041 (read_structure_type): Adjust.
11042 (process_structure_scope): Adjust.
11043 (read_enumeration_type): Adjust.
11044 (read_array_type): Adjust.
11045 (mark_common_block_symbol_computed): Adjust.
11046 (read_common_block): Adjust.
11047 (read_namespace_type): Adjust.
11048 (read_namespace): Adjust.
11049 (read_module_type): Adjust.
11050 (read_tag_pointer_type): Adjust.
11051 (read_tag_ptr_to_member_type): Adjust.
11052 (read_tag_string_type): Adjust.
11053 (read_subroutine_type): Adjust.
11054 (read_typedef): Adjust.
11055 (read_base_type): Adjust.
11056 (attr_to_dynamic_prop): Adjust.
11057 (read_subrange_type): Adjust.
11058 (read_unspecified_type): Adjust.
11059 (dwarf2_read_abbrevs): Adjust.
11060 (load_partial_dies): Adjust.
11061 (read_partial_die): Adjust.
11062 (find_partial_die): Adjust.
11063 (guess_partial_die_structure_name): Adjust.
11064 (fixup_partial_die): Adjust.
11065 (read_attribute_value): Adjust.
11066 (read_addr_index): Adjust.
11067 (read_addr_index_from_leb128): Adjust.
11068 (read_str_index): Adjust.
11069 (dwarf2_string_attr): Adjust.
11070 (get_debug_line_section): Adjust.
11071 (dwarf_decode_line_header): Adjust.
11072 (lnp_state_machine::check_line_address): Adjust.
11073 (dwarf_decode_lines_1): Adjust.
11074 (dwarf_decode_lines): Adjust.
11075 (dwarf2_start_symtab): Adjust.
11076 (var_decode_location): Adjust.
11077 (new_symbol_full): Adjust.
11078 (dwarf2_const_value_data): Adjust.
11079 (dwarf2_const_value_attr): Adjust.
11080 (dwarf2_const_value): Adjust.
11081 (die_type): Adjust.
11082 (die_containing_type): Adjust.
11083 (build_error_marker_type): Adjust.
11084 (lookup_die_type): Adjust.
11085 (guess_full_die_structure_name): Adjust.
11086 (anonymous_struct_prefix): Adjust.
11087 (determine_prefix): Adjust.
11088 (dwarf2_name): Adjust.
11089 (follow_die_ref_or_sig): Adjust.
11090 (follow_die_offset): Adjust.
11091 (follow_die_ref): Adjust.
11092 (follow_die_sig_1): Adjust.
11093 (follow_die_sig): Adjust.
11094 (get_signatured_type): Adjust.
11095 (get_DW_AT_signature_type): Adjust.
11096 (decode_locdesc): Adjust.
11097 (dwarf_decode_macros): Adjust.
11098 (cu_debug_loc_section): Adjust.
11099 (fill_in_loclist_baton): Adjust.
11100 (dwarf2_symbol_mark_computed): Adjust.
11101 (init_one_comp_unit): Don't assign
11102 dwarf2_cu::dwarf2_per_objfile.
11103 (set_die_type): Adjust.
11105 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11107 * dwarf2read.c (struct mapped_debug_names): Add constructor.
11108 <dwarf2_per_objfile>: New field.
11109 (dwarf2_per_objfile): Remove global.
11110 (get_dwarf2_per_objfile): New function.
11111 (set_dwarf2_per_objfile): New function.
11112 (dwarf2_build_psymtabs_hard): Change objfile parameter to
11113 dwarf2_per_objfile.
11114 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11115 (read_abbrev_offset): Likewise.
11116 (read_indirect_string): Likewise.
11117 (read_indirect_line_string): Likewise.
11118 (read_indirect_string_at_offset): Likewise.
11119 (read_indirect_string_from_dwz): Likewise.
11120 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11121 dwarf2_per_objfile.
11122 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11123 (create_all_comp_units): Change objfile parameter to
11124 dwarf2_per_objfile.
11125 (create_all_type_units): Likewise.
11126 (process_queue): Add dwarf2_per_objfile parameter.
11127 (read_and_check_comp_unit_head): Likewise.
11128 (lookup_dwo_unit_in_dwp): Likewise.
11129 (get_dwp_file): Likewise.
11130 (process_cu_includes): Likewise.
11131 (struct free_dwo_file_cleanup_data): New struct.
11132 (dwarf2_has_info): Use get_dwarf2_per_objfile and
11133 set_dwarf2_per_objfile.
11134 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11135 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11136 context, adjust calls.
11137 (dw2_instantiate_symtab): Likewise.
11138 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11139 (dw2_get_cu): Likewise.
11140 (create_cu_from_index_list): Change objfile parameter to
11141 dwarf2_per_objfile.
11142 (create_cus_from_index_list): Get dwarf2_per_objfile from
11143 context, adjust calls.
11144 (create_cus_from_index): Likewise.
11145 (create_signatured_type_table_from_index): Change objfile
11146 parameter to dwarf2_per_objfile.
11147 (create_signatured_type_table_from_debug_names): Change objfile
11148 parameter to dwarf2_per_objfile.
11149 (create_addrmap_from_index): Likewise.
11150 (create_addrmap_from_aranges): Likewise.
11151 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11152 (dw2_setup): Remove.
11153 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11155 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11156 get_dwarf2_per_objfile.
11157 (dw2_forget_cached_source_info): Likewise.
11158 (dw2_map_symtabs_matching_filename): Likewise.
11159 (struct dw2_symtab_iterator) <index>: Remove.
11160 <dwarf2_per_objfile>: New field.
11161 (dw2_symtab_iter_init): Replace index parameter with
11162 dwarf2_per_objfile.
11163 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11164 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11165 (dw2_print_stats): Likewise.
11166 (dw2_dump): Likewise.
11167 (dw2_expand_symtabs_for_function): Likewise.
11168 (dw2_expand_all_symtabs): Likewise.
11169 (dw2_expand_symtabs_with_fullname): Likewise.
11170 (dw2_expand_marked_cus): Replace index and objfile parameters
11171 with dwarf2_per_objfile.
11172 (dw_expand_symtabs_matching_file_matcher): Add
11173 dwarf2_per_objfile parameter and adjust calls.
11174 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11176 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11177 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11179 (create_cus_from_debug_names_list): Replace objfile parameter
11180 with dwarf2_per_objfile and adjust calls.
11181 (create_cus_from_debug_names): Likewise.
11182 (dwarf2_read_debug_names): Likewise.
11183 (mapped_debug_names::namei_to_name): Adjust call.
11184 (dw2_debug_names_iterator::next): Likewise.
11185 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11186 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11187 (dw2_debug_names_dump): Likewise.
11188 (dw2_debug_names_expand_symtabs_for_function): Likewise.
11189 (dw2_debug_names_expand_symtabs_matching): Likewise.
11190 (dwarf2_initialize_objfile): Likewise.
11191 (dwarf2_build_psymtabs): Likewise.
11192 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11194 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11195 (read_and_check_comp_unit_head): Likewise.
11196 (read_abbrev_offset): Likewise.
11197 (create_debug_type_hash_table): Likewise.
11198 (create_debug_types_hash_table): Likewise.
11199 (create_all_type_units): Replace objfile parameter with
11200 dwarf2_per_objfile.
11201 (add_type_unit): Add dwarf2_per_objfile parameter.
11202 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11203 with dwarf2_per_objfile.
11204 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11205 (lookup_dwp_signatured_type): Likewise.
11206 (lookup_signatured_type): Likewise.
11207 (read_cutu_die_from_dwo): Likewise.
11208 (init_tu_and_read_dwo_dies): Likewise.
11209 (init_cutu_and_read_dies): Likewise.
11210 (init_cutu_and_read_dies_no_follow): Likewise.
11211 (allocate_type_unit_groups_table): Add objfile parameter.
11212 (create_type_unit_group): Use dwarf2_per_objfile from cu.
11213 (get_type_unit_group): Likewise.
11214 (process_psymtab_comp_unit): Update call.
11215 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11216 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11217 (print_tu_stats): Likewise.
11218 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11219 in void* parameter.
11220 (build_type_psymtabs): Change objfile parameter to
11221 dwarf2_per_objfile.
11222 (process_skeletonless_type_unit): Use dwarf2_per_objfile
11223 passed in void* parameter.
11224 (process_skeletonless_type_units): Change objfile parameter to
11225 dwarf2_per_objfile.
11226 (set_partial_user): Likewise.
11227 (dwarf2_build_psymtabs_hard): Likewise.
11228 (read_comp_units_from_section): Likewise.
11229 (create_all_comp_units): Likewise.
11230 (scan_partial_symbols): Update calls.
11231 (add_partial_symbol): Likewise.
11232 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11233 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11234 (process_queue): Add dwarf2_per_objfile parameter.
11235 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11236 (compute_compunit_symtab_includes): Likewise.
11237 (process_cu_includes): Add dwarf2_per_objfile parameter.
11238 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11239 (process_full_type_unit): Likewise.
11240 (process_imported_unit_die): Update call.
11241 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11242 (read_file_scope): Likewise.
11243 (allocate_dwo_file_hash_table): Add objfile parameter.
11244 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
11245 (create_cus_hash_table): Likewise.
11246 (create_dwp_hash_table): Likewise.
11247 (create_dwo_unit_in_dwp_v1): Likewise.
11248 (create_dwp_v2_section): Likewise.
11249 (create_dwo_unit_in_dwp_v2): Likewise.
11250 (lookup_dwo_unit_in_dwp): Likewise.
11251 (try_open_dwop_file): Likewise.
11252 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11253 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11254 cleanup to include a reference to dwarf2_per_objfile.
11255 (open_dwp_file): Add dwarf2_per_objfile parameter.
11256 (open_and_init_dwp_file): Likewise.
11257 (get_dwp_file): Likewise.
11258 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11259 (queue_and_load_all_dwo_tus): Update call.
11260 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
11262 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
11263 (dwarf2_ranges_process): Likewise.
11264 (dwarf2_get_pc_bounds): Likewise.
11265 (mark_common_block_symbol_computed): Likewise.
11266 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11267 (dwarf2_read_abbrevs): Update call.
11268 (read_partial_die): Use dwarf2_per_objfile from cu.
11269 (find_partial_die): Likewise.
11270 (fixup_partial_die): Likewise.
11271 (read_attribute_value): Likewise.
11272 (read_indirect_string_at_offset_from): Add objfile parameter.
11273 (read_indirect_string_at_offset): Add dwarf2_per_objfile
11275 (read_indirect_string_from_dwz): Add objfile parameter.
11276 (read_indirect_string): Add objfile parameter.
11277 (read_addr_index_1): Add dwarf2_per_objfile parameter.
11278 (read_addr_index): Use dwarf2_per_objfile from cu.
11279 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11281 (read_str_index): Use dwarf2_per_objfile from cu.
11282 (get_debug_line_section): Likewise.
11283 (read_formatted_entries): Add dwarf2_per_objfile parameter.
11284 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11285 (new_symbol_full): Use dwarf2_per_objfile from cu.
11286 (build_error_marker_type): Likewise.
11287 (lookup_die_type): Likewise.
11288 (determine_prefix): Likewise.
11289 (follow_die_offset): Likewise.
11290 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11291 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11292 (dwarf2_fetch_die_type_sect_off): Likewise.
11293 (dwarf2_get_die_type): Likewise.
11294 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11295 (get_signatured_type): Likewise.
11296 (get_DW_AT_signature_type): Likewise.
11297 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11298 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11299 (cu_debug_loc_section): Likewise.
11300 (fill_in_loclist_baton): Likewise.
11301 (dwarf2_symbol_mark_computed): Likewise.
11302 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11303 dwarf2_per_objfile.
11304 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11306 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11307 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11308 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11309 (set_die_type): Use dwarf2_free_objfile from cu.
11310 (get_die_type_at_offset): Likewise.
11311 (dwarf2_per_objfile_free): Don't assign global variable.
11312 (debug_names) <constructor>: Add dwarf2_per_objfile
11313 parameter, update m_debugstrlookup construction.
11314 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11316 <m_dwarf2_per_objfile>: New field.
11317 <lookup>: Use m_dwarf2_per_objfile.
11318 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11319 (psyms_seen_size): Likewise.
11320 (write_gdbindex): Replace objfile parameter with
11321 dwarf2_per_objfile.
11322 (write_debug_names): Likewise.
11323 (write_psymtabs_to_index): Likewise.
11324 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11327 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11329 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11330 <dwarf2_per_objfile>: New field.
11331 (struct dwarf2_per_cu_data) <objfile>: Remove.
11332 <dwarf2_per_objfile>: New field.
11333 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11335 (create_signatured_type_table_from_index): Likewise.
11336 (create_debug_type_hash_table): Likewise.
11337 (fill_in_sig_entry_from_dwo_entry): Likewise.
11338 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11339 (create_type_unit_group): Assign dwarf2_per_objfile instead of
11341 (create_partial_symtab): Access objfile through
11342 dwarf2_per_objfile.
11343 (process_psymtab_comp_unit_reader): Likewise.
11344 (read_comp_units_from_section): Likewise.
11345 (scan_partial_symbols): Likewise.
11346 (add_partial_symbol): Likewise.
11347 (add_partial_subprogram): Likewise.
11348 (peek_die_abbrev): Likewise.
11349 (fixup_go_packaging): Likewise.
11350 (process_full_comp_unit): Likewise.
11351 (process_full_type_unit): Likewise.
11352 (process_imported_unit_die): Likewise.
11353 (dwarf2_compute_name): Likewise.
11354 (dwarf2_physname): Likewise.
11355 (read_import_statement): Likewise.
11356 (create_cus_hash_table): Assign dwarf2_physname instead of
11358 (read_func_scope): Access objfile through dwarf2_per_objfile.
11359 (read_lexical_block_scope): Likewise.
11360 (read_call_site_scope): Likewise.
11361 (read_variable): Likewise.
11362 (dwarf2_rnglists_process): Likewise.
11363 (dwarf2_ranges_process): Likewise.
11364 (dwarf2_ranges_read): Likewise.
11365 (dwarf2_record_block_ranges): Likewise.
11366 (dwarf2_add_field): Likewise.
11367 (dwarf2_add_member_fn): Likewise.
11368 (read_structure_type): Likewise.
11369 (process_structure_scope): Likewise.
11370 (read_enumeration_type): Likewise.
11371 (read_array_type): Likewise.
11372 (read_common_block): Likewise.
11373 (read_namespace_type): Likewise.
11374 (read_namespace): Likewise.
11375 (read_module_type): Likewise.
11376 (read_tag_pointer_type): Likewise.
11377 (read_tag_ptr_to_member_type): Likewise.
11378 (read_tag_string_type): Likewise.
11379 (read_subroutine_type): Likewise.
11380 (read_typedef): Likewise.
11381 (read_base_type): Likewise.
11382 (attr_to_dynamic_prop): Likewise.
11383 (read_subrange_type): Likewise.
11384 (read_unspecified_type): Likewise.
11385 (load_partial_dies): Likewise.
11386 (read_partial_die): Likewise.
11387 (find_partial_die): Likewise.
11388 (guess_partial_die_structure_name): Likewise.
11389 (fixup_partial_die): Likewise.
11390 (read_attribute_value): Likewise.
11391 (read_addr_index_from_leb128): Likewise.
11392 (dwarf2_read_addr_index): Likewise.
11393 (dwarf2_string_attr): Likewise.
11394 (lnp_state_machine::check_line_address): Likewise.
11395 (dwarf_decode_lines_1): Likewise.
11396 (dwarf_decode_lines): Likewise.
11397 (dwarf2_start_symtab): Likewise.
11398 (var_decode_location): Likewise.
11399 (new_symbol_full): Likewise.
11400 (dwarf2_const_value_data): Likewise.
11401 (dwarf2_const_value_attr): Likewise.
11402 (dwarf2_const_value): Likewise.
11403 (die_type): Likewise.
11404 (die_containing_type): Likewise.
11405 (lookup_die_type): Likewise.
11406 (guess_full_die_structure_name): Likewise.
11407 (anonymous_struct_prefix): Likewise.
11408 (dwarf2_name): Likewise.
11409 (follow_die_ref_or_sig): Likewise.
11410 (follow_die_offset): Likewise.
11411 (follow_die_ref): Likewise.
11412 (dwarf2_fetch_die_loc_sect_off): Likewise.
11413 (dwarf2_fetch_constant_bytes): Likewise.
11414 (dwarf2_fetch_die_type_sect_off): Likewise.
11415 (dwarf2_get_die_type): Likewise.
11416 (follow_die_sig): Likewise.
11417 (decode_locdesc): Likewise.
11418 (dwarf2_per_cu_objfile): Likewise.
11419 (dwarf2_per_cu_text_offset): Likewise.
11420 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11422 (set_die_type): Access objfile through
11423 dwarf2_per_objfile.
11425 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11427 * valprint.c (converted_character_d): Remove typedef.
11428 (DEF_VEC_O (converted_character_d)): Remove.
11429 (count_next_character): Use std::vector.
11430 (print_converted_chars_to_obstack): Likewise.
11431 (generic_printstr): Likewise.
11433 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11435 * xml-support.h (struct gdb_xml_value): Add constructor.
11436 <value>: Change type to unique_xmalloc_ptr.
11437 (gdb_xml_value_s): Remove typedef.
11438 (DEF_VEC_O (gdb_xml_value_s)): Remove.
11439 (gdb_xml_element_start_handler): Change parameter type to
11441 (xml_find_attribute): Likewise.
11442 * xml-support.c (xml_find_attribute): Change parameter type to
11443 std::vector and adjust.
11444 (gdb_xml_values_cleanup): Remove.
11445 (gdb_xml_parser::start_element): Adjust to std::vector.
11446 (xinclude_start_include): Change paraeter type to std::vector
11448 * btrace.c (check_xml_btrace_version): Likewise.
11449 (parse_xml_btrace_block): Likewise.
11450 (parse_xml_btrace_pt_config_cpu): Likewise.
11451 (parse_xml_btrace_pt): Likewise.
11452 (parse_xml_btrace_conf_bts): Likewise.
11453 (parse_xml_btrace_conf_pt): Likewise.
11454 * memory-map.c (memory_map_start_memory): Likewise.
11455 (memory_map_start_property): Likewise.
11456 * osdata.c (osdata_start_osdata): Likewise.
11457 (osdata_start_item): Likewise.
11458 (osdata_start_column): Likewise.
11459 * remote.c (start_thread): Likewise.
11460 * solib-aix.c (library_list_start_library): Likewise.
11461 (library_list_start_list): Likewise.
11462 * solib-svr4.c (library_list_start_library): Likewise.
11463 (svr4_library_list_start_list): Likewise.
11464 * solib-target.c (library_list_start_segment): Likewise.
11465 (library_list_start_section): Likewise.
11466 (library_list_start_library): Likewise.
11467 (library_list_start_list): Likewise.
11468 * tracepoint.c (traceframe_info_start_memory): Likewise.
11469 (traceframe_info_start_tvar): Likewise.
11470 * xml-syscall.c (syscall_start_syscall): Likewise.
11471 * xml-tdesc.c (tdesc_start_target): Likewise.
11472 (tdesc_start_feature): Likewise.
11473 (tdesc_start_reg): Likewise.
11474 (tdesc_start_union): Likewise.
11475 (tdesc_start_struct): Likewise.
11476 (tdesc_start_flags): Likewise.
11477 (tdesc_start_enum): Likewise.
11478 (tdesc_start_field): Likewise.
11479 (tdesc_start_enum_value): Likewise.
11480 (tdesc_start_vector): Likewise.
11482 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11484 * extension.h (struct xmethod_worker) <clone>: Remove.
11485 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11487 (python_xmethod_worker::clone): Remove.
11488 * valops.c (find_overload_match): Use std::move instead of
11491 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11493 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11494 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11495 <free_xmethod_worker_data>: Remove.
11496 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11497 <get_xmethod_arg_types>: Remove.
11498 <get_xmethod_result_type>: Remove.
11499 <invoke_xmethod>: Remove.
11500 * extension.c (new_xmethod_worker): Remove.
11501 (clone_xmethod_worker): Remove.
11502 (get_matching_xmethod_workers): Return void, pass std::vector by
11504 (get_xmethod_arg_types): Rename to...
11505 (xmethod_worker::get_arg_types): ... this, and adjust.
11506 (get_xmethod_result_type): Rename to...
11507 (xmethod_worker::get_result_type): ... this, and adjust.
11508 (invoke_xmethod): Remove.
11509 (free_xmethod_worker): Remove.
11510 (free_xmethod_worker_vec): Remove.
11511 * extension.h (enum ext_lang_rc): Move here from
11513 (struct xmethod_worker): Add constructor and destructor.
11516 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11517 virtual pure methods.
11518 <get_arg_types, get_result_type>: New methods.
11519 (xmethod_worker_ptr): Remove typedef.
11520 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11521 (xmethod_worker_vec): Remove typedef.
11522 (xmethod_worker_up): New typedef.
11523 (invoke_xmethod): Remove.
11524 (clone_xmethod_worker): Remove.
11525 (free_xmethod_worker): Remove.
11526 (free_xmethod_worker_vec): Remove.
11527 (get_xmethod_arg_types): Remove.
11528 (get_xmethod_result_type): Remove.
11529 * valops.c (find_method_list): Use std::vector, don't use
11530 intermediate vector.
11531 (value_find_oload_method_list): Use std::vector.
11532 (find_overload_match): Use std::vector.
11533 (find_oload_champ): Use std::vector.
11534 * value.c (value_free): Use operator delete.
11535 (value_of_xmethod): Rename to...
11536 (value_from_xmethod): ... this. Don't assign
11537 xmethod_worker::value, take rvalue-reference.
11538 (result_type_of_xmethod): Adjust.
11539 (call_xmethod): Adjust.
11540 * value.h: Include extension.h.
11541 (struct xmethod_worker): Don't forward-declare.
11542 (value_of_xmethod): Rename to...
11543 (value_from_xmethod): ... this, take rvalue-reference.
11544 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11545 (struct python_xmethod_worker): ... this, add constructor and
11547 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11548 (gdbpy_free_xmethod_worker_data): Rename to...
11549 (python_xmethod_worker::~python_xmethod_worker): ... this and
11551 (gdbpy_clone_xmethod_worker_data): Rename to...
11552 (python_xmethod_worker::clone): ... this and adjust.
11553 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11555 (gdbpy_get_xmethod_arg_types): Rename to...
11556 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11557 (gdbpy_get_xmethod_result_type): Rename to...
11558 (python_xmethod_worker::do_get_result_type): ... this and
11560 (gdbpy_invoke_xmethod): Rename to...
11561 (python_xmethod_worker::invoke): ... this and adjust.
11562 (new_python_xmethod_worker): Rename to...
11563 (python_xmethod_worker::python_xmethod_worker): ... this and
11565 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11567 (gdbpy_free_xmethod_worker_data): Remove.
11568 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11569 (gdbpy_get_xmethod_arg_types): Remove.
11570 (gdbpy_get_xmethod_result_type): Remove.
11571 (gdbpy_invoke_xmethod): Remove.
11572 * python/python.c (python_extension_ops): Remove obsolete
11575 2018-01-05 Pedro Alves <palves@redhat.com>
11578 * common/signals-state-save-restore.c
11579 (save_original_signals_state): New parameter 'quiet'. Warn if we
11580 find a custom handler preinstalled, instead of internal erroring.
11581 But only warn if !quiet.
11582 * common/signals-state-save-restore.h
11583 (save_original_signals_state): New parameter 'quiet'.
11584 * main.c (captured_main_1): Move save_original_signals_state call
11585 after option handling, and pass QUIET.
11587 2018-01-05 Pedro Alves <palves@redhat.com>
11589 * spu-tdep.c (spu_catch_start): Pass
11590 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11592 2018-01-05 Pedro Alves <palves@redhat.com>
11595 * ada-lang.c (literal_symbol_name_matcher): New function.
11596 (ada_get_symbol_name_matcher): Use it for
11597 symbol_name_match_type::SEARCH_NAME.
11598 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11599 it down instead of assuming symbol_name_match_type::FULL.
11600 * block.h (block_lookup_symbol): New parameter 'match_type'.
11601 * c-valprint.c (print_unpacked_pointer): Use
11602 lookup_symbol_search_name instead of lookup_symbol.
11603 * compile/compile-object-load.c (get_out_value_type): Pass down
11604 symbol_name_match_type::SEARCH_NAME.
11605 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11606 symbol_name_match_type::FULL.
11607 * cp-support.c (cp_get_symbol_name_matcher): Handle
11608 symbol_name_match_type::SEARCH_NAME.
11609 * infrun.c (insert_exception_resume_breakpoint): Use
11610 lookup_symbol_search_name.
11611 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11612 * psymtab.c (maintenance_check_psymtabs): Use
11613 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11614 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11615 SYMBOL_SEARCH_NAME.
11616 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11617 if symbol_name_match_type::SEARCH_NAME.
11618 (lookup_symbol_in_language): Pass down
11619 symbol_name_match_type::FULL.
11620 (lookup_symbol_search_name): New.
11621 (lookup_language_this): Pass down
11622 symbol_name_match_type::SEARCH_NAME.
11623 (lookup_symbol_aux, lookup_local_symbol): New parameter
11624 'match_type'. Pass it down.
11625 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11626 (lookup_symbol_search_name): New declaration.
11627 (lookup_symbol_in_block): New 'match_type' parameter.
11629 2018-01-05 Pedro Alves <palves@redhat.com>
11632 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11634 (ada_lookup_symbol): Reimplement in terms of
11635 ada_lookup_symbol_list, bits factored out from
11636 ada_lookup_encoded_symbol.
11638 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11640 * ada-exp.y (write_object_renaming): When subscripting an array
11641 using a symbol as the index, pass the block in call to
11642 ada_lookup_encoded_symbol when looking that symbol up.
11644 2018-01-05 Jerome Guitton <guitton@adacore.com>
11646 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11649 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11651 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11652 the case where VALUE_LVAL (val0) is not lval_memory.
11654 2018-01-05 Xavier Roirand <roirand@adacore.com>
11656 * ada-valprint.c (print_optional_low_bound): Handle
11657 character-indexed array printing like boolean-indexed array
11660 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11662 * NEWS: Create a new section for the next release branch.
11663 Rename the section of the current branch, now that it has
11666 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11668 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11669 * version.in: Bump version to 8.1.50.DATE-git.
11671 2018-01-03 Xavier Roirand <roirand@adacore.com>
11673 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11675 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11677 (default_exception_support_info) <catch_handlers_sym>: Add field.
11678 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11679 (ada_exception_name_addr_1): Add "catch handlers" handling.
11680 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11681 Update all callers.
11682 (create_excep_cond_exprs) <ex>: Add parameter.
11683 (re_set_exception): Update create_excep_cond_exprs call.
11684 (print_it_exception, print_one_exception, print_mention_exception)
11685 (print_recreate_exception): Add "catch handler" handling.
11686 (allocate_location_catch_handlers, re_set_catch_handlers)
11687 (check_status_catch_handlers, print_it_catch_handlers)
11688 (print_one_catch_handlers, print_mention_catch_handlers)
11689 (print_recreate_catch_handlers): New function.
11690 (catch_handlers_breakpoint_ops): New variable.
11691 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11692 Add parameter. Add "catch handler" handling.
11693 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11694 Add "catch handler" handling.
11695 (ada_exception_catchpoint_cond_string): Add "catch handler"
11697 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11699 (catch_ada_handlers_command): New function.
11700 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11701 operations structure.
11702 (_initialize_ada_language): Add "catch handlers" command entry.
11703 * NEWS: Document "catch handlers" feature.
11705 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11707 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11708 account when creating the array type of the slice.
11709 (ada_value_slice): Likewise.
11711 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11713 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11715 (create_array_type_with_stride): Add byte_stride_prop parameter.
11716 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11717 New parameter. Update all callers in this file.
11718 (array_type_has_dynamic_stride): New function.
11719 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11720 of arrays with dynamic byte strides.
11721 * dwarf2read.c (read_array_type): Add support for dynamic
11722 DW_AT_byte_stride attributes.
11724 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11726 * dwarf2read.c (read_unspecified_type): Treat
11727 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11729 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11731 Update copyright year range in all GDB files.
11733 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11735 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11736 and gdb/testsuite/gdb.base/step-line.c.
11738 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11740 * copyright.py (main): Dump the contents of
11741 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11742 even if BY_HAND is empty.
11744 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11746 * top.c (print_gdb_version): Update Copyright year in version
11749 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11751 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11753 For older changes see ChangeLog-2017.
11759 version-control: never