1 2018-09-10 Jerome Guitton <guitton@adacore.com>
3 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
4 with check_tag to 1 if and only if the type is tagged and the
5 component being searched cannot been found in the current
6 view. Otherwise, always call ada_to_fixed_type with
9 2018-09-10 Xavier Roirand <roirand@adacore.com>
11 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
13 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
14 * ada-varobj.c (ada_varobj_get_number_of_children,
15 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
17 2018-09-10 Xavier Roirand <roirand@adacore.com>
19 * ada-valprint.c (ada_value_print): Use type instead of
22 2018-09-10 Xavier Roirand <roirand@adacore.com>
24 * ada-lang.c (ada_value_subscript): Handle case when parameter is
25 an array of access to unconstrained array.
27 2018-09-10 Xavier Roirand <roirand@adacore.com>
29 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
30 (ada_check_typedef): Use it.
32 2018-09-10 Xavier Roirand <roirand@adacore.com>
34 * ada-varobj.c (ada_varobj_describe_struct_child)
35 (ada_varobj_describe_child): Handle union case like struct one.
37 2018-09-10 Tom Tromey <tom@tromey.com>
40 * python/python.c (_initialize_python): Make example in "python"
41 help work in Python 3.
43 2018-09-10 Eli Zaretskii <eliz@gnu.org>
45 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
46 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
47 $(EXEEXT) to the script, as it is not a program.
49 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
51 * python/py-prettyprint.c (pretty_print_one_value): Return
53 (print_string_repr): Adjust.
54 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
55 * python/python-internal.h (apply_varobj_pretty_printer): Return
57 * varobj.c (varobj_value_get_print_value): Adjust.
59 2018-09-08 Tom Tromey <tom@tromey.com>
62 * python/py-prettyprint.c (pretty_print_one_value): Check for
65 2018-09-08 Joel Brobecker <brobecker@adacore.com>
67 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
68 replace_operator_with_call.
70 2018-09-08 Joel Brobecker <brobecker@adacore.com>
72 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
74 2018-09-08 Joel Brobecker <brobecker@adacore.com>
76 * ada-typeprint.c (print_range): Print the bounds using TYPE
77 rather than its TYPE_TARGET_TYPE.
79 2018-09-08 Joel Brobecker <brobecker@adacore.com>
81 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
82 call to ada_to_fixed_value_create.
84 2018-09-08 Jerome Guitton <guitton@adacore.com>
86 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
88 2018-09-08 Joel Brobecker <brobecker@adacore.com>
90 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
93 2018-09-08 Joel Brobecker <brobecker@adacore.com>
95 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
96 Move update of loop variable "fi".
98 2018-09-08 Joel Brobecker <brobecker@adacore.com>
100 * ada-lang.c (value_assign_to_component): In the case of
101 big-endian targets, extract the bits of the given VAL
102 using an src_offset of zero if container is not a scalar.
104 2018-09-06 Simon Ser <contact@emersion.fr>
107 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
108 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
109 * fbsd-tdep.c (fbsd_make_note_desc): New.
110 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
111 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
112 * target.h (enum target_object) Add FreeBSD-specific
113 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
115 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
117 * compile/compile-c.h (generate_c_for_variable_locations):
118 Change reference to pointer.
119 * compile/compile-c-support.c (compile_program) <compute>:
121 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
122 (generate_c_for_for_one_variable): Likewise
123 (generate_c_for_variable_locations): Likewise
124 * compile/compile-c-types.c (compile_c_instance::convert_type):
126 * compile/compile-cplus-symbols.c (convert_one_symbol):
127 std::move the scope passed to enter_scope.
128 * compile/compile-cplus-types.c
129 (compile_cplus_instance::enter_scope): Make parameter
131 (compile_cplus_instance::new_scope): Change reference to
133 (compile_cplus_instance::convert_type): Likewise
134 (compile_cplus_convert_typedef): std::move the scope passed to
136 (compile_cplus_convert_struct_or_union): Likewise.
137 (compile_cplus_convert_enum): Likewise.
138 (compile_cplus_convert_namespace): Likewise.
139 * compile/compile-cplus.h (compile_cplus_instance)
140 <enter_scope>: Make parameter rvalue-reference.
141 * compile/compile-internal.h (compile_instance)
142 <get_cached_type>: Likewise
143 * compile/compile-loc2c.c (push): Likewise
147 (print_label): Likewise
148 (pushf_register_address): Likewise
149 (pushf_register): Likewise
150 (do_compile_dwarf_expr_to_c): Likewise
151 (compile_dwarf_expr_to_c): Likewise
152 (compile_dwarf_bounds_to_c): Likewise
153 * compile/compile.c (compile_instance::get_cached_type):
155 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
156 (compile_dwarf_bounds_to_c): Likewise
157 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
158 (dwarf2_compile_property_to_c): Likewise
159 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
160 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
163 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
165 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
166 * tui/tui-data.c (init_content_element): Don't initialize it.
168 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
170 * tui/tui-data.h (struct tui_win_info)
171 <detail::opaque>: Remove.
172 * tui/tui-data.c (init_win_info): Remove assignment.
174 2018-09-05 Tom Tromey <tom@tromey.com>
176 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
178 * target-float.c (host_float_ops<T>::to_string)
179 (host_float_ops<T>::from_string): Use
180 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
181 * configure: Rebuild.
183 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
185 * printcmd.c (printf_c_string): Use
186 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
187 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
189 2018-09-05 Tom Tromey <tom@tromey.com>
191 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
193 2018-09-05 Tom de Vries <tdevries@suse.de>
195 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
196 with resolve_abstract_p == true.
197 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
198 defaulting to false. Propagate resolve_abstract_p to
199 dwarf2_fetch_die_loc_sect_off.
200 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
201 parameter, defaulting to false.
202 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
203 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
205 * dwarf2read.h (struct die_info): Forward-declare.
206 (die_info_ptr): New typedef.
207 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
209 2018-09-05 Joel Brobecker <brobecker@adacore.com>
213 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
214 Pedro Alves <palves@redhat.com>
216 * gnulib/Makefile.in (aclocal_m4_deps): Move to
217 "aclocal-m4-deps.mk". Include file here.
218 $(srcdir)/aclocal.m4: Add "configure.ac".
219 * gnulib/aclocal-m4-deps.mk: New file.
220 * gnulib/update-gnulib.sh: Automatically update
221 "aclocal-m4-deps.mk".
223 2018-09-04 Tom Tromey <tom@tromey.com>
225 * configure: Rebuild.
226 * configure.ac: Remove multi-ice code.
228 2018-09-04 Tom Tromey <tom@tromey.com>
230 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
233 2018-09-04 Tom Tromey <tom@tromey.com>
235 * Makefile.in (printcmd.o, target-float.o): Remove.
236 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
238 2018-09-04 Tom Tromey <tom@tromey.com>
240 * gnulib/Makefile.in: Remove obsolete comment.
241 * Makefile.in: Remove obsolete comment.
243 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
245 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
248 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
250 * riscv-tdep.c: Add 'prologue-value.h' include.
251 (struct riscv_unwind_cache): New struct.
252 (riscv_debug_unwinder): New global.
253 (riscv_scan_prologue): Update arguments, capture register details
255 (riscv_skip_prologue): Reformat arguments line, move end of
256 prologue calculation into riscv_scan_prologue.
257 (riscv_frame_cache): Update return type, create
258 riscv_unwind_cache, scan the prologue, and fill in remaining cache
260 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
261 (riscv_frame_prev_register): Use the trad_frame within the
263 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
266 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
268 * trad-frame.h (trad_frame_set_realreg): Declare.
269 (trad_frame_set_addr): Declare.
270 * trad-frame.c (trad_frame_set_realreg): Define new function.
271 (trad_frame_set_addr): Define new function.
272 (trad_frame_set_reg_realreg): Use new function.
273 (trad_frame_set_reg_addr): Use new function.
275 2018-09-01 Keith Seitz <keiths@redhat.com>
277 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
278 pulongest instead of "%lld".
279 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
282 2018-08-31 Tom Tromey <tom@tromey.com>
284 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
287 2018-08-31 Pedro Alves <palves@redhat.com>
289 * gdbarch.h: Regenerate.
291 2018-08-31 Pedro Alves <palves@redhat.com>
293 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
294 * target.h (Hardware watchpoint interfaces): Describe
295 continuable/steppable/non-steppable watchpoints.
296 * gdbarch.h, gdbarch.c: Regenerate.
298 2018-08-31 Pedro Alves <palves@redhat.com>
300 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
303 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
304 * target.h (target_ops::have_continuable_watchpoint): Delete.
305 (target_have_continuable_watchpoint): Delete.
306 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
307 * target-delegates.c: Regenerate.
309 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
311 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
312 the files present in "gnulib/import/m4/".
314 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
316 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
317 c.sw, c.swsp, and c.sdsp.
319 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
321 * riscv-tdep.c (struct riscv_inferior_data): Delete.
322 (riscv_read_misa_reg): Don't cache value read into inferior data.
323 (riscv_new_inferior_data): Delete.
324 (riscv_inferior_data_cleanup): Delete.
325 (riscv_inferior_data): Delete.
326 (riscv_invalidate_inferior_data): Delete.
327 (_initialize_riscv_tdep): Remove initialisation of inferior data.
329 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
331 * compile/compile-cplus-types.c
332 (compile_cplus_instance::leave_scope): Take the address of scope
334 (compile_cplus_instance::convert_qualified_base): Compare quals
337 2018-08-30 Keith Seitz <keiths@redhat.com>
339 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
340 Use "%s" and host_address_to_string instead of "%p" in printf.
342 2018-08-29 Keith Seitz <keiths@redhat.com>
344 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
345 and compile-cplus-types.c.
346 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
347 * c-lang.c (cplus_language_defn): Set C++ compile functions.
348 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
350 * compile/compile-c-support.c: Include compile-cplus.h.
351 (load_libcompile): Templatize.
352 (get_compile_context): "New" function.
353 (c_get_compile_context): Use get_compile_context.
354 (cplus_get_compile_context): New function.
355 (cplus_push_user_expression, cplus_pop_user_expression)
356 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
357 (cplus_compute_program): Define new structs/functions.
358 * compile/compile-cplus-symmbols.c: New file.
359 * compile/compile-cplus-types.c: New file.
360 * compile/compile-cplus.h: New file.
361 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
363 * compile/compile-object-load.c (get_out_value_type): Use
364 strncmp_iw when comparing symbol names.
365 (compile_object_load): Add mst_bss and mst_data.
366 * compile/compile.c (_initialize_compile): Remove
367 -Wno-implicit-function-declaration from `compile_args'.
368 * compile/gcc-cp-plugin.h: New file.
369 * NEWS: Mention C++ compile support and new debug options.
371 2018-08-29 Keith Seitz <keiths@redhat.com>
373 * linespec.c (collect_info::add_symbol): Make virtual.
374 (struct symbol_searcher_collect_info): New struct.
375 (symbol_searcher::find_all_symbols): New method.
376 * symtab.h (class symbol_searcher): New class.
378 2018-08-29 Keith Seitz <keiths@redhat.com>
380 * linespec.c (struct linespec) <function_symbols, label_symbols>:
381 Change to vector of block_symbol. Update all users.
382 (struct collect_info) <symbols>: Likewise.
383 (collect_info::add_symbol): Take block_symbol as argument.
385 (decode_compound_collector) <m_symbols>: Change type to vector
386 of block_symbol. Update all users.
387 (decode_compound_collector::operator ()): Change parameter type
389 (find_method, find_function_symbols, find_linespec_symbols)
390 (find_label_symbols_in_block, find_label_symbols): Change symbol
391 vectors to block_symbol vectors.
392 * symtab.h (symbol_found_callback_ftype): Change parameter type to
395 2018-08-29 Keith Seitz <keiths@redhat.com>
397 * linespec.c (symbolp): Remove typedef and VEC definitions.
398 (bound_minimal_symbol_d): Likewise.
400 2018-08-29 Keith Seitz <keiths@redhat.com>
402 * linespec.c (decode_compound_collector::decode_compound_collector):
403 Remove initialization for `m_symtabs'.
404 (decode_compound_collector::release_symbols): Change return type
405 to std::vector. Update all callers.
406 (class decode_compound_collector) <m_symbols>: Change type to
408 (lookup_prefix_sym): Change return type to std::vector. Update all
410 (compare_symbols): Remove.
411 (std_compare_symbols): Rename to `compare_symbols'.
412 (find_method): Change `sym_classes' parameter to std::vector.
413 Update all callers. Use std::sort to sort sym_classes.
414 (find_linespec_symbols): Remove cleanup.
416 2018-08-29 Keith Seitz <keiths@redhat.com>
418 * linespec.c (struct linespec) <minimal_symbols>: Change type to
419 std::vector. Update all users.
420 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
421 (struct collect_info) <minimal_symbols>: Likewise.
422 (compare_msymbols): Return bool. Change parameters to const
423 bound_minimal_symbol references.
424 (find_method, find_function_symbols, find_linespec_symbols): Change
425 `minsyms' parameter to std::vector. Update all callers.
427 2018-08-29 Keith Seitz <keiths@redhat.com>
429 * linespec.c (struct linespec) <label_symbols>: Change type to
430 std::vector. Update all users.
431 (find_label_symbols_in_block): Change `result' parameter to
432 std::vector. Update all callers.
433 (find_label_symbols): Return std::vector. Update all callers.
435 2018-08-29 Keith Seitz <keiths@redhat.com>
437 * linespec.c (struct linespec) <function_symbols>: Change type to
438 std::vector. Update all users.
439 (struct collect_info) <function_symbols>: Likewise.
440 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
441 (std_compare_symbols): New function.
442 (find_method, find_function_symbols, find_linespec_symbols)
443 (find_label_symbols_in_block): Change `symbols' parameter to
444 std::vector. Update all callers.
445 (find_label_symbols): Likewise for `function_symbols' and
448 2018-08-29 Keith Seitz <keiths@redhat.com>
450 * linespec.c (symtab_vector_up): Define.
451 (struct linespec) <file_symtabs>: Change type to std::vector *.
453 (struct collect_info) <file_symtabs>: Likewise.
454 (collect_symtabs_from_filename): Return symtab_vector_up.
456 (decode_objc): Remove cleanup.
457 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
458 (symtab_collector::release_symtabs): Return symtab_vector_up.
460 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
462 (collect_symtabs_from_filename, symtabs_from_filename): Return
463 symtab_vector_up. Update all callers.
465 2018-08-29 Tom Tromey <tom@tromey.com>
467 * csky-tdep.c (csky_analyze_prologue): Use
468 core_addr_to_string_nz.
470 2018-08-29 Tom Tromey <tom@tromey.com>
472 * windows-nat.c (struct xlate_exception) <them>: Change type to
474 (xlate): Fix formatting. Remove last entry.
475 (struct xlate_exception, xlate): Comment out.
476 (windows_nat_target::resume): Use ranged for.
478 2018-08-29 Jim Wilson <jimw@sifive.com>
480 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
481 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
483 (riscv_linux_nat_target::store_registers): Likewise.
485 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
489 * gnulib/aclocal.m4: Regenerate.
490 * gnulib/config.in: Regenerate.
491 * gnulib/configure: Regenerate.
492 * gnulib/import/Makefile.am: Update.
493 * gnulib/import/Makefile.in: Update.
494 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
495 * gnulib/import/_Noreturn.h: ... this.
496 * gnulib/import/alloca.in.h: Update.
497 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
498 * gnulib/import/arg-nonnull.h: ... this.
499 * gnulib/import/assure.h: Update.
500 * gnulib/import/at-func.c: Update.
501 * gnulib/import/basename-lgpl.c: Update.
502 * gnulib/import/extra/snippet/c++defs.h: Rename to...
503 * gnulib/import/c++defs.h: ... this.
504 * gnulib/import/canonicalize-lgpl.c: Update.
505 * gnulib/import/cdefs.h: Update.
506 * gnulib/import/chdir-long.c: Update.
507 * gnulib/import/chdir-long.h: Update.
508 * gnulib/import/cloexec.c: Update.
509 * gnulib/import/cloexec.h: Update.
510 * gnulib/import/close.c: Update.
511 * gnulib/import/closedir.c: Update.
512 * gnulib/import/config.charset: Update.
513 * gnulib/import/dirent-private.h: Update.
514 * gnulib/import/dirent.in.h: Update.
515 * gnulib/import/dirfd.c: Update.
516 * gnulib/import/dirname-lgpl.c: Update.
517 * gnulib/import/dirname.h: Update.
518 * gnulib/import/dosname.h: Update.
519 * gnulib/import/dup-safer-flag.c: Update.
520 * gnulib/import/dup-safer.c: Update.
521 * gnulib/import/dup.c: Update.
522 * gnulib/import/dup2.c: Update.
523 * gnulib/import/errno.in.h: Update.
524 * gnulib/import/error.c: Update.
525 * gnulib/import/error.h: Update.
526 * gnulib/import/exitfail.c: Update.
527 * gnulib/import/exitfail.h: Update.
528 * gnulib/import/extra/update-copyright: Update.
529 * gnulib/import/fchdir.c: Update.
530 * gnulib/import/fcntl.c: Update.
531 * gnulib/import/fcntl.in.h: Update.
532 * gnulib/import/fd-hook.c: Update.
533 * gnulib/import/fd-hook.h: Update.
534 * gnulib/import/fd-safer-flag.c: Update.
535 * gnulib/import/fd-safer.c: Update.
536 * gnulib/import/fdopendir.c: Update.
537 * gnulib/import/filename.h: Update.
538 * gnulib/import/filenamecat-lgpl.c: Update.
539 * gnulib/import/filenamecat.h: Update.
540 * gnulib/import/flexmember.h: Update.
541 * gnulib/import/float+.h: Update.
542 * gnulib/import/float.c: Update.
543 * gnulib/import/float.in.h: Update.
544 * gnulib/import/fnmatch.c: Update.
545 * gnulib/import/fnmatch.in.h: Update.
546 * gnulib/import/fnmatch_loop.c: Update.
547 * gnulib/import/fpucw.h: Update.
548 * gnulib/import/frexp.c: Update.
549 * gnulib/import/frexpl.c: Update.
550 * gnulib/import/fstat.c: Update.
551 * gnulib/import/fstatat.c: Update.
552 * gnulib/import/getcwd-lgpl.c: Update.
553 * gnulib/import/getcwd.c: Update.
554 * gnulib/import/getdtablesize.c: Update.
555 * gnulib/import/getlogin_r.c: Update.
556 * gnulib/import/getprogname.c: Update.
557 * gnulib/import/getprogname.h: Update.
558 * gnulib/import/gettext.h: Update.
559 * gnulib/import/gettimeofday.c: Update.
560 * gnulib/import/glob-libc.h: Update.
561 * gnulib/import/glob.c: Update.
562 * gnulib/import/glob.in.h: Update.
563 * gnulib/import/glob_internal.h: Update.
564 * gnulib/import/glob_pattern_p.c: Update.
565 * gnulib/import/globfree.c: Update.
566 * gnulib/import/hard-locale.c: Update.
567 * gnulib/import/hard-locale.h: Update.
568 * gnulib/import/intprops.h: Update.
569 * gnulib/import/inttypes.in.h: Update.
570 * gnulib/import/isnan.c: Update.
571 * gnulib/import/isnand-nolibm.h: Update.
572 * gnulib/import/isnand.c: Update.
573 * gnulib/import/isnanl-nolibm.h: Update.
574 * gnulib/import/isnanl.c: Update.
575 * gnulib/import/itold.c: Update.
576 * gnulib/import/libc-config.h: Update.
577 * gnulib/import/limits.in.h: Update.
578 * gnulib/import/localcharset.c: Update.
579 * gnulib/import/localcharset.h: Update.
580 * gnulib/import/localtime-buffer.c: Update.
581 * gnulib/import/localtime-buffer.h: Update.
582 * gnulib/import/lstat.c: Update.
583 * gnulib/import/m4/00gnulib.m4: Update.
584 * gnulib/import/m4/__inline.m4: Update.
585 * gnulib/import/m4/absolute-header.m4: Update.
586 * gnulib/import/m4/alloca.m4: Update.
587 * gnulib/import/m4/builtin-expect.m4: Update.
588 * gnulib/import/m4/canonicalize.m4: Update.
589 * gnulib/import/m4/chdir-long.m4: Update.
590 * gnulib/import/m4/close.m4: Update.
591 * gnulib/import/m4/closedir.m4: Update.
592 * gnulib/import/m4/configmake.m4: Update.
593 * gnulib/import/m4/d-ino.m4: Update.
594 * gnulib/import/m4/d-type.m4: Update.
595 * gnulib/import/m4/dirent_h.m4: Update.
596 * gnulib/import/m4/dirfd.m4: Update.
597 * gnulib/import/m4/dirname.m4: Update.
598 * gnulib/import/m4/double-slash-root.m4: Update.
599 * gnulib/import/m4/dup.m4: Update.
600 * gnulib/import/m4/dup2.m4: Update.
601 * gnulib/import/m4/eealloc.m4: Update.
602 * gnulib/import/m4/environ.m4: Update.
603 * gnulib/import/m4/errno_h.m4: Update.
604 * gnulib/import/m4/error.m4: Update.
605 * gnulib/import/m4/exponentd.m4: Update.
606 * gnulib/import/m4/exponentl.m4: Update.
607 * gnulib/import/m4/extensions.m4: Update.
608 * gnulib/import/m4/extern-inline.m4: Update.
609 * gnulib/import/m4/fchdir.m4: Update.
610 * gnulib/import/m4/fcntl-o.m4: Update.
611 * gnulib/import/m4/fcntl.m4: Update.
612 * gnulib/import/m4/fcntl_h.m4: Update.
613 * gnulib/import/m4/fdopendir.m4: Update.
614 * gnulib/import/m4/filenamecat.m4: Update.
615 * gnulib/import/m4/flexmember.m4: Update.
616 * gnulib/import/m4/float_h.m4: Update.
617 * gnulib/import/m4/fnmatch.m4: Update.
618 * gnulib/import/m4/fnmatch_h.m4: Update.
619 * gnulib/import/m4/fpieee.m4: Update.
620 * gnulib/import/m4/frexp.m4: Update.
621 * gnulib/import/m4/frexpl.m4: Update.
622 * gnulib/import/m4/fstat.m4: Update.
623 * gnulib/import/m4/fstatat.m4: Update.
624 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
625 * gnulib/import/m4/getcwd-path-max.m4: Update.
626 * gnulib/import/m4/getcwd.m4: Update.
627 * gnulib/import/m4/getdtablesize.m4: Update.
628 * gnulib/import/m4/getlogin.m4: Update.
629 * gnulib/import/m4/getlogin_r.m4: Update.
630 * gnulib/import/m4/getpagesize.m4: Update.
631 * gnulib/import/m4/getprogname.m4: Update.
632 * gnulib/import/m4/gettimeofday.m4: Update.
633 * gnulib/import/m4/glibc21.m4: Update.
634 * gnulib/import/m4/glob.m4: Update.
635 * gnulib/import/m4/glob_h.m4: Update.
636 * gnulib/import/m4/gnulib-cache.m4: Update.
637 * gnulib/import/m4/gnulib-common.m4: Update.
638 * gnulib/import/m4/gnulib-comp.m4: Update.
639 * gnulib/import/m4/gnulib-tool.m4: Update.
640 * gnulib/import/m4/hard-locale.m4: Update.
641 * gnulib/import/m4/include_next.m4: Update.
642 * gnulib/import/m4/inttypes-pri.m4: Update.
643 * gnulib/import/m4/inttypes.m4: Update.
644 * gnulib/import/m4/isnand.m4: Update.
645 * gnulib/import/m4/isnanl.m4: Update.
646 * gnulib/import/m4/largefile.m4: Update.
647 * gnulib/import/m4/limits-h.m4: Update.
648 * gnulib/import/m4/localcharset.m4: Update.
649 * gnulib/import/m4/locale-fr.m4: Update.
650 * gnulib/import/m4/locale-ja.m4: Update.
651 * gnulib/import/m4/locale-zh.m4: Update.
652 * gnulib/import/m4/localtime-buffer.m4: Update.
653 * gnulib/import/m4/longlong.m4: Update.
654 * gnulib/import/m4/lstat.m4: Update.
655 * gnulib/import/m4/malloc.m4: Update.
656 * gnulib/import/m4/malloca.m4: Update.
657 * gnulib/import/m4/math_h.m4: Update.
658 * gnulib/import/m4/mbrtowc.m4: Update.
659 * gnulib/import/m4/mbsinit.m4: Update.
660 * gnulib/import/m4/mbsrtowcs.m4: Update.
661 * gnulib/import/m4/mbstate_t.m4: Update.
662 * gnulib/import/m4/memchr.m4: Update.
663 * gnulib/import/m4/memmem.m4: Update.
664 * gnulib/import/m4/mempcpy.m4: Update.
665 * gnulib/import/m4/memrchr.m4: Update.
666 * gnulib/import/m4/mkdir.m4: Update.
667 * gnulib/import/m4/mkstemp.m4: Update.
668 * gnulib/import/m4/mmap-anon.m4: Update.
669 * gnulib/import/m4/mode_t.m4: Update.
670 * gnulib/import/m4/msvc-inval.m4: Update.
671 * gnulib/import/m4/msvc-nothrow.m4: Update.
672 * gnulib/import/m4/multiarch.m4: Update.
673 * gnulib/import/m4/nocrash.m4: Update.
674 * gnulib/import/m4/off_t.m4: Update.
675 * gnulib/import/m4/onceonly.m4: Update.
676 * gnulib/import/m4/open-cloexec.m4: Update.
677 * gnulib/import/m4/open.m4: Update.
678 * gnulib/import/m4/openat.m4: Update.
679 * gnulib/import/m4/opendir.m4: Update.
680 * gnulib/import/m4/pathmax.m4: Update.
681 * gnulib/import/m4/rawmemchr.m4: Update.
682 * gnulib/import/m4/readdir.m4: Update.
683 * gnulib/import/m4/readlink.m4: Update.
684 * gnulib/import/m4/realloc.m4: Update.
685 * gnulib/import/m4/rename.m4: Update.
686 * gnulib/import/m4/rewinddir.m4: Update.
687 * gnulib/import/m4/rmdir.m4: Update.
688 * gnulib/import/m4/save-cwd.m4: Update.
689 * gnulib/import/m4/secure_getenv.m4: Update.
690 * gnulib/import/m4/setenv.m4: Update.
691 * gnulib/import/m4/signal_h.m4: Update.
692 * gnulib/import/m4/ssize_t.m4: Update.
693 * gnulib/import/m4/stat-time.m4: Update.
694 * gnulib/import/m4/stat.m4: Update.
695 * gnulib/import/m4/std-gnu11.m4: Update.
696 * gnulib/import/m4/stdbool.m4: Update.
697 * gnulib/import/m4/stddef_h.m4: Update.
698 * gnulib/import/m4/stdint.m4: Update.
699 * gnulib/import/m4/stdio_h.m4: Update.
700 * gnulib/import/m4/stdlib_h.m4: Update.
701 * gnulib/import/m4/strchrnul.m4: Update.
702 * gnulib/import/m4/strdup.m4: Update.
703 * gnulib/import/m4/strerror.m4: Update.
704 * gnulib/import/m4/string_h.m4: Update.
705 * gnulib/import/m4/strstr.m4: Update.
706 * gnulib/import/m4/strtok_r.m4: Update.
707 * gnulib/import/m4/sys_socket_h.m4: Update.
708 * gnulib/import/m4/sys_stat_h.m4: Update.
709 * gnulib/import/m4/sys_time_h.m4: Update.
710 * gnulib/import/m4/sys_types_h.m4: Update.
711 * gnulib/import/m4/tempname.m4: Update.
712 * gnulib/import/m4/time_h.m4: Update.
713 * gnulib/import/m4/unistd-safer.m4: Update.
714 * gnulib/import/m4/unistd_h.m4: Update.
715 * gnulib/import/m4/warn-on-use.m4: Update.
716 * gnulib/import/m4/wchar_h.m4: Update.
717 * gnulib/import/m4/wchar_t.m4: Update.
718 * gnulib/import/m4/wctype_h.m4: Update.
719 * gnulib/import/m4/wint_t.m4: Update.
720 * gnulib/import/malloc.c: Update.
721 * gnulib/import/malloc/scratch_buffer.h: Update.
722 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
723 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
724 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
725 * gnulib/import/malloca.c: Update.
726 * gnulib/import/malloca.h: Update.
727 * gnulib/import/malloca.valgrind: Update.
728 * gnulib/import/math.in.h: Update.
729 * gnulib/import/mbrtowc.c: Update.
730 * gnulib/import/mbsinit.c: Update.
731 * gnulib/import/mbsrtowcs-impl.h: Update.
732 * gnulib/import/mbsrtowcs-state.c: Update.
733 * gnulib/import/mbsrtowcs.c: Update.
734 * gnulib/import/memchr.c: Update.
735 * gnulib/import/memmem.c: Update.
736 * gnulib/import/mempcpy.c: Update.
737 * gnulib/import/memrchr.c: Update.
738 * gnulib/import/mkdir.c: Update.
739 * gnulib/import/mkstemp.c: Update.
740 * gnulib/import/msvc-inval.c: Update.
741 * gnulib/import/msvc-inval.h: Update.
742 * gnulib/import/msvc-nothrow.c: Update.
743 * gnulib/import/msvc-nothrow.h: Update.
744 * gnulib/import/open.c: Update.
745 * gnulib/import/openat-die.c: Update.
746 * gnulib/import/openat-priv.h: Update.
747 * gnulib/import/openat-proc.c: Update.
748 * gnulib/import/openat.c: Update.
749 * gnulib/import/openat.h: Update.
750 * gnulib/import/opendir.c: Update.
751 * gnulib/import/pathmax.h: Update.
752 * gnulib/import/pipe-safer.c: Update.
753 * gnulib/import/rawmemchr.c: Update.
754 * gnulib/import/readdir.c: Update.
755 * gnulib/import/readlink.c: Update.
756 * gnulib/import/realloc.c: Update.
757 * gnulib/import/ref-add.sin: Update.
758 * gnulib/import/ref-del.sin: Update.
759 * gnulib/import/rename.c: Update.
760 * gnulib/import/rewinddir.c: Update.
761 * gnulib/import/rmdir.c: Update.
762 * gnulib/import/same-inode.h: Update.
763 * gnulib/import/save-cwd.c: Update.
764 * gnulib/import/save-cwd.h: Update.
765 * gnulib/import/scratch_buffer.h: Update.
766 * gnulib/import/secure_getenv.c: Update.
767 * gnulib/import/setenv.c: Update.
768 * gnulib/import/signal.in.h: Update.
769 * gnulib/import/stat-time.c: Update.
770 * gnulib/import/stat-time.h: Update.
771 * gnulib/import/stat-w32.c: Update.
772 * gnulib/import/stat-w32.h: Update.
773 * gnulib/import/stat.c: Update.
774 * gnulib/import/stdbool.in.h: Update.
775 * gnulib/import/stddef.in.h: Update.
776 * gnulib/import/stdint.in.h: Update.
777 * gnulib/import/stdio.in.h: Update.
778 * gnulib/import/stdlib.in.h: Update.
779 * gnulib/import/str-two-way.h: Update.
780 * gnulib/import/strchrnul.c: Update.
781 * gnulib/import/strdup.c: Update.
782 * gnulib/import/streq.h: Update.
783 * gnulib/import/strerror-override.c: Update.
784 * gnulib/import/strerror-override.h: Update.
785 * gnulib/import/strerror.c: Update.
786 * gnulib/import/string.in.h: Update.
787 * gnulib/import/stripslash.c: Update.
788 * gnulib/import/strnlen1.c: Update.
789 * gnulib/import/strnlen1.h: Update.
790 * gnulib/import/strstr.c: Update.
791 * gnulib/import/strtok_r.c: Update.
792 * gnulib/import/sys_stat.in.h: Update.
793 * gnulib/import/sys_time.in.h: Update.
794 * gnulib/import/sys_types.in.h: Update.
795 * gnulib/import/tempname.c: Update.
796 * gnulib/import/tempname.h: Update.
797 * gnulib/import/time.in.h: Update.
798 * gnulib/import/unistd--.h: Update.
799 * gnulib/import/unistd-safer.h: Update.
800 * gnulib/import/unistd.in.h: Update.
801 * gnulib/import/unsetenv.c: Update.
802 * gnulib/import/verify.h: Update.
803 * gnulib/import/extra/snippet/warn-on-use.h: Update.
804 * gnulib/import/wchar.in.h: Update.
805 * gnulib/import/wctype.in.h: Update.
806 * gnulib/import/xalloc-oversized.h: Update.
807 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
808 "53e2c179f26a890fa6685af4b6c1397ee370433b".
810 2018-08-16 Gary Benson <gbenson@redhat.com>
813 * gdb/main.c (captured_main_1): Exit with nonzero status
814 in batch mode if the last command to be executed failed.
815 * NEWS: Mention the above.
817 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
819 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
820 end of warning message.
822 2018-08-29 Alan Hayward <alan.hayward@arm.com>
825 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
826 (aarch64_extract_return_value): Use
827 aapcs_is_vfp_call_or_return_candidate.
828 (aarch64_return_in_memory): Likewise.
829 (aarch64_store_return_value): Likewise.
831 2018-08-29 Alan Hayward <alan.hayward@arm.com>
834 (aapcs_is_vfp_call_or_return_candidate): Make static
835 (pass_in_v_or_stack): Remove function.
836 (pass_in_v_vfp_candidate): New function.
837 (aarch64_push_dummy_call): Check for float register candidates.
839 2018-08-29 Alan Hayward <alan.hayward@arm.com>
841 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
842 (aapcs_is_vfp_call_or_return_candidate_1): New function.
843 (aapcs_is_vfp_call_or_return_candidate): Likewise.
845 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
848 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
849 (struct ipa_sym_addresses): Rename to...
850 (struct ipa_sym_addresses_common): ... this.
851 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
853 2018-08-28 Tom Tromey <tom@tromey.com>
855 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
856 (token_fifo): Now a std::vector.
857 (yylex, c_parse): Update.
858 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
859 (token_fifo): Now a std::vector.
860 (yylex, d_parse): Update.
861 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
862 (token_fifo): Now a std::vector.
863 (yylex, go_parse): Update.
865 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
867 * parser-defs.h (struct type_stack) <elements>: Change type to
868 std::vector<union type_stack_elt>.
869 <depth, size>: Remove.
870 * parse.c (parse_exp_in_context_1): Adjust.
871 (type_stack_reserve): Remove.
872 (check_type_stack_depth): Remove.
873 (insert_into_type_stack): Adjust to std::vector.
874 (insert_type): Likewise.
875 (push_type): Likewise.
876 (push_type_int): Likewise.
877 (insert_type_address_space): Likewise.
878 (pop_type): Likewise.
879 (pop_type_int): Likewise.
880 (pop_typelist): Likewise.
881 (pop_type_stack): Likewise.
882 (append_type_stack): Likewise.
883 (push_type_stack): Likewise.
884 (get_type_stack): Likewise.
885 (type_stack_cleanup): Likewise.
886 (push_typelist): Likewise.
887 (follow_types): Likewise.
888 (_initialize_parse): Likewise.
890 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
892 * NEWS: Mention csky target.
894 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
895 Hafiz Abid Qadeer <abidh@codesourcery.com>
896 Don Breazeal <donb@codesourcery.com>
898 * csky-linux-tdep.c: New file.
899 * csky-tdep.c: Likewise.
900 * csky-tdep.h: Likewise.
901 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
903 (HFILES_NO_SRCDIR): Add csky-tdep.h.
904 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
905 * configure.tgt: Add csky support.
907 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
909 * python/py-framefilter.c (py_print_frame): Print frame architecture
910 when printing on an MI output.
912 2018-08-27 Tom Tromey <tom@tromey.com>
915 * configure: Rebuild.
916 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
918 2018-08-27 Tom Tromey <tom@tromey.com>
920 * aarch64-linux-tdep.c
921 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
924 2018-08-27 Tom Tromey <tom@tromey.com>
926 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
928 (ppc64_standard_linkage1, ppc64_standard_linkage2)
929 (ppc64_standard_linkage3, ppc64_standard_linkage4)
930 (ppc64_standard_linkage5, ppc64_standard_linkage6)
931 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
934 2018-08-27 Tom Tromey <tom@tromey.com>
936 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
937 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
939 2018-08-27 Tom Tromey <tom@tromey.com>
941 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
942 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
944 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
946 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
948 * sparc-linux-tdep.c (sparc32_linux_sigframe)
949 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
950 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
952 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
953 (ppc64_linux_sigaction_tramp_frame)
954 (ppc32_linux_sighandler_tramp_frame)
955 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
956 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
957 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
958 * mn10300-linux-tdep.c (am33_linux_sigframe)
959 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
960 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
961 * mips-linux-tdep.c (mips_linux_o32_sigframe)
962 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
963 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
964 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
965 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
966 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
967 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
968 * microblaze-linux-tdep.c
969 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
970 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
971 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
972 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
973 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
974 * common/common-types.h (ULONGEST_MAX): New define.
975 (CORE_ADDR_MAX): Fix formatting.
976 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
977 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
978 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
979 (arm_linux_rt_sigreturn_tramp_frame)
980 (arm_eabi_linux_sigreturn_tramp_frame)
981 (arm_eabi_linux_rt_sigreturn_tramp_frame)
982 (thumb2_eabi_linux_sigreturn_tramp_frame)
983 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
984 (arm_linux_restart_syscall_tramp_frame)
985 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
986 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
987 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
989 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
991 2018-08-27 Tom Tromey <tom@tromey.com>
993 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
995 * mips-tdep.c (mips_deal_with_atomic_sequence)
996 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
997 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
998 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
999 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
1001 * aarch64-tdep.c (aarch64_software_single_step): Use
1004 2018-08-27 Tom Tromey <tom@tromey.com>
1006 * linespec.c (complete_linespec_component): Add cast to "char".
1007 * completer.c (completion_tracker::build_completion_result): Add
1010 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1012 * solist.h (struct solist, struct target_so_ops): Fix
1015 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1017 * ada-tasks.c (ada_task_info_s): Remove typedef.
1018 (DEF_VEC_O(ada_task_info_s)): Remove.
1019 (struct ada_tasks_inferior_data): Initialize fields.
1020 <task_list>: Make an std::vector.
1021 (get_ada_tasks_inferior_data): Allocate with new.
1022 (ada_get_task_number): Adjust.
1023 (get_task_number_from_id): Likewise.
1024 (valid_task_id): Likewise.
1025 (ada_get_task_info_from_ptid): Likewise.
1026 (iterate_over_live_ada_tasks): Likewise.
1027 (add_ada_task): Likewise.
1028 (read_known_tasks): Likewise.
1029 (ada_build_task_list): Likewise.
1030 (print_ada_task_info): Likewise.
1031 (info_task): Likewise.
1032 (task_command_1): Likewise.
1034 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1036 * ada-lang.c (add_angle_brackets): Return std::string.
1038 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
1040 * python/py-threadevent.c (py_get_event_thread): Initialize
1043 2018-08-24 Pedro Alves <palves@redhat.com>
1045 * python/py-bpevent.c (create_breakpoint_event_object): Use
1046 copy-initialization.
1047 * python/py-continueevent.c (emit_continue_event): Use
1048 copy-initialization.
1049 * python/py-exitedevent.c (create_exited_event_object): Return a
1051 (emit_exited_event): Use copy-initialization.
1052 * python/py-inferior.c (python_new_inferior)
1053 (python_inferior_deleted, add_thread_object): Use
1054 copy-initialization.
1055 * python/py-infevents.c (create_inferior_call_event_object)
1056 (create_register_changed_event_object)
1057 (create_memory_changed_event_object): Return a gdbpy_ref<>.
1058 (emit_inferior_call_event, emit_memory_changed_event)
1059 (emit_register_changed_event): Use copy-initialization.
1060 * python/py-newobjfileevent.c (create_new_objfile_event_object):
1061 Return a gdbpy_ref<>.
1062 (emit_new_objfile_event): Use copy-initialization.
1063 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1064 (emit_clear_objfiles_event): Use copy-initialization.
1065 * python/py-signalevent.c (create_signal_event_object): Use
1066 copy-initialization.
1067 * python/py-threadevent.c (create_thread_event_object): Use
1068 copy-initialization.
1070 2018-08-24 Pedro Alves <palves@redhat.com>
1071 Simon Marchi <simon.marchi@ericsson.com>
1074 * python/py-continueevent.c: Include "gdbthread.h".
1075 (create_continue_event_object): Add intro comment. Add 'ptid'
1076 parameter. Use it to find thread to pass to
1077 create_thread_event_object.
1078 (emit_continue_event): Pass PTID down to
1079 create_continue_event_object.
1080 * python/py-event.h (py_get_event_thread): Declare.
1081 (create_thread_event_object): Remove default from 'thread'
1083 * python/py-stopevent.c (create_stop_event_object): Use
1084 py_get_event_thread.
1085 * python/py-threadevent.c (get_event_thread): Rename to ...
1086 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1087 and use it to find the thread.
1088 (create_thread_event_object): Assert that THREAD isn't null.
1089 Don't find the event thread here.
1091 2018-08-23 Kevin Buettner <kevinb@redhat.com>
1093 * block.h (blockrange, blockranges): New struct declarations.
1094 (struct block): Add new field named `ranges'.
1095 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1096 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1097 macros for accessing ranges in struct block.
1098 (make_blockranges): New declaration.
1099 block.c (make_blockranges): New function.
1100 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1102 * symtab.h (find_pc_partial_function): Add new parameter `block'.
1103 * blockframe.c (cache_pc_function_block): New static global.
1104 (clear_pc_function_cache): Clear cache_pc_function_block.
1105 (find_pc_partial_function): Move comment to symtab.h. Add
1106 support for non-contiguous blocks.
1107 * cli/cli-cmds.c (block.h): Include.
1108 (print_disassembly): Handle printing of non-contiguous blocks.
1109 (disassemble_current_function): Likewise.
1110 (disassemble_command): Likewise.
1112 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1114 * blockframe.c (get_pc_function_start): Likewise.
1115 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1116 (gcc_symbol_address): Likewise.
1117 * compile/compile-object-run.c (compile_object_run): Likewise.
1118 * compile/compile.c (get_expr_block_and_pc): Likewise.
1119 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1120 (func_addr_to_tail_call_list): Likewise.
1121 * findvar.c (default_read_var_value): Likewise.
1122 * inline-frame.c (inline_frame_this_id): Likewise.
1123 (skip-inline_frames): Likewise.
1124 * infcmd.c (until_next_command): Likewise.
1125 * linespec.c (convert_linespec_to_sals): Likewise.
1126 * parse.c (parse_exp_in_context_1): Likewise.
1127 * printcmd.c (build_address_symbolic): likewise.
1128 (info_address_command): Likewise.
1129 symtab.c (find_function_start_sal): Likewise.
1130 (skip_prologue_sal): Likewise.
1131 (find_function_alias_target): Likewise.
1132 (find_gnu_ifunc): Likewise.
1133 * stack.c (find_frame_funname): Likewise.
1134 * symtab.c (fixup_symbol_section): Likewise.
1135 (find_function_start_sal): Likewise.
1136 (skip_prologue_sal): Likewsie.
1137 (find_function_alias_target): Likewise.
1138 (find_gnu_ifunc): Likewise.
1139 * tracepoint.c (info_scope_command): Likewise.
1140 * value.c (value_fn_field): Likewise.
1142 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1143 in place of find_pc_partial_function.
1144 * blockframe.c (find_function_entry_range_from_pc): New function.
1145 * symtab.h (find_function_entry_range_from_pc): Declare and document.
1146 * objfiles.c (objfile_relocate1): Relocate start and end addresses
1147 for each range in a block.
1150 2018-08-23 Xavier Roirand <roirand@adacore.com>
1152 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1155 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1157 * solib-svr4.c (read_program_headers_from_bfd): Return
1158 gdb::optional<gdb::byte_vector>.
1159 (svr4_exec_displacement): Adjust.
1161 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1163 * solib-svr4.c (read_program_header): Return
1164 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1165 (find_program_interpreter): Return
1166 gdb::optional<gdb::byte_vector>.
1167 (scan_dyntag_auxv): Adjust.
1168 (enable_break): Adjust.
1169 (svr4_exec_displacement): Adjust.
1171 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1173 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1174 * inf-child.c (inf_child_target::terminal_save_inferior): New.
1176 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1178 * guile/scm-string.c (gdbscm_scm_from_printf): Use
1180 * guile/scm-utils.c (gdbscm_printf): Likewise.
1181 * serial.c (serial_printf): Likewise.
1182 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1184 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
1186 * stack.c (print_frame): Print frame architecture when printing on
1188 * NEWS: Mention new "arch" attribute in frame output.
1190 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1192 * arch/aarch64.h (aarch64_regnum): Update comment.
1194 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1196 * NEWS: Add SVE to 8.2 section.
1198 2018-08-21 Pedro Alves <palves@redhat.com>
1200 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1201 out from gdbscm_parse_function_args.
1202 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1203 gdbscm_parse_function_args_1.
1205 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
1208 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1211 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
1213 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1215 2018-08-19 Michael Spang <spang@google.com>
1218 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1219 for PT_TLS segments.
1221 2018-08-18 Kevin Buettner <kevinb@redhat.com>
1223 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1224 dwarf_variable_value.
1225 * dwarf2-frame.c (class dwarf_expr_executor):
1226 Add override for dwarf_variable_value.
1227 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1228 (class symbol_needs_eval_context): Likewise.
1229 (indirect_synthetic_pointer): Add forward declaration.
1230 (sect_variable_value): New function.
1231 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1232 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1233 for DW_OP_GNU_variable_value.
1235 2018-08-16 Tom Tromey <tom@tromey.com>
1237 * top.c (read_command_file): Update.
1238 (command_line_input): Remove "repeat" argument.
1239 * ada-lang.c (get_selections): Update.
1240 * linespec.c (decode_line_2): Update.
1241 * defs.h (command_line_input): Remove argument.
1242 * cli/cli-script.c (read_next_line): Update.
1243 * python/py-gdb-readline.c: Update.
1245 2018-08-17 Tom Tromey <tom@tromey.com>
1247 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1250 2018-08-15 Tom Tromey <tom@tromey.com>
1252 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1254 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
1256 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1257 If used, use find_pc_partial_function to find address range
1259 * mi/mi-main.c (mi_cmd_list_features): Report
1260 "data-disassemble-a-option" feature.
1261 * NEWS: Mention new -data-disassemble option -a.
1263 2018-08-13 Tom Tromey <tom@tromey.com>
1265 * common/common-defs.h (_FORTIFY_SOURCE): Define.
1267 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1269 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1270 (aarch64_linux_collect_sve_regset): Likewise.
1271 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1272 * regcache.h (regcache_map_entry_size): New function.
1274 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1276 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1277 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1278 (SVE_HEADER_VL_LENGTH): Likewise.
1279 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1280 (SVE_HEADER_FLAGS_LENGTH): Likewise.
1281 (SVE_HEADER_RESERVED_LENGTH): Likewise.
1282 (SVE_HEADER_SIZE_OFFSET): Likewise.
1283 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1284 (SVE_HEADER_VL_OFFSET): Likewise.
1285 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1286 (SVE_HEADER_FLAGS_OFFSET): Likewise.
1287 (SVE_HEADER_RESERVED_OFFSET): Likewise.
1288 (SVE_HEADER_SIZE): Likewise.
1289 (aarch64_linux_core_read_vq): Add function.
1290 (aarch64_linux_core_read_description): Check for SVE section.
1292 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1294 * aarch64-fbsd-tdep.c
1295 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1297 * aarch64-linux-tdep.c
1298 (aarch64_linux_iterate_over_regset_sections): Likewise.
1299 * alpha-linux-tdep.c
1300 (alpha_linux_iterate_over_regset_sections):
1302 (alphanbsd_iterate_over_regset_sections): Likewise.
1304 (amd64fbsd_iterate_over_regset_sections): Likewise.
1305 * amd64-linux-tdep.c
1306 (amd64_linux_iterate_over_regset_sections): Likewise.
1308 (armbsd_iterate_over_regset_sections): Likewise.
1310 (arm_fbsd_iterate_over_regset_sections): Likewise.
1312 (arm_linux_iterate_over_regset_sections): Likewise.
1313 * corelow.c (get_core_registers_cb): Likewise.
1314 (core_target::fetch_registers): Likewise.
1315 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1316 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1317 * gdbarch.h (void): Regenerate.
1318 * gdbarch.sh: Add supply_size and collect_size.
1319 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1320 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1321 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1322 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1323 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1324 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1325 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1326 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1327 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1328 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1329 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1330 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1331 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1332 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1333 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1334 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1335 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1336 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1337 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1338 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1339 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1340 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1341 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1342 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1343 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1344 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1345 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1346 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1347 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1348 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1350 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
1352 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1355 2018-08-10 Keith Seitz <keiths@redhat.com>
1357 * compile/compile-c-support.c (add_code_header, add_code_footer):
1358 Move into policy class.
1359 (c_push_user_expression, pop_user_expression_nop)
1360 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1361 (compile_program): New host class.
1362 (c_compile_program): New typedef.
1363 (c_compute_porgram): Use c_compile_program.
1365 2018-08-10 Keith Seitz <keiths@redhat.com>
1367 * compile/compile-internal.h (compile_instance::~compile_instance):
1368 Remove calls to htab_delete.
1369 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1370 * compile.c (compile_instance::compile_instance): Initialize
1371 htab unique pointers.
1372 (compile_instance::get_cached_type, compile_instance::insert_type)
1373 (compile_instance::error_symbol_once): Update for unique_ptr.
1375 2018-08-10 Keith Seitz <keiths@redhat.com>
1377 * compile/compile-c-symbols.c (struct symbol_error)
1378 (hash_symbol_error, eq_symbol_error, del_symbol_error)
1379 (compile_instance::insert_symbol_error)
1380 (compile_instance::error_symbol_once): Move to ...
1381 * compile/compile.c: ... here.
1383 2018-08-10 Keith Seitz <keiths@redhat.com>
1385 * compile/compile-c-support.c (c_get_compile_context): Use `new'
1386 instead of `new_compile_instance'.
1387 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1389 If the symbol error map is not initialized, create it.
1390 (generate_c_for_for_one_symbol): Do not check/initialize
1391 the symbol error map.
1392 * compile/compile-c-types.c (compile_c_instance): Make a class.
1394 (compile_instance::compile_instance): Initialize the type cache.
1395 (get_cached_type): New function.
1396 (insert_type): Update description.
1397 (compile_c_instance::m_default_cflags): Define.
1398 (convert_type): Update description. Use get_cached_type.
1399 (delete_instance): Moved to destructor.
1400 (new_compile_instance): Moved to constructor.
1401 * compile/compile-c.h (compile_c_instance): Make class inheriting
1402 from compile_instance.
1403 <base>: Remove field.
1404 <type_map, symbol_err_map>: Move to base class.
1405 <c_plugin>: Rename to `m_plugin' and remove pointer type.
1406 * compile/compile-internal.h (compile_instance): Make class.
1407 <type_map_t, symbol_err_map_t>: Define.
1408 <fe>: Rename to `m_gcc_fe'.
1409 <scope, block, gcc_target_options>: Add `m_' prefix.
1410 <m_type_map, m_symbol_err_map>: New fields, moved from
1413 (convert_type, new_compile_instance): Remove.
1414 * compile/compile.c (cleanup_compile_instance): Remove.
1415 (compile_to_object): Use unique_ptr to eliminate cleanups.
1416 (compile_instance::set_print_callback, compile_instance::version)
1417 (compile_instance::set_verbose)
1418 (compile_instance::set_driver_filename)
1419 (compile_instance::set_triplet_regexp)
1420 (compile_instance::set_arguments)
1421 (compile_instance::set_source_file)
1422 (compile_instance::compile): Define.
1424 2018-08-10 Keith Seitz <keiths@redhat.com>
1426 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1427 * compile/compile-c-types.c: Define GCC_METHODN macros and include
1428 gcc-c-fe.def to define C plugin.
1429 (delete_instance): Delete `c_plugin'.
1430 (new_compile_instance): Initialize `c_plugin'.
1431 * compile/compile-c.h: Include gcc_c_plugin.h.
1432 (struct compile_c_instance) <c_plugin>: New member.
1433 * gcc-c-plugin.h: New file.
1434 Update all callers with API change.
1436 2018-08-10 Keith Seitz <keiths@redhat.com>
1438 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1439 (HFILES_NO_SRCDIR): ... to here.
1440 Add compile-internal.h and compile-c.h.
1441 * compile/compile-c-support.c: Include compile-c.h.
1442 * compile/compile-c-symbols.c: Include compile-c.h.
1443 (generate_c_for_variable_locations): Update comment.
1444 * compile/compile-c-types.c: Include compile-c.h.
1445 * compile/compile-c.h: New file -- moved C language declarations
1446 from other files here.
1447 * compile/compile-internal.h: Do not include hashtab.h or
1448 common/enum-flags.h.
1449 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1450 (gcc_convert_symbol, gcc_symbol_address)
1451 (generate_c_for_variable_locations, c_get_mode_for_size)
1452 (c_get_range_decl_name): Definitions moved to compile-c.h.
1453 * compile/compile-loc2c.c: Include compile-c.h.
1455 2018-08-10 Keith Seitz <keiths@redhat.com>
1457 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1458 (c_symbol_substitution_name): ... this.
1461 2018-08-10 Keith Seitz <keiths@redhat.com>
1463 * compile/compile-c-support.c (c_compute_program): Use
1464 unique_xmalloc_ptr to eliminate cleanup.
1465 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1466 Return a unique_xmalloc_ptr and eliminate cleanup.
1467 * compile/compile-internal.h (generate_c_for_variable_locations):
1468 Return unique_xmalloc_ptr and update description.
1470 2018-08-10 Alan Hayward <alan.hayward@arm.com>
1472 * corelow.c (core_target::get_core_register_section): Rename
1473 min_size to section_min_size.
1475 2018-08-09 Jim Wilson <jimw@sifive.com>
1477 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1478 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1479 * NEWS: Mention new GNU/Linux RISC-V target.
1480 * configure.host: Add riscv*-*-linux*.
1481 * configure.nat: Add riscv*.
1482 * configure.tgt: Add riscv*-*-linux*.
1483 * riscv-linux-nat.c: New file.
1484 * riscv-linux-tdep.c: New file.
1486 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1488 * infrun.c (resume): Make static, add forward declaration.
1489 (proceed): Update header comment.
1490 * infrun.h (resume): Delete declaration.
1492 2018-08-09 Tom Tromey <tom@tromey.com>
1494 * riscv-tdep.h: Minor formatting fixes.
1496 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
1498 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1499 * dwarf-index-cache.c (create_dir_and_check): Likewise.
1500 (test_mkdir_recursive): Likewise.
1501 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1503 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1505 * valarith.c (value_subscripted_rvalue): If an array is not in
1506 memory, and we don't know the upper bound, then we can't know that
1507 the requested element exists or not.
1509 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
1511 * target.c (str_comma_list_concat_elem): Fix typo in comment.
1512 (target_options_to_string): Add comment.
1514 2018-08-08 Tom Tromey <tom@tromey.com>
1516 * unittests/scoped_mmap-selftests.c: Check result of "write".
1518 2018-08-08 Jim Wilson <jimw@sifive.com>
1520 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1521 (decode_register_index_short): New.
1522 (decode_j_type_insn, decode_cj_type_insn): New.
1523 (decode_b_type_insn, decode_cb_type_insn): New.
1524 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
1525 local xlen. Check xlen when decoding ambiguous compressed insns. In
1526 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1527 is_c_sw_insn instead of is_sw_insn.
1528 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1529 (riscv_software_single_step): New.
1530 * riscv-tdep.h (riscv_software_single_step): Declare.
1532 * riscv-tdep.c (riscv_isa_xlen): Drop static.
1533 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1535 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
1538 * target.c (dispose_inferior): Don't dispose of inferiors that are
1541 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
1543 * remote.c (remote_target::download_tracepoint): Change char* to
1546 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
1548 * target.h (target_options_to_string): Return an std::string.
1549 * target.c (str_comma_list_concat_elem): Return void, use
1551 (do_option): Likewise.
1552 (target_options_to_string): Return an std::string.
1553 * linux-nat.c (linux_nat_target::wait): Adjust.
1554 * target-debug.h (target_debug_print_options): Adjust.
1556 2018-08-07 Tom Tromey <tom@tromey.com>
1558 * Makefile.in (CPPFLAGS): New variable.
1559 (INTERNAL_CPPFLAGS): Use it.
1561 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1563 * NEWS: Mention the index cache.
1565 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1567 * common/pathstuff.h (get_standard_cache_dir): New.
1568 * common/pathstuff.c (get_standard_cache_dir): New.
1569 * build-id.h (build_id_to_string): New.
1570 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1571 DEBUG_STR_SUFFIX): Move to here.
1572 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1573 DEBUG_STR_SUFFIX): Move from there.
1574 (write_psymtabs_to_index): Make non-static, add basename
1575 parameter. Write to temporary files, rename when done.
1576 (save_gdb_index_command): Adjust call to
1577 write_psymtabs_to_index.
1578 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1580 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1581 (get_gdb_index_contents_from_cache): New.
1582 (get_gdb_index_contents_from_cache_dwz): New.
1583 (dwarf2_initialize_objfile): Read index from cache.
1584 (dwarf2_build_psymtabs): Save to index.
1585 * dwarf-index-cache.h: New file.
1586 * dwarf-index-cache.c: New file.
1587 * dwarf-index-write.h: New file.
1589 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1591 * gnulib/aclocal.m4: Re-generate.
1592 * gnulib/config.in: Re-generate.
1593 * gnulib/configure: Re-generate.
1594 * gnulib/import/Makefile.am: Re-generate.
1595 * gnulib/import/Makefile.in: Re-generate.
1596 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1597 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1598 * gnulib/import/m4/mkdir.m4: New file.
1599 * gnulib/import/mkdir.c: New file.
1600 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1603 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1605 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1606 * common/scoped_mmap.c: New file.
1607 * common/scoped_mmap.h (destroy): New method.
1608 (~scoped_mmap, reset): Use destroy.
1609 (scoped_mmap): New move constructor.
1610 (mmap_file): New declaration.
1611 * unittests/scoped_mmap-selftests.c (test_normal,
1612 test_invalid_filename, run_tests): New functions.
1613 (_initialize_scoped_mmap_selftests): Register selftest.
1615 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1617 * dwarf2read.c (read_gdb_index_from_section): Rename to...
1618 (read_gdb_index_from_buffer): ... this. Remove section
1619 parameter, add buffer parameter.
1620 (get_gdb_index_contents_ftype,
1621 get_gdb_index_contents_dwz_ftype): New typedefs.
1622 (dwarf2_read_gdb_index): Add callback parameters to get the
1624 (get_gdb_index_contents_from_section): New.
1625 (dwarf2_initialize_objfile): Update call to
1626 dwarf2_read_gdb_index.
1628 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1630 * common/filestuff.h (gdb_fopen_cloexec): New overload.
1631 (gdb_open_cloexec): Likewise.
1632 * nat/linux-osdata.c (command_from_pid): Use string_printf.
1633 (commandline_from_pid): Likewise.
1634 (linux_xfer_osdata_threads): Likewise.
1635 (linux_xfer_osdata_fds): Likewise.
1636 * ada-lang.c (is_package_name): Likewise.
1637 * auxv.c (procfs_xfer_auxv): Likewise.
1638 * breakpoint.c (print_one_breakpoint_location): Use
1640 (print_one_catch_solib): Use string_printf.
1641 * coff-pe-read.c (add_pe_exported_sym): Likewise.
1642 (add_pe_forwarded_sym): Likewise.
1643 * dwarf2read.c (create_type_unit_group): Likewise.
1644 (build_error_marker_type): Likewise.
1645 * infcall.c (get_function_name): Likewise.
1646 * valprint.c (print_converted_chars_to_obstack): Likewise.
1647 * xtensa-tdep.c (xtensa_register_type): Likewise.
1649 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
1651 * remote.c (remote_target::download_tracepoint): Fix format
1654 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1656 * tracefile.c: Include common/byte-vector.h.
1657 (trace_save): Change type of buf to gdb::byte_vector. Initialize
1658 with trace_regblock_size if needed. Update uses of buf.
1660 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1662 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1663 std::vector<unsigned char>.
1664 * tracepoint.c (collection_list::collection_list): Remove
1665 m_regs_mask initializer from initializer list. Resize
1666 m_regs_mask using the largest remote register number.
1667 (collection_list::add_remote_register): Remove size check on
1668 m_regs_mask. Use at to access element.
1669 (collection_list::stringify): Change type of temp_buf to
1670 gdb::char_vector. Update uses of temp_buf. Resize if needed to
1671 stringify the register mask. Use pack_hex_byte for the register
1674 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1676 * tracepoint.h (class collection_list) <add_register>: Remove.
1677 <add_remote_register, add_ax_registers, add_local_register>:
1679 <add_memrange>: Add scope parameter.
1680 * tracepoint.c (encode_actions_1): Likewise.
1681 (collection_list::add_register): Rename to ...
1682 (collection_list::add_remote_register): ... this. Update
1684 (collection_list::add_ax_registers, add_local_register): New
1686 (collection_list::add_memrange): Add scope parameter. Call
1687 add_local_register instead of add_register.
1688 (finalize_tracepoint_aexpr): New function.
1689 (collection_list::collect_symbol): Update calls to add_memrange.
1690 Call add_local_register instead of add_register. Call
1691 add_ax_registers. Call finalize_tracepoint_aexpr.
1692 (encode_actions_1): Get remote regnos for $reg action. Call
1693 add_remote_register, add_ax_registers, and add_local_register.
1694 Update call to add_memrange. Call finalize_tracepoint_aexpr.
1695 (validate_actionline): Call finalize_tracepoint_aexpr.
1697 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1699 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1700 Replace array buf with gdb::char_vector buf, of size
1701 get_remote_packet_size (). Replace references to buf and
1702 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
1703 and xsnprintf with snprintf. Raise errors if the buffer is too
1706 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1708 * remote.c (remote_target::download_tracepoint): Fix the has_more
1709 predicate in the QTDP action list iteration.
1711 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1713 * remote.c (remote_target::download_tracepoint): Fix indentation
1716 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1718 * proc-api.c (_initialize_proc_api): Remove c, unused.
1719 * procfs.c (procfs_init_inferior): Remove signals, unused.
1720 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1723 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
1724 Andrew Burgess <andrew.burgess@embecosm.com>
1726 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1727 'W_STOPCODE (0)' as this could be ambiguous.
1729 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
1731 * ser-tcp.c (net_open): Fix thinko when deciding whether to
1732 disable TCP's Nagle algorithm (use "ai_protocol" instead of
1735 2018-08-02 Tom Tromey <tom@tromey.com>
1738 * dwarf2read.c (read_func_scope): Set symtab on template parameter
1740 (process_structure_scope): Likewise.
1742 2018-08-02 Xavier Roirand <roirand@adacore.com>
1745 * darwin-nat.c (darwin_kill_inferior): Fix handling of
1748 2018-08-02 Tom Tromey <tom@tromey.com>
1750 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1751 (darwin_suspend_inferior, darwin_resume_inferior)
1752 (darwin_decode_notify_message, darwin_resume_inferior_threads)
1753 (darwin_check_new_threads): Check result of get_darwin_inferior.
1755 2018-07-31 Joel Brobecker <brobecker@adacore.com>
1759 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
1761 * varobj.c (varobj_get_path_expr_parent): Report an error if
1762 parent is a dynamic varobj.
1764 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1766 * gnulib/aclocal.m4: Re-generate.
1767 * gnulib/config.in: Re-generate.
1768 * gnulib/configure: Re-generate.
1769 * gnulib/import/Makefile.in: Re-generate.
1770 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1771 * gnulib/import/m4/onceonly.m4: Re-generate.
1773 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1775 * target-descriptions.c (struct xml_test_tdesc): New.
1776 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1777 (record_xml_tdesc): Update.
1778 (maintenance_check_xml_descriptions): Update.
1779 * target-descriptions.h (record_xml_tdesc): Update comment.
1781 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
1783 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1784 checking array bounds are defined.
1786 2018-07-30 Tom Tromey <tom@tromey.com>
1788 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1789 irreflexivity violation.
1791 2018-07-30 Tom Tromey <tom@tromey.com>
1793 * cli/cli-decode.c (lookup_cmd): Remove lint code.
1794 * value.c (unpack_long): Remove lint code.
1795 * valops.c (value_ind): Remove lint code.
1796 * valarith.c (value_x_binop, value_x_unop, value_equal)
1797 (value_pos): Remove lint code.
1799 2018-07-28 Tom de Vries <tdevries@suse.de>
1801 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1802 with undefined upper bound as <optimized out>.
1804 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
1806 * gcore.in: Rename variable "name" to "prefix". Expand
1809 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
1811 * windows-nat.c (windows_nat_target::create_inferior): Update to
1812 call close() in global namespace.
1814 2018-07-26 Tom Tromey <tom@tromey.com>
1816 * dwarf-index-write.c (add_address_entry): Don't add objfile
1818 * dbxread.c (find_stab_function): Rename from
1819 find_stab_function_addr. Return a bound_minimal_symbol.
1820 (read_dbx_symtab): Use raw_text_low, raw_text_high.
1821 Don't add objfile offsets.
1822 (end_psymtab): Use raw_text_low, raw_text_high,
1823 MSYMBOL_VALUE_RAW_ADDRESS.
1824 (read_ofile_symtab): Update.
1825 (process_one_symbol): Update.
1826 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1828 (dw2_relocate): Remove.
1829 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1831 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1833 (process_psymtab_comp_unit_reader, add_partial_symbol)
1834 (add_partial_subprogram, dwarf2_ranges_read): Update.
1835 (load_partial_dies): Update.
1836 (add_address_entry): Don't add objfile offsets.
1837 (dwarf2_build_include_psymtabs): Update.
1838 (create_addrmap_from_aranges): Don't add objfile offsets.
1839 (dw2_find_pc_sect_compunit_symtab): Update.
1840 * mdebugread.c (parse_symbol): Don't add objfile offsets.
1841 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1843 (parse_partial_symbols): Don't add objfile offsets. Use
1844 raw_text_low, raw_text_high. Update.
1845 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1846 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1847 or call 'relocate' quick function. Clear psymbol_map.
1848 * psympriv.h (struct partial_symbol) <address>: Add section
1850 <set_unrelocated_address>: Rename from set_address.
1851 <raw_text_low, raw_text_high>: New methods.
1852 <text_low, text_high>: Add objfile parameter.
1853 (add_psymbol_to_bcache): Add 'section' parameter. Call
1854 set_unrelocated_address.
1855 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1856 (find_pc_psymbol): Update.
1857 (fixup_psymbol_section, relocate_psymtabs): Remove.
1858 (dump_psymtab, psym_functions): Update.
1859 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1861 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1862 (start_psymtab_common): Update.
1863 * symfile-debug.c (debug_qf_relocate): Remove.
1864 (debug_sym_quick_functions): Update.
1865 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1866 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1869 2018-07-26 Tom Tromey <tromey@redhat.com>
1871 * dbxread.c (end_psymtab): Use text_high_valid and
1873 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1874 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1875 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1877 <text_low_valid, text_high_valid>: New fields.
1878 <set_text_low, set_text_high>: Update.
1879 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1881 2018-07-26 Tom Tromey <tom@tromey.com>
1883 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1885 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1886 textlow and texthigh fields.
1887 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1889 * mdebugread.c (parse_lines, parse_partial_symbols)
1890 (psymtab_to_symtab_1): Update.
1891 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1892 Rename fields. Update comment. Now private.
1893 <text_low, text_high, set_text_low, set_text_high>: New methods.
1894 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1895 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1896 (start_psymtab_common, maintenance_info_psymtabs)
1897 (maintenance_check_psymtabs): Update.
1898 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1900 (scan_xcoff_symtab): Update.
1902 2018-07-26 Tom Tromey <tromey@redhat.com>
1904 * psympriv.h (struct partial_symbol) <unrelocated_address,
1905 address, set_address>: New methods.
1906 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1907 (fixup_psymbol_section, relocate_psymtabs): Update.
1908 (print_partial_symbols): Add 'objfile' parameter. Update.
1909 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1912 2018-07-26 Tom Tromey <tom@tromey.com>
1914 * dwarf-index-write.c (write_psymbols, debug_names::insert)
1915 (debug_names::write_psymbols): Update.
1916 * psympriv.h (struct partial_symbol): Derive from
1917 general_symbol_info.
1918 <obj_section>: New method.
1919 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1920 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1921 (find_pc_sect_psymbol, fixup_psymbol_section)
1922 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1923 (print_partial_symbols, recursively_search_psymtabs)
1924 (compare_psymbols, psymbol_hash, psymbol_compare)
1925 (add_psymbol_to_bcache, maintenance_check_psymtabs)
1926 (psymbol_name_matches, psym_fill_psymbol_map): Update.
1928 2018-07-26 Tom Tromey <tromey@redhat.com>
1930 * dbxread.c (end_psymtab): Remove dead code.
1932 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
1934 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1935 DWARF unwinders are disabled.
1936 * dwarf2-frame.c: Add dwarf2read.h include.
1937 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1939 (dwarf2_frame_unwinders_enabled_p): Define.
1940 (show_dwarf_unwinders_enabled_p): New function.
1941 (_initialize_dwarf2_frame): Register switch to control DWARF
1943 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1944 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1945 (show_dwarf_cmdlist): Remove static keyword.
1946 * dwarf2read.h (set_dwarf_cmdlist): Declare.
1947 (show_dwarf_cmdlist): Declare.
1948 * NEWS: Document new feature.
1950 2018-07-26 Tom de Vries <tdevries@suse.de>
1952 PR breakpoints/23366
1953 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1955 2018-07-26 Tom de Vries <tdevries@suse.de>
1957 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1958 DW_AT_count can't be translated to a dynamic prop.
1960 2018-07-25 Tom de Vries <tdevries@suse.de>
1962 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1965 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
1967 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1969 2018-07-25 Joel Brobecker <brobecker@adacore.com>
1971 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1973 2018-07-24 Keith Seitz <keiths@redhat.comt
1976 * dwarf2read.c (dw2_add_symbol_to_list): New function.
1977 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1978 instead of add_symbol_to_list.
1979 (read_file_scope): Call prepare_one_comp_unit before reading
1982 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
1984 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1986 2018-07-24 Tom Tromey <tom@tromey.com>
1988 * utils.c (malloc, realloc, free): Don't declare.
1989 * configure, config.in: Rebuild.
1990 * configure.ac: Don't check for declarations of free, malloc, or
1993 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1995 * aarch64-linux-nat.c
1996 (aarch64_linux_nat_target::stopped_data_address): Remove unused
1998 * arm-linux-nat.c (fetch_regs): Likewise.
1999 (store_regs): Likewise.
2000 (fetch_vfp_regs): Likewise.
2001 (store_vfp_regs): Likewise.
2002 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
2003 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
2004 (arm_linux_nat_target::insert_watchpoint): Likewise.
2005 (arm_linux_nat_target::remove_watchpoint): Likewise.
2006 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
2008 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
2010 * ppc-linux-nat.c (fetch_register): Likewise.
2011 (fetch_all_gp_regs): Likewise.
2012 (fetch_ppc_registers): Likewise.
2013 (store_all_gp_regs): Likewise.
2014 (store_ppc_registers): Likewise.
2015 (hwdebug_insert_point): Likewise.
2016 (can_use_watchpoint_cond_accel): Likewise.
2017 * remote-sim.c (gdb_os_write_stdout): Likewise.
2019 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2020 Tom Tromey <tom@tromey.com>
2022 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
2024 * configure: Rebuild.
2026 2018-07-22 Tom Tromey <tom@tromey.com>
2028 * regformats/regdat.sh: Define xmltarget_${name} inside
2029 #ifndef IN_PROCESS_AGENT.
2031 2018-07-22 Tom Tromey <tom@tromey.com>
2033 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2035 2018-07-22 Tom Tromey <tom@tromey.com>
2037 * symfile.c (reread_symbols): Notify iter, not objfile.
2039 2018-07-22 Tom Tromey <tom@tromey.com>
2041 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2043 (ravenscar_thread_target::prepare_to_store): Likewise.
2045 2018-07-22 Tom Tromey <tom@tromey.com>
2047 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2048 unused variable. Call value_fetch_lazy when needed.
2049 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2050 Remove unused variable. Call value_fetch_lazy when needed.
2052 2018-07-22 Tom Tromey <tom@tromey.com>
2054 * m32c-tdep.c (mark_dma): Return void.
2055 (make_regs): Remove unused declarations.
2057 2018-07-22 Tom Tromey <tom@tromey.com>
2059 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2060 cmdscm_get_valid_command_smob_arg_unsafe for effect.
2061 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2062 bkscm_get_valid_block_smob_arg_unsafe for effect.
2064 2018-07-22 Tom Tromey <tom@tromey.com>
2066 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2069 2018-07-22 Tom Tromey <tom@tromey.com>
2071 * windows-nat.c (saved_context): Conditionally define.
2072 * remote.c (remote_target::remote_btrace_maybe_reopen):
2073 Conditionally declare "warned".
2074 * inflow.c (sigquit_ours): Conditionally define.
2075 (new_tty): Move "tty" declaration inside #if.
2076 * guile/guile.c (guile_datadir): Conditionally define.
2077 * charset.c (set_be_le_names): Move some declarations inside #if.
2078 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2080 (parse_xml_btrace_conf): Likewise.
2082 2018-07-22 Tom Tromey <tom@tromey.com>
2084 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2086 2018-07-22 Tom Tromey <tom@tromey.com>
2088 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2089 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2090 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2091 * buildsym-legacy.c (get_macro_table): Remove unused variable.
2092 * stack.c (frame_apply_level_command): Remove unused variable.
2093 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2094 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2095 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2097 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2098 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2099 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2101 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2102 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2104 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2105 Remove unused variable.
2106 * cli/cli-script.c (recurse_read_control_structure): Remove unused
2108 * common/tdesc.c (print_xml_feature::visit): Remove unused
2110 * compile/compile-object-load.c (store_regs): Remove unused
2112 * complaints.c (clear_complaints): Remove unused variable.
2113 * corelow.c (core_target_open): Remove unused variable.
2114 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2116 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2118 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2120 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2122 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2124 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2126 * ia64-tdep.c (examine_prologue): Remove unused variable.
2127 * infcall.c (run_inferior_call): Remove unused variable.
2128 * inferior.c (exit_inferior): Remove unused variable.
2129 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2130 * linespec.c (decode_line_2): Remove unused variable.
2131 * linux-nat.c (super_close): Remove.
2132 * linux-tdep.c (linux_info_proc): Remove unused variable.
2133 * mi/mi-main.c (mi_execute_command): Remove unused variable.
2134 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2135 Remove unused variable.
2136 * parse.c (find_minsym_type_and_address): Remove unused variable.
2137 * printcmd.c (info_symbol_command, printf_floating): Remove unused
2139 * python/py-breakpoint.c (bppy_set_commands): Remove unused
2141 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2143 * record-btrace.c (record_btrace_target::store_registers): Remove
2145 (cmd_show_record_btrace_cpu): Remove unused variable.
2146 * riscv-tdep.c (riscv_register_reggroup_p)
2147 (riscv_push_dummy_call, riscv_return_value): Remove unused
2149 * rust-exp.y (literal): Remove unused variable.
2150 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2152 <STRUCTOP_ANONYMOUS>: Likewise.
2153 * s390-linux-tdep.c (s390_linux_init_abi_31)
2154 (s390_linux_init_abi_64): Remove unused variable.
2155 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2156 (file_select_thread, net_windows_open, _initialize_ser_windows):
2157 Remove unused variables.
2158 * symtab.c (find_pc_sect_line): Remove unused variable.
2159 * target-memory.c (compute_garbled_blocks): Remove unused
2161 (target_write_memory_blocks): Remove unused variable.
2162 * target.c (target_stack::unpush): Remove unused variables.
2163 * tracepoint.c (start_tracing, all_tracepoint_actions)
2164 (merge_uploaded_trace_state_variables)
2165 (print_one_static_tracepoint_marker): Remove unused variable.
2166 * unittests/basic_string_view/element_access/char/1.cc (test01):
2167 Remove unused variable.
2168 * windows-nat.c (windows_continue, windows_add_all_dlls)
2169 (do_initial_windows_stuff, windows_nat_target::create_inferior):
2170 Remove unused variables.
2172 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
2174 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2175 attr_profile in HAVE_ELF.
2176 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2179 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
2181 * frame.c (frame_register_unwind): Change parameter name.
2182 (frame_unwind_register): Likewise.
2183 (frame_unwind_register_value): Likewise.
2184 (frame_unwind_register_signed): Likewise.
2185 (frame_unwind_register_unsigned): Likewise.
2186 * frame.h (frame_register_unwind): Likewise.
2187 (frame_unwind_register): Likewise.
2188 (frame_unwind_register_value): Likewise.
2189 (frame_unwind_register_signed): Likewise.
2190 (frame_unwind_register_unsigned): Likewise.
2191 (frame_unwind_arch): Likewise.
2193 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2195 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2198 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2200 * mips-linux-nat.c (mips_linux_nat_target::read_description):
2201 Call `get_ptrace_pid' rather than extracting the ptrace PID by
2204 2018-07-20 Keith Seitz <keiths@redhat.com>
2206 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2207 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2208 m_compunit_symtab, m_language>: Add "m_" prefix.
2210 * buildsym.c: Update all uses.
2212 2018-07-20 Tom Tromey <tom@tromey.com>
2214 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2215 * buildsym.h (record_line_ftype): Remove typedef.
2217 2018-07-20 Tom Tromey <tom@tromey.com>
2219 * buildsym-legacy.h (augment_type_symtab): Don't declare.
2220 (end_expandable_symtab): Likewise.
2221 (end_symtab_get_static_block): Likewise.
2222 (end_symtab_from_static_block): Likewise.
2223 * buildsym-legacy.c (augment_type_symtab): Remove.
2224 (end_expandable_symtab): Remove.
2225 (end_symtab_get_static_block): Remove.
2226 (end_symtab_from_static_block): Remove.
2228 2018-07-20 Tom Tromey <tom@tromey.com>
2230 * dwarf2read.c: Include buildsym.h.
2231 (struct dwarf2_cu) <builder>: New method.
2232 (fixup_go_packaging): Update.
2233 (process_full_comp_unit, process_full_type_unit): Update. Don't
2234 use scoped_free_pendings.
2235 (using_directives): Add "cu" parameter, remove "language".
2236 (read_import_statement, setup_type_unit_groups, )
2237 (read_func_scope, read_lexical_block_scope)
2238 (dwarf2_record_block_ranges, read_namespace): Update.
2239 (lnp_state_machine::lnp_state_machine): Add cu parameter.
2240 (lnp_state_machine::handle_end_sequence): Update.
2241 (class lnp_state_machine) <m_cu>: New member.
2242 <m_record_line_callback>: Remove.
2243 <m_currently_recording_lines>: New member.
2244 (lnp_state_machine::handle_set_file): Update.
2245 (noop_record_line): Remove.
2246 (dwarf_record_line_p): Add cu parameter.
2247 (dwarf_record_line_1, dwarf_finish_line): Likewise.
2248 (lnp_state_machine::record_line)
2249 (lnp_state_machine::lnp_state_machine)
2250 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2251 (dwarf_decode_lines): Update.
2252 (dwarf2_start_subfile): Add cu parameter.
2253 (dwarf2_start_symtab, new_symbol): Update.
2254 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2255 Remove dwarf2_per_objfile parameter.
2256 (dwarf_decode_macros): Update.
2258 2018-07-20 Tom Tromey <tom@tromey.com>
2260 * stabsread.c (define_symbol): Update.
2261 * buildsym-legacy.h (get_buildsym_compunit): Declare.
2262 * dwarf2read.c (new_symbol): Update.
2263 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2264 * cp-namespace.c: Include buildsym.h.
2265 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2266 * buildsym-legacy.c (get_buildsym_compunit): New function.
2268 2018-07-20 Tom Tromey <tom@tromey.com>
2270 * xcoffread.c: Include buildsym-legacy.h.
2271 * windows-nat.c: Include buildsym-legacy.h.
2272 * stabsread.c: Include buildsym-legacy.h.
2273 * mdebugread.c: Include buildsym-legacy.h.
2274 * buildsym-legacy.h: New file.
2275 * buildsym-legacy.c: New file, from buildsym.c.
2276 * go32-nat.c: Include buildsym-legacy.h.
2277 * dwarf2read.c: Include buildsym-legacy.h.
2278 * dbxread.c: Include buildsym-legacy.h.
2279 * cp-namespace.c: Include buildsym-legacy.h.
2280 * coffread.c: Include buildsym-legacy.h.
2281 * buildsym.h: Move some contents to buildsym-legacy.h.
2282 * buildsym.c: Include buildsym-legacy.h. Move many functions to
2284 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2286 2018-07-20 Tom Tromey <tom@tromey.com>
2288 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2289 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2290 (buildsym_compunit::buildsym_compunit)
2291 (buildsym_compunit::~buildsym_compunit)
2292 (buildsym_compunit::get_macro_table): Define.
2294 2018-07-20 Tom Tromey <tom@tromey.com>
2296 * buildsym.c (reset_symtab_globals): Remove.
2297 (buildsym_compunit::end_symtab_from_static_block): Update.
2298 (buildsym_compunit::augment_type_symtab): Update.
2299 (end_symtab_from_static_block): Call free_buildsym_compunit.
2300 (augment_type_symtab, end_symtab, end_expandable_symtab):
2303 2018-07-20 Tom Tromey <tom@tromey.com>
2305 * arch-utils.c: Do not include buildsym.h.
2306 * mipsread.c: Do not include buildsym.h.
2307 * machoread.c: Do not include buildsym.h.
2308 * elfread.c: Do not include buildsym.h.
2310 2018-07-20 Tom Tromey <tom@tromey.com>
2312 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2314 (buildsym_compunit): Add new constructor.
2315 (struct buildsym_compunit) <get_last_source_file, finish_block,
2316 record_block_range, start_subfile, patch_subfile_names,
2317 push_subfile, pop_subfile, record_line, get_compunit_symtab,
2318 set_last_source_start_addr, get_last_source_start_addr,
2319 get_local_using_directives, set_local_using_directives,
2320 get_global_using_directives, outermost_context_p,
2321 get_current_context_stack, get_context_stack_depth,
2322 get_current_subfile, get_local_symbols, get_file_symbols,
2323 get_global_symbols, record_debugformat, record_producer,
2324 push_context, pop_context, end_symtab_get_static_block,
2325 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2327 <record_pending_block, finish_block_internal, make_blockvector,
2328 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2332 2018-05-22 Tom Tromey <tom@tromey.com>
2334 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2336 (finish_block_internal): Update.
2338 2018-07-20 Tom Tromey <tom@tromey.com>
2340 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2342 (finish_block_internal): Update.
2344 2018-07-20 Tom Tromey <tom@tromey.com>
2346 * buildsym.h (EXTERN): Don't define or undef.
2347 * buildsym.c (EXTERN): Don't define.
2349 2018-07-20 Tom Tromey <tom@tromey.com>
2351 * buildsym.c: Remove TODO comment.
2353 2018-07-20 Tom Tromey <tom@tromey.com>
2355 * coffread.c (coff_symtab_read): Update.
2356 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2357 (xcoff_new_init): Update.
2358 * mipsread.c (mipscoff_new_init): Update.
2359 * mdebugread.c (mdebug_build_psymtabs): Update.
2360 * elfread.c (elf_new_init): Update.
2361 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2363 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2364 (coffstab_build_psymtabs, elfstab_build_psymtabs)
2365 (stabsect_build_psymtabs): Update.
2366 * buildsym.h (buildsym_init): Don't declare.
2367 * buildsym.c: Update comment.
2368 (prepare_for_building): Remove.
2369 (start_symtab, restart_symtab): Update.
2370 (reset_symtab_globals): Update comment.
2371 (buildsym_init): Remove.
2373 2018-07-20 Tom Tromey <tom@tromey.com>
2375 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2376 * stabsread.c (patch_block_stabs, define_symbol, read_type)
2377 (read_enum_type, common_block_start, common_block_end)
2378 (cleanup_undefined_types_1, finish_global_stabs): Update.
2379 * mdebugread.c (psymtab_to_symtab_1): Update.
2380 * dwarf2read.c (fixup_go_packaging, read_func_scope)
2381 (read_lexical_block_scope, new_symbol): Update.
2382 * dbxread.c (process_one_symbol): Update.
2383 * coffread.c (coff_symtab_read, process_coff_symbol)
2384 (coff_read_enum_type): Update.
2385 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2387 (get_local_symbols, get_file_symbols, get_global_symbols): New
2389 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2391 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2392 (~scoped_free_pendings): Update.
2393 (finish_block, prepare_for_building, reset_symtab_globals)
2394 (end_symtab_get_static_block, end_symtab_with_blockvector)
2395 (augment_type_symtab, push_context): Update.
2396 (get_local_symbols, get_file_symbols, get_global_symbols): New
2398 (buildsym_init): Update.
2400 2018-07-20 Tom Tromey <tom@tromey.com>
2402 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2403 (process_full_type_unit): Likewise.
2404 (dwarf2_start_symtab): Set list_in_scope.
2406 2018-07-20 Tom Tromey <tom@tromey.com>
2408 * dwarf2read.c (process_psymtab_comp_unit_reader)
2409 (build_type_psymtabs_reader): Do not set list_in_scope.
2411 2018-07-20 Tom Tromey <tom@tromey.com>
2413 * buildsym.c (free_pendings): Remove.
2414 (add_symbol_to_list, scoped_free_pendings)
2415 (finish_block_internal, buildsym_init): Update.
2417 2018-07-20 Tom Tromey <tom@tromey.com>
2419 * xcoffread.c (read_xcoff_symtab): Update.
2420 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2422 * dbxread.c (process_one_symbol): Update.
2423 * coffread.c (coff_symtab_read): Update.
2424 * buildsym.h (finish_block): Update.
2425 * buildsym.c (finish_block): Remove "listhead" argument.
2426 (end_symtab_get_static_block): Update.
2428 2018-07-20 Tom Tromey <tom@tromey.com>
2430 * buildsym.h (class scoped_free_pendings): Remove constructor.
2431 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2433 <m_pending_block_obstack, m_pending_blocks>: New members.
2434 (pending_block_obstack, pending_blocks): Remove.
2435 (scoped_free_pendings::scoped_free_pendings): Default.
2436 (~scoped_free_pendings): Update.
2437 (free_pending_blocks): Remove.
2438 (finish_block_internal, record_pending_block, make_blockvector)
2439 (end_symtab_get_static_block, augment_type_symtab, push_context)
2440 (buildsym_init): Update.
2442 2018-07-20 Tom Tromey <tom@tromey.com>
2444 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2445 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2447 (pending_addrmap, pending_addrmap_obstack)
2448 (pending_addrmap_interesting): Remove.
2449 (scoped_free_pendings, record_block_range, make_blockvector)
2450 (prepare_for_building, reset_symtab_globals, buildsym_init):
2453 2018-07-20 Tom Tromey <tom@tromey.com>
2455 * xcoffread.c (process_linenos): Update.
2456 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2457 * mdebugread.c (psymtab_to_symtab_1): Update.
2458 * dwarf2read.c (setup_type_unit_groups)
2459 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2460 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2461 * dbxread.c (process_one_symbol): Update.
2462 * coffread.c (coff_symtab_read, enter_linenos)
2463 (process_coff_symbol): Update.
2464 * buildsym.h (current_subfile): Don't declare.
2465 (get_current_subfile): Declare.
2466 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2468 (start_subfile, free_buildsym_compunit, push_subfile)
2469 (prepare_for_building, start_symtab): Update.
2470 (get_current_subfile): New function.
2472 2018-07-20 Tom Tromey <tom@tromey.com>
2474 * coffread.c (coff_symtab_read): Update.
2475 * xcoffread.c (read_xcoff_symtab): Update.
2476 * dwarf2read.c (new_symbol): Update.
2477 (read_func_scope, read_lexical_block_scope): Update.
2478 * dbxread.c (process_one_symbol): Update.
2479 * buildsym.h (context_stack, context_stack_depth): Don't declare.
2480 (outermost_context_p): Remove macro.
2481 (outermost_context_p, get_current_context_stack)
2482 (get_context_stack_depth): Declare.
2483 (pop_context): Return struct context_stack.
2484 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2486 (context_stack_size): Remove.
2487 (INITIAL_CONTEXT_STACK_SIZE): Remove.
2488 (prepare_for_building, end_symtab_get_static_block)
2489 (augment_type_symtab, push_context): Update.
2490 (pop_context): Return struct context_stack.
2491 (outermost_context_p, get_current_context_stack)
2492 (get_context_stack_depth): New functions.
2493 (buildsym_init): Update.
2495 2018-07-20 Tom Tromey <tom@tromey.com>
2497 * rust-exp.y: Now a pure parser. Update all rules.
2498 (%union): Move earlier.
2499 (current_parser, work_obstack): Remove globals.
2500 (rust_parser, ~rust_parser): Update.
2501 (class rust_parser) <copy_name, concat3, crate_name, super_name,
2502 lex_character, lex_number, lex_string, lex_identifier,
2503 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2504 convert_name, convert_params_to_expression,
2505 convert_ast_to_expression, ast_basic_type, ast_operation,
2506 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2507 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2508 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2509 ast_array_type, ast_slice_type, ast_reference_type,
2510 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2511 (rust_parse): Update.
2512 (rustyyerror, rustyylex): Add parser parameter.
2513 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2514 (rust_lex_stringish_test, rust_lex_test_sequence)
2515 (rust_lex_test_trailing_dot, rust_lex_test_completion)
2516 (rust_lex_test_push_back, rust_lex_tests): Update.
2518 2018-07-19 Pedro Alves <palves@redhat.com>
2520 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2521 gdb::unique_xmalloc_ptr.
2522 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2523 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2524 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2525 copy-initialization.
2526 * guile/scm-pretty-print.c (ppscm_print_children): Use
2527 gdb::unique_xmalloc_ptr instead of cleanups.
2528 (gdbscm_apply_val_pretty_printer): Remove cleanups.
2529 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2530 gdb::unique_xmalloc_ptr.
2531 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2532 Adjust to use gdb::unique_xmalloc_ptr.
2533 * guile/scm-utils.c (extract_arg): Adjust.
2534 * guile/scm-value.c (gdbscm_value_field): Adjust to use
2535 gdb::unique_xmalloc_ptr instead of a cleanup.
2537 2018-07-19 Tom Tromey <tom@tromey.com>
2539 * utils.c (do_value_free_to_mark)
2540 (make_cleanup_value_free_to_mark): Remove.
2541 * utils.h (make_cleanup_value_free_to_mark): Remove.
2543 2018-07-19 Pedro Alves <palves@redhat.com>
2545 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2546 forwarding reference.
2548 2018-07-18 Pedro Alves <palves@redhat.com>
2550 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2551 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
2554 2018-07-18 Pedro Alves <palves@redhat.com>
2556 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2558 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2560 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2561 directly instead of a cleanup.
2562 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2563 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
2564 (vlscm_binop_gdbthrow): New, factored out from ...
2565 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
2566 (vlscm_rich_compare): Use gdbscm_wrap.
2567 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2568 instead of a cleanup.
2569 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2571 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2572 Use xfree directly instead of a cleanup.
2573 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2574 Adjust to use gdbscm_wrap and scoped_value_mark.
2575 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2576 (gdbscm_value_address, gdbscm_value_dereference)
2577 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2579 (gdbscm_value_dynamic_type): Use scoped_value_mark.
2580 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2582 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2583 gdbscm_wrap and scoped_value_mark.
2584 (gdbscm_value_to_string): Use xfree directly instead of a
2585 cleanup. Move 'buffer' unique_ptr to TRY scope.
2586 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2587 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
2589 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2590 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2592 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2595 2018-07-18 Tom de Vries <tdevries@suse.de>
2597 * findvar.c (default_read_var_value): Also resolve dynamic type for
2598 LOC_OPTIMIZED_OUT vars.
2600 2018-07-18 Maciej W. Rozycki <macro@mips.com>
2602 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2605 2018-07-17 Tom Tromey <tom@tromey.com>
2607 * guile/scm-param.c (pascm_set_func, pascm_show_func)
2608 (compute_enum_list, pascm_set_param_value_x)
2609 (gdbscm_parameter_value): Update.
2610 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2611 (gdbscm_scm_to_host_string): Update.
2612 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2614 * guile/scm-cmd.c (cmdscm_add_completion): Update.
2615 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2616 * guile/scm-string.c (gdbscm_scm_to_string): Return
2618 (gdbscm_scm_to_host_string): Likewise.
2620 2018-07-17 Tom Tromey <tom@tromey.com>
2622 * guile/guile.c (gdbscm_eval_from_control_command): Update.
2623 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2624 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2625 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2628 2018-07-17 Tom Tromey <tom@tromey.com>
2630 * guile/scm-param.c (pascm_signal_setshow_error): Update.
2631 * guile/guile-internal.h (gdbscm_exception_message_to_string):
2633 * guile/scm-cmd.c (cmdscm_function): Update.
2634 * guile/scm-pretty-print.c
2635 (ppscm_print_exception_unless_memory_error): Update.
2636 * guile/scm-exception.c (gdbscm_exception_message_to_string):
2637 Return unique_xmalloc_ptr.
2639 2018-07-17 Tom Tromey <tom@tromey.com>
2641 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2644 2018-07-17 Jim Wilson <jimw@sifive.com>
2646 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2647 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
2648 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
2649 unecessary braces after EF_RISCV_RVC test. Delete call to
2650 set_gdbarch_decr_pc_after_break.
2652 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2653 RISCV_LAST_FP_REGNUM + 1.
2654 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2656 2018-07-17 Tom Tromey <tom@tromey.com>
2658 * configure.ac: Remove --disable-gdbcli.
2659 * configure: Rebuild.
2660 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2661 (SUBDIR_CLI_CFLAGS): Remove.
2662 (SFILES): Use SUBDIR_CLI_SRCS.
2663 (COMMON_OBS): Use SUBDIR_CLI_OBS.
2665 2018-07-17 Tom Tromey <tom@tromey.com>
2668 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2670 2018-07-16 Jim Wilson <jimw@sifive.com>
2672 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2674 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2676 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2678 (libunwind_frame_sniffer): Likewise.
2679 (libunwind_frame_prev_register): Likewise.
2680 (libunwind_sigtramp_frame_sniffer): Likewise.
2681 * ia64-tdep.c (ia64_access_reg): Likewise.
2682 (ia64_access_rse_reg): Likewise.
2683 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2684 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2686 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2688 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2690 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2692 * remote-sim.c (gdbsim_target::close,
2693 gdbsim_target::mourn_inferior): Remove unused variables.
2695 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
2697 * ia64-tdep.c (ktab_buf): New global.
2698 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2699 (get_kernel_table): Adjust.
2701 2018-07-16 Tom Tromey <tom@tromey.com>
2703 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2704 * dwarf2read.c (using_directives, new_symbol): Use
2705 outermost_context_p.
2706 * dbxread.c (process_one_symbol): Use outermost_context_p.
2707 * coffread.c (coff_symtab_read): Use outermost_context_p.
2709 2018-07-16 Tom Tromey <tom@tromey.com>
2711 * dwarf2read.c (using_directives, read_func_scope)
2712 (read_lexical_block_scope): Update.
2713 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2714 * buildsym.h (local_using_directives, global_using_directives):
2716 (get_local_using_directives, set_local_using_directives)
2717 (get_global_using_directives): Declare.
2718 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2719 m_global_using_directives>: New members.
2720 (finish_block_internal, prepare_for_building)
2721 (reset_symtab_globals, end_symtab_get_static_block)
2722 (push_context): Update.
2723 (get_local_using_directives, set_local_using_directives)
2724 (get_global_using_directives): New functions.
2725 (buildsym_init): Update.
2727 2018-07-16 Tom Tromey <tom@tromey.com>
2729 * xcoffread.c (xcoff_initial_scan): Don't call
2730 free_pending_blocks.
2731 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2732 * buildsym.h (class scoped_free_pendings): Add constructor.
2733 (free_pending_blocks): Don't declare.
2734 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2735 (free_pending_blocks): Now static.
2737 2018-07-16 Tom Tromey <tom@tromey.com>
2739 * buildsym.h (push_subfile, pop_subfile): Update declarations.
2740 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2742 (struct subfile_stack): Remove.
2743 (subfile_stack): Remove.
2744 (push_subfile, pop_subfile, buildsym_init): Update.
2746 2018-07-16 Tom Tromey <tom@tromey.com>
2748 * buildsym.c (push_subfile): Use gdb_assert.
2749 (pop_subfile): Use gdb_assert.
2751 2018-07-16 Tom Tromey <tom@tromey.com>
2753 * buildsym.h (merge_symbol_lists): Remove.
2754 * buildsym.c (merge_symbol_lists): Remove.
2756 2018-07-16 Tom Tromey <tom@tromey.com>
2758 * stabsread.c (scan_file_globals): Update comment.
2759 * stabsread.h (scan_file_globals): Move from buildsym.h.
2760 * buildsym.h (scan_file_globals): Move to stabsread.h.
2762 2018-07-16 Tom Tromey <tom@tromey.com>
2764 * xcoffread.c (xcoff_new_init): Update.
2765 * mipsread.c (mipscoff_new_init): Update.
2766 * mdebugread.c (mdebug_build_psymtabs): Update.
2767 * elfread.c (elf_new_init): Update.
2768 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2769 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2770 * buildsym.h (buildsym_new_init): Don't declare.
2771 * buildsym.c (buildsym_new_init): Remove.
2773 2018-07-16 Tom Tromey <tom@tromey.com>
2775 * stabsread.h (within_function): Move from buildsym.h.
2776 * stabsread.c (start_stabs): Clear within_function.
2777 * coffread.c (coff_start_symtab): Clear within_function.
2778 * buildsym.h (within_function): Move to stabsread.h.
2779 * buildsym.c (prepare_for_building): Update.
2781 2018-07-16 Tom Tromey <tom@tromey.com>
2783 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2784 * dwarf2read.c (dwarf2_start_symtab): Don't set
2785 processing_gcc_compilation.
2786 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2788 2018-07-16 Tom Tromey <tom@tromey.com>
2790 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2791 (next_symbol_text_func): Move from buildsym.h.
2792 * stabsread.c (hashname): Move from buildsym.c.
2793 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2794 (next_symbol_text_func, hashname): Move to stabsread.h.
2795 * buildsym.c: Don't include bcache.h
2796 (hashname): Move to stasbread.c.
2798 2018-07-16 Tom Tromey <tom@tromey.com>
2800 * buildsym.h (context_stack_size): Don't declare.
2801 * buildsym.c (context_stack_size): New global.
2803 2018-07-16 Tom Tromey <tom@tromey.com>
2805 * dbxread.c (processing_acc_compilation): New global.
2806 * buildsym.h (processing_acc_compilation): Don't declare.
2808 2018-07-16 Tom Tromey <tom@tromey.com>
2810 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2811 * dbxread.c (read_ofile_symtab): Update.
2812 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2813 * buildsym.h (last_source_start_addr): Remove.
2814 (set_last_source_start_addr, get_last_source_start_addr):
2816 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2818 (struct buildsym_compunit) <m_last_source_start_addr>: New
2820 (prepare_for_building): Remove start_addr parameter.
2821 (start_symtab, restart_symtab, end_symtab_get_static_block)
2822 (end_symtab_with_blockvector): Update.
2823 (set_last_source_start_addr, get_last_source_start_addr): New
2826 2018-07-16 Tom Tromey <tom@tromey.com>
2828 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2830 (have_line_numbers): Remove.
2831 (record_line, prepare_for_building, end_symtab_get_static_block)
2832 (augment_type_symtab): Update.
2834 2018-07-16 Tom Tromey <tom@tromey.com>
2836 * buildsym.c (~buildsym_compunit): Free the macro table.
2837 (struct buildsym_compunit) <get_macro_table, release_macros>: New
2839 <m_pending_macros>: New member.
2840 (pending_macros): Remove.
2841 (~scoped_free_pendings, get_macro_table, prepare_for_building)
2842 (reset_symtab_globals, end_symtab_get_static_block)
2843 (end_symtab_with_blockvector, augment_type_symtab)
2844 (buildsym_init): Update.
2846 2018-07-16 Tom Tromey <tom@tromey.com>
2848 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2850 (buildsym_compunit::set_last_source_file): New method.
2851 <m_last_source_file>: New member.
2852 (prepare_for_building): Remove "name" parameter.
2853 (start_symtab, restart_symtab, reset_symtab_globals): Update.
2854 (last_source_file): Remove.
2855 (set_last_source_file, get_last_source_file): Update.
2857 2018-07-16 Tom Tromey <tom@tromey.com>
2859 * buildsym.c (prepare_for_building): Add assert.
2861 2018-07-16 Tom Tromey <tom@tromey.com>
2863 * buildsym.c (~buildsym_compunit): Update.
2864 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2865 (start_subfile, patch_subfile_names)
2866 (end_symtab_with_blockvector): Update.
2868 2018-07-16 Tom Tromey <tom@tromey.com>
2870 * buildsym.c (struct buildsym_compunit): Add constructor,
2871 destructor, initializers.
2872 (start_buildsym_compunit): Remove.
2873 (free_buildsym_compunit): Use "delete".
2874 (start_symtab, restart_symtab): Use "new".
2876 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
2878 * symfile.c (set_objfile_default_section_offset): Remove struct
2881 2018-07-14 Stafford Horne <shorne@gmail.com>
2883 * (Responsible Maintainers): Add myself as or1k maintainer.
2885 2018-07-13 Tom Tromey <tom@tromey.com>
2887 * symfile.c (set_objfile_default_section_offset): Use extra braces
2890 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2892 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2895 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2897 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2898 unittests/cli-utils-selftests.c
2899 * unittests/cli-utils-selftests.c: New file.
2901 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2903 * NEWS: Mention new commands. Mention change to 'thread apply'.
2905 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2907 * thread.c (thr_try_catch_cmd): New function.
2908 (thread_apply_all_command): Handle qcs flags.
2909 (thread_apply_command): Handle qcs flags.
2910 (taas_command): New function.
2911 (tfaas_command): New function.
2912 (_initialize_thread): Update to setup the new commands 'taas
2913 and 'tfaas'. Change doc string for 'thread apply'.
2915 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2917 * stack.c: (trailing_outermost_frame): New function, mostly
2918 extracted from backtrace_command_1.
2919 (leading_innermost_frame): New function.
2920 (backtrace_command_1): Update to call trailing_outermost_frame.
2921 (frame_apply_command_count): New function.
2922 (frame_apply_level_command): New function.
2923 (frame_apply_all_command): New function.
2924 (frame_apply_command): New function.
2925 (faas_command): New function.
2926 (frame_cmd_list): New variable.
2927 (_initialize_stack): Update to setup the new commands 'frame apply'
2930 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2932 * cli-utils.c (number_or_range_parser::get_number): Only handle
2933 numbers or convenience var as numbers.
2934 (parse_flags): New function.
2935 (parse_flags_qcs): New function.
2936 (number_or_range_parser::finished): Ensure parsing end is detected
2937 before end of string.
2938 * cli-utils.h (parse_flags): New function.
2939 (parse_flags_qcs): New function.
2940 (number_or_range_parser): Remove m_finished bool.
2941 (number_or_range_parser::skip_range): Set m_in_range to false.
2943 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
2945 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2948 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2949 Jan Kratochvil <jan.kratochvil@redhat.com>
2950 Paul Fertser <fercerpav@gmail.com>
2951 Tsutomu Seki <sekiriki@gmail.com>
2952 Pedro Alves <palves@redhat.com>
2954 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2955 'unittests/parse-connection-spec-selftests.c'.
2956 (COMMON_SFILES): Add 'common/netstuff.c'.
2957 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2958 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2959 * common/netstuff.c: New file.
2960 * common/netstuff.h: New file.
2961 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2962 (wait_for_connect): Update comment. New parameter
2963 'gdb::optional<int> sock' instead of 'struct serial *scb'.
2964 Use 'sock' directly instead of 'scb->fd'.
2965 (try_connect): New function, with code from 'net_open'.
2966 (net_open): Rewrite main loop to deal with multiple
2967 sockets/addresses. Handle IPv6-style hostnames; implement
2968 support for IPv6 connections.
2969 * unittests/parse-connection-spec-selftests.c: New file.
2971 2018-07-11 Pedro Alves <palves@redhat.com>
2974 * remote.c (remote_target::remote_detach_pid): Call
2975 set_current_process.
2977 2018-07-11 Pedro Alves <palves@redhat.com>
2979 * h8300-tdep.c (h8300_gdbarch_init): Remove
2980 set_gdbarch_ecoff_reg_to_regnum calls.
2982 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2985 * c-typeprint.c (c_type_print_base_struct_union): Don't print
2986 offsets/sizes for static members of a class/struct.
2988 2018-07-11 Alan Hayward <alan.hayward@arm.com>
2990 * target-descriptions.c (tdesc_register_bitsize): Rename.
2991 * target-descriptions.h (tdesc_register_bitsize): Likewise.
2992 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2993 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2995 2018-07-10 Tom Tromey <tom@tromey.com>
2997 * breakpoint.c (moribund_locations): Now static and a
2999 (breakpoint_init_inferior, moribund_breakpoint_here_p)
3000 (build_bpstat_chain, update_global_location_list)
3001 (breakpoint_retire_moribund): Update.
3002 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
3005 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
3007 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
3008 (riscv_register_reggroup_p): Use new function, remove unneeded
3010 (riscv_push_dummy_call): Extend assert to compare against xlen or
3011 flen based on register type.
3013 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
3015 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
3017 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
3019 * remote.c (show_hardware_watchpoint_limit): New function.
3020 (show_hardware_watchpoint_length_limit): New function.
3021 (show_hardware_breakpoint_limit): New function.
3022 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
3023 where appropriate, update help text.
3025 2018-07-09 Tom Tromey <tom@tromey.com>
3027 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3028 (CLIBS): Don't mention NAT_CLIBS.
3030 2018-07-09 Tom Tromey <tom@tromey.com>
3032 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3033 (LIBGDB_OBS, clean mostlyclean): Update.
3034 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3036 2018-07-09 Tom Tromey <tom@tromey.com>
3038 * Makefile.in (%.c: %.y): Use ECHO_YACC.
3039 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
3040 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3042 2018-07-09 Tom Tromey <tom@tromey.com>
3044 * Makefile.in (ALLDEPFILES): Remove exec.c.
3045 (COMMON_OBS): Remove exec.o.
3046 (COMMON_SFILES): Add exec.c.
3048 2018-07-09 Tom Tromey <tom@tromey.com>
3050 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3052 2018-07-09 Tom Tromey <tom@tromey.com>
3054 * Makefile.in (clean mostlyclean): Remove stamp-version.
3055 (version.c): Depend on stamp-version.
3056 (stamp-version): New rule, from version.c rule.
3058 2018-07-09 Tom Tromey <tom@tromey.com>
3060 * Makefile.in (init.c): Depend on stamp-init.
3061 (stamp-init): New rule, from init.c rule.
3062 (clean mostlyclean): Remove stamp-init.
3064 2018-07-09 Tom Tromey <tom@tromey.com>
3066 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3067 SUBDIR_GCC_COMPILE_SRCS.
3069 2018-07-09 Tom Tromey <tom@tromey.com>
3071 * Makefile.in (init.c): Remove some unused sed rules.
3073 2018-07-09 Tom Tromey <tom@tromey.com>
3075 * Makefile.in (TSOBS): Remove.
3076 (INIT_FILES): Update.
3077 (LIBGDB_OBS): Update.
3078 (COMMON_SFILES): Add inflow.c.
3079 (SFILES): Remove inflow.c.
3081 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3083 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3085 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
3087 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3088 get_saveloc_name, is_signal_frame_name, step_name,
3089 init_remote_name, create_addr_space_name,
3090 destroy_addr_space_name, search_unwind_table_name,
3091 find_dyn_list_name): Constify.
3093 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
3095 * darwin-nat.c (darwin_pthread_kill): New function.
3096 (darwin_resume_thread): Use darwin_pthread_kill.
3098 2018-07-05 Tom de Vries <tdevries@suse.de>
3100 * macroexp.c (macro_buffer) <operator=>: New member function.
3102 2018-07-04 Tom Tromey <tom@tromey.com>
3104 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3106 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
3108 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3109 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3110 * maint.c: Likewise.
3113 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3115 * NEWS: Create a new section for the next release branch.
3116 Rename the section of the current branch, now that it has
3119 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3121 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3122 * version.in: Bump version to 8.2.50.DATE-git.
3124 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
3125 Pedro Alves <palves@redhat.com>
3127 * linux-nat.c (linux_init_ptrace): Rename to ...
3128 (linux_init_ptrace_procfs): ... this. Call
3129 linux_proc_init_warnings.
3130 (linux_nat_target::post_attach)
3131 (linux_nat_target::post_startup_inferior): Adjust.
3132 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3133 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3135 2018-07-04 Tom de Vries <tdevries@suse.de>
3137 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3139 (read_comp_unit_head): ... here.
3141 2018-07-03 Tom Tromey <tom@tromey.com>
3143 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3144 (stop_tracing, tstatus_command)
3145 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3146 (print_one_static_tracepoint_marker): Update.
3147 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3149 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
3151 (all_tracepoints, static_tracepoints_here): Return std::vector.
3153 2018-07-03 Tom Tromey <tom@tromey.com>
3155 * common/ptid.c (ptid_equal): Remove.
3156 * common/ptid.h (ptid_equal): Don't declare.
3157 * ada-tasks.c: Update.
3158 * breakpoint.c: Update.
3159 * common/agent.c: Update.
3160 * corelow.c: Update.
3161 * darwin-nat-info.c: Update.
3162 * darwin-nat.c: Update.
3164 * dtrace-probe.c: Update.
3165 * dummy-frame.c: Update.
3166 * fbsd-nat.c: Update.
3168 * gdbthread.h: Update.
3169 * gnu-nat.c: Update.
3170 * go32-nat.c: Update.
3171 * inf-loop.c: Update.
3172 * inf-ptrace.c: Update.
3173 * infcall.c: Update.
3177 * linux-fork.c: Update.
3178 * linux-nat.c: Update.
3179 * linux-thread-db.c: Update.
3180 * mi/mi-cmd-var.c: Update.
3181 * mi/mi-interp.c: Update.
3182 * mi/mi-main.c: Update.
3183 * nto-procfs.c: Update.
3184 * ppc-linux-tdep.c: Update.
3186 * python/py-inferior.c: Update.
3187 * python/py-record-btrace.c: Update.
3188 * python/py-record.c: Update.
3189 * ravenscar-thread.c: Update.
3190 * regcache.c: Update.
3191 * remote-sim.c: Update.
3193 * sol-thread.c: Update.
3196 * tui/tui-stack.c: Update.
3198 * windows-nat.c: Update.
3199 * windows-tdep.c: Update.
3201 2018-07-03 Tom Tromey <tom@tromey.com>
3203 * common/ptid.c (ptid_match): Remove.
3204 * common/ptid.h (ptid_match): Don't declare.
3205 * fbsd-nat.c: Update.
3208 * linux-nat.c: Update.
3209 * record-btrace.c: Update.
3210 * regcache.c: Update.
3213 2018-07-03 Tom Tromey <tom@tromey.com>
3215 * common/ptid.c (ptid_tid_p): Remove.
3216 * common/ptid.h (ptid_tid_p): Don't declare.
3217 * sol-thread.c: Update.
3219 2018-07-03 Tom Tromey <tom@tromey.com>
3221 * common/ptid.c (ptid_lwp_p): Remove.
3222 * common/ptid.h (ptid_lwp_p): Don't declare.
3223 * fbsd-nat.c: Update.
3224 * linux-nat.c: Update.
3225 * nat/linux-procfs.c: Update.
3226 * nat/x86-linux-dregs.c: Update.
3227 * sol-thread.c: Update.
3229 2018-07-03 Tom Tromey <tom@tromey.com>
3231 * common/ptid.c (ptid_is_pid): Remove.
3232 * common/ptid.h (ptid_is_pid): Don't declare.
3234 * linux-nat.c: Update.
3235 * mi/mi-interp.c: Update.
3239 2018-07-03 Tom Tromey <tom@tromey.com>
3241 * common/ptid.c (ptid_get_tid): Remove.
3242 * common/ptid.h (ptid_get_tid): Don't declare.
3243 * ada-tasks.c: Update.
3244 * aix-thread.c: Update.
3245 * bsd-uthread.c: Update.
3246 * darwin-nat.c: Update.
3247 * fbsd-nat.c: Update.
3248 * i386-darwin-nat.c: Update.
3250 * linux-tdep.c: Update.
3251 * nto-procfs.c: Update.
3252 * ppc-ravenscar-thread.c: Update.
3253 * python/py-infthread.c: Update.
3254 * ravenscar-thread.c: Update.
3255 * sol-thread.c: Update.
3256 * sparc-ravenscar-thread.c: Update.
3257 * windows-nat.c: Update.
3259 2018-07-03 Tom Tromey <tom@tromey.com>
3261 * common/ptid.c (ptid_get_lwp): Remove.
3262 * common/ptid.h (ptid_get_lwp): Don't declare.
3263 * aarch64-linux-nat.c: Update.
3264 * ada-tasks.c: Update.
3265 * aix-thread.c: Update.
3266 * amd64-linux-nat.c: Update.
3267 * arm-linux-nat.c: Update.
3268 * corelow.c: Update.
3269 * fbsd-nat.c: Update.
3270 * fbsd-tdep.c: Update.
3271 * gnu-nat.c: Update.
3272 * i386-cygwin-tdep.c: Update.
3273 * i386-gnu-nat.c: Update.
3274 * i386-linux-nat.c: Update.
3275 * ia64-linux-nat.c: Update.
3276 * inf-ptrace.c: Update.
3278 * linux-fork.c: Update.
3279 * linux-nat.c: Update.
3280 * linux-tdep.c: Update.
3281 * linux-thread-db.c: Update.
3282 * mips-linux-nat.c: Update.
3283 * nat/aarch64-linux-hw-point.c: Update.
3284 * nat/aarch64-linux.c: Update.
3285 * nat/linux-btrace.c: Update.
3286 * nat/linux-osdata.c: Update.
3287 * nat/linux-procfs.c: Update.
3288 * nat/x86-linux-dregs.c: Update.
3289 * obsd-nat.c: Update.
3290 * ppc-fbsd-nat.c: Update.
3291 * ppc-linux-nat.c: Update.
3293 * python/py-infthread.c: Update.
3294 * ravenscar-thread.c: Update.
3296 * s390-linux-nat.c: Update.
3297 * sol-thread.c: Update.
3298 * sol2-tdep.c: Update.
3299 * spu-linux-nat.c: Update.
3300 * x86-linux-nat.c: Update.
3301 * xtensa-linux-nat.c: Update.
3303 2018-07-03 Tom Tromey <tom@tromey.com>
3305 * common/ptid.c (ptid_get_pid): Remove.
3306 * common/ptid.h (ptid_get_pid): Don't declare.
3307 * aarch64-linux-nat.c: Update.
3308 * ada-lang.c: Update.
3309 * aix-thread.c: Update.
3310 * alpha-bsd-nat.c: Update.
3311 * amd64-fbsd-nat.c: Update.
3312 * amd64-linux-nat.c: Update.
3313 * arm-linux-nat.c: Update.
3314 * arm-nbsd-nat.c: Update.
3316 * break-catch-syscall.c: Update.
3317 * breakpoint.c: Update.
3318 * bsd-uthread.c: Update.
3319 * corelow.c: Update.
3321 * darwin-nat.c: Update.
3322 * fbsd-nat.c: Update.
3323 * fbsd-tdep.c: Update.
3325 * gnu-nat.c: Update.
3326 * hppa-nbsd-nat.c: Update.
3327 * hppa-obsd-nat.c: Update.
3328 * i386-fbsd-nat.c: Update.
3329 * ia64-linux-nat.c: Update.
3330 * inf-ptrace.c: Update.
3332 * inferior.c: Update.
3333 * inferior.h: Update.
3336 * linux-fork.c: Update.
3337 * linux-nat.c: Update.
3338 * linux-tdep.c: Update.
3339 * linux-thread-db.c: Update.
3340 * m68k-bsd-nat.c: Update.
3341 * mi/mi-interp.c: Update.
3342 * mi/mi-main.c: Update.
3343 * mips-linux-nat.c: Update.
3344 * mips-nbsd-nat.c: Update.
3345 * mips64-obsd-nat.c: Update.
3346 * nat/aarch64-linux-hw-point.c: Update.
3347 * nat/aarch64-linux.c: Update.
3348 * nat/linux-btrace.c: Update.
3349 * nat/linux-osdata.c: Update.
3350 * nat/linux-procfs.c: Update.
3351 * nat/x86-linux-dregs.c: Update.
3352 * nto-procfs.c: Update.
3353 * obsd-nat.c: Update.
3354 * ppc-linux-nat.c: Update.
3355 * ppc-nbsd-nat.c: Update.
3356 * ppc-obsd-nat.c: Update.
3357 * proc-service.c: Update.
3359 * python/py-inferior.c: Update.
3360 * python/py-infthread.c: Update.
3361 * ravenscar-thread.c: Update.
3363 * remote-sim.c: Update.
3365 * rs6000-nat.c: Update.
3366 * s390-linux-nat.c: Update.
3367 * sh-nbsd-nat.c: Update.
3368 * sol-thread.c: Update.
3369 * sparc-nat.c: Update.
3370 * sparc64-tdep.c: Update.
3371 * spu-linux-nat.c: Update.
3372 * spu-tdep.c: Update.
3373 * target-debug.h: Update.
3376 * tid-parse.c: Update.
3377 * tracefile-tfile.c: Update.
3378 * vax-bsd-nat.c: Update.
3379 * windows-nat.c: Update.
3380 * x86-linux-nat.c: Update.
3381 * x86-nat.c: Update.
3383 2018-07-03 Tom Tromey <tom@tromey.com>
3385 * common/ptid.c (pid_to_ptid): Remove.
3386 * common/ptid.h (pid_to_ptid): Don't declare.
3387 * aix-thread.c: Update.
3388 * arm-linux-nat.c: Update.
3389 * common/ptid.c: Update.
3390 * common/ptid.h: Update.
3391 * corelow.c: Update.
3393 * darwin-nat.c: Update.
3394 * fbsd-nat.c: Update.
3395 * fork-child.c: Update.
3396 * gnu-nat.c: Update.
3397 * go32-nat.c: Update.
3398 * inf-ptrace.c: Update.
3400 * inferior.c: Update.
3402 * linux-fork.c: Update.
3403 * linux-nat.c: Update.
3404 * nat/aarch64-linux-hw-point.c: Update.
3405 * nat/fork-inferior.c: Update.
3406 * nat/x86-linux-dregs.c: Update.
3407 * nto-procfs.c: Update.
3408 * obsd-nat.c: Update.
3410 * progspace.c: Update.
3412 * rs6000-nat.c: Update.
3413 * s390-linux-nat.c: Update.
3414 * sol-thread.c: Update.
3415 * spu-linux-nat.c: Update.
3418 * tracefile-tfile.c: Update.
3419 * windows-nat.c: Update.
3421 2018-07-03 Tom Tromey <tom@tromey.com>
3423 * common/ptid.h (ptid_build): Don't declare.
3424 * common/ptid.c (ptid_build): Remove.
3425 * aix-thread.c: Update.
3426 * bsd-kvm.c: Update.
3427 * bsd-uthread.c: Update.
3428 * common/agent.c: Update.
3429 * common/ptid.c: Update.
3430 * common/ptid.h: Update.
3431 * corelow.c: Update.
3432 * darwin-nat.c: Update.
3433 * fbsd-nat.c: Update.
3434 * gnu-nat.c: Update.
3435 * linux-fork.c: Update.
3436 * linux-nat.c: Update.
3437 * linux-thread-db.c: Update.
3438 * nat/linux-osdata.c: Update.
3439 * nat/linux-procfs.c: Update.
3440 * nto-procfs.c: Update.
3441 * obsd-nat.c: Update.
3442 * proc-service.c: Update.
3444 * ravenscar-thread.c: Update.
3445 * remote-sim.c: Update.
3447 * sol-thread.c: Update.
3449 * windows-nat.c: Update.
3451 2018-07-03 Tom Tromey <tom@tromey.com>
3453 * infrun.c (follow_exec): Use exit_inferior_silent.
3454 * inferior.c (exit_inferior_num_silent): Remove.
3455 * inferior.h (exit_inferior_num_silent): Don't declare.
3457 2018-07-03 Tom Tromey <tom@tromey.com>
3460 * darwin-nat.c (darwin_attach_pid): Reset inferior and
3461 inferior_ptid on error.
3463 2018-07-02 Maciej W. Rozycki <macro@mips.com>
3464 Simon Marchi <simon.marchi@polymtl.ca>
3467 * disasm.h (gdb_disassembler): Add
3468 `m_disassembler_options_holder'. member
3469 * disasm.c (get_all_disassembler_options): New function.
3470 (gdb_disassembler::gdb_disassembler): Use it.
3471 (gdb_buffered_insn_length_init_dis): Likewise.
3472 (gdb_buffered_insn_length): Adjust accordingly.
3473 (set_disassembler_options): Handle options with arguments.
3474 (show_disassembler_options_sfunc): Likewise. Add a leading new
3475 line if showing options with descriptions.
3476 (disassembler_options_completer): Adapt to using the
3477 `disasm_options_and_args_t' structure.
3478 * mips-tdep.c (mips_disassembler_options): New variable.
3479 (mips_disassembler_options_o32): Likewise.
3480 (mips_disassembler_options_n32): Likewise.
3481 (mips_disassembler_options_n64): Likewise.
3482 (gdb_print_insn_mips): Don't set `disassembler_options'.
3483 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3485 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3486 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
3487 `gdbarch_disassembler_options_implicit' and
3488 `gdbarch_valid_disassembler_options'.
3489 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3490 `disasm_options_and_args_t' structure.
3491 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3493 (valid_disassembler_options): Switch from `disasm_options_t' to
3494 the `disasm_options_and_args_t' structure.
3495 * NEWS: Document `set disassembler-options' support for the MIPS
3497 * gdbarch.h: Regenerate.
3498 * gdbarch.c: Regenerate.
3500 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
3502 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3504 2018-06-29 Joel Brobecker <brobecker@adacore.com>
3506 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3507 parameter in call to amd64_target_description.
3508 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3509 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3510 (amd64fbsd_init_abi): Likewise.
3511 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3512 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3513 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3514 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3516 2018-06-29 Pedro Alves <palves@redhat.com>
3518 * gdb/amd64-tdep.h (amd64_create_target_description): Add
3519 "segments" parameter.
3520 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3521 (_initialize_amd64_tdep): Update call to
3522 amd64_create_target_description.
3523 (amd64_target_description): Add "segments" parameter. Adjust
3524 the implementation to use it.
3525 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3526 call to amd64_create_target_description.
3527 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3528 * gdb/arch/amd64.h (amd64_create_target_description): Add
3529 "segments" register.
3530 * gdb/arch/amd64.c (amd64_create_target_description): Add
3531 "segments" parameter. Call create_feature_i386_64bit_segments
3532 only if SEGMENTS is true.
3533 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3534 call to amd64_create_target_description.
3536 2018-06-29 Pedro Alves <palves@redhat.com>
3538 * thread.c (thread_target_id_str): New, factored out from ...
3539 (print_thread_info_1): ... here. Use it to compute the max
3540 "Target Id" column width.
3542 2018-06-29 Pedro Alves <palves@redhat.com>
3544 * remote.c (remote_target::extra_thread_info): Delete
3545 'display_buf' and 'n' locals. from the cache, regardless of
3546 packet mechanims is in use. Use cache for qThreadExtra and qP
3549 2018-06-29 Pedro Alves <palves@redhat.com>
3551 * blockframe.c (find_pc_sect_containing_function): New function.
3552 * breakpoint.c (print_breakpoint_location): Don't call
3553 find_pc_sect_function.
3554 * linespec.c (create_sals_line_offset): Record the location's
3556 * linespec.c (convert_address_location_to_sals): Fill in sal's
3557 symbol with find_pc_sect_containing_function.
3558 * symtab.c (find_function_start_sal): Rename to ...
3559 (find_function_start_sal_1): ... this.
3560 (find_function_start_sal): Reimplement as wrapper around
3561 find_function_start_sal_1, and use
3562 find_pc_sect_containing_function to fill in the sal's symbol.
3563 (find_function_start_sal(symbol*, bool)): Adjust.
3564 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3566 (find_pc_sect_containing_function): Declare.
3568 2018-06-29 Pedro Alves <palves@redhat.com>
3570 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3571 true if the the location has no symbol.
3573 2018-06-28 Tom Tromey <tom@tromey.com>
3575 * NEWS: Mention --enable-codesign.
3576 * silent-rules.mk (ECHO_SIGN): New variable.
3577 * configure.ac: Add --enable-codesign.
3578 * configure: Rebuild.
3579 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3580 (gdb$(EXEEXT)): Optionally invoke codesign.
3582 2018-06-28 Pedro Alves <palves@redhat.com>
3584 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3586 (switch_to_thread_no_regs): Adjust comment.
3587 * infcmd.c (stop_pc): Delete.
3588 (post_create_inferior, info_program_command): Replace references
3589 to stop_pc with references to thread_info->suspend.stop_pc.
3590 * inferior.h (stop_pc): Delete declaration.
3591 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3592 (handle_inferior_event_1, handle_signal_stop)
3593 (process_event_stop_test, keep_going_stepped_thread)
3594 (handle_step_into_function, handle_step_into_function_backward)
3595 (print_stop_location): Replace references to stop_pc with
3596 references to thread_info->suspend.stop_pc.
3597 (struct infcall_suspend_state) <stop_pc>: Delete field.
3598 (save_infcall_suspend_state, restore_infcall_suspend_state):
3599 Remove references to inf_stat->stop_pc.
3600 * linux-fork.c (fork_load_infrun_state): Likewise.
3601 * record-btrace.c (record_btrace_set_replay): Likewise.
3602 * record-full.c (record_full_goto_entry): Likewise.
3603 * remote.c (print_one_stopped_thread): Likewise.
3604 * target.c (target_resume): Extend comment.
3605 * thread.c (set_executing_thread): New.
3606 (set_executing): Use it.
3607 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3608 Remove references to stop_pc.
3610 2018-06-28 Pedro Alves <palves@redhat.com>
3612 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3613 Moving fetching stop_pc until after ecs->event_thread is refreshed.
3615 2018-06-28 Tom Tromey <tom@tromey.com>
3617 * coffread.c (coff_symfile_finish): Update.
3618 * xcoffread.c (xcoff_symfile_finish): Update.
3619 * elfread.c (elf_symfile_finish): Update.
3620 * symfile.h (dwarf2_free_objfile): Don't declare.
3621 * dwarf2read.c (_initialize_dwarf2_read): Use
3622 register_objfile_data_with_cleanup.
3623 (dwarf2_free_objfile): Now static. Change signature.
3625 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3627 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3628 option "-o" to add-symbol-file-load to add an offset to each
3629 section's load address.
3630 * symfile.c (set_objfile_default_section_offset): New function.
3632 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3634 * symfile.c (add_symbol_file_command): Make sure that sections
3635 with the same name are sorted in the same order.
3637 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3639 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3640 require the second argument. If omitted, load sections at the
3641 addresses specified in the file.
3643 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3645 * symfile.c (symbol_file_command, symbol_file_add_main_1)
3646 (_initialize_symfile): Add option "-o" to symbol-file to add an
3647 offset to each section of the symbol file.
3649 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3651 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3653 2018-06-27 Tom Tromey <tom@tromey.com>
3655 * stack.c (_initialize_stack): Update "func" help text.
3657 2018-06-27 Tom Tromey <tom@tromey.com>
3659 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3661 (unwind_infopy_str, pyuw_create_unwind_info)
3662 (unwind_infopy_add_saved_register, pyuw_sniffer)
3663 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3665 (struct saved_reg): Add constructor.
3666 <value>: Now a gdbpy_ref<>.
3668 2018-06-27 Tom Tromey <tom@tromey.com>
3670 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3672 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3674 * gdb-gdb.py.in: Format using autopep8.
3676 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3678 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3679 (type_lookup_function): Recognize CORE_ADDR values.
3681 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3683 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3686 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3688 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3691 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3693 * gdb-gdb.py: Move to...
3694 * gdb-gdb.py.in: ... here.
3695 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3696 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3698 (distclean): Remove gdb-gdb.py when cleaning.
3699 (gdb-gdb.py, gdb-gdb.gdb): New rules.
3700 * configure: Re-generate.
3702 2018-06-27 Pedro Alves <palves@redhat.com>
3704 * proc-service.c (get_ps_regcache): New.
3705 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3706 (ps_lsetfpregs): Use it.
3708 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
3711 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3712 (dwarf_decode_lines_1): Adjust.
3714 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3716 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3718 <info_proc>: Likewise.
3720 2018-06-26 Joel Brobecker <brobecker@adacore.com>
3722 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3723 to windows_fetch_one_register, and only handle the case of
3724 fetching one register. Move the code that reloads the context
3725 and iterates over all registers if R is negative to...
3726 (windows_nat_target::fetch_registers): ... here.
3727 (do_windows_store_inferior_registers): Rename to
3728 windows_store_one_register, and only handle the case of storing
3729 one register. Move the code that handles the case where r is
3731 (windows_nat_target::store_registers) ... here.
3733 2018-06-26 Tom Tromey <tom@tromey.com>
3736 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3737 * rust-lang.c (rust_print_struct_def): Add podata parameter.
3739 (rust_internal_print_type): Add podata parameter.
3740 (rust_print_type): Update.
3742 2018-06-26 Tom Tromey <tom@tromey.com>
3744 * typeprint.h (struct print_offset_data) <update, finish,
3745 maybe_print_hole>: New methods.
3746 <indentation>: New constant.
3747 * typeprint.c (print_offset_data::indentation): Define.
3748 (print_offset_data::maybe_print_hole, print_offset_data::update)
3749 (print_offset_data::finish): Move from c-typeprint.c and rename.
3750 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3751 (print_spaces_filtered_with_print_options): Update.
3752 (c_print_type_union_field_offset, maybe_print_hole)
3753 (c_print_type_struct_field_offset): Move to typeprint.c and
3755 (c_type_print_base_struct_union): Update.
3757 2018-06-25 Pedro Alves <palves@redhat.com>
3759 * gdbthread.h (thread_info_ref, delete_thread)
3760 (delete_thread_silent, first_thread_of_inferior)
3761 (any_thread_of_inferior, switch_to_thread)
3762 (enable_thread_stack_temporaries)
3763 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3764 (get_last_thread_stack_temporary)
3765 (value_in_thread_stack_temporaries, can_access_registers_thread):
3766 Spell out "struct thread_info" instead of just "thread_info".
3767 * inferior.h (notice_new_inferior): Likewise.
3769 2018-06-25 Pedro Alves <palves@redhat.com>
3771 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3772 pass thread_info pointer to delete_thread.
3773 (windows_nat_target::detach): Pass inferior pointer to
3775 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3777 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3778 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3779 and pass a thread_info pointer to delete_thread.
3780 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3781 pass thread_info pointer to delete_thread.
3782 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3783 delete_thread_silent call.
3784 * procfs.c (procfs_target::detach): Pass inferior pointer to
3786 (procfs_target::wait): Pass thread_info pointer to delete_thread.
3787 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3788 delete_thread_silent call.
3789 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3790 pass thread_info pointer to delete_thread.
3791 (windows_nat_target::detach): Pass inferior pointer to
3794 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3796 * regcache.c (readable_regcache::read_part): Fix asserts.
3797 (reg_buffer::raw_collect_part): New function.
3798 (regcache::write_part): Fix asserts.
3799 (reg_buffer::raw_supply_part): New function.
3800 (regcache::transfer_regset_register): New helper function.
3801 (regcache::transfer_regset): Call new functions.
3802 (regcache_supply_regset): Use gdb_byte*.
3803 (regcache::supply_regset): Likewise.
3804 (regcache_collect_regset): Likewise.
3805 (regcache::collect_regset): Likewise.
3806 * regcache.h (reg_buffer::raw_collect_part): New declaration.
3807 (reg_buffer::raw_supply_part): Likewise.
3808 (regcache::transfer_regset_register): Likewise.
3809 (regcache::transfer_regset): Use gdb_byte*.
3811 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3813 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3815 2018-06-21 Pedro Alves <palves@redhat.com>
3817 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3818 instead of a ptid_t. All callers adjusted.
3819 * ada-tasks.c (ada_get_task_number): Likewise. All callers
3821 (print_ada_task_info, display_current_task_id, task_command_1):
3823 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3825 (breakpoint_kind): Adjust.
3826 (remove_breakpoints_pid): Rename to ...
3827 (remove_breakpoints_inf): ... this. Adjust to take an inferior
3828 pointer. All callers adjusted.
3829 (bpstat_clear_actions): Use inferior_thread.
3830 (get_bpstat_thread): New.
3831 (bpstat_do_actions): Use it.
3832 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3833 to take a thread_info pointer. All callers adjusted.
3834 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3835 (breakpoint_re_set_thread): Use inferior_thread.
3836 * breakpoint.h (struct inferior): Forward declare.
3837 (bpstat_stop_status): Update.
3838 (remove_breakpoints_pid): Delete.
3839 (remove_breakpoints_inf): New.
3840 * bsd-uthread.c (bsd_uthread_target::wait)
3841 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3842 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3843 (maint_btrace_packet_history_cmd)
3844 (maint_btrace_clear_packet_history_cmd): Adjust.
3845 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3847 * cli/cli-interp.c: Include "inferior.h".
3848 * common/refcounted-object.h (struct
3849 refcounted_object_ref_policy): New.
3850 * compile/compile-object-load.c: Include gdbthread.h.
3851 (store_regs): Use inferior_thread.
3852 * corelow.c (core_target::close): Use current_inferior.
3853 (core_target_open): Adjust to use first_thread_of_inferior and use
3854 the current inferior.
3855 * ctf.c (ctf_target::close): Adjust to use current_inferior.
3856 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3857 <thread>: ... this new field. All references adjusted.
3858 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3859 Take a thread_info pointer instead of a ptid_t.
3860 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3861 (dummy_frame_discard, register_dummy_frame_dtor): Take a
3862 thread_info pointer instead of a ptid_t.
3863 * elfread.c: Include "inferior.h".
3864 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3865 Use inferior_thread.
3866 * eval.c (evaluate_subexp): Likewise.
3867 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3869 * gdb_proc_service.h (struct thread_info): Forward declare.
3870 (struct ps_prochandle) <ptid>: Delete, replaced by ...
3871 <thread>: ... this new field. All references adjusted.
3872 * gdbarch.h, gdbarch.c: Regenerate.
3873 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3874 'thread' parameter. All implementations and callers adjusted.
3875 * gdbthread.h (thread_info) <set_running>: New method.
3876 (delete_thread, delete_thread_silent): Take a thread_info pointer
3878 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3879 (first_thread_of_process): Delete, replaced by ...
3880 (first_thread_of_inferior): ... this new function. All callers
3882 (any_live_thread_of_process): Delete, replaced by ...
3883 (any_live_thread_of_inferior): ... this new function. All callers
3885 (switch_to_thread, switch_to_no_thread): Declare.
3886 (is_executing): Delete.
3887 (enable_thread_stack_temporaries): Update comment.
3888 <enable_thread_stack_temporaries>: Take a thread_info pointer
3889 instead of a ptid_t. Incref the thread.
3890 <~enable_thread_stack_temporaries>: Decref the thread.
3893 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3894 (get_last_thread_stack_temporary)
3895 (value_in_thread_stack_temporaries, can_access_registers_thread):
3896 Take a thread_info pointer instead of a ptid_t. All callers
3898 * infcall.c (get_call_return_value): Use inferior_thread.
3899 (run_inferior_call): Work with thread pointers instead of ptid_t.
3900 (call_function_by_hand_dummy): Work with thread pointers instead
3901 of ptid_t. Use thread_info_ref.
3902 * infcmd.c (proceed_thread_callback): Access thread's state
3904 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3905 access thread's state directly.
3906 (continue_command): Use inferior_thread.
3907 (info_program_command): Use find_thread_ptid and access thread
3909 (proceed_after_attach_callback): Use thread state directly.
3910 (notice_new_inferior): Take a thread_info pointer instead of a
3911 ptid_t. All callers adjusted.
3912 (exit_inferior): Take an inferior pointer instead of a pid. All
3914 (exit_inferior_silent): New.
3915 (detach_inferior): Delete.
3916 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3917 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3918 (detach_inferior_command, kill_inferior_command): Use
3919 find_inferior_id instead of valid_gdb_inferior_id and
3920 gdb_inferior_id_to_pid.
3921 (inferior_command): Use inferior and thread pointers.
3922 * inferior.h (struct thread_info): Forward declare.
3923 (notice_new_inferior): Take a thread_info pointer instead of a
3924 ptid_t. All callers adjusted.
3925 (detach_inferior): Delete declaration.
3926 (exit_inferior, exit_inferior_silent): Take an inferior pointer
3927 instead of a pid. All callers adjusted.
3928 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3929 (valid_gdb_inferior_id): Delete.
3930 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3931 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3932 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3934 <inf>: ... this new field.
3935 <step_ptid>: Delete, replaced by ...
3936 <step_thread>: ... this new field.
3937 (get_displaced_stepping_state): Take an inferior pointer instead
3938 of a pid. All callers adjusted.
3939 (displaced_step_in_progress_any_inferior): Adjust.
3940 (displaced_step_in_progress_thread): Take a thread pointer instead
3941 of a ptid_t. All callers adjusted.
3942 (displaced_step_in_progress, add_displaced_stepping_state): Take
3943 an inferior pointer instead of a pid. All callers adjusted.
3944 (get_displaced_step_closure_by_addr): Adjust.
3945 (remove_displaced_stepping_state): Take an inferior pointer
3946 instead of a pid. All callers adjusted.
3947 (displaced_step_prepare_throw, displaced_step_prepare)
3948 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3949 All callers adjusted.
3950 (start_step_over): Adjust.
3951 (infrun_thread_ptid_changed): Remove bit updating ptids in the
3952 displaced step queue.
3953 (do_target_resume): Adjust.
3954 (fetch_inferior_event): Use inferior_thread.
3955 (context_switch, get_inferior_stop_soon): Take an
3956 execution_control_state pointer instead of a ptid_t. All callers
3958 (switch_to_thread_cleanup): Delete.
3959 (stop_all_threads): Use scoped_restore_current_thread.
3960 * inline-frame.c: Include "gdbthread.h".
3961 (inline_state) <inline_state>: Take a thread pointer instead of a
3962 ptid_t. All callers adjusted.
3963 <ptid>: Delete, replaced by ...
3964 <thread>: ... this new field.
3965 (find_inline_frame_state): Take a thread pointer instead of a
3966 ptid_t. All callers adjusted.
3967 (skip_inline_frames, step_into_inline_frame)
3968 (inline_skipped_frames, inline_skipped_symbol): Take a thread
3969 pointer instead of a ptid_t. All callers adjusted.
3970 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3971 (inline_skipped_frames, inline_skipped_symbol): Likewise.
3972 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3974 * linux-nat.c (get_detach_signal): Likewise.
3975 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3976 (thread_db_notice_clone): Adjust.
3977 (thread_db_find_new_threads_silently)
3978 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3979 a thread pointer instead of a ptid_t. All callers adjusted.
3980 * mi/mi-cmd-var.c: Include "inferior.h".
3981 (mi_cmd_var_update_iter): Update to use thread pointers.
3982 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3984 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3986 (mi_output_running): ... this new function.
3987 (mi_on_resume_1): Adjust to use it.
3988 (mi_user_selected_context_changed): Adjust to use inferior_thread.
3989 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3991 (interrupt_thread_callback): : Adjust to use thread and inferior
3993 * proc-service.c: Include "gdbthread.h".
3994 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3995 * progspace-and-thread.c: Include "inferior.h".
3996 * progspace.c: Include "inferior.h".
3997 * python/py-exitedevent.c (create_exited_event_object): Adjust to
3998 hold a reference to an inferior_object.
3999 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
4001 * python/py-inferior.c (struct inferior_object): Give the type a
4002 tag name instead of a typedef.
4003 (python_on_normal_stop): No need to check if the current thread is
4005 (inferior_to_inferior_object): Change return type to
4006 inferior_object. All callers adjusted.
4007 (find_thread_object): Delete, bits factored out to ...
4008 (thread_to_thread_object): ... this new function.
4009 * python/py-infthread.c (create_thread_object): Use
4010 inferior_to_inferior_object.
4011 (thpy_is_stopped): Use thread pointer directly.
4012 (gdbpy_selected_thread): Use inferior_thread.
4013 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
4014 field, replaced with ...
4015 <thread>: ... this new field. All users adjusted.
4016 (btpy_insn_or_gap_new): Drop const.
4017 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
4019 * python/py-record.c: Include "gdbthread.h".
4020 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4021 a ptid_t. All callers adjusted.
4022 (gdbpy_current_recording): Use inferior_thread.
4023 * python/py-record.h (recpy_record_object) <ptid>: Delete
4024 field, replaced with ...
4025 <thread>: ... this new field. All users adjusted.
4026 (recpy_element_object) <ptid>: Delete
4027 field, replaced with ...
4028 <thread>: ... this new field. All users adjusted.
4029 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4030 a ptid_t. All callers adjusted.
4031 * python/py-threadevent.c: Include "gdbthread.h".
4032 (get_event_thread): Use thread_to_thread_object.
4033 * python/python-internal.h (struct inferior_object): Forward
4035 (find_thread_object, find_inferior_object): Delete declarations.
4036 (thread_to_thread_object, inferior_to_inferior_object): New
4038 * record-btrace.c: Include "inferior.h".
4039 (require_btrace_thread): Use inferior_thread.
4040 (record_btrace_frame_sniffer)
4041 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4042 (get_thread_current_frame): Use scoped_restore_current_thread and
4044 (get_thread_current_frame): Use thread pointer directly.
4045 (record_btrace_replay_at_breakpoint): Use thread's inferior
4047 * record-full.c: Include "inferior.h".
4048 * regcache.c: Include "gdbthread.h".
4049 (get_thread_arch_regcache): Use the inferior's address space
4051 (get_thread_regcache, registers_changed_thread): New.
4052 * regcache.h (get_thread_regcache(thread_info *thread)): New
4054 (registers_changed_thread): New.
4055 (remote_target) <remote_detach_1>: Swap order of parameters.
4056 (remote_add_thread): <remote_add_thread>: Return the new thread.
4057 (get_remote_thread_info(ptid_t)): New overload.
4058 (remote_target::remote_notice_new_inferior): Use thread pointers
4060 (remote_target::process_initial_stop_replies): Use
4061 thread_info::set_running.
4062 (remote_target::remote_detach_1, remote_target::detach)
4063 (extended_remote_target::detach): Adjust.
4064 * stack.c (frame_show_address): Use inferior_thread.
4065 * target-debug.h (target_debug_print_thread_info_pp): New.
4066 * target-delegates.c: Regenerate.
4067 * target.c (default_thread_address_space): Delete.
4068 (memory_xfer_partial_1): Use current_inferior.
4069 (target_detach): Use current_inferior.
4070 (target_thread_address_space): Delete.
4071 (generic_mourn_inferior): Use current_inferior.
4072 * target.h (struct target_ops) <thread_address_space>: Delete.
4073 (target_thread_address_space): Delete.
4074 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
4076 (delete_thread_1, delete_thread, delete_thread_silent): Take a
4077 thread pointer instead of a ptid_t. Adjust all callers.
4078 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4079 (first_thread_of_process): Delete, replaced by ...
4080 (first_thread_of_inferior): ... this new function. All callers
4082 (any_thread_of_process): Rename to ...
4083 (any_thread_of_inferior): ... this, and take an inferior pointer.
4084 (any_live_thread_of_process): Rename to ...
4085 (any_live_thread_of_inferior): ... this, and take an inferior
4087 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4088 (value_in_thread_stack_temporaries)
4089 (get_last_thread_stack_temporary): Take a thread pointer instead
4090 of a ptid_t. Adjust all callers.
4091 (thread_info::set_running): New.
4092 (validate_registers_access): Use inferior_thread.
4093 (can_access_registers_ptid): Rename to ...
4094 (can_access_registers_thread): ... this, and take a thread
4096 (print_thread_info_1): Adjust to compare thread pointers instead
4098 (switch_to_no_thread, switch_to_thread): Make extern.
4099 (scoped_restore_current_thread::~scoped_restore_current_thread):
4100 Use m_thread pointer directly.
4101 (scoped_restore_current_thread::scoped_restore_current_thread):
4102 Use inferior_thread.
4103 (thread_command): Use thread pointer directly.
4104 (thread_num_make_value_helper): Use inferior_thread.
4105 * top.c (execute_command): Use inferior_thread.
4106 * tui/tui-interp.c: Include "inferior.h".
4107 * varobj.c (varobj_create): Use inferior_thread.
4108 (value_of_root_1): Use find_thread_global_id instead of
4109 global_thread_id_to_ptid.
4111 2018-06-21 Alan Hayward <alan.hayward@arm.com>
4113 * regcache.c (readable_regcache::read_part): Avoid memcpy when
4115 (regcache::write_part): Likewise.
4116 (readable_regcache::cooked_read_part): Update comment.
4117 (readable_regcache::cooked_write_part): Likewise.
4118 * regcache.h: (readable_regcache::read_part): Likewise.
4119 (regcache::write_part): Likewise.
4121 2018-06-21 Richard Bunt <richard.bunt@arm.com>
4122 Dirk Schubert <dirk.schubert@arm.com>
4124 * aarch64-linux-nat.c (post_attach): New.
4125 (aarch64_linux_nat_target::post_attach): Override post_attach to
4126 record the number of hardware debug registers.
4128 2018-06-20 Tom Tromey <tom@tromey.com>
4130 * python/py-param.c (add_setshow_generic): Make parameters const.
4131 (parmpy_init): Update.
4133 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4135 * regcache.h (regcache_cooked_read_ftype): Rename to...
4136 (register_read_ftype): ...this, change type to function_view.
4137 (class reg_buffer) <save>: Remove src parameter.
4138 (readonly_detached_regcache) <readonly_detached_regcache>: Make
4139 parameter non-const in first overload. Remove src parameter in
4141 * regcache.c (do_cooked_read): Remove.
4142 (readonly_detached_regcache::readonly_detached_regcache): Make
4143 parameter non-const, adjust call to other constructor.
4144 (reg_buffer::save): Remove src parameter.
4145 * frame.c (do_frame_register_read): Remove.
4146 (frame_save_as_regcache): Use lambda function.
4147 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4148 parameter to ppu2spu_data *.
4149 (ppu2spu_sniffer): Use lambda function.
4151 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4153 * record-full.c (record_full_target::insert_breakpoint): Remove
4154 "struct" keyword, add const.
4156 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
4158 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4159 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4160 * configure.ac: Remove AC_PREREQ, add missing quoting.
4161 * gnulib/configure.ac: Modernize usage of
4162 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
4163 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4164 (AUTOMAKE_VERSION): Bump to 1.15.1.
4165 * configure: Re-generate.
4166 * config.in: Re-generate.
4167 * aclocal.m4: Re-generate.
4168 * gnulib/aclocal.m4: Re-generate.
4169 * gnulib/config.in: Re-generate.
4170 * gnulib/configure: Re-generate.
4171 * gnulib/import/Makefile.in: Re-generate.
4173 2018-06-19 Pedro Alves <palves@redhat.com>
4175 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4176 (lookup_minimal_symbol_by_pc_section): ... here with
4177 gdb_assert_not_reached added.
4179 2018-06-19 Pedro Alves <palves@redhat.com>
4181 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4182 parameter with a block parameter. Compare location's block symbol
4183 with the frame's block instead of addresses.
4184 (skip_inline_frames): Pass the current block instead of the
4185 frame's address. Break out as soon as we determine the frame
4186 should not be skipped.
4188 2018-06-18 Tom Tromey <tom@tromey.com>
4190 * solib-aix.c (solib_aix_get_section_offsets): Return
4192 (solib_aix_solib_create_inferior_hook): Update.
4194 2018-06-18 Tom Tromey <tom@tromey.com>
4196 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4198 2018-06-18 Tom Tromey <tom@tromey.com>
4200 * solib-frv.c (frv_relocate_main_executable): Use
4202 * solib-dsbt.c (dsbt_relocate_main_executable): Use
4205 2018-06-18 Tom Tromey <tom@tromey.com>
4207 * objfiles.h (inhibit_section_map_updates): Update.
4208 (resume_section_map_updates, resume_section_map_updates_cleanup):
4210 * solib-svr4.c (svr4_handle_solib_event): Update.
4211 * objfiles.c (inhibit_section_map_updates): Return
4212 scoped_restore_tmpl<int>.
4213 (resume_section_map_updates, resume_section_map_updates_cleanup):
4216 2018-06-18 Tom Tromey <tom@tromey.com>
4218 * valprint.h (read_string): Update.
4219 * valprint.c (read_string): Change type of "buffer".
4220 (val_print_string): Update.
4221 * python/py-value.c (valpy_string): Update.
4222 * language.h (struct language_defn) <la_get_string>: Change
4224 (default_get_string, c_get_string): Update.
4225 * language.c (default_get_string): Change type of "buffer".
4226 * guile/scm-value.c (gdbscm_value_to_string): Update.
4227 * c-lang.c (c_get_string): Change type of "buffer".
4229 2018-06-18 Tom Tromey <tom@tromey.com>
4231 * ser-mingw.c (struct pipe_state_destroyer): New.
4232 (pipe_state_up): New typedef.
4233 (cleanup_pipe_state): Remove.
4234 (pipe_windows_open): Use pipe_state_up. Don't release argv.
4236 2018-06-18 Tom Tromey <tom@tromey.com>
4238 * rust-lang.h (rust_yyerror): Don't declare.
4239 * rust-lang.c (rust_language_defn): Update.
4240 * rust-exp.y (yyerror): Now static.
4241 * parse.c (parse_exp_in_context_1): Update.
4242 * p-lang.h (p_yyerror): Don't declare.
4243 * p-lang.c (p_language_defn): Update.
4244 * p-exp.y (yyerror): Now static.
4245 * opencl-lang.c (opencl_language_defn): Update.
4246 * objc-lang.c (objc_language_defn): Update.
4247 * m2-lang.h (m2_yyerror): Don't declare.
4248 * m2-lang.c (m2_language_defn): Update.
4249 * m2-exp.y (yyerror): Now static.
4250 * language.h (struct language_defn) <la_error>: Remove.
4251 * language.c (unk_lang_error): Remove.
4252 (unknown_language_defn, auto_language_defn): Remove.
4253 * go-lang.h (go_yyerror): Don't declare.
4254 * go-lang.c (go_language_defn): Update.
4255 * go-exp.y (yyerror): Now static.
4256 * f-lang.h (f_yyerror): Don't declare.
4257 * f-lang.c (f_language_defn): Update.
4258 * f-exp.y (yyerror): Now static.
4259 * d-lang.h (d_yyerror): Don't declare.
4260 * d-lang.c (d_language_defn): Update.
4261 * d-exp.y (yyerror): Now static.
4262 * c-lang.h (c_yyerror): Don't declare.
4263 * c-lang.c (c_language_defn, cplus_language_defn)
4264 (asm_language_defn, minimal_language_defn): Update.
4265 * c-exp.y (yyerror): Now static.
4266 * ada-lang.h (ada_yyerror): Don't declare.
4267 * ada-lang.c (ada_language_defn): Update.
4268 * ada-exp.y (yyerror): Now static.
4270 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4272 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4273 (store_sveregs_to_thread): Likewise.
4274 (aarch64_linux_fetch_inferior_registers): Check for SVE.
4275 (aarch64_linux_store_inferior_registers): Likewise.
4276 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4278 (aarch64_sve_regs_copy_to_regcache): Likewise.
4279 (aarch64_sve_regs_copy_from_regcache): Likewise.
4280 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4282 (aarch64_sve_regs_copy_to_regcache): Likewise.
4283 (aarch64_sve_regs_copy_from_regcache): Likewise.
4284 (sve_context): Structure from Linux headers.
4285 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4286 (SVE_SIG_ZREG_SIZE): Likewise.
4287 (SVE_SIG_PREG_SIZE): Likewise.
4288 (SVE_SIG_FFR_SIZE): Likewise.
4289 (SVE_SIG_REGS_OFFSET): Likewise.
4290 (SVE_SIG_ZREGS_OFFSET): Likewise.
4291 (SVE_SIG_ZREG_OFFSET): Likewise.
4292 (SVE_SIG_ZREGS_SIZE): Likewise.
4293 (SVE_SIG_PREGS_OFFSET): Likewise.
4294 (SVE_SIG_PREG_OFFSET): Likewise.
4295 (SVE_SIG_PREGS_SIZE): Likewise.
4296 (SVE_SIG_FFR_OFFSET): Likewise.
4297 (SVE_SIG_REGS_SIZE): Likewise.
4298 (SVE_SIG_CONTEXT_SIZE): Likewise.
4299 (SVE_PT_REGS_MASK): Likewise.
4300 (SVE_PT_REGS_FPSIMD): Likewise.
4301 (SVE_PT_REGS_SVE): Likewise.
4302 (SVE_PT_VL_INHERIT): Likewise.
4303 (SVE_PT_VL_ONEXEC): Likewise.
4304 (SVE_PT_REGS_OFFSET): Likewise.
4305 (SVE_PT_FPSIMD_OFFSET): Likewise.
4306 (SVE_PT_FPSIMD_SIZE): Likewise.
4307 (SVE_PT_SVE_ZREG_SIZE): Likewise.
4308 (SVE_PT_SVE_PREG_SIZE): Likewise.
4309 (SVE_PT_SVE_FFR_SIZE): Likewise.
4310 (SVE_PT_SVE_FPSR_SIZE): Likewise.
4311 (SVE_PT_SVE_FPCR_SIZE): Likewise.
4312 (__SVE_SIG_TO_PT): Likewise.
4313 (SVE_PT_SVE_OFFSET): Likewise.
4314 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4315 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4316 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4317 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4318 (SVE_PT_SVE_PREG_OFFSET): Likewise.
4319 (SVE_PT_SVE_PREGS_SIZE): Likewise.
4320 (SVE_PT_SVE_FFR_OFFSET): Likewise.
4321 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4322 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4323 (SVE_PT_SVE_SIZE): Likewise.
4324 (SVE_PT_SIZE): Likewise.
4325 (HAS_SVE_STATE): New define.
4327 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4329 * nat/aarch64-sve-linux-sigcontext.h: New file.
4330 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4332 (SVE_VQ_MIN): Likewise.
4333 (SVE_VQ_MAX): Likewise.
4334 (SVE_VL_MIN): Likewise.
4335 (SVE_VL_MAX): Likewise.
4336 (SVE_NUM_ZREGS): Likewise.
4337 (SVE_NUM_PREGS): Likewise.
4338 (sve_vl_valid): Likewise.
4339 (struct user_sve_header): Likewise.
4341 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
4342 Richard Bunt <Richard.Bunt@arm.com>
4344 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4345 was requested by GDB.
4347 2018-06-15 Tom de Vries <tdevries@suse.de>
4349 * MAINTAINERS (Write After Approval): Add Tom de Vries.
4351 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
4353 * gnulib/update-gnulib.sh: Print expected versions of
4356 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
4358 * arch-utils.c (default_type_align): Use type_length_units.
4359 * gdbtypes.c (type_align): Use type_length_units.
4361 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4363 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4364 of 'define' command.
4366 2018-06-14 Tom de Vries <tdevries@suse.de>
4369 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4370 get_no_prettyformat_print_options.
4372 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
4374 * sparc-nat.h: Include target.h.
4375 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4376 <fetch_registers>: Remove this argument in function call.
4377 <store_registers>: Remove this argument in function call, remove
4379 <low_forget_process>: Call sparc64_forget_process instead of
4380 sparc_forget_process.
4382 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4384 * procfs.c (_initialize_procfs): Use add_inf_child_target.
4385 (procfs_target::make_corefile_notes): Adjust to new
4386 target_read_alloc return type.
4388 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4389 Stephen Roberts <stephen.roberts@arm.com>
4392 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4393 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4394 Move should_notify_stop local into more inner scope.
4396 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4397 Stephen Roberts <stephen.roberts@arm.com>
4400 * infrun.c (resume_1): Add call to mark_async_event_handler.
4402 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4404 * infrun.c (do_target_wait): Change old version of $pc printed.
4406 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
4408 * dwarf2read.c (read_index_from_section): Rename to...
4409 (read_gdb_index_from_section): ... this, update all callers.
4410 (dwarf2_read_index): Rename to...
4411 (dwarf2_read_gdb_index): ... this, update all callers.
4413 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
4415 * gdb/hppa-linux-nat.c
4416 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4417 hppa_linux_nat_target::fetch_registers.
4419 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4421 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4422 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4423 (AARCH64_DWARF_SVE_FFR): Likewise.
4424 (AARCH64_DWARF_SVE_P0): Likewise.
4425 (AARCH64_DWARF_SVE_Z0): Likewise.
4427 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4429 * common/common-regcache.h (raw_compare): New function.
4430 * regcache.c (regcache::raw_compare): Likewise.
4431 * regcache.h (regcache::raw_compare): New declaration.
4433 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4435 * common/common-regcache.h (reg_buffer_common): New structure.
4436 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4437 (reg_buffer::raw_supply): Likewise.
4438 (reg_buffer::raw_supply_integer): Likewise.
4439 (reg_buffer::raw_supply_zeroed): Likewise.
4440 (reg_buffer::raw_collect): Likewise.
4441 (reg_buffer::raw_collect_integer): Likewise.
4442 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4443 (reg_buffer::raw_supply): Likewise.
4444 (reg_buffer::raw_supply_integer): Likewise.
4445 (reg_buffer::raw_supply_zeroed): Likewise.
4446 (reg_buffer::raw_collect): Likewise.
4447 (reg_buffer::raw_collect_integer): Likewise.
4449 2018-06-10 Tom Tromey <tom@tromey.com>
4451 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
4452 (class remote_state) <stop_reply_queue>: Now std::vector.
4453 (remote_state::~remote_state)
4454 (remote_target::stop_reply_queue_length): Update.
4455 (struct queue_iter_param, remove_child_of_pending_fork)
4456 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4457 (check_pending_event_prevents_wildcard_vcont_callback)
4458 (remove_stop_reply_for_inferior)
4459 (remove_stop_reply_of_remote_state)
4460 (remote_notif_remove_once_on_match)
4461 (stop_reply_match_ptid_and_ws)
4462 (remote_kill_child_of_pending_fork): Remove.
4463 (remote_target::remove_new_fork_children)
4464 (remote_target::check_pending_events_prevent_wildcard_vcont)
4465 (remote_target::discard_pending_stop_replies)
4466 (remote_target::discard_pending_stop_replies_in_queue)
4467 (remote_target::remote_notif_remove_queued_reply)
4468 (remote_target::queued_stop_reply)
4469 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4470 (remote_target::wait, remote_target::kill_new_fork_children)
4471 (remote_target::async): Update.
4473 2018-06-10 Tom Tromey <tom@tromey.com>
4475 * record-full.c (record_full_arch_list_cleanups): Remove.
4476 (record_full_message): Use try/catch.
4477 (record_full_wait_cleanups): Remove.
4478 (record_full_wait_1): Use try/catch.
4479 (record_full_restore): Likewise.
4481 2018-06-10 Tom Tromey <tom@tromey.com>
4483 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
4484 declare VEC. Add constructor.
4485 <in_target_beneath>: Now bool.
4486 (record_full_breakpoints): Now a std::vector, static.
4487 (record_full_sync_record_breakpoints)
4488 (record_full_init_record_breakpoints)
4489 (record_full_target::insert_breakpoint)
4490 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
4492 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
4494 * dwarf2read.c (process_cu_includes): Remove struct keyword.
4495 * serial.c (serial_interface_lookup): Remove struct keyword.
4497 2018-06-10 Tom Tromey <tom@tromey.com>
4499 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4501 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4503 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4505 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4506 "beneath" as a method.
4507 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4508 Use "beneath" as a method.
4510 2018-06-10 Tom Tromey <tom@tromey.com>
4512 * tracefile.c (struct trace_file_writer_deleter): New.
4513 <operator()>: Rename from trace_file_writer_xfree.
4514 (trace_file_writer_up): New typedef.
4515 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4517 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4519 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4520 <m_registers, m_register_status>: Change type to
4522 * regcache.c (reg_buffer::reg_buffer): Use new instead of
4525 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4527 * common/common-regcache.h (enum register_status): Add
4528 underlying type "signed char".
4529 * regcache.h (reg_buffer) <m_register_status>: Change type to
4531 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4532 register_status instead of signed char.
4533 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4534 (reg_buffer::get_register_status): Remove cast.
4535 (readable_regcache::raw_read): Remove cast.
4536 (readable_regcache::cooked_read): Remove cast.
4538 2018-06-09 Tom Tromey <tom@tromey.com>
4540 * source.c (reverse_search_command, forward_search_command): Use
4543 2018-06-09 Tom Tromey <tom@tromey.com>
4545 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
4546 (serial_ops_list): Now static, std::vector.
4547 (serial_interface_lookup, serial_add_interface): Update.
4549 2018-06-09 Tom Tromey <tom@tromey.com>
4551 * dwarf2read.c (process_cu_includes): Update.
4552 (process_full_comp_unit): Update.
4553 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4556 2018-06-08 Paul Koning <paul_koning@dell.com>
4560 * python/python.c (do_start_initialization):
4561 Avoid call to internal Python API.
4562 (init__gdb_module): New function.
4564 2018-06-08 Gary Benson <gbenson@redhat.com>
4566 * linux-thread-db.c (valprint.h): New include.
4567 (struct check_thread_db_info): New structure.
4568 (check_thread_db_on_load, tdb_testinfo): New static globals.
4569 (check_thread_db, check_thread_db_callback): New functions.
4570 (try_thread_db_load_1): Run integrity checks if requested.
4571 (maintenance_check_libthread_db): New function.
4572 (_initialize_thread_db): Register "maint check libthread-db"
4573 and "maint set/show check-libthread-db".
4574 * NEWS: Mention the above new commands.
4576 2018-06-08 Tom Tromey <tom@tromey.com>
4578 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4581 2018-06-08 Tom Tromey <tom@tromey.com>
4583 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4585 2018-06-08 Tom Tromey <tom@tromey.com>
4587 * common/btrace-common.h (struct btrace_data): Add constructor,
4588 destructor, move assignment operator.
4589 <empty, clear, fini>: New methods.
4590 <format>: Initialize.
4591 (btrace_data_init, btrace_data_fini, btrace_data_clear)
4592 (btrace_data_empty): Don't declare.
4593 * common/btrace-common.c (btrace_data_init): Remove.
4594 (btrace_data::fini): Rename from btrace_data_fini.
4595 (btrace_data::empty): Rename from btrace_data_empty.
4596 (btrace_data::clear): Rename from btrace_data_clear. Return
4598 * btrace.h (make_cleanup_btrace_data): Don't declare.
4599 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4600 (parse_xml_btrace): Update.
4601 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4602 (maint_btrace_clear_packet_history_cmd): Update.
4604 2018-06-07 Pedro Alves <palves@redhat.com>
4606 * target.h (target_ops) <beneath>: Now a method. All references
4608 (class target_stack): New.
4609 * target.c (g_target_stack): New.
4610 (g_current_top_target): Delete.
4611 (current_top_target): Get the top target out of g_target_stack.
4612 (target_stack::push, target_stack::unpush): New.
4613 (push_target, unpush_target): Reimplement.
4614 (target_is_pushed): Reimplement in terms of g_target_stack.
4615 (target_ops::beneath, target_stack::find_beneath): New.
4617 2018-06-07 Pedro Alves <palves@redhat.com>
4619 * target.h (find_target_beneath): Delete declaration.
4620 * target.c (find_target_beneath): Delete definition.
4621 * aix-thread.c: All callers of find_target_beneath adjusted to
4622 call target_ops::beneath instead.
4623 * bsd-uthread.c: Likewise.
4624 * linux-thread-db.c: Likewise.
4625 * ravenscar-thread.c: Likewise.
4626 * sol-thread.c: Likewise.
4627 * spu-multiarch.c: Likewise.
4629 2018-06-07 Pedro Alves <palves@redhat.com>
4631 * target.h (target_ops) <beneath>: Now a method. All references
4633 (target_ops) <m_beneath>: New.
4634 * target.c (target_ops::beneath): New.
4635 * corelow.c: Adjust all references to target_ops::beneath.
4636 * linux-thread-db.c: Likewise.
4637 * make-target-delegates: Likewise.
4638 * record-btrace.c: Likewise.
4639 * record-full.c: Likewise.
4640 * remote.c: Likewise.
4641 * target.c: Likewise.
4642 * target-delegates.c: Regenerate.
4644 2018-06-07 Pedro Alves <palves@redhat.com>
4646 * target.h (target_stack): Delete.
4647 (current_top_target): Declare function.
4648 * target.c (target_stack): Delete.
4649 (g_current_top_target): New.
4650 (current_top_target): New function.
4651 * auxv.c: Use current_top_target instead of target_stack
4653 * avr-tdep.c: Likewise.
4654 * breakpoint.c: Likewise.
4655 * corefile.c: Likewise.
4656 * elfread.c: Likewise.
4658 * exceptions.c: Likewise.
4659 * frame.c: Likewise.
4660 * gdbarch-selftests.c: Likewise.
4661 * gnu-v3-abi.c: Likewise.
4662 * ia64-tdep.c: Likewise.
4663 * ia64-vms-tdep.c: Likewise.
4664 * infcall.c: Likewise.
4665 * infcmd.c: Likewise.
4666 * infrun.c: Likewise.
4667 * linespec.c: Likewise.
4668 * linux-tdep.c: Likewise.
4669 * minsyms.c: Likewise.
4670 * ppc-linux-nat.c: Likewise.
4671 * ppc-linux-tdep.c: Likewise.
4672 * procfs.c: Likewise.
4673 * regcache.c: Likewise.
4674 * remote.c: Likewise.
4675 * rs6000-tdep.c: Likewise.
4676 * s390-linux-nat.c: Likewise.
4677 * s390-tdep.c: Likewise.
4678 * solib-aix.c: Likewise.
4679 * solib-darwin.c: Likewise.
4680 * solib-dsbt.c: Likewise.
4681 * solib-spu.c: Likewise.
4682 * solib-svr4.c: Likewise.
4683 * solib-target.c: Likewise.
4684 * sparc-tdep.c: Likewise.
4685 * sparc64-tdep.c: Likewise.
4686 * spu-tdep.c: Likewise.
4687 * symfile.c: Likewise.
4688 * symtab.c: Likewise.
4689 * target-descriptions.c: Likewise.
4690 * target-memory.c: Likewise.
4691 * target.c: Likewise.
4692 * target.h: Likewise.
4693 * tracefile-tfile.c: Likewise.
4694 * tracepoint.c: Likewise.
4695 * valops.c: Likewise.
4696 * valprint.c: Likewise.
4697 * value.c: Likewise.
4698 * windows-tdep.c: Likewise.
4699 * mi/mi-main.c: Likewise.
4701 2018-06-07 Tom Tromey <tom@tromey.com>
4703 * valprint.h (build_address_symbolic): Declare.
4704 * printcmd.c (print_address_symbolic): Update.
4705 (build_address_symbolic): Change "name" and "filename" to
4707 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4709 * defs.h (build_address_symbolic): Remove declaration.
4711 2018-06-07 Alan Hayward <alan.hayward@arm.com>
4713 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4714 (aarch64_vnv_type): Add function.
4715 (aarch64_pseudo_register_name): Add V regs for SVE.
4716 (aarch64_pseudo_register_type): Likewise.
4717 (aarch64_pseudo_register_reggroup_p): Likewise.
4718 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4719 (aarch64_pseudo_read_value): Add V regs for SVE.
4720 (aarch64_pseudo_write_2): Use V0 offset for SVE
4721 (aarch64_pseudo_write): Add V regs for SVE.
4722 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4724 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
4726 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4727 (sve_vl_from_vq): Likewise.
4729 2018-06-05 Tom Tromey <tom@tromey.com>
4731 * cli/cli-cmds.c (show_version): Update.
4732 * top.c (print_gdb_version): Add "interactive" parameter.
4734 * main.c (captured_main_1): Update.
4735 * top.h (print_gdb_version): Add "interactive" parameter and a
4738 2018-06-05 David Malcolm <dmalcolm@redhat.com>
4740 * common/enum-flags.h: Add trailing semicolon to example in
4743 2018-06-05 Tom Tromey <tom@tromey.com>
4746 * NEWS: Add entry about pager.
4747 * utils.c (pagination_disabled_for_command): New global.
4748 (prompt_for_continue): Allow "c" response to prompt.
4749 (reinitialize_more_filter): Clear
4750 pagination_disabled_for_command.
4751 (fputs_maybe_filtered): Check pagination_disabled_for_command.
4753 2018-06-04 Tom Tromey <tom@tromey.com>
4755 * ada-lang.h (ada_lookup_symbol_list): Update.
4756 * ada-lang.c (resolve_subexp): Update.
4757 (symbols_are_identical_enums): Change type of syms. Remove nsyms
4759 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4760 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4761 results parameter to std::vector.
4762 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4764 * ada-exp.y (block_lookup): Update.
4765 (select_possible_type_sym): Change type of syms. Remove nsyms
4767 (write_var_or_type, write_name_assoc): Update.
4769 2018-06-04 Joel Brobecker <brobecker@adacore.com>
4771 * windows-nat.c (windows_nat_target::xfer_partial): Return
4772 TARGET_XFER_E_IO if we need to delegate to the target beneath
4773 but BENEATH is NULL.
4775 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
4777 * Makefile.in (config.status): Add configure.nat as a
4780 2018-06-04 Tom Tromey <tom@tromey.com>
4782 * cp-name-parser.y (cpname_state): Add method declarations.
4783 (HANDLE_QUAL): Update.
4784 (cpname_state::d_grab, cpname_state::fill_comp)
4785 (cpname_state::make_operator, cpname_state::make_dtor)
4786 (cpname_state::make_builtin_type, cpname_state::make_name)
4787 (cpname_state::d_qualify, cpname_state::d_int_type)
4788 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4789 (%union): Move earlier.
4791 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4793 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4795 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4797 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4798 (aarch64_pseudo_write_1): Likewise.
4799 (aarch64_pseudo_read_value): Use helper.
4800 (aarch64_pseudo_write): Likewise.
4802 2018-06-04 Pedro Alves <palves@redhat.com>
4804 * darwin-nat.c (darwin_ops): Delete.
4805 (darwin_attach_pid): Use get_native_target.
4807 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4809 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4810 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4812 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4814 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4815 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4816 (aarch64_gdbarch_init): Check for SVE.
4817 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4819 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4821 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4822 * aarch64-tdep.h (aarch64_read_description): Likewise.
4823 * arch/aarch64.c (aarch64_create_target_description): Likewise.
4824 * arch/aarch64.h (aarch64_create_target_description): Likewise.
4825 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4826 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4827 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4829 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
4831 * value.c (value_fetch_lazy_bitfield): New.
4832 (value_fetch_lazy_memory): New.
4833 (value_fetch_lazy_register): New.
4834 (value_fetch_lazy): Factor out to smaller functions.
4836 2018-06-01 Tom Tromey <tom@tromey.com>
4838 * cp-name-parser.y (backslashable, represented): Now const.
4840 2018-06-01 Tom Tromey <tom@tromey.com>
4842 * cp-name-parser.y: Include parser-defs.h.
4843 (parser_fprintf): Remove declaration.
4845 2018-06-01 Tom Tromey <tom@tromey.com>
4847 * cp-name-parser.y: Use %pure-parser, %lex-param, and
4849 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4850 (global_result): Remove globals.
4851 (struct cpname_state): New.
4852 (yyparse): Don't declare.
4853 (yylex, yyerror): Move declarations after %union.
4854 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4855 (make_name): Add state parameter.
4857 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4859 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4861 (yylex): Add lvalp, state parameters.
4862 (yyerror): Add state parameter.
4863 (cp_demangled_name_to_comp): Update.
4865 2018-06-01 Tom Tromey <tom@tromey.com>
4867 * cp-name-parser.y (parser_fprintf): Declare.
4868 (GDB_YY_REMAP_PREFIX): Define.
4869 Include yy-remap.h. Don't redefine yy* identifiers.
4871 2018-06-01 Tom Tromey <tom@tromey.com>
4873 * python/py-type.c (typy_legacy_template_argument): Update.
4874 * cp-support.h (cp_demangled_name_to_comp): Update.
4875 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4876 parameter to be a "std::string *".
4879 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
4881 * ada-lex.l: Include "diagnostics.h" instead of
4882 "common/diagnostics.h".
4883 * unittests/environ-selftests.c: Likewise.
4884 * common/diagnostics.h: Moved to ../include.
4886 2018-06-01 Joel Brobecker <brobecker@adacore.com>
4888 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4889 to language_mode_manual while calling breakpoint_re_set_one.
4891 2018-06-01 Tom Tromey <tom@tromey.com>
4893 * valops.c (value_cast_structs, destructor_name_p): Update.
4894 * symtab.c (gdb_mangle_name): Update.
4895 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4897 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4898 (pascal_object_print_value_fields, pascal_object_print_value):
4900 * p-typeprint.c (pascal_type_print_derivation_info): Update.
4901 * linespec.c (find_methods): Update.
4902 * gdbtypes.h (type_name_no_tag): Remove.
4903 (type_name_or_error): Rename from type_name_no_tag_or_error.
4904 * gdbtypes.c (type_name_no_tag): Remove.
4905 (type_name_or_error): Rename from type_name_no_tag_or_error.
4906 (lookup_struct_elt_type, check_typedef): Update.
4907 * expprint.c (print_subexp_standard): Update.
4908 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4909 * d-namespace.c (d_lookup_nested_symbol): Update.
4910 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4911 (cp_print_class_member): Update.
4912 * cp-namespace.c (cp_lookup_nested_symbol): Update.
4913 * completer.c (add_struct_fields): Update.
4914 * c-typeprint.c (cp_type_print_derivation_info)
4915 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4917 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4918 (ada_prefer_type, ada_is_exception_sym): Update.
4920 2018-06-01 Tom Tromey <tom@tromey.com>
4922 * valops.c (enum_constant_from_type, value_namespace_elt)
4923 (value_maybe_namespace_elt): Update.
4924 * valarith.c (find_size_for_pointer_math): Update.
4925 * target-descriptions.c (make_gdb_type): Update.
4926 * symmisc.c (print_symbol): Update.
4927 * stabsread.c (define_symbol, read_type)
4928 (complain_about_struct_wipeout, add_undefined_type)
4929 (cleanup_undefined_types_1): Update.
4930 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4931 (rust_range_type_p, val_print_struct, rust_print_struct_def)
4932 (rust_internal_print_type, rust_composite_type)
4933 (rust_evaluate_funcall, rust_evaluate_subexp)
4934 (rust_inclusive_range_type_p): Update.
4935 * python/py-type.c (typy_get_tag): Update.
4936 * p-typeprint.c (pascal_type_print_base): Update.
4937 * mdebugread.c (parse_symbol, parse_type): Update.
4938 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4940 * guile/scm-type.c (gdbscm_type_tag): Update.
4941 * go-lang.c (sixg_string_p): Update.
4942 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4944 * gdbtypes.h (struct main_type) <tag_name>: Remove.
4945 (TYPE_TAG_NAME): Remove.
4946 * gdbtypes.c (type_name_no_tag): Simplify.
4947 (check_typedef, check_types_equal, recursive_dump_type)
4948 (copy_type_recursive, arch_composite_type): Update.
4949 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
4950 in summary mode when needed.
4951 * eval.c (evaluate_funcall): Update.
4952 * dwarf2read.c (fixup_go_packaging, read_structure_type)
4953 (process_structure_scope, read_enumeration_type)
4954 (read_namespace_type, read_module_type, determine_prefix): Update.
4955 * cp-support.c (inspect_type): Update.
4956 * coffread.c (process_coff_symbol, decode_base_type): Update.
4957 * c-varobj.c (c_is_path_expr_parent): Update.
4958 * c-typeprint.c (c_type_print_base_struct_union): Update.
4959 (c_type_print_base_1): Update. Print struct/class/union/enum in
4960 summary when using C language.
4961 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4962 (gen_maybe_namespace_elt): Update.
4963 * ada-lang.c (ada_type_name): Simplify.
4964 (empty_record, ada_template_to_fixed_record_type_1)
4965 (template_to_static_fixed_type)
4966 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4968 2018-06-01 Tom Tromey <tom@tromey.com>
4970 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4972 * c-typeprint.c (c_print_type_1): Add "language" parameter.
4973 (c_print_type): Update.
4974 (c_print_type): New overload.
4975 (c_type_print_varspec_prefix, c_type_print_args)
4976 (c_type_print_varspec_suffix, c_print_type_no_offsets)
4977 (c_type_print_base_struct_union, c_type_print_base_1)
4978 (cp_type_print_method_args): Add "language" parameter.
4979 (c_type_print_base): Update.
4980 * c-lang.h (c_print_type): Add new overload.
4982 2018-06-01 Tom Tromey <tom@tromey.com>
4984 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4985 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4987 2018-06-01 Alan Hayward <alan.hayward@arm.com>
4989 * aarch64-tdep.c (aarch64_sve_register_names): New const
4991 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4992 (AARCH64_SVE_Z_REGS_NUM): New define.
4993 (AARCH64_SVE_P_REGS_NUM): Likewise.
4994 (AARCH64_SVE_NUM_REGS): Likewise.
4996 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4998 * nat/linux-ptrace.h [__alpha__]
4999 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
5002 2018-05-31 Maciej W. Rozycki <macro@mips.com>
5004 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
5005 the endianness selected.
5006 * NEWS: Document `set endian auto' mode operation update.
5008 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5010 * Makefile.in: Add new header.
5011 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
5012 (sve_vl_from_vg): Likewise.
5013 (sve_vq_from_vl): Likewise.
5014 (sve_vl_from_vq): Likewise.
5015 (sve_vq_from_vg): Likewise.
5016 (sve_vg_from_vq): Likewise.
5017 * configure.nat: Add new c file.
5018 * nat/aarch64-sve-linux-ptrace.c: New file.
5019 * nat/aarch64-sve-linux-ptrace.h: New file.
5021 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5023 * aarch64-linux-nat.c (aarch64_linux_read_description):
5025 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5027 * aarch64-tdep.c (tdesc_aarch64_list): Add.
5028 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5029 (aarch64_gdbarch_init): Add parmeter zero.
5030 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5031 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5032 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5034 * doc/gdb.texinfo: Describe SVE feature
5035 * features/aarch64-sve.c: New file.
5037 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
5040 * gdbarch.sh (significant_addr_bit): Default to zero when
5041 not set by target architecture.
5042 * gdbarch.c: Re-generated.
5043 * utils.c (address_significant): Update.
5045 2018-05-30 Joel Brobecker <brobecker@adacore.com>
5047 * stack.c (func_command): Remove trailing newline in call to error.
5049 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5051 * regcache.h (regcache_raw_collect): Remove, update callers to
5052 use regcache::raw_collect.
5053 * regcache.c (regcache_raw_collect): Remove.
5055 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5057 * regcache.h (regcache_raw_supply): Remove, update callers to
5058 use detached_regcache::raw_supply.
5059 * regcache.c (regcache_raw_supply): Remove.
5061 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5063 * regcache.h (regcache_cooked_write_part): Remove, update
5064 callers to use regcache::cooked_write_part.
5065 * regcache.c (regcache_cooked_write_part): Remove.
5067 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5069 * regcache.h (regcache_cooked_read_part): Remove, update callers
5070 to use readable_regcache::cooked_read_part.
5071 * regcache.c (regcache_cooked_read_part): Remove.
5073 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5075 * regcache.h (regcache_cooked_read_value): Remove, update
5076 callers to use readable_regcache::cooked_read_value.
5077 * regcache.c (regcache_cooked_read_value): Remove.
5079 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5081 * regcache.h (regcache_cooked_write): Remove, update callers to
5082 use regcache::cooked_write.
5083 * regcache.c (regcache_cooked_write): Remove.
5085 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5087 * regcache.h (regcache_invalidate): Remove, update callers to
5088 use detached_regcache::invalidate instead.
5089 * regcache.c (regcache_invalidate): Remove.
5091 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5093 * regcache.h (regcache_raw_write_part): Remove, update callers
5094 to use regcache::raw_write_part instead.
5095 * regcache.c (regcache_raw_write_part): Remove.
5097 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5099 * regcache.h (regcache_raw_read_part): Remove, update callers to
5100 use readable_regcache::raw_read_part instead.
5101 * regcache.c (regcache_raw_read_part): Remove.
5103 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5105 * regcache.h (regcache_cooked_read): Remove, update callers to
5106 use readable_regcache::cooked_read instead.
5107 * regcache.c (regcache_cooked_read): Remove.
5109 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5111 * regcache.h (regcache_raw_write): Remove, update callers to use
5112 regcache::raw_write instead.
5113 * regcache.c (regcache_raw_write): Remove.
5115 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5117 * regcache.h (regcache_raw_read): Remove, update callers to use
5118 readable_regcache::raw_read instead.
5119 * regcache.c (regcache_raw_read): Remove.
5121 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5123 * regcache.h (regcache_raw_update): Remove, update callers to
5124 use readable_regcache::raw_update instead.
5125 * regcache.c (regcache_raw_update): Remove.
5127 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5129 * regcache.h (regcache_register_status): Remove, update callers
5130 to use reg_buffer::get_register_status directly instead.
5131 * regcache.c (regcache_register_status): Remove.
5133 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5135 * regcache.h (regcache_get_ptid): Remove, update all callers to
5136 call regcache::ptid instead.
5137 * regcache.c (regcache_get_ptid): Remove.
5139 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5141 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5143 2018-05-30 Pedro Alves <palves@redhat.com>
5145 * common/common-exceptions.h (exception_rethrow): Use
5148 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
5150 * breakpoint.c (print_solib_event, check_status_catch_solib):
5151 Remove struct keyword in range-based for loops.
5152 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5153 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5155 * linespec.c (find_superclass_methods, search_minsyms_for_name):
5157 * symfile.c (addr_info_make_relative): Likewise.
5158 * thread.c (value_in_thread_stack_temporaries): Likewise.
5160 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
5163 * valops.c (value_struct_elt_for_reference): Call check_typedef on
5164 aggregate type to get its real type before accessing it.
5166 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
5168 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5169 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5170 * coff-pe-read.c (add_pe_forwarded_sym): Replace
5171 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5172 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5173 * jit.c (jit_breakpoint_re_set_internal): Likewise.
5174 * printcmd.c (info_address_command): Likewise.
5176 2018-05-29 Tom Tromey <tom@tromey.com>
5178 * windows-nat.c (handle_exception): Update fall-through comment.
5180 2018-05-29 Tom Tromey <tom@tromey.com>
5182 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
5183 (struct program_space) <added_solibs>: Now a std::vector.
5184 * breakpoint.c (print_solib_event): Update.
5185 (check_status_catch_solib): Update.
5186 * progspace.c (clear_program_space_solib_cache): Update.
5187 * solib.c (update_solib_list): Update.
5189 2018-05-29 Tom Tromey <tom@tromey.com>
5191 * python/py-type.c (typy_richcompare): Update.
5192 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5193 * gdbtypes.h (types_deeply_equal): Return bool.
5194 (types_equal): Likewise.
5195 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
5197 (check_types_equal): Change worklist to std::vector. Return
5199 (struct type_equality_entry): Add constructor.
5200 (compare_maybe_null_strings): Return bool.
5201 (check_types_worklist): Return bool. Change worklist to
5203 (types_deeply_equal): Use std::vector.
5204 (types_equal): Return bool.
5205 (compare_maybe_null_strings): Simplify.
5207 2018-05-29 Tom Tromey <tom@tromey.com>
5209 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
5211 2018-05-29 Tom Tromey <tom@tromey.com>
5213 * objc-lang.h: Don't include cp-support.h.
5214 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
5217 2018-05-27 Tom Tromey <tom@tromey.com>
5219 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5221 2018-05-25 Tom Tromey <tom@tromey.com>
5223 * value.c (value::location): Initialize.
5225 2018-05-25 Tom Tromey <tom@tromey.com>
5227 * dbxread.c (init_bincl_list): Remove.
5228 (bincl_list): Now a std::vector.
5229 (bincls_allocated, next_bincl): Remove.
5230 (free_bincl_list, do_free_bincl_list_cleanup)
5231 (make_cleanup_free_bincl_list): Remove.
5232 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5234 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5235 (struct header_file_location): Add constructor.
5236 (add_bincl_to_list): Remove.
5238 2018-05-25 Tom Tromey <tom@tromey.com>
5240 * tui/tui.c (tui_enable): Update.
5241 * mi/mi-interp.c (mi_interp::init): Update.
5242 * interps.h (class interp) <name>: New method.
5243 <m_name>: Rename from name.
5244 (~scoped_restore_interp): Update.
5245 * interps.c (interp::interp): Update.
5246 (interp_add, interp_set, interp_lookup_existing)
5247 (current_interp_named_p): Update.
5249 2018-05-25 Tom Tromey <tom@tromey.com>
5251 * interps.c (interp_name): Remove.
5252 * mi/mi-interp.c (mi_interp::init): Update.
5253 * interps.h (interp_name): Remove.
5254 (~scoped_restore_interp): Update.
5255 * tui/tui.c (tui_enable): Update.
5257 2018-05-25 Tom Tromey <tom@tromey.com>
5259 * utils.c (fputs_maybe_filtered): Update.
5260 * linespec.c (decode_line_full): Update.
5261 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5262 (mi_print_breakpoint_for_event, mi_solib_loaded)
5263 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5264 (mi_user_selected_context_changed): Update.
5265 * mi/mi-main.c (mi_execute_command): Update.
5266 * cli/cli-script.c (execute_control_command): Update.
5267 * python/python.c (execute_gdb_command): Update.
5268 * solib.c (info_sharedlibrary_command): Update.
5269 * interps.c (interp_ui_out): Remove.
5270 * interps.h (interp_ui_out): Remove.
5272 2018-05-25 Tom Tromey <tom@tromey.com>
5274 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5275 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5276 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5278 2018-05-25 Tom Tromey <tom@tromey.com>
5280 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5281 * interps.c (interp_exec): Use scoped_restore.
5283 2018-05-25 Tom Tromey <tom@tromey.com>
5285 * remote.c (remote_target::remote_file_get): Use
5287 (remote_target::remote_file_put): Likewise.
5289 2018-05-25 Tom Tromey <tom@tromey.com>
5291 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5293 (get_pe_section_index, add_pe_exported_sym): Update.
5294 (read_pe_exported_syms): Use gdb::def_vector.
5296 2018-05-25 Tom Tromey <tom@tromey.com>
5298 * frame.c (remove_prev_frame): Remove.
5299 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5301 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5303 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5305 * mips-linux-nat.c (supply_fpregset): Always call
5306 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5307 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5308 `mips_fill_fpregset'.
5309 * mips-linux-tdep.c (mips_supply_fpregset)
5310 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5311 (mips_fill_fpregset_wrapper): Remove functions.
5312 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5313 (mips_linux_fpregset): Remove variable.
5314 (mips_linux_iterate_over_regset_sections): Use
5315 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5316 (mips_linux_o32_sigframe_init): Remove comment.
5318 2018-05-25 Pedro Alves <palves@redhat.com>
5320 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5321 (struct readahead_cache, struct packet_reg, struct
5322 remote_arch_state, class remote_state): Move higher up in the
5324 (remote_target::m_remote_state): Now an object instead of a pointer.
5325 (remote_target::get_remote_state): Adjust.
5327 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5329 * stack.c (select_and_print_frame): Delete.
5330 (struct function_bounds): Move struct within function.
5331 (func_command): Most content moved into new function
5332 find_frame_for_function, use new function, print result, add
5334 (find_frame_for_function): New function, now returns a result.
5336 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5338 * stack.c (iterate_over_block_arg_vars): Fix comment.
5339 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5341 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5345 (scoped_restore_selected_frame::scoped_restore_selected_frame):
5347 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5349 * frame.h (class scoped_restore_selected_frame): New class.
5350 * stack.c (print_frame_local_vars): Remove catching and rethrowing
5351 of any exception, use scoped_restore_selected_frame to restore the
5354 2018-05-24 Pedro Alves <palves@redhat.com>
5356 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5359 2018-05-23 Tom Tromey <tom@tromey.com>
5361 * complaints.c (struct complaints): Remove.
5362 (symfile_complaint_book): Remove.
5363 (series): New global.
5364 (complaint_internal): Update.
5365 (clear_complaints): Update.
5367 2018-05-23 Tom Tromey <tom@tromey.com>
5369 * complaints.c (counters): New global.
5370 (struct complain): Remove.
5371 (struct complaints) <root>: Remove.
5372 (complaint_sentinel): Remove.
5373 (symfile_complaint_book): Update.
5374 (find_complaint) Remove.
5375 (complaint_internal, clear_complaints): Update.
5377 2018-05-23 Tom Tromey <tom@tromey.com>
5379 * complaints.c (struct complain) <file, line>: Remove.
5380 (find_complaint): Remove file, line parameters.
5381 (complaint_internal): Update.
5383 2018-05-23 Tom Tromey <tom@tromey.com>
5385 * complaints.c (vcomplaint): Remove.
5386 (complaint_internal) Merge in contents of vcomplaint.
5388 2018-05-23 Tom Tromey <tom@tromey.com>
5390 * complaints.c (struct complaints) <explanation>: Remove.
5391 (symfile_explanations): Remove.
5392 (symfile_complaint_book): Update.
5393 (vcomplaint): Update.
5394 (struct explanation): Remove.
5396 2018-05-23 Tom Tromey <tom@tromey.com>
5398 * complaints.c (symfile_complaints): Remove.
5399 (complaint_internal): Remove "complaints" parameter.
5400 (clear_complaints, vcomplaint): Remove "c" parameter.
5401 (get_complaints): Remove.
5402 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5403 (dwarf2_debug_line_missing_file_complaint)
5404 (dwarf2_debug_line_missing_end_sequence_complaint)
5405 (dwarf2_complex_location_expr_complaint)
5406 (dwarf2_const_value_length_mismatch_complaint)
5407 (dwarf2_section_buffer_overflow_complaint)
5408 (dwarf2_macro_malformed_definition_complaint)
5409 (dwarf2_invalid_attrib_class_complaint)
5410 (create_addrmap_from_index, dw2_symtab_iter_next)
5411 (dw2_expand_marked_cus)
5412 (dw2_debug_names_iterator::find_vec_in_debug_names)
5413 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5414 (create_debug_type_hash_table, init_cutu_and_read_dies)
5415 (partial_die_parent_scope, add_partial_enumeration)
5416 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5417 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5418 (read_import_statement, read_file_scope, create_dwo_cu_reader)
5419 (create_cus_hash_table, create_dwp_hash_table)
5420 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5421 (dwarf2_rnglists_process, dwarf2_ranges_process)
5422 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5423 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5424 (handle_struct_member_die, process_structure_scope)
5425 (read_array_type, read_common_block, read_module_type)
5426 (read_tag_pointer_type, read_typedef, read_base_type)
5427 (read_subrange_type, load_partial_dies, partial_die_info::read)
5428 (partial_die_info::read, partial_die_info::read)
5429 (partial_die_info::read, read_checked_initial_length_and_offset)
5430 (dwarf2_string_attr, read_formatted_entries)
5431 (dwarf_decode_line_header)
5432 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5433 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5434 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5435 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5436 (get_signatured_type, get_DW_AT_signature_type)
5437 (decode_locdesc, file_file_name, consume_improper_spaces)
5438 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5439 (dwarf_decode_macro_bytes, dwarf_decode_macros)
5440 (dwarf2_symbol_mark_computed, set_die_type)
5441 (read_attribute_value): Update.
5442 * stap-probe.c (handle_stap_probe, get_stap_base_address):
5444 * dbxread.c (unknown_symtype_complaint)
5445 (lbrac_mismatch_complaint, repeated_header_complaint)
5446 (set_namestring, function_outside_compilation_unit_complaint)
5447 (read_dbx_symtab, process_one_symbol): Update.
5448 * gdbtypes.c (stub_noname_complaint): Update.
5449 * windows-nat.c (handle_unload_dll): Update.
5450 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5451 (decode_base_type): Update.
5452 * xcoffread.c (bf_notfound_complaint, ef_complaint)
5453 (eb_complaint, record_include_begin, record_include_end)
5454 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5455 (process_xcoff_symbol, read_symbol)
5456 (function_outside_compilation_unit_complaint)
5457 (scan_xcoff_symtab): Update.
5458 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5459 * buildsym.c (finish_block_internal, make_blockvector)
5460 (end_symtab_get_static_block, augment_type_symtab): Update.
5461 * dtrace-probe.c (dtrace_process_dof)
5462 (dtrace_static_probe_ops::get_probes): Update.
5463 * complaints.h (struct complaint): Don't declare.
5464 (symfile_complaints): Remove.
5465 (complaint_internal): Remove "complaints" parameter.
5466 (complaint): Likewise.
5467 (clear_complaints): Likewise.
5468 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5469 (reread_symbols): Update.
5470 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5471 (dwarf2_frame_cache, decode_frame_entry): Update.
5472 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5473 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5474 (info_selectors_command): Update.
5475 * macrotab.c (macro_include, check_for_redefinition)
5476 (macro_undef): Update.
5477 * objfiles.c (filter_overlapping_sections): Update.
5478 * stabsread.c (invalid_cpp_abbrev_complaint)
5479 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5480 (define_symbol, error_type, read_type, rs6000_builtin_type)
5481 (stabs_method_name_from_physname, read_member_functions)
5482 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5483 (attach_fields_to_type, complain_about_struct_wipeout)
5484 (read_range_type, read_args, common_block_start)
5485 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5487 * mdebugread.c (index_complaint, unknown_ext_complaint)
5488 (basic_type_complaint, bad_tag_guess_complaint)
5489 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5490 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5491 (parse_procedure, parse_lines)
5492 (function_outside_compilation_unit_complaint)
5493 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5494 (bad_tag_guess_complaint, reg_value_complaint): Update.
5495 * cp-support.c (demangled_name_complaint): Update.
5496 * macroscope.c (sal_macro_scope): Update.
5497 * dwarf-index-write.c (class debug_names): Update.
5499 2018-05-23 Tom Tromey <tom@tromey.com>
5501 * complaints.c (clear_complaints): Remove "noisy" parameter.
5502 * complaints.h (clear_complaints): Update.
5503 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5504 (reread_symbols): Update.
5506 2018-05-23 Tom Tromey <tom@tromey.com>
5508 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5510 (vcomplaint, clear_complaints): Update.
5511 (symfile_explanations): Remove some messages.
5513 2018-05-23 Tom Tromey <tom@tromey.com>
5515 * complaints.c (internal_complaint): Remove.
5516 * complaints.h (internal_complaint): Remove.
5518 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5520 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5522 2018-05-22 Pedro Alves <palves@redhat.com>
5524 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5525 (remote_fileio_badfd, remote_fileio_return_errno)
5526 (remote_fileio_return_success, remote_fileio_func_open)
5527 (remote_fileio_func_open, remote_fileio_func_close)
5528 (remote_fileio_func_read, remote_fileio_func_write)
5529 (remote_fileio_func_lseek, remote_fileio_func_rename)
5530 (remote_fileio_func_unlink, remote_fileio_func_stat)
5531 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5532 (remote_fileio_func_isatty, remote_fileio_func_system): Add
5533 remote_target parameter.
5534 (remote_fio_func_map) <func>: Add remote_target parameter.
5535 (do_remote_fileio_request, remote_fileio_request):
5536 * remote-fileio.h (remote_fileio_request):
5537 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5538 remote_target parameter.
5539 (remote_notif_process, handle_notification): Adjust to pass down
5541 (remote_notif_state_allocate): Add remote_target parameter. Save
5543 * remote-notif.h (struct remote_target): Forward declare.
5544 (struct notif_client) <parse, ack, can_get_pending_events>: Add
5545 remote_target parameter.
5546 (struct remote_notif_state) <remote>: New field.
5547 (remote_notif_ack, remote_notif_parse): Add remote_target
5549 (remote_notif_state_allocate, remote_notif_state_allocate): Add
5550 remote_target parameter.
5551 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5552 (threads_listing_context, rmt_thread_action, protocol_feature)
5553 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5554 (packet_result, struct threads_listing_context, remote_state):
5555 Move definitions and declarations higher up.
5556 (remote_target) <~remote_target>: Declare.
5557 (remote_download_command_source, remote_file_put, remote_file_get)
5558 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5559 (remote_hostio_pread_vFile, remote_hostio_send_command)
5560 (remote_hostio_set_filesystem, remote_hostio_open)
5561 (remote_hostio_close, remote_hostio_unlink, remote_state)
5562 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5563 (get_memory_write_packet_size, get_memory_read_packet_size)
5564 (append_pending_thread_resumptions, remote_detach_1)
5565 (append_resumption, remote_resume_with_vcont)
5566 (add_current_inferior_and_thread, wait_ns, wait_as)
5567 (process_stop_reply, remote_notice_new_inferior)
5568 (process_initial_stop_replies, remote_add_thread)
5569 (btrace_sync_conf, remote_btrace_maybe_reopen)
5570 (remove_new_fork_children, kill_new_fork_children)
5571 (discard_pending_stop_replies, stop_reply_queue_length)
5572 (check_pending_events_prevent_wildcard_vcont)
5573 (discard_pending_stop_replies_in_queue, stop_reply)
5574 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5575 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5576 (remote_interrupt_as, remote_interrupt_ns)
5577 (remote_get_noisy_reply, remote_query_attached)
5578 (remote_add_inferior, remote_current_thread, get_current_thread)
5579 (set_thread, set_general_thread, set_continue_thread)
5580 (set_general_process, write_ptid)
5581 (remote_unpack_thread_info_response, remote_get_threadinfo)
5582 (parse_threadlist_response, remote_get_threadlist)
5583 (remote_threadlist_iterator, remote_get_threads_with_ql)
5584 (remote_get_threads_with_qxfer)
5585 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5586 (get_offsets, remote_check_symbols, remote_supported_packet)
5587 (remote_query_supported, remote_packet_size)
5588 (remote_serial_quit_handler, remote_detach_pid)
5589 (remote_vcont_probe, remote_resume_with_hc)
5590 (send_interrupt_sequence, interrupt_query)
5591 (remote_notif_get_pending_events, fetch_register_using_p)
5592 (send_g_packet, process_g_packet, fetch_registers_using_g)
5593 (store_register_using_P, store_registers_using_G)
5594 (set_remote_traceframe, check_binary_download)
5595 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5596 (remote_xfer_live_readonly_partial, remote_read_bytes)
5597 (remote_send_printf, remote_flash_write, readchar)
5598 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5599 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5600 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5601 (extended_remote_disable_randomization, extended_remote_run)
5602 (send_environment_packet, extended_remote_environment_support)
5603 (extended_remote_set_inferior_cwd, remote_write_qxfer)
5604 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5605 (packet_command): Now methods of ...
5606 (remote_target): ... this class.
5607 (m_remote_state) <remote_target>: New field.
5608 (struct remote_state) <stop_reply_queue,
5609 remote_async_inferior_event_token, wait_forever_enabled_p>: New
5611 (remote_state::remote_state): Allocate stop_reply_queue.
5612 (remote_state): Delete global.
5613 (get_remote_state_raw): Delete.
5614 (remote_target::get_remote_state): Allocate m_remote_state on
5616 (get_current_remote_target): New.
5617 (remote_ops, extended_remote_ops): Delete.
5618 (wait_forever_enabled_p, remote_async_inferior_event_token):
5619 Delete, moved to struct remote_state.
5620 (remote_target::close): Delete self. Destruction bits split to
5622 (remote_target::~remote_target): ... this.
5623 (show_memory_packet_size): Adjust to use
5624 get_current_remote_target.
5625 (struct protocol_feature) <func>: Add remote_target parameter.
5626 All callers adjusted.
5627 (curr_quit_handler_target): New.
5628 (remote_serial_quit_handler): Reimplement.
5629 (remote_target::open_1): Adjust to use get_current_remote_target.
5630 Heap-allocate remote_target/extended_remote_target instances.
5631 (vcont_builder::vcont_builder): Add remote_target parameter, and
5632 save it in m_remote. All callers adjusted.
5633 (vcont_builder::m_remote): New field.
5634 (vcont_builder::restart, vcont_builder::flush)
5635 (vcont_builder::push_action): Use it.
5636 (remote_target::commit_resume): Use it.
5637 (struct queue_iter_param) <remote>: New field.
5638 (remote_target::remove_new_fork_children): Fill in 'remote' field.
5639 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5640 (check_pending_event_prevents_wildcard_vcont_callback)
5641 (remote_target::check_pending_events_prevent_wildcard_vcont)
5642 (remote_target::discard_pending_stop_replies)
5643 (remote_target::discard_pending_stop_replies_in_queue)
5644 (remote_target::remote_notif_remove_queued_reply): Fill in
5646 (remote_notif_get_pending_events): New.
5647 (remote_target::readchar, remote_target::remote_serial_write):
5648 Save/restore curr_quit_handler_target.
5650 (kill_new_fork_children): Fill in 'remote' field.
5651 (packet_command): Use get_current_remote_target, defer to
5652 remote_target method of same name.
5653 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5654 parameter, and save it in m_remote. All callers adjusted.
5655 (scoped_remote_fd::release): Use m_remote.
5656 (scoped_remote_fd::m_remote): New field.
5657 (remote_file_put, remote_file_get, remote_file_delete): Use
5658 get_current_remote_target, defer to remote_target method of same
5660 (remote_btrace_reset): Add remote_state paremeter. Update all
5662 (remote_async_inferior_event_handler). Pass down 'data'.
5663 (remote_new_objfile): Use get_current_remote_target.
5664 (remote_target::vcont_r_supported): New.
5665 (set_range_stepping): Use get_current_remote_target and
5666 remote_target::vcont_r_supported.
5667 (_initialize_remote): Don't allocate 'remote_state' and
5668 'stop_reply_queue' globals.
5669 * remote.h (struct remote_target): Forward declare.
5670 (getpkt, putpkt, remote_notif_get_pending_events): Add
5671 'remote_target' parameter.
5673 2018-05-22 Pedro Alves <palves@redhat.com>
5675 * remote.c (vcont_builder): Now a class. Make all data members
5677 (vcont_builder) <vcont_builder, restart, flush, push_action>:
5679 (vcont_builder_restart): Rename to ...
5680 (vcont_builder::restart): ... this.
5681 (vcont_builder_flush): Rename to ...
5682 (vcont_builder::flush): ... this.
5683 (vcont_builder_push_action): Rename to ...
5684 (vcont_builder::push_action): ... this.
5685 (remote_target::commit_resume): Adjust.
5687 2018-05-22 Pedro Alves <palves@redhat.com>
5689 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5690 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5691 (get_fixed_memory_packet_size): New.
5692 (get_memory_packet_size): Use it.
5693 (set_memory_packet_size): Don't override the config size with
5694 DEFAULT_MAX_MEMORY_PACKET_SIZE.
5695 (show_memory_packet_size): Use get_fixed_memory_packet_size.
5696 Don't refer to get_memory_packet_size if not connected to a remote
5697 target. Show "(default)" if configured size is 0.
5699 2018-05-22 Pedro Alves <palves@redhat.com>
5701 * remote.c (remote_target::mourn_inferior): Move
5702 discard_pending_stop_replies call here from ...
5703 (_initialize_remote): ... here.
5705 2018-05-22 Pedro Alves <palves@redhat.com>
5707 * remote.c (compare_section_command): Remove set_general_process
5710 2018-05-22 Pedro Alves <palves@redhat.com>
5712 * remote.c (struct packet_reg, struct remote_arch_state):
5713 Move higher up in the file.
5714 (remote_state) <m_arch_states>: Store remote_arch_state values
5715 instead of remote_arch_state pointers.
5716 (remote_state::get_remote_arch_state): Adjust.
5718 2018-05-22 Pedro Alves <palves@redhat.com>
5720 * remote.c: Include <unordered_map>.
5721 (remote_state): Now a class.
5722 (remote_state) <get_remote_arch_state>: Declare method.
5723 <get_remote_arch_state>: New field.
5724 (remote_arch_state) <remote_arch_state>: Declare ctor.
5725 <regs>: Now a unique_ptr.
5726 (remote_gdbarch_data_handle): Delete.
5727 (get_remote_arch_state): Delete.
5728 (remote_state::get_remote_arch_state): New.
5729 (get_remote_state): Adjust to call remote_state's
5730 get_remote_arch_state method.
5731 (init_remote_state): Delete, bits factored out to ...
5732 (remote_arch_state::remote_arch_state): ... this new method.
5733 (get_remote_packet_size, get_memory_packet_size)
5734 (process_g_packet, remote_target::fetch_registers)
5735 (remote_target::prepare_to_store, store_registers_using_G)
5736 (remote_target::store_registers, remote_target::get_trace_status):
5737 Adjust to call remote_state's method.
5738 (_initialize_remote): Remove reference to
5739 remote_gdbarch_data_handle.
5741 2018-05-22 Pedro Alves <palves@redhat.com>
5743 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5744 pread>: New method declarations.
5745 (remote_target::open_1): Adjust.
5746 (readahead_cache_invalidate): Rename to ...
5747 (readahead_cache::invalidate): ... this, and adjust to be a class
5749 (readahead_cache_invalidate_fd): Rename to ...
5750 (readahead_cache::invalidate_fd): ... this, and adjust to be a
5752 (remote_hostio_pwrite): Adjust.
5753 (remote_hostio_pread_from_cache): Rename to ...
5754 (readahead_cache::pread): ... this, and adjust to be a class
5756 (remote_hostio_close): Adjust.
5758 2018-05-22 Pedro Alves <palves@redhat.com>
5760 * remote.c (remote_hostio_close_cleanup): Delete.
5761 (class scoped_remote_fd): New.
5762 (remote_file_put, remote_file_get): Use it.
5764 2018-05-22 Pedro Alves <palves@redhat.com>
5766 (struct vCont_action_support): Use bool and initialize all fields.
5767 (struct readahead_cache): Initialize all fields.
5768 (remote_state): Use bool and initialize all fields.
5769 (remote_state::remote_state, remote_state::~remote_state): New.
5770 (new_remote_state): Delete.
5771 (_initialize_remote): Use new to allocate remote_state.
5773 2018-05-22 Pedro Alves <palves@redhat.com>
5777 * c-exp.y: Include "c-support.h".
5778 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5779 of tolower. Use c_ident_is_alpha to scan names.
5780 * c-lang.c: Include "c-support.h".
5781 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5782 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5783 * c-support.h: New file, with bits factored out from ...
5784 * cp-name-parser.y: ... this file.
5785 Include "c-support.h".
5786 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5787 c-support.h and renamed.
5788 (symbol_end, yylex): Adjust.
5790 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5792 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5793 parameter type to CORE_ADDR.
5794 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5795 parameter type in declaration to CORE_ADDR.
5796 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5797 target_auxv_search to get AT_HWCAP and use the result to get the
5799 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5800 to CORE_ADDR. Remove the cast of the return value to unsigned
5801 long. Fix error predicate of target_auxv_search.
5802 (ppc_linux_nat_target::read_description): Change the type of the
5803 hwcap variable to CORE_ADDR.
5805 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5807 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5808 if the size of fpscr is larger than 32 bits.
5810 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5812 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5813 (ppc32_linux_vsxregmap): New global.
5814 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5815 regcache_supply_regset, and regcache_collect_regset.
5816 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5817 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5818 (fetch_vsx_register, store_vsx_register): Remove.
5819 (fetch_vsx_registers): Add regno parameter. Get regset using
5820 ppc_linux_vsxregset. Use regset to supply registers.
5821 (store_vsx_registers): Add regno parameter. Get regset using
5822 ppc_linux_vsxregset. Use regset to collect registers.
5823 (fetch_register): Call fetch_vsx_registers instead of
5825 (store_register): Call store_vsx_registers instead of
5827 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5828 new regno parameter.
5829 (store_ppc_registers): Call store_vsx_registers with -1 for the
5830 new regno parameter.
5831 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5832 (ppc_collect_vsxregset): Remove.
5834 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5836 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5838 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5839 for vector register offset fields.
5840 (ppc64_fbsd_reg_offsets): Likewise.
5841 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5842 to vector register offset fields.
5843 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5844 to vector register offset fields.
5845 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5846 vector register offset fields.
5847 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5848 initializers for vector register offset fields.
5849 (rs6000_aix64_reg_offsets): Likewise.
5850 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5851 (ppc_supply_vrregset): Remove.
5852 (ppc_collect_vrregset): Remove.
5853 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5854 (ppc_linux_vrregset) : New function.
5855 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5856 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5857 (ppc32_linux_vrregset): Remove.
5858 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5859 and use result instead of ppc32_linux_vrregset.
5860 (ppc32_linux_reg_offsets): Remove initializers for vector register
5862 (ppc64_linux_reg_offsets): Likewise.
5863 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5864 * ppc-linux-nat.c: Include regset.h.
5865 (gdb_vrregset_t): Adjust comment to account for little-endian
5867 (supply_vrregset, fill_vrregset): Remove.
5868 (fetch_altivec_register, store_altivec_register): Remove.
5869 (fetch_altivec_registers): Add regno parameter. Get regset using
5870 ppc_linux_vrregset. Use regset to supply registers.
5871 (store_altivec_registers): Add regno parameter. Get regset using
5872 ppc_linux_vrregset. Use regset to collect registers.
5873 (fetch_register): Call fetch_altivec_registers instead of
5874 fetch_altivec_register.
5875 (store_register): Call store_altivec_registers instead of
5876 store_altivec_register.
5877 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5878 the new regno parameter.
5879 (store_ppc_registers): Call store_altivec_registers with -1 for
5880 the new regno parameter.
5882 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5884 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5885 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5886 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5887 (gdb_vrregset_t): Change array type size to
5888 PPC_LINUX_SIZEOF_VRREGSET.
5889 (gdb_vsxregset_t): Change array type size to
5890 PPC_LINUX_SIZEOF_VSXREGSET.
5891 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5892 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5893 PPC_LINUX_SIZEOF_VSXREGSET.
5895 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5897 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5898 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5900 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5901 ppc_linux_target_wordsize with tid.
5902 (ppc_linux_nat_target::read_description): Call ppc_linux_target
5904 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5905 (ppc64_64bit_inferior_p): Add static and inline specifiers.
5906 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5907 tid parameter. Remove static specifier.
5908 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5909 (ppc_linux_target_wordsize): New declaration.
5911 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5913 * arch/ppc-linux-common.c: New file.
5914 * arch/ppc-linux-common.h: New file.
5915 * arch/ppc-linux-tdesc.h: New file.
5916 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5917 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5918 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5919 arch/ppc-linux-tdesc.h.
5920 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5921 arch/ppc-linux-tdesc.h.
5922 (ppc_linux_nat_target::read_description): Remove target
5923 description matching code. Fill a ppc_linux_features struct and
5924 call ppc_linux_match_description with it. Move comment about ISA
5925 2.05 to ppc-linux-common.c.
5926 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5927 arch/ppc-linux-tdesc.h.
5928 (ppc_linux_core_read_description): Remove target description
5929 matching code. Fill a ppc_linux_features struct and call
5930 ppc_linux_match_description with it.
5931 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5932 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5933 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5934 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5935 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5936 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5937 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5938 (tdesc_powerpc_e500l): Remove.
5940 2018-05-22 Joel Brobecker <brobecker@adacore.com>
5942 * ada-lang.c (catch_assert_command): Pass empty string instead
5943 of NULL for excep_string argument.
5945 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5947 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5948 the width of the requested register exceeds the width of the
5951 2018-05-21 Tom Tromey <tom@tromey.com>
5953 * printcmd.c (output_command): Remove.
5954 (output_command_const): Rename to output_command.
5955 * valprint.h (output_command): Rename from output_command_const.
5956 * tracepoint.c (trace_dump_actions): Call output_command.
5958 2018-05-21 Tom Tromey <tom@tromey.com>
5960 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5961 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5962 * ada-lang.h (create_ada_exception_catchpoint): Update.
5963 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5965 (create_excep_cond_exprs, ~ada_catchpoint)
5966 (should_stop_exception, print_one_exception)
5967 (print_mention_exception, print_recreate_exception): Update.
5968 (ada_get_next_arg): Remove.
5969 (catch_ada_exception_command_split): Use std::string. Change type
5970 of "excep_string", "cond_string".
5971 (catch_ada_exception_command): Update.
5972 (create_ada_exception_catchpoint): Change type of excep_string.
5973 (ada_exception_sal): Remove excep_string parameter.
5974 (~ada_catchpoint): Remove.
5976 2018-05-21 Tom Tromey <tom@tromey.com>
5978 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5981 2018-05-21 Tom Tromey <tom@tromey.com>
5983 * ada-lang.c (ada_exception_message_1, ada_exception_message):
5984 Return unique_xmalloc_ptr.
5985 (print_it_exception): Update.
5987 2018-05-21 Tom Tromey <tom@tromey.com>
5989 * tracepoint.c (trace_dump_actions): Use std::string.
5991 2018-05-21 Tom Tromey <tom@tromey.com>
5993 * symfile.c (reread_symbols): Use std::string for original_name.
5995 2018-05-21 Tom Tromey <tom@tromey.com>
5997 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5998 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
6001 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
6003 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
6005 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
6006 * objfiles.c (get_objfile_bfd_data): Allocate
6007 objfile_per_bfd_storage with obstack_new when allocating on
6010 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
6012 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
6014 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
6015 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
6016 * mdebugread.c (mdebug_build_psymtabs): Likewise.
6017 (add_pending): Likewise.
6018 (parse_symbol): Likewise.
6019 (parse_partial_symbols): Likewise.
6020 (psymtab_to_symtab_1): Likewise.
6021 (new_psymtab): Likewise.
6022 (elfmdebug_build_psymtabs): Likewise.
6023 * minsyms.c (terminate_minimal_symbol_table): Likewise.
6024 * objfiles.c (get_objfile_bfd_data): Likewise.
6025 (objfile_register_static_link): Likewise.
6026 * psymtab.c (allocate_psymtab): Likewise.
6027 * stabsread.c (read_member_functions): Likewise.
6028 * xcoffread.c (xcoff_end_psymtab): Likewise.
6030 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
6032 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6033 compiler supports std::is_trivially_constructible.
6034 * common/poison.h: Include obstack.h.
6035 (IsMallocable): Define to is_trivially_constructible if the
6036 compiler supports it, define to true_type otherwise.
6040 (XOBNEWVEC): Redefine.
6041 * gdb_obstack.h (obstack_zalloc): New.
6042 (OBSTACK_ZALLOC): Redefine.
6043 (obstack_calloc): New.
6044 (OBSTACK_CALLOC): Redefine.
6046 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6047 (gdbarch_obstack): New declaration in gdbarch.h, definition in
6049 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6050 obstack_calloc/obstack_zalloc.
6051 (gdbarch_obstack_zalloc): Remove.
6052 * target-descriptions.c (tdesc_data_init): Use obstack_new.
6054 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6056 * stack.c (backtrace_command_1): Remove useless variable int i.
6058 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6060 * stack.c (print_frame_info): Fix comment.
6062 2018-05-18 Tom Tromey <tom@tromey.com>
6064 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6065 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6066 (~dwarf2_per_objfile): Update
6067 (dwarf2_get_dwz_file): Use new.
6068 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6071 2018-05-18 Tom Tromey <tom@tromey.com>
6073 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6075 * dwarf2read.c (struct dwp_file): Add constructor and
6077 (open_and_init_dwp_file): Return a unique_ptr.
6078 (dwarf2_per_objfile, create_dwp_hash_table)
6079 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6080 (lookup_dwo_unit_in_dwp): Update.
6081 (open_and_init_dwp_file, get_dwp_file): Update.
6083 2018-05-18 Tom Tromey <tom@tromey.com>
6085 * dwarf2read.c (dwarf2_per_objfile): Update.
6086 (struct mapped_index): Add initializers.
6087 (dwarf2_read_index): Use new.
6088 (dw2_symtab_iter_init): Update.
6089 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6092 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6094 * dwarf2read.c (mapped_index) <total_size>: Remove.
6096 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6098 * unittests/format_pieces-selftests.c (test_format_specifier):
6101 2018-05-18 Tom Tromey <tom@tromey.com>
6103 * c-typeprint.c (maybe_print_hole): New function.
6104 (c_print_type_struct_field_offset): Update.
6105 (c_type_print_base_struct_union): Call maybe_print_hole.
6107 2018-05-17 Keith Seitz <keiths@redhat.com>
6109 * breakpoint.c (build_bpstat_chain): New function, moved from
6111 (bpstat_stop_status): Add optional parameter, `stop_chain'.
6112 If no stop chain is passed, call build_bpstat_chain to build it.
6113 * breakpoint.h (build_bpstat_chain): Declare.
6114 (bpstat_stop_status): Move documentation here from breakpoint.c.
6115 * infrun.c (handle_signal_stop): Before eliding inlined frames,
6116 build the stop chain and pass it to skip_inline_frames.
6117 Pass this stop chain to bpstat_stop_status.
6118 * inline-frame.c: Include breakpoint.h.
6119 (stopped_by_user_bp_inline_frame): New function.
6120 (skip_inline_frames): Add parameter `stop_chain'.
6121 Move documention to inline-frame.h.
6122 If non-NULL, use stopped_by_user_bp_inline_frame to determine
6123 whether the frame should be elided.
6124 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6125 Add moved documentation and update for new parameter.
6127 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6130 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6131 unittests/format_pieces-selftests.c.
6132 * common/format.h (format_piece) <operator==>: New.
6133 (format_pieces) <operator[]>: Remove.
6134 * common/format.c (format_pieces::format_pieces): Handle \e.
6135 * unittests/format_pieces-selftests.c: New.
6137 2018-05-17 Tom Tromey <tom@tromey.com>
6140 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6141 (dw2_instantiate_symtab): Add skip_partial parameter.
6142 (dw2_find_last_source_symtab, dw2_map_expand_apply)
6143 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6144 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6145 (dw2_expand_symtabs_matching_one)
6146 (dw2_find_pc_sect_compunit_symtab)
6147 (dw2_debug_names_lookup_symbol)
6148 (dw2_debug_names_expand_symtabs_for_function): Update.
6149 (init_cutu_and_read_dies): Add skip_partial parameter.
6150 (process_psymtab_comp_unit, build_type_psymtabs_1)
6151 (process_skeletonless_type_unit, load_partial_comp_unit)
6152 (psymtab_to_symtab_1): Update.
6153 (load_full_comp_unit): Add skip_partial parameter.
6154 (process_imported_unit_die, dwarf2_read_addr_index)
6155 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6156 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6157 (read_signatured_type): Update.
6159 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6161 * value.c (release_value): Remove unused variable.
6162 (record_latest_value): Likewise.
6163 (access_value_history): Likewise.
6164 (preserve_values): Likewise.
6166 2018-05-17 Tom Tromey <tom@tromey.com>
6168 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6171 2018-05-16 Maciej W. Rozycki <macro@mips.com>
6174 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6175 Also handle registers whose width is not a multiple of
6177 (linux_nat_trad_target::store_register): Likewise.
6179 2018-05-16 Tom Tromey <tom@tromey.com>
6181 * gdbcore.h (core_bfd): Redefine.
6182 * corelow.c (core_target::close): Update.
6183 (core_target_open): Update.
6184 * progspace.h (struct program_space) <cbfd>: Now a
6187 2018-05-16 Tom Tromey <tom@tromey.com>
6190 * symfile-add-flags.h (enum symfile_add_flags)
6191 <SYMFILE_NOT_FILENAME>: New constant.
6192 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
6193 objfile name from BFD.
6194 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6195 * minidebug.c (find_separate_debug_file_in_section): Put
6196 ".gnu_debugdata" into BFD's file name.
6198 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
6200 * regcache.c (regcache_read_ftype, regcache_write_ftype):
6203 2018-05-15 Tamar Christina <tamar.christina@arm.com>
6206 * aarch64-tdep.c (aarch64_analyze_prologue,
6207 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6208 Indicate not interested in errors.
6210 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6212 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6213 Supply the MIPS_ZERO_REGNUM register.
6215 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6217 * mips-tdep.c (mask_address_var): Make variable static.
6219 2018-05-14 Tom Tromey <tom@tromey.com>
6221 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6223 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
6225 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6226 FXSAVE_ADDR for the mxcsr register.
6228 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
6230 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6232 2018-05-11 Pedro Alves <palves@redhat.com>
6234 * corelow.c (core_target) <core_target>: No longer inline.
6235 Initialize m_core_gdbarch, m_core_vec and build the section table
6237 <~core_target>: New.
6238 <core_gdbarch, get_core_register_section>: New methods.
6239 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6240 factored out from ...
6241 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6243 (sniff_core_bfd): Add gdbarch parameter.
6244 (core_close): Delete, merged into ...
6245 (core_target::close): ... here. Delete self.
6246 (core_close_cleanup): Delete.
6247 (core_target_open): Allocate a core_target on the heap. Use a
6248 unique_ptr instead of a cleanup. Bits moved into the core_target
6249 ctor. Adjust to use core_target methods instead of globals.
6250 (get_core_register_section): Rename to ...
6251 (core_target::get_core_register_section): ... this and adjust.
6252 (struct get_core_registers_cb_data): New.
6253 (get_core_registers_cb): Use it. Use bool.
6254 (core_target::fetch_registers, core_target::files_info)
6255 (core_target::xfer_partial, core_target::read_description)
6256 (core_target::pid_to, core_target::thread_name): Adjust to
6257 reference class fields instead of globals.
6258 * target.h (struct target_ops_deleter, target_ops_up): New.
6260 2018-05-11 Pedro Alves <palves@redhat.com>
6262 * corefile.c (core_file_command): Move to corelow.c.
6263 * corelow.c (the_core_target): Delete.
6264 (core_file_command): Moved from corefile.c. Check exec_bfd
6265 instead of the_core_target. Use target_detach instead of calling
6266 into the_core_target directly.
6267 (maybe_say_no_core_file_now): New.
6268 (core_target::detach): Use it.
6269 (_initialize_corelow): Remove references to the_core_target.
6270 * gdbcore.h (the_core_target): Delete.
6272 2018-05-11 Tom Tromey <tromey@redhat.com>
6273 Pedro Alves <palves@redhat.com>
6275 * corefile.c (core_bfd): Remove.
6276 * gdbcore.h (core_bfd): Now a macro.
6277 * progspace.h (struct program_space) <cbfd>: New field.
6279 2018-05-11 Tom Tromey <tom@tromey.com>
6281 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6284 2018-05-10 Tom Tromey <tom@tromey.com>
6286 * configure: Rebuild.
6287 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6289 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6292 * regformats/regdat.sh: Adjust script, following the addition
6293 of the new expedite_regs parameter to init_target_desc.
6295 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
6298 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6299 set_gdbarch_significant_addr_bit.
6300 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6301 set_gdbarch_significant_addr_bit.
6302 * utils.c (address_significant): Update to sign extend addr.
6304 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
6306 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6307 (xtensa_linux_init_abi): Limit tdep->num_regs by
6308 tdep->num_nopriv_regs.
6309 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6310 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6313 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
6315 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6317 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
6319 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6320 (I387_MXCSR_INIT_VAL): New constant.
6321 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6322 buffer if it was supplied by the inferior.
6323 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6324 (i387_xsave_get_clear_bv): New function.
6325 (i387_supply_xsave): Only read x87 control registers from the
6326 xsave buffer if the feature is enabled, and the state will have
6327 been written, otherwise, provide a suitable default.
6328 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6329 including x87 control registers. Update control registers if they
6330 have changed from the default value, and mark features as enabled
6332 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6334 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6336 * spu-tdep.c (info_spu_event_command): Fix output formatting.
6338 2018-05-07 Tom Tromey <tom@tromey.com>
6340 * configure: Rebuild.
6341 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6343 2018-05-07 Tom Tromey <tom@tromey.com>
6346 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6347 bit. Use correct value for VDIV.
6349 2018-05-04 Tom Tromey <tom@tromey.com>
6351 * configure: Rebuild.
6352 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6354 2018-05-04 Tom Tromey <tom@tromey.com>
6356 * linux-record.c (record_linux_system_call) <case
6357 RECORD_SYS_RECVFROM>: Add "break".
6359 2018-05-04 Tom Tromey <tom@tromey.com>
6361 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6362 Add missing "break".
6363 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6364 Add missing "break".
6366 2018-05-04 Tom Tromey <tom@tromey.com>
6368 * rs6000-tdep.c (ppc_process_record_op4)
6369 (ppc_process_record_op63): Add fall-through comment.
6371 2018-05-04 Tom Tromey <tom@tromey.com>
6373 * i386-tdep.c (i386_process_record): Add fall-through comment.
6375 2018-05-04 Tom Tromey <tom@tromey.com>
6377 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6380 2018-05-04 Tom Tromey <tom@tromey.com>
6382 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6383 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6384 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6386 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6388 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6391 2018-05-04 Tom Tromey <tom@tromey.com>
6393 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6395 2018-05-04 Tom Tromey <tom@tromey.com>
6397 * s390-tdep.c (s390_process_record): Fix fall-through comments.
6398 * xcoffread.c (scan_xcoff_symtab): Move comment later.
6399 * symfile.c (section_is_mapped): Fix fall-through comment.
6400 * stabsread.c (define_symbol, read_member_functions): Fix
6401 fall-through comment.
6402 * s390-linux-tdep.c (s390_process_record): Fix fall-through
6404 * remote.c (remote_wait_as): Fix fall-through comment.
6405 * p-exp.y (yylex): Fix fall-through comment.
6406 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6408 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6409 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6410 * jv-exp.y (yylex): Fix fall-through comment.
6411 * go-exp.y (lex_one_token): Fix fall-through comment.
6412 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6413 fall-through comment.
6414 * f-exp.y (yylex): Fix fall-through comment.
6415 * dwarf2read.c (process_die): Fix fall-through comments.
6416 * dbxread.c (process_one_symbol): Fix fall-through comment.
6417 * d-exp.y (lex_one_token): Fix fall-through comment.
6418 * cp-name-parser.y (yylex): Fix fall-through comment.
6419 * coffread.c (coff_symtab_read): Fix fall-through comment.
6420 * c-exp.y (lex_one_token): Fix fall-through comment.
6421 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6423 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6426 2018-05-04 Tom Tromey <tom@tromey.com>
6429 * NEWS: Mention gdb.execute change.
6430 * gdbcmd.h (execute_control_command): Don't declare.
6431 * python/python.c (execute_gdb_command): Use read_command_lines_1,
6432 execute_control_commands, execute_control_commands_to_string.
6433 * cli/cli-script.h (execute_control_commands)
6434 (execute_control_commands_to_string): Declare.
6435 (execute_control_command): Add from_tty parameter.
6436 * cli/cli-script.c (execute_control_commands)
6437 (execute_control_commands_to_string): New functions.
6438 (execute_user_command): Use execute_control_commands.
6439 (execute_control_command_1): Add "from_tty" parameter. Update.
6440 (execute_control_command): Likewise.
6442 2018-05-04 Tom Tromey <tom@tromey.com>
6445 * NEWS: Mention that breakpoint commands are writable.
6446 * python/py-breakpoint.c (bppy_set_commands): New function.
6447 (breakpoint_object_getset) <"commands">: Use it.
6449 2018-05-04 Tom Tromey <tom@tromey.com>
6451 * tracepoint.c (actions_command): Update.
6452 * mi/mi-cmd-break.c (mi_command_line_array)
6453 (mi_command_line_array_cnt, mi_command_line_array_ptr)
6454 (mi_read_next_line): Remove.
6455 (mi_cmd_break_commands): Update.
6456 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6458 * cli/cli-script.c (get_command_line): Update.
6459 (process_next_line): Use function_view. Constify.
6460 (recurse_read_control_structure, read_command_lines)
6461 (read_command_lines_1): Change argument types to function_view.
6462 (do_define_command, document_command): Update.
6463 * breakpoint.h (check_tracepoint_command): Don't declare.
6464 * breakpoint.c (check_tracepoint_command): Remove.
6465 (commands_command_1, create_tracepoint_from_upload): Update.
6467 2018-05-04 Tom Tromey <tom@tromey.com>
6470 * cli/cli-script.h (enum command_control_type) <define_control>:
6472 * cli/cli-script.c (multi_line_command_p): Handle define_control.
6473 (build_command_line, execute_control_command_1)
6474 (process_next_line): Likewise.
6475 (do_define_command): New function, extracted from define_command.
6476 (define_command): Use it.
6478 2018-05-04 Tom Tromey <tom@tromey.com>
6480 * tracepoint.c (actions_command): Update.
6481 * cli/cli-script.h (read_command_lines): Update.
6482 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6483 (MAX_TMPBUF): Remove define.
6484 (define_command): Use string_printf.
6485 (document_command): Likewise.
6486 * breakpoint.c (commands_command_1): Update.
6488 2018-05-04 Tom Tromey <tom@tromey.com>
6490 * top.c (execute_command): Update.
6491 * cli/cli-script.h (print_command_lines): Now varargs.
6492 * cli/cli-script.c (print_command_lines): Now varargs.
6493 (execute_control_command_1) <case while_control, case if_control>:
6496 2018-05-04 Tom Tromey <tom@tromey.com>
6498 * tracepoint.c (all_tracepoint_actions): Rename from
6499 all_tracepoint_actions_and_cleanup. Change return type.
6500 (actions_command, encode_actions_1, encode_actions)
6501 (trace_dump_actions, tdump_command): Update.
6502 * remote.c (remote_download_command_source): Update.
6503 * python/python.c (gdbpy_eval_from_control_command)
6504 (python_command, python_interactive_command): Update.
6505 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6506 * guile/guile.c (guile_command)
6507 (gdbscm_eval_from_control_command, guile_command): Update.
6508 * compile/compile.c (compile_code_command)
6509 (compile_print_command, compile_to_object): Update.
6510 * cli/cli-script.h (struct command_lines_deleter): New.
6511 (counted_command_line): New typedef.
6512 (struct command_line): Add constructor, destructor.
6513 <body_list>: Remove.
6514 <body_list_0, body_list_1>: New members.
6515 (command_line_up): Remove typedef.
6516 (read_command_lines, read_command_lines_1, get_command_line):
6518 (copy_command_lines): Don't declare.
6519 * cli/cli-script.c (build_command_line): Use "new".
6520 (get_command_line): Return counted_command_line.
6521 (print_command_lines, execute_user_command)
6522 (execute_control_command_1, while_command, if_command): Update.
6523 (realloc_body_list): Remove.
6524 (process_next_line, recurse_read_control_structure): Update.
6525 (read_command_lines, read_command_lines_1): Return counted_command_line.
6526 (free_command_lines): Use "delete".
6527 (copy_command_lines): Remove.
6528 (define_command, document_command, show_user_1): Update.
6529 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6530 a counted_command_line.
6531 * breakpoint.h (counted_command_line): Remove typedef.
6532 (breakpoint_set_commands): Update.
6533 * breakpoint.c (check_no_tracepoint_commands)
6534 (validate_commands_for_breakpoint): Update.
6535 (breakpoint_set_commands): Change commands to be a
6536 counted_command_line.
6537 (commands_command_1, update_dprintf_command_list)
6538 (create_tracepoint_from_upload): Update.
6540 2018-05-04 Tom Tromey <tom@tromey.com>
6542 * cli/cli-decode.h (cmd_list_element): New constructor.
6543 (~cmd_list_element): New destructor.
6544 (struct cmd_list_element): Add initializers.
6545 * cli/cli-decode.c (do_add_cmd): Use "new".
6546 (delete_cmd): Use "delete".
6548 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6549 Pedro Alves <palves@redhat.com>
6551 PR breakpoints/19806 and support for PR external/20207.
6552 * NEWS: Mention Aarch64 watchpoint improvements.
6553 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6554 watchpoints and PR external/20207 watchpoints.
6555 * nat/aarch64-linux-hw-point.c
6556 (kernel_supports_any_contiguous_range): New.
6557 (aarch64_watchpoint_offset): New.
6558 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6559 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6560 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6561 (aarch64_align_watchpoint): New parameters aligned_offset_p and
6562 next_addr_orig_p. Support PR external/20207 watchpoints.
6563 (aarch64_downgrade_regs): New.
6564 (aarch64_dr_state_insert_one_point): New parameters offset and
6566 (aarch64_dr_state_remove_one_point): Likewise.
6567 (aarch64_handle_breakpoint): Update caller.
6568 (aarch64_handle_aligned_watchpoint): Likewise.
6569 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6571 (aarch64_linux_set_debug_regs): Remove const from state. Call
6572 aarch64_downgrade_regs.
6573 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6574 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6575 (DR_CONTROL_MASK): ... this.
6576 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6577 (unsigned int aarch64_watchpoint_offset): New prototype.
6578 (aarch64_linux_set_debug_regs): Remove const from state.
6579 * utils.c (align_up, align_down): Move to ...
6580 * common/common-utils.c (align_up, align_down): ... here.
6581 * utils.h (align_up, align_down): Move to ...
6582 * common/common-utils.h (align_up, align_down): ... here.
6584 2018-05-04 Joel Brobecker <brobecker@adacore.com>
6586 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6587 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6588 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6589 Re-implement to match the ABI as summarized in GCC's
6590 gcc/config/sparc/sparc.c. All callers updated.
6591 (sparc32_store_arguments): Remove assertion.
6593 2018-05-04 Tom Tromey <tom@tromey.com>
6595 * printcmd.c: Don't include tui.h.
6596 (decode_format): Use skip_spaces.
6598 2018-05-04 Tom Tromey <tom@tromey.com>
6601 * printcmd.c (last_count): New global.
6602 (x_command): Use saved count when repeating.
6604 2018-05-04 Tom Tromey <tom@tromey.com>
6606 * nto-procfs.c (do_closedir_cleanup): Remove.
6607 (procfs_pidlist): Use gdb_dir_up.
6608 * procfs.c (do_closedir_cleanup): Remove.
6609 (proc_update_threads): Use gdb_dir_up.
6610 * common/filestuff.h (struct gdb_dir_deleter): New.
6611 (gdb_dir_up): New typedef.
6613 2018-05-04 Tom Tromey <tom@tromey.com>
6615 * ada-lang.c (print_mention_exception): Use std::string.
6617 2018-05-04 Tom Tromey <tom@tromey.com>
6619 * ada-lang.c (create_excep_cond_exprs): Update.
6620 (ada_exception_catchpoint_cond_string): Use std::string.
6622 2018-05-04 Tom Tromey <tom@tromey.com>
6624 * ada-lang.c (xget_renaming_scope): Return std::string.
6625 (old_renaming_is_invisible): Update.
6627 2018-05-04 Tom Tromey <tom@tromey.com>
6629 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6630 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6632 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
6634 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6636 2018-05-04 Tom Tromey <tom@tromey.com>
6638 * remote.c (remote_query_supported_append): Change type.
6639 (remote_check_symbols): Update.
6641 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
6644 * configure.ac: Prepend libpython.
6645 * python/python-config.py: Likewise.
6646 * configure: Regenerate.
6648 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
6650 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6652 2018-05-03 Pedro Alves <palves@redhat.com>
6655 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6656 override. Write 'true' instead of '1'.
6657 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6660 2018-05-02 Pedro Alves <palves@redhat.com>
6662 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6663 add_inf_child_target.
6664 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6665 add_inf_child_target.
6666 * aix-thread.c (aix_thread_target_info): New.
6667 (aix_thread_target) <shortname, longname, doc>: Delete.
6669 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6670 add_inf_child_target.
6671 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6672 add_inf_child_target.
6673 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6674 add_inf_child_target.
6675 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6676 add_inf_child_target.
6677 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6678 add_inf_child_target.
6679 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6680 add_inf_child_target.
6681 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6682 add_inf_child_target.
6683 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6684 add_inf_child_target.
6685 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6686 add_inf_child_target.
6687 * bfd-target.c (target_bfd_target_info): New.
6688 (target_bfd) <shortname, longname, doc>: Delete.
6690 * bsd-kvm.c (bsd_kvm_target_info): New.
6691 (bsd_kvm_target) <shortname, longname, doc>: Delete.
6693 (bsd_kvm_target::open): Rename to ...
6694 (bsd_kvm_target_open): ... this. Adjust.
6695 * bsd-uthread.c (bsd_uthread_target_info): New.
6696 (bsd_uthread_target) <shortname, longname, doc>: Delete.
6698 * corefile.c (core_file_command): Adjust.
6699 * corelow.c (core_target_info): New.
6700 (core_target) <shortname, longname, doc>: Delete.
6702 (core_target::open): Rename to ...
6703 (core_target_open): ... this. Adjust.
6704 * ctf.c (ctf_target_info): New.
6705 (ctf_target) <shortname, longname, doc>: Delete.
6707 (ctf_target::open): Rename to ...
6708 (ctf_target_open): ... this.
6709 (_initialize_ctf): Adjust.
6710 * exec.c (exec_target_info): New.
6711 (exec_target) <shortname, longname, doc>: Delete.
6713 (exec_target::open): Rename to ...
6714 (exec_target_open): ... this.
6715 * gdbcore.h (core_target_open): Declare.
6716 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6717 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6718 add_inf_child_target.
6719 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6720 add_inf_child_target.
6721 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6722 add_inf_child_target.
6723 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6724 add_inf_child_target.
6725 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6726 add_inf_child_target.
6727 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6728 add_inf_child_target.
6729 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6730 add_inf_child_target.
6731 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6732 add_inf_child_target.
6733 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6734 add_inf_child_target.
6735 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6736 add_inf_child_target.
6737 * inf-child.c (inf_child_target_info): New.
6738 (inf_child_target::info): New.
6739 (inf_child_open_target): Remove 'target' parameter. Use
6740 get_native_target instead.
6741 (inf_child_target::open): Delete.
6742 (add_inf_child_target): New.
6743 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6746 (add_inf_child_target): Declare.
6747 (inf_child_open_target): Declare.
6748 * linux-thread-db.c (thread_db_target_info): New.
6749 (thread_db_target) <shortname, longname, doc>: Delete.
6751 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6752 add_inf_child_target.
6753 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6754 add_inf_child_target.
6755 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6756 add_inf_child_target.
6757 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6758 add_inf_child_target.
6759 * make-target-delegates (print_class): Adjust.
6760 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6761 add_inf_child_target.
6762 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6763 add_inf_child_target.
6764 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6765 add_inf_child_target.
6766 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6767 add_inf_child_target.
6768 * nto-procfs.c (nto_native_target_info): New.
6769 (nto_procfs_target_native) <shortname, longname, doc>:
6772 (nto_procfs_target_info): New.
6773 (nto_procfs_target_procfs) <shortname, longname, doc>:
6776 (init_procfs_targets): Adjust.
6777 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6778 add_inf_child_target.
6779 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6780 add_inf_child_target.
6781 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6782 add_inf_child_target.
6783 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6784 add_inf_child_target.
6785 * ravenscar-thread.c (ravenscar_target_info): New.
6786 (ravenscar_thread_target) <shortname, longname, doc>:
6789 * record-btrace.c (record_btrace_target_info):
6790 (record_btrace_target) <shortname, longname, doc>: Delete.
6792 (record_btrace_target::open): Rename to ...
6793 (record_btrace_target_open): ... this. Adjust.
6794 * record-full.c (record_longname, record_doc): New.
6795 (record_full_base_target) <shortname, longname, doc>: Delete.
6797 (record_full_target_info): New.
6798 (record_full_target): <shortname>: Delete.
6800 (record_full_core_open_1, record_full_open_1): Update comments.
6801 (record_full_base_target::open): Rename to ...
6802 (record_full_open): ... this.
6803 (cmd_record_full_restore): Update.
6804 (_initialize_record_full): Update.
6805 * remote-sim.c (remote_sim_target_info): New.
6806 (gdbsim_target) <shortname, longname, doc>: Delete.
6808 (gdbsim_target::open): Rename to ...
6809 (gdbsim_target_open): ... this.
6810 (_initialize_remote_sim): Adjust.
6811 * remote.c (remote_doc): New.
6812 (remote_target_info): New.
6813 (remote_target) <shortname, longname, doc>: Delete.
6815 (extended_remote_target_info): New.
6816 (extended_remote_target) <shortname, longname, doc>: Delete.
6818 (remote_target::open_1): Make static. Adjust.
6819 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6820 * s390-linux-nat.c (_initialize_s390_nat): Use
6821 add_inf_child_target.
6822 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6823 add_inf_child_target.
6824 * sol-thread.c (thread_db_target_info): New.
6825 (sol_thread_target) <shortname, longname, doc>: Delete.
6827 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6828 add_inf_child_target.
6829 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6830 add_inf_child_target.
6831 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6832 add_inf_child_target.
6833 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6834 add_inf_child_target.
6835 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6836 add_inf_child_target.
6837 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6838 add_inf_child_target.
6839 * spu-linux-nat.c (_initialize_spu_nat): Use
6840 add_inf_child_target.
6841 * spu-multiarch.c (spu_multiarch_target_info): New.
6842 (spu_multiarch_target) <shortname, longname, doc>: Delete.
6844 * target-delegates.c: Regenerate.
6845 * target.c: Include <unordered_map>.
6846 (target_ops_p): Delete.
6847 (DEF_VEC_P(target_ops_p)): Delete.
6848 (target_factories): New.
6849 (test_target_info): New.
6850 (test_target_ops::info): New.
6851 (open_target): Adjust to use target_factories.
6852 (add_target_with_completer): Rename to ...
6853 (add_target): ... this. Change prototype. Register target_info
6854 and open callback in target_factories. Register target_info in
6855 command context instead of target_ops.
6856 (add_target): Delete old implementation.
6857 (add_deprecated_target_alias): Change prototype. Adjust.
6858 (the_native_target): New.
6859 (set_native_target, get_native_target): New.
6860 (find_default_run_target): Use the_native_target.
6861 (find_attach_target, find_run_target): Simplify.
6862 (target_ops::open): Delete.
6863 (dummy_target_info): New.
6864 (dummy_target::shortname, dummy_target::longname)
6865 (dummy_target::doc): Delete.
6866 (dummy_target::info): New.
6867 (debug_target::shortname, debug_target::longname)
6868 (debug_target::doc): Delete.
6869 (debug_target::info): New.
6870 * target.h (struct target_info): New.
6871 (target_ops::~target_ops): Add comment.
6872 (target_ops::info): New.
6873 (target_ops::shortname, target_ops::longname, target_ops::doc): No
6874 longer virtual. Implement in terms of target_info.
6875 (set_native_target, get_native_target): Declare.
6876 (target_open_ftype): New.
6877 (add_target, add_target_with_completer)
6878 (add_deprecated_target_alias): Change prototype.
6879 (test_target) <shortname, longname, doc>: Delete.
6881 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6882 add_inf_child_target.
6883 * tracefile-tfile.c (tfile_target_info): New.
6884 (tfile_target) <shortname, longname, doc>: Delete.
6886 (tfile_target::open): Rename to ...
6887 (tfile_target_open): ... this.
6888 (_initialize_tracefile_tfile): Adjust.
6889 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6890 add_inf_child_target.
6891 * windows-nat.c (_initialize_windows_nat): Use
6892 add_inf_child_target.
6893 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6894 add_inf_child_target.
6896 2018-05-02 Pedro Alves <palves@redhat.com>
6898 * linux-nat.h (linux_nat_target) <low_new_thread,
6899 low_delete_thread, low_new_fork, low_forget_process,
6900 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6901 New virtual methods.
6902 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6903 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6904 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6905 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6906 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6908 * linux-fork.c (delete_fork): Adjust to call low method.
6909 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6910 (linux_nat_new_fork, linux_nat_forget_process_hook)
6911 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6912 (linux_nat_status_is_event):
6913 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6914 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6916 (sigtrap_is_event): Rename to ...
6917 (linux_nat_target::low_status_is_event): ... this.
6918 (linux_nat_set_status_is_event): Delete.
6919 (save_stop_reason, linux_nat_wait_1)
6920 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6922 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6923 (linux_nat_set_new_fork, linux_nat_set_forget_process)
6924 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6925 (linux_nat_set_prepare_to_resume): Delete.
6926 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6927 low virtual methods.
6928 * amd64-linux-nat.c: Likewise.
6929 * arm-linux-nat.c: Likewise.
6930 * i386-linux-nat.c: Likewise.
6931 * ia64-linux-nat.c: Likewise.
6932 * mips-linux-nat.c: Likewise.
6933 * ppc-linux-nat.c: Likewise.
6934 * s390-linux-nat.c: Likewise.
6935 * sparc64-linux-nat.c: Likewise.
6936 * x86-linux-nat.c: Likewise.
6937 * x86-linux-nat.h: Include "nat/x86-linux.h".
6938 (x86_linux_nat_target) <low_new_fork, low_forget_process,
6939 low_prepare_to_resume, low_new_thread, low_delete_thread>:
6942 2018-05-02 Pedro Alves <palves@redhat.com>
6944 * target.h (target_ops)
6945 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6946 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6947 stopped_by_watchpoint, have_continuable_watchpoint,
6948 stopped_data_address, watchpoint_addr_within_range,
6949 can_accel_watchpoint_condition, can_run, thread_alive,
6950 has_all_memory, has_memory, has_stack, has_registers,
6951 has_execution, can_async_p, is_async_p, supports_non_stop,
6952 always_non_stop_p, can_execute_reverse, supports_multi_process,
6953 supports_enable_disable_tracepoint,
6954 supports_disable_randomization, supports_string_tracing,
6955 supports_evaluation_of_breakpoint_conditions,
6956 can_run_breakpoint_commands, filesystem_is_local,
6957 can_download_tracepoint, get_trace_state_variable_value,
6958 set_trace_notes, get_tib_address, use_agent, can_use_agent,
6959 record_is_replaying, record_will_replay,
6960 augmented_libraries_svr4_read>: Adjust to return bool.
6961 * aarch64-linux-nat.c: All implementations adjusted.
6962 * aix-thread.c: All implementations adjusted.
6963 * arm-linux-nat.c: All implementations adjusted.
6964 * breakpoint.c: All implementations adjusted.
6965 * bsd-kvm.c: All implementations adjusted.
6966 * bsd-uthread.c: All implementations adjusted.
6967 * corelow.c: All implementations adjusted.
6968 * ctf.c: All implementations adjusted.
6969 * darwin-nat.c: All implementations adjusted.
6970 * darwin-nat.h: All implementations adjusted.
6971 * exec.c: All implementations adjusted.
6972 * fbsd-nat.c: All implementations adjusted.
6973 * fbsd-nat.h: All implementations adjusted.
6974 * gnu-nat.c: All implementations adjusted.
6975 * gnu-nat.h: All implementations adjusted.
6976 * go32-nat.c: All implementations adjusted.
6977 * ia64-linux-nat.c: All implementations adjusted.
6978 * inf-child.c: All implementations adjusted.
6979 * inf-child.h: All implementations adjusted.
6980 * inf-ptrace.c: All implementations adjusted.
6981 * inf-ptrace.h: All implementations adjusted.
6982 * linux-nat.c: All implementations adjusted.
6983 * linux-nat.h: All implementations adjusted.
6984 * mips-linux-nat.c: All implementations adjusted.
6985 * nto-procfs.c: All implementations adjusted.
6986 * ppc-linux-nat.c: All implementations adjusted.
6987 * procfs.c: All implementations adjusted.
6988 * ravenscar-thread.c: All implementations adjusted.
6989 * record-btrace.c: All implementations adjusted.
6990 * record-full.c: All implementations adjusted.
6991 * remote-sim.c: All implementations adjusted.
6992 * remote.c: All implementations adjusted.
6993 * s390-linux-nat.c: All implementations adjusted.
6994 * sol-thread.c: All implementations adjusted.
6995 * spu-multiarch.c: All implementations adjusted.
6996 * target-delegates.c: All implementations adjusted.
6997 * target.c: All implementations adjusted.
6998 * target.h: All implementations adjusted.
6999 * tracefile-tfile.c: All implementations adjusted.
7000 * tracefile.c: All implementations adjusted.
7001 * tracefile.h: All implementations adjusted.
7002 * windows-nat.c: All implementations adjusted.
7003 * x86-linux-nat.h: All implementations adjusted.
7004 * x86-nat.h: All implementations adjusted.
7006 2018-05-02 Pedro Alves <palves@redhat.com>
7008 * make-target-delegates (scan_target_h): Don't trim lines here.
7009 Replace sequences of tabs and/or whitespace with a single
7011 (top level, parsing methods): Trim each line before processing it
7014 2018-05-02 Pedro Alves <palves@redhat.com>
7015 John Baldwin <jhb@freebsd.org>
7017 * target.h (enum strata) <debug_stratum>: New.
7018 (struct target_ops) <all delegation methods>: Replace by C++
7019 virtual methods, and drop "to_" prefix. All references updated
7021 <to_shortname, to_longname, to_doc, to_data,
7022 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
7023 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
7024 virtual methods. All references updated throughout.
7025 <can_attach, supports_terminal_ours, can_create_inferior,
7026 get_thread_control_capabilities, attach_no_wait>: New
7028 <insert_breakpoint, remove_breakpoint>: Now
7029 TARGET_DEFAULT_NORETURN methods.
7030 <info_proc>: Now returns bool.
7032 (OPS_MAGIC): Delete.
7033 (current_target): Delete. All references replaced by references
7035 (target_stack): ... this. New.
7036 (target_shortname, target_longname): Adjust.
7037 (target_can_run): Now a function declaration.
7038 (default_child_has_all_memory, default_child_has_memory)
7039 (default_child_has_stack, default_child_has_registers)
7040 (default_child_has_execution): Remove target_ops parameter.
7041 (complete_target_initialization): Delete.
7042 (memory_breakpoint_target): New template class.
7043 (test_target_ops): Refactor as a C++ class with virtual methods.
7044 * make-target-delegates (NAME_PART): Tighten.
7045 (POINTER_PART, CP_SYMBOL): New.
7046 (SIMPLE_RETURN_PART): Reimplement.
7047 (VEC_RETURN_PART): Expect less.
7048 (RETURN_PART, VIRTUAL_PART): New.
7049 (METHOD): Adjust to C++ virtual methods.
7050 (scan_target_h): Remove reference to C99.
7051 (dname): Output "target_ops::" prefix.
7052 (write_function_header): Adjust to output a C++ class method.
7053 (write_declaration): New.
7054 (write_delegator): Adjust to output a C++ class method.
7055 (tdname): Output "dummy_target::" prefix.
7056 (write_tdefault, write_debugmethod): Adjust to output a C++ class
7058 (tdefault_names, debug_names): Delete.
7059 (return_types, tdefaults, styles, argtypes_array): New.
7060 (top level): All methods are delegators.
7062 (top level): Print dummy_target and debug_target classes.
7063 * target-delegates.c: Regenerate.
7064 * target-debug.h (target_debug_print_enum_info_proc_what)
7065 (target_debug_print_thread_control_capabilities)
7066 (target_debug_print_thread_info_p): New.
7067 * target.c (dummy_target): Delete.
7068 (the_dummy_target, the_debug_target): New.
7069 (target_stack): Now extern.
7070 (set_targetdebug): Push/unpush debug target.
7071 (default_child_has_all_memory, default_child_has_memory)
7072 (default_child_has_stack, default_child_has_registers)
7073 (default_child_has_execution): Remove target_ops parameter.
7074 (complete_target_initialization): Delete.
7075 (add_target_with_completer): No longer call
7076 complete_target_initialization.
7077 (target_supports_terminal_ours): Use regular delegation.
7078 (update_current_target): Delete.
7079 (push_target): No longer check magic number. Don't call
7080 update_current_target.
7081 (unpush_target): Don't call update_current_target.
7082 (target_is_pushed): No longer check magic number.
7083 (target_require_runnable): Skip for all stratums over
7085 (target_ops::info_proc): New.
7086 (target_info_proc): Use find_target_at and
7087 find_default_run_target.
7088 (target_supports_disable_randomization): Use regular delegation.
7089 (target_get_osdata): Use find_target_at.
7090 (target_ops::open, target_ops::close, target_ops::can_attach)
7091 (target_ops::attach, target_ops::can_create_inferior)
7092 (target_ops::create_inferior, target_ops::can_run)
7093 (target_can_run): New.
7094 (default_fileio_target): Use regular delegation.
7095 (target_ops::fileio_open, target_ops::fileio_pwrite)
7096 (target_ops::fileio_pread, target_ops::fileio_fstat)
7097 (target_ops::fileio_close, target_ops::fileio_unlink)
7098 (target_ops::fileio_readlink): New.
7099 (target_fileio_open_1, target_fileio_unlink)
7100 (target_fileio_readlink): Always call the target method. Handle
7102 (return_zero, return_zero_has_execution): Delete.
7103 (init_dummy_target): Delete.
7104 (dummy_target::dummy_target, dummy_target::shortname)
7105 (dummy_target::longname, dummy_target::doc)
7106 (debug_target::debug_target, debug_target::shortname)
7107 (debug_target::longname, debug_target::doc): New.
7108 (target_supports_delete_record): Use regular delegation.
7109 (setup_target_debug): Delete.
7110 (maintenance_print_target_stack): Skip debug_stratum.
7111 (initialize_targets): Instantiate the_dummy_target and
7113 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
7115 (target_auxv_search, fprint_target_auxv): Adjust.
7116 (info_auxv_command): Adjust to use target_stack.
7117 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7118 * exceptions.c (print_flush): Handle a NULL target_stack.
7119 * regcache.c (target_ops_no_register): Refactor as class with
7122 * exec.c (exec_target): New class.
7123 (exec_ops): Now an exec_target.
7124 (exec_open, exec_close_1, exec_get_section_table)
7125 (exec_xfer_partial, exec_files_info, exec_has_memory)
7126 (exec_make_note_section): Refactor as exec_target methods.
7127 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7129 (exec_target::find_memory_regions): New.
7130 (_initialize_exec): Don't call init_exec_ops.
7131 * gdbcore.h (exec_file_clear): Delete.
7133 * corefile.c (core_target): Delete.
7134 (core_file_command): Adjust.
7135 * corelow.c (core_target): New class.
7136 (the_core_target): New.
7137 (core_close): Remove target_ops parameter.
7138 (core_close_cleanup): Adjust.
7139 (core_target::close): New.
7140 (core_open, core_detach, get_core_registers, core_files_info)
7141 (core_xfer_partial, core_thread_alive, core_read_description)
7142 (core_pid_to_str, core_thread_name, core_has_memory)
7143 (core_has_stack, core_has_registers, core_info_proc): Rework as
7144 core_target methods.
7145 (ignore, core_remove_breakpoint, init_core_ops): Delete.
7146 (_initialize_corelow): Initialize the_core_target.
7147 * gdbcore.h (core_target): Delete.
7148 (the_core_target): New.
7150 * ctf.c: (ctf_target): New class.
7151 (ctf_ops): Now a ctf_target.
7152 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7153 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7154 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7156 (init_ctf_ops): Delete.
7157 (_initialize_ctf): Don't call it.
7158 * tracefile-tfile.c (tfile_target): New class.
7159 (tfile_ops): Now a tfile_target.
7160 (tfile_open, tfile_close, tfile_files_info)
7161 (tfile_get_tracepoint_status, tfile_trace_find)
7162 (tfile_fetch_registers, tfile_xfer_partial)
7163 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7164 Refactor as tfile_target methods.
7165 (tfile_xfer_partial_features): Remove target_ops parameter.
7166 (init_tfile_ops): Delete.
7167 (_initialize_tracefile_tfile): Don't call it.
7168 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7169 (tracefile_has_stack, tracefile_has_registers)
7170 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7171 tracefile_target methods.
7172 (init_tracefile_ops): Delete.
7173 (tracefile_target::tracefile_target): New.
7174 * tracefile.h: Include "target.h".
7175 (tracefile_target): New class.
7176 (init_tracefile_ops): Delete.
7178 * spu-multiarch.c (spu_multiarch_target): New class.
7179 (spu_ops): Now a spu_multiarch_target.
7180 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7181 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7182 (spu_search_memory, spu_mourn_inferior): Refactor as
7183 spu_multiarch_target methods.
7184 (init_spu_ops): Delete.
7185 (_initialize_spu_multiarch): Remove references to init_spu_ops,
7186 complete_target_initialization.
7188 * ravenscar-thread.c (ravenscar_thread_target): New class.
7189 (ravenscar_ops): Now a ravenscar_thread_target.
7190 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7191 (ravenscar_thread_alive, ravenscar_pid_to_str)
7192 (ravenscar_fetch_registers, ravenscar_store_registers)
7193 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7194 (ravenscar_stopped_by_hw_breakpoint)
7195 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7196 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7197 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7199 (init_ravenscar_thread_ops): Delete.
7200 (_initialize_ravenscar): Remove references to
7201 init_ravenscar_thread_ops and complete_target_initialization.
7203 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7204 (bsd_uthread_target): New class.
7205 (bsd_uthread_ops): Now a bsd_uthread_target.
7206 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7207 (bsd_uthread_close, bsd_uthread_mourn_inferior)
7208 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7209 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7210 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7211 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7212 (bsd_uthread_target): Delete function.
7213 (_initialize_bsd_uthread): Remove reference to
7214 complete_target_initialization.
7216 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
7217 (target_bfd): ... this new class.
7218 (target_bfd_xfer_partial, target_bfd_get_section_table)
7219 (target_bfd_close): Refactor as target_bfd methods.
7220 (target_bfd::~target_bfd): New.
7221 (target_bfd_reopen): Adjust.
7222 (target_bfd::close): New.
7224 * record-btrace.c (record_btrace_target): New class.
7225 (record_btrace_ops): Now a record_btrace_target.
7226 (record_btrace_open, record_btrace_stop_recording)
7227 (record_btrace_disconnect, record_btrace_close)
7228 (record_btrace_async, record_btrace_info)
7229 (record_btrace_insn_history, record_btrace_insn_history_range)
7230 (record_btrace_insn_history_from, record_btrace_call_history)
7231 (record_btrace_call_history_range)
7232 (record_btrace_call_history_from, record_btrace_record_method)
7233 (record_btrace_is_replaying, record_btrace_will_replay)
7234 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7235 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7236 (record_btrace_store_registers, record_btrace_prepare_to_store)
7237 (record_btrace_to_get_unwinder)
7238 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7239 (record_btrace_commit_resume, record_btrace_wait)
7240 (record_btrace_stop, record_btrace_can_execute_reverse)
7241 (record_btrace_stopped_by_sw_breakpoint)
7242 (record_btrace_supports_stopped_by_sw_breakpoint)
7243 (record_btrace_stopped_by_hw_breakpoint)
7244 (record_btrace_supports_stopped_by_hw_breakpoint)
7245 (record_btrace_update_thread_list, record_btrace_thread_alive)
7246 (record_btrace_goto_begin, record_btrace_goto_end)
7247 (record_btrace_goto, record_btrace_stop_replaying_all)
7248 (record_btrace_execution_direction)
7249 (record_btrace_prepare_to_generate_core)
7250 (record_btrace_done_generating_core): Refactor as
7251 record_btrace_target methods.
7252 (init_record_btrace_ops): Delete.
7253 (_initialize_record_btrace): Remove reference to
7254 init_record_btrace_ops.
7255 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7256 the execution_direction global.
7257 (record_full_base_target, record_full_target)
7258 (record_full_core_target): New classes.
7259 (record_full_ops): Now a record_full_target.
7260 (record_full_core_ops): Now a record_full_core_target.
7261 (record_full_target::detach, record_full_target::disconnect)
7262 (record_full_core_target::disconnect)
7263 (record_full_target::mourn_inferior, record_full_target::kill):
7265 (record_full_open, record_full_close, record_full_async): Refactor
7266 as methods of the record_full_base_target class.
7267 (record_full_resume, record_full_commit_resume): Refactor
7268 as methods of the record_full_target class.
7269 (record_full_wait, record_full_stopped_by_watchpoint)
7270 (record_full_stopped_data_address)
7271 (record_full_stopped_by_sw_breakpoint)
7272 (record_full_supports_stopped_by_sw_breakpoint)
7273 (record_full_stopped_by_hw_breakpoint)
7274 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7275 methods of the record_full_base_target class.
7276 (record_full_store_registers, record_full_xfer_partial)
7277 (record_full_insert_breakpoint, record_full_remove_breakpoint):
7278 Refactor as methods of the record_full_target class.
7279 (record_full_can_execute_reverse, record_full_get_bookmark)
7280 (record_full_goto_bookmark, record_full_execution_direction)
7281 (record_full_record_method, record_full_info, record_full_delete)
7282 (record_full_is_replaying, record_full_will_replay)
7283 (record_full_goto_begin, record_full_goto_end, record_full_goto)
7284 (record_full_stop_replaying): Refactor as methods of the
7285 record_full_base_target class.
7286 (record_full_core_resume, record_full_core_kill)
7287 (record_full_core_fetch_registers)
7288 (record_full_core_prepare_to_store)
7289 (record_full_core_store_registers, record_full_core_xfer_partial)
7290 (record_full_core_insert_breakpoint)
7291 (record_full_core_remove_breakpoint)
7292 (record_full_core_has_execution): Refactor
7293 as methods of the record_full_core_target class.
7294 (record_full_base_target::supports_delete_record): New.
7295 (init_record_full_ops): Delete.
7296 (init_record_full_core_ops): Delete.
7297 (record_full_save): Refactor as method of the
7298 record_full_base_target class.
7299 (_initialize_record_full): Remove references to
7300 init_record_full_ops and init_record_full_core_ops.
7302 * remote.c (remote_target, extended_remote_target): New classes.
7303 (remote_ops): Now a remote_target.
7304 (extended_remote_ops): Now an extended_remote_target.
7305 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7306 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7307 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7308 (remote_pass_signals, remote_set_syscall_catchpoint)
7309 (remote_program_signals, )
7310 (remote_thread_always_alive): Remove target_ops parameter.
7311 (remote_thread_alive, remote_thread_name)
7312 (remote_update_thread_list, remote_threads_extra_info)
7313 (remote_static_tracepoint_marker_at)
7314 (remote_static_tracepoint_markers_by_strid)
7315 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7316 (remote_open): Refactor as methods of remote_target.
7317 (extended_remote_open, extended_remote_detach)
7318 (extended_remote_attach, extended_remote_post_attach):
7319 (extended_remote_supports_disable_randomization)
7320 (extended_remote_create_inferior): : Refactor as method of
7321 extended_remote_target.
7322 (remote_set_permissions, remote_open_1, remote_detach)
7323 (remote_follow_fork, remote_follow_exec, remote_disconnect)
7324 (remote_resume, remote_commit_resume, remote_stop)
7325 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7326 (remote_terminal_ours, remote_wait, remote_fetch_registers)
7327 (remote_prepare_to_store, remote_store_registers)
7328 (remote_flash_erase, remote_flash_done, remote_files_info)
7329 (remote_kill, remote_mourn, remote_insert_breakpoint)
7330 (remote_remove_breakpoint, remote_insert_watchpoint)
7331 (remote_watchpoint_addr_within_range)
7332 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7333 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7334 (remote_supports_stopped_by_sw_breakpoint)
7335 (remote_stopped_by_hw_breakpoint)
7336 (remote_supports_stopped_by_hw_breakpoint)
7337 (remote_stopped_by_watchpoint, remote_stopped_data_address)
7338 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7339 (remote_verify_memory): Refactor as methods of remote_target.
7340 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7342 (remote_xfer_partial, remote_get_memory_xfer_limit)
7343 (remote_search_memory, remote_rcmd, remote_memory_map)
7344 (remote_pid_to_str, remote_get_thread_local_address)
7345 (remote_get_tib_address, remote_read_description): Refactor as
7346 methods of remote_target.
7347 (remote_target::fileio_open, remote_target::fileio_pwrite)
7348 (remote_target::fileio_pread, remote_target::fileio_close): New.
7349 (remote_hostio_readlink, remote_hostio_fstat)
7350 (remote_filesystem_is_local, remote_can_execute_reverse)
7351 (remote_supports_non_stop, remote_supports_disable_randomization)
7352 (remote_supports_multi_process, remote_supports_cond_breakpoints)
7353 (remote_supports_enable_disable_tracepoint)
7354 (remote_supports_string_tracing)
7355 (remote_can_run_breakpoint_commands, remote_trace_init)
7356 (remote_download_tracepoint, remote_can_download_tracepoint)
7357 (remote_download_trace_state_variable, remote_enable_tracepoint)
7358 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7359 (remote_trace_start, remote_get_trace_status)
7360 (remote_get_tracepoint_status, remote_trace_stop)
7361 (remote_trace_find, remote_get_trace_state_variable_value)
7362 (remote_save_trace_data, remote_get_raw_trace_data)
7363 (remote_set_disconnected_tracing, remote_core_of_thread)
7364 (remote_set_circular_trace_buffer, remote_traceframe_info)
7365 (remote_get_min_fast_tracepoint_insn_len)
7366 (remote_set_trace_buffer_size, remote_set_trace_notes)
7367 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7368 (remote_disable_btrace, remote_teardown_btrace)
7369 (remote_read_btrace, remote_btrace_conf)
7370 (remote_augmented_libraries_svr4_read, remote_load)
7371 (remote_pid_to_exec_file, remote_can_do_single_step)
7372 (remote_execution_direction, remote_thread_handle_to_thread_info):
7373 Refactor as methods of remote_target.
7374 (init_remote_ops, init_extended_remote_ops): Delete.
7375 (remote_can_async_p, remote_is_async_p, remote_async)
7376 (remote_thread_events, remote_upload_tracepoints)
7377 (remote_upload_trace_state_variables): Refactor as methods of
7379 (_initialize_remote): Remove references to init_remote_ops and
7380 init_extended_remote_ops.
7382 * remote-sim.c (gdbsim_target): New class.
7383 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7384 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7385 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7386 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7387 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7388 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7389 Refactor as methods of gdbsim_target.
7390 (gdbsim_ops): Now a gdbsim_target.
7391 (init_gdbsim_ops): Delete.
7392 (gdbsim_cntrl_c): Adjust.
7393 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7395 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7396 (the_amd64_linux_nat_target): New.
7397 (amd64_linux_fetch_inferior_registers)
7398 (amd64_linux_store_inferior_registers): Refactor as methods of
7399 amd64_linux_nat_target.
7400 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
7401 * i386-linux-nat.c: Don't include "linux-nat.h".
7402 (i386_linux_nat_target): New class.
7403 (the_i386_linux_nat_target): New.
7404 (i386_linux_fetch_inferior_registers)
7405 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7406 as methods of i386_linux_nat_target.
7407 (_initialize_i386_linux_nat): Adjust. Set linux_target.
7408 * inf-child.c (inf_child_ops): Delete.
7409 (inf_child_fetch_inferior_registers)
7410 (inf_child_store_inferior_registers): Delete.
7411 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7412 methods of inf_child_target.
7413 (inf_child_target::supports_terminal_ours)
7414 (inf_child_target::terminal_init)
7415 (inf_child_target::terminal_inferior)
7416 (inf_child_target::terminal_ours_for_output)
7417 (inf_child_target::terminal_ours, inf_child_target::interrupt)
7418 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7420 (inf_child_open, inf_child_disconnect, inf_child_close)
7421 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7422 (inf_child_post_startup_inferior, inf_child_can_run)
7423 (inf_child_pid_to_exec_file): Refactor as methods of
7425 (inf_child_follow_fork): Delete.
7426 (inf_child_target::can_create_inferior)
7427 (inf_child_target::can_attach): New.
7428 (inf_child_target::has_all_memory, inf_child_target::has_memory)
7429 (inf_child_target::has_stack, inf_child_target::has_registers)
7430 (inf_child_target::has_execution): New.
7431 (inf_child_fileio_open, inf_child_fileio_pwrite)
7432 (inf_child_fileio_pread, inf_child_fileio_fstat)
7433 (inf_child_fileio_close, inf_child_fileio_unlink)
7434 (inf_child_fileio_readlink, inf_child_use_agent)
7435 (inf_child_can_use_agent): Refactor as methods of
7437 (return_zero, inf_child_target): Delete.
7438 (inf_child_target::inf_child_target): New.
7439 * inf-child.h: Include "target.h".
7440 (inf_child_target): Delete function prototype.
7441 (inf_child_target): New class.
7442 (inf_child_open_target, inf_child_mourn_inferior)
7443 (inf_child_maybe_unpush_target): Delete.
7444 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7445 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7446 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7447 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7448 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7449 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7450 (inf_ptrace_wait, inf_ptrace_xfer_partial)
7451 (inf_ptrace_thread_alive, inf_ptrace_files_info)
7452 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7453 methods of inf_ptrace_target.
7454 (inf_ptrace_target): Delete function.
7455 * inf-ptrace.h: Include "inf-child.h".
7456 (inf_ptrace_target): Delete function declaration.
7457 (inf_ptrace_target): New class.
7458 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7459 * linux-nat.c (linux_target): New.
7460 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7461 (linux_nat_target::~linux_nat_target): New.
7462 (linux_child_post_attach, linux_child_post_startup_inferior)
7463 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7464 (linux_child_remove_fork_catchpoint)
7465 (linux_child_insert_vfork_catchpoint)
7466 (linux_child_remove_vfork_catchpoint)
7467 (linux_child_insert_exec_catchpoint)
7468 (linux_child_remove_exec_catchpoint)
7469 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7470 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7471 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7472 (linux_nat_stopped_data_address)
7473 (linux_nat_stopped_by_sw_breakpoint)
7474 (linux_nat_supports_stopped_by_sw_breakpoint)
7475 (linux_nat_stopped_by_hw_breakpoint)
7476 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7477 (linux_nat_kill, linux_nat_mourn_inferior)
7478 (linux_nat_xfer_partial, linux_nat_thread_alive)
7479 (linux_nat_update_thread_list, linux_nat_pid_to_str)
7480 (linux_nat_thread_name, linux_child_pid_to_exec_file)
7481 (linux_child_static_tracepoint_markers_by_strid)
7482 (linux_nat_is_async_p, linux_nat_can_async_p)
7483 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7484 (linux_nat_supports_multi_process)
7485 (linux_nat_supports_disable_randomization, linux_nat_async)
7486 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7487 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7488 (linux_nat_fileio_open, linux_nat_fileio_readlink)
7489 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7490 methods of linux_nat_target.
7491 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7492 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7494 (check_stopped_by_watchpoint): Adjust.
7495 (linux_xfer_partial): Delete.
7496 (linux_target_install_ops, linux_target, linux_nat_add_target):
7498 (linux_nat_target::linux_nat_target): New.
7499 * linux-nat.h: Include "inf-ptrace.h".
7500 (linux_nat_target): New.
7501 (linux_target, linux_target_install_ops, linux_nat_add_target):
7502 Delete function declarations.
7503 (linux_target): Declare global.
7504 * linux-thread-db.c (thread_db_target): New.
7505 (thread_db_target::thread_db_target): New.
7506 (thread_db_ops): Delete.
7507 (the_thread_db_target): New.
7508 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7509 (thread_db_update_thread_list, thread_db_pid_to_str)
7510 (thread_db_extra_thread_info)
7511 (thread_db_thread_handle_to_thread_info)
7512 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7513 (thread_db_resume): Refactor as methods of thread_db_target.
7514 (init_thread_db_ops): Delete.
7515 (_initialize_thread_db): Remove reference to init_thread_db_ops.
7516 * x86-linux-nat.c: Don't include "linux-nat.h".
7517 (super_post_startup_inferior): Delete.
7518 (x86_linux_nat_target::~x86_linux_nat_target): New.
7519 (x86_linux_child_post_startup_inferior)
7520 (x86_linux_read_description, x86_linux_enable_btrace)
7521 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7522 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7523 methods of x86_linux_nat_target.
7524 (x86_linux_create_target): Delete. Bits folded ...
7525 (x86_linux_add_target): ... here. Now takes a linux_nat_target
7527 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7528 (x86_linux_nat_target): New class.
7529 (x86_linux_create_target): Delete.
7530 (x86_linux_add_target): Now takes a linux_nat_target pointer.
7531 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7532 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7533 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7534 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7535 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7537 (x86_use_watchpoints): Delete.
7538 * x86-nat.h: Include "breakpoint.h" and "target.h".
7539 (x86_use_watchpoints): Delete.
7540 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7541 (x86_stopped_by_watchpoint, x86_stopped_data_address)
7542 (x86_insert_watchpoint, x86_remove_watchpoint)
7543 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7544 (x86_stopped_by_hw_breakpoint): New declarations.
7545 (x86_nat_target): New template class.
7547 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7548 (the_ppc_linux_nat_target): New.
7549 (ppc_linux_fetch_inferior_registers)
7550 (ppc_linux_can_use_hw_breakpoint)
7551 (ppc_linux_region_ok_for_hw_watchpoint)
7552 (ppc_linux_ranged_break_num_registers)
7553 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7554 (ppc_linux_insert_mask_watchpoint)
7555 (ppc_linux_remove_mask_watchpoint)
7556 (ppc_linux_can_accel_watchpoint_condition)
7557 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7558 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7559 (ppc_linux_watchpoint_addr_within_range)
7560 (ppc_linux_masked_watch_num_registers)
7561 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7562 (ppc_linux_read_description): Refactor as methods of
7563 ppc_linux_nat_target.
7564 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
7566 * procfs.c (procfs_xfer_partial): Delete forward declaration.
7567 (procfs_target): New class.
7568 (the_procfs_target): New.
7569 (procfs_target): Delete function.
7570 (procfs_auxv_parse, procfs_attach, procfs_detach)
7571 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7572 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7573 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7574 (procfs_create_inferior, procfs_update_thread_list)
7575 (procfs_thread_alive, procfs_pid_to_str)
7576 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7577 (procfs_stopped_data_address, procfs_insert_watchpoint)
7578 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7579 (proc_find_memory_regions, procfs_info_proc)
7580 (procfs_make_note_section): Refactor as methods of procfs_target.
7581 (_initialize_procfs): Adjust.
7582 * sol-thread.c (sol_thread_target): New class.
7583 (sol_thread_ops): Now a sol_thread_target.
7584 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7585 (sol_thread_fetch_registers, sol_thread_store_registers)
7586 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7587 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7588 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7589 (init_sol_thread_ops): Delete.
7590 (_initialize_sol_thread): Adjust. Remove references to
7591 init_sol_thread_ops and complete_target_initialization.
7593 * windows-nat.c (windows_nat_target): New class.
7594 (windows_fetch_inferior_registers)
7595 (windows_store_inferior_registers, windows_resume, windows_wait)
7596 (windows_attach, windows_detach, windows_pid_to_exec_file)
7597 (windows_files_info, windows_create_inferior)
7598 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7599 (windows_close, windows_pid_to_str, windows_xfer_partial)
7600 (windows_get_tib_address, windows_get_ada_task_ptid)
7601 (windows_thread_name, windows_thread_alive): Refactor as
7602 windows_nat_target methods.
7603 (do_initial_windows_stuff): Adjust.
7604 (windows_target): Delete function.
7605 (_initialize_windows_nat): Adjust.
7607 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7608 (darwin_mourn_inferior, darwin_kill_inferior)
7609 (darwin_create_inferior, darwin_attach, darwin_detach)
7610 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7611 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7612 (darwin_supports_multi_process): Refactor as darwin_nat_target
7614 (darwin_resume_to, darwin_files_info): Delete.
7615 (_initialize_darwin_inferior): Rename to ...
7616 (_initialize_darwin_nat): ... this. Adjust to C++ification.
7617 * darwin-nat.h: Include "inf-child.h".
7618 (darwin_nat_target): New class.
7619 (darwin_complete_target): Delete.
7620 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7621 (darwin_target): New.
7622 (i386_darwin_fetch_inferior_registers)
7623 (i386_darwin_store_inferior_registers): Refactor as methods of
7625 (darwin_complete_target): Delete, with ...
7626 (_initialize_i386_darwin_nat): ... bits factored out here.
7628 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7629 (the_alpha_linux_nat_target): New.
7630 (alpha_linux_register_u_offset): Refactor as
7631 alpha_linux_nat_target method.
7632 (_initialize_alpha_linux_nat): Adjust.
7633 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7634 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7635 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7636 methods of linux_nat_trad_target.
7637 (linux_trad_target): Delete.
7638 * linux-nat-trad.h (linux_trad_target): Delete function.
7639 (linux_nat_trad_target): New class.
7640 * mips-linux-nat.c (mips_linux_nat_target): New class.
7641 (super_fetch_registers, super_store_registers, super_close):
7643 (the_mips_linux_nat_target): New.
7644 (mips64_linux_regsets_fetch_registers)
7645 (mips64_linux_regsets_store_registers)
7646 (mips64_linux_fetch_registers, mips64_linux_store_registers)
7647 (mips_linux_register_u_offset, mips_linux_read_description)
7648 (mips_linux_can_use_hw_breakpoint)
7649 (mips_linux_stopped_by_watchpoint)
7650 (mips_linux_stopped_data_address)
7651 (mips_linux_region_ok_for_hw_watchpoint)
7652 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7653 (mips_linux_close): Refactor as methods of mips_linux_nat.
7654 (_initialize_mips_linux_nat): Adjust to C++ification.
7656 * aix-thread.c (aix_thread_target): New class.
7657 (aix_thread_ops): Now an aix_thread_target.
7658 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7659 (aix_thread_fetch_registers, aix_thread_store_registers)
7660 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7661 (aix_thread_thread_alive, aix_thread_pid_to_str)
7662 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7663 Refactor as methods of aix_thread_target.
7664 (init_aix_thread_ops): Delete.
7665 (_initialize_aix_thread): Remove references to init_aix_thread_ops
7666 and complete_target_initialization.
7667 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7668 (rs6000_nat_target): New class.
7669 (the_rs6000_nat_target): New.
7670 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7671 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7672 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7673 (super_create_inferior): Delete.
7674 (_initialize_rs6000_nat): Adjust to C++ification.
7676 * arm-linux-nat.c (arm_linux_nat_target): New class.
7677 (the_arm_linux_nat_target): New.
7678 (arm_linux_fetch_inferior_registers)
7679 (arm_linux_store_inferior_registers, arm_linux_read_description)
7680 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7681 (arm_linux_remove_hw_breakpoint)
7682 (arm_linux_region_ok_for_hw_watchpoint)
7683 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7684 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7685 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7686 arm_linux_nat_target.
7687 (_initialize_arm_linux_nat): Adjust to C++ification.
7689 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7690 (the_aarch64_linux_nat_target): New.
7691 (aarch64_linux_fetch_inferior_registers)
7692 (aarch64_linux_store_inferior_registers)
7693 (aarch64_linux_child_post_startup_inferior)
7694 (aarch64_linux_read_description)
7695 (aarch64_linux_can_use_hw_breakpoint)
7696 (aarch64_linux_insert_hw_breakpoint)
7697 (aarch64_linux_remove_hw_breakpoint)
7698 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7699 (aarch64_linux_region_ok_for_hw_watchpoint)
7700 (aarch64_linux_stopped_data_address)
7701 (aarch64_linux_stopped_by_watchpoint)
7702 (aarch64_linux_watchpoint_addr_within_range)
7703 (aarch64_linux_can_do_single_step): Refactor as methods of
7704 aarch64_linux_nat_target.
7705 (super_post_startup_inferior): Delete.
7706 (_initialize_aarch64_linux_nat): Adjust to C++ification.
7708 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7709 (the_hppa_linux_nat_target): New.
7710 (hppa_linux_fetch_inferior_registers)
7711 (hppa_linux_store_inferior_registers): Refactor as methods of
7712 hppa_linux_nat_target.
7713 (_initialize_hppa_linux_nat): Adjust to C++ification.
7715 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7716 (the_ia64_linux_nat_target): New.
7717 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7718 (ia64_linux_stopped_data_address)
7719 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7720 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7721 ia64_linux_nat_target methods.
7722 (super_xfer_partial): Delete.
7723 (_initialize_ia64_linux_nat): Adjust to C++ification.
7725 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7726 (the_m32r_linux_nat_target): New.
7727 (m32r_linux_fetch_inferior_registers)
7728 (m32r_linux_store_inferior_registers): Refactor as
7729 m32r_linux_nat_target methods.
7730 (_initialize_m32r_linux_nat): Adjust to C++ification.
7732 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7733 (the_m68k_linux_nat_target): New.
7734 (m68k_linux_fetch_inferior_registers)
7735 (m68k_linux_store_inferior_registers): Refactor as
7736 m68k_linux_nat_target methods.
7737 (_initialize_m68k_linux_nat): Adjust to C++ification.
7739 * s390-linux-nat.c (s390_linux_nat_target): New class.
7740 (the_s390_linux_nat_target): New.
7741 (s390_linux_fetch_inferior_registers)
7742 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7743 (s390_insert_watchpoint, s390_remove_watchpoint)
7744 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7745 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7746 (s390_auxv_parse, s390_read_description): Refactor as methods of
7747 s390_linux_nat_target.
7748 (_initialize_s390_nat): Adjust to C++ification.
7750 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7751 (the_sparc_linux_nat_target): New.
7752 (_initialize_sparc_linux_nat): Adjust to C++ification.
7753 * sparc-nat.c (sparc_fetch_inferior_registers)
7754 (sparc_store_inferior_registers): Remove target_ops parameter.
7755 * sparc-nat.h (sparc_fetch_inferior_registers)
7756 (sparc_store_inferior_registers): Remove target_ops parameter.
7757 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7758 (the_sparc64_linux_nat_target): New.
7759 (_initialize_sparc64_linux_nat): Adjust to C++ification.
7761 * spu-linux-nat.c (spu_linux_nat_target): New class.
7762 (the_spu_linux_nat_target): New.
7763 (spu_child_post_startup_inferior, spu_child_post_attach)
7764 (spu_child_wait, spu_fetch_inferior_registers)
7765 (spu_store_inferior_registers, spu_xfer_partial)
7766 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7768 (_initialize_spu_nat): Adjust to C++ification.
7770 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7771 (the_tilegx_linux_nat_target): New.
7772 (fetch_inferior_registers, store_inferior_registers):
7773 Refactor as methods.
7774 (_initialize_tile_linux_nat): Adjust to C++ification.
7776 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7777 (the_xtensa_linux_nat_target): New.
7778 (xtensa_linux_fetch_inferior_registers)
7779 (xtensa_linux_store_inferior_registers): Refactor as
7780 xtensa_linux_nat_target methods.
7781 (_initialize_xtensa_linux_nat): Adjust to C++ification.
7783 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7784 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7785 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7786 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7787 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7788 (fbsd_stopped_by_sw_breakpoint)
7789 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7790 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7791 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7792 (fbsd_post_startup_inferior, fbsd_post_attach)
7793 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7794 (fbsd_set_syscall_catchpoint)
7795 (super_xfer_partial, super_resume, super_wait)
7796 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7797 (fbsd_handle_debug_trap): Remove target_ops parameter.
7798 (fbsd_nat_add_target): Delete.
7799 * fbsd-nat.h: Include "inf-ptrace.h".
7800 (fbsd_nat_add_target): Delete.
7801 (USE_SIGTRAP_SIGINFO): Define.
7802 (fbsd_nat_target): New class.
7804 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7805 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7806 (amd64bsd_target): Delete.
7807 * amd64-bsd-nat.h: New file.
7808 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7810 (amd64_fbsd_nat_target): New class.
7811 (the_amd64_fbsd_nat_target): New.
7812 (amd64fbsd_read_description): Refactor as method of
7813 amd64_fbsd_nat_target.
7814 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7815 (_initialize_amd64fbsd_nat): Adjust to C++ification.
7816 * amd64-nat.h (amd64bsd_target): Delete function declaration.
7817 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7818 (i386bsd_store_inferior_registers): Remove target_ops parameter.
7819 (i386bsd_target): Delete.
7820 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7821 (i386bsd_fetch_inferior_registers)
7822 (i386bsd_store_inferior_registers): Declare.
7823 (i386_bsd_nat_target): New class.
7824 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7825 (the_i386_fbsd_nat_target): New.
7826 (i386fbsd_resume, i386fbsd_read_description): Refactor as
7827 i386_fbsd_nat_target methods.
7828 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7829 (_initialize_i386fbsd_nat): Adjust to C++ification.
7830 * x86-bsd-nat.c (super_mourn_inferior): Delete.
7831 (x86bsd_mourn_inferior, x86bsd_target): Delete.
7832 (_initialize_x86_bsd_nat): Adjust to C++ification.
7833 * x86-bsd-nat.h: Include "x86-nat.h".
7834 (x86bsd_target): Delete declaration.
7835 (x86bsd_nat_target): New class.
7837 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7838 (the_aarch64_fbsd_nat_target): New.
7839 (aarch64_fbsd_fetch_inferior_registers)
7840 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7841 aarch64_fbsd_nat_target.
7842 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7843 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7844 (the_alpha_bsd_nat_target): New.
7845 (alphabsd_fetch_inferior_registers)
7846 (alphabsd_store_inferior_registers): Refactor as
7847 alpha_bsd_nat_target methods.
7848 (_initialize_alphabsd_nat): Refactor as methods of
7849 alpha_bsd_nat_target.
7850 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7851 (the_amd64_nbsd_nat_target): New.
7852 (_initialize_amd64nbsd_nat): Adjust to C++ification.
7853 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7854 (the_amd64_obsd_nat_target): New.
7855 (_initialize_amd64obsd_nat): Adjust to C++ification.
7856 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7857 (the_arm_fbsd_nat_target): New.
7858 (arm_fbsd_fetch_inferior_registers)
7859 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7860 (_initialize_arm_fbsd_nat): Refactor as methods of
7861 arm_fbsd_nat_target.
7862 (_initialize_arm_fbsd_nat): Adjust to C++ification.
7863 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7864 (the_arm_netbsd_nat_target): New.
7865 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7866 arm_netbsd_nat_target.
7867 (_initialize_arm_netbsd_nat): Adjust to C++ification.
7868 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7869 (the_hppa_nbsd_nat_target): New.
7870 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7871 hppa_nbsd_nat_target methods.
7872 (_initialize_hppanbsd_nat): Adjust to C++ification.
7873 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7874 (the_hppa_obsd_nat_target): New.
7875 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7876 methods of hppa_obsd_nat_target.
7877 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
7879 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7880 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
7882 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7883 (_initialize_i386obsd_nat): Use add_target.
7884 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7885 (the_m68k_bsd_nat_target): New.
7886 (m68kbsd_fetch_inferior_registers)
7887 (m68kbsd_store_inferior_registers): Refactor as methods of
7888 m68k_bsd_nat_target.
7889 (_initialize_m68kbsd_nat): Adjust to C++ification.
7890 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7891 (the_mips_fbsd_nat_target): New.
7892 (mips_fbsd_fetch_inferior_registers)
7893 (mips_fbsd_store_inferior_registers): Refactor as methods of
7894 mips_fbsd_nat_target.
7895 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
7897 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7898 (the_mips_nbsd_nat_target): New.
7899 (mipsnbsd_fetch_inferior_registers)
7900 (mipsnbsd_store_inferior_registers): Refactor as methods of
7901 mips_nbsd_nat_target.
7902 (_initialize_mipsnbsd_nat): Adjust to C++ification.
7903 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7904 (the_mips64_obsd_nat_target): New.
7905 (mips64obsd_fetch_inferior_registers)
7906 (mips64obsd_store_inferior_registers): Refactor as methods of
7907 mips64_obsd_nat_target.
7908 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
7910 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7912 * nbsd-nat.h: Include "inf-ptrace.h".
7913 (nbsd_nat_target): New class.
7914 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7915 (obsd_wait): Refactor as methods of obsd_nat_target.
7916 (obsd_add_target): Delete.
7917 * obsd-nat.h: Include "inf-ptrace.h".
7918 (obsd_nat_target): New class.
7919 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7920 (the_ppc_fbsd_nat_target): New.
7921 (ppcfbsd_fetch_inferior_registers)
7922 (ppcfbsd_store_inferior_registers): Refactor as methods of
7923 ppc_fbsd_nat_target.
7924 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
7926 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7927 (the_ppc_nbsd_nat_target): New.
7928 (ppcnbsd_fetch_inferior_registers)
7929 (ppcnbsd_store_inferior_registers): Refactor as methods of
7930 ppc_nbsd_nat_target.
7931 (_initialize_ppcnbsd_nat): Adjust to C++ification.
7932 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7933 (the_ppc_obsd_nat_target): New.
7934 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7935 methods of ppc_obsd_nat_target.
7936 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
7938 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7939 (the_sh_nbsd_nat_target): New.
7940 (shnbsd_fetch_inferior_registers)
7941 (shnbsd_store_inferior_registers): Refactor as methods of
7943 (_initialize_shnbsd_nat): Adjust to C++ification.
7944 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7945 (inf_ptrace_xfer_partial): Delete.
7946 (sparc_xfer_partial, sparc_target): Delete.
7947 * sparc-nat.h (sparc_fetch_inferior_registers)
7948 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7949 (sparc_target): Delete function declaration.
7950 (sparc_target): New template class.
7951 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7952 (_initialize_sparcnbsd_nat): Adjust to C++ification.
7953 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7954 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
7956 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7957 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7958 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7959 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
7961 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7962 (the_vax_bsd_nat_target): New.
7963 (vaxbsd_fetch_inferior_registers)
7964 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7966 (_initialize_vaxbsd_nat): Adjust to C++ification.
7968 * bsd-kvm.c (bsd_kvm_target): New class.
7969 (bsd_kvm_ops): Now a bsd_kvm_target.
7970 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7971 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7972 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7974 (bsd_kvm_return_one): Delete.
7975 (bsd_kvm_add_target): Adjust to C++ification.
7977 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7978 (nto_procfs_target_procfs): New classes.
7979 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7980 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7981 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7982 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7983 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7984 (procfs_remove_hw_breakpoint, procfs_resume)
7985 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7986 (procfs_kill_inferior, procfs_store_registers)
7987 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7988 as methods of nto_procfs_target.
7989 (nto_procfs_ops): Now an nto_procfs_target_procfs.
7990 (nto_native_ops): Delete.
7991 (procfs_open, procfs_native_open): Delete.
7992 (nto_native_ops): Now an nto_procfs_target_native.
7993 (init_procfs_targets): Adjust to C++ification.
7994 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7995 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7996 Refactor as methods of nto_procfs_target.
7998 * go32-nat.c (go32_nat_target): New class.
7999 (the_go32_nat_target): New.
8000 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
8001 (go32_store_registers, go32_xfer_partial, go32_files_info)
8002 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
8003 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
8004 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
8005 (go32_pid_to_str): Refactor as methods of go32_nat_target.
8006 (go32_target): Delete.
8007 (_initialize_go32_nat): Adjust to C++ification.
8009 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
8010 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
8011 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
8012 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
8014 (gnu_target): Delete.
8015 * gnu-nat.h (gnu_target): Delete.
8016 (gnu_nat_target): New class.
8017 * i386-gnu-nat.c (gnu_base_target): New.
8018 (i386_gnu_nat_target): New class.
8019 (the_i386_gnu_nat_target): New.
8020 (_initialize_i386gnu_nat): Adjust to C++ification.
8022 2018-05-02 Pedro Alves <palves@redhat.com>
8024 * bfd-target.c (target_bfd_xclose): Rename to ...
8025 (target_bfd_close): ... this.
8026 (target_bfd_reopen): Adjust.
8027 * target.c (target_close): Remove references to to_xclose.
8028 * target.h (target_ops::to_xclose): Delete.
8029 (target_ops::to_close): Update comments.
8031 2018-05-02 Pedro Alves <palves@redhat.com>
8033 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8035 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8036 * inf-ptrace.c (inf_ptrace_register_u_offset)
8037 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8038 (inf_ptrace_store_register, inf_ptrace_store_registers)
8039 (inf_ptrace_trad_target): Move to ...
8040 * linux-nat-trad.c: ... this new file.
8041 * linux-nat-trad.h: New file.
8042 * linux-nat.c (linux_target_install_ops): Make extern.
8043 (linux_trad_target): Delete.
8044 * linux-nat.h (linux_trad_target): Delete declaration.
8045 (linux_target_install_ops): Declare.
8046 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8049 2018-05-02 Pedro Alves <palves@redhat.com>
8051 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8052 procfs_target/add_target here.
8053 * procfs.c (procfs_target): Make static.
8054 (_initialize_procfs): Call add_target here.
8055 * procfs.h (struct target_ops): Remove forward declaration.
8056 (procfs_target): Remove declaration.
8057 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8059 2018-05-02 Pedro Alves <palves@redhat.com>
8061 * procfs.c (procfs_stopped_by_watchpoint)
8062 (procfs_insert_watchpoint, procfs_remove_watchpoint)
8063 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8065 (procfs_use_watchpoints): Delete, move contents...
8066 (procfs_target): ... here.
8067 * procfs.h (procfs_use_watchpoints): Delete declaration.
8068 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8069 procfs_use_watchpoints.
8070 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8071 procfs_use_watchpoints.
8073 2018-05-02 Tom Tromey <tom@tromey.com>
8076 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8077 and var_zuinteger_unlimited.
8078 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8079 and PARAM_ZUINTEGER_UNLIMITED.
8080 (set_parameter_value): Handle var_zuinteger and
8081 var_zuinteger_unlimited.
8082 (add_setshow_generic): Likewise.
8083 (parmpy_init): Likewise.
8085 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
8088 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8089 pointer is not null before dereferencing it.
8091 2018-04-30 Tom Tromey <tom@tromey.com>
8093 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8096 2018-04-30 Tom Tromey <tom@tromey.com>
8098 * breakpoint.c (mention): Remove use of is_mi_like_p.
8099 (print_mention_ranged_breakpoint): Likewise.
8100 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8103 2018-04-30 Tom Tromey <tom@tromey.com>
8105 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8107 2018-04-30 Tom Tromey <tom@tromey.com>
8109 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8110 (info_spu_event_command): Remove some uses of is_mi_like_p.
8112 2018-04-30 Tom Tromey <tom@tromey.com>
8114 * python/py-framefilter.c (py_print_single_arg)
8115 (enumerate_locals, py_print_args, py_print_frame): Remove some
8116 uses of is_mi_like_p.
8118 2018-04-30 Tom Tromey <tom@tromey.com>
8121 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8122 * ui-out.h (ui_out::is_mi_like_p): Now const.
8123 (ui_out::do_is_mi_like_p): Now const.
8124 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8126 2018-04-30 Tom Tromey <tom@tromey.com>
8128 * varobj.c (varobj_set_visualizer): Use new_reference.
8129 * python/python.c (gdbpy_decode_line): Use new_reference.
8130 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8133 2018-04-30 Tom Tromey <tom@tromey.com>
8135 * varobj.c (install_new_value): Use new_reference.
8136 * value.h (value_incref): Return void. Swap intro comment with
8138 * value.c (set_value_parent): Use new_reference.
8139 (value_incref): Return void. Update intro comment.
8140 (release_value): Use new_reference.
8141 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8143 2018-04-30 Tom Tromey <tom@tromey.com>
8145 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8146 * gdb_bfd.h (new_bfd_ref): Remove.
8147 (gdb_bfd_open): Update comment.
8148 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8149 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8150 (gdb_bfd_fdopenr): Use new_reference.
8151 * exec.c (exec_file_attach): Use new_reference.
8153 2018-04-30 Tom Tromey <tom@tromey.com>
8155 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8158 2018-04-30 Tom Tromey <tom@tromey.com>
8160 * jit.c (jit_read_code_entry): Use type_align.
8161 * i386-tdep.c (i386_gdbarch_init): Don't call
8162 set_gdbarch_long_long_align_bit.
8163 * gdbarch.sh: Remove long_long_align_bit.
8164 * gdbarch.c, gdbarch.h: Rebuild.
8165 * arc-tdep.c (arc_type_align): New function.
8166 (arc_gdbarch_init): Use arc_type_align. Don't call
8167 set_gdbarch_long_long_align_bit.
8169 2018-04-30 Tom Tromey <tom@tromey.com>
8171 * rust-lang.c (rust_type_alignment): Remove.
8172 (rust_composite_type): Use type_align.
8174 2018-04-30 Tom Tromey <tom@tromey.com>
8176 * NEWS: Mention Type.align.
8177 * python/py-type.c (typy_get_alignof): New function.
8178 (type_object_getset): Add "alignof".
8180 2018-04-30 Tom Tromey <tom@tromey.com>
8184 * std-operator.def (UNOP_ALIGNOF): New operator.
8185 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8187 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8188 * c-lang.c (c_op_print_tab): Add alignof.
8189 * c-exp.y (ALIGNOF): New token.
8190 (exp): Add "ALIGNOF" production.
8191 (ident_tokens): Add _Alignof and alignof.
8193 2018-04-30 Tom Tromey <tom@tromey.com>
8195 * i386-tdep.c (i386_type_align): New function.
8196 (i386_gdbarch_init): Update.
8197 * gdbarch.sh (type_align): New method.
8198 * gdbarch.c, gdbarch.h: Rebuild.
8199 * arch-utils.h (default_type_align): Declare.
8200 * arch-utils.c (default_type_align): New function.
8201 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8202 (struct type) <align_log2>: New field.
8203 <instance_flags>: Now a bitfield.
8204 (TYPE_RAW_ALIGN): New macro.
8205 (type_align, type_raw_align, set_type_align): Declare.
8206 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8208 * dwarf2read.c (quirk_rust_enum): Set type alignment.
8209 (get_alignment, maybe_set_alignment): New functions.
8210 (read_structure_type, read_enumeration_type, read_array_type)
8211 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8212 (read_subrange_type, read_base_type): Set type alignment.
8214 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
8216 * dwarf2read.c (read_index_from_section): Use bool.
8218 2018-04-29 Fabian Groffen <grobian@gentoo.org>
8221 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8224 2018-04-29 John Reiser <jreiser@BitWagon.com>
8227 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8228 last step, and do it atomically.
8230 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
8232 * compile/compile-c-types.c (convert_int, convert_float):
8235 2018-04-27 Tom Tromey <tom@tromey.com>
8238 * rust-lang.c (rust_inclusive_range_type_p): New function.
8239 (rust_range): Handle inclusive ranges.
8240 (rust_compute_range): Likewise.
8241 * rust-exp.y (struct rust_op) <inclusive>: New field.
8242 (DOTDOTEQ): New constant.
8243 (range_expr): Add "..=" productions.
8244 (operator_tokens): Add "..=" token.
8245 (ast_range): Add "inclusive" parameter.
8246 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8248 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8250 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8251 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8253 * expprint.c (print_subexp_standard): Handle new bounds values.
8254 (dump_subexp_body_standard): Likewise.
8256 2018-04-27 Tom Tromey <tom@tromey.com>
8258 * configure: Rebuild.
8259 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8260 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8262 (class symbol_needs_eval_context): Likewise.
8263 * dwarf2read.c (mock_mapped_index::symbol_name_count)
8264 (mock_mapped_index::symbol_name_at): Use "override". Remove
8266 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8268 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8269 * aarch64-tdep.c (instruction_reader::read): Use "override".
8270 (instruction_reader_test::read): Likewise.
8271 * arm-tdep.c (instruction_reader::read): Use "override".
8272 (instruction_reader_thumb::read): Likewise.
8274 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
8277 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8278 instead of remote_send.
8279 (remote_send): Remove.
8281 2018-04-26 Pedro Alves <palves@redhat.com>
8283 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8284 find_function_start_sal instead of find_pc_line.
8286 2018-04-26 Pedro Alves <palves@redhat.com>
8288 * breakpoint.c (set_breakpoint_location_function): Handle
8290 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8291 * elfread.c (elf_symtab_read): Give data symbols with
8292 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8293 (elf_rel_plt_read): Update comment.
8294 * linespec.c (convert_linespec_to_sals): Handle
8296 (minsym_found): Handle mst_data_gnu_ifunc.
8297 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8298 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8299 * parse.c (find_minsym_type_and_address): Handle
8301 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8302 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8303 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8305 <mst_data_gnu_ifunc>: New enumerator.
8307 2018-04-26 Pedro Alves <palves@redhat.com>
8309 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8310 (lookup_minimal_symbol_by_pc_section): ... this. Replace
8311 'want_trampoline' parameter by a lookup_msym_prefer parameter.
8313 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8314 (lookup_minimal_symbol_by_pc): Adjust.
8315 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8316 (lookup_solib_trampoline_symbol_by_pc): Adjust.
8317 * minsyms.h (lookup_msym_prefer): New enum.
8318 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8319 parameter by a lookup_msym_prefer parameter.
8321 2018-04-26 Pedro Alves <palves@redhat.com>
8323 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8324 ends in "@plt" instead of looking at the symbol's section.
8326 2018-04-26 Pedro Alves <palves@redhat.com>
8328 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
8330 (find_pc_partial_function_gnu_ifunc): Rename to ...
8331 (find_pc_partial_function): ... this, and remove references to
8333 (find_pc_partial_function): Delete old implementation.
8334 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8336 2018-04-26 Pedro Alves <palves@redhat.com>
8338 * linespec.c (struct bound_minimal_symbol_search_key): New.
8339 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
8340 skip first line if we found a GNU ifunc minimal symbol by name.
8341 (compare_msymbols): Change parameters to work with a destructured
8343 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8346 2018-04-26 Pedro Alves <palves@redhat.com>
8348 * breakpoint.c (set_breakpoint_location_function): Don't resolve
8349 ifunc targets here. Instead, if we have an ifunc minsym, use its
8351 (add_location_to_breakpoint): Store the minsym and the objfile in
8352 the breakpoint location.
8353 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8354 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8355 Record the minsym in the sal.
8356 * symtab.h (symtab_and_line) <msymbol>: New field.
8358 2018-04-26 Pedro Alves <palves@redhat.com>
8360 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8361 unless we actually resolved the ifunc.
8363 2018-04-26 Pedro Alves <palves@redhat.com>
8365 * c-exp.y (variable production): Prefer ifunc minsyms over
8366 regular function symbols.
8367 * symtab.c (find_gnu_ifunc): New function.
8368 * minsyms.h (lookup_msym_prefer): New enum.
8369 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8370 parameter by a lookup_msym_prefer parameter.
8371 * symtab.h (find_gnu_ifunc): New declaration.
8373 2018-04-26 Pedro Alves <palves@redhat.com>
8375 * blockframe.c (find_gnu_ifunc_target_type): New function.
8376 (find_function_type): New.
8377 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8378 return a value with a memory address.
8379 (eval_call): For calls to GNU ifunc functions, try to find the
8380 type of the target function from the type that the resolver
8382 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8384 * infcall.c (find_function_return_type): Delete.
8385 (find_function_addr): Add 'function_type' parameter. For calls to
8386 GNU ifunc functions, try to find the type of the target function
8387 from the type that the resolver returns, and return it via
8389 (call_function_by_hand_dummy): Adjust to use the function type
8390 returned by find_function_addr.
8391 (find_function_addr): Add 'function_type' parameter and move
8393 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8396 2018-04-26 Pedro Alves <palves@redhat.com>
8398 * c-exp.y (variable production): Skip finding an alias for ifunc
8401 2018-04-26 Pedro Alves <palves@redhat.com>
8403 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8405 2018-04-25 Pedro Alves <palves@redhat.com>
8407 * infcmd.c (kill_command): Print the pid as string, not the whole
8408 thread's ptid. Add comment. s/has been killed/killed/ in output
8410 * remote.c (remote_detach_1): Print the pid as string, not the
8411 whole thread's ptid.
8413 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8414 Sergio Durigan Junior <sergiodj@redhat.com>
8415 Pedro Alves <palves@redhat.com>
8417 * infcmd.c (kill_command): Print message when inferior has
8419 * inferior.c (print_inferior_events): Remove 'static'. Set as
8421 (add_inferior): Improve message printed when
8422 'print_inferior_events' is on.
8423 (exit_inferior): Remove message printed when
8424 'print_inferior_events' is on.
8425 (detach_inferior): Improve message printed when
8426 'print_inferior_events' is on.
8427 (initialize_inferiors): Use 'add_inferior_silent' to set
8428 'current_inferior_'.
8429 * inferior.h (print_inferior_events): Declare here as
8431 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8432 '[Detaching...]' messages when 'print_inferior_events' is on.
8433 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
8434 as prefix/suffix for messages. Remove periods. Fix erroneous
8435 'Detaching after fork from child...', replace it by '... from
8437 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8438 prefix/suffix when printing 'Detaching...' messages. Print
8439 them when 'print_inferior_events' is on.
8440 * remote.c (remote_detach_1): Print message when detaching
8441 from inferior and '!is_fork_parent'.
8443 2018-04-24 Tom Tromey <tom@tromey.com>
8445 * cli-out.h: Reindent.
8447 2018-04-24 Tom Tromey <tom@tromey.com>
8449 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8450 (cli_ui_out::do_field_string): Use fputs_filtered.
8451 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8453 2018-04-23 Tom Tromey <tom@tromey.com>
8455 * guile/scm-frame.c (gdbscm_frame_read_var): Use
8456 gdb::unique_xmalloc_ptr.
8458 2018-04-23 Tom Tromey <tom@tromey.com>
8460 * configure: Rebuild.
8462 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
8465 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8466 prepare_for_testing. Set normal_bp to r_debug_state if target
8469 2018-04-21 Pedro Alves <palves@redhat.com>
8470 Rajendra SY <rajendra.sy@gmail.com>
8472 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8473 * remote.c (extended_remote_attach): In all-stop mode, mark the
8474 thread as executing.
8476 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8478 * thread.c (thread_apply_all_command): Fix comment.
8479 (thread_command): Fix comment.
8481 2018-04-10 Alan Hayward <alan.hayward@arm.com>
8483 * common/tdesc.h (tdesc_create_feature): Remove xml filename
8485 * features/aarch64-core.c (create_feature_aarch64_core):
8487 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8489 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8491 * features/i386/32bit-avx512.c
8492 (create_feature_i386_32bit_avx512): Likewise.
8493 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8495 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8497 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8499 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8501 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8503 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8505 * features/i386/64bit-avx512.c
8506 (create_feature_i386_64bit_avx512): Likewise.
8507 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8509 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8511 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8513 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8515 * features/i386/64bit-segments.c
8516 (create_feature_i386_64bit_segments): Likewise.
8517 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8519 * features/i386/x32-core.c
8520 (create_feature_i386_x32_core): Likewise.
8521 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8522 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8523 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8524 * target-descriptions.c: In generated code, don't pass xml
8527 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8529 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8530 (print_xml_feature::visit_post): Likewise.
8531 (print_xml_feature::visit): Likewise.
8532 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8533 (print_xml_feature): Add new class.
8534 * regformats/regdat.sh: Null xmltarget on feature targets.
8535 * target-descriptions.c (struct target_desc): Add xmltarget.
8536 (maintenance_check_tdesc_xml_convert): Add unittest function.
8537 (tdesc_get_features_xml): Add function to get xml.
8538 (maintenance_check_xml_descriptions): Test xml generation.
8539 * xml-tdesc.c (string_read_description_xml): Add function.
8540 * xml-tdesc.h (string_read_description_xml): Add declaration.
8542 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8544 * features/Makefile: Add feature marker to targets with new style
8545 target descriptions.
8546 * regformats/aarch64.dat: Regenerate.
8547 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8548 * regformats/i386/amd64-avx-linux.dat: Likewise.
8549 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8550 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8551 * regformats/i386/amd64-linux.dat: Likewise.
8552 * regformats/i386/amd64-mpx-linux.dat: Likewise.
8553 * regformats/i386/amd64.dat: Likewise.
8554 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8555 * regformats/i386/i386-avx-linux.dat: Likewise.
8556 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8557 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8558 * regformats/i386/i386-linux.dat: Likewise.
8559 * regformats/i386/i386-mmx-linux.dat: Likewise.
8560 * regformats/i386/i386-mpx-linux.dat: Likewise.
8561 * regformats/i386/i386.dat: Likewise.
8562 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8563 * regformats/i386/x32-avx-linux.dat: Likewise.
8564 * regformats/i386/x32-linux.dat: Likewise.
8565 * regformats/tic6x-c62x-linux.dat: Likewise.
8566 * regformats/tic6x-c64x-linux.dat: Likewise.
8567 * regformats/tic6x-c64xp-linux.dat: Likewise.
8568 * regformats/regdat.sh: Parse feature marker.
8570 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8572 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8573 (tdesc_osabi_name): Likewise.
8574 * target-descriptions.c (tdesc_architecture_name): Add new
8576 (tdesc_osabi_name): Likewise.
8578 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8580 * common/tdesc.c (tdesc_predefined_type): Move to here.
8581 (tdesc_named_type): Likewise.
8582 (tdesc_create_vector): Likewise.
8583 (tdesc_create_struct): Likewise.
8584 (tdesc_set_struct_size): Likewise.
8585 (tdesc_create_union): Likewise.
8586 (tdesc_create_flags): Likewise.
8587 (tdesc_create_enum): Likewise.
8588 (tdesc_add_field): Likewise.
8589 (tdesc_add_typed_bitfield): Likewise.
8590 (tdesc_add_bitfield): Likewise.
8591 (tdesc_add_flag): Likewise.
8592 (tdesc_add_enum_value): Likewise.
8593 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8594 (struct tdesc_type_vector): Likewise.
8595 (struct tdesc_type_field): Likewise.
8596 (struct tdesc_type_with_fields): Likewise.
8597 (tdesc_create_enum): Add declaration.
8598 (tdesc_add_typed_bitfield): Likewise.
8599 (tdesc_add_enum_value): Likewise.
8600 * target-descriptions.c (tdesc_type_field): Move from here.
8601 (tdesc_type_builtin): Likewise.
8602 (tdesc_type_vector): Likewise.
8603 (tdesc_type_with_fields): Likewise.
8604 (tdesc_predefined_types): Likewise.
8605 (tdesc_named_type): Likewise.
8606 (tdesc_create_vector): Likewise.
8607 (tdesc_create_struct): Likewise.
8608 (tdesc_set_struct_size): Likewise.
8609 (tdesc_create_union): Likewise.
8610 (tdesc_create_flags): Likewise.
8611 (tdesc_create_enum): Likewise.
8612 (tdesc_add_field): Likewise.
8613 (tdesc_add_typed_bitfield): Likewise.
8614 (tdesc_add_bitfield): Likewise.
8615 (tdesc_add_flag): Likewise.
8616 (tdesc_add_enum_value): Likewise.
8617 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8618 (tdesc_add_typed_bitfield): Likewise.
8619 (tdesc_add_enum_value): Likewise.
8621 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8623 * common/tdesc.c (tdesc_feature::accept): Move to here.
8624 (tdesc_feature::operator==): Likewise.
8625 (tdesc_create_reg): Likewise.
8626 * common/tdesc.h (tdesc_type_kind): Likewise.
8627 (struct tdesc_type): Likewise.
8628 (struct tdesc_feature): Likewise.
8629 * regformats/regdat.sh: Create a feature.
8630 * target-descriptions.c (tdesc_type_kind): Move from here.
8631 (tdesc_type): Likewise.
8632 (tdesc_type_up): Likewise.
8633 (tdesc_feature): Likewise.
8634 (tdesc_create_reg): Likewise.
8636 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8638 * Makefile.in: Add arch/tdesc.c
8639 * common/tdesc.c: New file.
8640 * common/tdesc.h (tdesc_element_visitor): Move to here.
8641 (tdesc_element): Likewise.
8642 (tdesc_reg): Likewise.
8643 (tdesc_reg_up): Likewise.
8644 * regformats/regdef.h (reg): Add offset to constructors.
8645 * target-descriptions.c (tdesc_element_visitor): Move from here.
8646 (tdesc_element): Likewise.
8647 (tdesc_reg): Likewise.
8648 (tdesc_reg_up): Likewise.
8650 2018-04-17 Tom Tromey <tom@tromey.com>
8652 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8655 2018-04-17 Tom Tromey <tom@tromey.com>
8657 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8659 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
8661 * symtab.c (print_symbol_info): Skip printing filename and line
8662 number when `last' is NULL.
8663 (symtab_symbol_info): Use empty string instead of NULL for first
8664 invocation of print_symbol_info.
8665 (rbreak_command): Pass NULL to `last' parameter of
8668 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
8670 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8673 2018-04-16 Pedro Alves <palves@redhat.com>
8675 * MAINTAINERS (sh): Remove.
8676 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8677 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8678 (ALLDEPFILES): Remove sh64-tdep.c.
8679 * NEWS: Mentions that support for SH-5/SH64 is removed.
8680 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8681 (sh*-*-openbsd*): Ditto.
8682 (sh64-*-elf*): Remove.
8684 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8685 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8686 * sh-tdep.c: No longer include "sh64-tdep.h".
8687 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8688 * sh64-tdep.c, sh64-tdep.h: Remove files.
8690 2018-04-16 Pedro Alves <palves@redhat.com>
8692 * MAINTAINERS: Remove m88k.
8693 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8694 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8695 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8696 * NEWS: Mention that support for m88k was removed.
8697 * configure.host (m88*-*-*): Remove support.
8698 * configure.nat (m88k-*-*): Remove support.
8699 * configure.tgt (m88*-*-openbsd*): Remove.
8700 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8702 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
8704 * configure.tgt (x86_tobjs): New variable.
8705 (amd64_tobjs, i386_tobjs): Use it.
8707 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8709 * symtab.c (print_symbol_info): Precede the symbol definition by
8710 the line number when available.
8711 * NEWS: Advertise this enhancement.
8713 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8715 * NEWS (New options): announce set/show record btrace cpu.
8716 * btrace.c: Include record-btrace.h.
8717 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8718 the vendor is unknown.
8719 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
8720 Maybe overwrite the btrace configuration's cpu.
8721 (btrace_compute_ftrace): Add cpu parameter. Update callers.
8722 (btrace_fetch): Add cpu parameter. Update callers.
8723 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8724 Maybe overwrite the btrace configuration's cpu. Skip enabling
8725 errata workarounds if the vendor is unknown.
8726 * python/py-record-btrace.c: Include record-btrace.h.
8727 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8728 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8729 * record-btrace.c (record_btrace_cpu_state_kind): New.
8730 (record_btrace_cpu): New.
8731 (set_record_btrace_cpu_cmdlist): New.
8732 (record_btrace_get_cpu): New.
8733 (require_btrace_thread, record_btrace_info)
8734 (record_btrace_resume_thread): Call record_btrace_get_cpu.
8735 (cmd_set_record_btrace_cpu_none): New.
8736 (cmd_set_record_btrace_cpu_auto): New.
8737 (cmd_set_record_btrace_cpu): New.
8738 (cmd_show_record_btrace_cpu): New.
8739 (_initialize_record_btrace): Initialize set/show record btrace cpu
8741 * record-btrace.h (record_btrace_get_cpu): New.
8743 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8745 * record.c (set_record_command): Fix typo in message.
8747 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8749 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8751 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8753 * infrun.c (process_event_stop_test): Call
8754 gdbarch_in_indirect_branch_thunk.
8755 * gdbarch.sh (in_indirect_branch_thunk): New.
8756 * gdbarch.c: Regenerated.
8757 * gdbarch.h: Regenerated.
8760 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8761 (HFILES_NO_SRCDIR): Add x86-tdep.h.
8762 (ALLDEPFILES): Add x86-tdep.c.
8763 * arch-utils.h (default_in_indirect_branch_thunk): New.
8764 * arch-utils.c (default_in_indirect_branch_thunk): New.
8765 * i386-tdep: Include x86-tdep.h.
8766 (i386_in_indirect_branch_thunk): New.
8767 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8769 * amd64-tdep: Include x86-tdep.h.
8770 (amd64_in_indirect_branch_thunk): New.
8771 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8773 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8776 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8777 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8778 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8781 2018-04-12 Tom Tromey <tom@tromey.com>
8783 * rust-lang.c (rust_print_struct_def): Remove univariant code.
8784 (rust_evaluate_subexp): Likewise.
8786 2018-04-12 Pedro Alves <palves@redhat.com>
8788 * procfs.c (procfs_detach): Make forward declaration's prototype
8789 match definition's protototype.
8790 (proc_get_LDT_entry): Remove stale do_cleanups call.
8792 2018-04-12 Pedro Alves <palves@redhat.com>
8794 * target.h (target_ops::to_has_exited): Delete.
8795 (target_has_exited): Delete.
8796 * target-delegates.c: Regenerate.
8798 2018-04-11 Pedro Alves <palves@redhat.com>
8800 * target.c (fileio_fh_t::t): Add comment.
8801 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8802 (target_fileio_close): Handle a NULL target.
8803 (invalidate_fileio_fh): New.
8804 (target_close): Call it.
8805 * remote.c (remote_hostio_send_command): No longer check whether
8806 remote_desc is open.
8808 2018-04-11 Pedro Alves <palves@redhat.com>
8810 * target.c (fileio_fh_t): Make it a named struct instead of a
8812 (fileio_fh_t::is_closed): New method.
8813 (DEF_VEC_O (fileio_fh_t)): Remove.
8814 (fileio_fhandles): Now a std::vector.
8815 (is_closed_fileio_fh): Delete.
8816 (acquire_fileio_fd): Adjust. Rename parameters.
8817 (release_fileio_fd): Adjust.
8818 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8819 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8820 (target_fileio_close): Adjust.
8822 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
8824 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8827 2018-04-10 Pedro Alves <palves@redhat.com>
8829 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8830 (scoped_finish_thread_state): New class.
8831 * infcmd.c (run_command_1): Use it instead of finish_thread_state
8833 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8834 (fetch_inferior_event, normal_stop): Likewise.
8835 * thread.c (finish_thread_state_cleanup): Delete.
8837 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8838 Pedro Alves <palves@redhat.com>
8840 * value.c: Include "selftest.h" and "common/array-view.h".
8841 (struct range) <operator ==>: New.
8842 (test_ranges_contain): New.
8843 (check_ranges_vector): New.
8844 (test_insert_into_bit_range_vector): New.
8845 (_initialize_values): Register selftests.
8846 * common/array-view.h (operator==, operator!=): New.
8848 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8850 * common/gdb_vecs.h (unordered_remove): Add overload that takes
8852 * inline-frame.c: Include <algorithm>.
8853 (struct inline_state): Add constructor.
8854 (inline_state_s): Remove.
8855 (DEF_VEC_O(inline_state_s)): Remove.
8856 (inline_states): Change type to std::vector.
8857 (find_inline_frame_state): Adjust to std::vector.
8858 (allocate_inline_frame_state): Remove.
8859 (clear_inline_frame_state): Adjust to std::vector.
8860 (skip_inline_frames): Adjust to std::vector.
8862 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8864 * tracepoint.h (struct trace_state_variable): Add constructor.
8865 <name>: Change type to std::string.
8866 * tracepoint.c (tsv_s): Remove.
8867 (DEF_VEC_O(tsv_s)): Remove.
8868 (tvariables): Change to std::vector.
8869 (create_trace_state_variable): Adjust to std::vector.
8870 (find_trace_state_variable): Likewise.
8871 (find_trace_state_variable_by_number): Likewise.
8872 (delete_trace_state_variable): Likewise.
8873 (trace_variable_command): Adjust to std::string.
8874 (delete_trace_variable_command): Likewise.
8875 (tvariables_info_1): Adjust to std::vector.
8876 (save_trace_state_variables): Likewise.
8877 (start_tracing): Likewise.
8878 (merge_uploaded_trace_state_variables): Adjust to std::vector
8880 * target.h (struct target_ops)
8881 <to_download_trace_state_variable>: Pass reference to
8882 trace_state_variable.
8883 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8884 * target-delegates.c: Re-generate.
8885 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8886 (mi_tsv_deleted): Likewise.
8887 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8888 * remote.c (remote_download_trace_state_variable): Change
8889 pointer to reference and adjust.
8890 * make-target-delegates (parse_argtypes): Handle references.
8891 (write_function_header): Likewise.
8892 (munge_type): Likewise.
8894 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8896 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8897 string_view-selftests.c.
8898 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8900 * unittests/basic_string_view/cons/char/1.cc: Likewise.
8901 * unittests/basic_string_view/cons/char/2.cc: Likewise.
8902 * unittests/basic_string_view/cons/char/3.cc: Likewise.
8903 * unittests/basic_string_view/element_access/char/1.cc:
8905 * unittests/basic_string_view/element_access/char/empty.cc:
8907 * unittests/basic_string_view/element_access/char/front_back.cc:
8909 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8910 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8912 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8914 * unittests/basic_string_view/modifiers/swap/char/1.cc:
8916 * unittests/basic_string_view/operations/compare/char/1.cc:
8918 * unittests/basic_string_view/operations/compare/char/13650.cc:
8920 * unittests/basic_string_view/operations/copy/char/1.cc:
8922 * unittests/basic_string_view/operations/data/char/1.cc:
8924 * unittests/basic_string_view/operations/find/char/1.cc:
8926 * unittests/basic_string_view/operations/find/char/2.cc:
8928 * unittests/basic_string_view/operations/find/char/3.cc:
8930 * unittests/basic_string_view/operations/find/char/4.cc:
8932 * unittests/basic_string_view/operations/rfind/char/1.cc:
8934 * unittests/basic_string_view/operations/rfind/char/2.cc:
8936 * unittests/basic_string_view/operations/rfind/char/3.cc:
8938 * unittests/basic_string_view/operations/substr/char/1.cc:
8940 * unittests/basic_string_view/operators/char/2.cc: Likewise.
8941 * unittests/string_view-selftests.c: New file.
8943 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8945 * unittests/basic_string_view/capacity/1.cc: New file.
8946 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8947 * unittests/basic_string_view/cons/char/1.cc: New file.
8948 * unittests/basic_string_view/cons/char/2.cc: New file.
8949 * unittests/basic_string_view/cons/char/3.cc: New file.
8950 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8951 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8952 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8953 * unittests/basic_string_view/element_access/char/1.cc: New file.
8954 * unittests/basic_string_view/element_access/char/2.cc: New file.
8955 * unittests/basic_string_view/element_access/char/empty.cc: New file.
8956 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8957 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8958 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8959 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8960 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8961 * unittests/basic_string_view/include.cc: New file.
8962 * unittests/basic_string_view/inserters/char/1.cc: New file.
8963 * unittests/basic_string_view/inserters/char/2.cc: New file.
8964 * unittests/basic_string_view/inserters/char/3.cc: New file.
8965 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8966 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8967 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8968 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8969 * unittests/basic_string_view/literals/types.cc: New file.
8970 * unittests/basic_string_view/literals/values.cc: New file.
8971 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8972 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8973 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8974 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8975 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8976 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8977 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8978 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8979 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8980 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8981 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8982 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8983 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8984 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8985 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8986 * unittests/basic_string_view/operations/data/char/1.cc: New file.
8987 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8988 * unittests/basic_string_view/operations/find/char/1.cc: New file.
8989 * unittests/basic_string_view/operations/find/char/2.cc: New file.
8990 * unittests/basic_string_view/operations/find/char/3.cc: New file.
8991 * unittests/basic_string_view/operations/find/char/4.cc: New file.
8992 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8993 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8994 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8995 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8996 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8997 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8998 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8999 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
9000 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
9001 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
9002 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
9003 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
9004 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
9005 * unittests/basic_string_view/operators/char/2.cc: New file.
9006 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
9007 * unittests/basic_string_view/range_access/char/1.cc: New file.
9008 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
9009 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
9010 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
9011 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
9012 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
9013 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
9014 * unittests/basic_string_view/requirements/typedefs.cc: New file.
9015 * unittests/basic_string_view/typedefs.cc: New file.
9016 * unittests/basic_string_view/types/1.cc: New file.
9018 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9020 * common/gdb_string_view.h: Remove libstdc++ implementation
9021 details, adjust to gdb reality.
9022 * common/gdb_string_view.tcc: Likewise.
9023 * cli/cli-script.c (struct string_view): Remove.
9024 (user_args) <m_args>: Change element type to gdb::string_view.
9025 (user_args::insert_args): Adjust.
9027 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9029 * common/gdb_string_view.h: New file.
9030 * common/gdb_string_view.tcc: New file.
9032 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9034 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9035 * configure: Re-generate.
9037 2018-04-09 Pedro Alves <palves@redhat.com>
9039 * gdbarch.sh: Include "observable.h" instead of "observer.h".
9040 (set_target_gdbarch): Call
9041 gdb::observers::architecture_changed.notify instead of
9042 observer_notify_architecture_changed.
9044 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9046 * tracepoint.c (struct current_traceframe_cleanup): Remove.
9047 (do_restore_current_traceframe_cleanup): Remove.
9048 (restore_current_traceframe_cleanup_dtor): Remove.
9049 (make_cleanup_restore_current_traceframe): Remove.
9050 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9052 * tracepoint.h (struct scoped_restore_current_traceframe): New.
9053 * infrun.c (fetch_inferior_event): Use
9054 scoped_restore_current_traceframe.
9056 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9058 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9060 <n_allocated_type_units>: Remove.
9061 <all_type_units>: Change to std::vector.
9062 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9063 to std::vector change.
9064 (dwarf2_per_objfile::get_cutu): Likewise.
9065 (dwarf2_per_objfile::get_tu): Likewise.
9066 (create_signatured_type_table_from_index): Likewise.
9067 (create_signatured_type_table_from_debug_names): Likewise.
9068 (dw2_symtab_iter_next): Likewise.
9069 (dw2_print_stats): Likewise.
9070 (dw2_expand_all_symtabs): Likewise.
9071 (dw2_expand_marked_cus): Likewise.
9072 (dw2_debug_names_iterator::next): Likewise.
9073 (dwarf2_initialize_objfile): Likewise.
9074 (add_signatured_type_cu_to_table): Likewise.
9075 (create_all_type_units): Likewise.
9076 (add_type_unit): Likewise.
9077 (struct tu_abbrev_offset): Add constructor.
9078 (build_type_psymtabs_1): Adjust to std::vector change.
9079 (print_tu_stats): Likewise.
9080 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9081 (write_debug_names): Likewise.
9083 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9085 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9086 Make an std::vector.
9087 <n_comp_units>: Remove.
9088 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9089 to std::vector change.
9090 (dwarf2_per_objfile::get_cutu): Likewise.
9091 (dwarf2_per_objfile::get_cu): Likewise.
9092 (create_cus_from_index): Likewise.
9093 (create_addrmap_from_index): Likewise.
9094 (create_addrmap_from_aranges): Likewise.
9095 (dwarf2_read_index): Likewise.
9096 (dw2_find_last_source_symtab): Likewise.
9097 (dw2_map_symtabs_matching_filename): Likewise.
9098 (dw2_symtab_iter_next): Likewise.
9099 (dw2_print_stats): Likewise.
9100 (dw2_expand_all_symtabs): Likewise.
9101 (dw2_expand_symtabs_with_fullname): Likewise.
9102 (dw2_expand_marked_cus): Likewise.
9103 (dw2_map_symbol_filenames): Likewise.
9104 (create_cus_from_debug_names): Likewise.
9105 (dwarf2_read_debug_names): Likewise.
9106 (dw2_debug_names_iterator::next): Likewise.
9107 (dwarf2_initialize_objfile): Likewise.
9108 (set_partial_user): Likewise.
9109 (dwarf2_build_psymtabs_hard): Likewise.
9110 (read_comp_units_from_section): Remove arguments, adjust to
9112 (create_all_comp_units): Adjust to std::vector and
9113 read_comp_units_from_section changes.
9114 (dwarf2_find_containing_comp_unit): Adjust to std::vector
9116 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9117 (psyms_seen_size): Likewise.
9118 (write_gdbindex): Likewise.
9119 (write_debug_names): Likewise.
9121 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9123 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9124 with dwarf2_per_objfile.
9125 (create_cus_from_index): Likewise.
9126 (create_signatured_type_table_from_index): Likewise.
9127 (dwarf2_read_index): Likewise.
9128 (dwarf2_initialize_objfile): Likewise.
9129 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
9130 per_cu rather than get_dwarf2_per_objfile.
9132 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9134 * dwarf2read.h (struct signatured_type): Forward declare.
9135 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9137 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9138 (dw2_get_cutu): ...this.
9139 (dwarf2_per_objfile::get_cu): Rename from...
9140 (dw2_get_cu): ...this.
9141 (dwarf2_per_objfile::get_tu): New.
9142 (create_addrmap_from_index): Adjust.
9143 (create_addrmap_from_aranges): Adjust.
9144 (dw2_find_last_source_symtab): Adjust.
9145 (dw2_map_symtabs_matching_filename): Adjust.
9146 (dw2_symtab_iter_next): Adjust.
9147 (dw2_print_stats): Adjust.
9148 (dw2_expand_all_symtabs): Adjust.
9149 (dw2_expand_symtabs_with_fullname): Adjust.
9150 (dw2_expand_marked_cus): Adjust.
9151 (dw_expand_symtabs_matching_file_matcher): Adjust.
9152 (dw2_map_symbol_filenames): Adjust.
9153 (dw2_debug_names_iterator::next): Adjust.
9154 (dwarf2_initialize_objfile): Adjust.
9155 (set_partial_user): Adjust.
9156 (dwarf2_build_psymtabs_hard): Adjust.
9158 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9160 * dwarf2read.c (create_signatured_type_table_from_debug_names):
9161 Remove unused variables.
9162 (dw2_map_symtabs_matching_filename): Likewise.
9163 (dwarf2_record_block_ranges): Likewise.
9164 (dwarf2_read_addr_index): Likewise.
9165 (follow_die_offset): Likewise.
9167 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9169 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9170 to symbol_file_add_main.
9172 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9175 * mi/mi-console.c (do_fputc_async_safe): New.
9176 (mi_console_file::write_async_safe): New.
9177 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9178 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9180 * ui-file.c (ui_file::putstrn): Adjust call to
9181 fputstrn_unfiltered.
9182 * utils.c (printchar): Replace do_fputs and do_fprintf
9183 parameters by do_fputc.
9184 (fputstr_filtered): Adjust call to printchar.
9185 (fputstr_unfiltered): Likewise.
9186 (fputstrn_filtered): Likewise.
9187 (fputstrn_unfiltered): Add do_fputc parameter, pass to
9189 * utils.h (do_fputc_ftype): New typedef.
9190 (fputstrn_unfiltered): Add do_fputc parameter.
9192 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9194 * regformats/i386/i386-avx.dat: Remove.
9196 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9199 * amd64-tdep.c (amd64_none_init_abi): New function.
9200 (amd64_x32_none_init_abi): New function.
9201 (_initialize_amd64_tdep): Register handlers for x86-64 and
9202 x64_32 with GDB_OSABI_NONE.
9203 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9204 GDB_OSABI_NONE osabi.
9206 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9209 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9211 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9212 * osabi.c (gdb_osabi_names): Add "unknown" entry.
9214 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9216 * common/byte-vector.h (char_vector): New type.
9217 * target.h (target_read_alloc): Return
9218 gdb::optional<byte_vector>.
9219 (target_read_stralloc): Return gdb::optional<char_vector>.
9220 (target_get_osdata): Return gdb::optional<char_vector>.
9221 * target.c (target_read_alloc_1): Templatize. Replacement
9222 manual memory management with vector.
9223 (target_read_alloc): Change return type, adjust.
9224 (target_read_stralloc): Change return type, adjust.
9225 (target_get_osdata): Change return type, adjust.
9226 * auxv.c (struct auxv_info) <length>: Remove.
9227 <data>: Change type to gdb::optional<byte_vector>.
9228 (auxv_inferior_data_cleanup): Free auxv_info with delete.
9229 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9230 (target_auxv_search): Adjust.
9231 (fprint_target_auxv): Adjust.
9232 * avr-tdep.c (avr_io_reg_read_command): Adjust.
9233 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9234 (linux_make_corefile_notes): Adjust.
9235 * osdata.c (get_osdata): Adjust.
9236 * remote.c (remote_get_threads_with_qxfer): Adjust.
9237 (remote_memory_map): Adjust.
9238 (remote_traceframe_info): Adjust.
9239 (btrace_read_config): Adjust.
9240 (remote_read_btrace): Adjust.
9241 (remote_pid_to_exec_file): Adjust.
9242 * solib-aix.c (solib_aix_get_library_list): Adjust.
9243 * solib-dsbt.c (decode_loadmap): Don't free buf.
9244 (dsbt_get_initial_loadmaps): Adjust.
9245 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9246 * solib-target.c (solib_target_current_sos): Adjust.
9247 * tracepoint.c (sdata_make_value): Adjust.
9248 * xml-support.c (xinclude_start_include): Adjust.
9249 (xml_fetch_content_from_file): Adjust.
9250 * xml-support.h (xml_fetch_another): Change return type.
9251 (xml_fetch_content_from_file): Change return type.
9252 * xml-syscall.c (xml_init_syscalls_info): Adjust.
9253 * xml-tdesc.c (file_read_description_xml): Adjust.
9254 (fetch_available_features_from_target): Change return type.
9255 (target_fetch_description_xml): Adjust.
9256 (target_read_description_xml): Adjust.
9258 2018-04-06 Tom Tromey <tom@tromey.com>
9260 * value.c (~value): Update.
9261 (struct value) <contents>: Now unique_xmalloc_ptr.
9262 (value_contents_bits_eq, allocate_value_contents)
9263 (value_contents_raw, value_contents_all_raw)
9264 (value_contents_for_printing, value_contents_for_printing_const)
9265 (set_value_enclosing_type): Update.
9267 2018-04-06 Tom Tromey <tom@tromey.com>
9269 * value.c (range_s): Remove typedef, VEC.
9270 (struct range): Add operator<.
9271 (range_lessthan): Remove.
9272 (ranges_contain): Change type.
9274 (struct value) <unavailable, optimized_out>: Now std::vector.
9275 (value_entirely_available)
9276 (value_entirely_covered_by_range_vector)
9277 (value_entirely_unavailable, value_entirely_optimized_out):
9279 (insert_into_bit_range_vector): Change argument type.
9280 (find_first_range_overlap): Likewise.
9281 (struct ranges_and_idx, value_contents_bits_eq)
9282 (require_not_optimized_out, require_available): Update.
9283 (ranges_copy_adjusted): Change argument types.
9284 (value_optimized_out, value_copy, value_fetch_lazy): Update.
9286 2018-04-06 Tom Tromey <tom@tromey.com>
9288 * value.c (~value): Update.
9289 (struct value) <parent>: Now a value_ref_ptr.
9290 (value_parent, set_value_parent, value_address, value_copy):
9293 2018-04-06 Tom Tromey <tom@tromey.com>
9295 * value.c (struct value): Add constructor, destructor, and member
9297 (allocate_value_lazy, value_decref): Update.
9299 2018-04-06 Tom Tromey <tom@tromey.com>
9301 * value.c (struct value) <released, next>: Remove.
9302 (all_values): Now a std::vector.
9303 (allocate_value_lazy): Update.
9304 (value_next): Remove.
9305 (value_mark, value_free_to_mark, release_value)
9306 (value_release_to_mark): Update.
9308 2018-04-06 Tom Tromey <tom@tromey.com>
9310 * value.h (fetch_subexp_value, value_release_to_mark): Update.
9311 (free_value_chain): Remove.
9312 * value.c (free_value_chain): Remove.
9313 (value_release_to_mark): Return a std::vector.
9314 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9316 (check_condition): Update.
9317 * eval.c (fetch_subexp_value): Change "val_chain" to a
9319 * breakpoint.c (update_watchpoint): Update.
9320 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9322 2018-04-06 Tom Tromey <tom@tromey.com>
9324 * value.h (free_all_values): Remove.
9325 * value.c (free_all_values): Remove.
9327 2018-04-06 Tom Tromey <tom@tromey.com>
9329 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9330 (value_history_chain, value_history_count): Remove.
9331 (value_history): New global.
9332 (record_latest_value, access_value_history, show_values)
9333 (preserve_values): Update.
9335 2018-04-06 Tom Tromey <tom@tromey.com>
9337 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9338 * varobj.c (varobj_set_display_format, varobj_set_value)
9339 (install_default_visualizer, construct_visualizer)
9340 (install_new_value, ~varobj, varobj_get_value_type)
9341 (my_value_of_variable, varobj_editable_p): Update.
9342 * c-varobj.c (c_describe_child, c_value_of_variable)
9343 (cplus_number_of_children, cplus_describe_child): Update.
9344 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9345 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9346 (ada_value_of_variable, ada_value_is_changeable_p): Update.
9348 2018-04-06 Tom Tromey <tom@tromey.com>
9350 * printcmd.c (last_examine_address): Change type to
9352 (do_examine, x_command): Update.
9354 2018-04-06 Tom Tromey <tom@tromey.com>
9356 * value.c (release_value): Update.
9357 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9358 (struct bpstats) <val>: Now a value_ref_ptr.
9359 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9360 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9361 (~watchpoint, print_it_watchpoint, watch_command_1)
9362 (invalidate_bp_value_on_memory_change): Update.
9364 2018-04-06 Tom Tromey <tom@tromey.com>
9366 * varobj.c (varobj_clear_saved_item)
9367 (update_dynamic_varobj_children, install_new_value, ~varobj):
9369 * value.h (value_incref): Move declaration earlier.
9370 (value_decref): Rename from value_free.
9371 (struct value_ref_policy): New.
9372 (value_ref_ptr): New typedef.
9373 (struct value_deleter): Remove.
9374 (gdb_value_up): Remove typedef.
9375 (release_value): Change return type.
9376 (release_value_or_incref): Remove.
9377 * value.c (set_value_parent): Update.
9378 (value_incref): Change return type.
9379 (value_decref): Rename from value_free.
9380 (value_free_to_mark, free_all_values, free_value_chain): Update.
9381 (release_value): Return value_ref_ptr.
9382 (release_value_or_incref): Remove.
9383 (record_latest_value, set_internalvar, clear_internalvar):
9385 * stack.c (info_frame_command): Don't call value_free.
9386 * python/py-value.c (valpy_dealloc, valpy_new)
9387 (value_to_value_object): Update.
9388 * printcmd.c (do_examine): Update.
9389 * opencl-lang.c (lval_func_free_closure): Update.
9390 * mi/mi-main.c (register_changed_p): Don't call value_free.
9391 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9392 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9393 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9395 * guile/scm-value.c (vlscm_free_value_smob)
9396 (vlscm_scm_from_value): Update.
9397 * frame.c (frame_register_unwind, frame_unwind_register_signed)
9398 (frame_unwind_register_unsigned, get_frame_register_bytes)
9399 (put_frame_register_bytes): Don't call value_free.
9400 * findvar.c (address_from_register): Don't call value_free.
9401 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9402 * dwarf2loc.c (entry_data_value_free_closure)
9403 (value_of_dwarf_reg_entry, free_pieced_value_closure)
9404 (dwarf2_evaluate_loc_desc_full): Update.
9405 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9406 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9407 (~watchpoint, watch_command_1)
9408 (invalidate_bp_value_on_memory_change): Update.
9409 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9411 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
9414 * warning.m4: Add -Wno-error=deprecated-register.
9415 * configure: Re-generate.
9417 2018-04-05 Tom Tromey <tom@tromey.com>
9419 * linespec.h: Remove include of "vec.h".
9421 2018-04-05 Tom Tromey <tom@tromey.com>
9423 * linespec.c (typep): Remove typedef.
9424 (find_methods, find_superclass_methods): Take a std::vector.
9425 (find_method): Use std::vector.
9427 2018-04-05 Tom Tromey <tom@tromey.com>
9429 * utils.c (compare_strings): Remove.
9430 * utils.h (compare_strings): Remove.
9431 * objc-lang.h (find_imps): Update.
9432 * objc-lang.c (find_methods): Take a std::vector.
9433 (uniquify_strings, find_imps): Likewise.
9434 * linespec.c (find_methods): Take a std::vector.
9435 (decode_objc): Use std::vector.
9436 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9438 (find_method, find_function_symbols): Use std::vector.
9440 2018-04-05 Tom Tromey <tom@tromey.com>
9442 * completer.c (completion_tracker::completion_tracker): Remove
9444 (completion_tracker::discard_completions): Likewise.
9445 * breakpoint.c (ambiguous_names_p): Remove cast.
9446 * ada-lang.c (_initialize_ada_language): Remove cast.
9447 * utils.h (streq): Update.
9448 (streq_hash): Add new declaration.
9449 * utils.c (streq): Return bool.
9450 (streq_hash): New function.
9452 2018-04-05 Tom Tromey <tom@tromey.com>
9454 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9455 Remove a string copy.
9457 2018-04-05 Tom Tromey <tom@tromey.com>
9459 * linespec.c (filter_results): Use std::vector.
9460 (decode_line_2, decode_line_full): Update.
9462 2018-04-05 Tom Tromey <tom@tromey.com>
9464 * linespec.c (canonical_to_fullform): Return std::string.
9465 (filter_results): Update.
9466 (struct decode_line_2_item): Add constructor.
9467 <fullform, displayform>: Now std::string.
9468 (decode_line_2_compare_items): Now a std::sort comparator.
9469 (decode_line_2): Update.
9471 2018-04-05 Tom Tromey <tom@tromey.com>
9473 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9474 (unexpected_linespec_error): Update.
9475 (linespec_parse_basic, parse_linespec): Update.
9477 2018-04-05 Tom Tromey <tom@tromey.com>
9479 * linespec.c (linespec_parse_basic): Reindent.
9481 2018-04-05 Tom Tromey <tom@tromey.com>
9483 * minsyms.h (iterate_over_minimal_symbols): Update.
9484 * minsyms.c (iterate_over_minimal_symbols): Take a
9486 * linespec.c (struct collect_minsyms): Remove.
9487 (compare_msyms): Now a std::sort comparator.
9488 (add_minsym): Add parameters.
9489 (search_minsyms_for_name): Update. Use std::vector.
9491 2018-04-03 Tom Tromey <tom@tromey.com>
9493 * mipsread.c (read_alphacoff_dynamic_symtab): Use
9496 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9498 * MAINTAINERS (Write After Approval): Add Weimin Pan.
9500 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9503 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
9504 printing static type.
9506 2018-04-01 Tom Tromey <tom@tromey.com>
9508 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9509 (rs6000_xfer_shared_libraries): Update.
9511 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
9513 * common/gdb_vecs.h (char_ptr): Remove.
9514 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9516 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9518 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9520 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9522 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9524 * tracepoint.h (struct uploaded_tp): Initialize fields.
9525 <actions, step_actions, cmd_strings>: Change type to
9526 std::vector<char *>.
9527 * tracepoint.c (get_uploaded_tp): Allocate with new.
9528 (free_uploaded_tps): Free with delete.
9529 (parse_tracepoint_definition): Adjust to std::vector change.
9530 * breakpoint.c (read_uploaded_action): Likewise.
9531 (create_tracepoint_from_upload): Likewise.
9532 * ctf.c (ctf_write_uploaded_tp): Likewise.
9533 (SET_ARRAY_FIELD): Likewise.
9534 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9536 2018-03-30 Tom Tromey <tom@tromey.com>
9538 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
9540 (svr4_keep_data_in_core): Update.
9541 (svr4_read_so_list): Update.
9543 2018-03-30 Tom Tromey <tom@tromey.com>
9545 * windows-nat.c (handle_output_debug_string, handle_exception):
9547 * target.h (target_read_string): Update.
9548 * target.c (target_read_string): Change "string" to
9550 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9552 * solib-frv.c (frv_current_sos): Update.
9553 * solib-dsbt.c (dsbt_current_sos): Update.
9554 * solib-darwin.c (darwin_current_sos): Update.
9555 * linux-thread-db.c (inferior_has_bug): Update.
9556 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9557 Update. Remove alloca.
9558 * ada-lang.c (ada_main_name): Update.
9560 2018-03-30 Tom Tromey <tom@tromey.com>
9562 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9563 (struct dwo_file_deleter): New.
9564 (dwo_file_up): New typedef.
9565 (open_and_init_dwo_file): Use dwo_file_up.
9566 (free_dwo_file_cleanup): Remove.
9568 2018-03-30 Tom Tromey <tom@tromey.com>
9570 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9571 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9573 2018-03-30 Tom Tromey <tom@tromey.com>
9575 * dwarf2read.c (class free_cached_comp_units): New class.
9576 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9577 (free_cached_comp_units): Remove function.
9579 2018-03-30 Tom Tromey <tom@tromey.com>
9581 * utils.h (make_cleanup_unpush_target): Remove.
9582 * inf-ptrace.c (struct target_unpusher): New.
9583 (target_unpush_up) New typedef.
9584 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9586 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9588 2018-03-27 Tom Tromey <tom@tromey.com>
9590 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9592 2018-03-27 Pedro Alves <palves@redhat.com>
9593 Tom Tromey <tom@tromey.com>
9595 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9596 destructor. Now a class.
9597 (gdb_readline_wrapper_cleanup): Remove function.
9598 (gdb_readline_wrapper): Remove cleanups.
9600 2018-03-27 Tom Tromey <tom@tromey.com>
9602 * typeprint.h (struct type_print_options) <local_typedefs,
9603 global_typedefs>: Remove "struct" keyword.
9604 (class typedef_hash_table): New class.
9605 (recursively_update_typedef_hash, add_template_parameters)
9606 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9607 (find_typedef_in_hash): Don't declare.
9608 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9609 (typedef_hash_table::recursively_update): Rename from
9610 recursively_update_typedef_hash. Now a member.
9611 (typedef_hash_table::add_template_parameters): Rename from
9612 add_template_parameters. Now a member.
9613 (typedef_hash_table::typedef_hash_table): Now a constructor;
9614 rename from create_typedef_hash.
9615 (typedef_hash_table::~typedef_hash_table): Now a destructor;
9616 rename from free_typedef_hash.
9617 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9618 (do_free_global_table): Remove.
9619 (typedef_hash_table::typedef_hash_table): New constructor; renamed
9620 from copy_type_recursive.
9621 (create_global_typedef_table): Remove.
9622 (typedef_hash_table::find_global_typedef): Now a member of
9624 (typedef_hash_table::find_typedef): Rename from
9625 find_typedef_in_hash; now a member.
9626 (whatis_exp): Update.
9627 * extension.h (struct ext_lang_type_printers): Add constructor and
9629 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9631 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9632 Now a constructor; rename from start_ext_lang_type_printers.
9633 (ext_lang_type_printers): Now a destructor; rename from
9634 free_ext_lang_type_printers.
9635 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9637 (c_type_print_base_struct_union): Update. Remove cleanups.
9639 2018-03-27 Tom Tromey <tom@tromey.com>
9641 * dwarf-index-write.c: Include <cmath>.
9643 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9645 * NEWS: Add entry describing new "set|show varsize-limit" command.
9646 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9648 * printcmd.c (_initialize_printcmd): Add "set var" alias of
9651 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
9653 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9655 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9656 * dwarf-index-common.c: New file.
9657 * dwarf-index-common.h: New file.
9658 * dwarf-index-write.c: New file.
9659 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9660 (struct dwarf2_section_info): Move from here.
9661 (dwarf2_section_info_def): Likewise.
9662 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9663 (offset_type): Likewise.
9664 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9665 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9666 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9667 (byte_swap): Likewise.
9668 (MAYBE_SWAP): Likewise.
9669 (dwarf2_per_cu_ptr): Likewise.
9670 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9671 (struct tu_stats): Likewise.
9672 (struct dwarf2_per_objfile): Likewise.
9673 (struct dwarf2_per_cu_data): Likewise.
9674 (struct signatured_type): Likewise.
9675 (sig_type_ptr): Likewise.
9676 (DEF_VEC_P (sig_type_ptr)): Likewise.
9677 (INDEX4_SUFFIX): Likewise.
9678 (INDEX5_SUFFIX): Likewise.
9679 (DEBUG_STR_SUFFIX): Likewise.
9680 (dwarf2_read_section): Make non-static.
9681 (mapped_index_string_hash): Move from here.
9682 (dwarf5_djb_hash): Likewise.
9683 (file_write): Likewise.
9684 (class data_buf): Likewise.
9685 (struct symtab_index_entry): Likewise.
9686 (struct mapped_symtab): Likewise.
9687 (find_slot): Likewise.
9688 (hash_expand): Likewise.
9689 (add_index_entry): Likewise.
9690 (uniquify_cu_indices): Likewise.
9691 (class c_str_view): Likewise.
9692 (class c_str_view_hasher): Likewise.
9693 (class vector_hasher): Likewise.
9694 (write_hash_table): Likewise.
9695 (psym_index_map): Likewise.
9696 (struct addrmap_index_data): Likewise.
9697 (add_address_entry): Likewise.
9698 (add_address_entry_worker): Likewise.
9699 (write_address_map): Likewise.
9700 (symbol_kind): Likewise.
9701 (write_psymbols): Likewise.
9702 (struct signatured_type_index_data): Likewise.
9703 (write_one_signatured_type): Likewise.
9704 (recursively_count_psymbols): Likewise.
9705 (recursively_write_psymbols): Likewise.
9706 (class debug_names): Likewise.
9707 (check_dwarf64_offsets): Likewise.
9708 (psyms_seen_size): Likewise.
9709 (write_gdbindex): Likewise.
9710 (write_debug_names): Likewise.
9711 (assert_file_size): Likewise.
9712 (write_psymtabs_to_index): Likewise.
9713 (save_gdb_index_command): Likewise.
9714 (_initialize_dwarf2_read): Don't register the "save gdb-index"
9716 * dwarf2read.h: New file.
9718 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9721 * dwarf2read.c (dwarf2_physname): Do not return the demangled
9722 symbol name if the CU's language stores symbol names in linkage
9724 * language.h (struct language_defn)
9725 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
9726 all instances of this struct.
9728 2018-03-26 Tom Tromey <tom@tromey.com>
9730 * stack.c (backtrace_command_1): Remove verbose code.
9732 2018-03-26 Tom Tromey <tom@tromey.com>
9734 * python/py-framefilter.c (py_print_type): Don't catch
9735 exceptions. Return void.
9736 (py_print_value): Likewise.
9737 (py_print_single_arg): Likewise.
9738 (enumerate_args): Don't catch exceptions.
9739 (py_print_args): Likewise.
9740 (py_print_frame): Likewise.
9741 (gdbpy_apply_frame_filter): Catch exceptions here.
9743 2018-03-26 Tom Tromey <tom@tromey.com>
9745 * stack.c (_initialize_stack): Remove trailing newlines from help
9746 text. Add "Usage" line to "backtrace" help.
9748 2018-03-26 Tom Tromey <tom@tromey.com>
9751 * python/py-framefilter.c (py_print_args): Call wrap_hint.
9753 2018-03-26 Tom Tromey <tom@tromey.com>
9755 * python/py-framefilter.c (py_print_single_arg): Return
9756 EXT_LANG_BT_ERROR from catch.
9758 2018-03-26 Tom Tromey <tom@tromey.com>
9761 * stack.c (backtrace_command_1): Move some code into no-filters
9764 2018-03-26 Tom Tromey <tom@tromey.com>
9766 * python/py-framefilter.c (throw_quit_or_print_exception): New
9768 (gdbpy_apply_frame_filter): Use it.
9770 2018-03-26 Tom Tromey <tom@tromey.com>
9773 * python/py-framefilter.c (py_print_type, py_print_value)
9774 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9777 2018-03-26 Tom Tromey <tom@tromey.com>
9779 * python/py-framefilter.c (enumerate_args): Use
9780 gdb::unique_xmalloc_ptr.
9782 2018-03-26 Tom Tromey <tom@tromey.com>
9784 * python/py-framefilter.c (py_print_frame): Return
9786 (gdbpy_apply_frame_filter): Update comment.
9787 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9789 <EXT_LANG_BT_NO_FILTERS>: Change value.
9791 2018-03-26 Tom Tromey <tom@tromey.com>
9794 * stack.c (backtrace_command): Parse "hide" argument.
9795 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9796 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9799 2018-03-26 Tom Tromey <tom@tromey.com>
9801 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9803 (backtrace_command): Remove "fulltrace", add "flags".
9805 2018-03-26 Tom Tromey <tom@tromey.com>
9807 * stack.c (backtrace_command): Rewrite command line parsing.
9809 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9811 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9813 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9815 * filename-seen-cache.h: Add include guard.
9817 2018-03-26 Keith Seitz <keiths@redhat.com>
9819 * symfile.c (place_section): Remove "struct" from section_addr_info
9821 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9822 "struct" keyword from section_addr_info.
9824 2018-03-26 Alan Hayward <alan.hayward@arm.com>
9826 * regformats/regdef.h (reg): Add constructors.
9828 2018-03-25 Pedro Alves <palves@redhat.com>
9830 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9831 if then/else bodies in var_func_name extraction.
9833 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
9835 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9836 lookup_minimal_symbol() to find symbol entry.
9837 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9839 2018-03-23 Keith Seitz <keiths@redhat.com>
9842 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9843 nested type definitions for C++, too.
9845 2018-03-23 Tom Tromey <tom@tromey.com>
9847 * machoread.c (struct oso_el): Add a constructor. Don't define as
9849 (macho_register_oso): Remove.
9850 (macho_symtab_read): Take a std::vector.
9851 (oso_el_compare_name): Now a std::sort comparator.
9852 (macho_symfile_read_all_oso): Take a std::vector.
9853 (macho_symfile_read): Use std::vector. Remove cleanups.
9855 2018-03-22 Tom Tromey <tom@tromey.com>
9857 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9858 (record_full_goto_bookmark): Use std::string.
9860 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9863 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9866 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9868 * rs6000-tdep.c (store_insn_p): New function.
9869 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9870 and cr_reg to their unshifted values. Use store_insn_p to
9871 match LR saves using either R1 or fdata->alloca_reg. Use
9872 store_insn_p to match CR saves. Set alloca_reg_offset
9873 when alloca_reg and framep are set. Remove lr_reg shift
9874 when assigning to fdata->lr_register.
9876 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
9878 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9879 command line args instead of emitting a warning.
9881 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9883 * tracepoint.h (struct static_tracepoint_marker): Initialize
9884 fields, define default constructor, move constructor and move
9885 assignment, disable the rest.
9886 <str_id, extra>: Make std::string.
9887 (release_static_tracepoint_marker): Remove.
9888 (free_current_marker): Remove.
9889 * tracepoint.c (free_current_marker): Remove.
9890 (parse_static_tracepoint_marker_definition): Adjust to
9891 std::string, use new hex2str overload.
9892 (release_static_tracepoint_marker): Remove.
9893 (print_one_static_tracepoint_marker): Get marker by reference
9894 and adjust to std::string.
9895 (info_static_tracepoint_markers_command): Adjust to std::vector
9897 * target.h (static_tracepoint_marker_p): Remove typedef.
9898 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9899 (struct target_ops) <to_static_tracepoint_marker_at>: Return
9901 <to_static_tracepoint_markers_by_strid>: Return std::vector.
9903 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9904 (target_debug_print_std_vector_static_tracepoint_marker): New.
9905 (target_debug_print_struct_static_tracepoint_marker_p): Rename
9907 (target_debug_print_static_tracepoint_marker_p): ... this.
9908 * target-delegates.c: Re-generate.
9909 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9911 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9912 (decode_static_tracepoint_spec): Adjust to std::vector.
9913 (tracepoint_print_one_detail): Adjust to std::string.
9914 (strace_marker_decode_location): Adjust to std::string.
9915 (update_static_tracepoint): Adjust to std::string, remove call
9916 to release_static_tracepoint_marker.
9917 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9918 Adjust to std::vector.
9919 * remote.c (remote_static_tracepoint_marker_at): Return bool.
9920 (remote_static_tracepoint_markers_by_strid): Adjust to
9922 * common/rsp-low.h (hex2str): New overload with explicit count
9924 * common/rsp-low.c (hex2str): New overload with explicit count
9926 * unittests/rsp-low-selftests.c (test_hex2str): New function.
9927 (_initialize_rsp_low_selftests): Add test_hex2str test.
9928 * unittests/tracepoint-selftests.c
9929 (test_parse_static_tracepoint_marker_definition): Adjust to
9932 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9934 * tracepoint.c (parse_static_tracepoint_marker_definition):
9935 Consider case where the definition is followed by more
9937 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9938 tracepoint-selftests.c.
9939 * unittests/tracepoint-selftests.c: New.
9941 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9943 * MAINTAINERS (Write After Approval): Add Pedro Franco de
9946 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9948 * symtab.c (find_pc_sect_line): fixed indentation.
9950 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9952 * symtab.c (find_pc_sect_line): now uses binary search.
9954 2018-03-19 Tom Tromey <tom@tromey.com>
9956 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9959 2018-03-19 Pedro Alves <palves@redhat.com>
9960 Tom Tromey <tom@tromey.com>
9962 * unittests/observable-selftests.c: New file.
9963 * common/observable.h: New file.
9964 * observable.h: New file.
9965 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9966 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9967 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9968 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9969 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9970 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9971 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9972 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9973 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9974 python/py-breakpoint.c, python/py-finishbreakpoint.c,
9975 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9976 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9977 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9978 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9979 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9980 tui/tui-interp.c, valops.c: Update all users.
9981 * tui/tui-hooks.c (tui_bp_created_observer)
9982 (tui_bp_deleted_observer, tui_bp_modified_observer)
9983 (tui_inferior_exit_observer, tui_before_prompt_observer)
9984 (tui_normal_stop_observer, tui_register_changed_observer):
9986 (tui_observers_token): New global.
9987 (attach_or_detach, tui_attach_detach_observers): New functions.
9988 (tui_install_hooks, tui_remove_hooks): Use
9989 tui_attach_detach_observers.
9990 * record-btrace.c (record_btrace_thread_observer): Remove.
9991 (record_btrace_thread_observer_token): New global.
9992 * observer.sh: Remove.
9993 * observer.c: Rename to observable.c.
9994 * observable.c (namespace gdb_observers): Define new objects.
9995 (observer_debug): Move into gdb_observers namespace.
9996 (struct observer, struct observer_list, xalloc_observer_list_node)
9997 (xfree_observer_list_node, generic_observer_attach)
9998 (generic_observer_detach, generic_observer_notify): Remove.
9999 (_initialize_observer): Update.
10000 Don't include observer.inc.
10001 * Makefile.in (generated_files): Remove observer.h, observer.inc.
10002 (clean mostlyclean): Likewise.
10003 (observer.h, observer.inc): Remove targets.
10004 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
10005 (COMMON_SFILES): Use observable.c, not observer.c.
10006 * .gitignore: Remove observer.h.
10008 2018-03-18 Tom Tromey <tom@tromey.com>
10010 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
10012 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
10014 2018-03-17 Tom Tromey <tom@tromey.com>
10016 * auto-load.c (auto_load_objfile_script_1): Use std::string.
10018 2018-03-17 Tom Tromey <tom@tromey.com>
10020 * target.c (class scoped_target_fd): New.
10021 (target_fileio_close_cleanup): Remove.
10022 (target_fileio_read_alloc_1): Use scoped_target_fd.
10024 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
10026 * silent-rules.mk: New.
10027 * Makefile.in: Include silent-rules.mk
10028 (srcdir, VPATH, top_srcdir): Move up.
10029 (COMPILE): Add ECHO_CXX.
10030 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10031 (init.c): Add ECHO_INIT_C.
10032 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10033 (version.c): Add ECHO_GEN.
10034 (printcmd.o): Add ECHO_CXX.
10035 (target-float.o): Add ECHO_CXX.
10036 (ada-exp.o): Add ECHO_CXX.
10037 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10038 (insight$(EXEEXT)): Add ECHO_CXXLD.
10039 * gnulib/configure.ac: Add AM_SILENT_RULES.
10040 * gnulib/aclocal.m4: Re-generate.
10041 * gnulib/configure: Re-generate.
10042 * gnulib/import/Makefile.in: Re-generate.
10044 2018-03-16 Tom Tromey <tom@tromey.com>
10046 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10047 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10048 * utils.c (do_free_section_addr_info)
10049 (make_cleanup_free_section_addr_info): Remove.
10050 * symfile.h (struct other_sections): Add constructor.
10051 (struct section_addr_info): Remove.
10052 (section_addr_info): New typedef.
10053 (struct sym_fns) <sym_offsets>: Change type of parameter.
10054 (build_section_addr_info_from_objfile)
10055 (relative_addr_info_to_section_offsets, addr_info_make_relative)
10056 (default_symfile_offsets, symbol_file_add)
10057 (symbol_file_add_from_bfd)
10058 (build_section_addr_info_from_section_table): Update.
10059 (alloc_section_addr_info, free_section_addr_info): Don't declare.
10060 * symfile.c (alloc_section_addr_info): Remove.
10061 (build_section_addr_info_from_section_table): Change return type.
10063 (build_section_addr_info_from_bfd)
10064 (build_section_addr_info_from_objfile): Likewise.
10065 (free_section_addr_info): Remove.
10066 (relative_addr_info_to_section_offsets): Change type of "addrs".
10067 (addrs_section_compar): Now a std::sort comparator.
10068 (addrs_section_sort): Change return type.
10069 (addr_info_make_relative): Change type of "addrs". Update.
10070 (default_symfile_offsets, syms_from_objfile_1)
10071 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10072 (symbol_file_add_separate): Update.
10073 (symbol_file_add): Change type of "addrs". Update.
10074 (add_symbol_file_command): Update. Remove cleanups.
10075 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
10077 * symfile-debug.c (debug_sym_offsets): Change type of "info".
10078 * solib.c (solib_read_symbols): Update.
10079 * objfiles.c (objfile_relocate): Update. Remove cleanups.
10080 * machoread.c (macho_symfile_offsets): Update.
10081 * jit.c (jit_bfd_try_read_symtab): Update.
10083 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
10085 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10086 unittests/utils-selftests.c.
10087 * unittests/utils-selftests.c: New file.
10089 2018-03-14 Tom Tromey <tom@tromey.com>
10092 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10095 2018-03-14 Tom Tromey <tom@tromey.com>
10098 * printcmd.c (printf_pointer): Allow "-" in format.
10100 2018-03-14 Tom Tromey <tom@tromey.com>
10102 * printcmd.c (_initialize_printcmd): Add usage to printf.
10104 2018-03-14 Yao Qi <qiyao@sourceware.org>
10106 * MAINTAINERS: Update my email address.
10108 2018-03-13 Tom Tromey <tom@tromey.com>
10110 * machoread.c (macho_check_dsym): Change filenamep to a
10112 (macho_symfile_read): Update.
10113 * symfile.c (load_command): Use std::string.
10115 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
10117 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10118 to error message string.
10119 (riscv_register_name): Use xsnprintf instead of sprintf.
10120 (riscv_insn::fetch_instruction): Use gdb_assert instead of
10122 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10124 (riscv_push_dummy_call): Likewise.
10126 2018-03-12 Tom Tromey <tom@tromey.com>
10128 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10129 Use gdb::byte_vector.
10130 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10132 2018-03-12 Yao Qi <yao.qi@linaro.org>
10134 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10135 parameter type to readable_regcache.
10136 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10139 2018-03-11 Tom Tromey <tom@tromey.com>
10141 * dwarf2read.c (struct nextfield): Add initializers.
10142 (struct nextfnfield): Remove.
10143 (struct fnfieldlist): Add initializers. Remove "length" and
10144 "head", use std::vector.
10145 (struct decl_field_list): Remove.
10146 (struct field_info): Add initializers.
10147 <fields, baseclasses>: Now std::vector.
10148 <nbaseclasses, nfnfields, typedef_field_list_count,
10149 nested_types_list_count>: Remove.
10150 (dwarf2_add_field, dwarf2_add_type_defn)
10151 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10152 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10153 (process_structure_scope): Update.
10155 2018-03-11 Tom Tromey <tom@tromey.com>
10157 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10158 for use by std::sort.
10159 (build_type_psymtabs_1): Use std::vector.
10161 2018-03-09 Eli Zaretskii <eliz@gnu.org>
10163 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10164 and LIBMPFR in the printed configuration.
10166 2018-03-08 Tom Tromey <tom@tromey.com>
10168 * source.c (get_filename_and_charpos): Use scoped_fd.
10169 * nto-procfs.c (procfs_open_1): Use scoped_fd.
10170 (procfs_pidlist): Likewise.
10171 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10172 (iterate_over_mappings): Likewise.
10174 2018-03-08 Tom Tromey <tom@tromey.com>
10176 * infcall.c (struct call_return_meta_info)
10177 <stack_temporaries_enabled>: Remove.
10178 (get_call_return_value, call_function_by_hand_dummy): Update.
10179 * thread.c (disable_thread_stack_temporaries): Remove.
10180 (enable_thread_stack_temporaries): Remove.
10181 (thread_stack_temporaries_enabled_p): Return bool.
10182 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10183 (get_last_thread_stack_temporary): Update.
10184 * eval.c (evaluate_subexp): Update.
10185 * gdbthread.h (class enable_thread_stack_temporaries): Now a
10186 class, not a function.
10187 (value_ptr, value_vec): Remove typedefs.
10188 (class thread_info) <stack_temporaries_enabled>: Now bool.
10189 <stack_temporaries>: Now a std::vector.
10190 (thread_stack_temporaries_enabled_p)
10191 (value_in_thread_stack_temporaries): Return bool.
10193 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
10195 * remote.c (putpkt_binary): Fix omitted bytes reporting.
10196 (getpkt_or_notif_sane_1): Likewise.
10198 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10200 * build-id.c (build_id_to_debug_bfd): Use std::string.
10202 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10204 * build-id.c (find_separate_debug_file_by_buildid): Return
10206 * build-id.h (find_separate_debug_file_by_buildid): Return
10208 * coffread.c (coff_symfile_read): Adjust to std::string.
10209 * elfread.c (elf_symfile_read): Adjust to std::string.
10210 * symfile.c (separate_debug_file_exists): Change parameter to
10212 (find_separate_debug_file): Return std::string.
10213 (find_separate_debug_file_by_debuglink): Return std::string.
10214 * symfile.h (find_separate_debug_file_by_debuglink): Return
10217 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10219 * common/xml-utils.c (xml_escape_text): Move code to...
10220 (xml_escape_text_append): ... this new function.
10221 * common/xml-utils.h (xml_escape_text_append): New declaration.
10222 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10224 (_initialize_xml_utils): register test_xml_escape_text_append as
10227 2018-03-07 Alan Hayward <alan.hayward@arm.com>
10229 * defs.h: Remove MAX_REGISTER_SIZE.
10230 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10232 * python/py-unwind.c (pyuw_sniffer): Likewise.
10234 2018-03-07 Tom Tromey <tom@tromey.com>
10236 * linux-tdep.c (linux_info_proc): Update.
10237 * target.h (struct target_ops) <to_fileio_readlink>: Return
10239 (target_fileio_readlink): Return optional<string>.
10240 * remote.c (remote_hostio_readlink): Return optional<string>.
10241 * inf-child.c (inf_child_fileio_readlink): Return
10243 * target.c (target_fileio_readlink): Return optional<string>.
10245 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
10247 * regcache.c (cooked_read_test): Add riscv to the list of
10248 architectures that have a save_reggroup.
10250 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
10252 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10253 value is not a dynamic class object.
10255 2018-03-06 Tom Tromey <tom@tromey.com>
10257 * rust-exp.y: Formatting fixes.
10259 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10261 * riscv-tdep.c (riscv_register_name): Remove target description
10263 (riscv_gdbarch_init): Remove target description check.
10265 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10267 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10269 * riscv-tdep.h: Likewise.
10271 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10273 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10274 (riscv_pseudo_register_write): Delete.
10275 (riscv_gdbarch_init): Remove all use of pseudo registers.
10277 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10279 * record-btrace.c (btrace_print_lines): Replace cleanup
10280 parameter with RAII equivalents.
10281 (btrace_insn_history): Replace cleanup with RAII equivalents.
10282 * ui-out.h (make_cleanup_ui_out_list_begin_end,
10283 make_cleanup_ui_out_tuple_begin_end): Remove.
10284 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10285 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10286 make_cleanup_ui_out_list_begin_end): Remove.
10288 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10290 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10291 parameter types to std::vector. Use bool.
10292 (record_btrace_wait): Replace VEC(tp_t) with
10293 std::vector<thread_info *>.
10294 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10296 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10298 * record-btrace.c (record_btrace_disable_callback): Remove.
10299 (struct scoped_btrace_disable): New.
10300 (record_btrace_open): Use scoped_btrace_disable.
10302 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10304 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10305 reading values from registers.
10307 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10309 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10312 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10314 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10315 change parameter type. Use GDB's print functions, and use
10316 core_addr_to_string where appropriate.
10317 (riscv_push_dummy_call): Use core_addr_to_string where
10318 appropriate, update call to riscv_print_arg_location, and reindent
10320 (riscv_return_value): Update call to riscv_print_arg_location.
10322 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10323 Tim Newsome <tim@sifive.com>
10324 Albert Ou <a0u@eecs.berkeley.edu>
10325 Darius Rad <darius@bluespec.com>
10327 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10328 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10329 (ALLDEPFILES): Add riscv-tdep.c
10330 * configure.tgt: Add riscv support.
10331 * riscv-tdep.c: New file.
10332 * riscv-tdep.h: New file.
10333 * NEWS: Mention new target.
10334 * MAINTAINERS: Add entry for riscv.
10336 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10338 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10339 fields within aggregates.
10341 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
10343 * record-btrace.c (btrace_print_lines): Change type of flags to
10344 gdb_disassembly_flags.
10346 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10348 * fbsd-nat.c: Include "inf-ptrace.h".
10349 (USE_SIGTRAP_SIGINFO): Conditionally define.
10350 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10351 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10352 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10354 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10356 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10358 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10359 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10360 "supports_stopped_by_hw_breakpoint" target methods.
10362 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10364 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10365 * fbsd-nat.c (debug_fbsd_nat): New variable.
10366 (show_fbsd_nat_debug): New function.
10367 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10368 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10370 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10372 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10373 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10375 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10376 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10379 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10381 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10382 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10384 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10386 * charset.c (struct charset_vector): New.
10387 (charsets): Change type to charset_vector.
10388 (find_charset_names): Adjust.
10390 (_initialize_charset): Adjust.
10392 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10394 * progspace.h (struct program_space) <deleted_solibs>: Change
10395 type to std::vector<std::string>.
10396 * progspace.c (clear_program_space_solib_cache): Adjust.
10397 * breakpoint.c (print_solib_event): Adjust.
10398 (check_status_catch_solib): Adjust.
10399 * solib.c (update_solib_list): Adjust.
10400 * ui-out.h (class ui_out) <field_string>: New overload.
10401 * ui-out.c (ui_out::field_string): New overload.
10403 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10405 * progspace.h (struct program_space): Add constructor and
10406 destructor, initialize fields.
10407 (add_program_space): Remove.
10408 * progspace.c (add_program_space): Rename to...
10409 (program_space::program_space): ... this.
10410 (release_program_space): Rename to...
10411 (program_space::~program_space): ... this.
10412 (delete_program_space): Use delete to delete program_space.
10413 (initialize_progspace): Use new to allocate program_space.
10414 * inferior.c (add_inferior_with_spaces): Likewise.
10415 (clone_inferior_command): Likewise.
10416 * infrun.c (follow_fork_inferior): Likewise.
10417 (handle_vfork_child_exec_or_exit): Likewise.
10419 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10421 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10422 (delim_string_to_char_ptr_vec): Return std::vector of
10423 gdb::unique_xmalloc_ptr.
10424 (dirnames_to_char_ptr_vec_append): Take std::vector of
10425 gdb::unique_xmalloc_ptr.
10426 (dirnames_to_char_ptr_vec): Return std::vector of
10427 gdb::unique_xmalloc_ptr.
10428 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10429 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10430 (delim_string_to_char_ptr_vec): Return an std::vector of
10431 gdb::unique_xmalloc_ptr, adjust the code.
10432 (dirnames_to_char_ptr_vec_append): Take an std::vector of
10433 gdb::unique_xmalloc_ptr, adjust the code.
10434 (dirnames_to_char_ptr_vec): Return an std::vector of
10435 gdb::unique_xmalloc_ptr, adjust the code.
10436 * auto-load.c (auto_load_safe_path_vec): Change type to
10437 std::vector of gdb::unique_xmalloc_ptr.
10438 (auto_load_expand_dir_vars): Return an std::vector of
10439 gdb::unique_xmalloc_ptr, adjust the code.
10440 (auto_load_safe_path_vec_update): Adjust.
10441 (filename_is_in_auto_load_safe_path_vec): Adjust.
10442 (auto_load_objfile_script_1): Adjust.
10443 * build-id.c (build_id_to_debug_bfd): Adjust.
10444 * linux-thread-db.c (thread_db_load_search): Adjust.
10445 * source.c (add_path): Adjust.
10447 * symfile.c (find_separate_debug_file): Adjust.
10448 * utils.c (do_free_char_ptr_vec): Remove.
10449 (make_cleanup_free_char_ptr_vec): Remove.
10451 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
10454 * common/pathstuff.c: Conditionally include "<windows.h>".
10456 2018-03-01 Georg Sauthoff <mail@georg.so>
10459 * gcore.in: Quote variables and switch interpreter to bash.
10461 2018-03-01 Tom Tromey <tom@tromey.com>
10463 * dwarf2read.c (alloc_discriminant_info): Fix default_index
10464 assertion. Add assertion for discriminant_index.
10465 (quirk_rust_enum): Use correct base type name in univariant case.
10467 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
10469 * record.c (get_call_history_modifiers): Return a
10470 record_print_flags.
10471 (cmd_record_call_history): Adjust.
10472 * record-btrace.c (record_btrace_call_history): Adjust.
10473 (record_btrace_call_history_range): Adjust.
10474 (record_btrace_call_history_from): Adjust.
10475 * target-debug.h (target_debug_print_record_print_flags): New.
10476 * target-delegates.c: Re-generate.
10477 * target.c (target_call_history): Change flags type.
10478 (target_call_history_from): Likewise.
10479 (target_call_history_range): Likewise.
10480 * target.h (struct target_ops) <target_call_history>: Likewise.
10481 (target_call_history_from): Likewise.
10482 (target_call_history_range): Likewise.
10484 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10485 Simon Marchi <simon.marchi@polymtl.ca>
10487 * common/common-utils.c: Include "sys/stat.h".
10488 (is_regular_file): Move here from "source.c"; change return
10490 * common/common-utils.h (is_regular_file): New prototype.
10491 * common/pathstuff.c (contains_dir_separator): New function.
10492 * common/pathstuff.h (contains_dir_separator): New prototype.
10493 * source.c: Don't include "sys/stat.h".
10494 (is_regular_file): Move to "common/common-utils.c".
10496 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10498 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10499 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10500 * auto-load.c: Include "common/pathstuff.h".
10501 * common/common-def.h (current_directory): Move here.
10502 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10504 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10506 * common/pathstuff.c: New file.
10507 * common/pathstuff.h: New file.
10508 * compile/compile.c: Include "common/pathstuff.h".
10509 * defs.h (current_directory): Move to "common/common-defs.h".
10510 * dwarf2read.c: Include "common/pathstuff.h".
10511 * exec.c: Likewise.
10512 * guile/scm-safe-call.c: Likewise.
10513 * linux-thread-db.c: Likewise.
10514 * main.c: Likewise.
10515 * nto-tdep.c: Likewise.
10516 * objfiles.c: Likewise.
10517 * source.c: Likewise.
10518 * symtab.c: Likewise.
10519 * utils.c: Include "common/pathstuff.h".
10520 (gdb_realpath): Move to "common/pathstuff.c".
10521 (gdb_realpath_keepfile): Likewise.
10522 (gdb_abspath): Likewise.
10523 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10524 (gdb_realpath_keepfile): Likewise.
10525 (gdb_abspath): Likewise.
10527 2018-02-28 John Baldwin <jhb@FreeBSD.org>
10529 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10530 wildcard process pid for super_resume for kernels with a
10533 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
10535 * compile/compile.c (get_args): Add additional comments
10536 explaining function.
10538 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
10539 Tom Tromey <tom@tromey.com>
10541 * target.h (memory_write_request_s): Remove typedef. Don't define
10543 (target_write_memory_blocks): Change argument to std::vector.
10544 (struct memory_write_request): Add constructor.
10545 * target-memory.c (compare_block_starting_address): Return bool.
10546 Change argument types.
10547 (claim_memory): Change arguments to use std::vector.
10548 (split_regular_and_flash_blocks, blocks_to_erase)
10549 (compute_garbled_blocks): Likewise.
10550 (cleanup_request_data, cleanup_write_requests_vector): Remove.
10551 (target_write_memory_blocks): Change argument to std::vector.
10552 * symfile.c (struct load_section_data): Add constructor and
10553 destructor. Use std::vector for "requests".
10554 (struct load_progress_data): Add initializers.
10555 (load_section_callback): Update. Use "new".
10556 (clear_memory_write_data): Remove.
10557 (generic_load): Update.
10559 2018-02-27 Alan Hayward <alan.hayward@arm.com>
10561 * arch/aarch64.h: Use common/tdesc.h.
10563 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10565 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10566 architecture with a 64-bit ABI.
10568 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10570 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10571 ahead of target description loading.
10573 2018-02-26 Tom Tromey <tom@tromey.com>
10575 * stack.c (backtrace_command_1): Update.
10576 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10578 * python/py-framefilter.c (py_print_frame)
10579 (gdbpy_apply_frame_filter): Change type of "flags".
10580 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10582 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10583 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10584 * extension.h (enum frame_filter_flag): Rename from
10585 frame_filter_flags.
10586 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10587 (apply_ext_lang_frame_filter): Change type of "flags".
10588 * extension.c (apply_ext_lang_frame_filter): Change type of
10590 * extension-priv.h (struct extension_language_ops)
10591 <apply_frame_filter>: Change type of "flags".
10593 2018-02-26 Tom Tromey <tom@tromey.com>
10596 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
10597 off-by-one in py_end computation.
10598 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10600 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10603 2018-02-26 Tom Tromey <tom@tromey.com>
10605 * dwarf2read.c (struct variant_field): New.
10606 (struct nextfield) <variant>: New field.
10607 (dwarf2_add_field): Handle DW_TAG_variant_part.
10608 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10609 discriminated union.
10610 (read_structure_type): Handle DW_TAG_variant_part.
10611 (handle_struct_member_die): New function, extracted from
10612 process_structure_scope. Handle DW_TAG_variant.
10613 (process_structure_scope): Handle discriminated unions. Call
10614 handle_struct_member_die.
10616 2018-02-26 Tom Tromey <tom@tromey.com>
10618 * rust-lang.h (rust_last_path_segment): Declare.
10619 * rust-lang.c (rust_last_path_segment): Now public. Change
10621 (struct disr_info): Remove.
10622 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10623 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10624 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10625 (rust_enum_p, rust_enum_variant): New function.
10626 (rust_underscore_fields): Remove "offset" parameter.
10627 (rust_print_enum): New function.
10628 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10629 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10630 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
10632 (rust_internal_print_type): New function, from rust_print_type.
10634 (rust_print_type): Call rust_internal_print_type.
10635 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10636 Update enum handling.
10637 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10638 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10639 (rust_union_quirks): New functions.
10640 (process_full_comp_unit, process_full_type_unit): Call
10642 (process_structure_scope): Update rust_unions if necessary.
10644 2018-02-26 Tom Tromey <tom@tromey.com>
10646 * value.h (value_union_variant): Declare.
10647 * valops.c (value_union_variant): New function.
10648 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10649 (struct discriminant_info): New.
10650 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10652 (struct main_type) <flag_discriminated_union>: New field.
10654 2018-02-26 Tom Tromey <tom@tromey.com>
10656 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10657 unittests/unpack-selftests.c.
10658 * unittests/unpack-selftests.c: New file.
10659 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10661 2018-02-26 Yao Qi <yao.qi@linaro.org>
10663 * dwarf2read.c (struct partial_die_info) <read>: New method.
10664 (read_partial_die): Remove the declaration.
10665 (load_partial_dies): Update.
10666 (partial_die_info::partial_die_info):
10667 (read_partial_die): Change it to partial_die_info::read.
10669 2018-02-26 Yao Qi <yao.qi@linaro.org>
10671 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10672 (fixup_partial_die): Remove declaration.
10673 (scan_partial_symbols): Update.
10674 (partial_die_parent_scope): Likewise.
10675 (partial_die_full_name): Likewise.
10676 (fixup_partial_die): Change it to partial_die_info::fixup.
10678 2018-02-26 Yao Qi <yao.qi@linaro.org>
10680 * dwarf2read.c (read_partial_die): Update the declaration.
10681 (load_partial_dies): Caller update.
10682 (read_partial_die): Remove one argument abbrev_len.
10684 2018-02-26 Yao Qi <yao.qi@linaro.org>
10686 * dwarf2read.c (struct partial_die_info): Add ctor, delete
10687 assignment operator.
10688 (load_partial_dies): Use ctor and copy ctor.
10689 (read_partial_die): Update.
10690 (dwarf2_cu::find_partial_die): Use ctor.
10692 2018-02-26 Yao Qi <yao.qi@linaro.org>
10694 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10695 (find_partial_die_in_comp_unit): Change it to
10696 dwarf2_cu::find_partial_die.
10697 (find_partial_die): Update.
10699 2018-02-26 Yao Qi <yao.qi@linaro.org>
10701 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10704 2018-02-26 Yao Qi <yao.qi@linaro.org>
10706 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10708 2018-02-26 Alan Hayward <alan.hayward@arm.com>
10710 * arch/amd64.h: Use common/tdesc.h.
10711 * arch/i386.c: Likewise.
10712 * arch/i386.h: Likewise.
10713 * arch/tic6x.c: Likewise.
10714 * arch/tdesc.h: Move file from here...
10715 * common/tdesc.h: ...to here.
10716 * features/aarch64-core.c: Regenerate.
10717 * features/aarch64-fpu.c: Regenerate.
10718 * features/i386/32bit-avx.c: Regenerate.
10719 * features/i386/32bit-avx512.c: Regenerate.
10720 * features/i386/32bit-core.c: Regenerate.
10721 * features/i386/32bit-linux.c: Regenerate.
10722 * features/i386/32bit-mpx.c: Regenerate.
10723 * features/i386/32bit-pkeys.c: Regenerate.
10724 * features/i386/32bit-sse.c: Regenerate.
10725 * features/i386/64bit-avx.c: Regenerate.
10726 * features/i386/64bit-avx512.c: Regenerate.
10727 * features/i386/64bit-core.c: Regenerate.
10728 * features/i386/64bit-linux.c: Regenerate.
10729 * features/i386/64bit-mpx.c: Regenerate.
10730 * features/i386/64bit-pkeys.c: Regenerate.
10731 * features/i386/64bit-segments.c: Regenerate.
10732 * features/i386/64bit-sse.c: Regenerate.
10733 * features/i386/x32-core.c: Regenerate.
10734 * features/tic6x-c6xp.c: Regenerate.
10735 * features/tic6x-core.c: Regenerate.
10736 * features/tic6x-gp.c: Regenerate.
10737 * target-descriptions.c: Use common/tdesc.h.
10738 * target-descriptions.h: Likewise.
10740 2018-02-24 Tom Tromey <tom@tromey.com>
10742 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10743 (try_thread_db_load_from_dir, thread_db_load_search): Use
10745 (info_auto_load_libthread_db_compare): Return bool. Change
10747 (info_auto_load_libthread_db): Use std::vector, std::string.
10750 2018-02-24 Tom Tromey <tom@tromey.com>
10752 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10754 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10756 * gdbarch.c: Rebuild.
10757 * gdbarch.h: Rebuild.
10758 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10759 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10760 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10763 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
10765 * gdbtypes.h (sect_offset): Change type to uint64_t.
10766 (sect_offset_str): New function.
10767 * dwarf2read.c (create_addrmap_from_aranges): Use
10769 (error_check_comp_unit_head): Likewise.
10770 (create_debug_type_hash_table): Likewise.
10771 (read_cutu_die_from_dwo): Likewise.
10772 (init_cutu_and_read_dies): Likewise.
10773 (init_cutu_and_read_dies_no_follow): Likewise.
10774 (process_psymtab_comp_unit_reader): Likewise.
10775 (partial_die_parent_scope): Likewise.
10776 (peek_die_abbrev): Likewise.
10777 (process_queue): Likewise.
10778 (dwarf2_physname): Likewise.
10779 (read_namespace_alias): Likewise.
10780 (read_import_statement): Likewise.
10781 (create_dwo_cu_reader): Likewise.
10782 (create_cus_hash_table): Likewise.
10783 (lookup_dwo_cutu): Likewise.
10784 (inherit_abstract_dies): Likewise.
10785 (read_func_scope): Likewise.
10786 (read_call_site_scope): Likewise.
10787 (dwarf2_add_member_fn): Likewise.
10788 (read_common_block): Likewise.
10789 (read_module_type): Likewise.
10790 (read_typedef): Likewise.
10791 (read_subrange_type): Likewise.
10792 (load_partial_dies): Likewise.
10793 (read_partial_die): Likewise.
10794 (find_partial_die): Likewise.
10795 (read_str_index): Likewise.
10796 (dwarf2_string_attr): Likewise.
10797 (build_error_marker_type): Likewise.
10798 (lookup_die_type): Likewise.
10799 (dump_die_shallow): Likewise.
10800 (follow_die_ref): Likewise.
10801 (dwarf2_fetch_die_loc_sect_off): Likewise.
10802 (dwarf2_fetch_constant_bytes): Likewise.
10803 (follow_die_sig): Likewise.
10804 (get_signatured_type): Likewise.
10805 (get_DW_AT_signature_type): Likewise.
10806 (dwarf2_find_containing_comp_unit): Likewise.
10807 (set_die_type): Likewise.
10809 2018-02-21 John Baldwin <jhb@FreeBSD.org>
10811 * arch/aarch64.c: Include "common-defs.h".
10812 * arch/amd64.c: Likewise.
10813 * arch/i386.c: Likewise.
10815 2018-02-21 Tom Tromey <tom@tromey.com>
10817 * value.h: (extract_field_op): Update.
10818 * eval.c (extract_field_op): Return a const char *.
10819 * expression.h (parse_expression_for_completion): Update.
10820 * completer.c (complete_expression): Update.
10821 (add_struct_fields): Make fieldname const.
10822 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10823 (mark_completion_tag, parse_exp_in_context_1): Update.
10824 (parse_expression_for_completion): Change "name" to
10825 unique_xmalloc_ptr*.
10827 2018-02-21 Tom Tromey <tom@tromey.com>
10829 * infcall.c (call_function_by_hand_dummy): Use std::vector.
10831 2018-02-21 Yao Qi <yao.qi@linaro.org>
10833 * avr-tdep.c (avr_read_pc): Change parameter type to
10835 * gdbarch.sh (read_pc): Likewise.
10836 * gdbarch.c: Re-generated.
10837 * gdbarch.h: Re-generated.
10838 * hppa-tdep.c (hppa_read_pc): Change parameter type to
10840 * ia64-tdep.c (ia64_read_pc): Likewise.
10841 * mips-tdep.c (mips_read_pc): Likewise.
10842 * spu-tdep.c (spu_read_pc): Likewise.
10844 2018-02-21 Yao Qi <yao.qi@linaro.org>
10846 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10847 * regcache-dump.c: New file.
10848 * regcache.c: Move register_dump to regcache-dump.c.
10849 (maintenance_print_registers): Likewise.
10850 (maintenance_print_raw_registers): Likewise.
10851 (maintenance_print_cooked_registers): Likewise.
10852 (maintenance_print_register_groups): Likewise.
10853 (maintenance_print_remote_registers): Likewise.
10854 (_initialize_regcache): Likewise.
10855 * regcache.h (register_dump): Moved from regcache.c.
10857 2018-02-21 Yao Qi <yao.qi@linaro.org>
10859 * regcache.c (regcache::regcache): Update.
10860 (regcache::invalidate): Move it to detached_regcache::invalidate.
10861 (get_thread_arch_aspace_regcache): Update.
10862 (regcache::raw_update): Update.
10863 (regcache::cooked_read): Remove some code.
10864 (regcache::cooked_read_value): Likewise.
10865 (regcache::raw_write): Remove assert on m_readonly_p.
10866 (regcache::raw_supply_integer): Move it to
10867 detached_regcache::raw_supply_integer.
10868 (regcache::raw_supply_zeroed): Likewise.
10869 * regcache.h (detached_regcache) <raw_supply_integer>: New
10871 <raw_supply_zeroed, invalidate>: Likewise.
10872 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10873 <invalidate>: Likewise.
10874 <m_readonly_p>: Removed.
10876 2018-02-21 Yao Qi <yao.qi@linaro.org>
10878 * infcmd.c (get_return_value): Let stop_regs point to
10879 get_current_regcache.
10880 * regcache.c (regcache::regcache): Remove.
10881 (register_dump_reg_buffer): New class.
10882 (regcache_print): Adjust.
10883 * regcache.h (regcache): Remove constructors.
10885 2018-02-21 Yao Qi <yao.qi@linaro.org>
10887 * regcache.c (class register_dump): New class.
10888 (register_dump_regcache, register_dump_none): New class.
10889 (register_dump_remote, register_dump_groups): New class.
10890 (regcache_print): Update.
10891 * regcache.h (regcache_dump_what): Move it to regcache.c.
10892 (regcache) <dump>: Remove.
10894 2018-02-21 Yao Qi <yao.qi@linaro.org>
10896 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10898 (jit_unwind_reg_set_impl): Call raw_supply.
10899 (jit_frame_sniffer): Use reg_buffer_rw.
10900 * record-full.c (record_full_core_regbuf): Change its type.
10901 (record_full_core_open_1): Use reg_buffer_rw.
10902 (record_full_close): Likewise.
10903 (record_full_core_fetch_registers): Use regcache->raw_supply.
10904 (record_full_core_store_registers): Likewise.
10905 * regcache.c (regcache::get_register_status): Move it to
10907 (regcache_raw_set_cached_value): Remove.
10908 (regcache::raw_set_cached_value): Remove.
10909 (regcache::raw_write): Call raw_supply.
10910 (regcache::raw_supply): Move it to reg_buffer_rw.
10911 * regcache.h (regcache_raw_set_cached_value): Remove.
10912 (reg_buffer_rw): New class.
10914 2018-02-21 Yao Qi <yao.qi@linaro.org>
10916 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10917 readonly_detached_regcache.
10918 (dummy_frame_prev_register): Use regcache->cooked_read.
10919 * frame.c (frame_save_as_regcache): Change return type.
10920 (frame_pop): Update.
10921 * frame.h (frame_save_as_regcache): Update declaration.
10922 * inferior.h (get_infcall_suspend_state_regcache): Update
10924 * infrun.c (infcall_suspend_state) <registers>: use
10925 readonly_detached_regcache.
10926 (save_infcall_suspend_state): Don't use regcache_dup.
10927 (get_infcall_suspend_state_regcache): Change return type.
10928 * linux-fork.c (struct fork_info) <savedregs>: Change to
10929 readonly_detached_regcache.
10931 (fork_save_infrun_state): Don't use regcache_dup.
10932 (info_checkpoints_command): Adjust.
10933 * mi/mi-main.c (register_changed_p): Update declaration.
10934 (mi_cmd_data_list_changed_registers): Use
10935 readonly_detached_regcache.
10936 (register_changed_p): Change parameter type to
10937 readonly_detached_regcache.
10938 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10939 readonly_detached_regcache.
10940 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10941 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10943 (regcache::save): Move it to reg_buffer.
10944 (regcache::restore): Change parameter type.
10945 (regcache_dup): Remove.
10946 * regcache.h (reg_buffer) <save>: New method.
10947 (readonly_detached_regcache): New class.
10948 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10949 readonly_detached_regcache.
10950 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10952 2018-02-21 Yao Qi <yao.qi@linaro.org>
10954 * frame.c (frame_save_as_regcache): Use regcache method save.
10955 (frame_pop): Use regcache method restore.
10956 * infrun.c (restore_infcall_suspend_state): Likewise.
10957 * linux-fork.c (fork_load_infrun_state): Likewise.
10958 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10960 * regcache.c (regcache_save): Remove.
10961 (regcache::restore): More asserts.
10962 (regcache_cpy): Remove.
10963 * regcache.h (regcache_save): Remove the declaration.
10964 (regcache::restore): Move from private to public.
10965 Remove the friend declaration of regcache_cpy.
10966 (regcache_cpy): Remove declaration.
10968 2018-02-21 Yao Qi <yao.qi@linaro.org>
10970 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10971 parameter type to 'readable_regcache *'.
10972 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10973 * arm-tdep.c (arm_neon_quad_read): Likewise.
10974 (arm_pseudo_read): Likewise.
10975 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10976 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10977 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10978 * gdbarch.c: Re-generated.
10979 * gdbarch.h: Re-generated.
10980 * gdbarch.sh (pseudo_register_read): Change parameter type to
10981 'readable_regcache *'.
10982 (pseudo_register_read_value): Likewise.
10983 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10984 (h8300_pseudo_register_read): Likewise.
10985 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10986 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10987 (i386_pseudo_register_read_into_value): Likewise.
10988 (i386_pseudo_register_read_value): Likewise.
10989 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10991 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10992 * m32c-tdep.c (m32c_raw_read): Likewise.
10993 (m32c_read_flg): Likewise.
10994 (m32c_banked_register): Likewise.
10995 (m32c_banked_read): Likewise.
10996 (m32c_sb_read): Likewise.
10997 (m32c_part_read): Likewise.
10998 (m32c_cat_read): Likewise.
10999 (m32c_r3r2r1r0_read): Likewise.
11000 (m32c_pseudo_register_read): Likewise.
11001 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11002 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11003 (mep_pseudo_cr64_read): Likewise.
11004 (mep_pseudo_register_read): Likewise.
11005 * mips-tdep.c (mips_pseudo_register_read): Likewise.
11006 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11007 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11008 * regcache.c (regcache::raw_read): Move it to readable_regcache.
11009 (regcache::cooked_read): Likewise.
11010 (regcache::cooked_read_value): Likewise.
11011 (regcache_cooked_read_signed):
11012 (regcache::cooked_read): Likewise.
11013 * regcache.h (readable_regcache): New class.
11014 (regcache): Inherit readable_regcache. Move some methods to
11016 * rl78-tdep.c (rl78_pseudo_register_read): Change
11017 parameter type to 'readable_regcache *'.
11018 * rs6000-tdep.c (do_regcache_raw_read): Remove.
11019 (e500_pseudo_register_read): Change parameter type to
11020 'readable_regcache *'.
11021 (dfp_pseudo_register_read): Likewise.
11022 (vsx_pseudo_register_read): Likewise.
11023 (efpr_pseudo_register_read): Likewise.
11024 * s390-tdep.c (s390_pseudo_register_read): Likewise.
11025 * sh-tdep.c (sh_pseudo_register_read): Likewise.
11026 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11027 (sh64_pseudo_register_read): Likewise.
11028 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11029 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11030 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11031 (spu_pseudo_register_read): Likewise.
11032 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11033 (xtensa_pseudo_register_read): Likewise.
11035 2018-02-21 Yao Qi <yao.qi@linaro.org>
11037 * regcache.c (regcache::regcache): Call reg_buffer ctor.
11038 (regcache::arch): Move it to reg_buffer::arch.
11039 (regcache::register_buffer): Likewise.
11040 (regcache::assert_regnum): Likewise.
11041 (regcache::num_raw_registers): Likewise.
11042 * regcache.h (reg_buffer): New class.
11043 (regcache): Inherit reg_buffer.
11045 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
11047 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11048 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11050 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
11052 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11054 2018-02-19 Alan Hayward <alan.hayward@arm.com>
11056 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11057 (SFILES): Remove common/*.c files.
11058 (COMMON_OBS): Remove some *.o files built from common/*.c files.
11059 * common/common.host: Add common reference.
11060 * configure.ac: Likewise.
11061 * configure: Regenerate.
11063 2018-02-16 Yao Qi <yao.qi@linaro.org>
11065 * block.c (block_namespace_info): Inherit allocate_on_obstack.
11066 (block_initialize_namespace): Use new.
11067 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11068 (dwarf2_free_objfile): Use delete.
11069 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11070 (copy_type_recursive): Use new.
11071 * gdb_obstack.h (allocate_on_obstack): New.
11073 2018-02-15 Yao Qi <yao.qi@linaro.org>
11076 * inferior.c (exit_inferior_1): Reset inf->control.
11078 2018-02-15 Joel Brobecker <brobecker@adacore.com>
11080 * ada-lang.c (ada_to_fixed_value_create): Delete advance
11083 2018-02-14 Pedro Alves <palves@redhat.com>
11085 * frame-unwind.c (frame_unwind_try_unwinder): Always call
11086 frame_cleanup_after_sniffer on exception.
11088 2018-02-14 Tom Tromey <tom@tromey.com>
11090 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11092 (solib_bfd_open): Make pathname const.
11093 * solib.c (solib_bfd_open): Make pathname const.
11094 * solib-spu.c (spu_bfd_fopen): Make name const.
11095 (spu_bfd_open): Make pathname const.
11096 * solib-darwin.c (darwin_bfd_open): Make pathname const.
11097 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11099 2018-02-14 Tom Tromey <tom@tromey.com>
11101 * symfile.c (symfile_bfd_open): Update.
11102 * source.h (openp, source_full_path_of, find_and_open_source):
11103 Change argument type to unique_xmalloc_ptr.
11104 * source.c (openp): Take a unique_xmalloc_ptr.
11105 (source_full_path_of, find_and_open_source): Likewise.
11106 (open_source_file, symtab_to_fullname): Update.
11107 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11108 unique_xmalloc_ptr.
11109 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11110 (exec_file_find): Update.
11111 * psymtab.c (psymtab_to_fullname): Update.
11112 * nto-tdep.h (nto_find_and_open_solib): Update.
11113 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11114 unique_xmalloc_ptr.
11115 * exec.c (exec_file_attach): Update.
11116 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11117 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11119 2018-02-14 Tom Tromey <tom@tromey.com>
11121 * solib.c: Include source.h.
11122 * nto-tdep.c: Include source.h.
11123 * mi/mi-cmd-env.c: Include source.h.
11124 * infcmd.c: Include source.h.
11125 * exec.c: Include source.h.
11126 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11127 (add_path, directory_switch, source_path, init_source_path): Move
11129 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11130 (add_path, directory_switch, source_path, init_source_path):
11133 2018-02-14 Tom Tromey <tom@tromey.com>
11135 * solist.h (exec_file_find, solib_find): Return
11136 unique_xmalloc_ptr.
11137 (solib_bfd_fopen): Take a const char *.
11138 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11139 (exec_file_find, solib_find): Likewise.
11140 (solib_bfd_fopen): Do not take ownership of "pathname".
11141 (solib_bfd_open): Use unique_xmalloc_ptr.
11142 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11143 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11144 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11145 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11147 2018-02-14 Joel Brobecker <brobecker@adacore.com>
11149 * ada-lang.c (name_match_type_from_name): Remove reference to
11150 ada_name_for_lookup in function's documentation.
11151 * ada-lang.h (ada_name_for_lookup): Delete declaration.
11153 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11155 * defs.h (enum openp_flags): New enum.
11156 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11157 Move to enum openp_flags.
11158 (openp_flags): New enum flags.
11159 (openp): Change parameter type to openp_flags.
11160 * source.c (openp): Change parameter type to openp_flags.
11161 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11162 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11164 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11166 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11169 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
11171 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11173 (class dwarf2_queue_guard): ...the destructor of this new class.
11174 (dw2_do_instantiate_symtab): Create instance of the new class
11175 dwarf2_queue_guard, remove cleanup.
11177 2018-02-09 Tom Tromey <tom@tromey.com>
11179 * source.c (find_source_lines): Don't reference past the end of
11182 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11184 * remote.c (remote_btrace_maybe_reopen): Change error message.
11185 * btrace.c (btrace_enable): Likewise.
11186 (parse_xml_btrace): Likewise.
11187 (parse_xml_btrace_conf): Likewise.
11189 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11191 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11192 (linux_enable_pt, linux_enable_bts): Call
11193 diagnose_perf_event_open_fail.
11195 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11197 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11198 Remove parameter and change return type. Update callers. Move it.
11199 (linux_enable_bts, linux_enable_pt): Improve error message.
11200 (linux_enable_pt): Remove zero buffer size check.
11201 (linux_enable_btrace): Improve error messages. Remove NULL return
11204 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11206 * btrace.c (btrace_enable): Remove target_supports_btrace call.
11207 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11208 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11209 (linux_supports_pt, linux_supports_btrace): Remove.
11210 (linux_enable_bts): Call cpu_supports_bts.
11211 * nat/linux-btrace.h (linux_supports_btrace): Remove.
11212 * remote.c (remote_supports_btrace): Remove.
11213 (init_remote_ops): Remove remote_supports_btrace.
11214 * target-delegates.c: Regenerated.
11215 * target.c (target_supports_btrace): Remove.
11216 * target.h (target_ops) <to_supports_btrace>: Remove
11217 (target_supports_btrace): Remove.
11218 * x86-linux-nat.c (x86_linux_create_target): Remove
11219 linux_supports_btrace.
11221 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11223 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11225 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11226 exception and use message in own exception.
11228 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11230 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11231 (perf_event_pt_event_type): Use gdb_file_up.
11232 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11233 scoped_fd, and scoped_mmap.
11235 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11237 * common/scoped_mmap.h: New.
11238 * unittests/scoped_mmap-selftest.c: New.
11239 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11240 unittests/scoped_mmap-selftest.c.
11242 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11244 * common/scoped_fd.h: New.
11245 * unittests/scoped_fd-selftest.c: New.
11246 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11247 unittests/scoped_fd-selftest.c.
11249 2018-02-09 Tom Tromey <tom@tromey.com>
11251 * auto-load.c (auto_load_section_scripts): Use
11252 gdb::unique_xmalloc_ptr.
11254 2018-02-09 Tom Tromey <tom@tromey.com>
11256 * auto-load.c (execute_script_contents): Use std::string.
11258 2018-02-09 Joel Brobecker <brobecker@adacore.com>
11260 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11261 Python function, rather than a new command.
11263 2018-02-08 Tom Tromey <tom@tromey.com>
11265 * solib.c (solib_find_1): Use std::string.
11266 (solib_bfd_fopen): Use unique_xmalloc_ptr.
11268 2018-02-08 Tom Tromey <tom@tromey.com>
11270 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11272 2018-02-08 Tom Tromey <tom@tromey.com>
11274 * source.c (find_source_lines): Use gdb::def_vector.
11276 2018-02-08 Tom Tromey <tom@tromey.com>
11278 * macrocmd.c (struct temporary_macro_definition): New.
11279 (macro_define_command): Use temporary_macro_definition. Remove
11281 (free_macro_definition_ptr): Remove.
11283 2018-02-08 Tom Tromey <tom@tromey.com>
11285 * macroexp.c (maybe_expand): Use std::string.
11287 2018-02-08 Tom Tromey <tom@tromey.com>
11289 * macroexp.c (struct macro_buffer): Add initializers for some
11291 (init_buffer, init_shared_buffer, free_buffer)
11292 (free_buffer_return_text): Remove.
11293 (macro_buffer): New constructors.
11294 (~macro_buffer): New destructor.
11295 (macro_buffer::set_shared): New method.
11296 (macro_buffer::resize_buffer, macro_buffer::appendc)
11297 (macro_buffer::appendmem): Now methods, not free functions.
11298 (set_token, append_tokens_without_splicing, stringify)
11299 (macro_stringify): Update.
11300 (gather_arguments): Change return type. Remove argc_p argument,
11301 add args_ptr argument. Use std::vector.
11302 (substitute_args): Remove argc argument. Accept std::vector.
11303 (expand): Update. Use std::vector.
11304 (scan, macro_expand, macro_expand_next): Update.
11306 2018-02-08 Tom Tromey <tom@tromey.com>
11308 * symtab.c (default_collect_symbol_completion_matches_break_on):
11309 Use unique_xmalloc_ptr.
11310 * macroscope.h: (sal_macro_scope, user_macro_scope)
11311 (default_macro_scope): Return unique_xmalloc_ptr.
11312 * macroscope.c (sal_macro_scope, user_macro_scope)
11313 (default_macro_scope): Return unique_xmalloc_ptr.
11314 * macroexp.h (macro_expand, macro_expand_once): Return
11315 unique_xmalloc_ptr.
11316 * macroexp.c (macro_expand, macro_expand_once): Return
11317 unique_xmalloc_ptr.
11318 * macrocmd.c (macro_expand_command, macro_expand_once_command)
11319 (info_macro_command, info_macros_command): Use
11320 unique_xmalloc_ptr.
11321 * compile/compile-c-support.c (write_macro_definitions): Use
11322 unique_xmalloc_ptr.
11323 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11325 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
11327 * value.c (value_static_field): Assign field type instead of
11328 containing type when returning an optimized out value.
11330 2018-02-06 Yao Qi <yao.qi@linaro.org>
11332 * ft32-tdep.c (ft32_read_pc): Remove.
11333 (ft32_write_pc): Remove.
11334 (ft32_gdbarch_init): Update.
11335 * m32r-tdep.c (m32r_read_pc): Remove.
11336 (m32r_gdbarch_init): Update.
11337 * mep-tdep.c (mep_read_pc): Remove.
11338 (mep_gdbarch_init): Update.
11339 * microblaze-tdep.c (microblaze_write_pc): Remove.
11340 (microblaze_gdbarch_init): Update.
11341 * mn10300-tdep.c (mn10300_read_pc): Remove.
11342 (mn10300_write_pc): Remove.
11343 (mn10300_gdbarch_init): Update.
11344 * moxie-tdep.c (moxie_read_pc): Remove.
11345 (moxie_write_pc): Remove.
11346 (moxie_gdbarch_init): Update.
11348 2018-02-06 Yao Qi <yao.qi@linaro.org>
11350 * expprint.c (print_subexp_standard): Handle
11351 OP_F77_UNDETERMINED_ARGLIST.
11352 (dump_subexp_body_standard): Likewise.
11354 2018-02-05 Alan Hayward <alan.hayward@arm.com>
11356 * target-descriptions.c (tdesc_element_visitor) Add empty
11358 (tdesc_type): Move make_gdb_type from here.
11359 (tdesc_type_builtin): Likewise.
11360 (tdesc_type_vector): Likewise.
11361 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11362 (make_gdb_type_struct): Move from tdesc_type_with_fields.
11363 (make_gdb_type_union): Likewise.
11364 (make_gdb_type_flags): Likewise.
11365 (make_gdb_type_enum): Likewise.
11366 (make_gdb_type): New function.
11367 (tdesc_register_type): Use static make_gdb_type.
11369 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
11371 * infcmd.c (default_print_one_register_info): Align natural-format
11372 column values consistently one under another.
11373 (pad_to_column): New function.
11375 2018-02-05 Joel Brobecker <brobecker@adacore.com>
11377 * dwarf2read.c (dwarf2_physname): Move commment.
11379 2018-02-01 Leszek Swirski <leszeks@google.com>
11381 * varobj.c (varobj_formatted_print_options): Allow recursive
11382 pretty printing if pretty printing is enabled.
11384 2018-02-01 Leszek Swirski <leszeks@google.com>
11386 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11387 names after a structop as a filename.
11389 2018-02-01 Yao Qi <yao.qi@linaro.org>
11391 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11392 (arm_record_coproc_data_proc): Likewise.
11394 2018-02-01 Yao Qi <yao.qi@linaro.org>
11396 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11398 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
11400 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11401 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11403 2018-01-31 Pedro Alves <palves@redhat.com>
11405 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11406 * inflow.c (child_terminal_save_inferior): Wrap reference to
11407 tcgetpgrp in HAVE_TERMIOS_H.
11408 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11410 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11411 always iterate over all inferiors.
11412 (gdbsim_cntrl_c): Adjust.
11413 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11415 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11417 * gdbtypes.c (lookup_array_range_type): Make sure the array's
11418 index type is objfile-owned if the element type is as well.
11420 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11424 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
11426 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11427 "features/s390x-linux64.c".
11428 (_initialize_s390_linux_tdep): Remove initialization of tdescs
11429 s390_linux32 and s390x_linux64.
11430 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11432 * s390-tdep.c: Include "features/s390-linux32.c" and
11433 "features/s390x-linux64.c".
11434 (s390_tdesc_valid): Add check for tdesc_has_registers.
11435 (s390_gdbarch_init): Make sure there is always a valid tdesc.
11436 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11437 tdesc_s390x_linux64.
11438 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11439 tdesc_s390x_linux64 to...
11440 * s390-tdep.h: ...here.
11442 2018-01-30 Pedro Alves <palves@redhat.com>
11445 * config.in, configure: Regenerate.
11446 * configure.ac: Check for getpgid.
11447 * go32-nat.c (go32_pass_ctrlc): New.
11448 (go32_target): Install it.
11449 * inf-child.c (inf_child_target): Install
11450 child_terminal_save_inferior, child_pass_ctrlc and
11452 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11453 (inf_ptrace_target): No longer install it.
11454 * infcmd.c (interrupt_target_1): Adjust.
11455 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11456 (child_interrupt): Declare.
11457 (inferior::terminal_state): New.
11458 * inflow.c (struct terminal_info): Update comments.
11459 (inferior_process_group): Delete.
11460 (terminal_is_ours): Delete.
11461 (gdb_tty_state): New.
11462 (child_terminal_init): Adjust.
11463 (is_gdb_terminal, sharing_input_terminal_1)
11464 (sharing_input_terminal): New functions.
11465 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
11466 Set the process's actual process group in the foreground if
11467 possible. Handle is_ours_for_output/is_ours distinction. Don't
11468 mark terminal as the inferior's if not sharing GDB's terminal.
11469 Don't check attach_flag.
11470 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11471 pass down a target_terminal_state.
11472 (child_terminal_save_inferior): New, factored out from ...
11473 (child_terminal_ours_1): ... this. Handle
11474 target_terminal_state::is_ours_for_output.
11475 (child_interrupt, child_pass_ctrlc): New.
11476 (inflow_inferior_exit): Clear the inferior's terminal_state.
11477 (copy_terminal_info): Copy the inferior's terminal state.
11478 (_initialize_inflow): Remove reference to terminal_is_ours.
11479 * inflow.h (inferior_process_group): Delete.
11480 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11481 * procfs.c (procfs_target): Don't install procfs_interrupt.
11482 (procfs_interrupt): Delete.
11483 * remote.c (remote_serial_quit_handler): Adjust.
11484 (remote_interrupt): Remove ptid parameter. Adjust.
11485 * target-delegates.c: Regenerate.
11486 * target.c: Include "terminal.h".
11487 (target_terminal::terminal_state): Rename to ...
11488 (target_terminal::m_terminal_state): ... this.
11489 (target_terminal::init): Adjust.
11490 (target_terminal::inferior): Adjust to per-inferior
11492 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11493 (target_terminal::ours, target_terminal::ours_for_output): Use
11494 target_terminal_is_ours_kind.
11495 (target_interrupt): Remove ptid parameter. Adjust.
11496 (default_target_pass_ctrlc): Adjust.
11497 * target.h (target_ops::to_terminal_save_inferior): New field.
11498 (target_ops::to_interrupt): Remove ptid_t parameter.
11499 (target_interrupt): Remove ptid_t parameter. Update comment.
11500 (target_pass_ctrlc): Update comment.
11501 * target/target.h (target_terminal_state): New scoped enum,
11502 factored out of ...
11503 (target_terminal::terminal_state): ... here.
11504 (target_terminal::inferior): Update comments.
11505 (target_terminal::restore_inferior): New.
11506 (target_terminal::is_inferior, target_terminal::is_ours)
11507 (target_terminal::is_ours_for_output): Adjust.
11508 (target_terminal::scoped_restore_terminal_state): Adjust to
11509 rename, and call restore_inferior() instead of inferior().
11510 (target_terminal::scoped_restore_terminal_state::m_state): Change
11512 (target_terminal::terminal_state): Rename to ...
11513 (target_terminal::m_terminal_state): ... this and change type.
11515 2018-01-30 Pedro Alves <palves@redhat.com>
11517 * linux-nat.c (wait_for_signal): New function.
11518 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11520 (async_terminal_is_ours)
11521 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11522 (linux_nat_add_target): Don't override
11523 to_terminal_inferior/to_terminal_ours.
11525 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
11527 * remote.c (remote_follow_fork): Don't call "detach_inferior".
11529 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
11531 * dwarf2read.c (free_dwo_files): Add forward-declaration.
11532 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11533 dwarf2_per_objfile_free here.
11534 (dwarf2_per_objfile_free): Remove.
11535 (_initialize_dwarf2_read): Don't register
11536 dwarf2_per_objfile_free as a registry cleanup.
11538 2018-01-27 Eli Zaretskii <eliz@gnu.org>
11540 Avoid compilation errors in MinGW native builds
11542 The error is triggered by including python-internal.h, and the
11545 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11546 from build-gnulib/import/math.h:27,
11547 from d:/usr/Python26/include/pyport.h:235,
11548 from d:/usr/Python26/include/Python.h:58,
11549 from python/python-internal.h:94,
11550 from python/py-arch.c:24:
11551 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11555 This happens because Python headers define 'hypot' to expand t
11556 '_hypot' in the Windows builds.
11557 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11558 'hypoth'. This avoids a compilation error.
11560 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11562 * MAINTAINERS (Write After Approval): Fix ordering.
11564 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11566 * MAINTAINERS (Write After Approval): Add Alan Hayward.
11568 2018-01-26 Alan Modra <amodra@gmail.com>
11570 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11571 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11572 Remove nop. Make const. Comment.
11573 (powerpc32_plt_stub_so_2): New.
11574 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11575 Correct count. Update uses.
11576 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11577 Move common code reading PLT entry word. Correct
11578 powerpc32_plt_stub PLT address calculation.
11579 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11580 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11581 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11582 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11583 (ppc64_standard_linkage8): Likewise.
11584 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11585 Correct insns description.
11586 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11588 2018-01-24 Pedro Alves <palves@redhat.com>
11590 GCC PR libstdc++/83906
11591 * gdbtypes.c (operator==(const dynamic_prop &,
11592 const dynamic_prop &)): New.
11593 (operator==(const range_bounds &, const range_bounds &)): New.
11594 (check_types_equal): Use them instead of memcmp.
11595 * gdbtypes.h (operator==(const dynamic_prop &,
11596 const dynamic_prop &)): Declare.
11597 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11598 (operator==(const range_bounds &, const range_bounds &)): Declare.
11599 (operator!=(const range_bounds &, const range_bounds &)): Declare.
11601 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11603 * s390-linux-tdep.c (s390_record_address_mask)
11604 (s390_record_calc_disp_common, s390_record_calc_disp)
11605 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11606 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11607 (s390_process_record): Move to s390-tdep.c.
11608 (s390_linux_init_abi_any): Adjust.
11609 * s390-tdep.c (s390_record_address_mask)
11610 (s390_record_calc_disp_common, s390_record_calc_disp)
11611 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11612 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11613 (s390_process_record): Moved from s390-linux-tdep.c
11614 (s390_gdbarch_init): Adjust.
11616 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11618 * s390-linux-nat.c (s390-tdep.h): New include.
11619 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11620 (HFILES_NO_SRCDIR): Add s390-tdep.h.
11621 (ALLDEPFILES): Add s390-tdep.c.
11622 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11623 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11624 * s390-tdep.h: ...this. New file.
11625 * s390-linux-tdep.c (s390-tdep.h): New include.
11626 (_initialize_s390_tdep): Rename to...
11627 (_initialize_s390_linux_tdep): ...this and adjust.
11628 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11629 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11631 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11632 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11633 (s390_is_partial_instruction, s390_software_single_step)
11634 (is_non_branch_ril, s390_displaced_step_copy_insn)
11635 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11636 (s390_prologue_data, s390_addr, s390_store, s390_load)
11637 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11638 (s390_register_call_saved, s390_guess_tracepoint_registers)
11639 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11640 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11641 (s390_pseudo_register_name, s390_pseudo_register_type)
11642 (s390_pseudo_register_read, s390_pseudo_register_write)
11643 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11644 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11645 (s390_addr_bits_remove, s390_address_class_type_flags)
11646 (s390_address_class_type_flags_to_name)
11647 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11648 (s390_function_arg_float, s390_function_arg_vector)
11649 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11650 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11651 (s390_frame_align, s390_register_return_value, s390_return_value)
11652 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11653 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11654 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11655 (s390_trad_frame_prev_register, s390_unwind_cache)
11656 (s390_prologue_frame_unwind_cache)
11657 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11658 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11659 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11660 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11661 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11662 (s390_frame_base_address, s390_local_base_address)
11663 (s390_frame_base, s390_gcc_target_options)
11664 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11665 (s390_validate_reg_range, s390_tdesc_valid)
11666 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11667 * s390-tdep.c: ...this. New file.
11669 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11671 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11672 (s390_process_record, s390_gdbarch_tdep_alloc)
11673 (s390_linux_init_abi_any): Use/set new hook.
11675 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11677 * s390-linux-tdep.c (osabi.h): New include.
11678 (s390_linux_init_abi_31, s390_linux_init_abi_64)
11679 (s390_linux_init_abi_any): New functions.
11680 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11682 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11684 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11685 tdesc_has_registers check
11687 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11689 * s390-linux-tdep.c (s390_tdesc_valid): New function.
11690 (s390_validate_reg_range): New macro.
11691 (s390_gdbarch_init): Adjust.
11693 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11695 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11696 (s390_gdbarch_tdep_alloc): Adjust.
11697 (s390_gdbarch_init): Adjust.
11699 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11701 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11702 <have_tdb>: Change type to bool.
11703 (s390_gdbarch_tdep_alloc): Adjust.
11704 (s390_gdbarch_init): Adjust.
11706 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11708 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11709 (gdbarch_tdep) <have_upper, have_vx>: New fields.
11710 (s390_gdbarch_tdep_alloc): New function.
11711 (s390_gdbarch_init): Allocate tdep at start and use its fields
11712 instead of separate variables.
11714 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11716 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11717 when looking for cached gdbarch and add comment for remaining.
11719 2018-01-22 Pedro Alves <palves@redhat.com>
11720 Sergio Durigan Junior <sergiodj@redhat.com>
11722 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11725 2018-01-22 Maciej W. Rozycki <macro@mips.com>
11727 * MAINTAINERS: Update my company e-mail address.
11729 2018-01-22 Yao Qi <yao.qi@linaro.org>
11731 * regcache.c (cooked_write_test): New function.
11732 (_initialize_regcache): Register the test.
11734 2018-01-22 Yao Qi <yao.qi@linaro.org>
11736 * ia64-tdep.c (ia64_pseudo_register_read): Call
11737 regcache->cooked_read instead of regcache_cooked_read_unsigned.
11738 * m32c-tdep.c (m32c_cat_read): Likewise.
11739 (m32c_r3r2r1r0_read): Likewise.
11740 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11741 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11743 2018-01-22 Yao Qi <yao.qi@linaro.org>
11745 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11746 method raw_read instead of regcache_raw_read.
11747 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11748 * arm-tdep.c (arm_neon_quad_read): Likewise.
11749 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11750 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11751 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11752 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11753 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11754 (i386_pseudo_register_read_into_value): Likewise.
11755 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11756 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11757 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11758 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11759 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11760 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11761 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11762 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11763 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11765 2018-01-22 Yao Qi <yao.qi@linaro.org>
11767 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11768 * configure.tgt: Remove target mt.
11769 * mt-tdep.c: Remove.
11770 * regcache.c (cooked_read_test): Remove the check for mt.
11772 2018-01-22 Yao Qi <yao.qi@linaro.org>
11774 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11775 instead of gdbarch_pseudo_register_read_value.
11777 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11779 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11782 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11784 * linespec.c (create_sals_line_offset): Remove code that preserved
11785 the symtab_and_line's line number.
11787 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11789 * varobj.c (varobj_create): Don't set valid_block when creating a
11792 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11794 * varobj.c (varobj_create): Remove out of date comment.
11796 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11799 * ada-exp.y (write_var_from_sym): Pass extra parameter when
11800 updating innermost block.
11801 * parse.c (innermost_block_tracker::update): Take extra type
11802 parameter, and check types match before updating innermost block.
11803 (write_dollar_variable): Update innermost block for registers.
11804 * parser-defs.h (enum innermost_block_tracker_type): New enum.
11805 (innermost_block_tracker::innermost_block_tracker): Initialise
11807 (innermost_block_tracker::reset): Take type parameter.
11808 (innermost_block_tracker::update): Take type parameter, and pass
11809 type through as needed.
11810 (innermost_block_tracker::m_types): New member.
11811 * varobj.c (varobj_create): Pass type when reseting innermost
11814 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11816 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11817 * ada-lang.c (resolve_subexp): Likewise.
11818 * breakpoint.c (set_breakpoint_condition) Likewise.
11819 (watch_command_1) Likewise.
11820 * c-exp.y (variable): Likewise.
11821 * d-exp.y (PrimaryExpression): Likewise.
11822 * f-exp.y (variable): Likewise.
11823 * go-exp.y (variable): Likewise.
11824 * m2-exp.y (variable): Likewise.
11825 * objfiles.c (objfile::~objfile): Likewise.
11826 * p-exp.y (variable): Likewise.
11827 * parse.c (innermost_block): Change type.
11828 * parser-defs.h (class innermost_block_tracker): New.
11829 (innermost_block): Change to innermost_block_tracker.
11830 * printcmd.c (display_command): Switch to innermost_block API.
11831 (do_one_display): Likewise.
11832 * rust-exp.y (do_one_display): Likewise.
11833 * symfile.c (clear_symtab_users): Likewise.
11834 * varobj.c (varobj_create): Switch to innermost_block API, replace
11835 use of innermost_block with block stored on varobj object.
11837 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11839 * expression.h (innermost_block): Remove declaration.
11840 * varobj.c: Add 'parser-defs.h' include.
11842 2018-01-19 Tom Tromey <tom@tromey.com>
11844 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11845 symbols in the static and global blocks.
11847 2018-01-19 James Clarke <jrtc27@jrtc27.com>
11849 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11850 gdb_ptrace.h, and move including gdb_wait.h ...
11851 * nat/linux-ptrace.h: ... to here.
11853 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11855 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11856 inf_ptrace_detach_success.
11857 (inf_ptrace_detach_success): Add inferior parameter, use it
11858 instead of inferior_ptid, pass it to detach_inferior.
11859 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11861 * inferior.c (detach_inferior): Add overload that takes an
11863 * inferior.h (detach_inferior): Likewise.
11864 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11865 use inferior_ptid, adjust call to inf_ptrace_detach_success.
11866 * linux-thread-db.c (thread_db_detach): Use inf parameter.
11868 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11870 * target.h (struct target_ops) <to_detach>: Add inferior
11872 (target_detach): Likewise.
11873 * target.c (dispose_inferior): Pass inferior down.
11874 (target_detach): Pass inferior down. Assert that it is equal to
11875 the current inferior.
11876 * aix-thread.c (aix_thread_detach): Pass inferior down.
11877 * corefile.c (core_file_command): Pass current_inferior() down.
11878 * corelow.c (core_detach): Add inferior parameter.
11879 * darwin-nat.c (darwin_detach): Likewise.
11880 * gnu-nat.c (gnu_detach): Likewise.
11881 * inf-ptrace.c (inf_ptrace_detach): Likewise.
11882 * infcmd.c (detach_command): Pass current_inferior() down to
11884 * infrun.c (follow_fork_inferior): Pass parent_inf to
11886 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11888 * linux-nat.c (linux_nat_detach): Add inferior parameter.
11889 * linux-thread-db.c (thread_db_detach): Likewise.
11890 * nto-procfs.c (procfs_detach): Likewise.
11891 * procfs.c (procfs_detach): Likewise.
11892 * record.c (record_detach): Likewise.
11893 * record.h (struct inferior): Forward-declare.
11894 (record_detach): Add inferior parameter.
11895 * remote-sim.c (gdbsim_detach): Likewise.
11896 * remote.c (remote_detach_1): Likewise.
11897 (remote_detach): Likewise.
11898 (extended_remote_detach): Likewise.
11899 * sol-thread.c (sol_thread_detach): Likewise.
11900 * target-debug.h (target_debug_print_inferior_p): New macro.
11901 * target-delegates.c: Re-generate.
11902 * top.c (kill_or_detach): Pass inferior down to target_detach.
11903 * windows-nat.c (windows_detach): Add inferior parameter.
11905 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11907 * target.h (struct target_ops) <to_detach>: Remove args
11909 (target_detach): Likewise.
11910 * target.c (dispose_inferior): Adjust.
11911 (target_detach): Remove args parameter, adjust.
11912 * aix-thread.c (aix_thread_detach): Adjust.
11913 * corefile.c (core_file_command): Adjust.
11914 * corelow.c (core_detach): Adjust.
11915 * darwin-nat.c (darwin_detach): Adjust.
11916 * gnu-nat.c (gnu_detach): Adjust.
11917 * inf-ptrace.c (inf_ptrace_detach): Adjust.
11918 * infcmd.c (detach_command): Adjust
11919 * infrun.c (follow_fork_inferior): Adjust.
11920 (handle_vfork_child_exec_or_exit): Adjust.
11921 * linux-fork.c (linux_fork_detach): Remove args parameter.
11922 * linux-fork.h (linux_fork_detach): Likewise.
11923 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11924 * linux-thread-db.c (thread_db_detach): Likewise.
11925 * nto-procfs.c (procfs_detach): Likewise.
11926 * procfs.c (procfs_detach): Likewise.
11927 (do_detach): Remove signo parameter.
11928 * record.c (record_detach): Remove args parameter.
11929 * record.h (record_detach): Likewise.
11930 * remote-sim.c (gdbsim_detach): Likewise.
11931 * remote.c (remote_detach_1): Likewise.
11932 (remote_detach): Likewise.
11933 (extended_remote_detach): Likewise.
11934 * sol-thread.c (sol_thread_detach): Likewise.
11935 * target-delegates.c: Re-generate.
11936 * top.c (struct qt_args) <args>: Remove field.
11937 (kill_or_detach): Don't pass args.
11938 (quit_force): Don't set args.
11939 * windows-nat.c (windows_detach): Remove args parameter.
11941 2018-01-19 Yao Qi <yao.qi@linaro.org>
11943 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11944 (arm_linux_init_abi): Install it.
11946 2018-01-19 Yao Qi <yao.qi@linaro.org>
11948 * osabi.c (gdb_osabi_names): Extend the regexp for
11949 arm-linux-gnueabihf.
11951 2018-01-18 Yao Qi <yao.qi@linaro.org>
11953 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11955 (abbrev_table::add_abbrev): Update.
11956 (abbrev_table::lookup_abbrev): Update.
11958 2018-01-18 Yao Qi <yao.qi@linaro.org>
11960 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11962 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
11964 * compile/compile.c (compile_to_object): Convert "triplet_rx"
11967 2018-01-17 Tom Tromey <tom@tromey.com>
11969 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
11971 2018-01-17 Tom Tromey <tom@tromey.com>
11973 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11974 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11975 (create_array_type_with_stride): Update.
11976 * dwarf2read.c (set_die_type): Update.
11978 2018-01-17 Tom Tromey <tom@tromey.com>
11980 * dwarf2read.c (delayed_method_info): Remove typedef.
11981 (dwarf2_cu::method_info): Now a std::vector.
11982 (add_to_method_list): Update.
11983 (free_delayed_list): Remove.
11984 (compute_delayed_physnames): Update.
11985 (process_full_comp_unit, process_full_type_unit): Clear the method
11986 list. Remove cleanups.
11987 (psymtab_include_file_name): Add name_holder parameter. Use
11988 unique_xmalloc_ptr.
11989 (dwarf_decode_lines): Update.
11991 2018-01-17 Tom Tromey <tom@tromey.com>
11992 Simon Marchi <simon.marchi@ericsson.com>
11994 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11995 (dwarf2_per_objfile::free_cached_comp_units)
11996 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11997 (init_cutu_and_read_dies_no_follow): Update.
11998 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11999 (dwarf2_cu::~dwarf2_cu): New.
12000 (free_heap_comp_unit, free_stack_comp_unit): Remove.
12001 (age_cached_comp_units, free_one_cached_comp_unit): Update.
12003 2018-01-17 Tom Tromey <tom@tromey.com>
12004 Simon Marchi <simon.marchi@ericsson.com>
12006 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
12007 (struct die_reader_specs) <abbrev_table>: New member.
12008 (struct abbrev_table): Add constructor.
12009 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
12010 <abbrev_obstack>: Now an auto_obstack.
12011 (abbrev_table_up): New typedef.
12012 (init_cu_die_reader): Add abbrev_table parameter.
12013 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
12014 Add result_dwo_abbrev_table.
12015 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12016 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
12018 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
12020 (skip_children): Update.
12021 (abbrev_table::alloc_abbrev): Rename from
12022 abbrev_table_alloc_abbrev.
12023 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
12024 (abbrev_table::lookup_abbrev): Rename from
12025 abbrev_table_lookup_abbrev.
12026 (abbrev_table_read_table): Return abbrev_table_up.
12027 (abbrev_table_free, abbrev_table_free_cleanup)
12028 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12029 (load_partial_dies): Update.
12031 2018-01-17 Tom Tromey <tom@tromey.com>
12033 * dwarf2read.c (dwarf2_compute_name): Update comment.
12034 (read_func_scope, read_variable): Update.
12035 (new_symbol): Remove.
12036 (new_symbol_full): Rename to new_symbol.
12038 2018-01-17 Mike Gulick <mgulick@mathworks.com>
12041 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12042 a warning instead of throwing an error, set section size to 0 and return
12044 * gdb_bfd.h (gdb_bfd_map_section): Update description.
12046 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
12048 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12050 (linux_ptrace_attach_fail_reason_string): Likewise.
12051 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12053 (linux_ptrace_attach_fail_reason_string): Likewise.
12054 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12056 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
12058 * linux-nat.c (linux_nat_attach): Remove xstrdup.
12060 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
12063 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12064 checking for fs_base/gs_base fields in struct user_regs_struct.
12065 * configure: Regenerate.
12067 2018-01-17 Yao Qi <yao.qi@linaro.org>
12069 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12071 (aarch64_linux_init_abi): Install it to gdbarch hook
12072 gcc_target_options.
12074 2018-01-15 Pedro Alves <palves@redhat.com>
12076 * common/signals-state-save-restore.c
12077 (save_original_signals_state): Fix typos.
12079 2017-01-12 Tom Tromey <tom@tromey.com>
12080 Sergio Durigan Junior <sergiodj@redhat.com>
12082 * Makefile.in (install-only): Install gdb-add-index.
12084 2018-01-12 John Baldwin <jhb@FreeBSD.org>
12086 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12088 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12090 * infrun.c (keep_going_pass_signal): Clear step-over info when
12091 insert_breakpoints fails.
12093 2018-01-11 Pedro Alves <palves@redhat.com>
12096 * infrun.c (resume): Rename to ...
12097 (resume_1): ... this.
12098 (resume): Reimplement as wrapper around resume_1.
12100 2018-01-11 Pedro Alves <palves@redhat.com>
12103 * remote.c (remote_parse_stop_reply): Default to the last-set
12104 general thread instead of to 'magic_null_ptid'.
12106 2018-01-10 Pedro Alves <palves@redhat.com>
12108 * language.h (language_get_symbol_name_matcher): Rename ...
12109 (get_symbol_name_matcher): ... this.
12110 * language.c (language_get_symbol_name_matcher): Ditto.
12111 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12114 2018-01-10 Pedro Alves <palves@redhat.com>
12118 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12119 Adjust to use language_get_symbol_name_matcher instead of
12120 language_defn::la_get_symbol_name_matcher.
12121 * language.c (language_get_symbol_name_matcher): If in Ada mode
12122 and the lookup name is a verbatim match, return Ada's matcher.
12123 * language.h (language_get_symbol_name_matcher): Adjust comment.
12124 (ada_lookup_name_info::verbatim_p):: New method.
12126 2018-01-10 Pedro Alves <palves@redhat.com>
12129 * ada-lang.c (ada_collect_symbol_completion_matches): If the
12130 minsym's language is language_auto or language_cplus, pass down
12131 language_ada instead.
12132 * symtab.c (compare_symbol_name): Don't frob symbol language here.
12134 2018-01-10 Pedro Alves <palves@redhat.com>
12137 * minsyms.c (linkage_name_str): New function.
12138 (iterate_over_minimal_symbols): Use it.
12140 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12142 * NEWS: Document that 'info proc' now works on FreeBSD.
12144 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12146 * configure.ac: Check for kinfo_getfile in libutil.
12147 * configure: Regenerate.
12148 * config.in: Regenerate.
12149 * fbsd-nat.c: Include "fbsd-tdep.h".
12150 (fbsd_fetch_cmdline): New.
12151 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12152 rather than calling error.
12153 (fbsd_info_proc): New.
12154 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12155 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12156 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12158 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12160 * fbsd-nat.c (struct free_deleter): Remove.
12161 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12163 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12165 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12166 NULL for an empty pathname.
12168 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12170 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12171 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12172 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12173 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12174 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12175 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12176 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12177 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12178 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12179 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12180 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12181 (fbsd_core_fetch_timeval, fbsd_print_sigset)
12182 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12183 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
12184 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12186 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
12188 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12189 (gnu_xfer_auxv): New function.
12190 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12191 TARGET_OBJECT_AUXV.
12193 2018-01-08 Yao Qi <yao.qi@linaro.org>
12194 Simon Marchi <simon.marchi@ericsson.com>
12196 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12198 (COMMON_OBS): Remove selftest.o.
12199 * configure.ac: Append selftest-arch.c and common/selftest.c to
12200 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
12201 * configure: Re-generated.
12202 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12204 (maintenance_info_selftests): Likewise.
12206 2018-01-08 Xavier Roirand <roirand@adacore.com>
12208 * ada-valprint.c (val_print_packed_array_elements): Use
12209 proper number of elements when printing an array indexed
12210 by an enumeration type.
12212 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12214 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12215 (dw2_get_file_names_reader): Adjust.
12216 (lookup_dwo_signatured_type): Adjust.
12217 (lookup_dwp_signatured_type): Adjust.
12218 (lookup_signatured_type): Adjust.
12219 (create_type_unit_group): Adjust.
12220 (get_type_unit_group): Adjust.
12221 (process_psymtab_comp_unit_reader): Adjust.
12222 (build_type_psymtabs_reader): Adjust.
12223 (scan_partial_symbols): Adjust.
12224 (add_partial_symbol): Adjust.
12225 (add_partial_subprogram): Adjust.
12226 (peek_die_abbrev): Adjust.
12227 (fixup_go_packaging): Adjust.
12228 (process_imported_unit_die): Adjust.
12229 (dwarf2_compute_name): Adjust.
12230 (dwarf2_physname): Adjust.
12231 (read_import_statement): Adjust.
12232 (handle_DW_AT_stmt_list): Adjust.
12233 (read_file_scope): Adjust.
12234 (read_func_scope): Adjust.
12235 (read_lexical_block_scope): Adjust.
12236 (read_call_site_scope): Adjust.
12237 (read_variable): Adjust.
12238 (dwarf2_rnglists_process): Adjust.
12239 (dwarf2_ranges_process): Adjust.
12240 (dwarf2_ranges_read): Adjust.
12241 (dwarf2_get_pc_bounds): Adjust.
12242 (dwarf2_record_block_ranges): Adjust.
12243 (dwarf2_add_field): Adjust.
12244 (dwarf2_add_member_fn): Adjust.
12245 (read_structure_type): Adjust.
12246 (process_structure_scope): Adjust.
12247 (read_enumeration_type): Adjust.
12248 (read_array_type): Adjust.
12249 (mark_common_block_symbol_computed): Adjust.
12250 (read_common_block): Adjust.
12251 (read_namespace_type): Adjust.
12252 (read_namespace): Adjust.
12253 (read_module_type): Adjust.
12254 (read_tag_pointer_type): Adjust.
12255 (read_tag_ptr_to_member_type): Adjust.
12256 (read_tag_string_type): Adjust.
12257 (read_subroutine_type): Adjust.
12258 (read_typedef): Adjust.
12259 (read_base_type): Adjust.
12260 (attr_to_dynamic_prop): Adjust.
12261 (read_subrange_type): Adjust.
12262 (read_unspecified_type): Adjust.
12263 (dwarf2_read_abbrevs): Adjust.
12264 (load_partial_dies): Adjust.
12265 (read_partial_die): Adjust.
12266 (find_partial_die): Adjust.
12267 (guess_partial_die_structure_name): Adjust.
12268 (fixup_partial_die): Adjust.
12269 (read_attribute_value): Adjust.
12270 (read_addr_index): Adjust.
12271 (read_addr_index_from_leb128): Adjust.
12272 (read_str_index): Adjust.
12273 (dwarf2_string_attr): Adjust.
12274 (get_debug_line_section): Adjust.
12275 (dwarf_decode_line_header): Adjust.
12276 (lnp_state_machine::check_line_address): Adjust.
12277 (dwarf_decode_lines_1): Adjust.
12278 (dwarf_decode_lines): Adjust.
12279 (dwarf2_start_symtab): Adjust.
12280 (var_decode_location): Adjust.
12281 (new_symbol_full): Adjust.
12282 (dwarf2_const_value_data): Adjust.
12283 (dwarf2_const_value_attr): Adjust.
12284 (dwarf2_const_value): Adjust.
12285 (die_type): Adjust.
12286 (die_containing_type): Adjust.
12287 (build_error_marker_type): Adjust.
12288 (lookup_die_type): Adjust.
12289 (guess_full_die_structure_name): Adjust.
12290 (anonymous_struct_prefix): Adjust.
12291 (determine_prefix): Adjust.
12292 (dwarf2_name): Adjust.
12293 (follow_die_ref_or_sig): Adjust.
12294 (follow_die_offset): Adjust.
12295 (follow_die_ref): Adjust.
12296 (follow_die_sig_1): Adjust.
12297 (follow_die_sig): Adjust.
12298 (get_signatured_type): Adjust.
12299 (get_DW_AT_signature_type): Adjust.
12300 (decode_locdesc): Adjust.
12301 (dwarf_decode_macros): Adjust.
12302 (cu_debug_loc_section): Adjust.
12303 (fill_in_loclist_baton): Adjust.
12304 (dwarf2_symbol_mark_computed): Adjust.
12305 (init_one_comp_unit): Don't assign
12306 dwarf2_cu::dwarf2_per_objfile.
12307 (set_die_type): Adjust.
12309 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12311 * dwarf2read.c (struct mapped_debug_names): Add constructor.
12312 <dwarf2_per_objfile>: New field.
12313 (dwarf2_per_objfile): Remove global.
12314 (get_dwarf2_per_objfile): New function.
12315 (set_dwarf2_per_objfile): New function.
12316 (dwarf2_build_psymtabs_hard): Change objfile parameter to
12317 dwarf2_per_objfile.
12318 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12319 (read_abbrev_offset): Likewise.
12320 (read_indirect_string): Likewise.
12321 (read_indirect_line_string): Likewise.
12322 (read_indirect_string_at_offset): Likewise.
12323 (read_indirect_string_from_dwz): Likewise.
12324 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12325 dwarf2_per_objfile.
12326 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12327 (create_all_comp_units): Change objfile parameter to
12328 dwarf2_per_objfile.
12329 (create_all_type_units): Likewise.
12330 (process_queue): Add dwarf2_per_objfile parameter.
12331 (read_and_check_comp_unit_head): Likewise.
12332 (lookup_dwo_unit_in_dwp): Likewise.
12333 (get_dwp_file): Likewise.
12334 (process_cu_includes): Likewise.
12335 (struct free_dwo_file_cleanup_data): New struct.
12336 (dwarf2_has_info): Use get_dwarf2_per_objfile and
12337 set_dwarf2_per_objfile.
12338 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12339 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12340 context, adjust calls.
12341 (dw2_instantiate_symtab): Likewise.
12342 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12343 (dw2_get_cu): Likewise.
12344 (create_cu_from_index_list): Change objfile parameter to
12345 dwarf2_per_objfile.
12346 (create_cus_from_index_list): Get dwarf2_per_objfile from
12347 context, adjust calls.
12348 (create_cus_from_index): Likewise.
12349 (create_signatured_type_table_from_index): Change objfile
12350 parameter to dwarf2_per_objfile.
12351 (create_signatured_type_table_from_debug_names): Change objfile
12352 parameter to dwarf2_per_objfile.
12353 (create_addrmap_from_index): Likewise.
12354 (create_addrmap_from_aranges): Likewise.
12355 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12356 (dw2_setup): Remove.
12357 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12359 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12360 get_dwarf2_per_objfile.
12361 (dw2_forget_cached_source_info): Likewise.
12362 (dw2_map_symtabs_matching_filename): Likewise.
12363 (struct dw2_symtab_iterator) <index>: Remove.
12364 <dwarf2_per_objfile>: New field.
12365 (dw2_symtab_iter_init): Replace index parameter with
12366 dwarf2_per_objfile.
12367 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12368 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12369 (dw2_print_stats): Likewise.
12370 (dw2_dump): Likewise.
12371 (dw2_expand_symtabs_for_function): Likewise.
12372 (dw2_expand_all_symtabs): Likewise.
12373 (dw2_expand_symtabs_with_fullname): Likewise.
12374 (dw2_expand_marked_cus): Replace index and objfile parameters
12375 with dwarf2_per_objfile.
12376 (dw_expand_symtabs_matching_file_matcher): Add
12377 dwarf2_per_objfile parameter and adjust calls.
12378 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12380 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12381 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12383 (create_cus_from_debug_names_list): Replace objfile parameter
12384 with dwarf2_per_objfile and adjust calls.
12385 (create_cus_from_debug_names): Likewise.
12386 (dwarf2_read_debug_names): Likewise.
12387 (mapped_debug_names::namei_to_name): Adjust call.
12388 (dw2_debug_names_iterator::next): Likewise.
12389 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12390 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12391 (dw2_debug_names_dump): Likewise.
12392 (dw2_debug_names_expand_symtabs_for_function): Likewise.
12393 (dw2_debug_names_expand_symtabs_matching): Likewise.
12394 (dwarf2_initialize_objfile): Likewise.
12395 (dwarf2_build_psymtabs): Likewise.
12396 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12398 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12399 (read_and_check_comp_unit_head): Likewise.
12400 (read_abbrev_offset): Likewise.
12401 (create_debug_type_hash_table): Likewise.
12402 (create_debug_types_hash_table): Likewise.
12403 (create_all_type_units): Replace objfile parameter with
12404 dwarf2_per_objfile.
12405 (add_type_unit): Add dwarf2_per_objfile parameter.
12406 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12407 with dwarf2_per_objfile.
12408 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12409 (lookup_dwp_signatured_type): Likewise.
12410 (lookup_signatured_type): Likewise.
12411 (read_cutu_die_from_dwo): Likewise.
12412 (init_tu_and_read_dwo_dies): Likewise.
12413 (init_cutu_and_read_dies): Likewise.
12414 (init_cutu_and_read_dies_no_follow): Likewise.
12415 (allocate_type_unit_groups_table): Add objfile parameter.
12416 (create_type_unit_group): Use dwarf2_per_objfile from cu.
12417 (get_type_unit_group): Likewise.
12418 (process_psymtab_comp_unit): Update call.
12419 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12420 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12421 (print_tu_stats): Likewise.
12422 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12423 in void* parameter.
12424 (build_type_psymtabs): Change objfile parameter to
12425 dwarf2_per_objfile.
12426 (process_skeletonless_type_unit): Use dwarf2_per_objfile
12427 passed in void* parameter.
12428 (process_skeletonless_type_units): Change objfile parameter to
12429 dwarf2_per_objfile.
12430 (set_partial_user): Likewise.
12431 (dwarf2_build_psymtabs_hard): Likewise.
12432 (read_comp_units_from_section): Likewise.
12433 (create_all_comp_units): Likewise.
12434 (scan_partial_symbols): Update calls.
12435 (add_partial_symbol): Likewise.
12436 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12437 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12438 (process_queue): Add dwarf2_per_objfile parameter.
12439 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12440 (compute_compunit_symtab_includes): Likewise.
12441 (process_cu_includes): Add dwarf2_per_objfile parameter.
12442 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12443 (process_full_type_unit): Likewise.
12444 (process_imported_unit_die): Update call.
12445 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12446 (read_file_scope): Likewise.
12447 (allocate_dwo_file_hash_table): Add objfile parameter.
12448 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12449 (create_cus_hash_table): Likewise.
12450 (create_dwp_hash_table): Likewise.
12451 (create_dwo_unit_in_dwp_v1): Likewise.
12452 (create_dwp_v2_section): Likewise.
12453 (create_dwo_unit_in_dwp_v2): Likewise.
12454 (lookup_dwo_unit_in_dwp): Likewise.
12455 (try_open_dwop_file): Likewise.
12456 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12457 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12458 cleanup to include a reference to dwarf2_per_objfile.
12459 (open_dwp_file): Add dwarf2_per_objfile parameter.
12460 (open_and_init_dwp_file): Likewise.
12461 (get_dwp_file): Likewise.
12462 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12463 (queue_and_load_all_dwo_tus): Update call.
12464 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12466 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12467 (dwarf2_ranges_process): Likewise.
12468 (dwarf2_get_pc_bounds): Likewise.
12469 (mark_common_block_symbol_computed): Likewise.
12470 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12471 (dwarf2_read_abbrevs): Update call.
12472 (read_partial_die): Use dwarf2_per_objfile from cu.
12473 (find_partial_die): Likewise.
12474 (fixup_partial_die): Likewise.
12475 (read_attribute_value): Likewise.
12476 (read_indirect_string_at_offset_from): Add objfile parameter.
12477 (read_indirect_string_at_offset): Add dwarf2_per_objfile
12479 (read_indirect_string_from_dwz): Add objfile parameter.
12480 (read_indirect_string): Add objfile parameter.
12481 (read_addr_index_1): Add dwarf2_per_objfile parameter.
12482 (read_addr_index): Use dwarf2_per_objfile from cu.
12483 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12485 (read_str_index): Use dwarf2_per_objfile from cu.
12486 (get_debug_line_section): Likewise.
12487 (read_formatted_entries): Add dwarf2_per_objfile parameter.
12488 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12489 (new_symbol_full): Use dwarf2_per_objfile from cu.
12490 (build_error_marker_type): Likewise.
12491 (lookup_die_type): Likewise.
12492 (determine_prefix): Likewise.
12493 (follow_die_offset): Likewise.
12494 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12495 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12496 (dwarf2_fetch_die_type_sect_off): Likewise.
12497 (dwarf2_get_die_type): Likewise.
12498 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12499 (get_signatured_type): Likewise.
12500 (get_DW_AT_signature_type): Likewise.
12501 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12502 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12503 (cu_debug_loc_section): Likewise.
12504 (fill_in_loclist_baton): Likewise.
12505 (dwarf2_symbol_mark_computed): Likewise.
12506 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12507 dwarf2_per_objfile.
12508 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12510 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12511 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12512 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12513 (set_die_type): Use dwarf2_free_objfile from cu.
12514 (get_die_type_at_offset): Likewise.
12515 (dwarf2_per_objfile_free): Don't assign global variable.
12516 (debug_names) <constructor>: Add dwarf2_per_objfile
12517 parameter, update m_debugstrlookup construction.
12518 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12520 <m_dwarf2_per_objfile>: New field.
12521 <lookup>: Use m_dwarf2_per_objfile.
12522 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12523 (psyms_seen_size): Likewise.
12524 (write_gdbindex): Replace objfile parameter with
12525 dwarf2_per_objfile.
12526 (write_debug_names): Likewise.
12527 (write_psymtabs_to_index): Likewise.
12528 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12531 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12533 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12534 <dwarf2_per_objfile>: New field.
12535 (struct dwarf2_per_cu_data) <objfile>: Remove.
12536 <dwarf2_per_objfile>: New field.
12537 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12539 (create_signatured_type_table_from_index): Likewise.
12540 (create_debug_type_hash_table): Likewise.
12541 (fill_in_sig_entry_from_dwo_entry): Likewise.
12542 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12543 (create_type_unit_group): Assign dwarf2_per_objfile instead of
12545 (create_partial_symtab): Access objfile through
12546 dwarf2_per_objfile.
12547 (process_psymtab_comp_unit_reader): Likewise.
12548 (read_comp_units_from_section): Likewise.
12549 (scan_partial_symbols): Likewise.
12550 (add_partial_symbol): Likewise.
12551 (add_partial_subprogram): Likewise.
12552 (peek_die_abbrev): Likewise.
12553 (fixup_go_packaging): Likewise.
12554 (process_full_comp_unit): Likewise.
12555 (process_full_type_unit): Likewise.
12556 (process_imported_unit_die): Likewise.
12557 (dwarf2_compute_name): Likewise.
12558 (dwarf2_physname): Likewise.
12559 (read_import_statement): Likewise.
12560 (create_cus_hash_table): Assign dwarf2_physname instead of
12562 (read_func_scope): Access objfile through dwarf2_per_objfile.
12563 (read_lexical_block_scope): Likewise.
12564 (read_call_site_scope): Likewise.
12565 (read_variable): Likewise.
12566 (dwarf2_rnglists_process): Likewise.
12567 (dwarf2_ranges_process): Likewise.
12568 (dwarf2_ranges_read): Likewise.
12569 (dwarf2_record_block_ranges): Likewise.
12570 (dwarf2_add_field): Likewise.
12571 (dwarf2_add_member_fn): Likewise.
12572 (read_structure_type): Likewise.
12573 (process_structure_scope): Likewise.
12574 (read_enumeration_type): Likewise.
12575 (read_array_type): Likewise.
12576 (read_common_block): Likewise.
12577 (read_namespace_type): Likewise.
12578 (read_namespace): Likewise.
12579 (read_module_type): Likewise.
12580 (read_tag_pointer_type): Likewise.
12581 (read_tag_ptr_to_member_type): Likewise.
12582 (read_tag_string_type): Likewise.
12583 (read_subroutine_type): Likewise.
12584 (read_typedef): Likewise.
12585 (read_base_type): Likewise.
12586 (attr_to_dynamic_prop): Likewise.
12587 (read_subrange_type): Likewise.
12588 (read_unspecified_type): Likewise.
12589 (load_partial_dies): Likewise.
12590 (read_partial_die): Likewise.
12591 (find_partial_die): Likewise.
12592 (guess_partial_die_structure_name): Likewise.
12593 (fixup_partial_die): Likewise.
12594 (read_attribute_value): Likewise.
12595 (read_addr_index_from_leb128): Likewise.
12596 (dwarf2_read_addr_index): Likewise.
12597 (dwarf2_string_attr): Likewise.
12598 (lnp_state_machine::check_line_address): Likewise.
12599 (dwarf_decode_lines_1): Likewise.
12600 (dwarf_decode_lines): Likewise.
12601 (dwarf2_start_symtab): Likewise.
12602 (var_decode_location): Likewise.
12603 (new_symbol_full): Likewise.
12604 (dwarf2_const_value_data): Likewise.
12605 (dwarf2_const_value_attr): Likewise.
12606 (dwarf2_const_value): Likewise.
12607 (die_type): Likewise.
12608 (die_containing_type): Likewise.
12609 (lookup_die_type): Likewise.
12610 (guess_full_die_structure_name): Likewise.
12611 (anonymous_struct_prefix): Likewise.
12612 (dwarf2_name): Likewise.
12613 (follow_die_ref_or_sig): Likewise.
12614 (follow_die_offset): Likewise.
12615 (follow_die_ref): Likewise.
12616 (dwarf2_fetch_die_loc_sect_off): Likewise.
12617 (dwarf2_fetch_constant_bytes): Likewise.
12618 (dwarf2_fetch_die_type_sect_off): Likewise.
12619 (dwarf2_get_die_type): Likewise.
12620 (follow_die_sig): Likewise.
12621 (decode_locdesc): Likewise.
12622 (dwarf2_per_cu_objfile): Likewise.
12623 (dwarf2_per_cu_text_offset): Likewise.
12624 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12626 (set_die_type): Access objfile through
12627 dwarf2_per_objfile.
12629 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12631 * valprint.c (converted_character_d): Remove typedef.
12632 (DEF_VEC_O (converted_character_d)): Remove.
12633 (count_next_character): Use std::vector.
12634 (print_converted_chars_to_obstack): Likewise.
12635 (generic_printstr): Likewise.
12637 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12639 * xml-support.h (struct gdb_xml_value): Add constructor.
12640 <value>: Change type to unique_xmalloc_ptr.
12641 (gdb_xml_value_s): Remove typedef.
12642 (DEF_VEC_O (gdb_xml_value_s)): Remove.
12643 (gdb_xml_element_start_handler): Change parameter type to
12645 (xml_find_attribute): Likewise.
12646 * xml-support.c (xml_find_attribute): Change parameter type to
12647 std::vector and adjust.
12648 (gdb_xml_values_cleanup): Remove.
12649 (gdb_xml_parser::start_element): Adjust to std::vector.
12650 (xinclude_start_include): Change paraeter type to std::vector
12652 * btrace.c (check_xml_btrace_version): Likewise.
12653 (parse_xml_btrace_block): Likewise.
12654 (parse_xml_btrace_pt_config_cpu): Likewise.
12655 (parse_xml_btrace_pt): Likewise.
12656 (parse_xml_btrace_conf_bts): Likewise.
12657 (parse_xml_btrace_conf_pt): Likewise.
12658 * memory-map.c (memory_map_start_memory): Likewise.
12659 (memory_map_start_property): Likewise.
12660 * osdata.c (osdata_start_osdata): Likewise.
12661 (osdata_start_item): Likewise.
12662 (osdata_start_column): Likewise.
12663 * remote.c (start_thread): Likewise.
12664 * solib-aix.c (library_list_start_library): Likewise.
12665 (library_list_start_list): Likewise.
12666 * solib-svr4.c (library_list_start_library): Likewise.
12667 (svr4_library_list_start_list): Likewise.
12668 * solib-target.c (library_list_start_segment): Likewise.
12669 (library_list_start_section): Likewise.
12670 (library_list_start_library): Likewise.
12671 (library_list_start_list): Likewise.
12672 * tracepoint.c (traceframe_info_start_memory): Likewise.
12673 (traceframe_info_start_tvar): Likewise.
12674 * xml-syscall.c (syscall_start_syscall): Likewise.
12675 * xml-tdesc.c (tdesc_start_target): Likewise.
12676 (tdesc_start_feature): Likewise.
12677 (tdesc_start_reg): Likewise.
12678 (tdesc_start_union): Likewise.
12679 (tdesc_start_struct): Likewise.
12680 (tdesc_start_flags): Likewise.
12681 (tdesc_start_enum): Likewise.
12682 (tdesc_start_field): Likewise.
12683 (tdesc_start_enum_value): Likewise.
12684 (tdesc_start_vector): Likewise.
12686 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12688 * extension.h (struct xmethod_worker) <clone>: Remove.
12689 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12691 (python_xmethod_worker::clone): Remove.
12692 * valops.c (find_overload_match): Use std::move instead of
12695 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12697 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12698 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12699 <free_xmethod_worker_data>: Remove.
12700 <get_matching_xmethod_workers>: Chance VEC to std::vector.
12701 <get_xmethod_arg_types>: Remove.
12702 <get_xmethod_result_type>: Remove.
12703 <invoke_xmethod>: Remove.
12704 * extension.c (new_xmethod_worker): Remove.
12705 (clone_xmethod_worker): Remove.
12706 (get_matching_xmethod_workers): Return void, pass std::vector by
12708 (get_xmethod_arg_types): Rename to...
12709 (xmethod_worker::get_arg_types): ... this, and adjust.
12710 (get_xmethod_result_type): Rename to...
12711 (xmethod_worker::get_result_type): ... this, and adjust.
12712 (invoke_xmethod): Remove.
12713 (free_xmethod_worker): Remove.
12714 (free_xmethod_worker_vec): Remove.
12715 * extension.h (enum ext_lang_rc): Move here from
12717 (struct xmethod_worker): Add constructor and destructor.
12720 <invoke, clone, do_get_result_type, do_get_arg_types>: New
12721 virtual pure methods.
12722 <get_arg_types, get_result_type>: New methods.
12723 (xmethod_worker_ptr): Remove typedef.
12724 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12725 (xmethod_worker_vec): Remove typedef.
12726 (xmethod_worker_up): New typedef.
12727 (invoke_xmethod): Remove.
12728 (clone_xmethod_worker): Remove.
12729 (free_xmethod_worker): Remove.
12730 (free_xmethod_worker_vec): Remove.
12731 (get_xmethod_arg_types): Remove.
12732 (get_xmethod_result_type): Remove.
12733 * valops.c (find_method_list): Use std::vector, don't use
12734 intermediate vector.
12735 (value_find_oload_method_list): Use std::vector.
12736 (find_overload_match): Use std::vector.
12737 (find_oload_champ): Use std::vector.
12738 * value.c (value_free): Use operator delete.
12739 (value_of_xmethod): Rename to...
12740 (value_from_xmethod): ... this. Don't assign
12741 xmethod_worker::value, take rvalue-reference.
12742 (result_type_of_xmethod): Adjust.
12743 (call_xmethod): Adjust.
12744 * value.h: Include extension.h.
12745 (struct xmethod_worker): Don't forward-declare.
12746 (value_of_xmethod): Rename to...
12747 (value_from_xmethod): ... this, take rvalue-reference.
12748 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12749 (struct python_xmethod_worker): ... this, add constructor and
12751 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12752 (gdbpy_free_xmethod_worker_data): Rename to...
12753 (python_xmethod_worker::~python_xmethod_worker): ... this and
12755 (gdbpy_clone_xmethod_worker_data): Rename to...
12756 (python_xmethod_worker::clone): ... this and adjust.
12757 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12759 (gdbpy_get_xmethod_arg_types): Rename to...
12760 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12761 (gdbpy_get_xmethod_result_type): Rename to...
12762 (python_xmethod_worker::do_get_result_type): ... this and
12764 (gdbpy_invoke_xmethod): Rename to...
12765 (python_xmethod_worker::invoke): ... this and adjust.
12766 (new_python_xmethod_worker): Rename to...
12767 (python_xmethod_worker::python_xmethod_worker): ... this and
12769 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12771 (gdbpy_free_xmethod_worker_data): Remove.
12772 (gdbpy_get_matching_xmethod_workers): Use std::vector.
12773 (gdbpy_get_xmethod_arg_types): Remove.
12774 (gdbpy_get_xmethod_result_type): Remove.
12775 (gdbpy_invoke_xmethod): Remove.
12776 * python/python.c (python_extension_ops): Remove obsolete
12779 2018-01-05 Pedro Alves <palves@redhat.com>
12782 * common/signals-state-save-restore.c
12783 (save_original_signals_state): New parameter 'quiet'. Warn if we
12784 find a custom handler preinstalled, instead of internal erroring.
12785 But only warn if !quiet.
12786 * common/signals-state-save-restore.h
12787 (save_original_signals_state): New parameter 'quiet'.
12788 * main.c (captured_main_1): Move save_original_signals_state call
12789 after option handling, and pass QUIET.
12791 2018-01-05 Pedro Alves <palves@redhat.com>
12793 * spu-tdep.c (spu_catch_start): Pass
12794 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12796 2018-01-05 Pedro Alves <palves@redhat.com>
12799 * ada-lang.c (literal_symbol_name_matcher): New function.
12800 (ada_get_symbol_name_matcher): Use it for
12801 symbol_name_match_type::SEARCH_NAME.
12802 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
12803 it down instead of assuming symbol_name_match_type::FULL.
12804 * block.h (block_lookup_symbol): New parameter 'match_type'.
12805 * c-valprint.c (print_unpacked_pointer): Use
12806 lookup_symbol_search_name instead of lookup_symbol.
12807 * compile/compile-object-load.c (get_out_value_type): Pass down
12808 symbol_name_match_type::SEARCH_NAME.
12809 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12810 symbol_name_match_type::FULL.
12811 * cp-support.c (cp_get_symbol_name_matcher): Handle
12812 symbol_name_match_type::SEARCH_NAME.
12813 * infrun.c (insert_exception_resume_breakpoint): Use
12814 lookup_symbol_search_name.
12815 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12816 * psymtab.c (maintenance_check_psymtabs): Use
12817 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12818 * stack.c (print_frame_args): Use lookup_symbol_search_name and
12819 SYMBOL_SEARCH_NAME.
12820 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12821 if symbol_name_match_type::SEARCH_NAME.
12822 (lookup_symbol_in_language): Pass down
12823 symbol_name_match_type::FULL.
12824 (lookup_symbol_search_name): New.
12825 (lookup_language_this): Pass down
12826 symbol_name_match_type::SEARCH_NAME.
12827 (lookup_symbol_aux, lookup_local_symbol): New parameter
12828 'match_type'. Pass it down.
12829 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12830 (lookup_symbol_search_name): New declaration.
12831 (lookup_symbol_in_block): New 'match_type' parameter.
12833 2018-01-05 Pedro Alves <palves@redhat.com>
12836 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12838 (ada_lookup_symbol): Reimplement in terms of
12839 ada_lookup_symbol_list, bits factored out from
12840 ada_lookup_encoded_symbol.
12842 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12844 * ada-exp.y (write_object_renaming): When subscripting an array
12845 using a symbol as the index, pass the block in call to
12846 ada_lookup_encoded_symbol when looking that symbol up.
12848 2018-01-05 Jerome Guitton <guitton@adacore.com>
12850 * ada-lang.c (ada_array_length): Use ada_index_type instead of
12853 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12855 * ada-lang.c (ada_to_fixed_value_create): Add handling of
12856 the case where VALUE_LVAL (val0) is not lval_memory.
12858 2018-01-05 Xavier Roirand <roirand@adacore.com>
12860 * ada-valprint.c (print_optional_low_bound): Handle
12861 character-indexed array printing like boolean-indexed array
12864 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12866 * NEWS: Create a new section for the next release branch.
12867 Rename the section of the current branch, now that it has
12870 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12872 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12873 * version.in: Bump version to 8.1.50.DATE-git.
12875 2018-01-03 Xavier Roirand <roirand@adacore.com>
12877 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12879 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12881 (default_exception_support_info) <catch_handlers_sym>: Add field.
12882 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12883 (ada_exception_name_addr_1): Add "catch handlers" handling.
12884 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12885 Update all callers.
12886 (create_excep_cond_exprs) <ex>: Add parameter.
12887 (re_set_exception): Update create_excep_cond_exprs call.
12888 (print_it_exception, print_one_exception, print_mention_exception)
12889 (print_recreate_exception): Add "catch handler" handling.
12890 (allocate_location_catch_handlers, re_set_catch_handlers)
12891 (check_status_catch_handlers, print_it_catch_handlers)
12892 (print_one_catch_handlers, print_mention_catch_handlers)
12893 (print_recreate_catch_handlers): New function.
12894 (catch_handlers_breakpoint_ops): New variable.
12895 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12896 Add parameter. Add "catch handler" handling.
12897 (ada_exception_sym_name, ada_exception_breakpoint_ops):
12898 Add "catch handler" handling.
12899 (ada_exception_catchpoint_cond_string): Add "catch handler"
12901 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12903 (catch_ada_handlers_command): New function.
12904 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12905 operations structure.
12906 (_initialize_ada_language): Add "catch handlers" command entry.
12907 * NEWS: Document "catch handlers" feature.
12909 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12911 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12912 account when creating the array type of the slice.
12913 (ada_value_slice): Likewise.
12915 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12917 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12919 (create_array_type_with_stride): Add byte_stride_prop parameter.
12920 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12921 New parameter. Update all callers in this file.
12922 (array_type_has_dynamic_stride): New function.
12923 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12924 of arrays with dynamic byte strides.
12925 * dwarf2read.c (read_array_type): Add support for dynamic
12926 DW_AT_byte_stride attributes.
12928 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12930 * dwarf2read.c (read_unspecified_type): Treat
12931 DW_TAG_enumeration_type DIEs from Ada units as stubs.
12933 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12935 Update copyright year range in all GDB files.
12937 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12939 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12940 and gdb/testsuite/gdb.base/step-line.c.
12942 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12944 * copyright.py (main): Dump the contents of
12945 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12946 even if BY_HAND is empty.
12948 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12950 * top.c (print_gdb_version): Update Copyright year in version
12953 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12955 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12957 For older changes see ChangeLog-2017.
12963 version-control: never