1 2018-09-10 Xavier Roirand <roirand@adacore.com>
3 * ada-varobj.c (ada_varobj_describe_struct_child)
4 (ada_varobj_describe_child): Handle union case like struct one.
6 2018-09-10 Tom Tromey <tom@tromey.com>
9 * python/python.c (_initialize_python): Make example in "python"
10 help work in Python 3.
12 2018-09-10 Eli Zaretskii <eliz@gnu.org>
14 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
15 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
16 $(EXEEXT) to the script, as it is not a program.
18 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
20 * python/py-prettyprint.c (pretty_print_one_value): Return
22 (print_string_repr): Adjust.
23 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
24 * python/python-internal.h (apply_varobj_pretty_printer): Return
26 * varobj.c (varobj_value_get_print_value): Adjust.
28 2018-09-08 Tom Tromey <tom@tromey.com>
31 * python/py-prettyprint.c (pretty_print_one_value): Check for
34 2018-09-08 Joel Brobecker <brobecker@adacore.com>
36 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
37 replace_operator_with_call.
39 2018-09-08 Joel Brobecker <brobecker@adacore.com>
41 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
43 2018-09-08 Joel Brobecker <brobecker@adacore.com>
45 * ada-typeprint.c (print_range): Print the bounds using TYPE
46 rather than its TYPE_TARGET_TYPE.
48 2018-09-08 Joel Brobecker <brobecker@adacore.com>
50 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
51 call to ada_to_fixed_value_create.
53 2018-09-08 Jerome Guitton <guitton@adacore.com>
55 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
57 2018-09-08 Joel Brobecker <brobecker@adacore.com>
59 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
62 2018-09-08 Joel Brobecker <brobecker@adacore.com>
64 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
65 Move update of loop variable "fi".
67 2018-09-08 Joel Brobecker <brobecker@adacore.com>
69 * ada-lang.c (value_assign_to_component): In the case of
70 big-endian targets, extract the bits of the given VAL
71 using an src_offset of zero if container is not a scalar.
73 2018-09-06 Simon Ser <contact@emersion.fr>
76 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
77 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
78 * fbsd-tdep.c (fbsd_make_note_desc): New.
79 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
80 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
81 * target.h (enum target_object) Add FreeBSD-specific
82 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
84 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
86 * compile/compile-c.h (generate_c_for_variable_locations):
87 Change reference to pointer.
88 * compile/compile-c-support.c (compile_program) <compute>:
90 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
91 (generate_c_for_for_one_variable): Likewise
92 (generate_c_for_variable_locations): Likewise
93 * compile/compile-c-types.c (compile_c_instance::convert_type):
95 * compile/compile-cplus-symbols.c (convert_one_symbol):
96 std::move the scope passed to enter_scope.
97 * compile/compile-cplus-types.c
98 (compile_cplus_instance::enter_scope): Make parameter
100 (compile_cplus_instance::new_scope): Change reference to
102 (compile_cplus_instance::convert_type): Likewise
103 (compile_cplus_convert_typedef): std::move the scope passed to
105 (compile_cplus_convert_struct_or_union): Likewise.
106 (compile_cplus_convert_enum): Likewise.
107 (compile_cplus_convert_namespace): Likewise.
108 * compile/compile-cplus.h (compile_cplus_instance)
109 <enter_scope>: Make parameter rvalue-reference.
110 * compile/compile-internal.h (compile_instance)
111 <get_cached_type>: Likewise
112 * compile/compile-loc2c.c (push): Likewise
116 (print_label): Likewise
117 (pushf_register_address): Likewise
118 (pushf_register): Likewise
119 (do_compile_dwarf_expr_to_c): Likewise
120 (compile_dwarf_expr_to_c): Likewise
121 (compile_dwarf_bounds_to_c): Likewise
122 * compile/compile.c (compile_instance::get_cached_type):
124 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
125 (compile_dwarf_bounds_to_c): Likewise
126 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
127 (dwarf2_compile_property_to_c): Likewise
128 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
129 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
132 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
134 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
135 * tui/tui-data.c (init_content_element): Don't initialize it.
137 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
139 * tui/tui-data.h (struct tui_win_info)
140 <detail::opaque>: Remove.
141 * tui/tui-data.c (init_win_info): Remove assignment.
143 2018-09-05 Tom Tromey <tom@tromey.com>
145 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
147 * target-float.c (host_float_ops<T>::to_string)
148 (host_float_ops<T>::from_string): Use
149 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
150 * configure: Rebuild.
152 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
154 * printcmd.c (printf_c_string): Use
155 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
156 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
158 2018-09-05 Tom Tromey <tom@tromey.com>
160 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
162 2018-09-05 Tom de Vries <tdevries@suse.de>
164 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
165 with resolve_abstract_p == true.
166 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
167 defaulting to false. Propagate resolve_abstract_p to
168 dwarf2_fetch_die_loc_sect_off.
169 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
170 parameter, defaulting to false.
171 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
172 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
174 * dwarf2read.h (struct die_info): Forward-declare.
175 (die_info_ptr): New typedef.
176 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
178 2018-09-05 Joel Brobecker <brobecker@adacore.com>
182 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
183 Pedro Alves <palves@redhat.com>
185 * gnulib/Makefile.in (aclocal_m4_deps): Move to
186 "aclocal-m4-deps.mk". Include file here.
187 $(srcdir)/aclocal.m4: Add "configure.ac".
188 * gnulib/aclocal-m4-deps.mk: New file.
189 * gnulib/update-gnulib.sh: Automatically update
190 "aclocal-m4-deps.mk".
192 2018-09-04 Tom Tromey <tom@tromey.com>
194 * configure: Rebuild.
195 * configure.ac: Remove multi-ice code.
197 2018-09-04 Tom Tromey <tom@tromey.com>
199 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
202 2018-09-04 Tom Tromey <tom@tromey.com>
204 * Makefile.in (printcmd.o, target-float.o): Remove.
205 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
207 2018-09-04 Tom Tromey <tom@tromey.com>
209 * gnulib/Makefile.in: Remove obsolete comment.
210 * Makefile.in: Remove obsolete comment.
212 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
214 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
217 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
219 * riscv-tdep.c: Add 'prologue-value.h' include.
220 (struct riscv_unwind_cache): New struct.
221 (riscv_debug_unwinder): New global.
222 (riscv_scan_prologue): Update arguments, capture register details
224 (riscv_skip_prologue): Reformat arguments line, move end of
225 prologue calculation into riscv_scan_prologue.
226 (riscv_frame_cache): Update return type, create
227 riscv_unwind_cache, scan the prologue, and fill in remaining cache
229 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
230 (riscv_frame_prev_register): Use the trad_frame within the
232 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
235 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
237 * trad-frame.h (trad_frame_set_realreg): Declare.
238 (trad_frame_set_addr): Declare.
239 * trad-frame.c (trad_frame_set_realreg): Define new function.
240 (trad_frame_set_addr): Define new function.
241 (trad_frame_set_reg_realreg): Use new function.
242 (trad_frame_set_reg_addr): Use new function.
244 2018-09-01 Keith Seitz <keiths@redhat.com>
246 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
247 pulongest instead of "%lld".
248 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
251 2018-08-31 Tom Tromey <tom@tromey.com>
253 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
256 2018-08-31 Pedro Alves <palves@redhat.com>
258 * gdbarch.h: Regenerate.
260 2018-08-31 Pedro Alves <palves@redhat.com>
262 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
263 * target.h (Hardware watchpoint interfaces): Describe
264 continuable/steppable/non-steppable watchpoints.
265 * gdbarch.h, gdbarch.c: Regenerate.
267 2018-08-31 Pedro Alves <palves@redhat.com>
269 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
272 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
273 * target.h (target_ops::have_continuable_watchpoint): Delete.
274 (target_have_continuable_watchpoint): Delete.
275 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
276 * target-delegates.c: Regenerate.
278 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
280 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
281 the files present in "gnulib/import/m4/".
283 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
285 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
286 c.sw, c.swsp, and c.sdsp.
288 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
290 * riscv-tdep.c (struct riscv_inferior_data): Delete.
291 (riscv_read_misa_reg): Don't cache value read into inferior data.
292 (riscv_new_inferior_data): Delete.
293 (riscv_inferior_data_cleanup): Delete.
294 (riscv_inferior_data): Delete.
295 (riscv_invalidate_inferior_data): Delete.
296 (_initialize_riscv_tdep): Remove initialisation of inferior data.
298 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
300 * compile/compile-cplus-types.c
301 (compile_cplus_instance::leave_scope): Take the address of scope
303 (compile_cplus_instance::convert_qualified_base): Compare quals
306 2018-08-30 Keith Seitz <keiths@redhat.com>
308 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
309 Use "%s" and host_address_to_string instead of "%p" in printf.
311 2018-08-29 Keith Seitz <keiths@redhat.com>
313 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
314 and compile-cplus-types.c.
315 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
316 * c-lang.c (cplus_language_defn): Set C++ compile functions.
317 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
319 * compile/compile-c-support.c: Include compile-cplus.h.
320 (load_libcompile): Templatize.
321 (get_compile_context): "New" function.
322 (c_get_compile_context): Use get_compile_context.
323 (cplus_get_compile_context): New function.
324 (cplus_push_user_expression, cplus_pop_user_expression)
325 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
326 (cplus_compute_program): Define new structs/functions.
327 * compile/compile-cplus-symmbols.c: New file.
328 * compile/compile-cplus-types.c: New file.
329 * compile/compile-cplus.h: New file.
330 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
332 * compile/compile-object-load.c (get_out_value_type): Use
333 strncmp_iw when comparing symbol names.
334 (compile_object_load): Add mst_bss and mst_data.
335 * compile/compile.c (_initialize_compile): Remove
336 -Wno-implicit-function-declaration from `compile_args'.
337 * compile/gcc-cp-plugin.h: New file.
338 * NEWS: Mention C++ compile support and new debug options.
340 2018-08-29 Keith Seitz <keiths@redhat.com>
342 * linespec.c (collect_info::add_symbol): Make virtual.
343 (struct symbol_searcher_collect_info): New struct.
344 (symbol_searcher::find_all_symbols): New method.
345 * symtab.h (class symbol_searcher): New class.
347 2018-08-29 Keith Seitz <keiths@redhat.com>
349 * linespec.c (struct linespec) <function_symbols, label_symbols>:
350 Change to vector of block_symbol. Update all users.
351 (struct collect_info) <symbols>: Likewise.
352 (collect_info::add_symbol): Take block_symbol as argument.
354 (decode_compound_collector) <m_symbols>: Change type to vector
355 of block_symbol. Update all users.
356 (decode_compound_collector::operator ()): Change parameter type
358 (find_method, find_function_symbols, find_linespec_symbols)
359 (find_label_symbols_in_block, find_label_symbols): Change symbol
360 vectors to block_symbol vectors.
361 * symtab.h (symbol_found_callback_ftype): Change parameter type to
364 2018-08-29 Keith Seitz <keiths@redhat.com>
366 * linespec.c (symbolp): Remove typedef and VEC definitions.
367 (bound_minimal_symbol_d): Likewise.
369 2018-08-29 Keith Seitz <keiths@redhat.com>
371 * linespec.c (decode_compound_collector::decode_compound_collector):
372 Remove initialization for `m_symtabs'.
373 (decode_compound_collector::release_symbols): Change return type
374 to std::vector. Update all callers.
375 (class decode_compound_collector) <m_symbols>: Change type to
377 (lookup_prefix_sym): Change return type to std::vector. Update all
379 (compare_symbols): Remove.
380 (std_compare_symbols): Rename to `compare_symbols'.
381 (find_method): Change `sym_classes' parameter to std::vector.
382 Update all callers. Use std::sort to sort sym_classes.
383 (find_linespec_symbols): Remove cleanup.
385 2018-08-29 Keith Seitz <keiths@redhat.com>
387 * linespec.c (struct linespec) <minimal_symbols>: Change type to
388 std::vector. Update all users.
389 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
390 (struct collect_info) <minimal_symbols>: Likewise.
391 (compare_msymbols): Return bool. Change parameters to const
392 bound_minimal_symbol references.
393 (find_method, find_function_symbols, find_linespec_symbols): Change
394 `minsyms' parameter to std::vector. Update all callers.
396 2018-08-29 Keith Seitz <keiths@redhat.com>
398 * linespec.c (struct linespec) <label_symbols>: Change type to
399 std::vector. Update all users.
400 (find_label_symbols_in_block): Change `result' parameter to
401 std::vector. Update all callers.
402 (find_label_symbols): Return std::vector. Update all callers.
404 2018-08-29 Keith Seitz <keiths@redhat.com>
406 * linespec.c (struct linespec) <function_symbols>: Change type to
407 std::vector. Update all users.
408 (struct collect_info) <function_symbols>: Likewise.
409 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
410 (std_compare_symbols): New function.
411 (find_method, find_function_symbols, find_linespec_symbols)
412 (find_label_symbols_in_block): Change `symbols' parameter to
413 std::vector. Update all callers.
414 (find_label_symbols): Likewise for `function_symbols' and
417 2018-08-29 Keith Seitz <keiths@redhat.com>
419 * linespec.c (symtab_vector_up): Define.
420 (struct linespec) <file_symtabs>: Change type to std::vector *.
422 (struct collect_info) <file_symtabs>: Likewise.
423 (collect_symtabs_from_filename): Return symtab_vector_up.
425 (decode_objc): Remove cleanup.
426 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
427 (symtab_collector::release_symtabs): Return symtab_vector_up.
429 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
431 (collect_symtabs_from_filename, symtabs_from_filename): Return
432 symtab_vector_up. Update all callers.
434 2018-08-29 Tom Tromey <tom@tromey.com>
436 * csky-tdep.c (csky_analyze_prologue): Use
437 core_addr_to_string_nz.
439 2018-08-29 Tom Tromey <tom@tromey.com>
441 * windows-nat.c (struct xlate_exception) <them>: Change type to
443 (xlate): Fix formatting. Remove last entry.
444 (struct xlate_exception, xlate): Comment out.
445 (windows_nat_target::resume): Use ranged for.
447 2018-08-29 Jim Wilson <jimw@sifive.com>
449 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
450 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
452 (riscv_linux_nat_target::store_registers): Likewise.
454 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
458 * gnulib/aclocal.m4: Regenerate.
459 * gnulib/config.in: Regenerate.
460 * gnulib/configure: Regenerate.
461 * gnulib/import/Makefile.am: Update.
462 * gnulib/import/Makefile.in: Update.
463 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
464 * gnulib/import/_Noreturn.h: ... this.
465 * gnulib/import/alloca.in.h: Update.
466 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
467 * gnulib/import/arg-nonnull.h: ... this.
468 * gnulib/import/assure.h: Update.
469 * gnulib/import/at-func.c: Update.
470 * gnulib/import/basename-lgpl.c: Update.
471 * gnulib/import/extra/snippet/c++defs.h: Rename to...
472 * gnulib/import/c++defs.h: ... this.
473 * gnulib/import/canonicalize-lgpl.c: Update.
474 * gnulib/import/cdefs.h: Update.
475 * gnulib/import/chdir-long.c: Update.
476 * gnulib/import/chdir-long.h: Update.
477 * gnulib/import/cloexec.c: Update.
478 * gnulib/import/cloexec.h: Update.
479 * gnulib/import/close.c: Update.
480 * gnulib/import/closedir.c: Update.
481 * gnulib/import/config.charset: Update.
482 * gnulib/import/dirent-private.h: Update.
483 * gnulib/import/dirent.in.h: Update.
484 * gnulib/import/dirfd.c: Update.
485 * gnulib/import/dirname-lgpl.c: Update.
486 * gnulib/import/dirname.h: Update.
487 * gnulib/import/dosname.h: Update.
488 * gnulib/import/dup-safer-flag.c: Update.
489 * gnulib/import/dup-safer.c: Update.
490 * gnulib/import/dup.c: Update.
491 * gnulib/import/dup2.c: Update.
492 * gnulib/import/errno.in.h: Update.
493 * gnulib/import/error.c: Update.
494 * gnulib/import/error.h: Update.
495 * gnulib/import/exitfail.c: Update.
496 * gnulib/import/exitfail.h: Update.
497 * gnulib/import/extra/update-copyright: Update.
498 * gnulib/import/fchdir.c: Update.
499 * gnulib/import/fcntl.c: Update.
500 * gnulib/import/fcntl.in.h: Update.
501 * gnulib/import/fd-hook.c: Update.
502 * gnulib/import/fd-hook.h: Update.
503 * gnulib/import/fd-safer-flag.c: Update.
504 * gnulib/import/fd-safer.c: Update.
505 * gnulib/import/fdopendir.c: Update.
506 * gnulib/import/filename.h: Update.
507 * gnulib/import/filenamecat-lgpl.c: Update.
508 * gnulib/import/filenamecat.h: Update.
509 * gnulib/import/flexmember.h: Update.
510 * gnulib/import/float+.h: Update.
511 * gnulib/import/float.c: Update.
512 * gnulib/import/float.in.h: Update.
513 * gnulib/import/fnmatch.c: Update.
514 * gnulib/import/fnmatch.in.h: Update.
515 * gnulib/import/fnmatch_loop.c: Update.
516 * gnulib/import/fpucw.h: Update.
517 * gnulib/import/frexp.c: Update.
518 * gnulib/import/frexpl.c: Update.
519 * gnulib/import/fstat.c: Update.
520 * gnulib/import/fstatat.c: Update.
521 * gnulib/import/getcwd-lgpl.c: Update.
522 * gnulib/import/getcwd.c: Update.
523 * gnulib/import/getdtablesize.c: Update.
524 * gnulib/import/getlogin_r.c: Update.
525 * gnulib/import/getprogname.c: Update.
526 * gnulib/import/getprogname.h: Update.
527 * gnulib/import/gettext.h: Update.
528 * gnulib/import/gettimeofday.c: Update.
529 * gnulib/import/glob-libc.h: Update.
530 * gnulib/import/glob.c: Update.
531 * gnulib/import/glob.in.h: Update.
532 * gnulib/import/glob_internal.h: Update.
533 * gnulib/import/glob_pattern_p.c: Update.
534 * gnulib/import/globfree.c: Update.
535 * gnulib/import/hard-locale.c: Update.
536 * gnulib/import/hard-locale.h: Update.
537 * gnulib/import/intprops.h: Update.
538 * gnulib/import/inttypes.in.h: Update.
539 * gnulib/import/isnan.c: Update.
540 * gnulib/import/isnand-nolibm.h: Update.
541 * gnulib/import/isnand.c: Update.
542 * gnulib/import/isnanl-nolibm.h: Update.
543 * gnulib/import/isnanl.c: Update.
544 * gnulib/import/itold.c: Update.
545 * gnulib/import/libc-config.h: Update.
546 * gnulib/import/limits.in.h: Update.
547 * gnulib/import/localcharset.c: Update.
548 * gnulib/import/localcharset.h: Update.
549 * gnulib/import/localtime-buffer.c: Update.
550 * gnulib/import/localtime-buffer.h: Update.
551 * gnulib/import/lstat.c: Update.
552 * gnulib/import/m4/00gnulib.m4: Update.
553 * gnulib/import/m4/__inline.m4: Update.
554 * gnulib/import/m4/absolute-header.m4: Update.
555 * gnulib/import/m4/alloca.m4: Update.
556 * gnulib/import/m4/builtin-expect.m4: Update.
557 * gnulib/import/m4/canonicalize.m4: Update.
558 * gnulib/import/m4/chdir-long.m4: Update.
559 * gnulib/import/m4/close.m4: Update.
560 * gnulib/import/m4/closedir.m4: Update.
561 * gnulib/import/m4/configmake.m4: Update.
562 * gnulib/import/m4/d-ino.m4: Update.
563 * gnulib/import/m4/d-type.m4: Update.
564 * gnulib/import/m4/dirent_h.m4: Update.
565 * gnulib/import/m4/dirfd.m4: Update.
566 * gnulib/import/m4/dirname.m4: Update.
567 * gnulib/import/m4/double-slash-root.m4: Update.
568 * gnulib/import/m4/dup.m4: Update.
569 * gnulib/import/m4/dup2.m4: Update.
570 * gnulib/import/m4/eealloc.m4: Update.
571 * gnulib/import/m4/environ.m4: Update.
572 * gnulib/import/m4/errno_h.m4: Update.
573 * gnulib/import/m4/error.m4: Update.
574 * gnulib/import/m4/exponentd.m4: Update.
575 * gnulib/import/m4/exponentl.m4: Update.
576 * gnulib/import/m4/extensions.m4: Update.
577 * gnulib/import/m4/extern-inline.m4: Update.
578 * gnulib/import/m4/fchdir.m4: Update.
579 * gnulib/import/m4/fcntl-o.m4: Update.
580 * gnulib/import/m4/fcntl.m4: Update.
581 * gnulib/import/m4/fcntl_h.m4: Update.
582 * gnulib/import/m4/fdopendir.m4: Update.
583 * gnulib/import/m4/filenamecat.m4: Update.
584 * gnulib/import/m4/flexmember.m4: Update.
585 * gnulib/import/m4/float_h.m4: Update.
586 * gnulib/import/m4/fnmatch.m4: Update.
587 * gnulib/import/m4/fnmatch_h.m4: Update.
588 * gnulib/import/m4/fpieee.m4: Update.
589 * gnulib/import/m4/frexp.m4: Update.
590 * gnulib/import/m4/frexpl.m4: Update.
591 * gnulib/import/m4/fstat.m4: Update.
592 * gnulib/import/m4/fstatat.m4: Update.
593 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
594 * gnulib/import/m4/getcwd-path-max.m4: Update.
595 * gnulib/import/m4/getcwd.m4: Update.
596 * gnulib/import/m4/getdtablesize.m4: Update.
597 * gnulib/import/m4/getlogin.m4: Update.
598 * gnulib/import/m4/getlogin_r.m4: Update.
599 * gnulib/import/m4/getpagesize.m4: Update.
600 * gnulib/import/m4/getprogname.m4: Update.
601 * gnulib/import/m4/gettimeofday.m4: Update.
602 * gnulib/import/m4/glibc21.m4: Update.
603 * gnulib/import/m4/glob.m4: Update.
604 * gnulib/import/m4/glob_h.m4: Update.
605 * gnulib/import/m4/gnulib-cache.m4: Update.
606 * gnulib/import/m4/gnulib-common.m4: Update.
607 * gnulib/import/m4/gnulib-comp.m4: Update.
608 * gnulib/import/m4/gnulib-tool.m4: Update.
609 * gnulib/import/m4/hard-locale.m4: Update.
610 * gnulib/import/m4/include_next.m4: Update.
611 * gnulib/import/m4/inttypes-pri.m4: Update.
612 * gnulib/import/m4/inttypes.m4: Update.
613 * gnulib/import/m4/isnand.m4: Update.
614 * gnulib/import/m4/isnanl.m4: Update.
615 * gnulib/import/m4/largefile.m4: Update.
616 * gnulib/import/m4/limits-h.m4: Update.
617 * gnulib/import/m4/localcharset.m4: Update.
618 * gnulib/import/m4/locale-fr.m4: Update.
619 * gnulib/import/m4/locale-ja.m4: Update.
620 * gnulib/import/m4/locale-zh.m4: Update.
621 * gnulib/import/m4/localtime-buffer.m4: Update.
622 * gnulib/import/m4/longlong.m4: Update.
623 * gnulib/import/m4/lstat.m4: Update.
624 * gnulib/import/m4/malloc.m4: Update.
625 * gnulib/import/m4/malloca.m4: Update.
626 * gnulib/import/m4/math_h.m4: Update.
627 * gnulib/import/m4/mbrtowc.m4: Update.
628 * gnulib/import/m4/mbsinit.m4: Update.
629 * gnulib/import/m4/mbsrtowcs.m4: Update.
630 * gnulib/import/m4/mbstate_t.m4: Update.
631 * gnulib/import/m4/memchr.m4: Update.
632 * gnulib/import/m4/memmem.m4: Update.
633 * gnulib/import/m4/mempcpy.m4: Update.
634 * gnulib/import/m4/memrchr.m4: Update.
635 * gnulib/import/m4/mkdir.m4: Update.
636 * gnulib/import/m4/mkstemp.m4: Update.
637 * gnulib/import/m4/mmap-anon.m4: Update.
638 * gnulib/import/m4/mode_t.m4: Update.
639 * gnulib/import/m4/msvc-inval.m4: Update.
640 * gnulib/import/m4/msvc-nothrow.m4: Update.
641 * gnulib/import/m4/multiarch.m4: Update.
642 * gnulib/import/m4/nocrash.m4: Update.
643 * gnulib/import/m4/off_t.m4: Update.
644 * gnulib/import/m4/onceonly.m4: Update.
645 * gnulib/import/m4/open-cloexec.m4: Update.
646 * gnulib/import/m4/open.m4: Update.
647 * gnulib/import/m4/openat.m4: Update.
648 * gnulib/import/m4/opendir.m4: Update.
649 * gnulib/import/m4/pathmax.m4: Update.
650 * gnulib/import/m4/rawmemchr.m4: Update.
651 * gnulib/import/m4/readdir.m4: Update.
652 * gnulib/import/m4/readlink.m4: Update.
653 * gnulib/import/m4/realloc.m4: Update.
654 * gnulib/import/m4/rename.m4: Update.
655 * gnulib/import/m4/rewinddir.m4: Update.
656 * gnulib/import/m4/rmdir.m4: Update.
657 * gnulib/import/m4/save-cwd.m4: Update.
658 * gnulib/import/m4/secure_getenv.m4: Update.
659 * gnulib/import/m4/setenv.m4: Update.
660 * gnulib/import/m4/signal_h.m4: Update.
661 * gnulib/import/m4/ssize_t.m4: Update.
662 * gnulib/import/m4/stat-time.m4: Update.
663 * gnulib/import/m4/stat.m4: Update.
664 * gnulib/import/m4/std-gnu11.m4: Update.
665 * gnulib/import/m4/stdbool.m4: Update.
666 * gnulib/import/m4/stddef_h.m4: Update.
667 * gnulib/import/m4/stdint.m4: Update.
668 * gnulib/import/m4/stdio_h.m4: Update.
669 * gnulib/import/m4/stdlib_h.m4: Update.
670 * gnulib/import/m4/strchrnul.m4: Update.
671 * gnulib/import/m4/strdup.m4: Update.
672 * gnulib/import/m4/strerror.m4: Update.
673 * gnulib/import/m4/string_h.m4: Update.
674 * gnulib/import/m4/strstr.m4: Update.
675 * gnulib/import/m4/strtok_r.m4: Update.
676 * gnulib/import/m4/sys_socket_h.m4: Update.
677 * gnulib/import/m4/sys_stat_h.m4: Update.
678 * gnulib/import/m4/sys_time_h.m4: Update.
679 * gnulib/import/m4/sys_types_h.m4: Update.
680 * gnulib/import/m4/tempname.m4: Update.
681 * gnulib/import/m4/time_h.m4: Update.
682 * gnulib/import/m4/unistd-safer.m4: Update.
683 * gnulib/import/m4/unistd_h.m4: Update.
684 * gnulib/import/m4/warn-on-use.m4: Update.
685 * gnulib/import/m4/wchar_h.m4: Update.
686 * gnulib/import/m4/wchar_t.m4: Update.
687 * gnulib/import/m4/wctype_h.m4: Update.
688 * gnulib/import/m4/wint_t.m4: Update.
689 * gnulib/import/malloc.c: Update.
690 * gnulib/import/malloc/scratch_buffer.h: Update.
691 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
692 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
693 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
694 * gnulib/import/malloca.c: Update.
695 * gnulib/import/malloca.h: Update.
696 * gnulib/import/malloca.valgrind: Update.
697 * gnulib/import/math.in.h: Update.
698 * gnulib/import/mbrtowc.c: Update.
699 * gnulib/import/mbsinit.c: Update.
700 * gnulib/import/mbsrtowcs-impl.h: Update.
701 * gnulib/import/mbsrtowcs-state.c: Update.
702 * gnulib/import/mbsrtowcs.c: Update.
703 * gnulib/import/memchr.c: Update.
704 * gnulib/import/memmem.c: Update.
705 * gnulib/import/mempcpy.c: Update.
706 * gnulib/import/memrchr.c: Update.
707 * gnulib/import/mkdir.c: Update.
708 * gnulib/import/mkstemp.c: Update.
709 * gnulib/import/msvc-inval.c: Update.
710 * gnulib/import/msvc-inval.h: Update.
711 * gnulib/import/msvc-nothrow.c: Update.
712 * gnulib/import/msvc-nothrow.h: Update.
713 * gnulib/import/open.c: Update.
714 * gnulib/import/openat-die.c: Update.
715 * gnulib/import/openat-priv.h: Update.
716 * gnulib/import/openat-proc.c: Update.
717 * gnulib/import/openat.c: Update.
718 * gnulib/import/openat.h: Update.
719 * gnulib/import/opendir.c: Update.
720 * gnulib/import/pathmax.h: Update.
721 * gnulib/import/pipe-safer.c: Update.
722 * gnulib/import/rawmemchr.c: Update.
723 * gnulib/import/readdir.c: Update.
724 * gnulib/import/readlink.c: Update.
725 * gnulib/import/realloc.c: Update.
726 * gnulib/import/ref-add.sin: Update.
727 * gnulib/import/ref-del.sin: Update.
728 * gnulib/import/rename.c: Update.
729 * gnulib/import/rewinddir.c: Update.
730 * gnulib/import/rmdir.c: Update.
731 * gnulib/import/same-inode.h: Update.
732 * gnulib/import/save-cwd.c: Update.
733 * gnulib/import/save-cwd.h: Update.
734 * gnulib/import/scratch_buffer.h: Update.
735 * gnulib/import/secure_getenv.c: Update.
736 * gnulib/import/setenv.c: Update.
737 * gnulib/import/signal.in.h: Update.
738 * gnulib/import/stat-time.c: Update.
739 * gnulib/import/stat-time.h: Update.
740 * gnulib/import/stat-w32.c: Update.
741 * gnulib/import/stat-w32.h: Update.
742 * gnulib/import/stat.c: Update.
743 * gnulib/import/stdbool.in.h: Update.
744 * gnulib/import/stddef.in.h: Update.
745 * gnulib/import/stdint.in.h: Update.
746 * gnulib/import/stdio.in.h: Update.
747 * gnulib/import/stdlib.in.h: Update.
748 * gnulib/import/str-two-way.h: Update.
749 * gnulib/import/strchrnul.c: Update.
750 * gnulib/import/strdup.c: Update.
751 * gnulib/import/streq.h: Update.
752 * gnulib/import/strerror-override.c: Update.
753 * gnulib/import/strerror-override.h: Update.
754 * gnulib/import/strerror.c: Update.
755 * gnulib/import/string.in.h: Update.
756 * gnulib/import/stripslash.c: Update.
757 * gnulib/import/strnlen1.c: Update.
758 * gnulib/import/strnlen1.h: Update.
759 * gnulib/import/strstr.c: Update.
760 * gnulib/import/strtok_r.c: Update.
761 * gnulib/import/sys_stat.in.h: Update.
762 * gnulib/import/sys_time.in.h: Update.
763 * gnulib/import/sys_types.in.h: Update.
764 * gnulib/import/tempname.c: Update.
765 * gnulib/import/tempname.h: Update.
766 * gnulib/import/time.in.h: Update.
767 * gnulib/import/unistd--.h: Update.
768 * gnulib/import/unistd-safer.h: Update.
769 * gnulib/import/unistd.in.h: Update.
770 * gnulib/import/unsetenv.c: Update.
771 * gnulib/import/verify.h: Update.
772 * gnulib/import/extra/snippet/warn-on-use.h: Update.
773 * gnulib/import/wchar.in.h: Update.
774 * gnulib/import/wctype.in.h: Update.
775 * gnulib/import/xalloc-oversized.h: Update.
776 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
777 "53e2c179f26a890fa6685af4b6c1397ee370433b".
779 2018-08-16 Gary Benson <gbenson@redhat.com>
782 * gdb/main.c (captured_main_1): Exit with nonzero status
783 in batch mode if the last command to be executed failed.
784 * NEWS: Mention the above.
786 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
788 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
789 end of warning message.
791 2018-08-29 Alan Hayward <alan.hayward@arm.com>
794 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
795 (aarch64_extract_return_value): Use
796 aapcs_is_vfp_call_or_return_candidate.
797 (aarch64_return_in_memory): Likewise.
798 (aarch64_store_return_value): Likewise.
800 2018-08-29 Alan Hayward <alan.hayward@arm.com>
803 (aapcs_is_vfp_call_or_return_candidate): Make static
804 (pass_in_v_or_stack): Remove function.
805 (pass_in_v_vfp_candidate): New function.
806 (aarch64_push_dummy_call): Check for float register candidates.
808 2018-08-29 Alan Hayward <alan.hayward@arm.com>
810 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
811 (aapcs_is_vfp_call_or_return_candidate_1): New function.
812 (aapcs_is_vfp_call_or_return_candidate): Likewise.
814 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
817 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
818 (struct ipa_sym_addresses): Rename to...
819 (struct ipa_sym_addresses_common): ... this.
820 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
822 2018-08-28 Tom Tromey <tom@tromey.com>
824 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
825 (token_fifo): Now a std::vector.
826 (yylex, c_parse): Update.
827 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
828 (token_fifo): Now a std::vector.
829 (yylex, d_parse): Update.
830 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
831 (token_fifo): Now a std::vector.
832 (yylex, go_parse): Update.
834 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
836 * parser-defs.h (struct type_stack) <elements>: Change type to
837 std::vector<union type_stack_elt>.
838 <depth, size>: Remove.
839 * parse.c (parse_exp_in_context_1): Adjust.
840 (type_stack_reserve): Remove.
841 (check_type_stack_depth): Remove.
842 (insert_into_type_stack): Adjust to std::vector.
843 (insert_type): Likewise.
844 (push_type): Likewise.
845 (push_type_int): Likewise.
846 (insert_type_address_space): Likewise.
847 (pop_type): Likewise.
848 (pop_type_int): Likewise.
849 (pop_typelist): Likewise.
850 (pop_type_stack): Likewise.
851 (append_type_stack): Likewise.
852 (push_type_stack): Likewise.
853 (get_type_stack): Likewise.
854 (type_stack_cleanup): Likewise.
855 (push_typelist): Likewise.
856 (follow_types): Likewise.
857 (_initialize_parse): Likewise.
859 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
861 * NEWS: Mention csky target.
863 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
864 Hafiz Abid Qadeer <abidh@codesourcery.com>
865 Don Breazeal <donb@codesourcery.com>
867 * csky-linux-tdep.c: New file.
868 * csky-tdep.c: Likewise.
869 * csky-tdep.h: Likewise.
870 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
872 (HFILES_NO_SRCDIR): Add csky-tdep.h.
873 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
874 * configure.tgt: Add csky support.
876 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
878 * python/py-framefilter.c (py_print_frame): Print frame architecture
879 when printing on an MI output.
881 2018-08-27 Tom Tromey <tom@tromey.com>
884 * configure: Rebuild.
885 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
887 2018-08-27 Tom Tromey <tom@tromey.com>
889 * aarch64-linux-tdep.c
890 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
893 2018-08-27 Tom Tromey <tom@tromey.com>
895 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
897 (ppc64_standard_linkage1, ppc64_standard_linkage2)
898 (ppc64_standard_linkage3, ppc64_standard_linkage4)
899 (ppc64_standard_linkage5, ppc64_standard_linkage6)
900 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
903 2018-08-27 Tom Tromey <tom@tromey.com>
905 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
906 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
908 2018-08-27 Tom Tromey <tom@tromey.com>
910 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
911 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
913 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
915 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
917 * sparc-linux-tdep.c (sparc32_linux_sigframe)
918 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
919 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
921 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
922 (ppc64_linux_sigaction_tramp_frame)
923 (ppc32_linux_sighandler_tramp_frame)
924 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
925 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
926 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
927 * mn10300-linux-tdep.c (am33_linux_sigframe)
928 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
929 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
930 * mips-linux-tdep.c (mips_linux_o32_sigframe)
931 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
932 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
933 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
934 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
935 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
936 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
937 * microblaze-linux-tdep.c
938 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
939 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
940 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
941 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
942 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
943 * common/common-types.h (ULONGEST_MAX): New define.
944 (CORE_ADDR_MAX): Fix formatting.
945 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
946 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
947 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
948 (arm_linux_rt_sigreturn_tramp_frame)
949 (arm_eabi_linux_sigreturn_tramp_frame)
950 (arm_eabi_linux_rt_sigreturn_tramp_frame)
951 (thumb2_eabi_linux_sigreturn_tramp_frame)
952 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
953 (arm_linux_restart_syscall_tramp_frame)
954 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
955 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
956 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
958 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
960 2018-08-27 Tom Tromey <tom@tromey.com>
962 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
964 * mips-tdep.c (mips_deal_with_atomic_sequence)
965 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
966 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
967 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
968 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
970 * aarch64-tdep.c (aarch64_software_single_step): Use
973 2018-08-27 Tom Tromey <tom@tromey.com>
975 * linespec.c (complete_linespec_component): Add cast to "char".
976 * completer.c (completion_tracker::build_completion_result): Add
979 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
981 * solist.h (struct solist, struct target_so_ops): Fix
984 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
986 * ada-tasks.c (ada_task_info_s): Remove typedef.
987 (DEF_VEC_O(ada_task_info_s)): Remove.
988 (struct ada_tasks_inferior_data): Initialize fields.
989 <task_list>: Make an std::vector.
990 (get_ada_tasks_inferior_data): Allocate with new.
991 (ada_get_task_number): Adjust.
992 (get_task_number_from_id): Likewise.
993 (valid_task_id): Likewise.
994 (ada_get_task_info_from_ptid): Likewise.
995 (iterate_over_live_ada_tasks): Likewise.
996 (add_ada_task): Likewise.
997 (read_known_tasks): Likewise.
998 (ada_build_task_list): Likewise.
999 (print_ada_task_info): Likewise.
1000 (info_task): Likewise.
1001 (task_command_1): Likewise.
1003 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
1005 * ada-lang.c (add_angle_brackets): Return std::string.
1007 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
1009 * python/py-threadevent.c (py_get_event_thread): Initialize
1012 2018-08-24 Pedro Alves <palves@redhat.com>
1014 * python/py-bpevent.c (create_breakpoint_event_object): Use
1015 copy-initialization.
1016 * python/py-continueevent.c (emit_continue_event): Use
1017 copy-initialization.
1018 * python/py-exitedevent.c (create_exited_event_object): Return a
1020 (emit_exited_event): Use copy-initialization.
1021 * python/py-inferior.c (python_new_inferior)
1022 (python_inferior_deleted, add_thread_object): Use
1023 copy-initialization.
1024 * python/py-infevents.c (create_inferior_call_event_object)
1025 (create_register_changed_event_object)
1026 (create_memory_changed_event_object): Return a gdbpy_ref<>.
1027 (emit_inferior_call_event, emit_memory_changed_event)
1028 (emit_register_changed_event): Use copy-initialization.
1029 * python/py-newobjfileevent.c (create_new_objfile_event_object):
1030 Return a gdbpy_ref<>.
1031 (emit_new_objfile_event): Use copy-initialization.
1032 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1033 (emit_clear_objfiles_event): Use copy-initialization.
1034 * python/py-signalevent.c (create_signal_event_object): Use
1035 copy-initialization.
1036 * python/py-threadevent.c (create_thread_event_object): Use
1037 copy-initialization.
1039 2018-08-24 Pedro Alves <palves@redhat.com>
1040 Simon Marchi <simon.marchi@ericsson.com>
1043 * python/py-continueevent.c: Include "gdbthread.h".
1044 (create_continue_event_object): Add intro comment. Add 'ptid'
1045 parameter. Use it to find thread to pass to
1046 create_thread_event_object.
1047 (emit_continue_event): Pass PTID down to
1048 create_continue_event_object.
1049 * python/py-event.h (py_get_event_thread): Declare.
1050 (create_thread_event_object): Remove default from 'thread'
1052 * python/py-stopevent.c (create_stop_event_object): Use
1053 py_get_event_thread.
1054 * python/py-threadevent.c (get_event_thread): Rename to ...
1055 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1056 and use it to find the thread.
1057 (create_thread_event_object): Assert that THREAD isn't null.
1058 Don't find the event thread here.
1060 2018-08-23 Kevin Buettner <kevinb@redhat.com>
1062 * block.h (blockrange, blockranges): New struct declarations.
1063 (struct block): Add new field named `ranges'.
1064 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1065 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1066 macros for accessing ranges in struct block.
1067 (make_blockranges): New declaration.
1068 block.c (make_blockranges): New function.
1069 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1071 * symtab.h (find_pc_partial_function): Add new parameter `block'.
1072 * blockframe.c (cache_pc_function_block): New static global.
1073 (clear_pc_function_cache): Clear cache_pc_function_block.
1074 (find_pc_partial_function): Move comment to symtab.h. Add
1075 support for non-contiguous blocks.
1076 * cli/cli-cmds.c (block.h): Include.
1077 (print_disassembly): Handle printing of non-contiguous blocks.
1078 (disassemble_current_function): Likewise.
1079 (disassemble_command): Likewise.
1081 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1083 * blockframe.c (get_pc_function_start): Likewise.
1084 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1085 (gcc_symbol_address): Likewise.
1086 * compile/compile-object-run.c (compile_object_run): Likewise.
1087 * compile/compile.c (get_expr_block_and_pc): Likewise.
1088 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1089 (func_addr_to_tail_call_list): Likewise.
1090 * findvar.c (default_read_var_value): Likewise.
1091 * inline-frame.c (inline_frame_this_id): Likewise.
1092 (skip-inline_frames): Likewise.
1093 * infcmd.c (until_next_command): Likewise.
1094 * linespec.c (convert_linespec_to_sals): Likewise.
1095 * parse.c (parse_exp_in_context_1): Likewise.
1096 * printcmd.c (build_address_symbolic): likewise.
1097 (info_address_command): Likewise.
1098 symtab.c (find_function_start_sal): Likewise.
1099 (skip_prologue_sal): Likewise.
1100 (find_function_alias_target): Likewise.
1101 (find_gnu_ifunc): Likewise.
1102 * stack.c (find_frame_funname): Likewise.
1103 * symtab.c (fixup_symbol_section): Likewise.
1104 (find_function_start_sal): Likewise.
1105 (skip_prologue_sal): Likewsie.
1106 (find_function_alias_target): Likewise.
1107 (find_gnu_ifunc): Likewise.
1108 * tracepoint.c (info_scope_command): Likewise.
1109 * value.c (value_fn_field): Likewise.
1111 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1112 in place of find_pc_partial_function.
1113 * blockframe.c (find_function_entry_range_from_pc): New function.
1114 * symtab.h (find_function_entry_range_from_pc): Declare and document.
1115 * objfiles.c (objfile_relocate1): Relocate start and end addresses
1116 for each range in a block.
1119 2018-08-23 Xavier Roirand <roirand@adacore.com>
1121 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1124 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1126 * solib-svr4.c (read_program_headers_from_bfd): Return
1127 gdb::optional<gdb::byte_vector>.
1128 (svr4_exec_displacement): Adjust.
1130 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1132 * solib-svr4.c (read_program_header): Return
1133 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1134 (find_program_interpreter): Return
1135 gdb::optional<gdb::byte_vector>.
1136 (scan_dyntag_auxv): Adjust.
1137 (enable_break): Adjust.
1138 (svr4_exec_displacement): Adjust.
1140 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1142 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1143 * inf-child.c (inf_child_target::terminal_save_inferior): New.
1145 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1147 * guile/scm-string.c (gdbscm_scm_from_printf): Use
1149 * guile/scm-utils.c (gdbscm_printf): Likewise.
1150 * serial.c (serial_printf): Likewise.
1151 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1153 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
1155 * stack.c (print_frame): Print frame architecture when printing on
1157 * NEWS: Mention new "arch" attribute in frame output.
1159 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1161 * arch/aarch64.h (aarch64_regnum): Update comment.
1163 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1165 * NEWS: Add SVE to 8.2 section.
1167 2018-08-21 Pedro Alves <palves@redhat.com>
1169 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1170 out from gdbscm_parse_function_args.
1171 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1172 gdbscm_parse_function_args_1.
1174 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
1177 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1180 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
1182 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1184 2018-08-19 Michael Spang <spang@google.com>
1187 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1188 for PT_TLS segments.
1190 2018-08-18 Kevin Buettner <kevinb@redhat.com>
1192 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1193 dwarf_variable_value.
1194 * dwarf2-frame.c (class dwarf_expr_executor):
1195 Add override for dwarf_variable_value.
1196 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1197 (class symbol_needs_eval_context): Likewise.
1198 (indirect_synthetic_pointer): Add forward declaration.
1199 (sect_variable_value): New function.
1200 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1201 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1202 for DW_OP_GNU_variable_value.
1204 2018-08-16 Tom Tromey <tom@tromey.com>
1206 * top.c (read_command_file): Update.
1207 (command_line_input): Remove "repeat" argument.
1208 * ada-lang.c (get_selections): Update.
1209 * linespec.c (decode_line_2): Update.
1210 * defs.h (command_line_input): Remove argument.
1211 * cli/cli-script.c (read_next_line): Update.
1212 * python/py-gdb-readline.c: Update.
1214 2018-08-17 Tom Tromey <tom@tromey.com>
1216 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1219 2018-08-15 Tom Tromey <tom@tromey.com>
1221 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1223 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
1225 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1226 If used, use find_pc_partial_function to find address range
1228 * mi/mi-main.c (mi_cmd_list_features): Report
1229 "data-disassemble-a-option" feature.
1230 * NEWS: Mention new -data-disassemble option -a.
1232 2018-08-13 Tom Tromey <tom@tromey.com>
1234 * common/common-defs.h (_FORTIFY_SOURCE): Define.
1236 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1238 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1239 (aarch64_linux_collect_sve_regset): Likewise.
1240 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1241 * regcache.h (regcache_map_entry_size): New function.
1243 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1245 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1246 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1247 (SVE_HEADER_VL_LENGTH): Likewise.
1248 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1249 (SVE_HEADER_FLAGS_LENGTH): Likewise.
1250 (SVE_HEADER_RESERVED_LENGTH): Likewise.
1251 (SVE_HEADER_SIZE_OFFSET): Likewise.
1252 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1253 (SVE_HEADER_VL_OFFSET): Likewise.
1254 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1255 (SVE_HEADER_FLAGS_OFFSET): Likewise.
1256 (SVE_HEADER_RESERVED_OFFSET): Likewise.
1257 (SVE_HEADER_SIZE): Likewise.
1258 (aarch64_linux_core_read_vq): Add function.
1259 (aarch64_linux_core_read_description): Check for SVE section.
1261 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1263 * aarch64-fbsd-tdep.c
1264 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1266 * aarch64-linux-tdep.c
1267 (aarch64_linux_iterate_over_regset_sections): Likewise.
1268 * alpha-linux-tdep.c
1269 (alpha_linux_iterate_over_regset_sections):
1271 (alphanbsd_iterate_over_regset_sections): Likewise.
1273 (amd64fbsd_iterate_over_regset_sections): Likewise.
1274 * amd64-linux-tdep.c
1275 (amd64_linux_iterate_over_regset_sections): Likewise.
1277 (armbsd_iterate_over_regset_sections): Likewise.
1279 (arm_fbsd_iterate_over_regset_sections): Likewise.
1281 (arm_linux_iterate_over_regset_sections): Likewise.
1282 * corelow.c (get_core_registers_cb): Likewise.
1283 (core_target::fetch_registers): Likewise.
1284 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1285 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1286 * gdbarch.h (void): Regenerate.
1287 * gdbarch.sh: Add supply_size and collect_size.
1288 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1289 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1290 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1291 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1292 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1293 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1294 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1295 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1296 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1297 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1298 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1299 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1300 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1301 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1302 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1303 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1304 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1305 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1306 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1307 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1308 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1309 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1310 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1311 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1312 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1313 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1314 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1315 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1316 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1317 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1319 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
1321 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1324 2018-08-10 Keith Seitz <keiths@redhat.com>
1326 * compile/compile-c-support.c (add_code_header, add_code_footer):
1327 Move into policy class.
1328 (c_push_user_expression, pop_user_expression_nop)
1329 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1330 (compile_program): New host class.
1331 (c_compile_program): New typedef.
1332 (c_compute_porgram): Use c_compile_program.
1334 2018-08-10 Keith Seitz <keiths@redhat.com>
1336 * compile/compile-internal.h (compile_instance::~compile_instance):
1337 Remove calls to htab_delete.
1338 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1339 * compile.c (compile_instance::compile_instance): Initialize
1340 htab unique pointers.
1341 (compile_instance::get_cached_type, compile_instance::insert_type)
1342 (compile_instance::error_symbol_once): Update for unique_ptr.
1344 2018-08-10 Keith Seitz <keiths@redhat.com>
1346 * compile/compile-c-symbols.c (struct symbol_error)
1347 (hash_symbol_error, eq_symbol_error, del_symbol_error)
1348 (compile_instance::insert_symbol_error)
1349 (compile_instance::error_symbol_once): Move to ...
1350 * compile/compile.c: ... here.
1352 2018-08-10 Keith Seitz <keiths@redhat.com>
1354 * compile/compile-c-support.c (c_get_compile_context): Use `new'
1355 instead of `new_compile_instance'.
1356 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1358 If the symbol error map is not initialized, create it.
1359 (generate_c_for_for_one_symbol): Do not check/initialize
1360 the symbol error map.
1361 * compile/compile-c-types.c (compile_c_instance): Make a class.
1363 (compile_instance::compile_instance): Initialize the type cache.
1364 (get_cached_type): New function.
1365 (insert_type): Update description.
1366 (compile_c_instance::m_default_cflags): Define.
1367 (convert_type): Update description. Use get_cached_type.
1368 (delete_instance): Moved to destructor.
1369 (new_compile_instance): Moved to constructor.
1370 * compile/compile-c.h (compile_c_instance): Make class inheriting
1371 from compile_instance.
1372 <base>: Remove field.
1373 <type_map, symbol_err_map>: Move to base class.
1374 <c_plugin>: Rename to `m_plugin' and remove pointer type.
1375 * compile/compile-internal.h (compile_instance): Make class.
1376 <type_map_t, symbol_err_map_t>: Define.
1377 <fe>: Rename to `m_gcc_fe'.
1378 <scope, block, gcc_target_options>: Add `m_' prefix.
1379 <m_type_map, m_symbol_err_map>: New fields, moved from
1382 (convert_type, new_compile_instance): Remove.
1383 * compile/compile.c (cleanup_compile_instance): Remove.
1384 (compile_to_object): Use unique_ptr to eliminate cleanups.
1385 (compile_instance::set_print_callback, compile_instance::version)
1386 (compile_instance::set_verbose)
1387 (compile_instance::set_driver_filename)
1388 (compile_instance::set_triplet_regexp)
1389 (compile_instance::set_arguments)
1390 (compile_instance::set_source_file)
1391 (compile_instance::compile): Define.
1393 2018-08-10 Keith Seitz <keiths@redhat.com>
1395 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1396 * compile/compile-c-types.c: Define GCC_METHODN macros and include
1397 gcc-c-fe.def to define C plugin.
1398 (delete_instance): Delete `c_plugin'.
1399 (new_compile_instance): Initialize `c_plugin'.
1400 * compile/compile-c.h: Include gcc_c_plugin.h.
1401 (struct compile_c_instance) <c_plugin>: New member.
1402 * gcc-c-plugin.h: New file.
1403 Update all callers with API change.
1405 2018-08-10 Keith Seitz <keiths@redhat.com>
1407 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1408 (HFILES_NO_SRCDIR): ... to here.
1409 Add compile-internal.h and compile-c.h.
1410 * compile/compile-c-support.c: Include compile-c.h.
1411 * compile/compile-c-symbols.c: Include compile-c.h.
1412 (generate_c_for_variable_locations): Update comment.
1413 * compile/compile-c-types.c: Include compile-c.h.
1414 * compile/compile-c.h: New file -- moved C language declarations
1415 from other files here.
1416 * compile/compile-internal.h: Do not include hashtab.h or
1417 common/enum-flags.h.
1418 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1419 (gcc_convert_symbol, gcc_symbol_address)
1420 (generate_c_for_variable_locations, c_get_mode_for_size)
1421 (c_get_range_decl_name): Definitions moved to compile-c.h.
1422 * compile/compile-loc2c.c: Include compile-c.h.
1424 2018-08-10 Keith Seitz <keiths@redhat.com>
1426 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1427 (c_symbol_substitution_name): ... this.
1430 2018-08-10 Keith Seitz <keiths@redhat.com>
1432 * compile/compile-c-support.c (c_compute_program): Use
1433 unique_xmalloc_ptr to eliminate cleanup.
1434 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1435 Return a unique_xmalloc_ptr and eliminate cleanup.
1436 * compile/compile-internal.h (generate_c_for_variable_locations):
1437 Return unique_xmalloc_ptr and update description.
1439 2018-08-10 Alan Hayward <alan.hayward@arm.com>
1441 * corelow.c (core_target::get_core_register_section): Rename
1442 min_size to section_min_size.
1444 2018-08-09 Jim Wilson <jimw@sifive.com>
1446 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1447 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1448 * NEWS: Mention new GNU/Linux RISC-V target.
1449 * configure.host: Add riscv*-*-linux*.
1450 * configure.nat: Add riscv*.
1451 * configure.tgt: Add riscv*-*-linux*.
1452 * riscv-linux-nat.c: New file.
1453 * riscv-linux-tdep.c: New file.
1455 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1457 * infrun.c (resume): Make static, add forward declaration.
1458 (proceed): Update header comment.
1459 * infrun.h (resume): Delete declaration.
1461 2018-08-09 Tom Tromey <tom@tromey.com>
1463 * riscv-tdep.h: Minor formatting fixes.
1465 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
1467 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1468 * dwarf-index-cache.c (create_dir_and_check): Likewise.
1469 (test_mkdir_recursive): Likewise.
1470 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1472 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1474 * valarith.c (value_subscripted_rvalue): If an array is not in
1475 memory, and we don't know the upper bound, then we can't know that
1476 the requested element exists or not.
1478 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
1480 * target.c (str_comma_list_concat_elem): Fix typo in comment.
1481 (target_options_to_string): Add comment.
1483 2018-08-08 Tom Tromey <tom@tromey.com>
1485 * unittests/scoped_mmap-selftests.c: Check result of "write".
1487 2018-08-08 Jim Wilson <jimw@sifive.com>
1489 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1490 (decode_register_index_short): New.
1491 (decode_j_type_insn, decode_cj_type_insn): New.
1492 (decode_b_type_insn, decode_cb_type_insn): New.
1493 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
1494 local xlen. Check xlen when decoding ambiguous compressed insns. In
1495 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1496 is_c_sw_insn instead of is_sw_insn.
1497 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1498 (riscv_software_single_step): New.
1499 * riscv-tdep.h (riscv_software_single_step): Declare.
1501 * riscv-tdep.c (riscv_isa_xlen): Drop static.
1502 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1504 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
1507 * target.c (dispose_inferior): Don't dispose of inferiors that are
1510 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
1512 * remote.c (remote_target::download_tracepoint): Change char* to
1515 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
1517 * target.h (target_options_to_string): Return an std::string.
1518 * target.c (str_comma_list_concat_elem): Return void, use
1520 (do_option): Likewise.
1521 (target_options_to_string): Return an std::string.
1522 * linux-nat.c (linux_nat_target::wait): Adjust.
1523 * target-debug.h (target_debug_print_options): Adjust.
1525 2018-08-07 Tom Tromey <tom@tromey.com>
1527 * Makefile.in (CPPFLAGS): New variable.
1528 (INTERNAL_CPPFLAGS): Use it.
1530 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1532 * NEWS: Mention the index cache.
1534 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1536 * common/pathstuff.h (get_standard_cache_dir): New.
1537 * common/pathstuff.c (get_standard_cache_dir): New.
1538 * build-id.h (build_id_to_string): New.
1539 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1540 DEBUG_STR_SUFFIX): Move to here.
1541 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1542 DEBUG_STR_SUFFIX): Move from there.
1543 (write_psymtabs_to_index): Make non-static, add basename
1544 parameter. Write to temporary files, rename when done.
1545 (save_gdb_index_command): Adjust call to
1546 write_psymtabs_to_index.
1547 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1549 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1550 (get_gdb_index_contents_from_cache): New.
1551 (get_gdb_index_contents_from_cache_dwz): New.
1552 (dwarf2_initialize_objfile): Read index from cache.
1553 (dwarf2_build_psymtabs): Save to index.
1554 * dwarf-index-cache.h: New file.
1555 * dwarf-index-cache.c: New file.
1556 * dwarf-index-write.h: New file.
1558 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1560 * gnulib/aclocal.m4: Re-generate.
1561 * gnulib/config.in: Re-generate.
1562 * gnulib/configure: Re-generate.
1563 * gnulib/import/Makefile.am: Re-generate.
1564 * gnulib/import/Makefile.in: Re-generate.
1565 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1566 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1567 * gnulib/import/m4/mkdir.m4: New file.
1568 * gnulib/import/mkdir.c: New file.
1569 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1572 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1574 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1575 * common/scoped_mmap.c: New file.
1576 * common/scoped_mmap.h (destroy): New method.
1577 (~scoped_mmap, reset): Use destroy.
1578 (scoped_mmap): New move constructor.
1579 (mmap_file): New declaration.
1580 * unittests/scoped_mmap-selftests.c (test_normal,
1581 test_invalid_filename, run_tests): New functions.
1582 (_initialize_scoped_mmap_selftests): Register selftest.
1584 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1586 * dwarf2read.c (read_gdb_index_from_section): Rename to...
1587 (read_gdb_index_from_buffer): ... this. Remove section
1588 parameter, add buffer parameter.
1589 (get_gdb_index_contents_ftype,
1590 get_gdb_index_contents_dwz_ftype): New typedefs.
1591 (dwarf2_read_gdb_index): Add callback parameters to get the
1593 (get_gdb_index_contents_from_section): New.
1594 (dwarf2_initialize_objfile): Update call to
1595 dwarf2_read_gdb_index.
1597 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1599 * common/filestuff.h (gdb_fopen_cloexec): New overload.
1600 (gdb_open_cloexec): Likewise.
1601 * nat/linux-osdata.c (command_from_pid): Use string_printf.
1602 (commandline_from_pid): Likewise.
1603 (linux_xfer_osdata_threads): Likewise.
1604 (linux_xfer_osdata_fds): Likewise.
1605 * ada-lang.c (is_package_name): Likewise.
1606 * auxv.c (procfs_xfer_auxv): Likewise.
1607 * breakpoint.c (print_one_breakpoint_location): Use
1609 (print_one_catch_solib): Use string_printf.
1610 * coff-pe-read.c (add_pe_exported_sym): Likewise.
1611 (add_pe_forwarded_sym): Likewise.
1612 * dwarf2read.c (create_type_unit_group): Likewise.
1613 (build_error_marker_type): Likewise.
1614 * infcall.c (get_function_name): Likewise.
1615 * valprint.c (print_converted_chars_to_obstack): Likewise.
1616 * xtensa-tdep.c (xtensa_register_type): Likewise.
1618 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
1620 * remote.c (remote_target::download_tracepoint): Fix format
1623 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1625 * tracefile.c: Include common/byte-vector.h.
1626 (trace_save): Change type of buf to gdb::byte_vector. Initialize
1627 with trace_regblock_size if needed. Update uses of buf.
1629 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1631 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1632 std::vector<unsigned char>.
1633 * tracepoint.c (collection_list::collection_list): Remove
1634 m_regs_mask initializer from initializer list. Resize
1635 m_regs_mask using the largest remote register number.
1636 (collection_list::add_remote_register): Remove size check on
1637 m_regs_mask. Use at to access element.
1638 (collection_list::stringify): Change type of temp_buf to
1639 gdb::char_vector. Update uses of temp_buf. Resize if needed to
1640 stringify the register mask. Use pack_hex_byte for the register
1643 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1645 * tracepoint.h (class collection_list) <add_register>: Remove.
1646 <add_remote_register, add_ax_registers, add_local_register>:
1648 <add_memrange>: Add scope parameter.
1649 * tracepoint.c (encode_actions_1): Likewise.
1650 (collection_list::add_register): Rename to ...
1651 (collection_list::add_remote_register): ... this. Update
1653 (collection_list::add_ax_registers, add_local_register): New
1655 (collection_list::add_memrange): Add scope parameter. Call
1656 add_local_register instead of add_register.
1657 (finalize_tracepoint_aexpr): New function.
1658 (collection_list::collect_symbol): Update calls to add_memrange.
1659 Call add_local_register instead of add_register. Call
1660 add_ax_registers. Call finalize_tracepoint_aexpr.
1661 (encode_actions_1): Get remote regnos for $reg action. Call
1662 add_remote_register, add_ax_registers, and add_local_register.
1663 Update call to add_memrange. Call finalize_tracepoint_aexpr.
1664 (validate_actionline): Call finalize_tracepoint_aexpr.
1666 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1668 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1669 Replace array buf with gdb::char_vector buf, of size
1670 get_remote_packet_size (). Replace references to buf and
1671 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
1672 and xsnprintf with snprintf. Raise errors if the buffer is too
1675 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1677 * remote.c (remote_target::download_tracepoint): Fix the has_more
1678 predicate in the QTDP action list iteration.
1680 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1682 * remote.c (remote_target::download_tracepoint): Fix indentation
1685 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1687 * proc-api.c (_initialize_proc_api): Remove c, unused.
1688 * procfs.c (procfs_init_inferior): Remove signals, unused.
1689 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1692 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
1693 Andrew Burgess <andrew.burgess@embecosm.com>
1695 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1696 'W_STOPCODE (0)' as this could be ambiguous.
1698 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
1700 * ser-tcp.c (net_open): Fix thinko when deciding whether to
1701 disable TCP's Nagle algorithm (use "ai_protocol" instead of
1704 2018-08-02 Tom Tromey <tom@tromey.com>
1707 * dwarf2read.c (read_func_scope): Set symtab on template parameter
1709 (process_structure_scope): Likewise.
1711 2018-08-02 Xavier Roirand <roirand@adacore.com>
1714 * darwin-nat.c (darwin_kill_inferior): Fix handling of
1717 2018-08-02 Tom Tromey <tom@tromey.com>
1719 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1720 (darwin_suspend_inferior, darwin_resume_inferior)
1721 (darwin_decode_notify_message, darwin_resume_inferior_threads)
1722 (darwin_check_new_threads): Check result of get_darwin_inferior.
1724 2018-07-31 Joel Brobecker <brobecker@adacore.com>
1728 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
1730 * varobj.c (varobj_get_path_expr_parent): Report an error if
1731 parent is a dynamic varobj.
1733 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1735 * gnulib/aclocal.m4: Re-generate.
1736 * gnulib/config.in: Re-generate.
1737 * gnulib/configure: Re-generate.
1738 * gnulib/import/Makefile.in: Re-generate.
1739 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1740 * gnulib/import/m4/onceonly.m4: Re-generate.
1742 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1744 * target-descriptions.c (struct xml_test_tdesc): New.
1745 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1746 (record_xml_tdesc): Update.
1747 (maintenance_check_xml_descriptions): Update.
1748 * target-descriptions.h (record_xml_tdesc): Update comment.
1750 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
1752 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1753 checking array bounds are defined.
1755 2018-07-30 Tom Tromey <tom@tromey.com>
1757 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1758 irreflexivity violation.
1760 2018-07-30 Tom Tromey <tom@tromey.com>
1762 * cli/cli-decode.c (lookup_cmd): Remove lint code.
1763 * value.c (unpack_long): Remove lint code.
1764 * valops.c (value_ind): Remove lint code.
1765 * valarith.c (value_x_binop, value_x_unop, value_equal)
1766 (value_pos): Remove lint code.
1768 2018-07-28 Tom de Vries <tdevries@suse.de>
1770 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1771 with undefined upper bound as <optimized out>.
1773 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
1775 * gcore.in: Rename variable "name" to "prefix". Expand
1778 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
1780 * windows-nat.c (windows_nat_target::create_inferior): Update to
1781 call close() in global namespace.
1783 2018-07-26 Tom Tromey <tom@tromey.com>
1785 * dwarf-index-write.c (add_address_entry): Don't add objfile
1787 * dbxread.c (find_stab_function): Rename from
1788 find_stab_function_addr. Return a bound_minimal_symbol.
1789 (read_dbx_symtab): Use raw_text_low, raw_text_high.
1790 Don't add objfile offsets.
1791 (end_psymtab): Use raw_text_low, raw_text_high,
1792 MSYMBOL_VALUE_RAW_ADDRESS.
1793 (read_ofile_symtab): Update.
1794 (process_one_symbol): Update.
1795 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1797 (dw2_relocate): Remove.
1798 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1800 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1802 (process_psymtab_comp_unit_reader, add_partial_symbol)
1803 (add_partial_subprogram, dwarf2_ranges_read): Update.
1804 (load_partial_dies): Update.
1805 (add_address_entry): Don't add objfile offsets.
1806 (dwarf2_build_include_psymtabs): Update.
1807 (create_addrmap_from_aranges): Don't add objfile offsets.
1808 (dw2_find_pc_sect_compunit_symtab): Update.
1809 * mdebugread.c (parse_symbol): Don't add objfile offsets.
1810 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1812 (parse_partial_symbols): Don't add objfile offsets. Use
1813 raw_text_low, raw_text_high. Update.
1814 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1815 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1816 or call 'relocate' quick function. Clear psymbol_map.
1817 * psympriv.h (struct partial_symbol) <address>: Add section
1819 <set_unrelocated_address>: Rename from set_address.
1820 <raw_text_low, raw_text_high>: New methods.
1821 <text_low, text_high>: Add objfile parameter.
1822 (add_psymbol_to_bcache): Add 'section' parameter. Call
1823 set_unrelocated_address.
1824 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1825 (find_pc_psymbol): Update.
1826 (fixup_psymbol_section, relocate_psymtabs): Remove.
1827 (dump_psymtab, psym_functions): Update.
1828 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1830 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1831 (start_psymtab_common): Update.
1832 * symfile-debug.c (debug_qf_relocate): Remove.
1833 (debug_sym_quick_functions): Update.
1834 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1835 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1838 2018-07-26 Tom Tromey <tromey@redhat.com>
1840 * dbxread.c (end_psymtab): Use text_high_valid and
1842 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1843 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1844 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1846 <text_low_valid, text_high_valid>: New fields.
1847 <set_text_low, set_text_high>: Update.
1848 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1850 2018-07-26 Tom Tromey <tom@tromey.com>
1852 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1854 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1855 textlow and texthigh fields.
1856 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1858 * mdebugread.c (parse_lines, parse_partial_symbols)
1859 (psymtab_to_symtab_1): Update.
1860 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1861 Rename fields. Update comment. Now private.
1862 <text_low, text_high, set_text_low, set_text_high>: New methods.
1863 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1864 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1865 (start_psymtab_common, maintenance_info_psymtabs)
1866 (maintenance_check_psymtabs): Update.
1867 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1869 (scan_xcoff_symtab): Update.
1871 2018-07-26 Tom Tromey <tromey@redhat.com>
1873 * psympriv.h (struct partial_symbol) <unrelocated_address,
1874 address, set_address>: New methods.
1875 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1876 (fixup_psymbol_section, relocate_psymtabs): Update.
1877 (print_partial_symbols): Add 'objfile' parameter. Update.
1878 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1881 2018-07-26 Tom Tromey <tom@tromey.com>
1883 * dwarf-index-write.c (write_psymbols, debug_names::insert)
1884 (debug_names::write_psymbols): Update.
1885 * psympriv.h (struct partial_symbol): Derive from
1886 general_symbol_info.
1887 <obj_section>: New method.
1888 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1889 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1890 (find_pc_sect_psymbol, fixup_psymbol_section)
1891 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1892 (print_partial_symbols, recursively_search_psymtabs)
1893 (compare_psymbols, psymbol_hash, psymbol_compare)
1894 (add_psymbol_to_bcache, maintenance_check_psymtabs)
1895 (psymbol_name_matches, psym_fill_psymbol_map): Update.
1897 2018-07-26 Tom Tromey <tromey@redhat.com>
1899 * dbxread.c (end_psymtab): Remove dead code.
1901 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
1903 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1904 DWARF unwinders are disabled.
1905 * dwarf2-frame.c: Add dwarf2read.h include.
1906 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1908 (dwarf2_frame_unwinders_enabled_p): Define.
1909 (show_dwarf_unwinders_enabled_p): New function.
1910 (_initialize_dwarf2_frame): Register switch to control DWARF
1912 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1913 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1914 (show_dwarf_cmdlist): Remove static keyword.
1915 * dwarf2read.h (set_dwarf_cmdlist): Declare.
1916 (show_dwarf_cmdlist): Declare.
1917 * NEWS: Document new feature.
1919 2018-07-26 Tom de Vries <tdevries@suse.de>
1921 PR breakpoints/23366
1922 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1924 2018-07-26 Tom de Vries <tdevries@suse.de>
1926 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1927 DW_AT_count can't be translated to a dynamic prop.
1929 2018-07-25 Tom de Vries <tdevries@suse.de>
1931 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1934 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
1936 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1938 2018-07-25 Joel Brobecker <brobecker@adacore.com>
1940 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1942 2018-07-24 Keith Seitz <keiths@redhat.comt
1945 * dwarf2read.c (dw2_add_symbol_to_list): New function.
1946 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1947 instead of add_symbol_to_list.
1948 (read_file_scope): Call prepare_one_comp_unit before reading
1951 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
1953 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1955 2018-07-24 Tom Tromey <tom@tromey.com>
1957 * utils.c (malloc, realloc, free): Don't declare.
1958 * configure, config.in: Rebuild.
1959 * configure.ac: Don't check for declarations of free, malloc, or
1962 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1964 * aarch64-linux-nat.c
1965 (aarch64_linux_nat_target::stopped_data_address): Remove unused
1967 * arm-linux-nat.c (fetch_regs): Likewise.
1968 (store_regs): Likewise.
1969 (fetch_vfp_regs): Likewise.
1970 (store_vfp_regs): Likewise.
1971 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1972 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1973 (arm_linux_nat_target::insert_watchpoint): Likewise.
1974 (arm_linux_nat_target::remove_watchpoint): Likewise.
1975 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1977 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1979 * ppc-linux-nat.c (fetch_register): Likewise.
1980 (fetch_all_gp_regs): Likewise.
1981 (fetch_ppc_registers): Likewise.
1982 (store_all_gp_regs): Likewise.
1983 (store_ppc_registers): Likewise.
1984 (hwdebug_insert_point): Likewise.
1985 (can_use_watchpoint_cond_accel): Likewise.
1986 * remote-sim.c (gdb_os_write_stdout): Likewise.
1988 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1989 Tom Tromey <tom@tromey.com>
1991 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1993 * configure: Rebuild.
1995 2018-07-22 Tom Tromey <tom@tromey.com>
1997 * regformats/regdat.sh: Define xmltarget_${name} inside
1998 #ifndef IN_PROCESS_AGENT.
2000 2018-07-22 Tom Tromey <tom@tromey.com>
2002 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2004 2018-07-22 Tom Tromey <tom@tromey.com>
2006 * symfile.c (reread_symbols): Notify iter, not objfile.
2008 2018-07-22 Tom Tromey <tom@tromey.com>
2010 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2012 (ravenscar_thread_target::prepare_to_store): Likewise.
2014 2018-07-22 Tom Tromey <tom@tromey.com>
2016 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2017 unused variable. Call value_fetch_lazy when needed.
2018 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2019 Remove unused variable. Call value_fetch_lazy when needed.
2021 2018-07-22 Tom Tromey <tom@tromey.com>
2023 * m32c-tdep.c (mark_dma): Return void.
2024 (make_regs): Remove unused declarations.
2026 2018-07-22 Tom Tromey <tom@tromey.com>
2028 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2029 cmdscm_get_valid_command_smob_arg_unsafe for effect.
2030 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2031 bkscm_get_valid_block_smob_arg_unsafe for effect.
2033 2018-07-22 Tom Tromey <tom@tromey.com>
2035 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2038 2018-07-22 Tom Tromey <tom@tromey.com>
2040 * windows-nat.c (saved_context): Conditionally define.
2041 * remote.c (remote_target::remote_btrace_maybe_reopen):
2042 Conditionally declare "warned".
2043 * inflow.c (sigquit_ours): Conditionally define.
2044 (new_tty): Move "tty" declaration inside #if.
2045 * guile/guile.c (guile_datadir): Conditionally define.
2046 * charset.c (set_be_le_names): Move some declarations inside #if.
2047 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2049 (parse_xml_btrace_conf): Likewise.
2051 2018-07-22 Tom Tromey <tom@tromey.com>
2053 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2055 2018-07-22 Tom Tromey <tom@tromey.com>
2057 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2058 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2059 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2060 * buildsym-legacy.c (get_macro_table): Remove unused variable.
2061 * stack.c (frame_apply_level_command): Remove unused variable.
2062 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2063 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2064 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2066 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2067 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2068 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2070 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2071 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2073 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2074 Remove unused variable.
2075 * cli/cli-script.c (recurse_read_control_structure): Remove unused
2077 * common/tdesc.c (print_xml_feature::visit): Remove unused
2079 * compile/compile-object-load.c (store_regs): Remove unused
2081 * complaints.c (clear_complaints): Remove unused variable.
2082 * corelow.c (core_target_open): Remove unused variable.
2083 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2085 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2087 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2089 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2091 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2093 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2095 * ia64-tdep.c (examine_prologue): Remove unused variable.
2096 * infcall.c (run_inferior_call): Remove unused variable.
2097 * inferior.c (exit_inferior): Remove unused variable.
2098 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2099 * linespec.c (decode_line_2): Remove unused variable.
2100 * linux-nat.c (super_close): Remove.
2101 * linux-tdep.c (linux_info_proc): Remove unused variable.
2102 * mi/mi-main.c (mi_execute_command): Remove unused variable.
2103 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2104 Remove unused variable.
2105 * parse.c (find_minsym_type_and_address): Remove unused variable.
2106 * printcmd.c (info_symbol_command, printf_floating): Remove unused
2108 * python/py-breakpoint.c (bppy_set_commands): Remove unused
2110 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2112 * record-btrace.c (record_btrace_target::store_registers): Remove
2114 (cmd_show_record_btrace_cpu): Remove unused variable.
2115 * riscv-tdep.c (riscv_register_reggroup_p)
2116 (riscv_push_dummy_call, riscv_return_value): Remove unused
2118 * rust-exp.y (literal): Remove unused variable.
2119 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2121 <STRUCTOP_ANONYMOUS>: Likewise.
2122 * s390-linux-tdep.c (s390_linux_init_abi_31)
2123 (s390_linux_init_abi_64): Remove unused variable.
2124 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2125 (file_select_thread, net_windows_open, _initialize_ser_windows):
2126 Remove unused variables.
2127 * symtab.c (find_pc_sect_line): Remove unused variable.
2128 * target-memory.c (compute_garbled_blocks): Remove unused
2130 (target_write_memory_blocks): Remove unused variable.
2131 * target.c (target_stack::unpush): Remove unused variables.
2132 * tracepoint.c (start_tracing, all_tracepoint_actions)
2133 (merge_uploaded_trace_state_variables)
2134 (print_one_static_tracepoint_marker): Remove unused variable.
2135 * unittests/basic_string_view/element_access/char/1.cc (test01):
2136 Remove unused variable.
2137 * windows-nat.c (windows_continue, windows_add_all_dlls)
2138 (do_initial_windows_stuff, windows_nat_target::create_inferior):
2139 Remove unused variables.
2141 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
2143 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2144 attr_profile in HAVE_ELF.
2145 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2148 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
2150 * frame.c (frame_register_unwind): Change parameter name.
2151 (frame_unwind_register): Likewise.
2152 (frame_unwind_register_value): Likewise.
2153 (frame_unwind_register_signed): Likewise.
2154 (frame_unwind_register_unsigned): Likewise.
2155 * frame.h (frame_register_unwind): Likewise.
2156 (frame_unwind_register): Likewise.
2157 (frame_unwind_register_value): Likewise.
2158 (frame_unwind_register_signed): Likewise.
2159 (frame_unwind_register_unsigned): Likewise.
2160 (frame_unwind_arch): Likewise.
2162 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2164 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2167 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2169 * mips-linux-nat.c (mips_linux_nat_target::read_description):
2170 Call `get_ptrace_pid' rather than extracting the ptrace PID by
2173 2018-07-20 Keith Seitz <keiths@redhat.com>
2175 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2176 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2177 m_compunit_symtab, m_language>: Add "m_" prefix.
2179 * buildsym.c: Update all uses.
2181 2018-07-20 Tom Tromey <tom@tromey.com>
2183 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2184 * buildsym.h (record_line_ftype): Remove typedef.
2186 2018-07-20 Tom Tromey <tom@tromey.com>
2188 * buildsym-legacy.h (augment_type_symtab): Don't declare.
2189 (end_expandable_symtab): Likewise.
2190 (end_symtab_get_static_block): Likewise.
2191 (end_symtab_from_static_block): Likewise.
2192 * buildsym-legacy.c (augment_type_symtab): Remove.
2193 (end_expandable_symtab): Remove.
2194 (end_symtab_get_static_block): Remove.
2195 (end_symtab_from_static_block): Remove.
2197 2018-07-20 Tom Tromey <tom@tromey.com>
2199 * dwarf2read.c: Include buildsym.h.
2200 (struct dwarf2_cu) <builder>: New method.
2201 (fixup_go_packaging): Update.
2202 (process_full_comp_unit, process_full_type_unit): Update. Don't
2203 use scoped_free_pendings.
2204 (using_directives): Add "cu" parameter, remove "language".
2205 (read_import_statement, setup_type_unit_groups, )
2206 (read_func_scope, read_lexical_block_scope)
2207 (dwarf2_record_block_ranges, read_namespace): Update.
2208 (lnp_state_machine::lnp_state_machine): Add cu parameter.
2209 (lnp_state_machine::handle_end_sequence): Update.
2210 (class lnp_state_machine) <m_cu>: New member.
2211 <m_record_line_callback>: Remove.
2212 <m_currently_recording_lines>: New member.
2213 (lnp_state_machine::handle_set_file): Update.
2214 (noop_record_line): Remove.
2215 (dwarf_record_line_p): Add cu parameter.
2216 (dwarf_record_line_1, dwarf_finish_line): Likewise.
2217 (lnp_state_machine::record_line)
2218 (lnp_state_machine::lnp_state_machine)
2219 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2220 (dwarf_decode_lines): Update.
2221 (dwarf2_start_subfile): Add cu parameter.
2222 (dwarf2_start_symtab, new_symbol): Update.
2223 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2224 Remove dwarf2_per_objfile parameter.
2225 (dwarf_decode_macros): Update.
2227 2018-07-20 Tom Tromey <tom@tromey.com>
2229 * stabsread.c (define_symbol): Update.
2230 * buildsym-legacy.h (get_buildsym_compunit): Declare.
2231 * dwarf2read.c (new_symbol): Update.
2232 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2233 * cp-namespace.c: Include buildsym.h.
2234 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2235 * buildsym-legacy.c (get_buildsym_compunit): New function.
2237 2018-07-20 Tom Tromey <tom@tromey.com>
2239 * xcoffread.c: Include buildsym-legacy.h.
2240 * windows-nat.c: Include buildsym-legacy.h.
2241 * stabsread.c: Include buildsym-legacy.h.
2242 * mdebugread.c: Include buildsym-legacy.h.
2243 * buildsym-legacy.h: New file.
2244 * buildsym-legacy.c: New file, from buildsym.c.
2245 * go32-nat.c: Include buildsym-legacy.h.
2246 * dwarf2read.c: Include buildsym-legacy.h.
2247 * dbxread.c: Include buildsym-legacy.h.
2248 * cp-namespace.c: Include buildsym-legacy.h.
2249 * coffread.c: Include buildsym-legacy.h.
2250 * buildsym.h: Move some contents to buildsym-legacy.h.
2251 * buildsym.c: Include buildsym-legacy.h. Move many functions to
2253 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2255 2018-07-20 Tom Tromey <tom@tromey.com>
2257 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2258 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2259 (buildsym_compunit::buildsym_compunit)
2260 (buildsym_compunit::~buildsym_compunit)
2261 (buildsym_compunit::get_macro_table): Define.
2263 2018-07-20 Tom Tromey <tom@tromey.com>
2265 * buildsym.c (reset_symtab_globals): Remove.
2266 (buildsym_compunit::end_symtab_from_static_block): Update.
2267 (buildsym_compunit::augment_type_symtab): Update.
2268 (end_symtab_from_static_block): Call free_buildsym_compunit.
2269 (augment_type_symtab, end_symtab, end_expandable_symtab):
2272 2018-07-20 Tom Tromey <tom@tromey.com>
2274 * arch-utils.c: Do not include buildsym.h.
2275 * mipsread.c: Do not include buildsym.h.
2276 * machoread.c: Do not include buildsym.h.
2277 * elfread.c: Do not include buildsym.h.
2279 2018-07-20 Tom Tromey <tom@tromey.com>
2281 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2283 (buildsym_compunit): Add new constructor.
2284 (struct buildsym_compunit) <get_last_source_file, finish_block,
2285 record_block_range, start_subfile, patch_subfile_names,
2286 push_subfile, pop_subfile, record_line, get_compunit_symtab,
2287 set_last_source_start_addr, get_last_source_start_addr,
2288 get_local_using_directives, set_local_using_directives,
2289 get_global_using_directives, outermost_context_p,
2290 get_current_context_stack, get_context_stack_depth,
2291 get_current_subfile, get_local_symbols, get_file_symbols,
2292 get_global_symbols, record_debugformat, record_producer,
2293 push_context, pop_context, end_symtab_get_static_block,
2294 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2296 <record_pending_block, finish_block_internal, make_blockvector,
2297 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2301 2018-05-22 Tom Tromey <tom@tromey.com>
2303 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2305 (finish_block_internal): Update.
2307 2018-07-20 Tom Tromey <tom@tromey.com>
2309 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2311 (finish_block_internal): Update.
2313 2018-07-20 Tom Tromey <tom@tromey.com>
2315 * buildsym.h (EXTERN): Don't define or undef.
2316 * buildsym.c (EXTERN): Don't define.
2318 2018-07-20 Tom Tromey <tom@tromey.com>
2320 * buildsym.c: Remove TODO comment.
2322 2018-07-20 Tom Tromey <tom@tromey.com>
2324 * coffread.c (coff_symtab_read): Update.
2325 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2326 (xcoff_new_init): Update.
2327 * mipsread.c (mipscoff_new_init): Update.
2328 * mdebugread.c (mdebug_build_psymtabs): Update.
2329 * elfread.c (elf_new_init): Update.
2330 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2332 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2333 (coffstab_build_psymtabs, elfstab_build_psymtabs)
2334 (stabsect_build_psymtabs): Update.
2335 * buildsym.h (buildsym_init): Don't declare.
2336 * buildsym.c: Update comment.
2337 (prepare_for_building): Remove.
2338 (start_symtab, restart_symtab): Update.
2339 (reset_symtab_globals): Update comment.
2340 (buildsym_init): Remove.
2342 2018-07-20 Tom Tromey <tom@tromey.com>
2344 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2345 * stabsread.c (patch_block_stabs, define_symbol, read_type)
2346 (read_enum_type, common_block_start, common_block_end)
2347 (cleanup_undefined_types_1, finish_global_stabs): Update.
2348 * mdebugread.c (psymtab_to_symtab_1): Update.
2349 * dwarf2read.c (fixup_go_packaging, read_func_scope)
2350 (read_lexical_block_scope, new_symbol): Update.
2351 * dbxread.c (process_one_symbol): Update.
2352 * coffread.c (coff_symtab_read, process_coff_symbol)
2353 (coff_read_enum_type): Update.
2354 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2356 (get_local_symbols, get_file_symbols, get_global_symbols): New
2358 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2360 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2361 (~scoped_free_pendings): Update.
2362 (finish_block, prepare_for_building, reset_symtab_globals)
2363 (end_symtab_get_static_block, end_symtab_with_blockvector)
2364 (augment_type_symtab, push_context): Update.
2365 (get_local_symbols, get_file_symbols, get_global_symbols): New
2367 (buildsym_init): Update.
2369 2018-07-20 Tom Tromey <tom@tromey.com>
2371 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2372 (process_full_type_unit): Likewise.
2373 (dwarf2_start_symtab): Set list_in_scope.
2375 2018-07-20 Tom Tromey <tom@tromey.com>
2377 * dwarf2read.c (process_psymtab_comp_unit_reader)
2378 (build_type_psymtabs_reader): Do not set list_in_scope.
2380 2018-07-20 Tom Tromey <tom@tromey.com>
2382 * buildsym.c (free_pendings): Remove.
2383 (add_symbol_to_list, scoped_free_pendings)
2384 (finish_block_internal, buildsym_init): Update.
2386 2018-07-20 Tom Tromey <tom@tromey.com>
2388 * xcoffread.c (read_xcoff_symtab): Update.
2389 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2391 * dbxread.c (process_one_symbol): Update.
2392 * coffread.c (coff_symtab_read): Update.
2393 * buildsym.h (finish_block): Update.
2394 * buildsym.c (finish_block): Remove "listhead" argument.
2395 (end_symtab_get_static_block): Update.
2397 2018-07-20 Tom Tromey <tom@tromey.com>
2399 * buildsym.h (class scoped_free_pendings): Remove constructor.
2400 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2402 <m_pending_block_obstack, m_pending_blocks>: New members.
2403 (pending_block_obstack, pending_blocks): Remove.
2404 (scoped_free_pendings::scoped_free_pendings): Default.
2405 (~scoped_free_pendings): Update.
2406 (free_pending_blocks): Remove.
2407 (finish_block_internal, record_pending_block, make_blockvector)
2408 (end_symtab_get_static_block, augment_type_symtab, push_context)
2409 (buildsym_init): Update.
2411 2018-07-20 Tom Tromey <tom@tromey.com>
2413 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2414 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2416 (pending_addrmap, pending_addrmap_obstack)
2417 (pending_addrmap_interesting): Remove.
2418 (scoped_free_pendings, record_block_range, make_blockvector)
2419 (prepare_for_building, reset_symtab_globals, buildsym_init):
2422 2018-07-20 Tom Tromey <tom@tromey.com>
2424 * xcoffread.c (process_linenos): Update.
2425 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2426 * mdebugread.c (psymtab_to_symtab_1): Update.
2427 * dwarf2read.c (setup_type_unit_groups)
2428 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2429 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2430 * dbxread.c (process_one_symbol): Update.
2431 * coffread.c (coff_symtab_read, enter_linenos)
2432 (process_coff_symbol): Update.
2433 * buildsym.h (current_subfile): Don't declare.
2434 (get_current_subfile): Declare.
2435 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2437 (start_subfile, free_buildsym_compunit, push_subfile)
2438 (prepare_for_building, start_symtab): Update.
2439 (get_current_subfile): New function.
2441 2018-07-20 Tom Tromey <tom@tromey.com>
2443 * coffread.c (coff_symtab_read): Update.
2444 * xcoffread.c (read_xcoff_symtab): Update.
2445 * dwarf2read.c (new_symbol): Update.
2446 (read_func_scope, read_lexical_block_scope): Update.
2447 * dbxread.c (process_one_symbol): Update.
2448 * buildsym.h (context_stack, context_stack_depth): Don't declare.
2449 (outermost_context_p): Remove macro.
2450 (outermost_context_p, get_current_context_stack)
2451 (get_context_stack_depth): Declare.
2452 (pop_context): Return struct context_stack.
2453 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2455 (context_stack_size): Remove.
2456 (INITIAL_CONTEXT_STACK_SIZE): Remove.
2457 (prepare_for_building, end_symtab_get_static_block)
2458 (augment_type_symtab, push_context): Update.
2459 (pop_context): Return struct context_stack.
2460 (outermost_context_p, get_current_context_stack)
2461 (get_context_stack_depth): New functions.
2462 (buildsym_init): Update.
2464 2018-07-20 Tom Tromey <tom@tromey.com>
2466 * rust-exp.y: Now a pure parser. Update all rules.
2467 (%union): Move earlier.
2468 (current_parser, work_obstack): Remove globals.
2469 (rust_parser, ~rust_parser): Update.
2470 (class rust_parser) <copy_name, concat3, crate_name, super_name,
2471 lex_character, lex_number, lex_string, lex_identifier,
2472 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2473 convert_name, convert_params_to_expression,
2474 convert_ast_to_expression, ast_basic_type, ast_operation,
2475 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2476 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2477 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2478 ast_array_type, ast_slice_type, ast_reference_type,
2479 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2480 (rust_parse): Update.
2481 (rustyyerror, rustyylex): Add parser parameter.
2482 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2483 (rust_lex_stringish_test, rust_lex_test_sequence)
2484 (rust_lex_test_trailing_dot, rust_lex_test_completion)
2485 (rust_lex_test_push_back, rust_lex_tests): Update.
2487 2018-07-19 Pedro Alves <palves@redhat.com>
2489 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2490 gdb::unique_xmalloc_ptr.
2491 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2492 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2493 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2494 copy-initialization.
2495 * guile/scm-pretty-print.c (ppscm_print_children): Use
2496 gdb::unique_xmalloc_ptr instead of cleanups.
2497 (gdbscm_apply_val_pretty_printer): Remove cleanups.
2498 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2499 gdb::unique_xmalloc_ptr.
2500 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2501 Adjust to use gdb::unique_xmalloc_ptr.
2502 * guile/scm-utils.c (extract_arg): Adjust.
2503 * guile/scm-value.c (gdbscm_value_field): Adjust to use
2504 gdb::unique_xmalloc_ptr instead of a cleanup.
2506 2018-07-19 Tom Tromey <tom@tromey.com>
2508 * utils.c (do_value_free_to_mark)
2509 (make_cleanup_value_free_to_mark): Remove.
2510 * utils.h (make_cleanup_value_free_to_mark): Remove.
2512 2018-07-19 Pedro Alves <palves@redhat.com>
2514 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2515 forwarding reference.
2517 2018-07-18 Pedro Alves <palves@redhat.com>
2519 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2520 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
2523 2018-07-18 Pedro Alves <palves@redhat.com>
2525 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2527 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2529 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2530 directly instead of a cleanup.
2531 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2532 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
2533 (vlscm_binop_gdbthrow): New, factored out from ...
2534 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
2535 (vlscm_rich_compare): Use gdbscm_wrap.
2536 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2537 instead of a cleanup.
2538 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2540 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2541 Use xfree directly instead of a cleanup.
2542 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2543 Adjust to use gdbscm_wrap and scoped_value_mark.
2544 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2545 (gdbscm_value_address, gdbscm_value_dereference)
2546 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2548 (gdbscm_value_dynamic_type): Use scoped_value_mark.
2549 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2551 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2552 gdbscm_wrap and scoped_value_mark.
2553 (gdbscm_value_to_string): Use xfree directly instead of a
2554 cleanup. Move 'buffer' unique_ptr to TRY scope.
2555 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2556 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
2558 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2559 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2561 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2564 2018-07-18 Tom de Vries <tdevries@suse.de>
2566 * findvar.c (default_read_var_value): Also resolve dynamic type for
2567 LOC_OPTIMIZED_OUT vars.
2569 2018-07-18 Maciej W. Rozycki <macro@mips.com>
2571 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2574 2018-07-17 Tom Tromey <tom@tromey.com>
2576 * guile/scm-param.c (pascm_set_func, pascm_show_func)
2577 (compute_enum_list, pascm_set_param_value_x)
2578 (gdbscm_parameter_value): Update.
2579 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2580 (gdbscm_scm_to_host_string): Update.
2581 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2583 * guile/scm-cmd.c (cmdscm_add_completion): Update.
2584 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2585 * guile/scm-string.c (gdbscm_scm_to_string): Return
2587 (gdbscm_scm_to_host_string): Likewise.
2589 2018-07-17 Tom Tromey <tom@tromey.com>
2591 * guile/guile.c (gdbscm_eval_from_control_command): Update.
2592 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2593 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2594 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2597 2018-07-17 Tom Tromey <tom@tromey.com>
2599 * guile/scm-param.c (pascm_signal_setshow_error): Update.
2600 * guile/guile-internal.h (gdbscm_exception_message_to_string):
2602 * guile/scm-cmd.c (cmdscm_function): Update.
2603 * guile/scm-pretty-print.c
2604 (ppscm_print_exception_unless_memory_error): Update.
2605 * guile/scm-exception.c (gdbscm_exception_message_to_string):
2606 Return unique_xmalloc_ptr.
2608 2018-07-17 Tom Tromey <tom@tromey.com>
2610 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2613 2018-07-17 Jim Wilson <jimw@sifive.com>
2615 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2616 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
2617 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
2618 unecessary braces after EF_RISCV_RVC test. Delete call to
2619 set_gdbarch_decr_pc_after_break.
2621 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2622 RISCV_LAST_FP_REGNUM + 1.
2623 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2625 2018-07-17 Tom Tromey <tom@tromey.com>
2627 * configure.ac: Remove --disable-gdbcli.
2628 * configure: Rebuild.
2629 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2630 (SUBDIR_CLI_CFLAGS): Remove.
2631 (SFILES): Use SUBDIR_CLI_SRCS.
2632 (COMMON_OBS): Use SUBDIR_CLI_OBS.
2634 2018-07-17 Tom Tromey <tom@tromey.com>
2637 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2639 2018-07-16 Jim Wilson <jimw@sifive.com>
2641 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2643 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2645 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2647 (libunwind_frame_sniffer): Likewise.
2648 (libunwind_frame_prev_register): Likewise.
2649 (libunwind_sigtramp_frame_sniffer): Likewise.
2650 * ia64-tdep.c (ia64_access_reg): Likewise.
2651 (ia64_access_rse_reg): Likewise.
2652 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2653 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2655 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2657 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2659 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2661 * remote-sim.c (gdbsim_target::close,
2662 gdbsim_target::mourn_inferior): Remove unused variables.
2664 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
2666 * ia64-tdep.c (ktab_buf): New global.
2667 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2668 (get_kernel_table): Adjust.
2670 2018-07-16 Tom Tromey <tom@tromey.com>
2672 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2673 * dwarf2read.c (using_directives, new_symbol): Use
2674 outermost_context_p.
2675 * dbxread.c (process_one_symbol): Use outermost_context_p.
2676 * coffread.c (coff_symtab_read): Use outermost_context_p.
2678 2018-07-16 Tom Tromey <tom@tromey.com>
2680 * dwarf2read.c (using_directives, read_func_scope)
2681 (read_lexical_block_scope): Update.
2682 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2683 * buildsym.h (local_using_directives, global_using_directives):
2685 (get_local_using_directives, set_local_using_directives)
2686 (get_global_using_directives): Declare.
2687 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2688 m_global_using_directives>: New members.
2689 (finish_block_internal, prepare_for_building)
2690 (reset_symtab_globals, end_symtab_get_static_block)
2691 (push_context): Update.
2692 (get_local_using_directives, set_local_using_directives)
2693 (get_global_using_directives): New functions.
2694 (buildsym_init): Update.
2696 2018-07-16 Tom Tromey <tom@tromey.com>
2698 * xcoffread.c (xcoff_initial_scan): Don't call
2699 free_pending_blocks.
2700 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2701 * buildsym.h (class scoped_free_pendings): Add constructor.
2702 (free_pending_blocks): Don't declare.
2703 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2704 (free_pending_blocks): Now static.
2706 2018-07-16 Tom Tromey <tom@tromey.com>
2708 * buildsym.h (push_subfile, pop_subfile): Update declarations.
2709 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2711 (struct subfile_stack): Remove.
2712 (subfile_stack): Remove.
2713 (push_subfile, pop_subfile, buildsym_init): Update.
2715 2018-07-16 Tom Tromey <tom@tromey.com>
2717 * buildsym.c (push_subfile): Use gdb_assert.
2718 (pop_subfile): Use gdb_assert.
2720 2018-07-16 Tom Tromey <tom@tromey.com>
2722 * buildsym.h (merge_symbol_lists): Remove.
2723 * buildsym.c (merge_symbol_lists): Remove.
2725 2018-07-16 Tom Tromey <tom@tromey.com>
2727 * stabsread.c (scan_file_globals): Update comment.
2728 * stabsread.h (scan_file_globals): Move from buildsym.h.
2729 * buildsym.h (scan_file_globals): Move to stabsread.h.
2731 2018-07-16 Tom Tromey <tom@tromey.com>
2733 * xcoffread.c (xcoff_new_init): Update.
2734 * mipsread.c (mipscoff_new_init): Update.
2735 * mdebugread.c (mdebug_build_psymtabs): Update.
2736 * elfread.c (elf_new_init): Update.
2737 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2738 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2739 * buildsym.h (buildsym_new_init): Don't declare.
2740 * buildsym.c (buildsym_new_init): Remove.
2742 2018-07-16 Tom Tromey <tom@tromey.com>
2744 * stabsread.h (within_function): Move from buildsym.h.
2745 * stabsread.c (start_stabs): Clear within_function.
2746 * coffread.c (coff_start_symtab): Clear within_function.
2747 * buildsym.h (within_function): Move to stabsread.h.
2748 * buildsym.c (prepare_for_building): Update.
2750 2018-07-16 Tom Tromey <tom@tromey.com>
2752 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2753 * dwarf2read.c (dwarf2_start_symtab): Don't set
2754 processing_gcc_compilation.
2755 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2757 2018-07-16 Tom Tromey <tom@tromey.com>
2759 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2760 (next_symbol_text_func): Move from buildsym.h.
2761 * stabsread.c (hashname): Move from buildsym.c.
2762 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2763 (next_symbol_text_func, hashname): Move to stabsread.h.
2764 * buildsym.c: Don't include bcache.h
2765 (hashname): Move to stasbread.c.
2767 2018-07-16 Tom Tromey <tom@tromey.com>
2769 * buildsym.h (context_stack_size): Don't declare.
2770 * buildsym.c (context_stack_size): New global.
2772 2018-07-16 Tom Tromey <tom@tromey.com>
2774 * dbxread.c (processing_acc_compilation): New global.
2775 * buildsym.h (processing_acc_compilation): Don't declare.
2777 2018-07-16 Tom Tromey <tom@tromey.com>
2779 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2780 * dbxread.c (read_ofile_symtab): Update.
2781 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2782 * buildsym.h (last_source_start_addr): Remove.
2783 (set_last_source_start_addr, get_last_source_start_addr):
2785 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2787 (struct buildsym_compunit) <m_last_source_start_addr>: New
2789 (prepare_for_building): Remove start_addr parameter.
2790 (start_symtab, restart_symtab, end_symtab_get_static_block)
2791 (end_symtab_with_blockvector): Update.
2792 (set_last_source_start_addr, get_last_source_start_addr): New
2795 2018-07-16 Tom Tromey <tom@tromey.com>
2797 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2799 (have_line_numbers): Remove.
2800 (record_line, prepare_for_building, end_symtab_get_static_block)
2801 (augment_type_symtab): Update.
2803 2018-07-16 Tom Tromey <tom@tromey.com>
2805 * buildsym.c (~buildsym_compunit): Free the macro table.
2806 (struct buildsym_compunit) <get_macro_table, release_macros>: New
2808 <m_pending_macros>: New member.
2809 (pending_macros): Remove.
2810 (~scoped_free_pendings, get_macro_table, prepare_for_building)
2811 (reset_symtab_globals, end_symtab_get_static_block)
2812 (end_symtab_with_blockvector, augment_type_symtab)
2813 (buildsym_init): Update.
2815 2018-07-16 Tom Tromey <tom@tromey.com>
2817 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2819 (buildsym_compunit::set_last_source_file): New method.
2820 <m_last_source_file>: New member.
2821 (prepare_for_building): Remove "name" parameter.
2822 (start_symtab, restart_symtab, reset_symtab_globals): Update.
2823 (last_source_file): Remove.
2824 (set_last_source_file, get_last_source_file): Update.
2826 2018-07-16 Tom Tromey <tom@tromey.com>
2828 * buildsym.c (prepare_for_building): Add assert.
2830 2018-07-16 Tom Tromey <tom@tromey.com>
2832 * buildsym.c (~buildsym_compunit): Update.
2833 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2834 (start_subfile, patch_subfile_names)
2835 (end_symtab_with_blockvector): Update.
2837 2018-07-16 Tom Tromey <tom@tromey.com>
2839 * buildsym.c (struct buildsym_compunit): Add constructor,
2840 destructor, initializers.
2841 (start_buildsym_compunit): Remove.
2842 (free_buildsym_compunit): Use "delete".
2843 (start_symtab, restart_symtab): Use "new".
2845 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
2847 * symfile.c (set_objfile_default_section_offset): Remove struct
2850 2018-07-14 Stafford Horne <shorne@gmail.com>
2852 * (Responsible Maintainers): Add myself as or1k maintainer.
2854 2018-07-13 Tom Tromey <tom@tromey.com>
2856 * symfile.c (set_objfile_default_section_offset): Use extra braces
2859 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2861 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2864 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2866 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2867 unittests/cli-utils-selftests.c
2868 * unittests/cli-utils-selftests.c: New file.
2870 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2872 * NEWS: Mention new commands. Mention change to 'thread apply'.
2874 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2876 * thread.c (thr_try_catch_cmd): New function.
2877 (thread_apply_all_command): Handle qcs flags.
2878 (thread_apply_command): Handle qcs flags.
2879 (taas_command): New function.
2880 (tfaas_command): New function.
2881 (_initialize_thread): Update to setup the new commands 'taas
2882 and 'tfaas'. Change doc string for 'thread apply'.
2884 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2886 * stack.c: (trailing_outermost_frame): New function, mostly
2887 extracted from backtrace_command_1.
2888 (leading_innermost_frame): New function.
2889 (backtrace_command_1): Update to call trailing_outermost_frame.
2890 (frame_apply_command_count): New function.
2891 (frame_apply_level_command): New function.
2892 (frame_apply_all_command): New function.
2893 (frame_apply_command): New function.
2894 (faas_command): New function.
2895 (frame_cmd_list): New variable.
2896 (_initialize_stack): Update to setup the new commands 'frame apply'
2899 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2901 * cli-utils.c (number_or_range_parser::get_number): Only handle
2902 numbers or convenience var as numbers.
2903 (parse_flags): New function.
2904 (parse_flags_qcs): New function.
2905 (number_or_range_parser::finished): Ensure parsing end is detected
2906 before end of string.
2907 * cli-utils.h (parse_flags): New function.
2908 (parse_flags_qcs): New function.
2909 (number_or_range_parser): Remove m_finished bool.
2910 (number_or_range_parser::skip_range): Set m_in_range to false.
2912 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
2914 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2917 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2918 Jan Kratochvil <jan.kratochvil@redhat.com>
2919 Paul Fertser <fercerpav@gmail.com>
2920 Tsutomu Seki <sekiriki@gmail.com>
2921 Pedro Alves <palves@redhat.com>
2923 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2924 'unittests/parse-connection-spec-selftests.c'.
2925 (COMMON_SFILES): Add 'common/netstuff.c'.
2926 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2927 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2928 * common/netstuff.c: New file.
2929 * common/netstuff.h: New file.
2930 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2931 (wait_for_connect): Update comment. New parameter
2932 'gdb::optional<int> sock' instead of 'struct serial *scb'.
2933 Use 'sock' directly instead of 'scb->fd'.
2934 (try_connect): New function, with code from 'net_open'.
2935 (net_open): Rewrite main loop to deal with multiple
2936 sockets/addresses. Handle IPv6-style hostnames; implement
2937 support for IPv6 connections.
2938 * unittests/parse-connection-spec-selftests.c: New file.
2940 2018-07-11 Pedro Alves <palves@redhat.com>
2943 * remote.c (remote_target::remote_detach_pid): Call
2944 set_current_process.
2946 2018-07-11 Pedro Alves <palves@redhat.com>
2948 * h8300-tdep.c (h8300_gdbarch_init): Remove
2949 set_gdbarch_ecoff_reg_to_regnum calls.
2951 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2954 * c-typeprint.c (c_type_print_base_struct_union): Don't print
2955 offsets/sizes for static members of a class/struct.
2957 2018-07-11 Alan Hayward <alan.hayward@arm.com>
2959 * target-descriptions.c (tdesc_register_bitsize): Rename.
2960 * target-descriptions.h (tdesc_register_bitsize): Likewise.
2961 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2962 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2964 2018-07-10 Tom Tromey <tom@tromey.com>
2966 * breakpoint.c (moribund_locations): Now static and a
2968 (breakpoint_init_inferior, moribund_breakpoint_here_p)
2969 (build_bpstat_chain, update_global_location_list)
2970 (breakpoint_retire_moribund): Update.
2971 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
2974 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2976 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2977 (riscv_register_reggroup_p): Use new function, remove unneeded
2979 (riscv_push_dummy_call): Extend assert to compare against xlen or
2980 flen based on register type.
2982 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2984 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2986 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
2988 * remote.c (show_hardware_watchpoint_limit): New function.
2989 (show_hardware_watchpoint_length_limit): New function.
2990 (show_hardware_breakpoint_limit): New function.
2991 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2992 where appropriate, update help text.
2994 2018-07-09 Tom Tromey <tom@tromey.com>
2996 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2997 (CLIBS): Don't mention NAT_CLIBS.
2999 2018-07-09 Tom Tromey <tom@tromey.com>
3001 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3002 (LIBGDB_OBS, clean mostlyclean): Update.
3003 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3005 2018-07-09 Tom Tromey <tom@tromey.com>
3007 * Makefile.in (%.c: %.y): Use ECHO_YACC.
3008 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
3009 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3011 2018-07-09 Tom Tromey <tom@tromey.com>
3013 * Makefile.in (ALLDEPFILES): Remove exec.c.
3014 (COMMON_OBS): Remove exec.o.
3015 (COMMON_SFILES): Add exec.c.
3017 2018-07-09 Tom Tromey <tom@tromey.com>
3019 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3021 2018-07-09 Tom Tromey <tom@tromey.com>
3023 * Makefile.in (clean mostlyclean): Remove stamp-version.
3024 (version.c): Depend on stamp-version.
3025 (stamp-version): New rule, from version.c rule.
3027 2018-07-09 Tom Tromey <tom@tromey.com>
3029 * Makefile.in (init.c): Depend on stamp-init.
3030 (stamp-init): New rule, from init.c rule.
3031 (clean mostlyclean): Remove stamp-init.
3033 2018-07-09 Tom Tromey <tom@tromey.com>
3035 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3036 SUBDIR_GCC_COMPILE_SRCS.
3038 2018-07-09 Tom Tromey <tom@tromey.com>
3040 * Makefile.in (init.c): Remove some unused sed rules.
3042 2018-07-09 Tom Tromey <tom@tromey.com>
3044 * Makefile.in (TSOBS): Remove.
3045 (INIT_FILES): Update.
3046 (LIBGDB_OBS): Update.
3047 (COMMON_SFILES): Add inflow.c.
3048 (SFILES): Remove inflow.c.
3050 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3052 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3054 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
3056 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3057 get_saveloc_name, is_signal_frame_name, step_name,
3058 init_remote_name, create_addr_space_name,
3059 destroy_addr_space_name, search_unwind_table_name,
3060 find_dyn_list_name): Constify.
3062 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
3064 * darwin-nat.c (darwin_pthread_kill): New function.
3065 (darwin_resume_thread): Use darwin_pthread_kill.
3067 2018-07-05 Tom de Vries <tdevries@suse.de>
3069 * macroexp.c (macro_buffer) <operator=>: New member function.
3071 2018-07-04 Tom Tromey <tom@tromey.com>
3073 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3075 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
3077 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3078 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3079 * maint.c: Likewise.
3082 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3084 * NEWS: Create a new section for the next release branch.
3085 Rename the section of the current branch, now that it has
3088 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3090 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3091 * version.in: Bump version to 8.2.50.DATE-git.
3093 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
3094 Pedro Alves <palves@redhat.com>
3096 * linux-nat.c (linux_init_ptrace): Rename to ...
3097 (linux_init_ptrace_procfs): ... this. Call
3098 linux_proc_init_warnings.
3099 (linux_nat_target::post_attach)
3100 (linux_nat_target::post_startup_inferior): Adjust.
3101 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3102 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3104 2018-07-04 Tom de Vries <tdevries@suse.de>
3106 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3108 (read_comp_unit_head): ... here.
3110 2018-07-03 Tom Tromey <tom@tromey.com>
3112 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3113 (stop_tracing, tstatus_command)
3114 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3115 (print_one_static_tracepoint_marker): Update.
3116 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3118 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
3120 (all_tracepoints, static_tracepoints_here): Return std::vector.
3122 2018-07-03 Tom Tromey <tom@tromey.com>
3124 * common/ptid.c (ptid_equal): Remove.
3125 * common/ptid.h (ptid_equal): Don't declare.
3126 * ada-tasks.c: Update.
3127 * breakpoint.c: Update.
3128 * common/agent.c: Update.
3129 * corelow.c: Update.
3130 * darwin-nat-info.c: Update.
3131 * darwin-nat.c: Update.
3133 * dtrace-probe.c: Update.
3134 * dummy-frame.c: Update.
3135 * fbsd-nat.c: Update.
3137 * gdbthread.h: Update.
3138 * gnu-nat.c: Update.
3139 * go32-nat.c: Update.
3140 * inf-loop.c: Update.
3141 * inf-ptrace.c: Update.
3142 * infcall.c: Update.
3146 * linux-fork.c: Update.
3147 * linux-nat.c: Update.
3148 * linux-thread-db.c: Update.
3149 * mi/mi-cmd-var.c: Update.
3150 * mi/mi-interp.c: Update.
3151 * mi/mi-main.c: Update.
3152 * nto-procfs.c: Update.
3153 * ppc-linux-tdep.c: Update.
3155 * python/py-inferior.c: Update.
3156 * python/py-record-btrace.c: Update.
3157 * python/py-record.c: Update.
3158 * ravenscar-thread.c: Update.
3159 * regcache.c: Update.
3160 * remote-sim.c: Update.
3162 * sol-thread.c: Update.
3165 * tui/tui-stack.c: Update.
3167 * windows-nat.c: Update.
3168 * windows-tdep.c: Update.
3170 2018-07-03 Tom Tromey <tom@tromey.com>
3172 * common/ptid.c (ptid_match): Remove.
3173 * common/ptid.h (ptid_match): Don't declare.
3174 * fbsd-nat.c: Update.
3177 * linux-nat.c: Update.
3178 * record-btrace.c: Update.
3179 * regcache.c: Update.
3182 2018-07-03 Tom Tromey <tom@tromey.com>
3184 * common/ptid.c (ptid_tid_p): Remove.
3185 * common/ptid.h (ptid_tid_p): Don't declare.
3186 * sol-thread.c: Update.
3188 2018-07-03 Tom Tromey <tom@tromey.com>
3190 * common/ptid.c (ptid_lwp_p): Remove.
3191 * common/ptid.h (ptid_lwp_p): Don't declare.
3192 * fbsd-nat.c: Update.
3193 * linux-nat.c: Update.
3194 * nat/linux-procfs.c: Update.
3195 * nat/x86-linux-dregs.c: Update.
3196 * sol-thread.c: Update.
3198 2018-07-03 Tom Tromey <tom@tromey.com>
3200 * common/ptid.c (ptid_is_pid): Remove.
3201 * common/ptid.h (ptid_is_pid): Don't declare.
3203 * linux-nat.c: Update.
3204 * mi/mi-interp.c: Update.
3208 2018-07-03 Tom Tromey <tom@tromey.com>
3210 * common/ptid.c (ptid_get_tid): Remove.
3211 * common/ptid.h (ptid_get_tid): Don't declare.
3212 * ada-tasks.c: Update.
3213 * aix-thread.c: Update.
3214 * bsd-uthread.c: Update.
3215 * darwin-nat.c: Update.
3216 * fbsd-nat.c: Update.
3217 * i386-darwin-nat.c: Update.
3219 * linux-tdep.c: Update.
3220 * nto-procfs.c: Update.
3221 * ppc-ravenscar-thread.c: Update.
3222 * python/py-infthread.c: Update.
3223 * ravenscar-thread.c: Update.
3224 * sol-thread.c: Update.
3225 * sparc-ravenscar-thread.c: Update.
3226 * windows-nat.c: Update.
3228 2018-07-03 Tom Tromey <tom@tromey.com>
3230 * common/ptid.c (ptid_get_lwp): Remove.
3231 * common/ptid.h (ptid_get_lwp): Don't declare.
3232 * aarch64-linux-nat.c: Update.
3233 * ada-tasks.c: Update.
3234 * aix-thread.c: Update.
3235 * amd64-linux-nat.c: Update.
3236 * arm-linux-nat.c: Update.
3237 * corelow.c: Update.
3238 * fbsd-nat.c: Update.
3239 * fbsd-tdep.c: Update.
3240 * gnu-nat.c: Update.
3241 * i386-cygwin-tdep.c: Update.
3242 * i386-gnu-nat.c: Update.
3243 * i386-linux-nat.c: Update.
3244 * ia64-linux-nat.c: Update.
3245 * inf-ptrace.c: Update.
3247 * linux-fork.c: Update.
3248 * linux-nat.c: Update.
3249 * linux-tdep.c: Update.
3250 * linux-thread-db.c: Update.
3251 * mips-linux-nat.c: Update.
3252 * nat/aarch64-linux-hw-point.c: Update.
3253 * nat/aarch64-linux.c: Update.
3254 * nat/linux-btrace.c: Update.
3255 * nat/linux-osdata.c: Update.
3256 * nat/linux-procfs.c: Update.
3257 * nat/x86-linux-dregs.c: Update.
3258 * obsd-nat.c: Update.
3259 * ppc-fbsd-nat.c: Update.
3260 * ppc-linux-nat.c: Update.
3262 * python/py-infthread.c: Update.
3263 * ravenscar-thread.c: Update.
3265 * s390-linux-nat.c: Update.
3266 * sol-thread.c: Update.
3267 * sol2-tdep.c: Update.
3268 * spu-linux-nat.c: Update.
3269 * x86-linux-nat.c: Update.
3270 * xtensa-linux-nat.c: Update.
3272 2018-07-03 Tom Tromey <tom@tromey.com>
3274 * common/ptid.c (ptid_get_pid): Remove.
3275 * common/ptid.h (ptid_get_pid): Don't declare.
3276 * aarch64-linux-nat.c: Update.
3277 * ada-lang.c: Update.
3278 * aix-thread.c: Update.
3279 * alpha-bsd-nat.c: Update.
3280 * amd64-fbsd-nat.c: Update.
3281 * amd64-linux-nat.c: Update.
3282 * arm-linux-nat.c: Update.
3283 * arm-nbsd-nat.c: Update.
3285 * break-catch-syscall.c: Update.
3286 * breakpoint.c: Update.
3287 * bsd-uthread.c: Update.
3288 * corelow.c: Update.
3290 * darwin-nat.c: Update.
3291 * fbsd-nat.c: Update.
3292 * fbsd-tdep.c: Update.
3294 * gnu-nat.c: Update.
3295 * hppa-nbsd-nat.c: Update.
3296 * hppa-obsd-nat.c: Update.
3297 * i386-fbsd-nat.c: Update.
3298 * ia64-linux-nat.c: Update.
3299 * inf-ptrace.c: Update.
3301 * inferior.c: Update.
3302 * inferior.h: Update.
3305 * linux-fork.c: Update.
3306 * linux-nat.c: Update.
3307 * linux-tdep.c: Update.
3308 * linux-thread-db.c: Update.
3309 * m68k-bsd-nat.c: Update.
3310 * mi/mi-interp.c: Update.
3311 * mi/mi-main.c: Update.
3312 * mips-linux-nat.c: Update.
3313 * mips-nbsd-nat.c: Update.
3314 * mips64-obsd-nat.c: Update.
3315 * nat/aarch64-linux-hw-point.c: Update.
3316 * nat/aarch64-linux.c: Update.
3317 * nat/linux-btrace.c: Update.
3318 * nat/linux-osdata.c: Update.
3319 * nat/linux-procfs.c: Update.
3320 * nat/x86-linux-dregs.c: Update.
3321 * nto-procfs.c: Update.
3322 * obsd-nat.c: Update.
3323 * ppc-linux-nat.c: Update.
3324 * ppc-nbsd-nat.c: Update.
3325 * ppc-obsd-nat.c: Update.
3326 * proc-service.c: Update.
3328 * python/py-inferior.c: Update.
3329 * python/py-infthread.c: Update.
3330 * ravenscar-thread.c: Update.
3332 * remote-sim.c: Update.
3334 * rs6000-nat.c: Update.
3335 * s390-linux-nat.c: Update.
3336 * sh-nbsd-nat.c: Update.
3337 * sol-thread.c: Update.
3338 * sparc-nat.c: Update.
3339 * sparc64-tdep.c: Update.
3340 * spu-linux-nat.c: Update.
3341 * spu-tdep.c: Update.
3342 * target-debug.h: Update.
3345 * tid-parse.c: Update.
3346 * tracefile-tfile.c: Update.
3347 * vax-bsd-nat.c: Update.
3348 * windows-nat.c: Update.
3349 * x86-linux-nat.c: Update.
3350 * x86-nat.c: Update.
3352 2018-07-03 Tom Tromey <tom@tromey.com>
3354 * common/ptid.c (pid_to_ptid): Remove.
3355 * common/ptid.h (pid_to_ptid): Don't declare.
3356 * aix-thread.c: Update.
3357 * arm-linux-nat.c: Update.
3358 * common/ptid.c: Update.
3359 * common/ptid.h: Update.
3360 * corelow.c: Update.
3362 * darwin-nat.c: Update.
3363 * fbsd-nat.c: Update.
3364 * fork-child.c: Update.
3365 * gnu-nat.c: Update.
3366 * go32-nat.c: Update.
3367 * inf-ptrace.c: Update.
3369 * inferior.c: Update.
3371 * linux-fork.c: Update.
3372 * linux-nat.c: Update.
3373 * nat/aarch64-linux-hw-point.c: Update.
3374 * nat/fork-inferior.c: Update.
3375 * nat/x86-linux-dregs.c: Update.
3376 * nto-procfs.c: Update.
3377 * obsd-nat.c: Update.
3379 * progspace.c: Update.
3381 * rs6000-nat.c: Update.
3382 * s390-linux-nat.c: Update.
3383 * sol-thread.c: Update.
3384 * spu-linux-nat.c: Update.
3387 * tracefile-tfile.c: Update.
3388 * windows-nat.c: Update.
3390 2018-07-03 Tom Tromey <tom@tromey.com>
3392 * common/ptid.h (ptid_build): Don't declare.
3393 * common/ptid.c (ptid_build): Remove.
3394 * aix-thread.c: Update.
3395 * bsd-kvm.c: Update.
3396 * bsd-uthread.c: Update.
3397 * common/agent.c: Update.
3398 * common/ptid.c: Update.
3399 * common/ptid.h: Update.
3400 * corelow.c: Update.
3401 * darwin-nat.c: Update.
3402 * fbsd-nat.c: Update.
3403 * gnu-nat.c: Update.
3404 * linux-fork.c: Update.
3405 * linux-nat.c: Update.
3406 * linux-thread-db.c: Update.
3407 * nat/linux-osdata.c: Update.
3408 * nat/linux-procfs.c: Update.
3409 * nto-procfs.c: Update.
3410 * obsd-nat.c: Update.
3411 * proc-service.c: Update.
3413 * ravenscar-thread.c: Update.
3414 * remote-sim.c: Update.
3416 * sol-thread.c: Update.
3418 * windows-nat.c: Update.
3420 2018-07-03 Tom Tromey <tom@tromey.com>
3422 * infrun.c (follow_exec): Use exit_inferior_silent.
3423 * inferior.c (exit_inferior_num_silent): Remove.
3424 * inferior.h (exit_inferior_num_silent): Don't declare.
3426 2018-07-03 Tom Tromey <tom@tromey.com>
3429 * darwin-nat.c (darwin_attach_pid): Reset inferior and
3430 inferior_ptid on error.
3432 2018-07-02 Maciej W. Rozycki <macro@mips.com>
3433 Simon Marchi <simon.marchi@polymtl.ca>
3436 * disasm.h (gdb_disassembler): Add
3437 `m_disassembler_options_holder'. member
3438 * disasm.c (get_all_disassembler_options): New function.
3439 (gdb_disassembler::gdb_disassembler): Use it.
3440 (gdb_buffered_insn_length_init_dis): Likewise.
3441 (gdb_buffered_insn_length): Adjust accordingly.
3442 (set_disassembler_options): Handle options with arguments.
3443 (show_disassembler_options_sfunc): Likewise. Add a leading new
3444 line if showing options with descriptions.
3445 (disassembler_options_completer): Adapt to using the
3446 `disasm_options_and_args_t' structure.
3447 * mips-tdep.c (mips_disassembler_options): New variable.
3448 (mips_disassembler_options_o32): Likewise.
3449 (mips_disassembler_options_n32): Likewise.
3450 (mips_disassembler_options_n64): Likewise.
3451 (gdb_print_insn_mips): Don't set `disassembler_options'.
3452 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3454 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3455 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
3456 `gdbarch_disassembler_options_implicit' and
3457 `gdbarch_valid_disassembler_options'.
3458 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3459 `disasm_options_and_args_t' structure.
3460 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3462 (valid_disassembler_options): Switch from `disasm_options_t' to
3463 the `disasm_options_and_args_t' structure.
3464 * NEWS: Document `set disassembler-options' support for the MIPS
3466 * gdbarch.h: Regenerate.
3467 * gdbarch.c: Regenerate.
3469 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
3471 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3473 2018-06-29 Joel Brobecker <brobecker@adacore.com>
3475 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3476 parameter in call to amd64_target_description.
3477 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3478 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3479 (amd64fbsd_init_abi): Likewise.
3480 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3481 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3482 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3483 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3485 2018-06-29 Pedro Alves <palves@redhat.com>
3487 * gdb/amd64-tdep.h (amd64_create_target_description): Add
3488 "segments" parameter.
3489 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3490 (_initialize_amd64_tdep): Update call to
3491 amd64_create_target_description.
3492 (amd64_target_description): Add "segments" parameter. Adjust
3493 the implementation to use it.
3494 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3495 call to amd64_create_target_description.
3496 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3497 * gdb/arch/amd64.h (amd64_create_target_description): Add
3498 "segments" register.
3499 * gdb/arch/amd64.c (amd64_create_target_description): Add
3500 "segments" parameter. Call create_feature_i386_64bit_segments
3501 only if SEGMENTS is true.
3502 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3503 call to amd64_create_target_description.
3505 2018-06-29 Pedro Alves <palves@redhat.com>
3507 * thread.c (thread_target_id_str): New, factored out from ...
3508 (print_thread_info_1): ... here. Use it to compute the max
3509 "Target Id" column width.
3511 2018-06-29 Pedro Alves <palves@redhat.com>
3513 * remote.c (remote_target::extra_thread_info): Delete
3514 'display_buf' and 'n' locals. from the cache, regardless of
3515 packet mechanims is in use. Use cache for qThreadExtra and qP
3518 2018-06-29 Pedro Alves <palves@redhat.com>
3520 * blockframe.c (find_pc_sect_containing_function): New function.
3521 * breakpoint.c (print_breakpoint_location): Don't call
3522 find_pc_sect_function.
3523 * linespec.c (create_sals_line_offset): Record the location's
3525 * linespec.c (convert_address_location_to_sals): Fill in sal's
3526 symbol with find_pc_sect_containing_function.
3527 * symtab.c (find_function_start_sal): Rename to ...
3528 (find_function_start_sal_1): ... this.
3529 (find_function_start_sal): Reimplement as wrapper around
3530 find_function_start_sal_1, and use
3531 find_pc_sect_containing_function to fill in the sal's symbol.
3532 (find_function_start_sal(symbol*, bool)): Adjust.
3533 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3535 (find_pc_sect_containing_function): Declare.
3537 2018-06-29 Pedro Alves <palves@redhat.com>
3539 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3540 true if the the location has no symbol.
3542 2018-06-28 Tom Tromey <tom@tromey.com>
3544 * NEWS: Mention --enable-codesign.
3545 * silent-rules.mk (ECHO_SIGN): New variable.
3546 * configure.ac: Add --enable-codesign.
3547 * configure: Rebuild.
3548 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3549 (gdb$(EXEEXT)): Optionally invoke codesign.
3551 2018-06-28 Pedro Alves <palves@redhat.com>
3553 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3555 (switch_to_thread_no_regs): Adjust comment.
3556 * infcmd.c (stop_pc): Delete.
3557 (post_create_inferior, info_program_command): Replace references
3558 to stop_pc with references to thread_info->suspend.stop_pc.
3559 * inferior.h (stop_pc): Delete declaration.
3560 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3561 (handle_inferior_event_1, handle_signal_stop)
3562 (process_event_stop_test, keep_going_stepped_thread)
3563 (handle_step_into_function, handle_step_into_function_backward)
3564 (print_stop_location): Replace references to stop_pc with
3565 references to thread_info->suspend.stop_pc.
3566 (struct infcall_suspend_state) <stop_pc>: Delete field.
3567 (save_infcall_suspend_state, restore_infcall_suspend_state):
3568 Remove references to inf_stat->stop_pc.
3569 * linux-fork.c (fork_load_infrun_state): Likewise.
3570 * record-btrace.c (record_btrace_set_replay): Likewise.
3571 * record-full.c (record_full_goto_entry): Likewise.
3572 * remote.c (print_one_stopped_thread): Likewise.
3573 * target.c (target_resume): Extend comment.
3574 * thread.c (set_executing_thread): New.
3575 (set_executing): Use it.
3576 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3577 Remove references to stop_pc.
3579 2018-06-28 Pedro Alves <palves@redhat.com>
3581 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3582 Moving fetching stop_pc until after ecs->event_thread is refreshed.
3584 2018-06-28 Tom Tromey <tom@tromey.com>
3586 * coffread.c (coff_symfile_finish): Update.
3587 * xcoffread.c (xcoff_symfile_finish): Update.
3588 * elfread.c (elf_symfile_finish): Update.
3589 * symfile.h (dwarf2_free_objfile): Don't declare.
3590 * dwarf2read.c (_initialize_dwarf2_read): Use
3591 register_objfile_data_with_cleanup.
3592 (dwarf2_free_objfile): Now static. Change signature.
3594 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3596 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3597 option "-o" to add-symbol-file-load to add an offset to each
3598 section's load address.
3599 * symfile.c (set_objfile_default_section_offset): New function.
3601 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3603 * symfile.c (add_symbol_file_command): Make sure that sections
3604 with the same name are sorted in the same order.
3606 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3608 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3609 require the second argument. If omitted, load sections at the
3610 addresses specified in the file.
3612 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3614 * symfile.c (symbol_file_command, symbol_file_add_main_1)
3615 (_initialize_symfile): Add option "-o" to symbol-file to add an
3616 offset to each section of the symbol file.
3618 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3620 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3622 2018-06-27 Tom Tromey <tom@tromey.com>
3624 * stack.c (_initialize_stack): Update "func" help text.
3626 2018-06-27 Tom Tromey <tom@tromey.com>
3628 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3630 (unwind_infopy_str, pyuw_create_unwind_info)
3631 (unwind_infopy_add_saved_register, pyuw_sniffer)
3632 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3634 (struct saved_reg): Add constructor.
3635 <value>: Now a gdbpy_ref<>.
3637 2018-06-27 Tom Tromey <tom@tromey.com>
3639 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3641 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3643 * gdb-gdb.py.in: Format using autopep8.
3645 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3647 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3648 (type_lookup_function): Recognize CORE_ADDR values.
3650 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3652 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3655 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3657 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3660 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3662 * gdb-gdb.py: Move to...
3663 * gdb-gdb.py.in: ... here.
3664 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3665 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3667 (distclean): Remove gdb-gdb.py when cleaning.
3668 (gdb-gdb.py, gdb-gdb.gdb): New rules.
3669 * configure: Re-generate.
3671 2018-06-27 Pedro Alves <palves@redhat.com>
3673 * proc-service.c (get_ps_regcache): New.
3674 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3675 (ps_lsetfpregs): Use it.
3677 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
3680 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3681 (dwarf_decode_lines_1): Adjust.
3683 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3685 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3687 <info_proc>: Likewise.
3689 2018-06-26 Joel Brobecker <brobecker@adacore.com>
3691 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3692 to windows_fetch_one_register, and only handle the case of
3693 fetching one register. Move the code that reloads the context
3694 and iterates over all registers if R is negative to...
3695 (windows_nat_target::fetch_registers): ... here.
3696 (do_windows_store_inferior_registers): Rename to
3697 windows_store_one_register, and only handle the case of storing
3698 one register. Move the code that handles the case where r is
3700 (windows_nat_target::store_registers) ... here.
3702 2018-06-26 Tom Tromey <tom@tromey.com>
3705 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3706 * rust-lang.c (rust_print_struct_def): Add podata parameter.
3708 (rust_internal_print_type): Add podata parameter.
3709 (rust_print_type): Update.
3711 2018-06-26 Tom Tromey <tom@tromey.com>
3713 * typeprint.h (struct print_offset_data) <update, finish,
3714 maybe_print_hole>: New methods.
3715 <indentation>: New constant.
3716 * typeprint.c (print_offset_data::indentation): Define.
3717 (print_offset_data::maybe_print_hole, print_offset_data::update)
3718 (print_offset_data::finish): Move from c-typeprint.c and rename.
3719 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3720 (print_spaces_filtered_with_print_options): Update.
3721 (c_print_type_union_field_offset, maybe_print_hole)
3722 (c_print_type_struct_field_offset): Move to typeprint.c and
3724 (c_type_print_base_struct_union): Update.
3726 2018-06-25 Pedro Alves <palves@redhat.com>
3728 * gdbthread.h (thread_info_ref, delete_thread)
3729 (delete_thread_silent, first_thread_of_inferior)
3730 (any_thread_of_inferior, switch_to_thread)
3731 (enable_thread_stack_temporaries)
3732 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3733 (get_last_thread_stack_temporary)
3734 (value_in_thread_stack_temporaries, can_access_registers_thread):
3735 Spell out "struct thread_info" instead of just "thread_info".
3736 * inferior.h (notice_new_inferior): Likewise.
3738 2018-06-25 Pedro Alves <palves@redhat.com>
3740 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3741 pass thread_info pointer to delete_thread.
3742 (windows_nat_target::detach): Pass inferior pointer to
3744 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3746 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3747 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3748 and pass a thread_info pointer to delete_thread.
3749 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3750 pass thread_info pointer to delete_thread.
3751 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3752 delete_thread_silent call.
3753 * procfs.c (procfs_target::detach): Pass inferior pointer to
3755 (procfs_target::wait): Pass thread_info pointer to delete_thread.
3756 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3757 delete_thread_silent call.
3758 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3759 pass thread_info pointer to delete_thread.
3760 (windows_nat_target::detach): Pass inferior pointer to
3763 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3765 * regcache.c (readable_regcache::read_part): Fix asserts.
3766 (reg_buffer::raw_collect_part): New function.
3767 (regcache::write_part): Fix asserts.
3768 (reg_buffer::raw_supply_part): New function.
3769 (regcache::transfer_regset_register): New helper function.
3770 (regcache::transfer_regset): Call new functions.
3771 (regcache_supply_regset): Use gdb_byte*.
3772 (regcache::supply_regset): Likewise.
3773 (regcache_collect_regset): Likewise.
3774 (regcache::collect_regset): Likewise.
3775 * regcache.h (reg_buffer::raw_collect_part): New declaration.
3776 (reg_buffer::raw_supply_part): Likewise.
3777 (regcache::transfer_regset_register): Likewise.
3778 (regcache::transfer_regset): Use gdb_byte*.
3780 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3782 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3784 2018-06-21 Pedro Alves <palves@redhat.com>
3786 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3787 instead of a ptid_t. All callers adjusted.
3788 * ada-tasks.c (ada_get_task_number): Likewise. All callers
3790 (print_ada_task_info, display_current_task_id, task_command_1):
3792 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3794 (breakpoint_kind): Adjust.
3795 (remove_breakpoints_pid): Rename to ...
3796 (remove_breakpoints_inf): ... this. Adjust to take an inferior
3797 pointer. All callers adjusted.
3798 (bpstat_clear_actions): Use inferior_thread.
3799 (get_bpstat_thread): New.
3800 (bpstat_do_actions): Use it.
3801 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3802 to take a thread_info pointer. All callers adjusted.
3803 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3804 (breakpoint_re_set_thread): Use inferior_thread.
3805 * breakpoint.h (struct inferior): Forward declare.
3806 (bpstat_stop_status): Update.
3807 (remove_breakpoints_pid): Delete.
3808 (remove_breakpoints_inf): New.
3809 * bsd-uthread.c (bsd_uthread_target::wait)
3810 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3811 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3812 (maint_btrace_packet_history_cmd)
3813 (maint_btrace_clear_packet_history_cmd): Adjust.
3814 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3816 * cli/cli-interp.c: Include "inferior.h".
3817 * common/refcounted-object.h (struct
3818 refcounted_object_ref_policy): New.
3819 * compile/compile-object-load.c: Include gdbthread.h.
3820 (store_regs): Use inferior_thread.
3821 * corelow.c (core_target::close): Use current_inferior.
3822 (core_target_open): Adjust to use first_thread_of_inferior and use
3823 the current inferior.
3824 * ctf.c (ctf_target::close): Adjust to use current_inferior.
3825 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3826 <thread>: ... this new field. All references adjusted.
3827 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3828 Take a thread_info pointer instead of a ptid_t.
3829 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3830 (dummy_frame_discard, register_dummy_frame_dtor): Take a
3831 thread_info pointer instead of a ptid_t.
3832 * elfread.c: Include "inferior.h".
3833 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3834 Use inferior_thread.
3835 * eval.c (evaluate_subexp): Likewise.
3836 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3838 * gdb_proc_service.h (struct thread_info): Forward declare.
3839 (struct ps_prochandle) <ptid>: Delete, replaced by ...
3840 <thread>: ... this new field. All references adjusted.
3841 * gdbarch.h, gdbarch.c: Regenerate.
3842 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3843 'thread' parameter. All implementations and callers adjusted.
3844 * gdbthread.h (thread_info) <set_running>: New method.
3845 (delete_thread, delete_thread_silent): Take a thread_info pointer
3847 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3848 (first_thread_of_process): Delete, replaced by ...
3849 (first_thread_of_inferior): ... this new function. All callers
3851 (any_live_thread_of_process): Delete, replaced by ...
3852 (any_live_thread_of_inferior): ... this new function. All callers
3854 (switch_to_thread, switch_to_no_thread): Declare.
3855 (is_executing): Delete.
3856 (enable_thread_stack_temporaries): Update comment.
3857 <enable_thread_stack_temporaries>: Take a thread_info pointer
3858 instead of a ptid_t. Incref the thread.
3859 <~enable_thread_stack_temporaries>: Decref the thread.
3862 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3863 (get_last_thread_stack_temporary)
3864 (value_in_thread_stack_temporaries, can_access_registers_thread):
3865 Take a thread_info pointer instead of a ptid_t. All callers
3867 * infcall.c (get_call_return_value): Use inferior_thread.
3868 (run_inferior_call): Work with thread pointers instead of ptid_t.
3869 (call_function_by_hand_dummy): Work with thread pointers instead
3870 of ptid_t. Use thread_info_ref.
3871 * infcmd.c (proceed_thread_callback): Access thread's state
3873 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3874 access thread's state directly.
3875 (continue_command): Use inferior_thread.
3876 (info_program_command): Use find_thread_ptid and access thread
3878 (proceed_after_attach_callback): Use thread state directly.
3879 (notice_new_inferior): Take a thread_info pointer instead of a
3880 ptid_t. All callers adjusted.
3881 (exit_inferior): Take an inferior pointer instead of a pid. All
3883 (exit_inferior_silent): New.
3884 (detach_inferior): Delete.
3885 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3886 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3887 (detach_inferior_command, kill_inferior_command): Use
3888 find_inferior_id instead of valid_gdb_inferior_id and
3889 gdb_inferior_id_to_pid.
3890 (inferior_command): Use inferior and thread pointers.
3891 * inferior.h (struct thread_info): Forward declare.
3892 (notice_new_inferior): Take a thread_info pointer instead of a
3893 ptid_t. All callers adjusted.
3894 (detach_inferior): Delete declaration.
3895 (exit_inferior, exit_inferior_silent): Take an inferior pointer
3896 instead of a pid. All callers adjusted.
3897 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3898 (valid_gdb_inferior_id): Delete.
3899 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3900 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3901 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3903 <inf>: ... this new field.
3904 <step_ptid>: Delete, replaced by ...
3905 <step_thread>: ... this new field.
3906 (get_displaced_stepping_state): Take an inferior pointer instead
3907 of a pid. All callers adjusted.
3908 (displaced_step_in_progress_any_inferior): Adjust.
3909 (displaced_step_in_progress_thread): Take a thread pointer instead
3910 of a ptid_t. All callers adjusted.
3911 (displaced_step_in_progress, add_displaced_stepping_state): Take
3912 an inferior pointer instead of a pid. All callers adjusted.
3913 (get_displaced_step_closure_by_addr): Adjust.
3914 (remove_displaced_stepping_state): Take an inferior pointer
3915 instead of a pid. All callers adjusted.
3916 (displaced_step_prepare_throw, displaced_step_prepare)
3917 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3918 All callers adjusted.
3919 (start_step_over): Adjust.
3920 (infrun_thread_ptid_changed): Remove bit updating ptids in the
3921 displaced step queue.
3922 (do_target_resume): Adjust.
3923 (fetch_inferior_event): Use inferior_thread.
3924 (context_switch, get_inferior_stop_soon): Take an
3925 execution_control_state pointer instead of a ptid_t. All callers
3927 (switch_to_thread_cleanup): Delete.
3928 (stop_all_threads): Use scoped_restore_current_thread.
3929 * inline-frame.c: Include "gdbthread.h".
3930 (inline_state) <inline_state>: Take a thread pointer instead of a
3931 ptid_t. All callers adjusted.
3932 <ptid>: Delete, replaced by ...
3933 <thread>: ... this new field.
3934 (find_inline_frame_state): Take a thread pointer instead of a
3935 ptid_t. All callers adjusted.
3936 (skip_inline_frames, step_into_inline_frame)
3937 (inline_skipped_frames, inline_skipped_symbol): Take a thread
3938 pointer instead of a ptid_t. All callers adjusted.
3939 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3940 (inline_skipped_frames, inline_skipped_symbol): Likewise.
3941 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3943 * linux-nat.c (get_detach_signal): Likewise.
3944 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3945 (thread_db_notice_clone): Adjust.
3946 (thread_db_find_new_threads_silently)
3947 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3948 a thread pointer instead of a ptid_t. All callers adjusted.
3949 * mi/mi-cmd-var.c: Include "inferior.h".
3950 (mi_cmd_var_update_iter): Update to use thread pointers.
3951 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3953 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3955 (mi_output_running): ... this new function.
3956 (mi_on_resume_1): Adjust to use it.
3957 (mi_user_selected_context_changed): Adjust to use inferior_thread.
3958 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3960 (interrupt_thread_callback): : Adjust to use thread and inferior
3962 * proc-service.c: Include "gdbthread.h".
3963 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3964 * progspace-and-thread.c: Include "inferior.h".
3965 * progspace.c: Include "inferior.h".
3966 * python/py-exitedevent.c (create_exited_event_object): Adjust to
3967 hold a reference to an inferior_object.
3968 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3970 * python/py-inferior.c (struct inferior_object): Give the type a
3971 tag name instead of a typedef.
3972 (python_on_normal_stop): No need to check if the current thread is
3974 (inferior_to_inferior_object): Change return type to
3975 inferior_object. All callers adjusted.
3976 (find_thread_object): Delete, bits factored out to ...
3977 (thread_to_thread_object): ... this new function.
3978 * python/py-infthread.c (create_thread_object): Use
3979 inferior_to_inferior_object.
3980 (thpy_is_stopped): Use thread pointer directly.
3981 (gdbpy_selected_thread): Use inferior_thread.
3982 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3983 field, replaced with ...
3984 <thread>: ... this new field. All users adjusted.
3985 (btpy_insn_or_gap_new): Drop const.
3986 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
3988 * python/py-record.c: Include "gdbthread.h".
3989 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3990 a ptid_t. All callers adjusted.
3991 (gdbpy_current_recording): Use inferior_thread.
3992 * python/py-record.h (recpy_record_object) <ptid>: Delete
3993 field, replaced with ...
3994 <thread>: ... this new field. All users adjusted.
3995 (recpy_element_object) <ptid>: Delete
3996 field, replaced with ...
3997 <thread>: ... this new field. All users adjusted.
3998 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3999 a ptid_t. All callers adjusted.
4000 * python/py-threadevent.c: Include "gdbthread.h".
4001 (get_event_thread): Use thread_to_thread_object.
4002 * python/python-internal.h (struct inferior_object): Forward
4004 (find_thread_object, find_inferior_object): Delete declarations.
4005 (thread_to_thread_object, inferior_to_inferior_object): New
4007 * record-btrace.c: Include "inferior.h".
4008 (require_btrace_thread): Use inferior_thread.
4009 (record_btrace_frame_sniffer)
4010 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4011 (get_thread_current_frame): Use scoped_restore_current_thread and
4013 (get_thread_current_frame): Use thread pointer directly.
4014 (record_btrace_replay_at_breakpoint): Use thread's inferior
4016 * record-full.c: Include "inferior.h".
4017 * regcache.c: Include "gdbthread.h".
4018 (get_thread_arch_regcache): Use the inferior's address space
4020 (get_thread_regcache, registers_changed_thread): New.
4021 * regcache.h (get_thread_regcache(thread_info *thread)): New
4023 (registers_changed_thread): New.
4024 (remote_target) <remote_detach_1>: Swap order of parameters.
4025 (remote_add_thread): <remote_add_thread>: Return the new thread.
4026 (get_remote_thread_info(ptid_t)): New overload.
4027 (remote_target::remote_notice_new_inferior): Use thread pointers
4029 (remote_target::process_initial_stop_replies): Use
4030 thread_info::set_running.
4031 (remote_target::remote_detach_1, remote_target::detach)
4032 (extended_remote_target::detach): Adjust.
4033 * stack.c (frame_show_address): Use inferior_thread.
4034 * target-debug.h (target_debug_print_thread_info_pp): New.
4035 * target-delegates.c: Regenerate.
4036 * target.c (default_thread_address_space): Delete.
4037 (memory_xfer_partial_1): Use current_inferior.
4038 (target_detach): Use current_inferior.
4039 (target_thread_address_space): Delete.
4040 (generic_mourn_inferior): Use current_inferior.
4041 * target.h (struct target_ops) <thread_address_space>: Delete.
4042 (target_thread_address_space): Delete.
4043 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
4045 (delete_thread_1, delete_thread, delete_thread_silent): Take a
4046 thread pointer instead of a ptid_t. Adjust all callers.
4047 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4048 (first_thread_of_process): Delete, replaced by ...
4049 (first_thread_of_inferior): ... this new function. All callers
4051 (any_thread_of_process): Rename to ...
4052 (any_thread_of_inferior): ... this, and take an inferior pointer.
4053 (any_live_thread_of_process): Rename to ...
4054 (any_live_thread_of_inferior): ... this, and take an inferior
4056 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4057 (value_in_thread_stack_temporaries)
4058 (get_last_thread_stack_temporary): Take a thread pointer instead
4059 of a ptid_t. Adjust all callers.
4060 (thread_info::set_running): New.
4061 (validate_registers_access): Use inferior_thread.
4062 (can_access_registers_ptid): Rename to ...
4063 (can_access_registers_thread): ... this, and take a thread
4065 (print_thread_info_1): Adjust to compare thread pointers instead
4067 (switch_to_no_thread, switch_to_thread): Make extern.
4068 (scoped_restore_current_thread::~scoped_restore_current_thread):
4069 Use m_thread pointer directly.
4070 (scoped_restore_current_thread::scoped_restore_current_thread):
4071 Use inferior_thread.
4072 (thread_command): Use thread pointer directly.
4073 (thread_num_make_value_helper): Use inferior_thread.
4074 * top.c (execute_command): Use inferior_thread.
4075 * tui/tui-interp.c: Include "inferior.h".
4076 * varobj.c (varobj_create): Use inferior_thread.
4077 (value_of_root_1): Use find_thread_global_id instead of
4078 global_thread_id_to_ptid.
4080 2018-06-21 Alan Hayward <alan.hayward@arm.com>
4082 * regcache.c (readable_regcache::read_part): Avoid memcpy when
4084 (regcache::write_part): Likewise.
4085 (readable_regcache::cooked_read_part): Update comment.
4086 (readable_regcache::cooked_write_part): Likewise.
4087 * regcache.h: (readable_regcache::read_part): Likewise.
4088 (regcache::write_part): Likewise.
4090 2018-06-21 Richard Bunt <richard.bunt@arm.com>
4091 Dirk Schubert <dirk.schubert@arm.com>
4093 * aarch64-linux-nat.c (post_attach): New.
4094 (aarch64_linux_nat_target::post_attach): Override post_attach to
4095 record the number of hardware debug registers.
4097 2018-06-20 Tom Tromey <tom@tromey.com>
4099 * python/py-param.c (add_setshow_generic): Make parameters const.
4100 (parmpy_init): Update.
4102 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4104 * regcache.h (regcache_cooked_read_ftype): Rename to...
4105 (register_read_ftype): ...this, change type to function_view.
4106 (class reg_buffer) <save>: Remove src parameter.
4107 (readonly_detached_regcache) <readonly_detached_regcache>: Make
4108 parameter non-const in first overload. Remove src parameter in
4110 * regcache.c (do_cooked_read): Remove.
4111 (readonly_detached_regcache::readonly_detached_regcache): Make
4112 parameter non-const, adjust call to other constructor.
4113 (reg_buffer::save): Remove src parameter.
4114 * frame.c (do_frame_register_read): Remove.
4115 (frame_save_as_regcache): Use lambda function.
4116 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4117 parameter to ppu2spu_data *.
4118 (ppu2spu_sniffer): Use lambda function.
4120 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4122 * record-full.c (record_full_target::insert_breakpoint): Remove
4123 "struct" keyword, add const.
4125 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
4127 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4128 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4129 * configure.ac: Remove AC_PREREQ, add missing quoting.
4130 * gnulib/configure.ac: Modernize usage of
4131 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
4132 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4133 (AUTOMAKE_VERSION): Bump to 1.15.1.
4134 * configure: Re-generate.
4135 * config.in: Re-generate.
4136 * aclocal.m4: Re-generate.
4137 * gnulib/aclocal.m4: Re-generate.
4138 * gnulib/config.in: Re-generate.
4139 * gnulib/configure: Re-generate.
4140 * gnulib/import/Makefile.in: Re-generate.
4142 2018-06-19 Pedro Alves <palves@redhat.com>
4144 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4145 (lookup_minimal_symbol_by_pc_section): ... here with
4146 gdb_assert_not_reached added.
4148 2018-06-19 Pedro Alves <palves@redhat.com>
4150 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4151 parameter with a block parameter. Compare location's block symbol
4152 with the frame's block instead of addresses.
4153 (skip_inline_frames): Pass the current block instead of the
4154 frame's address. Break out as soon as we determine the frame
4155 should not be skipped.
4157 2018-06-18 Tom Tromey <tom@tromey.com>
4159 * solib-aix.c (solib_aix_get_section_offsets): Return
4161 (solib_aix_solib_create_inferior_hook): Update.
4163 2018-06-18 Tom Tromey <tom@tromey.com>
4165 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4167 2018-06-18 Tom Tromey <tom@tromey.com>
4169 * solib-frv.c (frv_relocate_main_executable): Use
4171 * solib-dsbt.c (dsbt_relocate_main_executable): Use
4174 2018-06-18 Tom Tromey <tom@tromey.com>
4176 * objfiles.h (inhibit_section_map_updates): Update.
4177 (resume_section_map_updates, resume_section_map_updates_cleanup):
4179 * solib-svr4.c (svr4_handle_solib_event): Update.
4180 * objfiles.c (inhibit_section_map_updates): Return
4181 scoped_restore_tmpl<int>.
4182 (resume_section_map_updates, resume_section_map_updates_cleanup):
4185 2018-06-18 Tom Tromey <tom@tromey.com>
4187 * valprint.h (read_string): Update.
4188 * valprint.c (read_string): Change type of "buffer".
4189 (val_print_string): Update.
4190 * python/py-value.c (valpy_string): Update.
4191 * language.h (struct language_defn) <la_get_string>: Change
4193 (default_get_string, c_get_string): Update.
4194 * language.c (default_get_string): Change type of "buffer".
4195 * guile/scm-value.c (gdbscm_value_to_string): Update.
4196 * c-lang.c (c_get_string): Change type of "buffer".
4198 2018-06-18 Tom Tromey <tom@tromey.com>
4200 * ser-mingw.c (struct pipe_state_destroyer): New.
4201 (pipe_state_up): New typedef.
4202 (cleanup_pipe_state): Remove.
4203 (pipe_windows_open): Use pipe_state_up. Don't release argv.
4205 2018-06-18 Tom Tromey <tom@tromey.com>
4207 * rust-lang.h (rust_yyerror): Don't declare.
4208 * rust-lang.c (rust_language_defn): Update.
4209 * rust-exp.y (yyerror): Now static.
4210 * parse.c (parse_exp_in_context_1): Update.
4211 * p-lang.h (p_yyerror): Don't declare.
4212 * p-lang.c (p_language_defn): Update.
4213 * p-exp.y (yyerror): Now static.
4214 * opencl-lang.c (opencl_language_defn): Update.
4215 * objc-lang.c (objc_language_defn): Update.
4216 * m2-lang.h (m2_yyerror): Don't declare.
4217 * m2-lang.c (m2_language_defn): Update.
4218 * m2-exp.y (yyerror): Now static.
4219 * language.h (struct language_defn) <la_error>: Remove.
4220 * language.c (unk_lang_error): Remove.
4221 (unknown_language_defn, auto_language_defn): Remove.
4222 * go-lang.h (go_yyerror): Don't declare.
4223 * go-lang.c (go_language_defn): Update.
4224 * go-exp.y (yyerror): Now static.
4225 * f-lang.h (f_yyerror): Don't declare.
4226 * f-lang.c (f_language_defn): Update.
4227 * f-exp.y (yyerror): Now static.
4228 * d-lang.h (d_yyerror): Don't declare.
4229 * d-lang.c (d_language_defn): Update.
4230 * d-exp.y (yyerror): Now static.
4231 * c-lang.h (c_yyerror): Don't declare.
4232 * c-lang.c (c_language_defn, cplus_language_defn)
4233 (asm_language_defn, minimal_language_defn): Update.
4234 * c-exp.y (yyerror): Now static.
4235 * ada-lang.h (ada_yyerror): Don't declare.
4236 * ada-lang.c (ada_language_defn): Update.
4237 * ada-exp.y (yyerror): Now static.
4239 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4241 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4242 (store_sveregs_to_thread): Likewise.
4243 (aarch64_linux_fetch_inferior_registers): Check for SVE.
4244 (aarch64_linux_store_inferior_registers): Likewise.
4245 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4247 (aarch64_sve_regs_copy_to_regcache): Likewise.
4248 (aarch64_sve_regs_copy_from_regcache): Likewise.
4249 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4251 (aarch64_sve_regs_copy_to_regcache): Likewise.
4252 (aarch64_sve_regs_copy_from_regcache): Likewise.
4253 (sve_context): Structure from Linux headers.
4254 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4255 (SVE_SIG_ZREG_SIZE): Likewise.
4256 (SVE_SIG_PREG_SIZE): Likewise.
4257 (SVE_SIG_FFR_SIZE): Likewise.
4258 (SVE_SIG_REGS_OFFSET): Likewise.
4259 (SVE_SIG_ZREGS_OFFSET): Likewise.
4260 (SVE_SIG_ZREG_OFFSET): Likewise.
4261 (SVE_SIG_ZREGS_SIZE): Likewise.
4262 (SVE_SIG_PREGS_OFFSET): Likewise.
4263 (SVE_SIG_PREG_OFFSET): Likewise.
4264 (SVE_SIG_PREGS_SIZE): Likewise.
4265 (SVE_SIG_FFR_OFFSET): Likewise.
4266 (SVE_SIG_REGS_SIZE): Likewise.
4267 (SVE_SIG_CONTEXT_SIZE): Likewise.
4268 (SVE_PT_REGS_MASK): Likewise.
4269 (SVE_PT_REGS_FPSIMD): Likewise.
4270 (SVE_PT_REGS_SVE): Likewise.
4271 (SVE_PT_VL_INHERIT): Likewise.
4272 (SVE_PT_VL_ONEXEC): Likewise.
4273 (SVE_PT_REGS_OFFSET): Likewise.
4274 (SVE_PT_FPSIMD_OFFSET): Likewise.
4275 (SVE_PT_FPSIMD_SIZE): Likewise.
4276 (SVE_PT_SVE_ZREG_SIZE): Likewise.
4277 (SVE_PT_SVE_PREG_SIZE): Likewise.
4278 (SVE_PT_SVE_FFR_SIZE): Likewise.
4279 (SVE_PT_SVE_FPSR_SIZE): Likewise.
4280 (SVE_PT_SVE_FPCR_SIZE): Likewise.
4281 (__SVE_SIG_TO_PT): Likewise.
4282 (SVE_PT_SVE_OFFSET): Likewise.
4283 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4284 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4285 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4286 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4287 (SVE_PT_SVE_PREG_OFFSET): Likewise.
4288 (SVE_PT_SVE_PREGS_SIZE): Likewise.
4289 (SVE_PT_SVE_FFR_OFFSET): Likewise.
4290 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4291 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4292 (SVE_PT_SVE_SIZE): Likewise.
4293 (SVE_PT_SIZE): Likewise.
4294 (HAS_SVE_STATE): New define.
4296 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4298 * nat/aarch64-sve-linux-sigcontext.h: New file.
4299 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4301 (SVE_VQ_MIN): Likewise.
4302 (SVE_VQ_MAX): Likewise.
4303 (SVE_VL_MIN): Likewise.
4304 (SVE_VL_MAX): Likewise.
4305 (SVE_NUM_ZREGS): Likewise.
4306 (SVE_NUM_PREGS): Likewise.
4307 (sve_vl_valid): Likewise.
4308 (struct user_sve_header): Likewise.
4310 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
4311 Richard Bunt <Richard.Bunt@arm.com>
4313 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4314 was requested by GDB.
4316 2018-06-15 Tom de Vries <tdevries@suse.de>
4318 * MAINTAINERS (Write After Approval): Add Tom de Vries.
4320 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
4322 * gnulib/update-gnulib.sh: Print expected versions of
4325 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
4327 * arch-utils.c (default_type_align): Use type_length_units.
4328 * gdbtypes.c (type_align): Use type_length_units.
4330 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4332 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4333 of 'define' command.
4335 2018-06-14 Tom de Vries <tdevries@suse.de>
4338 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4339 get_no_prettyformat_print_options.
4341 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
4343 * sparc-nat.h: Include target.h.
4344 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4345 <fetch_registers>: Remove this argument in function call.
4346 <store_registers>: Remove this argument in function call, remove
4348 <low_forget_process>: Call sparc64_forget_process instead of
4349 sparc_forget_process.
4351 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4353 * procfs.c (_initialize_procfs): Use add_inf_child_target.
4354 (procfs_target::make_corefile_notes): Adjust to new
4355 target_read_alloc return type.
4357 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4358 Stephen Roberts <stephen.roberts@arm.com>
4361 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4362 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4363 Move should_notify_stop local into more inner scope.
4365 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4366 Stephen Roberts <stephen.roberts@arm.com>
4369 * infrun.c (resume_1): Add call to mark_async_event_handler.
4371 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4373 * infrun.c (do_target_wait): Change old version of $pc printed.
4375 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
4377 * dwarf2read.c (read_index_from_section): Rename to...
4378 (read_gdb_index_from_section): ... this, update all callers.
4379 (dwarf2_read_index): Rename to...
4380 (dwarf2_read_gdb_index): ... this, update all callers.
4382 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
4384 * gdb/hppa-linux-nat.c
4385 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4386 hppa_linux_nat_target::fetch_registers.
4388 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4390 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4391 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4392 (AARCH64_DWARF_SVE_FFR): Likewise.
4393 (AARCH64_DWARF_SVE_P0): Likewise.
4394 (AARCH64_DWARF_SVE_Z0): Likewise.
4396 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4398 * common/common-regcache.h (raw_compare): New function.
4399 * regcache.c (regcache::raw_compare): Likewise.
4400 * regcache.h (regcache::raw_compare): New declaration.
4402 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4404 * common/common-regcache.h (reg_buffer_common): New structure.
4405 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4406 (reg_buffer::raw_supply): Likewise.
4407 (reg_buffer::raw_supply_integer): Likewise.
4408 (reg_buffer::raw_supply_zeroed): Likewise.
4409 (reg_buffer::raw_collect): Likewise.
4410 (reg_buffer::raw_collect_integer): Likewise.
4411 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4412 (reg_buffer::raw_supply): Likewise.
4413 (reg_buffer::raw_supply_integer): Likewise.
4414 (reg_buffer::raw_supply_zeroed): Likewise.
4415 (reg_buffer::raw_collect): Likewise.
4416 (reg_buffer::raw_collect_integer): Likewise.
4418 2018-06-10 Tom Tromey <tom@tromey.com>
4420 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
4421 (class remote_state) <stop_reply_queue>: Now std::vector.
4422 (remote_state::~remote_state)
4423 (remote_target::stop_reply_queue_length): Update.
4424 (struct queue_iter_param, remove_child_of_pending_fork)
4425 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4426 (check_pending_event_prevents_wildcard_vcont_callback)
4427 (remove_stop_reply_for_inferior)
4428 (remove_stop_reply_of_remote_state)
4429 (remote_notif_remove_once_on_match)
4430 (stop_reply_match_ptid_and_ws)
4431 (remote_kill_child_of_pending_fork): Remove.
4432 (remote_target::remove_new_fork_children)
4433 (remote_target::check_pending_events_prevent_wildcard_vcont)
4434 (remote_target::discard_pending_stop_replies)
4435 (remote_target::discard_pending_stop_replies_in_queue)
4436 (remote_target::remote_notif_remove_queued_reply)
4437 (remote_target::queued_stop_reply)
4438 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4439 (remote_target::wait, remote_target::kill_new_fork_children)
4440 (remote_target::async): Update.
4442 2018-06-10 Tom Tromey <tom@tromey.com>
4444 * record-full.c (record_full_arch_list_cleanups): Remove.
4445 (record_full_message): Use try/catch.
4446 (record_full_wait_cleanups): Remove.
4447 (record_full_wait_1): Use try/catch.
4448 (record_full_restore): Likewise.
4450 2018-06-10 Tom Tromey <tom@tromey.com>
4452 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
4453 declare VEC. Add constructor.
4454 <in_target_beneath>: Now bool.
4455 (record_full_breakpoints): Now a std::vector, static.
4456 (record_full_sync_record_breakpoints)
4457 (record_full_init_record_breakpoints)
4458 (record_full_target::insert_breakpoint)
4459 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
4461 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
4463 * dwarf2read.c (process_cu_includes): Remove struct keyword.
4464 * serial.c (serial_interface_lookup): Remove struct keyword.
4466 2018-06-10 Tom Tromey <tom@tromey.com>
4468 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4470 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4472 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4474 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4475 "beneath" as a method.
4476 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4477 Use "beneath" as a method.
4479 2018-06-10 Tom Tromey <tom@tromey.com>
4481 * tracefile.c (struct trace_file_writer_deleter): New.
4482 <operator()>: Rename from trace_file_writer_xfree.
4483 (trace_file_writer_up): New typedef.
4484 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4486 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4488 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4489 <m_registers, m_register_status>: Change type to
4491 * regcache.c (reg_buffer::reg_buffer): Use new instead of
4494 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4496 * common/common-regcache.h (enum register_status): Add
4497 underlying type "signed char".
4498 * regcache.h (reg_buffer) <m_register_status>: Change type to
4500 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4501 register_status instead of signed char.
4502 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4503 (reg_buffer::get_register_status): Remove cast.
4504 (readable_regcache::raw_read): Remove cast.
4505 (readable_regcache::cooked_read): Remove cast.
4507 2018-06-09 Tom Tromey <tom@tromey.com>
4509 * source.c (reverse_search_command, forward_search_command): Use
4512 2018-06-09 Tom Tromey <tom@tromey.com>
4514 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
4515 (serial_ops_list): Now static, std::vector.
4516 (serial_interface_lookup, serial_add_interface): Update.
4518 2018-06-09 Tom Tromey <tom@tromey.com>
4520 * dwarf2read.c (process_cu_includes): Update.
4521 (process_full_comp_unit): Update.
4522 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4525 2018-06-08 Paul Koning <paul_koning@dell.com>
4529 * python/python.c (do_start_initialization):
4530 Avoid call to internal Python API.
4531 (init__gdb_module): New function.
4533 2018-06-08 Gary Benson <gbenson@redhat.com>
4535 * linux-thread-db.c (valprint.h): New include.
4536 (struct check_thread_db_info): New structure.
4537 (check_thread_db_on_load, tdb_testinfo): New static globals.
4538 (check_thread_db, check_thread_db_callback): New functions.
4539 (try_thread_db_load_1): Run integrity checks if requested.
4540 (maintenance_check_libthread_db): New function.
4541 (_initialize_thread_db): Register "maint check libthread-db"
4542 and "maint set/show check-libthread-db".
4543 * NEWS: Mention the above new commands.
4545 2018-06-08 Tom Tromey <tom@tromey.com>
4547 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4550 2018-06-08 Tom Tromey <tom@tromey.com>
4552 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4554 2018-06-08 Tom Tromey <tom@tromey.com>
4556 * common/btrace-common.h (struct btrace_data): Add constructor,
4557 destructor, move assignment operator.
4558 <empty, clear, fini>: New methods.
4559 <format>: Initialize.
4560 (btrace_data_init, btrace_data_fini, btrace_data_clear)
4561 (btrace_data_empty): Don't declare.
4562 * common/btrace-common.c (btrace_data_init): Remove.
4563 (btrace_data::fini): Rename from btrace_data_fini.
4564 (btrace_data::empty): Rename from btrace_data_empty.
4565 (btrace_data::clear): Rename from btrace_data_clear. Return
4567 * btrace.h (make_cleanup_btrace_data): Don't declare.
4568 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4569 (parse_xml_btrace): Update.
4570 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4571 (maint_btrace_clear_packet_history_cmd): Update.
4573 2018-06-07 Pedro Alves <palves@redhat.com>
4575 * target.h (target_ops) <beneath>: Now a method. All references
4577 (class target_stack): New.
4578 * target.c (g_target_stack): New.
4579 (g_current_top_target): Delete.
4580 (current_top_target): Get the top target out of g_target_stack.
4581 (target_stack::push, target_stack::unpush): New.
4582 (push_target, unpush_target): Reimplement.
4583 (target_is_pushed): Reimplement in terms of g_target_stack.
4584 (target_ops::beneath, target_stack::find_beneath): New.
4586 2018-06-07 Pedro Alves <palves@redhat.com>
4588 * target.h (find_target_beneath): Delete declaration.
4589 * target.c (find_target_beneath): Delete definition.
4590 * aix-thread.c: All callers of find_target_beneath adjusted to
4591 call target_ops::beneath instead.
4592 * bsd-uthread.c: Likewise.
4593 * linux-thread-db.c: Likewise.
4594 * ravenscar-thread.c: Likewise.
4595 * sol-thread.c: Likewise.
4596 * spu-multiarch.c: Likewise.
4598 2018-06-07 Pedro Alves <palves@redhat.com>
4600 * target.h (target_ops) <beneath>: Now a method. All references
4602 (target_ops) <m_beneath>: New.
4603 * target.c (target_ops::beneath): New.
4604 * corelow.c: Adjust all references to target_ops::beneath.
4605 * linux-thread-db.c: Likewise.
4606 * make-target-delegates: Likewise.
4607 * record-btrace.c: Likewise.
4608 * record-full.c: Likewise.
4609 * remote.c: Likewise.
4610 * target.c: Likewise.
4611 * target-delegates.c: Regenerate.
4613 2018-06-07 Pedro Alves <palves@redhat.com>
4615 * target.h (target_stack): Delete.
4616 (current_top_target): Declare function.
4617 * target.c (target_stack): Delete.
4618 (g_current_top_target): New.
4619 (current_top_target): New function.
4620 * auxv.c: Use current_top_target instead of target_stack
4622 * avr-tdep.c: Likewise.
4623 * breakpoint.c: Likewise.
4624 * corefile.c: Likewise.
4625 * elfread.c: Likewise.
4627 * exceptions.c: Likewise.
4628 * frame.c: Likewise.
4629 * gdbarch-selftests.c: Likewise.
4630 * gnu-v3-abi.c: Likewise.
4631 * ia64-tdep.c: Likewise.
4632 * ia64-vms-tdep.c: Likewise.
4633 * infcall.c: Likewise.
4634 * infcmd.c: Likewise.
4635 * infrun.c: Likewise.
4636 * linespec.c: Likewise.
4637 * linux-tdep.c: Likewise.
4638 * minsyms.c: Likewise.
4639 * ppc-linux-nat.c: Likewise.
4640 * ppc-linux-tdep.c: Likewise.
4641 * procfs.c: Likewise.
4642 * regcache.c: Likewise.
4643 * remote.c: Likewise.
4644 * rs6000-tdep.c: Likewise.
4645 * s390-linux-nat.c: Likewise.
4646 * s390-tdep.c: Likewise.
4647 * solib-aix.c: Likewise.
4648 * solib-darwin.c: Likewise.
4649 * solib-dsbt.c: Likewise.
4650 * solib-spu.c: Likewise.
4651 * solib-svr4.c: Likewise.
4652 * solib-target.c: Likewise.
4653 * sparc-tdep.c: Likewise.
4654 * sparc64-tdep.c: Likewise.
4655 * spu-tdep.c: Likewise.
4656 * symfile.c: Likewise.
4657 * symtab.c: Likewise.
4658 * target-descriptions.c: Likewise.
4659 * target-memory.c: Likewise.
4660 * target.c: Likewise.
4661 * target.h: Likewise.
4662 * tracefile-tfile.c: Likewise.
4663 * tracepoint.c: Likewise.
4664 * valops.c: Likewise.
4665 * valprint.c: Likewise.
4666 * value.c: Likewise.
4667 * windows-tdep.c: Likewise.
4668 * mi/mi-main.c: Likewise.
4670 2018-06-07 Tom Tromey <tom@tromey.com>
4672 * valprint.h (build_address_symbolic): Declare.
4673 * printcmd.c (print_address_symbolic): Update.
4674 (build_address_symbolic): Change "name" and "filename" to
4676 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4678 * defs.h (build_address_symbolic): Remove declaration.
4680 2018-06-07 Alan Hayward <alan.hayward@arm.com>
4682 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4683 (aarch64_vnv_type): Add function.
4684 (aarch64_pseudo_register_name): Add V regs for SVE.
4685 (aarch64_pseudo_register_type): Likewise.
4686 (aarch64_pseudo_register_reggroup_p): Likewise.
4687 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4688 (aarch64_pseudo_read_value): Add V regs for SVE.
4689 (aarch64_pseudo_write_2): Use V0 offset for SVE
4690 (aarch64_pseudo_write): Add V regs for SVE.
4691 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4693 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
4695 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4696 (sve_vl_from_vq): Likewise.
4698 2018-06-05 Tom Tromey <tom@tromey.com>
4700 * cli/cli-cmds.c (show_version): Update.
4701 * top.c (print_gdb_version): Add "interactive" parameter.
4703 * main.c (captured_main_1): Update.
4704 * top.h (print_gdb_version): Add "interactive" parameter and a
4707 2018-06-05 David Malcolm <dmalcolm@redhat.com>
4709 * common/enum-flags.h: Add trailing semicolon to example in
4712 2018-06-05 Tom Tromey <tom@tromey.com>
4715 * NEWS: Add entry about pager.
4716 * utils.c (pagination_disabled_for_command): New global.
4717 (prompt_for_continue): Allow "c" response to prompt.
4718 (reinitialize_more_filter): Clear
4719 pagination_disabled_for_command.
4720 (fputs_maybe_filtered): Check pagination_disabled_for_command.
4722 2018-06-04 Tom Tromey <tom@tromey.com>
4724 * ada-lang.h (ada_lookup_symbol_list): Update.
4725 * ada-lang.c (resolve_subexp): Update.
4726 (symbols_are_identical_enums): Change type of syms. Remove nsyms
4728 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4729 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4730 results parameter to std::vector.
4731 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4733 * ada-exp.y (block_lookup): Update.
4734 (select_possible_type_sym): Change type of syms. Remove nsyms
4736 (write_var_or_type, write_name_assoc): Update.
4738 2018-06-04 Joel Brobecker <brobecker@adacore.com>
4740 * windows-nat.c (windows_nat_target::xfer_partial): Return
4741 TARGET_XFER_E_IO if we need to delegate to the target beneath
4742 but BENEATH is NULL.
4744 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
4746 * Makefile.in (config.status): Add configure.nat as a
4749 2018-06-04 Tom Tromey <tom@tromey.com>
4751 * cp-name-parser.y (cpname_state): Add method declarations.
4752 (HANDLE_QUAL): Update.
4753 (cpname_state::d_grab, cpname_state::fill_comp)
4754 (cpname_state::make_operator, cpname_state::make_dtor)
4755 (cpname_state::make_builtin_type, cpname_state::make_name)
4756 (cpname_state::d_qualify, cpname_state::d_int_type)
4757 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4758 (%union): Move earlier.
4760 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4762 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4764 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4766 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4767 (aarch64_pseudo_write_1): Likewise.
4768 (aarch64_pseudo_read_value): Use helper.
4769 (aarch64_pseudo_write): Likewise.
4771 2018-06-04 Pedro Alves <palves@redhat.com>
4773 * darwin-nat.c (darwin_ops): Delete.
4774 (darwin_attach_pid): Use get_native_target.
4776 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4778 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4779 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4781 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4783 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4784 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4785 (aarch64_gdbarch_init): Check for SVE.
4786 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4788 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4790 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4791 * aarch64-tdep.h (aarch64_read_description): Likewise.
4792 * arch/aarch64.c (aarch64_create_target_description): Likewise.
4793 * arch/aarch64.h (aarch64_create_target_description): Likewise.
4794 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4795 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4796 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4798 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
4800 * value.c (value_fetch_lazy_bitfield): New.
4801 (value_fetch_lazy_memory): New.
4802 (value_fetch_lazy_register): New.
4803 (value_fetch_lazy): Factor out to smaller functions.
4805 2018-06-01 Tom Tromey <tom@tromey.com>
4807 * cp-name-parser.y (backslashable, represented): Now const.
4809 2018-06-01 Tom Tromey <tom@tromey.com>
4811 * cp-name-parser.y: Include parser-defs.h.
4812 (parser_fprintf): Remove declaration.
4814 2018-06-01 Tom Tromey <tom@tromey.com>
4816 * cp-name-parser.y: Use %pure-parser, %lex-param, and
4818 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4819 (global_result): Remove globals.
4820 (struct cpname_state): New.
4821 (yyparse): Don't declare.
4822 (yylex, yyerror): Move declarations after %union.
4823 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4824 (make_name): Add state parameter.
4826 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4828 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4830 (yylex): Add lvalp, state parameters.
4831 (yyerror): Add state parameter.
4832 (cp_demangled_name_to_comp): Update.
4834 2018-06-01 Tom Tromey <tom@tromey.com>
4836 * cp-name-parser.y (parser_fprintf): Declare.
4837 (GDB_YY_REMAP_PREFIX): Define.
4838 Include yy-remap.h. Don't redefine yy* identifiers.
4840 2018-06-01 Tom Tromey <tom@tromey.com>
4842 * python/py-type.c (typy_legacy_template_argument): Update.
4843 * cp-support.h (cp_demangled_name_to_comp): Update.
4844 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4845 parameter to be a "std::string *".
4848 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
4850 * ada-lex.l: Include "diagnostics.h" instead of
4851 "common/diagnostics.h".
4852 * unittests/environ-selftests.c: Likewise.
4853 * common/diagnostics.h: Moved to ../include.
4855 2018-06-01 Joel Brobecker <brobecker@adacore.com>
4857 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4858 to language_mode_manual while calling breakpoint_re_set_one.
4860 2018-06-01 Tom Tromey <tom@tromey.com>
4862 * valops.c (value_cast_structs, destructor_name_p): Update.
4863 * symtab.c (gdb_mangle_name): Update.
4864 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4866 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4867 (pascal_object_print_value_fields, pascal_object_print_value):
4869 * p-typeprint.c (pascal_type_print_derivation_info): Update.
4870 * linespec.c (find_methods): Update.
4871 * gdbtypes.h (type_name_no_tag): Remove.
4872 (type_name_or_error): Rename from type_name_no_tag_or_error.
4873 * gdbtypes.c (type_name_no_tag): Remove.
4874 (type_name_or_error): Rename from type_name_no_tag_or_error.
4875 (lookup_struct_elt_type, check_typedef): Update.
4876 * expprint.c (print_subexp_standard): Update.
4877 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4878 * d-namespace.c (d_lookup_nested_symbol): Update.
4879 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4880 (cp_print_class_member): Update.
4881 * cp-namespace.c (cp_lookup_nested_symbol): Update.
4882 * completer.c (add_struct_fields): Update.
4883 * c-typeprint.c (cp_type_print_derivation_info)
4884 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4886 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4887 (ada_prefer_type, ada_is_exception_sym): Update.
4889 2018-06-01 Tom Tromey <tom@tromey.com>
4891 * valops.c (enum_constant_from_type, value_namespace_elt)
4892 (value_maybe_namespace_elt): Update.
4893 * valarith.c (find_size_for_pointer_math): Update.
4894 * target-descriptions.c (make_gdb_type): Update.
4895 * symmisc.c (print_symbol): Update.
4896 * stabsread.c (define_symbol, read_type)
4897 (complain_about_struct_wipeout, add_undefined_type)
4898 (cleanup_undefined_types_1): Update.
4899 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4900 (rust_range_type_p, val_print_struct, rust_print_struct_def)
4901 (rust_internal_print_type, rust_composite_type)
4902 (rust_evaluate_funcall, rust_evaluate_subexp)
4903 (rust_inclusive_range_type_p): Update.
4904 * python/py-type.c (typy_get_tag): Update.
4905 * p-typeprint.c (pascal_type_print_base): Update.
4906 * mdebugread.c (parse_symbol, parse_type): Update.
4907 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4909 * guile/scm-type.c (gdbscm_type_tag): Update.
4910 * go-lang.c (sixg_string_p): Update.
4911 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4913 * gdbtypes.h (struct main_type) <tag_name>: Remove.
4914 (TYPE_TAG_NAME): Remove.
4915 * gdbtypes.c (type_name_no_tag): Simplify.
4916 (check_typedef, check_types_equal, recursive_dump_type)
4917 (copy_type_recursive, arch_composite_type): Update.
4918 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
4919 in summary mode when needed.
4920 * eval.c (evaluate_funcall): Update.
4921 * dwarf2read.c (fixup_go_packaging, read_structure_type)
4922 (process_structure_scope, read_enumeration_type)
4923 (read_namespace_type, read_module_type, determine_prefix): Update.
4924 * cp-support.c (inspect_type): Update.
4925 * coffread.c (process_coff_symbol, decode_base_type): Update.
4926 * c-varobj.c (c_is_path_expr_parent): Update.
4927 * c-typeprint.c (c_type_print_base_struct_union): Update.
4928 (c_type_print_base_1): Update. Print struct/class/union/enum in
4929 summary when using C language.
4930 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4931 (gen_maybe_namespace_elt): Update.
4932 * ada-lang.c (ada_type_name): Simplify.
4933 (empty_record, ada_template_to_fixed_record_type_1)
4934 (template_to_static_fixed_type)
4935 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4937 2018-06-01 Tom Tromey <tom@tromey.com>
4939 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4941 * c-typeprint.c (c_print_type_1): Add "language" parameter.
4942 (c_print_type): Update.
4943 (c_print_type): New overload.
4944 (c_type_print_varspec_prefix, c_type_print_args)
4945 (c_type_print_varspec_suffix, c_print_type_no_offsets)
4946 (c_type_print_base_struct_union, c_type_print_base_1)
4947 (cp_type_print_method_args): Add "language" parameter.
4948 (c_type_print_base): Update.
4949 * c-lang.h (c_print_type): Add new overload.
4951 2018-06-01 Tom Tromey <tom@tromey.com>
4953 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4954 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4956 2018-06-01 Alan Hayward <alan.hayward@arm.com>
4958 * aarch64-tdep.c (aarch64_sve_register_names): New const
4960 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4961 (AARCH64_SVE_Z_REGS_NUM): New define.
4962 (AARCH64_SVE_P_REGS_NUM): Likewise.
4963 (AARCH64_SVE_NUM_REGS): Likewise.
4965 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4967 * nat/linux-ptrace.h [__alpha__]
4968 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4971 2018-05-31 Maciej W. Rozycki <macro@mips.com>
4973 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4974 the endianness selected.
4975 * NEWS: Document `set endian auto' mode operation update.
4977 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4979 * Makefile.in: Add new header.
4980 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4981 (sve_vl_from_vg): Likewise.
4982 (sve_vq_from_vl): Likewise.
4983 (sve_vl_from_vq): Likewise.
4984 (sve_vq_from_vg): Likewise.
4985 (sve_vg_from_vq): Likewise.
4986 * configure.nat: Add new c file.
4987 * nat/aarch64-sve-linux-ptrace.c: New file.
4988 * nat/aarch64-sve-linux-ptrace.h: New file.
4990 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4992 * aarch64-linux-nat.c (aarch64_linux_read_description):
4994 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4996 * aarch64-tdep.c (tdesc_aarch64_list): Add.
4997 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4998 (aarch64_gdbarch_init): Add parmeter zero.
4999 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5000 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5001 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5003 * doc/gdb.texinfo: Describe SVE feature
5004 * features/aarch64-sve.c: New file.
5006 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
5009 * gdbarch.sh (significant_addr_bit): Default to zero when
5010 not set by target architecture.
5011 * gdbarch.c: Re-generated.
5012 * utils.c (address_significant): Update.
5014 2018-05-30 Joel Brobecker <brobecker@adacore.com>
5016 * stack.c (func_command): Remove trailing newline in call to error.
5018 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5020 * regcache.h (regcache_raw_collect): Remove, update callers to
5021 use regcache::raw_collect.
5022 * regcache.c (regcache_raw_collect): Remove.
5024 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5026 * regcache.h (regcache_raw_supply): Remove, update callers to
5027 use detached_regcache::raw_supply.
5028 * regcache.c (regcache_raw_supply): Remove.
5030 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5032 * regcache.h (regcache_cooked_write_part): Remove, update
5033 callers to use regcache::cooked_write_part.
5034 * regcache.c (regcache_cooked_write_part): Remove.
5036 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5038 * regcache.h (regcache_cooked_read_part): Remove, update callers
5039 to use readable_regcache::cooked_read_part.
5040 * regcache.c (regcache_cooked_read_part): Remove.
5042 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5044 * regcache.h (regcache_cooked_read_value): Remove, update
5045 callers to use readable_regcache::cooked_read_value.
5046 * regcache.c (regcache_cooked_read_value): Remove.
5048 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5050 * regcache.h (regcache_cooked_write): Remove, update callers to
5051 use regcache::cooked_write.
5052 * regcache.c (regcache_cooked_write): Remove.
5054 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5056 * regcache.h (regcache_invalidate): Remove, update callers to
5057 use detached_regcache::invalidate instead.
5058 * regcache.c (regcache_invalidate): Remove.
5060 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5062 * regcache.h (regcache_raw_write_part): Remove, update callers
5063 to use regcache::raw_write_part instead.
5064 * regcache.c (regcache_raw_write_part): Remove.
5066 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5068 * regcache.h (regcache_raw_read_part): Remove, update callers to
5069 use readable_regcache::raw_read_part instead.
5070 * regcache.c (regcache_raw_read_part): Remove.
5072 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5074 * regcache.h (regcache_cooked_read): Remove, update callers to
5075 use readable_regcache::cooked_read instead.
5076 * regcache.c (regcache_cooked_read): Remove.
5078 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5080 * regcache.h (regcache_raw_write): Remove, update callers to use
5081 regcache::raw_write instead.
5082 * regcache.c (regcache_raw_write): Remove.
5084 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5086 * regcache.h (regcache_raw_read): Remove, update callers to use
5087 readable_regcache::raw_read instead.
5088 * regcache.c (regcache_raw_read): Remove.
5090 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5092 * regcache.h (regcache_raw_update): Remove, update callers to
5093 use readable_regcache::raw_update instead.
5094 * regcache.c (regcache_raw_update): Remove.
5096 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5098 * regcache.h (regcache_register_status): Remove, update callers
5099 to use reg_buffer::get_register_status directly instead.
5100 * regcache.c (regcache_register_status): Remove.
5102 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5104 * regcache.h (regcache_get_ptid): Remove, update all callers to
5105 call regcache::ptid instead.
5106 * regcache.c (regcache_get_ptid): Remove.
5108 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5110 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5112 2018-05-30 Pedro Alves <palves@redhat.com>
5114 * common/common-exceptions.h (exception_rethrow): Use
5117 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
5119 * breakpoint.c (print_solib_event, check_status_catch_solib):
5120 Remove struct keyword in range-based for loops.
5121 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5122 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5124 * linespec.c (find_superclass_methods, search_minsyms_for_name):
5126 * symfile.c (addr_info_make_relative): Likewise.
5127 * thread.c (value_in_thread_stack_temporaries): Likewise.
5129 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
5132 * valops.c (value_struct_elt_for_reference): Call check_typedef on
5133 aggregate type to get its real type before accessing it.
5135 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
5137 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5138 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5139 * coff-pe-read.c (add_pe_forwarded_sym): Replace
5140 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5141 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5142 * jit.c (jit_breakpoint_re_set_internal): Likewise.
5143 * printcmd.c (info_address_command): Likewise.
5145 2018-05-29 Tom Tromey <tom@tromey.com>
5147 * windows-nat.c (handle_exception): Update fall-through comment.
5149 2018-05-29 Tom Tromey <tom@tromey.com>
5151 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
5152 (struct program_space) <added_solibs>: Now a std::vector.
5153 * breakpoint.c (print_solib_event): Update.
5154 (check_status_catch_solib): Update.
5155 * progspace.c (clear_program_space_solib_cache): Update.
5156 * solib.c (update_solib_list): Update.
5158 2018-05-29 Tom Tromey <tom@tromey.com>
5160 * python/py-type.c (typy_richcompare): Update.
5161 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5162 * gdbtypes.h (types_deeply_equal): Return bool.
5163 (types_equal): Likewise.
5164 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
5166 (check_types_equal): Change worklist to std::vector. Return
5168 (struct type_equality_entry): Add constructor.
5169 (compare_maybe_null_strings): Return bool.
5170 (check_types_worklist): Return bool. Change worklist to
5172 (types_deeply_equal): Use std::vector.
5173 (types_equal): Return bool.
5174 (compare_maybe_null_strings): Simplify.
5176 2018-05-29 Tom Tromey <tom@tromey.com>
5178 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
5180 2018-05-29 Tom Tromey <tom@tromey.com>
5182 * objc-lang.h: Don't include cp-support.h.
5183 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
5186 2018-05-27 Tom Tromey <tom@tromey.com>
5188 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5190 2018-05-25 Tom Tromey <tom@tromey.com>
5192 * value.c (value::location): Initialize.
5194 2018-05-25 Tom Tromey <tom@tromey.com>
5196 * dbxread.c (init_bincl_list): Remove.
5197 (bincl_list): Now a std::vector.
5198 (bincls_allocated, next_bincl): Remove.
5199 (free_bincl_list, do_free_bincl_list_cleanup)
5200 (make_cleanup_free_bincl_list): Remove.
5201 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5203 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5204 (struct header_file_location): Add constructor.
5205 (add_bincl_to_list): Remove.
5207 2018-05-25 Tom Tromey <tom@tromey.com>
5209 * tui/tui.c (tui_enable): Update.
5210 * mi/mi-interp.c (mi_interp::init): Update.
5211 * interps.h (class interp) <name>: New method.
5212 <m_name>: Rename from name.
5213 (~scoped_restore_interp): Update.
5214 * interps.c (interp::interp): Update.
5215 (interp_add, interp_set, interp_lookup_existing)
5216 (current_interp_named_p): Update.
5218 2018-05-25 Tom Tromey <tom@tromey.com>
5220 * interps.c (interp_name): Remove.
5221 * mi/mi-interp.c (mi_interp::init): Update.
5222 * interps.h (interp_name): Remove.
5223 (~scoped_restore_interp): Update.
5224 * tui/tui.c (tui_enable): Update.
5226 2018-05-25 Tom Tromey <tom@tromey.com>
5228 * utils.c (fputs_maybe_filtered): Update.
5229 * linespec.c (decode_line_full): Update.
5230 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5231 (mi_print_breakpoint_for_event, mi_solib_loaded)
5232 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5233 (mi_user_selected_context_changed): Update.
5234 * mi/mi-main.c (mi_execute_command): Update.
5235 * cli/cli-script.c (execute_control_command): Update.
5236 * python/python.c (execute_gdb_command): Update.
5237 * solib.c (info_sharedlibrary_command): Update.
5238 * interps.c (interp_ui_out): Remove.
5239 * interps.h (interp_ui_out): Remove.
5241 2018-05-25 Tom Tromey <tom@tromey.com>
5243 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5244 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5245 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5247 2018-05-25 Tom Tromey <tom@tromey.com>
5249 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5250 * interps.c (interp_exec): Use scoped_restore.
5252 2018-05-25 Tom Tromey <tom@tromey.com>
5254 * remote.c (remote_target::remote_file_get): Use
5256 (remote_target::remote_file_put): Likewise.
5258 2018-05-25 Tom Tromey <tom@tromey.com>
5260 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5262 (get_pe_section_index, add_pe_exported_sym): Update.
5263 (read_pe_exported_syms): Use gdb::def_vector.
5265 2018-05-25 Tom Tromey <tom@tromey.com>
5267 * frame.c (remove_prev_frame): Remove.
5268 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5270 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5272 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5274 * mips-linux-nat.c (supply_fpregset): Always call
5275 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5276 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5277 `mips_fill_fpregset'.
5278 * mips-linux-tdep.c (mips_supply_fpregset)
5279 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5280 (mips_fill_fpregset_wrapper): Remove functions.
5281 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5282 (mips_linux_fpregset): Remove variable.
5283 (mips_linux_iterate_over_regset_sections): Use
5284 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5285 (mips_linux_o32_sigframe_init): Remove comment.
5287 2018-05-25 Pedro Alves <palves@redhat.com>
5289 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5290 (struct readahead_cache, struct packet_reg, struct
5291 remote_arch_state, class remote_state): Move higher up in the
5293 (remote_target::m_remote_state): Now an object instead of a pointer.
5294 (remote_target::get_remote_state): Adjust.
5296 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5298 * stack.c (select_and_print_frame): Delete.
5299 (struct function_bounds): Move struct within function.
5300 (func_command): Most content moved into new function
5301 find_frame_for_function, use new function, print result, add
5303 (find_frame_for_function): New function, now returns a result.
5305 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5307 * stack.c (iterate_over_block_arg_vars): Fix comment.
5308 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5310 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5314 (scoped_restore_selected_frame::scoped_restore_selected_frame):
5316 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5318 * frame.h (class scoped_restore_selected_frame): New class.
5319 * stack.c (print_frame_local_vars): Remove catching and rethrowing
5320 of any exception, use scoped_restore_selected_frame to restore the
5323 2018-05-24 Pedro Alves <palves@redhat.com>
5325 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5328 2018-05-23 Tom Tromey <tom@tromey.com>
5330 * complaints.c (struct complaints): Remove.
5331 (symfile_complaint_book): Remove.
5332 (series): New global.
5333 (complaint_internal): Update.
5334 (clear_complaints): Update.
5336 2018-05-23 Tom Tromey <tom@tromey.com>
5338 * complaints.c (counters): New global.
5339 (struct complain): Remove.
5340 (struct complaints) <root>: Remove.
5341 (complaint_sentinel): Remove.
5342 (symfile_complaint_book): Update.
5343 (find_complaint) Remove.
5344 (complaint_internal, clear_complaints): Update.
5346 2018-05-23 Tom Tromey <tom@tromey.com>
5348 * complaints.c (struct complain) <file, line>: Remove.
5349 (find_complaint): Remove file, line parameters.
5350 (complaint_internal): Update.
5352 2018-05-23 Tom Tromey <tom@tromey.com>
5354 * complaints.c (vcomplaint): Remove.
5355 (complaint_internal) Merge in contents of vcomplaint.
5357 2018-05-23 Tom Tromey <tom@tromey.com>
5359 * complaints.c (struct complaints) <explanation>: Remove.
5360 (symfile_explanations): Remove.
5361 (symfile_complaint_book): Update.
5362 (vcomplaint): Update.
5363 (struct explanation): Remove.
5365 2018-05-23 Tom Tromey <tom@tromey.com>
5367 * complaints.c (symfile_complaints): Remove.
5368 (complaint_internal): Remove "complaints" parameter.
5369 (clear_complaints, vcomplaint): Remove "c" parameter.
5370 (get_complaints): Remove.
5371 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5372 (dwarf2_debug_line_missing_file_complaint)
5373 (dwarf2_debug_line_missing_end_sequence_complaint)
5374 (dwarf2_complex_location_expr_complaint)
5375 (dwarf2_const_value_length_mismatch_complaint)
5376 (dwarf2_section_buffer_overflow_complaint)
5377 (dwarf2_macro_malformed_definition_complaint)
5378 (dwarf2_invalid_attrib_class_complaint)
5379 (create_addrmap_from_index, dw2_symtab_iter_next)
5380 (dw2_expand_marked_cus)
5381 (dw2_debug_names_iterator::find_vec_in_debug_names)
5382 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5383 (create_debug_type_hash_table, init_cutu_and_read_dies)
5384 (partial_die_parent_scope, add_partial_enumeration)
5385 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5386 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5387 (read_import_statement, read_file_scope, create_dwo_cu_reader)
5388 (create_cus_hash_table, create_dwp_hash_table)
5389 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5390 (dwarf2_rnglists_process, dwarf2_ranges_process)
5391 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5392 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5393 (handle_struct_member_die, process_structure_scope)
5394 (read_array_type, read_common_block, read_module_type)
5395 (read_tag_pointer_type, read_typedef, read_base_type)
5396 (read_subrange_type, load_partial_dies, partial_die_info::read)
5397 (partial_die_info::read, partial_die_info::read)
5398 (partial_die_info::read, read_checked_initial_length_and_offset)
5399 (dwarf2_string_attr, read_formatted_entries)
5400 (dwarf_decode_line_header)
5401 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5402 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5403 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5404 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5405 (get_signatured_type, get_DW_AT_signature_type)
5406 (decode_locdesc, file_file_name, consume_improper_spaces)
5407 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5408 (dwarf_decode_macro_bytes, dwarf_decode_macros)
5409 (dwarf2_symbol_mark_computed, set_die_type)
5410 (read_attribute_value): Update.
5411 * stap-probe.c (handle_stap_probe, get_stap_base_address):
5413 * dbxread.c (unknown_symtype_complaint)
5414 (lbrac_mismatch_complaint, repeated_header_complaint)
5415 (set_namestring, function_outside_compilation_unit_complaint)
5416 (read_dbx_symtab, process_one_symbol): Update.
5417 * gdbtypes.c (stub_noname_complaint): Update.
5418 * windows-nat.c (handle_unload_dll): Update.
5419 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5420 (decode_base_type): Update.
5421 * xcoffread.c (bf_notfound_complaint, ef_complaint)
5422 (eb_complaint, record_include_begin, record_include_end)
5423 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5424 (process_xcoff_symbol, read_symbol)
5425 (function_outside_compilation_unit_complaint)
5426 (scan_xcoff_symtab): Update.
5427 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5428 * buildsym.c (finish_block_internal, make_blockvector)
5429 (end_symtab_get_static_block, augment_type_symtab): Update.
5430 * dtrace-probe.c (dtrace_process_dof)
5431 (dtrace_static_probe_ops::get_probes): Update.
5432 * complaints.h (struct complaint): Don't declare.
5433 (symfile_complaints): Remove.
5434 (complaint_internal): Remove "complaints" parameter.
5435 (complaint): Likewise.
5436 (clear_complaints): Likewise.
5437 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5438 (reread_symbols): Update.
5439 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5440 (dwarf2_frame_cache, decode_frame_entry): Update.
5441 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5442 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5443 (info_selectors_command): Update.
5444 * macrotab.c (macro_include, check_for_redefinition)
5445 (macro_undef): Update.
5446 * objfiles.c (filter_overlapping_sections): Update.
5447 * stabsread.c (invalid_cpp_abbrev_complaint)
5448 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5449 (define_symbol, error_type, read_type, rs6000_builtin_type)
5450 (stabs_method_name_from_physname, read_member_functions)
5451 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5452 (attach_fields_to_type, complain_about_struct_wipeout)
5453 (read_range_type, read_args, common_block_start)
5454 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5456 * mdebugread.c (index_complaint, unknown_ext_complaint)
5457 (basic_type_complaint, bad_tag_guess_complaint)
5458 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5459 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5460 (parse_procedure, parse_lines)
5461 (function_outside_compilation_unit_complaint)
5462 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5463 (bad_tag_guess_complaint, reg_value_complaint): Update.
5464 * cp-support.c (demangled_name_complaint): Update.
5465 * macroscope.c (sal_macro_scope): Update.
5466 * dwarf-index-write.c (class debug_names): Update.
5468 2018-05-23 Tom Tromey <tom@tromey.com>
5470 * complaints.c (clear_complaints): Remove "noisy" parameter.
5471 * complaints.h (clear_complaints): Update.
5472 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5473 (reread_symbols): Update.
5475 2018-05-23 Tom Tromey <tom@tromey.com>
5477 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5479 (vcomplaint, clear_complaints): Update.
5480 (symfile_explanations): Remove some messages.
5482 2018-05-23 Tom Tromey <tom@tromey.com>
5484 * complaints.c (internal_complaint): Remove.
5485 * complaints.h (internal_complaint): Remove.
5487 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5489 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5491 2018-05-22 Pedro Alves <palves@redhat.com>
5493 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5494 (remote_fileio_badfd, remote_fileio_return_errno)
5495 (remote_fileio_return_success, remote_fileio_func_open)
5496 (remote_fileio_func_open, remote_fileio_func_close)
5497 (remote_fileio_func_read, remote_fileio_func_write)
5498 (remote_fileio_func_lseek, remote_fileio_func_rename)
5499 (remote_fileio_func_unlink, remote_fileio_func_stat)
5500 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5501 (remote_fileio_func_isatty, remote_fileio_func_system): Add
5502 remote_target parameter.
5503 (remote_fio_func_map) <func>: Add remote_target parameter.
5504 (do_remote_fileio_request, remote_fileio_request):
5505 * remote-fileio.h (remote_fileio_request):
5506 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5507 remote_target parameter.
5508 (remote_notif_process, handle_notification): Adjust to pass down
5510 (remote_notif_state_allocate): Add remote_target parameter. Save
5512 * remote-notif.h (struct remote_target): Forward declare.
5513 (struct notif_client) <parse, ack, can_get_pending_events>: Add
5514 remote_target parameter.
5515 (struct remote_notif_state) <remote>: New field.
5516 (remote_notif_ack, remote_notif_parse): Add remote_target
5518 (remote_notif_state_allocate, remote_notif_state_allocate): Add
5519 remote_target parameter.
5520 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5521 (threads_listing_context, rmt_thread_action, protocol_feature)
5522 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5523 (packet_result, struct threads_listing_context, remote_state):
5524 Move definitions and declarations higher up.
5525 (remote_target) <~remote_target>: Declare.
5526 (remote_download_command_source, remote_file_put, remote_file_get)
5527 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5528 (remote_hostio_pread_vFile, remote_hostio_send_command)
5529 (remote_hostio_set_filesystem, remote_hostio_open)
5530 (remote_hostio_close, remote_hostio_unlink, remote_state)
5531 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5532 (get_memory_write_packet_size, get_memory_read_packet_size)
5533 (append_pending_thread_resumptions, remote_detach_1)
5534 (append_resumption, remote_resume_with_vcont)
5535 (add_current_inferior_and_thread, wait_ns, wait_as)
5536 (process_stop_reply, remote_notice_new_inferior)
5537 (process_initial_stop_replies, remote_add_thread)
5538 (btrace_sync_conf, remote_btrace_maybe_reopen)
5539 (remove_new_fork_children, kill_new_fork_children)
5540 (discard_pending_stop_replies, stop_reply_queue_length)
5541 (check_pending_events_prevent_wildcard_vcont)
5542 (discard_pending_stop_replies_in_queue, stop_reply)
5543 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5544 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5545 (remote_interrupt_as, remote_interrupt_ns)
5546 (remote_get_noisy_reply, remote_query_attached)
5547 (remote_add_inferior, remote_current_thread, get_current_thread)
5548 (set_thread, set_general_thread, set_continue_thread)
5549 (set_general_process, write_ptid)
5550 (remote_unpack_thread_info_response, remote_get_threadinfo)
5551 (parse_threadlist_response, remote_get_threadlist)
5552 (remote_threadlist_iterator, remote_get_threads_with_ql)
5553 (remote_get_threads_with_qxfer)
5554 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5555 (get_offsets, remote_check_symbols, remote_supported_packet)
5556 (remote_query_supported, remote_packet_size)
5557 (remote_serial_quit_handler, remote_detach_pid)
5558 (remote_vcont_probe, remote_resume_with_hc)
5559 (send_interrupt_sequence, interrupt_query)
5560 (remote_notif_get_pending_events, fetch_register_using_p)
5561 (send_g_packet, process_g_packet, fetch_registers_using_g)
5562 (store_register_using_P, store_registers_using_G)
5563 (set_remote_traceframe, check_binary_download)
5564 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5565 (remote_xfer_live_readonly_partial, remote_read_bytes)
5566 (remote_send_printf, remote_flash_write, readchar)
5567 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5568 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5569 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5570 (extended_remote_disable_randomization, extended_remote_run)
5571 (send_environment_packet, extended_remote_environment_support)
5572 (extended_remote_set_inferior_cwd, remote_write_qxfer)
5573 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5574 (packet_command): Now methods of ...
5575 (remote_target): ... this class.
5576 (m_remote_state) <remote_target>: New field.
5577 (struct remote_state) <stop_reply_queue,
5578 remote_async_inferior_event_token, wait_forever_enabled_p>: New
5580 (remote_state::remote_state): Allocate stop_reply_queue.
5581 (remote_state): Delete global.
5582 (get_remote_state_raw): Delete.
5583 (remote_target::get_remote_state): Allocate m_remote_state on
5585 (get_current_remote_target): New.
5586 (remote_ops, extended_remote_ops): Delete.
5587 (wait_forever_enabled_p, remote_async_inferior_event_token):
5588 Delete, moved to struct remote_state.
5589 (remote_target::close): Delete self. Destruction bits split to
5591 (remote_target::~remote_target): ... this.
5592 (show_memory_packet_size): Adjust to use
5593 get_current_remote_target.
5594 (struct protocol_feature) <func>: Add remote_target parameter.
5595 All callers adjusted.
5596 (curr_quit_handler_target): New.
5597 (remote_serial_quit_handler): Reimplement.
5598 (remote_target::open_1): Adjust to use get_current_remote_target.
5599 Heap-allocate remote_target/extended_remote_target instances.
5600 (vcont_builder::vcont_builder): Add remote_target parameter, and
5601 save it in m_remote. All callers adjusted.
5602 (vcont_builder::m_remote): New field.
5603 (vcont_builder::restart, vcont_builder::flush)
5604 (vcont_builder::push_action): Use it.
5605 (remote_target::commit_resume): Use it.
5606 (struct queue_iter_param) <remote>: New field.
5607 (remote_target::remove_new_fork_children): Fill in 'remote' field.
5608 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5609 (check_pending_event_prevents_wildcard_vcont_callback)
5610 (remote_target::check_pending_events_prevent_wildcard_vcont)
5611 (remote_target::discard_pending_stop_replies)
5612 (remote_target::discard_pending_stop_replies_in_queue)
5613 (remote_target::remote_notif_remove_queued_reply): Fill in
5615 (remote_notif_get_pending_events): New.
5616 (remote_target::readchar, remote_target::remote_serial_write):
5617 Save/restore curr_quit_handler_target.
5619 (kill_new_fork_children): Fill in 'remote' field.
5620 (packet_command): Use get_current_remote_target, defer to
5621 remote_target method of same name.
5622 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5623 parameter, and save it in m_remote. All callers adjusted.
5624 (scoped_remote_fd::release): Use m_remote.
5625 (scoped_remote_fd::m_remote): New field.
5626 (remote_file_put, remote_file_get, remote_file_delete): Use
5627 get_current_remote_target, defer to remote_target method of same
5629 (remote_btrace_reset): Add remote_state paremeter. Update all
5631 (remote_async_inferior_event_handler). Pass down 'data'.
5632 (remote_new_objfile): Use get_current_remote_target.
5633 (remote_target::vcont_r_supported): New.
5634 (set_range_stepping): Use get_current_remote_target and
5635 remote_target::vcont_r_supported.
5636 (_initialize_remote): Don't allocate 'remote_state' and
5637 'stop_reply_queue' globals.
5638 * remote.h (struct remote_target): Forward declare.
5639 (getpkt, putpkt, remote_notif_get_pending_events): Add
5640 'remote_target' parameter.
5642 2018-05-22 Pedro Alves <palves@redhat.com>
5644 * remote.c (vcont_builder): Now a class. Make all data members
5646 (vcont_builder) <vcont_builder, restart, flush, push_action>:
5648 (vcont_builder_restart): Rename to ...
5649 (vcont_builder::restart): ... this.
5650 (vcont_builder_flush): Rename to ...
5651 (vcont_builder::flush): ... this.
5652 (vcont_builder_push_action): Rename to ...
5653 (vcont_builder::push_action): ... this.
5654 (remote_target::commit_resume): Adjust.
5656 2018-05-22 Pedro Alves <palves@redhat.com>
5658 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5659 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5660 (get_fixed_memory_packet_size): New.
5661 (get_memory_packet_size): Use it.
5662 (set_memory_packet_size): Don't override the config size with
5663 DEFAULT_MAX_MEMORY_PACKET_SIZE.
5664 (show_memory_packet_size): Use get_fixed_memory_packet_size.
5665 Don't refer to get_memory_packet_size if not connected to a remote
5666 target. Show "(default)" if configured size is 0.
5668 2018-05-22 Pedro Alves <palves@redhat.com>
5670 * remote.c (remote_target::mourn_inferior): Move
5671 discard_pending_stop_replies call here from ...
5672 (_initialize_remote): ... here.
5674 2018-05-22 Pedro Alves <palves@redhat.com>
5676 * remote.c (compare_section_command): Remove set_general_process
5679 2018-05-22 Pedro Alves <palves@redhat.com>
5681 * remote.c (struct packet_reg, struct remote_arch_state):
5682 Move higher up in the file.
5683 (remote_state) <m_arch_states>: Store remote_arch_state values
5684 instead of remote_arch_state pointers.
5685 (remote_state::get_remote_arch_state): Adjust.
5687 2018-05-22 Pedro Alves <palves@redhat.com>
5689 * remote.c: Include <unordered_map>.
5690 (remote_state): Now a class.
5691 (remote_state) <get_remote_arch_state>: Declare method.
5692 <get_remote_arch_state>: New field.
5693 (remote_arch_state) <remote_arch_state>: Declare ctor.
5694 <regs>: Now a unique_ptr.
5695 (remote_gdbarch_data_handle): Delete.
5696 (get_remote_arch_state): Delete.
5697 (remote_state::get_remote_arch_state): New.
5698 (get_remote_state): Adjust to call remote_state's
5699 get_remote_arch_state method.
5700 (init_remote_state): Delete, bits factored out to ...
5701 (remote_arch_state::remote_arch_state): ... this new method.
5702 (get_remote_packet_size, get_memory_packet_size)
5703 (process_g_packet, remote_target::fetch_registers)
5704 (remote_target::prepare_to_store, store_registers_using_G)
5705 (remote_target::store_registers, remote_target::get_trace_status):
5706 Adjust to call remote_state's method.
5707 (_initialize_remote): Remove reference to
5708 remote_gdbarch_data_handle.
5710 2018-05-22 Pedro Alves <palves@redhat.com>
5712 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5713 pread>: New method declarations.
5714 (remote_target::open_1): Adjust.
5715 (readahead_cache_invalidate): Rename to ...
5716 (readahead_cache::invalidate): ... this, and adjust to be a class
5718 (readahead_cache_invalidate_fd): Rename to ...
5719 (readahead_cache::invalidate_fd): ... this, and adjust to be a
5721 (remote_hostio_pwrite): Adjust.
5722 (remote_hostio_pread_from_cache): Rename to ...
5723 (readahead_cache::pread): ... this, and adjust to be a class
5725 (remote_hostio_close): Adjust.
5727 2018-05-22 Pedro Alves <palves@redhat.com>
5729 * remote.c (remote_hostio_close_cleanup): Delete.
5730 (class scoped_remote_fd): New.
5731 (remote_file_put, remote_file_get): Use it.
5733 2018-05-22 Pedro Alves <palves@redhat.com>
5735 (struct vCont_action_support): Use bool and initialize all fields.
5736 (struct readahead_cache): Initialize all fields.
5737 (remote_state): Use bool and initialize all fields.
5738 (remote_state::remote_state, remote_state::~remote_state): New.
5739 (new_remote_state): Delete.
5740 (_initialize_remote): Use new to allocate remote_state.
5742 2018-05-22 Pedro Alves <palves@redhat.com>
5746 * c-exp.y: Include "c-support.h".
5747 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5748 of tolower. Use c_ident_is_alpha to scan names.
5749 * c-lang.c: Include "c-support.h".
5750 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5751 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5752 * c-support.h: New file, with bits factored out from ...
5753 * cp-name-parser.y: ... this file.
5754 Include "c-support.h".
5755 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5756 c-support.h and renamed.
5757 (symbol_end, yylex): Adjust.
5759 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5761 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5762 parameter type to CORE_ADDR.
5763 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5764 parameter type in declaration to CORE_ADDR.
5765 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5766 target_auxv_search to get AT_HWCAP and use the result to get the
5768 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5769 to CORE_ADDR. Remove the cast of the return value to unsigned
5770 long. Fix error predicate of target_auxv_search.
5771 (ppc_linux_nat_target::read_description): Change the type of the
5772 hwcap variable to CORE_ADDR.
5774 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5776 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5777 if the size of fpscr is larger than 32 bits.
5779 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5781 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5782 (ppc32_linux_vsxregmap): New global.
5783 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5784 regcache_supply_regset, and regcache_collect_regset.
5785 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5786 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5787 (fetch_vsx_register, store_vsx_register): Remove.
5788 (fetch_vsx_registers): Add regno parameter. Get regset using
5789 ppc_linux_vsxregset. Use regset to supply registers.
5790 (store_vsx_registers): Add regno parameter. Get regset using
5791 ppc_linux_vsxregset. Use regset to collect registers.
5792 (fetch_register): Call fetch_vsx_registers instead of
5794 (store_register): Call store_vsx_registers instead of
5796 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5797 new regno parameter.
5798 (store_ppc_registers): Call store_vsx_registers with -1 for the
5799 new regno parameter.
5800 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5801 (ppc_collect_vsxregset): Remove.
5803 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5805 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5807 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5808 for vector register offset fields.
5809 (ppc64_fbsd_reg_offsets): Likewise.
5810 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5811 to vector register offset fields.
5812 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5813 to vector register offset fields.
5814 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5815 vector register offset fields.
5816 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5817 initializers for vector register offset fields.
5818 (rs6000_aix64_reg_offsets): Likewise.
5819 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5820 (ppc_supply_vrregset): Remove.
5821 (ppc_collect_vrregset): Remove.
5822 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5823 (ppc_linux_vrregset) : New function.
5824 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5825 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5826 (ppc32_linux_vrregset): Remove.
5827 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5828 and use result instead of ppc32_linux_vrregset.
5829 (ppc32_linux_reg_offsets): Remove initializers for vector register
5831 (ppc64_linux_reg_offsets): Likewise.
5832 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5833 * ppc-linux-nat.c: Include regset.h.
5834 (gdb_vrregset_t): Adjust comment to account for little-endian
5836 (supply_vrregset, fill_vrregset): Remove.
5837 (fetch_altivec_register, store_altivec_register): Remove.
5838 (fetch_altivec_registers): Add regno parameter. Get regset using
5839 ppc_linux_vrregset. Use regset to supply registers.
5840 (store_altivec_registers): Add regno parameter. Get regset using
5841 ppc_linux_vrregset. Use regset to collect registers.
5842 (fetch_register): Call fetch_altivec_registers instead of
5843 fetch_altivec_register.
5844 (store_register): Call store_altivec_registers instead of
5845 store_altivec_register.
5846 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5847 the new regno parameter.
5848 (store_ppc_registers): Call store_altivec_registers with -1 for
5849 the new regno parameter.
5851 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5853 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5854 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5855 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5856 (gdb_vrregset_t): Change array type size to
5857 PPC_LINUX_SIZEOF_VRREGSET.
5858 (gdb_vsxregset_t): Change array type size to
5859 PPC_LINUX_SIZEOF_VSXREGSET.
5860 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5861 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5862 PPC_LINUX_SIZEOF_VSXREGSET.
5864 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5866 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5867 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5869 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5870 ppc_linux_target_wordsize with tid.
5871 (ppc_linux_nat_target::read_description): Call ppc_linux_target
5873 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5874 (ppc64_64bit_inferior_p): Add static and inline specifiers.
5875 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5876 tid parameter. Remove static specifier.
5877 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5878 (ppc_linux_target_wordsize): New declaration.
5880 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5882 * arch/ppc-linux-common.c: New file.
5883 * arch/ppc-linux-common.h: New file.
5884 * arch/ppc-linux-tdesc.h: New file.
5885 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5886 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5887 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5888 arch/ppc-linux-tdesc.h.
5889 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5890 arch/ppc-linux-tdesc.h.
5891 (ppc_linux_nat_target::read_description): Remove target
5892 description matching code. Fill a ppc_linux_features struct and
5893 call ppc_linux_match_description with it. Move comment about ISA
5894 2.05 to ppc-linux-common.c.
5895 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5896 arch/ppc-linux-tdesc.h.
5897 (ppc_linux_core_read_description): Remove target description
5898 matching code. Fill a ppc_linux_features struct and call
5899 ppc_linux_match_description with it.
5900 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5901 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5902 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5903 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5904 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5905 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5906 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5907 (tdesc_powerpc_e500l): Remove.
5909 2018-05-22 Joel Brobecker <brobecker@adacore.com>
5911 * ada-lang.c (catch_assert_command): Pass empty string instead
5912 of NULL for excep_string argument.
5914 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5916 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5917 the width of the requested register exceeds the width of the
5920 2018-05-21 Tom Tromey <tom@tromey.com>
5922 * printcmd.c (output_command): Remove.
5923 (output_command_const): Rename to output_command.
5924 * valprint.h (output_command): Rename from output_command_const.
5925 * tracepoint.c (trace_dump_actions): Call output_command.
5927 2018-05-21 Tom Tromey <tom@tromey.com>
5929 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5930 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5931 * ada-lang.h (create_ada_exception_catchpoint): Update.
5932 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5934 (create_excep_cond_exprs, ~ada_catchpoint)
5935 (should_stop_exception, print_one_exception)
5936 (print_mention_exception, print_recreate_exception): Update.
5937 (ada_get_next_arg): Remove.
5938 (catch_ada_exception_command_split): Use std::string. Change type
5939 of "excep_string", "cond_string".
5940 (catch_ada_exception_command): Update.
5941 (create_ada_exception_catchpoint): Change type of excep_string.
5942 (ada_exception_sal): Remove excep_string parameter.
5943 (~ada_catchpoint): Remove.
5945 2018-05-21 Tom Tromey <tom@tromey.com>
5947 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5950 2018-05-21 Tom Tromey <tom@tromey.com>
5952 * ada-lang.c (ada_exception_message_1, ada_exception_message):
5953 Return unique_xmalloc_ptr.
5954 (print_it_exception): Update.
5956 2018-05-21 Tom Tromey <tom@tromey.com>
5958 * tracepoint.c (trace_dump_actions): Use std::string.
5960 2018-05-21 Tom Tromey <tom@tromey.com>
5962 * symfile.c (reread_symbols): Use std::string for original_name.
5964 2018-05-21 Tom Tromey <tom@tromey.com>
5966 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5967 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
5970 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
5972 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5974 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5975 * objfiles.c (get_objfile_bfd_data): Allocate
5976 objfile_per_bfd_storage with obstack_new when allocating on
5979 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5981 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5983 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5984 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5985 * mdebugread.c (mdebug_build_psymtabs): Likewise.
5986 (add_pending): Likewise.
5987 (parse_symbol): Likewise.
5988 (parse_partial_symbols): Likewise.
5989 (psymtab_to_symtab_1): Likewise.
5990 (new_psymtab): Likewise.
5991 (elfmdebug_build_psymtabs): Likewise.
5992 * minsyms.c (terminate_minimal_symbol_table): Likewise.
5993 * objfiles.c (get_objfile_bfd_data): Likewise.
5994 (objfile_register_static_link): Likewise.
5995 * psymtab.c (allocate_psymtab): Likewise.
5996 * stabsread.c (read_member_functions): Likewise.
5997 * xcoffread.c (xcoff_end_psymtab): Likewise.
5999 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
6001 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6002 compiler supports std::is_trivially_constructible.
6003 * common/poison.h: Include obstack.h.
6004 (IsMallocable): Define to is_trivially_constructible if the
6005 compiler supports it, define to true_type otherwise.
6009 (XOBNEWVEC): Redefine.
6010 * gdb_obstack.h (obstack_zalloc): New.
6011 (OBSTACK_ZALLOC): Redefine.
6012 (obstack_calloc): New.
6013 (OBSTACK_CALLOC): Redefine.
6015 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6016 (gdbarch_obstack): New declaration in gdbarch.h, definition in
6018 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6019 obstack_calloc/obstack_zalloc.
6020 (gdbarch_obstack_zalloc): Remove.
6021 * target-descriptions.c (tdesc_data_init): Use obstack_new.
6023 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6025 * stack.c (backtrace_command_1): Remove useless variable int i.
6027 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6029 * stack.c (print_frame_info): Fix comment.
6031 2018-05-18 Tom Tromey <tom@tromey.com>
6033 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6034 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6035 (~dwarf2_per_objfile): Update
6036 (dwarf2_get_dwz_file): Use new.
6037 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6040 2018-05-18 Tom Tromey <tom@tromey.com>
6042 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6044 * dwarf2read.c (struct dwp_file): Add constructor and
6046 (open_and_init_dwp_file): Return a unique_ptr.
6047 (dwarf2_per_objfile, create_dwp_hash_table)
6048 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6049 (lookup_dwo_unit_in_dwp): Update.
6050 (open_and_init_dwp_file, get_dwp_file): Update.
6052 2018-05-18 Tom Tromey <tom@tromey.com>
6054 * dwarf2read.c (dwarf2_per_objfile): Update.
6055 (struct mapped_index): Add initializers.
6056 (dwarf2_read_index): Use new.
6057 (dw2_symtab_iter_init): Update.
6058 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6061 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6063 * dwarf2read.c (mapped_index) <total_size>: Remove.
6065 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6067 * unittests/format_pieces-selftests.c (test_format_specifier):
6070 2018-05-18 Tom Tromey <tom@tromey.com>
6072 * c-typeprint.c (maybe_print_hole): New function.
6073 (c_print_type_struct_field_offset): Update.
6074 (c_type_print_base_struct_union): Call maybe_print_hole.
6076 2018-05-17 Keith Seitz <keiths@redhat.com>
6078 * breakpoint.c (build_bpstat_chain): New function, moved from
6080 (bpstat_stop_status): Add optional parameter, `stop_chain'.
6081 If no stop chain is passed, call build_bpstat_chain to build it.
6082 * breakpoint.h (build_bpstat_chain): Declare.
6083 (bpstat_stop_status): Move documentation here from breakpoint.c.
6084 * infrun.c (handle_signal_stop): Before eliding inlined frames,
6085 build the stop chain and pass it to skip_inline_frames.
6086 Pass this stop chain to bpstat_stop_status.
6087 * inline-frame.c: Include breakpoint.h.
6088 (stopped_by_user_bp_inline_frame): New function.
6089 (skip_inline_frames): Add parameter `stop_chain'.
6090 Move documention to inline-frame.h.
6091 If non-NULL, use stopped_by_user_bp_inline_frame to determine
6092 whether the frame should be elided.
6093 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6094 Add moved documentation and update for new parameter.
6096 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6099 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6100 unittests/format_pieces-selftests.c.
6101 * common/format.h (format_piece) <operator==>: New.
6102 (format_pieces) <operator[]>: Remove.
6103 * common/format.c (format_pieces::format_pieces): Handle \e.
6104 * unittests/format_pieces-selftests.c: New.
6106 2018-05-17 Tom Tromey <tom@tromey.com>
6109 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6110 (dw2_instantiate_symtab): Add skip_partial parameter.
6111 (dw2_find_last_source_symtab, dw2_map_expand_apply)
6112 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6113 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6114 (dw2_expand_symtabs_matching_one)
6115 (dw2_find_pc_sect_compunit_symtab)
6116 (dw2_debug_names_lookup_symbol)
6117 (dw2_debug_names_expand_symtabs_for_function): Update.
6118 (init_cutu_and_read_dies): Add skip_partial parameter.
6119 (process_psymtab_comp_unit, build_type_psymtabs_1)
6120 (process_skeletonless_type_unit, load_partial_comp_unit)
6121 (psymtab_to_symtab_1): Update.
6122 (load_full_comp_unit): Add skip_partial parameter.
6123 (process_imported_unit_die, dwarf2_read_addr_index)
6124 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6125 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6126 (read_signatured_type): Update.
6128 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6130 * value.c (release_value): Remove unused variable.
6131 (record_latest_value): Likewise.
6132 (access_value_history): Likewise.
6133 (preserve_values): Likewise.
6135 2018-05-17 Tom Tromey <tom@tromey.com>
6137 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6140 2018-05-16 Maciej W. Rozycki <macro@mips.com>
6143 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6144 Also handle registers whose width is not a multiple of
6146 (linux_nat_trad_target::store_register): Likewise.
6148 2018-05-16 Tom Tromey <tom@tromey.com>
6150 * gdbcore.h (core_bfd): Redefine.
6151 * corelow.c (core_target::close): Update.
6152 (core_target_open): Update.
6153 * progspace.h (struct program_space) <cbfd>: Now a
6156 2018-05-16 Tom Tromey <tom@tromey.com>
6159 * symfile-add-flags.h (enum symfile_add_flags)
6160 <SYMFILE_NOT_FILENAME>: New constant.
6161 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
6162 objfile name from BFD.
6163 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6164 * minidebug.c (find_separate_debug_file_in_section): Put
6165 ".gnu_debugdata" into BFD's file name.
6167 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
6169 * regcache.c (regcache_read_ftype, regcache_write_ftype):
6172 2018-05-15 Tamar Christina <tamar.christina@arm.com>
6175 * aarch64-tdep.c (aarch64_analyze_prologue,
6176 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6177 Indicate not interested in errors.
6179 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6181 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6182 Supply the MIPS_ZERO_REGNUM register.
6184 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6186 * mips-tdep.c (mask_address_var): Make variable static.
6188 2018-05-14 Tom Tromey <tom@tromey.com>
6190 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6192 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
6194 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6195 FXSAVE_ADDR for the mxcsr register.
6197 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
6199 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6201 2018-05-11 Pedro Alves <palves@redhat.com>
6203 * corelow.c (core_target) <core_target>: No longer inline.
6204 Initialize m_core_gdbarch, m_core_vec and build the section table
6206 <~core_target>: New.
6207 <core_gdbarch, get_core_register_section>: New methods.
6208 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6209 factored out from ...
6210 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6212 (sniff_core_bfd): Add gdbarch parameter.
6213 (core_close): Delete, merged into ...
6214 (core_target::close): ... here. Delete self.
6215 (core_close_cleanup): Delete.
6216 (core_target_open): Allocate a core_target on the heap. Use a
6217 unique_ptr instead of a cleanup. Bits moved into the core_target
6218 ctor. Adjust to use core_target methods instead of globals.
6219 (get_core_register_section): Rename to ...
6220 (core_target::get_core_register_section): ... this and adjust.
6221 (struct get_core_registers_cb_data): New.
6222 (get_core_registers_cb): Use it. Use bool.
6223 (core_target::fetch_registers, core_target::files_info)
6224 (core_target::xfer_partial, core_target::read_description)
6225 (core_target::pid_to, core_target::thread_name): Adjust to
6226 reference class fields instead of globals.
6227 * target.h (struct target_ops_deleter, target_ops_up): New.
6229 2018-05-11 Pedro Alves <palves@redhat.com>
6231 * corefile.c (core_file_command): Move to corelow.c.
6232 * corelow.c (the_core_target): Delete.
6233 (core_file_command): Moved from corefile.c. Check exec_bfd
6234 instead of the_core_target. Use target_detach instead of calling
6235 into the_core_target directly.
6236 (maybe_say_no_core_file_now): New.
6237 (core_target::detach): Use it.
6238 (_initialize_corelow): Remove references to the_core_target.
6239 * gdbcore.h (the_core_target): Delete.
6241 2018-05-11 Tom Tromey <tromey@redhat.com>
6242 Pedro Alves <palves@redhat.com>
6244 * corefile.c (core_bfd): Remove.
6245 * gdbcore.h (core_bfd): Now a macro.
6246 * progspace.h (struct program_space) <cbfd>: New field.
6248 2018-05-11 Tom Tromey <tom@tromey.com>
6250 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6253 2018-05-10 Tom Tromey <tom@tromey.com>
6255 * configure: Rebuild.
6256 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6258 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6261 * regformats/regdat.sh: Adjust script, following the addition
6262 of the new expedite_regs parameter to init_target_desc.
6264 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
6267 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6268 set_gdbarch_significant_addr_bit.
6269 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6270 set_gdbarch_significant_addr_bit.
6271 * utils.c (address_significant): Update to sign extend addr.
6273 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
6275 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6276 (xtensa_linux_init_abi): Limit tdep->num_regs by
6277 tdep->num_nopriv_regs.
6278 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6279 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6282 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
6284 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6286 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
6288 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6289 (I387_MXCSR_INIT_VAL): New constant.
6290 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6291 buffer if it was supplied by the inferior.
6292 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6293 (i387_xsave_get_clear_bv): New function.
6294 (i387_supply_xsave): Only read x87 control registers from the
6295 xsave buffer if the feature is enabled, and the state will have
6296 been written, otherwise, provide a suitable default.
6297 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6298 including x87 control registers. Update control registers if they
6299 have changed from the default value, and mark features as enabled
6301 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6303 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6305 * spu-tdep.c (info_spu_event_command): Fix output formatting.
6307 2018-05-07 Tom Tromey <tom@tromey.com>
6309 * configure: Rebuild.
6310 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6312 2018-05-07 Tom Tromey <tom@tromey.com>
6315 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6316 bit. Use correct value for VDIV.
6318 2018-05-04 Tom Tromey <tom@tromey.com>
6320 * configure: Rebuild.
6321 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6323 2018-05-04 Tom Tromey <tom@tromey.com>
6325 * linux-record.c (record_linux_system_call) <case
6326 RECORD_SYS_RECVFROM>: Add "break".
6328 2018-05-04 Tom Tromey <tom@tromey.com>
6330 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6331 Add missing "break".
6332 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6333 Add missing "break".
6335 2018-05-04 Tom Tromey <tom@tromey.com>
6337 * rs6000-tdep.c (ppc_process_record_op4)
6338 (ppc_process_record_op63): Add fall-through comment.
6340 2018-05-04 Tom Tromey <tom@tromey.com>
6342 * i386-tdep.c (i386_process_record): Add fall-through comment.
6344 2018-05-04 Tom Tromey <tom@tromey.com>
6346 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6349 2018-05-04 Tom Tromey <tom@tromey.com>
6351 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6352 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6353 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6355 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6357 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6360 2018-05-04 Tom Tromey <tom@tromey.com>
6362 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6364 2018-05-04 Tom Tromey <tom@tromey.com>
6366 * s390-tdep.c (s390_process_record): Fix fall-through comments.
6367 * xcoffread.c (scan_xcoff_symtab): Move comment later.
6368 * symfile.c (section_is_mapped): Fix fall-through comment.
6369 * stabsread.c (define_symbol, read_member_functions): Fix
6370 fall-through comment.
6371 * s390-linux-tdep.c (s390_process_record): Fix fall-through
6373 * remote.c (remote_wait_as): Fix fall-through comment.
6374 * p-exp.y (yylex): Fix fall-through comment.
6375 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6377 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6378 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6379 * jv-exp.y (yylex): Fix fall-through comment.
6380 * go-exp.y (lex_one_token): Fix fall-through comment.
6381 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6382 fall-through comment.
6383 * f-exp.y (yylex): Fix fall-through comment.
6384 * dwarf2read.c (process_die): Fix fall-through comments.
6385 * dbxread.c (process_one_symbol): Fix fall-through comment.
6386 * d-exp.y (lex_one_token): Fix fall-through comment.
6387 * cp-name-parser.y (yylex): Fix fall-through comment.
6388 * coffread.c (coff_symtab_read): Fix fall-through comment.
6389 * c-exp.y (lex_one_token): Fix fall-through comment.
6390 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6392 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6395 2018-05-04 Tom Tromey <tom@tromey.com>
6398 * NEWS: Mention gdb.execute change.
6399 * gdbcmd.h (execute_control_command): Don't declare.
6400 * python/python.c (execute_gdb_command): Use read_command_lines_1,
6401 execute_control_commands, execute_control_commands_to_string.
6402 * cli/cli-script.h (execute_control_commands)
6403 (execute_control_commands_to_string): Declare.
6404 (execute_control_command): Add from_tty parameter.
6405 * cli/cli-script.c (execute_control_commands)
6406 (execute_control_commands_to_string): New functions.
6407 (execute_user_command): Use execute_control_commands.
6408 (execute_control_command_1): Add "from_tty" parameter. Update.
6409 (execute_control_command): Likewise.
6411 2018-05-04 Tom Tromey <tom@tromey.com>
6414 * NEWS: Mention that breakpoint commands are writable.
6415 * python/py-breakpoint.c (bppy_set_commands): New function.
6416 (breakpoint_object_getset) <"commands">: Use it.
6418 2018-05-04 Tom Tromey <tom@tromey.com>
6420 * tracepoint.c (actions_command): Update.
6421 * mi/mi-cmd-break.c (mi_command_line_array)
6422 (mi_command_line_array_cnt, mi_command_line_array_ptr)
6423 (mi_read_next_line): Remove.
6424 (mi_cmd_break_commands): Update.
6425 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6427 * cli/cli-script.c (get_command_line): Update.
6428 (process_next_line): Use function_view. Constify.
6429 (recurse_read_control_structure, read_command_lines)
6430 (read_command_lines_1): Change argument types to function_view.
6431 (do_define_command, document_command): Update.
6432 * breakpoint.h (check_tracepoint_command): Don't declare.
6433 * breakpoint.c (check_tracepoint_command): Remove.
6434 (commands_command_1, create_tracepoint_from_upload): Update.
6436 2018-05-04 Tom Tromey <tom@tromey.com>
6439 * cli/cli-script.h (enum command_control_type) <define_control>:
6441 * cli/cli-script.c (multi_line_command_p): Handle define_control.
6442 (build_command_line, execute_control_command_1)
6443 (process_next_line): Likewise.
6444 (do_define_command): New function, extracted from define_command.
6445 (define_command): Use it.
6447 2018-05-04 Tom Tromey <tom@tromey.com>
6449 * tracepoint.c (actions_command): Update.
6450 * cli/cli-script.h (read_command_lines): Update.
6451 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6452 (MAX_TMPBUF): Remove define.
6453 (define_command): Use string_printf.
6454 (document_command): Likewise.
6455 * breakpoint.c (commands_command_1): Update.
6457 2018-05-04 Tom Tromey <tom@tromey.com>
6459 * top.c (execute_command): Update.
6460 * cli/cli-script.h (print_command_lines): Now varargs.
6461 * cli/cli-script.c (print_command_lines): Now varargs.
6462 (execute_control_command_1) <case while_control, case if_control>:
6465 2018-05-04 Tom Tromey <tom@tromey.com>
6467 * tracepoint.c (all_tracepoint_actions): Rename from
6468 all_tracepoint_actions_and_cleanup. Change return type.
6469 (actions_command, encode_actions_1, encode_actions)
6470 (trace_dump_actions, tdump_command): Update.
6471 * remote.c (remote_download_command_source): Update.
6472 * python/python.c (gdbpy_eval_from_control_command)
6473 (python_command, python_interactive_command): Update.
6474 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6475 * guile/guile.c (guile_command)
6476 (gdbscm_eval_from_control_command, guile_command): Update.
6477 * compile/compile.c (compile_code_command)
6478 (compile_print_command, compile_to_object): Update.
6479 * cli/cli-script.h (struct command_lines_deleter): New.
6480 (counted_command_line): New typedef.
6481 (struct command_line): Add constructor, destructor.
6482 <body_list>: Remove.
6483 <body_list_0, body_list_1>: New members.
6484 (command_line_up): Remove typedef.
6485 (read_command_lines, read_command_lines_1, get_command_line):
6487 (copy_command_lines): Don't declare.
6488 * cli/cli-script.c (build_command_line): Use "new".
6489 (get_command_line): Return counted_command_line.
6490 (print_command_lines, execute_user_command)
6491 (execute_control_command_1, while_command, if_command): Update.
6492 (realloc_body_list): Remove.
6493 (process_next_line, recurse_read_control_structure): Update.
6494 (read_command_lines, read_command_lines_1): Return counted_command_line.
6495 (free_command_lines): Use "delete".
6496 (copy_command_lines): Remove.
6497 (define_command, document_command, show_user_1): Update.
6498 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6499 a counted_command_line.
6500 * breakpoint.h (counted_command_line): Remove typedef.
6501 (breakpoint_set_commands): Update.
6502 * breakpoint.c (check_no_tracepoint_commands)
6503 (validate_commands_for_breakpoint): Update.
6504 (breakpoint_set_commands): Change commands to be a
6505 counted_command_line.
6506 (commands_command_1, update_dprintf_command_list)
6507 (create_tracepoint_from_upload): Update.
6509 2018-05-04 Tom Tromey <tom@tromey.com>
6511 * cli/cli-decode.h (cmd_list_element): New constructor.
6512 (~cmd_list_element): New destructor.
6513 (struct cmd_list_element): Add initializers.
6514 * cli/cli-decode.c (do_add_cmd): Use "new".
6515 (delete_cmd): Use "delete".
6517 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6518 Pedro Alves <palves@redhat.com>
6520 PR breakpoints/19806 and support for PR external/20207.
6521 * NEWS: Mention Aarch64 watchpoint improvements.
6522 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6523 watchpoints and PR external/20207 watchpoints.
6524 * nat/aarch64-linux-hw-point.c
6525 (kernel_supports_any_contiguous_range): New.
6526 (aarch64_watchpoint_offset): New.
6527 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6528 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6529 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6530 (aarch64_align_watchpoint): New parameters aligned_offset_p and
6531 next_addr_orig_p. Support PR external/20207 watchpoints.
6532 (aarch64_downgrade_regs): New.
6533 (aarch64_dr_state_insert_one_point): New parameters offset and
6535 (aarch64_dr_state_remove_one_point): Likewise.
6536 (aarch64_handle_breakpoint): Update caller.
6537 (aarch64_handle_aligned_watchpoint): Likewise.
6538 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6540 (aarch64_linux_set_debug_regs): Remove const from state. Call
6541 aarch64_downgrade_regs.
6542 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6543 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6544 (DR_CONTROL_MASK): ... this.
6545 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6546 (unsigned int aarch64_watchpoint_offset): New prototype.
6547 (aarch64_linux_set_debug_regs): Remove const from state.
6548 * utils.c (align_up, align_down): Move to ...
6549 * common/common-utils.c (align_up, align_down): ... here.
6550 * utils.h (align_up, align_down): Move to ...
6551 * common/common-utils.h (align_up, align_down): ... here.
6553 2018-05-04 Joel Brobecker <brobecker@adacore.com>
6555 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6556 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6557 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6558 Re-implement to match the ABI as summarized in GCC's
6559 gcc/config/sparc/sparc.c. All callers updated.
6560 (sparc32_store_arguments): Remove assertion.
6562 2018-05-04 Tom Tromey <tom@tromey.com>
6564 * printcmd.c: Don't include tui.h.
6565 (decode_format): Use skip_spaces.
6567 2018-05-04 Tom Tromey <tom@tromey.com>
6570 * printcmd.c (last_count): New global.
6571 (x_command): Use saved count when repeating.
6573 2018-05-04 Tom Tromey <tom@tromey.com>
6575 * nto-procfs.c (do_closedir_cleanup): Remove.
6576 (procfs_pidlist): Use gdb_dir_up.
6577 * procfs.c (do_closedir_cleanup): Remove.
6578 (proc_update_threads): Use gdb_dir_up.
6579 * common/filestuff.h (struct gdb_dir_deleter): New.
6580 (gdb_dir_up): New typedef.
6582 2018-05-04 Tom Tromey <tom@tromey.com>
6584 * ada-lang.c (print_mention_exception): Use std::string.
6586 2018-05-04 Tom Tromey <tom@tromey.com>
6588 * ada-lang.c (create_excep_cond_exprs): Update.
6589 (ada_exception_catchpoint_cond_string): Use std::string.
6591 2018-05-04 Tom Tromey <tom@tromey.com>
6593 * ada-lang.c (xget_renaming_scope): Return std::string.
6594 (old_renaming_is_invisible): Update.
6596 2018-05-04 Tom Tromey <tom@tromey.com>
6598 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6599 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6601 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
6603 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6605 2018-05-04 Tom Tromey <tom@tromey.com>
6607 * remote.c (remote_query_supported_append): Change type.
6608 (remote_check_symbols): Update.
6610 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
6613 * configure.ac: Prepend libpython.
6614 * python/python-config.py: Likewise.
6615 * configure: Regenerate.
6617 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
6619 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6621 2018-05-03 Pedro Alves <palves@redhat.com>
6624 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6625 override. Write 'true' instead of '1'.
6626 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6629 2018-05-02 Pedro Alves <palves@redhat.com>
6631 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6632 add_inf_child_target.
6633 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6634 add_inf_child_target.
6635 * aix-thread.c (aix_thread_target_info): New.
6636 (aix_thread_target) <shortname, longname, doc>: Delete.
6638 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6639 add_inf_child_target.
6640 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6641 add_inf_child_target.
6642 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6643 add_inf_child_target.
6644 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6645 add_inf_child_target.
6646 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6647 add_inf_child_target.
6648 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6649 add_inf_child_target.
6650 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6651 add_inf_child_target.
6652 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6653 add_inf_child_target.
6654 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6655 add_inf_child_target.
6656 * bfd-target.c (target_bfd_target_info): New.
6657 (target_bfd) <shortname, longname, doc>: Delete.
6659 * bsd-kvm.c (bsd_kvm_target_info): New.
6660 (bsd_kvm_target) <shortname, longname, doc>: Delete.
6662 (bsd_kvm_target::open): Rename to ...
6663 (bsd_kvm_target_open): ... this. Adjust.
6664 * bsd-uthread.c (bsd_uthread_target_info): New.
6665 (bsd_uthread_target) <shortname, longname, doc>: Delete.
6667 * corefile.c (core_file_command): Adjust.
6668 * corelow.c (core_target_info): New.
6669 (core_target) <shortname, longname, doc>: Delete.
6671 (core_target::open): Rename to ...
6672 (core_target_open): ... this. Adjust.
6673 * ctf.c (ctf_target_info): New.
6674 (ctf_target) <shortname, longname, doc>: Delete.
6676 (ctf_target::open): Rename to ...
6677 (ctf_target_open): ... this.
6678 (_initialize_ctf): Adjust.
6679 * exec.c (exec_target_info): New.
6680 (exec_target) <shortname, longname, doc>: Delete.
6682 (exec_target::open): Rename to ...
6683 (exec_target_open): ... this.
6684 * gdbcore.h (core_target_open): Declare.
6685 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6686 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6687 add_inf_child_target.
6688 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6689 add_inf_child_target.
6690 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6691 add_inf_child_target.
6692 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6693 add_inf_child_target.
6694 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6695 add_inf_child_target.
6696 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6697 add_inf_child_target.
6698 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6699 add_inf_child_target.
6700 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6701 add_inf_child_target.
6702 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6703 add_inf_child_target.
6704 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6705 add_inf_child_target.
6706 * inf-child.c (inf_child_target_info): New.
6707 (inf_child_target::info): New.
6708 (inf_child_open_target): Remove 'target' parameter. Use
6709 get_native_target instead.
6710 (inf_child_target::open): Delete.
6711 (add_inf_child_target): New.
6712 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6715 (add_inf_child_target): Declare.
6716 (inf_child_open_target): Declare.
6717 * linux-thread-db.c (thread_db_target_info): New.
6718 (thread_db_target) <shortname, longname, doc>: Delete.
6720 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6721 add_inf_child_target.
6722 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6723 add_inf_child_target.
6724 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6725 add_inf_child_target.
6726 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6727 add_inf_child_target.
6728 * make-target-delegates (print_class): Adjust.
6729 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6730 add_inf_child_target.
6731 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6732 add_inf_child_target.
6733 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6734 add_inf_child_target.
6735 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6736 add_inf_child_target.
6737 * nto-procfs.c (nto_native_target_info): New.
6738 (nto_procfs_target_native) <shortname, longname, doc>:
6741 (nto_procfs_target_info): New.
6742 (nto_procfs_target_procfs) <shortname, longname, doc>:
6745 (init_procfs_targets): Adjust.
6746 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6747 add_inf_child_target.
6748 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6749 add_inf_child_target.
6750 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6751 add_inf_child_target.
6752 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6753 add_inf_child_target.
6754 * ravenscar-thread.c (ravenscar_target_info): New.
6755 (ravenscar_thread_target) <shortname, longname, doc>:
6758 * record-btrace.c (record_btrace_target_info):
6759 (record_btrace_target) <shortname, longname, doc>: Delete.
6761 (record_btrace_target::open): Rename to ...
6762 (record_btrace_target_open): ... this. Adjust.
6763 * record-full.c (record_longname, record_doc): New.
6764 (record_full_base_target) <shortname, longname, doc>: Delete.
6766 (record_full_target_info): New.
6767 (record_full_target): <shortname>: Delete.
6769 (record_full_core_open_1, record_full_open_1): Update comments.
6770 (record_full_base_target::open): Rename to ...
6771 (record_full_open): ... this.
6772 (cmd_record_full_restore): Update.
6773 (_initialize_record_full): Update.
6774 * remote-sim.c (remote_sim_target_info): New.
6775 (gdbsim_target) <shortname, longname, doc>: Delete.
6777 (gdbsim_target::open): Rename to ...
6778 (gdbsim_target_open): ... this.
6779 (_initialize_remote_sim): Adjust.
6780 * remote.c (remote_doc): New.
6781 (remote_target_info): New.
6782 (remote_target) <shortname, longname, doc>: Delete.
6784 (extended_remote_target_info): New.
6785 (extended_remote_target) <shortname, longname, doc>: Delete.
6787 (remote_target::open_1): Make static. Adjust.
6788 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6789 * s390-linux-nat.c (_initialize_s390_nat): Use
6790 add_inf_child_target.
6791 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6792 add_inf_child_target.
6793 * sol-thread.c (thread_db_target_info): New.
6794 (sol_thread_target) <shortname, longname, doc>: Delete.
6796 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6797 add_inf_child_target.
6798 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6799 add_inf_child_target.
6800 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6801 add_inf_child_target.
6802 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6803 add_inf_child_target.
6804 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6805 add_inf_child_target.
6806 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6807 add_inf_child_target.
6808 * spu-linux-nat.c (_initialize_spu_nat): Use
6809 add_inf_child_target.
6810 * spu-multiarch.c (spu_multiarch_target_info): New.
6811 (spu_multiarch_target) <shortname, longname, doc>: Delete.
6813 * target-delegates.c: Regenerate.
6814 * target.c: Include <unordered_map>.
6815 (target_ops_p): Delete.
6816 (DEF_VEC_P(target_ops_p)): Delete.
6817 (target_factories): New.
6818 (test_target_info): New.
6819 (test_target_ops::info): New.
6820 (open_target): Adjust to use target_factories.
6821 (add_target_with_completer): Rename to ...
6822 (add_target): ... this. Change prototype. Register target_info
6823 and open callback in target_factories. Register target_info in
6824 command context instead of target_ops.
6825 (add_target): Delete old implementation.
6826 (add_deprecated_target_alias): Change prototype. Adjust.
6827 (the_native_target): New.
6828 (set_native_target, get_native_target): New.
6829 (find_default_run_target): Use the_native_target.
6830 (find_attach_target, find_run_target): Simplify.
6831 (target_ops::open): Delete.
6832 (dummy_target_info): New.
6833 (dummy_target::shortname, dummy_target::longname)
6834 (dummy_target::doc): Delete.
6835 (dummy_target::info): New.
6836 (debug_target::shortname, debug_target::longname)
6837 (debug_target::doc): Delete.
6838 (debug_target::info): New.
6839 * target.h (struct target_info): New.
6840 (target_ops::~target_ops): Add comment.
6841 (target_ops::info): New.
6842 (target_ops::shortname, target_ops::longname, target_ops::doc): No
6843 longer virtual. Implement in terms of target_info.
6844 (set_native_target, get_native_target): Declare.
6845 (target_open_ftype): New.
6846 (add_target, add_target_with_completer)
6847 (add_deprecated_target_alias): Change prototype.
6848 (test_target) <shortname, longname, doc>: Delete.
6850 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6851 add_inf_child_target.
6852 * tracefile-tfile.c (tfile_target_info): New.
6853 (tfile_target) <shortname, longname, doc>: Delete.
6855 (tfile_target::open): Rename to ...
6856 (tfile_target_open): ... this.
6857 (_initialize_tracefile_tfile): Adjust.
6858 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6859 add_inf_child_target.
6860 * windows-nat.c (_initialize_windows_nat): Use
6861 add_inf_child_target.
6862 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6863 add_inf_child_target.
6865 2018-05-02 Pedro Alves <palves@redhat.com>
6867 * linux-nat.h (linux_nat_target) <low_new_thread,
6868 low_delete_thread, low_new_fork, low_forget_process,
6869 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6870 New virtual methods.
6871 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6872 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6873 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6874 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6875 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6877 * linux-fork.c (delete_fork): Adjust to call low method.
6878 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6879 (linux_nat_new_fork, linux_nat_forget_process_hook)
6880 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6881 (linux_nat_status_is_event):
6882 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6883 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6885 (sigtrap_is_event): Rename to ...
6886 (linux_nat_target::low_status_is_event): ... this.
6887 (linux_nat_set_status_is_event): Delete.
6888 (save_stop_reason, linux_nat_wait_1)
6889 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6891 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6892 (linux_nat_set_new_fork, linux_nat_set_forget_process)
6893 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6894 (linux_nat_set_prepare_to_resume): Delete.
6895 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6896 low virtual methods.
6897 * amd64-linux-nat.c: Likewise.
6898 * arm-linux-nat.c: Likewise.
6899 * i386-linux-nat.c: Likewise.
6900 * ia64-linux-nat.c: Likewise.
6901 * mips-linux-nat.c: Likewise.
6902 * ppc-linux-nat.c: Likewise.
6903 * s390-linux-nat.c: Likewise.
6904 * sparc64-linux-nat.c: Likewise.
6905 * x86-linux-nat.c: Likewise.
6906 * x86-linux-nat.h: Include "nat/x86-linux.h".
6907 (x86_linux_nat_target) <low_new_fork, low_forget_process,
6908 low_prepare_to_resume, low_new_thread, low_delete_thread>:
6911 2018-05-02 Pedro Alves <palves@redhat.com>
6913 * target.h (target_ops)
6914 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6915 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6916 stopped_by_watchpoint, have_continuable_watchpoint,
6917 stopped_data_address, watchpoint_addr_within_range,
6918 can_accel_watchpoint_condition, can_run, thread_alive,
6919 has_all_memory, has_memory, has_stack, has_registers,
6920 has_execution, can_async_p, is_async_p, supports_non_stop,
6921 always_non_stop_p, can_execute_reverse, supports_multi_process,
6922 supports_enable_disable_tracepoint,
6923 supports_disable_randomization, supports_string_tracing,
6924 supports_evaluation_of_breakpoint_conditions,
6925 can_run_breakpoint_commands, filesystem_is_local,
6926 can_download_tracepoint, get_trace_state_variable_value,
6927 set_trace_notes, get_tib_address, use_agent, can_use_agent,
6928 record_is_replaying, record_will_replay,
6929 augmented_libraries_svr4_read>: Adjust to return bool.
6930 * aarch64-linux-nat.c: All implementations adjusted.
6931 * aix-thread.c: All implementations adjusted.
6932 * arm-linux-nat.c: All implementations adjusted.
6933 * breakpoint.c: All implementations adjusted.
6934 * bsd-kvm.c: All implementations adjusted.
6935 * bsd-uthread.c: All implementations adjusted.
6936 * corelow.c: All implementations adjusted.
6937 * ctf.c: All implementations adjusted.
6938 * darwin-nat.c: All implementations adjusted.
6939 * darwin-nat.h: All implementations adjusted.
6940 * exec.c: All implementations adjusted.
6941 * fbsd-nat.c: All implementations adjusted.
6942 * fbsd-nat.h: All implementations adjusted.
6943 * gnu-nat.c: All implementations adjusted.
6944 * gnu-nat.h: All implementations adjusted.
6945 * go32-nat.c: All implementations adjusted.
6946 * ia64-linux-nat.c: All implementations adjusted.
6947 * inf-child.c: All implementations adjusted.
6948 * inf-child.h: All implementations adjusted.
6949 * inf-ptrace.c: All implementations adjusted.
6950 * inf-ptrace.h: All implementations adjusted.
6951 * linux-nat.c: All implementations adjusted.
6952 * linux-nat.h: All implementations adjusted.
6953 * mips-linux-nat.c: All implementations adjusted.
6954 * nto-procfs.c: All implementations adjusted.
6955 * ppc-linux-nat.c: All implementations adjusted.
6956 * procfs.c: All implementations adjusted.
6957 * ravenscar-thread.c: All implementations adjusted.
6958 * record-btrace.c: All implementations adjusted.
6959 * record-full.c: All implementations adjusted.
6960 * remote-sim.c: All implementations adjusted.
6961 * remote.c: All implementations adjusted.
6962 * s390-linux-nat.c: All implementations adjusted.
6963 * sol-thread.c: All implementations adjusted.
6964 * spu-multiarch.c: All implementations adjusted.
6965 * target-delegates.c: All implementations adjusted.
6966 * target.c: All implementations adjusted.
6967 * target.h: All implementations adjusted.
6968 * tracefile-tfile.c: All implementations adjusted.
6969 * tracefile.c: All implementations adjusted.
6970 * tracefile.h: All implementations adjusted.
6971 * windows-nat.c: All implementations adjusted.
6972 * x86-linux-nat.h: All implementations adjusted.
6973 * x86-nat.h: All implementations adjusted.
6975 2018-05-02 Pedro Alves <palves@redhat.com>
6977 * make-target-delegates (scan_target_h): Don't trim lines here.
6978 Replace sequences of tabs and/or whitespace with a single
6980 (top level, parsing methods): Trim each line before processing it
6983 2018-05-02 Pedro Alves <palves@redhat.com>
6984 John Baldwin <jhb@freebsd.org>
6986 * target.h (enum strata) <debug_stratum>: New.
6987 (struct target_ops) <all delegation methods>: Replace by C++
6988 virtual methods, and drop "to_" prefix. All references updated
6990 <to_shortname, to_longname, to_doc, to_data,
6991 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6992 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6993 virtual methods. All references updated throughout.
6994 <can_attach, supports_terminal_ours, can_create_inferior,
6995 get_thread_control_capabilities, attach_no_wait>: New
6997 <insert_breakpoint, remove_breakpoint>: Now
6998 TARGET_DEFAULT_NORETURN methods.
6999 <info_proc>: Now returns bool.
7001 (OPS_MAGIC): Delete.
7002 (current_target): Delete. All references replaced by references
7004 (target_stack): ... this. New.
7005 (target_shortname, target_longname): Adjust.
7006 (target_can_run): Now a function declaration.
7007 (default_child_has_all_memory, default_child_has_memory)
7008 (default_child_has_stack, default_child_has_registers)
7009 (default_child_has_execution): Remove target_ops parameter.
7010 (complete_target_initialization): Delete.
7011 (memory_breakpoint_target): New template class.
7012 (test_target_ops): Refactor as a C++ class with virtual methods.
7013 * make-target-delegates (NAME_PART): Tighten.
7014 (POINTER_PART, CP_SYMBOL): New.
7015 (SIMPLE_RETURN_PART): Reimplement.
7016 (VEC_RETURN_PART): Expect less.
7017 (RETURN_PART, VIRTUAL_PART): New.
7018 (METHOD): Adjust to C++ virtual methods.
7019 (scan_target_h): Remove reference to C99.
7020 (dname): Output "target_ops::" prefix.
7021 (write_function_header): Adjust to output a C++ class method.
7022 (write_declaration): New.
7023 (write_delegator): Adjust to output a C++ class method.
7024 (tdname): Output "dummy_target::" prefix.
7025 (write_tdefault, write_debugmethod): Adjust to output a C++ class
7027 (tdefault_names, debug_names): Delete.
7028 (return_types, tdefaults, styles, argtypes_array): New.
7029 (top level): All methods are delegators.
7031 (top level): Print dummy_target and debug_target classes.
7032 * target-delegates.c: Regenerate.
7033 * target-debug.h (target_debug_print_enum_info_proc_what)
7034 (target_debug_print_thread_control_capabilities)
7035 (target_debug_print_thread_info_p): New.
7036 * target.c (dummy_target): Delete.
7037 (the_dummy_target, the_debug_target): New.
7038 (target_stack): Now extern.
7039 (set_targetdebug): Push/unpush debug target.
7040 (default_child_has_all_memory, default_child_has_memory)
7041 (default_child_has_stack, default_child_has_registers)
7042 (default_child_has_execution): Remove target_ops parameter.
7043 (complete_target_initialization): Delete.
7044 (add_target_with_completer): No longer call
7045 complete_target_initialization.
7046 (target_supports_terminal_ours): Use regular delegation.
7047 (update_current_target): Delete.
7048 (push_target): No longer check magic number. Don't call
7049 update_current_target.
7050 (unpush_target): Don't call update_current_target.
7051 (target_is_pushed): No longer check magic number.
7052 (target_require_runnable): Skip for all stratums over
7054 (target_ops::info_proc): New.
7055 (target_info_proc): Use find_target_at and
7056 find_default_run_target.
7057 (target_supports_disable_randomization): Use regular delegation.
7058 (target_get_osdata): Use find_target_at.
7059 (target_ops::open, target_ops::close, target_ops::can_attach)
7060 (target_ops::attach, target_ops::can_create_inferior)
7061 (target_ops::create_inferior, target_ops::can_run)
7062 (target_can_run): New.
7063 (default_fileio_target): Use regular delegation.
7064 (target_ops::fileio_open, target_ops::fileio_pwrite)
7065 (target_ops::fileio_pread, target_ops::fileio_fstat)
7066 (target_ops::fileio_close, target_ops::fileio_unlink)
7067 (target_ops::fileio_readlink): New.
7068 (target_fileio_open_1, target_fileio_unlink)
7069 (target_fileio_readlink): Always call the target method. Handle
7071 (return_zero, return_zero_has_execution): Delete.
7072 (init_dummy_target): Delete.
7073 (dummy_target::dummy_target, dummy_target::shortname)
7074 (dummy_target::longname, dummy_target::doc)
7075 (debug_target::debug_target, debug_target::shortname)
7076 (debug_target::longname, debug_target::doc): New.
7077 (target_supports_delete_record): Use regular delegation.
7078 (setup_target_debug): Delete.
7079 (maintenance_print_target_stack): Skip debug_stratum.
7080 (initialize_targets): Instantiate the_dummy_target and
7082 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
7084 (target_auxv_search, fprint_target_auxv): Adjust.
7085 (info_auxv_command): Adjust to use target_stack.
7086 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7087 * exceptions.c (print_flush): Handle a NULL target_stack.
7088 * regcache.c (target_ops_no_register): Refactor as class with
7091 * exec.c (exec_target): New class.
7092 (exec_ops): Now an exec_target.
7093 (exec_open, exec_close_1, exec_get_section_table)
7094 (exec_xfer_partial, exec_files_info, exec_has_memory)
7095 (exec_make_note_section): Refactor as exec_target methods.
7096 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7098 (exec_target::find_memory_regions): New.
7099 (_initialize_exec): Don't call init_exec_ops.
7100 * gdbcore.h (exec_file_clear): Delete.
7102 * corefile.c (core_target): Delete.
7103 (core_file_command): Adjust.
7104 * corelow.c (core_target): New class.
7105 (the_core_target): New.
7106 (core_close): Remove target_ops parameter.
7107 (core_close_cleanup): Adjust.
7108 (core_target::close): New.
7109 (core_open, core_detach, get_core_registers, core_files_info)
7110 (core_xfer_partial, core_thread_alive, core_read_description)
7111 (core_pid_to_str, core_thread_name, core_has_memory)
7112 (core_has_stack, core_has_registers, core_info_proc): Rework as
7113 core_target methods.
7114 (ignore, core_remove_breakpoint, init_core_ops): Delete.
7115 (_initialize_corelow): Initialize the_core_target.
7116 * gdbcore.h (core_target): Delete.
7117 (the_core_target): New.
7119 * ctf.c: (ctf_target): New class.
7120 (ctf_ops): Now a ctf_target.
7121 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7122 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7123 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7125 (init_ctf_ops): Delete.
7126 (_initialize_ctf): Don't call it.
7127 * tracefile-tfile.c (tfile_target): New class.
7128 (tfile_ops): Now a tfile_target.
7129 (tfile_open, tfile_close, tfile_files_info)
7130 (tfile_get_tracepoint_status, tfile_trace_find)
7131 (tfile_fetch_registers, tfile_xfer_partial)
7132 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7133 Refactor as tfile_target methods.
7134 (tfile_xfer_partial_features): Remove target_ops parameter.
7135 (init_tfile_ops): Delete.
7136 (_initialize_tracefile_tfile): Don't call it.
7137 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7138 (tracefile_has_stack, tracefile_has_registers)
7139 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7140 tracefile_target methods.
7141 (init_tracefile_ops): Delete.
7142 (tracefile_target::tracefile_target): New.
7143 * tracefile.h: Include "target.h".
7144 (tracefile_target): New class.
7145 (init_tracefile_ops): Delete.
7147 * spu-multiarch.c (spu_multiarch_target): New class.
7148 (spu_ops): Now a spu_multiarch_target.
7149 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7150 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7151 (spu_search_memory, spu_mourn_inferior): Refactor as
7152 spu_multiarch_target methods.
7153 (init_spu_ops): Delete.
7154 (_initialize_spu_multiarch): Remove references to init_spu_ops,
7155 complete_target_initialization.
7157 * ravenscar-thread.c (ravenscar_thread_target): New class.
7158 (ravenscar_ops): Now a ravenscar_thread_target.
7159 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7160 (ravenscar_thread_alive, ravenscar_pid_to_str)
7161 (ravenscar_fetch_registers, ravenscar_store_registers)
7162 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7163 (ravenscar_stopped_by_hw_breakpoint)
7164 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7165 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7166 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7168 (init_ravenscar_thread_ops): Delete.
7169 (_initialize_ravenscar): Remove references to
7170 init_ravenscar_thread_ops and complete_target_initialization.
7172 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7173 (bsd_uthread_target): New class.
7174 (bsd_uthread_ops): Now a bsd_uthread_target.
7175 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7176 (bsd_uthread_close, bsd_uthread_mourn_inferior)
7177 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7178 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7179 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7180 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7181 (bsd_uthread_target): Delete function.
7182 (_initialize_bsd_uthread): Remove reference to
7183 complete_target_initialization.
7185 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
7186 (target_bfd): ... this new class.
7187 (target_bfd_xfer_partial, target_bfd_get_section_table)
7188 (target_bfd_close): Refactor as target_bfd methods.
7189 (target_bfd::~target_bfd): New.
7190 (target_bfd_reopen): Adjust.
7191 (target_bfd::close): New.
7193 * record-btrace.c (record_btrace_target): New class.
7194 (record_btrace_ops): Now a record_btrace_target.
7195 (record_btrace_open, record_btrace_stop_recording)
7196 (record_btrace_disconnect, record_btrace_close)
7197 (record_btrace_async, record_btrace_info)
7198 (record_btrace_insn_history, record_btrace_insn_history_range)
7199 (record_btrace_insn_history_from, record_btrace_call_history)
7200 (record_btrace_call_history_range)
7201 (record_btrace_call_history_from, record_btrace_record_method)
7202 (record_btrace_is_replaying, record_btrace_will_replay)
7203 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7204 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7205 (record_btrace_store_registers, record_btrace_prepare_to_store)
7206 (record_btrace_to_get_unwinder)
7207 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7208 (record_btrace_commit_resume, record_btrace_wait)
7209 (record_btrace_stop, record_btrace_can_execute_reverse)
7210 (record_btrace_stopped_by_sw_breakpoint)
7211 (record_btrace_supports_stopped_by_sw_breakpoint)
7212 (record_btrace_stopped_by_hw_breakpoint)
7213 (record_btrace_supports_stopped_by_hw_breakpoint)
7214 (record_btrace_update_thread_list, record_btrace_thread_alive)
7215 (record_btrace_goto_begin, record_btrace_goto_end)
7216 (record_btrace_goto, record_btrace_stop_replaying_all)
7217 (record_btrace_execution_direction)
7218 (record_btrace_prepare_to_generate_core)
7219 (record_btrace_done_generating_core): Refactor as
7220 record_btrace_target methods.
7221 (init_record_btrace_ops): Delete.
7222 (_initialize_record_btrace): Remove reference to
7223 init_record_btrace_ops.
7224 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7225 the execution_direction global.
7226 (record_full_base_target, record_full_target)
7227 (record_full_core_target): New classes.
7228 (record_full_ops): Now a record_full_target.
7229 (record_full_core_ops): Now a record_full_core_target.
7230 (record_full_target::detach, record_full_target::disconnect)
7231 (record_full_core_target::disconnect)
7232 (record_full_target::mourn_inferior, record_full_target::kill):
7234 (record_full_open, record_full_close, record_full_async): Refactor
7235 as methods of the record_full_base_target class.
7236 (record_full_resume, record_full_commit_resume): Refactor
7237 as methods of the record_full_target class.
7238 (record_full_wait, record_full_stopped_by_watchpoint)
7239 (record_full_stopped_data_address)
7240 (record_full_stopped_by_sw_breakpoint)
7241 (record_full_supports_stopped_by_sw_breakpoint)
7242 (record_full_stopped_by_hw_breakpoint)
7243 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7244 methods of the record_full_base_target class.
7245 (record_full_store_registers, record_full_xfer_partial)
7246 (record_full_insert_breakpoint, record_full_remove_breakpoint):
7247 Refactor as methods of the record_full_target class.
7248 (record_full_can_execute_reverse, record_full_get_bookmark)
7249 (record_full_goto_bookmark, record_full_execution_direction)
7250 (record_full_record_method, record_full_info, record_full_delete)
7251 (record_full_is_replaying, record_full_will_replay)
7252 (record_full_goto_begin, record_full_goto_end, record_full_goto)
7253 (record_full_stop_replaying): Refactor as methods of the
7254 record_full_base_target class.
7255 (record_full_core_resume, record_full_core_kill)
7256 (record_full_core_fetch_registers)
7257 (record_full_core_prepare_to_store)
7258 (record_full_core_store_registers, record_full_core_xfer_partial)
7259 (record_full_core_insert_breakpoint)
7260 (record_full_core_remove_breakpoint)
7261 (record_full_core_has_execution): Refactor
7262 as methods of the record_full_core_target class.
7263 (record_full_base_target::supports_delete_record): New.
7264 (init_record_full_ops): Delete.
7265 (init_record_full_core_ops): Delete.
7266 (record_full_save): Refactor as method of the
7267 record_full_base_target class.
7268 (_initialize_record_full): Remove references to
7269 init_record_full_ops and init_record_full_core_ops.
7271 * remote.c (remote_target, extended_remote_target): New classes.
7272 (remote_ops): Now a remote_target.
7273 (extended_remote_ops): Now an extended_remote_target.
7274 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7275 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7276 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7277 (remote_pass_signals, remote_set_syscall_catchpoint)
7278 (remote_program_signals, )
7279 (remote_thread_always_alive): Remove target_ops parameter.
7280 (remote_thread_alive, remote_thread_name)
7281 (remote_update_thread_list, remote_threads_extra_info)
7282 (remote_static_tracepoint_marker_at)
7283 (remote_static_tracepoint_markers_by_strid)
7284 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7285 (remote_open): Refactor as methods of remote_target.
7286 (extended_remote_open, extended_remote_detach)
7287 (extended_remote_attach, extended_remote_post_attach):
7288 (extended_remote_supports_disable_randomization)
7289 (extended_remote_create_inferior): : Refactor as method of
7290 extended_remote_target.
7291 (remote_set_permissions, remote_open_1, remote_detach)
7292 (remote_follow_fork, remote_follow_exec, remote_disconnect)
7293 (remote_resume, remote_commit_resume, remote_stop)
7294 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7295 (remote_terminal_ours, remote_wait, remote_fetch_registers)
7296 (remote_prepare_to_store, remote_store_registers)
7297 (remote_flash_erase, remote_flash_done, remote_files_info)
7298 (remote_kill, remote_mourn, remote_insert_breakpoint)
7299 (remote_remove_breakpoint, remote_insert_watchpoint)
7300 (remote_watchpoint_addr_within_range)
7301 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7302 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7303 (remote_supports_stopped_by_sw_breakpoint)
7304 (remote_stopped_by_hw_breakpoint)
7305 (remote_supports_stopped_by_hw_breakpoint)
7306 (remote_stopped_by_watchpoint, remote_stopped_data_address)
7307 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7308 (remote_verify_memory): Refactor as methods of remote_target.
7309 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7311 (remote_xfer_partial, remote_get_memory_xfer_limit)
7312 (remote_search_memory, remote_rcmd, remote_memory_map)
7313 (remote_pid_to_str, remote_get_thread_local_address)
7314 (remote_get_tib_address, remote_read_description): Refactor as
7315 methods of remote_target.
7316 (remote_target::fileio_open, remote_target::fileio_pwrite)
7317 (remote_target::fileio_pread, remote_target::fileio_close): New.
7318 (remote_hostio_readlink, remote_hostio_fstat)
7319 (remote_filesystem_is_local, remote_can_execute_reverse)
7320 (remote_supports_non_stop, remote_supports_disable_randomization)
7321 (remote_supports_multi_process, remote_supports_cond_breakpoints)
7322 (remote_supports_enable_disable_tracepoint)
7323 (remote_supports_string_tracing)
7324 (remote_can_run_breakpoint_commands, remote_trace_init)
7325 (remote_download_tracepoint, remote_can_download_tracepoint)
7326 (remote_download_trace_state_variable, remote_enable_tracepoint)
7327 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7328 (remote_trace_start, remote_get_trace_status)
7329 (remote_get_tracepoint_status, remote_trace_stop)
7330 (remote_trace_find, remote_get_trace_state_variable_value)
7331 (remote_save_trace_data, remote_get_raw_trace_data)
7332 (remote_set_disconnected_tracing, remote_core_of_thread)
7333 (remote_set_circular_trace_buffer, remote_traceframe_info)
7334 (remote_get_min_fast_tracepoint_insn_len)
7335 (remote_set_trace_buffer_size, remote_set_trace_notes)
7336 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7337 (remote_disable_btrace, remote_teardown_btrace)
7338 (remote_read_btrace, remote_btrace_conf)
7339 (remote_augmented_libraries_svr4_read, remote_load)
7340 (remote_pid_to_exec_file, remote_can_do_single_step)
7341 (remote_execution_direction, remote_thread_handle_to_thread_info):
7342 Refactor as methods of remote_target.
7343 (init_remote_ops, init_extended_remote_ops): Delete.
7344 (remote_can_async_p, remote_is_async_p, remote_async)
7345 (remote_thread_events, remote_upload_tracepoints)
7346 (remote_upload_trace_state_variables): Refactor as methods of
7348 (_initialize_remote): Remove references to init_remote_ops and
7349 init_extended_remote_ops.
7351 * remote-sim.c (gdbsim_target): New class.
7352 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7353 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7354 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7355 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7356 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7357 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7358 Refactor as methods of gdbsim_target.
7359 (gdbsim_ops): Now a gdbsim_target.
7360 (init_gdbsim_ops): Delete.
7361 (gdbsim_cntrl_c): Adjust.
7362 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7364 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7365 (the_amd64_linux_nat_target): New.
7366 (amd64_linux_fetch_inferior_registers)
7367 (amd64_linux_store_inferior_registers): Refactor as methods of
7368 amd64_linux_nat_target.
7369 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
7370 * i386-linux-nat.c: Don't include "linux-nat.h".
7371 (i386_linux_nat_target): New class.
7372 (the_i386_linux_nat_target): New.
7373 (i386_linux_fetch_inferior_registers)
7374 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7375 as methods of i386_linux_nat_target.
7376 (_initialize_i386_linux_nat): Adjust. Set linux_target.
7377 * inf-child.c (inf_child_ops): Delete.
7378 (inf_child_fetch_inferior_registers)
7379 (inf_child_store_inferior_registers): Delete.
7380 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7381 methods of inf_child_target.
7382 (inf_child_target::supports_terminal_ours)
7383 (inf_child_target::terminal_init)
7384 (inf_child_target::terminal_inferior)
7385 (inf_child_target::terminal_ours_for_output)
7386 (inf_child_target::terminal_ours, inf_child_target::interrupt)
7387 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7389 (inf_child_open, inf_child_disconnect, inf_child_close)
7390 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7391 (inf_child_post_startup_inferior, inf_child_can_run)
7392 (inf_child_pid_to_exec_file): Refactor as methods of
7394 (inf_child_follow_fork): Delete.
7395 (inf_child_target::can_create_inferior)
7396 (inf_child_target::can_attach): New.
7397 (inf_child_target::has_all_memory, inf_child_target::has_memory)
7398 (inf_child_target::has_stack, inf_child_target::has_registers)
7399 (inf_child_target::has_execution): New.
7400 (inf_child_fileio_open, inf_child_fileio_pwrite)
7401 (inf_child_fileio_pread, inf_child_fileio_fstat)
7402 (inf_child_fileio_close, inf_child_fileio_unlink)
7403 (inf_child_fileio_readlink, inf_child_use_agent)
7404 (inf_child_can_use_agent): Refactor as methods of
7406 (return_zero, inf_child_target): Delete.
7407 (inf_child_target::inf_child_target): New.
7408 * inf-child.h: Include "target.h".
7409 (inf_child_target): Delete function prototype.
7410 (inf_child_target): New class.
7411 (inf_child_open_target, inf_child_mourn_inferior)
7412 (inf_child_maybe_unpush_target): Delete.
7413 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7414 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7415 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7416 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7417 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7418 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7419 (inf_ptrace_wait, inf_ptrace_xfer_partial)
7420 (inf_ptrace_thread_alive, inf_ptrace_files_info)
7421 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7422 methods of inf_ptrace_target.
7423 (inf_ptrace_target): Delete function.
7424 * inf-ptrace.h: Include "inf-child.h".
7425 (inf_ptrace_target): Delete function declaration.
7426 (inf_ptrace_target): New class.
7427 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7428 * linux-nat.c (linux_target): New.
7429 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7430 (linux_nat_target::~linux_nat_target): New.
7431 (linux_child_post_attach, linux_child_post_startup_inferior)
7432 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7433 (linux_child_remove_fork_catchpoint)
7434 (linux_child_insert_vfork_catchpoint)
7435 (linux_child_remove_vfork_catchpoint)
7436 (linux_child_insert_exec_catchpoint)
7437 (linux_child_remove_exec_catchpoint)
7438 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7439 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7440 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7441 (linux_nat_stopped_data_address)
7442 (linux_nat_stopped_by_sw_breakpoint)
7443 (linux_nat_supports_stopped_by_sw_breakpoint)
7444 (linux_nat_stopped_by_hw_breakpoint)
7445 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7446 (linux_nat_kill, linux_nat_mourn_inferior)
7447 (linux_nat_xfer_partial, linux_nat_thread_alive)
7448 (linux_nat_update_thread_list, linux_nat_pid_to_str)
7449 (linux_nat_thread_name, linux_child_pid_to_exec_file)
7450 (linux_child_static_tracepoint_markers_by_strid)
7451 (linux_nat_is_async_p, linux_nat_can_async_p)
7452 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7453 (linux_nat_supports_multi_process)
7454 (linux_nat_supports_disable_randomization, linux_nat_async)
7455 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7456 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7457 (linux_nat_fileio_open, linux_nat_fileio_readlink)
7458 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7459 methods of linux_nat_target.
7460 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7461 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7463 (check_stopped_by_watchpoint): Adjust.
7464 (linux_xfer_partial): Delete.
7465 (linux_target_install_ops, linux_target, linux_nat_add_target):
7467 (linux_nat_target::linux_nat_target): New.
7468 * linux-nat.h: Include "inf-ptrace.h".
7469 (linux_nat_target): New.
7470 (linux_target, linux_target_install_ops, linux_nat_add_target):
7471 Delete function declarations.
7472 (linux_target): Declare global.
7473 * linux-thread-db.c (thread_db_target): New.
7474 (thread_db_target::thread_db_target): New.
7475 (thread_db_ops): Delete.
7476 (the_thread_db_target): New.
7477 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7478 (thread_db_update_thread_list, thread_db_pid_to_str)
7479 (thread_db_extra_thread_info)
7480 (thread_db_thread_handle_to_thread_info)
7481 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7482 (thread_db_resume): Refactor as methods of thread_db_target.
7483 (init_thread_db_ops): Delete.
7484 (_initialize_thread_db): Remove reference to init_thread_db_ops.
7485 * x86-linux-nat.c: Don't include "linux-nat.h".
7486 (super_post_startup_inferior): Delete.
7487 (x86_linux_nat_target::~x86_linux_nat_target): New.
7488 (x86_linux_child_post_startup_inferior)
7489 (x86_linux_read_description, x86_linux_enable_btrace)
7490 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7491 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7492 methods of x86_linux_nat_target.
7493 (x86_linux_create_target): Delete. Bits folded ...
7494 (x86_linux_add_target): ... here. Now takes a linux_nat_target
7496 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7497 (x86_linux_nat_target): New class.
7498 (x86_linux_create_target): Delete.
7499 (x86_linux_add_target): Now takes a linux_nat_target pointer.
7500 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7501 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7502 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7503 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7504 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7506 (x86_use_watchpoints): Delete.
7507 * x86-nat.h: Include "breakpoint.h" and "target.h".
7508 (x86_use_watchpoints): Delete.
7509 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7510 (x86_stopped_by_watchpoint, x86_stopped_data_address)
7511 (x86_insert_watchpoint, x86_remove_watchpoint)
7512 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7513 (x86_stopped_by_hw_breakpoint): New declarations.
7514 (x86_nat_target): New template class.
7516 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7517 (the_ppc_linux_nat_target): New.
7518 (ppc_linux_fetch_inferior_registers)
7519 (ppc_linux_can_use_hw_breakpoint)
7520 (ppc_linux_region_ok_for_hw_watchpoint)
7521 (ppc_linux_ranged_break_num_registers)
7522 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7523 (ppc_linux_insert_mask_watchpoint)
7524 (ppc_linux_remove_mask_watchpoint)
7525 (ppc_linux_can_accel_watchpoint_condition)
7526 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7527 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7528 (ppc_linux_watchpoint_addr_within_range)
7529 (ppc_linux_masked_watch_num_registers)
7530 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7531 (ppc_linux_read_description): Refactor as methods of
7532 ppc_linux_nat_target.
7533 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
7535 * procfs.c (procfs_xfer_partial): Delete forward declaration.
7536 (procfs_target): New class.
7537 (the_procfs_target): New.
7538 (procfs_target): Delete function.
7539 (procfs_auxv_parse, procfs_attach, procfs_detach)
7540 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7541 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7542 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7543 (procfs_create_inferior, procfs_update_thread_list)
7544 (procfs_thread_alive, procfs_pid_to_str)
7545 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7546 (procfs_stopped_data_address, procfs_insert_watchpoint)
7547 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7548 (proc_find_memory_regions, procfs_info_proc)
7549 (procfs_make_note_section): Refactor as methods of procfs_target.
7550 (_initialize_procfs): Adjust.
7551 * sol-thread.c (sol_thread_target): New class.
7552 (sol_thread_ops): Now a sol_thread_target.
7553 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7554 (sol_thread_fetch_registers, sol_thread_store_registers)
7555 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7556 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7557 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7558 (init_sol_thread_ops): Delete.
7559 (_initialize_sol_thread): Adjust. Remove references to
7560 init_sol_thread_ops and complete_target_initialization.
7562 * windows-nat.c (windows_nat_target): New class.
7563 (windows_fetch_inferior_registers)
7564 (windows_store_inferior_registers, windows_resume, windows_wait)
7565 (windows_attach, windows_detach, windows_pid_to_exec_file)
7566 (windows_files_info, windows_create_inferior)
7567 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7568 (windows_close, windows_pid_to_str, windows_xfer_partial)
7569 (windows_get_tib_address, windows_get_ada_task_ptid)
7570 (windows_thread_name, windows_thread_alive): Refactor as
7571 windows_nat_target methods.
7572 (do_initial_windows_stuff): Adjust.
7573 (windows_target): Delete function.
7574 (_initialize_windows_nat): Adjust.
7576 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7577 (darwin_mourn_inferior, darwin_kill_inferior)
7578 (darwin_create_inferior, darwin_attach, darwin_detach)
7579 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7580 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7581 (darwin_supports_multi_process): Refactor as darwin_nat_target
7583 (darwin_resume_to, darwin_files_info): Delete.
7584 (_initialize_darwin_inferior): Rename to ...
7585 (_initialize_darwin_nat): ... this. Adjust to C++ification.
7586 * darwin-nat.h: Include "inf-child.h".
7587 (darwin_nat_target): New class.
7588 (darwin_complete_target): Delete.
7589 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7590 (darwin_target): New.
7591 (i386_darwin_fetch_inferior_registers)
7592 (i386_darwin_store_inferior_registers): Refactor as methods of
7594 (darwin_complete_target): Delete, with ...
7595 (_initialize_i386_darwin_nat): ... bits factored out here.
7597 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7598 (the_alpha_linux_nat_target): New.
7599 (alpha_linux_register_u_offset): Refactor as
7600 alpha_linux_nat_target method.
7601 (_initialize_alpha_linux_nat): Adjust.
7602 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7603 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7604 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7605 methods of linux_nat_trad_target.
7606 (linux_trad_target): Delete.
7607 * linux-nat-trad.h (linux_trad_target): Delete function.
7608 (linux_nat_trad_target): New class.
7609 * mips-linux-nat.c (mips_linux_nat_target): New class.
7610 (super_fetch_registers, super_store_registers, super_close):
7612 (the_mips_linux_nat_target): New.
7613 (mips64_linux_regsets_fetch_registers)
7614 (mips64_linux_regsets_store_registers)
7615 (mips64_linux_fetch_registers, mips64_linux_store_registers)
7616 (mips_linux_register_u_offset, mips_linux_read_description)
7617 (mips_linux_can_use_hw_breakpoint)
7618 (mips_linux_stopped_by_watchpoint)
7619 (mips_linux_stopped_data_address)
7620 (mips_linux_region_ok_for_hw_watchpoint)
7621 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7622 (mips_linux_close): Refactor as methods of mips_linux_nat.
7623 (_initialize_mips_linux_nat): Adjust to C++ification.
7625 * aix-thread.c (aix_thread_target): New class.
7626 (aix_thread_ops): Now an aix_thread_target.
7627 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7628 (aix_thread_fetch_registers, aix_thread_store_registers)
7629 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7630 (aix_thread_thread_alive, aix_thread_pid_to_str)
7631 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7632 Refactor as methods of aix_thread_target.
7633 (init_aix_thread_ops): Delete.
7634 (_initialize_aix_thread): Remove references to init_aix_thread_ops
7635 and complete_target_initialization.
7636 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7637 (rs6000_nat_target): New class.
7638 (the_rs6000_nat_target): New.
7639 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7640 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7641 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7642 (super_create_inferior): Delete.
7643 (_initialize_rs6000_nat): Adjust to C++ification.
7645 * arm-linux-nat.c (arm_linux_nat_target): New class.
7646 (the_arm_linux_nat_target): New.
7647 (arm_linux_fetch_inferior_registers)
7648 (arm_linux_store_inferior_registers, arm_linux_read_description)
7649 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7650 (arm_linux_remove_hw_breakpoint)
7651 (arm_linux_region_ok_for_hw_watchpoint)
7652 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7653 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7654 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7655 arm_linux_nat_target.
7656 (_initialize_arm_linux_nat): Adjust to C++ification.
7658 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7659 (the_aarch64_linux_nat_target): New.
7660 (aarch64_linux_fetch_inferior_registers)
7661 (aarch64_linux_store_inferior_registers)
7662 (aarch64_linux_child_post_startup_inferior)
7663 (aarch64_linux_read_description)
7664 (aarch64_linux_can_use_hw_breakpoint)
7665 (aarch64_linux_insert_hw_breakpoint)
7666 (aarch64_linux_remove_hw_breakpoint)
7667 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7668 (aarch64_linux_region_ok_for_hw_watchpoint)
7669 (aarch64_linux_stopped_data_address)
7670 (aarch64_linux_stopped_by_watchpoint)
7671 (aarch64_linux_watchpoint_addr_within_range)
7672 (aarch64_linux_can_do_single_step): Refactor as methods of
7673 aarch64_linux_nat_target.
7674 (super_post_startup_inferior): Delete.
7675 (_initialize_aarch64_linux_nat): Adjust to C++ification.
7677 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7678 (the_hppa_linux_nat_target): New.
7679 (hppa_linux_fetch_inferior_registers)
7680 (hppa_linux_store_inferior_registers): Refactor as methods of
7681 hppa_linux_nat_target.
7682 (_initialize_hppa_linux_nat): Adjust to C++ification.
7684 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7685 (the_ia64_linux_nat_target): New.
7686 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7687 (ia64_linux_stopped_data_address)
7688 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7689 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7690 ia64_linux_nat_target methods.
7691 (super_xfer_partial): Delete.
7692 (_initialize_ia64_linux_nat): Adjust to C++ification.
7694 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7695 (the_m32r_linux_nat_target): New.
7696 (m32r_linux_fetch_inferior_registers)
7697 (m32r_linux_store_inferior_registers): Refactor as
7698 m32r_linux_nat_target methods.
7699 (_initialize_m32r_linux_nat): Adjust to C++ification.
7701 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7702 (the_m68k_linux_nat_target): New.
7703 (m68k_linux_fetch_inferior_registers)
7704 (m68k_linux_store_inferior_registers): Refactor as
7705 m68k_linux_nat_target methods.
7706 (_initialize_m68k_linux_nat): Adjust to C++ification.
7708 * s390-linux-nat.c (s390_linux_nat_target): New class.
7709 (the_s390_linux_nat_target): New.
7710 (s390_linux_fetch_inferior_registers)
7711 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7712 (s390_insert_watchpoint, s390_remove_watchpoint)
7713 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7714 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7715 (s390_auxv_parse, s390_read_description): Refactor as methods of
7716 s390_linux_nat_target.
7717 (_initialize_s390_nat): Adjust to C++ification.
7719 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7720 (the_sparc_linux_nat_target): New.
7721 (_initialize_sparc_linux_nat): Adjust to C++ification.
7722 * sparc-nat.c (sparc_fetch_inferior_registers)
7723 (sparc_store_inferior_registers): Remove target_ops parameter.
7724 * sparc-nat.h (sparc_fetch_inferior_registers)
7725 (sparc_store_inferior_registers): Remove target_ops parameter.
7726 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7727 (the_sparc64_linux_nat_target): New.
7728 (_initialize_sparc64_linux_nat): Adjust to C++ification.
7730 * spu-linux-nat.c (spu_linux_nat_target): New class.
7731 (the_spu_linux_nat_target): New.
7732 (spu_child_post_startup_inferior, spu_child_post_attach)
7733 (spu_child_wait, spu_fetch_inferior_registers)
7734 (spu_store_inferior_registers, spu_xfer_partial)
7735 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7737 (_initialize_spu_nat): Adjust to C++ification.
7739 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7740 (the_tilegx_linux_nat_target): New.
7741 (fetch_inferior_registers, store_inferior_registers):
7742 Refactor as methods.
7743 (_initialize_tile_linux_nat): Adjust to C++ification.
7745 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7746 (the_xtensa_linux_nat_target): New.
7747 (xtensa_linux_fetch_inferior_registers)
7748 (xtensa_linux_store_inferior_registers): Refactor as
7749 xtensa_linux_nat_target methods.
7750 (_initialize_xtensa_linux_nat): Adjust to C++ification.
7752 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7753 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7754 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7755 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7756 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7757 (fbsd_stopped_by_sw_breakpoint)
7758 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7759 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7760 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7761 (fbsd_post_startup_inferior, fbsd_post_attach)
7762 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7763 (fbsd_set_syscall_catchpoint)
7764 (super_xfer_partial, super_resume, super_wait)
7765 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7766 (fbsd_handle_debug_trap): Remove target_ops parameter.
7767 (fbsd_nat_add_target): Delete.
7768 * fbsd-nat.h: Include "inf-ptrace.h".
7769 (fbsd_nat_add_target): Delete.
7770 (USE_SIGTRAP_SIGINFO): Define.
7771 (fbsd_nat_target): New class.
7773 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7774 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7775 (amd64bsd_target): Delete.
7776 * amd64-bsd-nat.h: New file.
7777 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7779 (amd64_fbsd_nat_target): New class.
7780 (the_amd64_fbsd_nat_target): New.
7781 (amd64fbsd_read_description): Refactor as method of
7782 amd64_fbsd_nat_target.
7783 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7784 (_initialize_amd64fbsd_nat): Adjust to C++ification.
7785 * amd64-nat.h (amd64bsd_target): Delete function declaration.
7786 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7787 (i386bsd_store_inferior_registers): Remove target_ops parameter.
7788 (i386bsd_target): Delete.
7789 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7790 (i386bsd_fetch_inferior_registers)
7791 (i386bsd_store_inferior_registers): Declare.
7792 (i386_bsd_nat_target): New class.
7793 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7794 (the_i386_fbsd_nat_target): New.
7795 (i386fbsd_resume, i386fbsd_read_description): Refactor as
7796 i386_fbsd_nat_target methods.
7797 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7798 (_initialize_i386fbsd_nat): Adjust to C++ification.
7799 * x86-bsd-nat.c (super_mourn_inferior): Delete.
7800 (x86bsd_mourn_inferior, x86bsd_target): Delete.
7801 (_initialize_x86_bsd_nat): Adjust to C++ification.
7802 * x86-bsd-nat.h: Include "x86-nat.h".
7803 (x86bsd_target): Delete declaration.
7804 (x86bsd_nat_target): New class.
7806 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7807 (the_aarch64_fbsd_nat_target): New.
7808 (aarch64_fbsd_fetch_inferior_registers)
7809 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7810 aarch64_fbsd_nat_target.
7811 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7812 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7813 (the_alpha_bsd_nat_target): New.
7814 (alphabsd_fetch_inferior_registers)
7815 (alphabsd_store_inferior_registers): Refactor as
7816 alpha_bsd_nat_target methods.
7817 (_initialize_alphabsd_nat): Refactor as methods of
7818 alpha_bsd_nat_target.
7819 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7820 (the_amd64_nbsd_nat_target): New.
7821 (_initialize_amd64nbsd_nat): Adjust to C++ification.
7822 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7823 (the_amd64_obsd_nat_target): New.
7824 (_initialize_amd64obsd_nat): Adjust to C++ification.
7825 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7826 (the_arm_fbsd_nat_target): New.
7827 (arm_fbsd_fetch_inferior_registers)
7828 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7829 (_initialize_arm_fbsd_nat): Refactor as methods of
7830 arm_fbsd_nat_target.
7831 (_initialize_arm_fbsd_nat): Adjust to C++ification.
7832 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7833 (the_arm_netbsd_nat_target): New.
7834 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7835 arm_netbsd_nat_target.
7836 (_initialize_arm_netbsd_nat): Adjust to C++ification.
7837 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7838 (the_hppa_nbsd_nat_target): New.
7839 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7840 hppa_nbsd_nat_target methods.
7841 (_initialize_hppanbsd_nat): Adjust to C++ification.
7842 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7843 (the_hppa_obsd_nat_target): New.
7844 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7845 methods of hppa_obsd_nat_target.
7846 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
7848 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7849 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
7851 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7852 (_initialize_i386obsd_nat): Use add_target.
7853 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7854 (the_m68k_bsd_nat_target): New.
7855 (m68kbsd_fetch_inferior_registers)
7856 (m68kbsd_store_inferior_registers): Refactor as methods of
7857 m68k_bsd_nat_target.
7858 (_initialize_m68kbsd_nat): Adjust to C++ification.
7859 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7860 (the_mips_fbsd_nat_target): New.
7861 (mips_fbsd_fetch_inferior_registers)
7862 (mips_fbsd_store_inferior_registers): Refactor as methods of
7863 mips_fbsd_nat_target.
7864 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
7866 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7867 (the_mips_nbsd_nat_target): New.
7868 (mipsnbsd_fetch_inferior_registers)
7869 (mipsnbsd_store_inferior_registers): Refactor as methods of
7870 mips_nbsd_nat_target.
7871 (_initialize_mipsnbsd_nat): Adjust to C++ification.
7872 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7873 (the_mips64_obsd_nat_target): New.
7874 (mips64obsd_fetch_inferior_registers)
7875 (mips64obsd_store_inferior_registers): Refactor as methods of
7876 mips64_obsd_nat_target.
7877 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
7879 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7881 * nbsd-nat.h: Include "inf-ptrace.h".
7882 (nbsd_nat_target): New class.
7883 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7884 (obsd_wait): Refactor as methods of obsd_nat_target.
7885 (obsd_add_target): Delete.
7886 * obsd-nat.h: Include "inf-ptrace.h".
7887 (obsd_nat_target): New class.
7888 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7889 (the_ppc_fbsd_nat_target): New.
7890 (ppcfbsd_fetch_inferior_registers)
7891 (ppcfbsd_store_inferior_registers): Refactor as methods of
7892 ppc_fbsd_nat_target.
7893 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
7895 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7896 (the_ppc_nbsd_nat_target): New.
7897 (ppcnbsd_fetch_inferior_registers)
7898 (ppcnbsd_store_inferior_registers): Refactor as methods of
7899 ppc_nbsd_nat_target.
7900 (_initialize_ppcnbsd_nat): Adjust to C++ification.
7901 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7902 (the_ppc_obsd_nat_target): New.
7903 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7904 methods of ppc_obsd_nat_target.
7905 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
7907 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7908 (the_sh_nbsd_nat_target): New.
7909 (shnbsd_fetch_inferior_registers)
7910 (shnbsd_store_inferior_registers): Refactor as methods of
7912 (_initialize_shnbsd_nat): Adjust to C++ification.
7913 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7914 (inf_ptrace_xfer_partial): Delete.
7915 (sparc_xfer_partial, sparc_target): Delete.
7916 * sparc-nat.h (sparc_fetch_inferior_registers)
7917 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7918 (sparc_target): Delete function declaration.
7919 (sparc_target): New template class.
7920 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7921 (_initialize_sparcnbsd_nat): Adjust to C++ification.
7922 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7923 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
7925 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7926 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7927 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7928 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
7930 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7931 (the_vax_bsd_nat_target): New.
7932 (vaxbsd_fetch_inferior_registers)
7933 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7935 (_initialize_vaxbsd_nat): Adjust to C++ification.
7937 * bsd-kvm.c (bsd_kvm_target): New class.
7938 (bsd_kvm_ops): Now a bsd_kvm_target.
7939 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7940 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7941 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7943 (bsd_kvm_return_one): Delete.
7944 (bsd_kvm_add_target): Adjust to C++ification.
7946 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7947 (nto_procfs_target_procfs): New classes.
7948 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7949 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7950 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7951 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7952 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7953 (procfs_remove_hw_breakpoint, procfs_resume)
7954 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7955 (procfs_kill_inferior, procfs_store_registers)
7956 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7957 as methods of nto_procfs_target.
7958 (nto_procfs_ops): Now an nto_procfs_target_procfs.
7959 (nto_native_ops): Delete.
7960 (procfs_open, procfs_native_open): Delete.
7961 (nto_native_ops): Now an nto_procfs_target_native.
7962 (init_procfs_targets): Adjust to C++ification.
7963 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7964 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7965 Refactor as methods of nto_procfs_target.
7967 * go32-nat.c (go32_nat_target): New class.
7968 (the_go32_nat_target): New.
7969 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7970 (go32_store_registers, go32_xfer_partial, go32_files_info)
7971 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7972 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7973 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7974 (go32_pid_to_str): Refactor as methods of go32_nat_target.
7975 (go32_target): Delete.
7976 (_initialize_go32_nat): Adjust to C++ification.
7978 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7979 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7980 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7981 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7983 (gnu_target): Delete.
7984 * gnu-nat.h (gnu_target): Delete.
7985 (gnu_nat_target): New class.
7986 * i386-gnu-nat.c (gnu_base_target): New.
7987 (i386_gnu_nat_target): New class.
7988 (the_i386_gnu_nat_target): New.
7989 (_initialize_i386gnu_nat): Adjust to C++ification.
7991 2018-05-02 Pedro Alves <palves@redhat.com>
7993 * bfd-target.c (target_bfd_xclose): Rename to ...
7994 (target_bfd_close): ... this.
7995 (target_bfd_reopen): Adjust.
7996 * target.c (target_close): Remove references to to_xclose.
7997 * target.h (target_ops::to_xclose): Delete.
7998 (target_ops::to_close): Update comments.
8000 2018-05-02 Pedro Alves <palves@redhat.com>
8002 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8004 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8005 * inf-ptrace.c (inf_ptrace_register_u_offset)
8006 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8007 (inf_ptrace_store_register, inf_ptrace_store_registers)
8008 (inf_ptrace_trad_target): Move to ...
8009 * linux-nat-trad.c: ... this new file.
8010 * linux-nat-trad.h: New file.
8011 * linux-nat.c (linux_target_install_ops): Make extern.
8012 (linux_trad_target): Delete.
8013 * linux-nat.h (linux_trad_target): Delete declaration.
8014 (linux_target_install_ops): Declare.
8015 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8018 2018-05-02 Pedro Alves <palves@redhat.com>
8020 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8021 procfs_target/add_target here.
8022 * procfs.c (procfs_target): Make static.
8023 (_initialize_procfs): Call add_target here.
8024 * procfs.h (struct target_ops): Remove forward declaration.
8025 (procfs_target): Remove declaration.
8026 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8028 2018-05-02 Pedro Alves <palves@redhat.com>
8030 * procfs.c (procfs_stopped_by_watchpoint)
8031 (procfs_insert_watchpoint, procfs_remove_watchpoint)
8032 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8034 (procfs_use_watchpoints): Delete, move contents...
8035 (procfs_target): ... here.
8036 * procfs.h (procfs_use_watchpoints): Delete declaration.
8037 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8038 procfs_use_watchpoints.
8039 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8040 procfs_use_watchpoints.
8042 2018-05-02 Tom Tromey <tom@tromey.com>
8045 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8046 and var_zuinteger_unlimited.
8047 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8048 and PARAM_ZUINTEGER_UNLIMITED.
8049 (set_parameter_value): Handle var_zuinteger and
8050 var_zuinteger_unlimited.
8051 (add_setshow_generic): Likewise.
8052 (parmpy_init): Likewise.
8054 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
8057 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8058 pointer is not null before dereferencing it.
8060 2018-04-30 Tom Tromey <tom@tromey.com>
8062 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8065 2018-04-30 Tom Tromey <tom@tromey.com>
8067 * breakpoint.c (mention): Remove use of is_mi_like_p.
8068 (print_mention_ranged_breakpoint): Likewise.
8069 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8072 2018-04-30 Tom Tromey <tom@tromey.com>
8074 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8076 2018-04-30 Tom Tromey <tom@tromey.com>
8078 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8079 (info_spu_event_command): Remove some uses of is_mi_like_p.
8081 2018-04-30 Tom Tromey <tom@tromey.com>
8083 * python/py-framefilter.c (py_print_single_arg)
8084 (enumerate_locals, py_print_args, py_print_frame): Remove some
8085 uses of is_mi_like_p.
8087 2018-04-30 Tom Tromey <tom@tromey.com>
8090 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8091 * ui-out.h (ui_out::is_mi_like_p): Now const.
8092 (ui_out::do_is_mi_like_p): Now const.
8093 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8095 2018-04-30 Tom Tromey <tom@tromey.com>
8097 * varobj.c (varobj_set_visualizer): Use new_reference.
8098 * python/python.c (gdbpy_decode_line): Use new_reference.
8099 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8102 2018-04-30 Tom Tromey <tom@tromey.com>
8104 * varobj.c (install_new_value): Use new_reference.
8105 * value.h (value_incref): Return void. Swap intro comment with
8107 * value.c (set_value_parent): Use new_reference.
8108 (value_incref): Return void. Update intro comment.
8109 (release_value): Use new_reference.
8110 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8112 2018-04-30 Tom Tromey <tom@tromey.com>
8114 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8115 * gdb_bfd.h (new_bfd_ref): Remove.
8116 (gdb_bfd_open): Update comment.
8117 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8118 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8119 (gdb_bfd_fdopenr): Use new_reference.
8120 * exec.c (exec_file_attach): Use new_reference.
8122 2018-04-30 Tom Tromey <tom@tromey.com>
8124 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8127 2018-04-30 Tom Tromey <tom@tromey.com>
8129 * jit.c (jit_read_code_entry): Use type_align.
8130 * i386-tdep.c (i386_gdbarch_init): Don't call
8131 set_gdbarch_long_long_align_bit.
8132 * gdbarch.sh: Remove long_long_align_bit.
8133 * gdbarch.c, gdbarch.h: Rebuild.
8134 * arc-tdep.c (arc_type_align): New function.
8135 (arc_gdbarch_init): Use arc_type_align. Don't call
8136 set_gdbarch_long_long_align_bit.
8138 2018-04-30 Tom Tromey <tom@tromey.com>
8140 * rust-lang.c (rust_type_alignment): Remove.
8141 (rust_composite_type): Use type_align.
8143 2018-04-30 Tom Tromey <tom@tromey.com>
8145 * NEWS: Mention Type.align.
8146 * python/py-type.c (typy_get_alignof): New function.
8147 (type_object_getset): Add "alignof".
8149 2018-04-30 Tom Tromey <tom@tromey.com>
8153 * std-operator.def (UNOP_ALIGNOF): New operator.
8154 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8156 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8157 * c-lang.c (c_op_print_tab): Add alignof.
8158 * c-exp.y (ALIGNOF): New token.
8159 (exp): Add "ALIGNOF" production.
8160 (ident_tokens): Add _Alignof and alignof.
8162 2018-04-30 Tom Tromey <tom@tromey.com>
8164 * i386-tdep.c (i386_type_align): New function.
8165 (i386_gdbarch_init): Update.
8166 * gdbarch.sh (type_align): New method.
8167 * gdbarch.c, gdbarch.h: Rebuild.
8168 * arch-utils.h (default_type_align): Declare.
8169 * arch-utils.c (default_type_align): New function.
8170 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8171 (struct type) <align_log2>: New field.
8172 <instance_flags>: Now a bitfield.
8173 (TYPE_RAW_ALIGN): New macro.
8174 (type_align, type_raw_align, set_type_align): Declare.
8175 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8177 * dwarf2read.c (quirk_rust_enum): Set type alignment.
8178 (get_alignment, maybe_set_alignment): New functions.
8179 (read_structure_type, read_enumeration_type, read_array_type)
8180 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8181 (read_subrange_type, read_base_type): Set type alignment.
8183 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
8185 * dwarf2read.c (read_index_from_section): Use bool.
8187 2018-04-29 Fabian Groffen <grobian@gentoo.org>
8190 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8193 2018-04-29 John Reiser <jreiser@BitWagon.com>
8196 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8197 last step, and do it atomically.
8199 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
8201 * compile/compile-c-types.c (convert_int, convert_float):
8204 2018-04-27 Tom Tromey <tom@tromey.com>
8207 * rust-lang.c (rust_inclusive_range_type_p): New function.
8208 (rust_range): Handle inclusive ranges.
8209 (rust_compute_range): Likewise.
8210 * rust-exp.y (struct rust_op) <inclusive>: New field.
8211 (DOTDOTEQ): New constant.
8212 (range_expr): Add "..=" productions.
8213 (operator_tokens): Add "..=" token.
8214 (ast_range): Add "inclusive" parameter.
8215 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8217 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8219 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8220 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8222 * expprint.c (print_subexp_standard): Handle new bounds values.
8223 (dump_subexp_body_standard): Likewise.
8225 2018-04-27 Tom Tromey <tom@tromey.com>
8227 * configure: Rebuild.
8228 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8229 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8231 (class symbol_needs_eval_context): Likewise.
8232 * dwarf2read.c (mock_mapped_index::symbol_name_count)
8233 (mock_mapped_index::symbol_name_at): Use "override". Remove
8235 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8237 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8238 * aarch64-tdep.c (instruction_reader::read): Use "override".
8239 (instruction_reader_test::read): Likewise.
8240 * arm-tdep.c (instruction_reader::read): Use "override".
8241 (instruction_reader_thumb::read): Likewise.
8243 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
8246 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8247 instead of remote_send.
8248 (remote_send): Remove.
8250 2018-04-26 Pedro Alves <palves@redhat.com>
8252 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8253 find_function_start_sal instead of find_pc_line.
8255 2018-04-26 Pedro Alves <palves@redhat.com>
8257 * breakpoint.c (set_breakpoint_location_function): Handle
8259 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8260 * elfread.c (elf_symtab_read): Give data symbols with
8261 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8262 (elf_rel_plt_read): Update comment.
8263 * linespec.c (convert_linespec_to_sals): Handle
8265 (minsym_found): Handle mst_data_gnu_ifunc.
8266 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8267 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8268 * parse.c (find_minsym_type_and_address): Handle
8270 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8271 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8272 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8274 <mst_data_gnu_ifunc>: New enumerator.
8276 2018-04-26 Pedro Alves <palves@redhat.com>
8278 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8279 (lookup_minimal_symbol_by_pc_section): ... this. Replace
8280 'want_trampoline' parameter by a lookup_msym_prefer parameter.
8282 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8283 (lookup_minimal_symbol_by_pc): Adjust.
8284 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8285 (lookup_solib_trampoline_symbol_by_pc): Adjust.
8286 * minsyms.h (lookup_msym_prefer): New enum.
8287 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8288 parameter by a lookup_msym_prefer parameter.
8290 2018-04-26 Pedro Alves <palves@redhat.com>
8292 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8293 ends in "@plt" instead of looking at the symbol's section.
8295 2018-04-26 Pedro Alves <palves@redhat.com>
8297 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
8299 (find_pc_partial_function_gnu_ifunc): Rename to ...
8300 (find_pc_partial_function): ... this, and remove references to
8302 (find_pc_partial_function): Delete old implementation.
8303 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8305 2018-04-26 Pedro Alves <palves@redhat.com>
8307 * linespec.c (struct bound_minimal_symbol_search_key): New.
8308 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
8309 skip first line if we found a GNU ifunc minimal symbol by name.
8310 (compare_msymbols): Change parameters to work with a destructured
8312 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8315 2018-04-26 Pedro Alves <palves@redhat.com>
8317 * breakpoint.c (set_breakpoint_location_function): Don't resolve
8318 ifunc targets here. Instead, if we have an ifunc minsym, use its
8320 (add_location_to_breakpoint): Store the minsym and the objfile in
8321 the breakpoint location.
8322 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8323 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8324 Record the minsym in the sal.
8325 * symtab.h (symtab_and_line) <msymbol>: New field.
8327 2018-04-26 Pedro Alves <palves@redhat.com>
8329 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8330 unless we actually resolved the ifunc.
8332 2018-04-26 Pedro Alves <palves@redhat.com>
8334 * c-exp.y (variable production): Prefer ifunc minsyms over
8335 regular function symbols.
8336 * symtab.c (find_gnu_ifunc): New function.
8337 * minsyms.h (lookup_msym_prefer): New enum.
8338 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8339 parameter by a lookup_msym_prefer parameter.
8340 * symtab.h (find_gnu_ifunc): New declaration.
8342 2018-04-26 Pedro Alves <palves@redhat.com>
8344 * blockframe.c (find_gnu_ifunc_target_type): New function.
8345 (find_function_type): New.
8346 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8347 return a value with a memory address.
8348 (eval_call): For calls to GNU ifunc functions, try to find the
8349 type of the target function from the type that the resolver
8351 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8353 * infcall.c (find_function_return_type): Delete.
8354 (find_function_addr): Add 'function_type' parameter. For calls to
8355 GNU ifunc functions, try to find the type of the target function
8356 from the type that the resolver returns, and return it via
8358 (call_function_by_hand_dummy): Adjust to use the function type
8359 returned by find_function_addr.
8360 (find_function_addr): Add 'function_type' parameter and move
8362 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8365 2018-04-26 Pedro Alves <palves@redhat.com>
8367 * c-exp.y (variable production): Skip finding an alias for ifunc
8370 2018-04-26 Pedro Alves <palves@redhat.com>
8372 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8374 2018-04-25 Pedro Alves <palves@redhat.com>
8376 * infcmd.c (kill_command): Print the pid as string, not the whole
8377 thread's ptid. Add comment. s/has been killed/killed/ in output
8379 * remote.c (remote_detach_1): Print the pid as string, not the
8380 whole thread's ptid.
8382 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8383 Sergio Durigan Junior <sergiodj@redhat.com>
8384 Pedro Alves <palves@redhat.com>
8386 * infcmd.c (kill_command): Print message when inferior has
8388 * inferior.c (print_inferior_events): Remove 'static'. Set as
8390 (add_inferior): Improve message printed when
8391 'print_inferior_events' is on.
8392 (exit_inferior): Remove message printed when
8393 'print_inferior_events' is on.
8394 (detach_inferior): Improve message printed when
8395 'print_inferior_events' is on.
8396 (initialize_inferiors): Use 'add_inferior_silent' to set
8397 'current_inferior_'.
8398 * inferior.h (print_inferior_events): Declare here as
8400 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8401 '[Detaching...]' messages when 'print_inferior_events' is on.
8402 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
8403 as prefix/suffix for messages. Remove periods. Fix erroneous
8404 'Detaching after fork from child...', replace it by '... from
8406 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8407 prefix/suffix when printing 'Detaching...' messages. Print
8408 them when 'print_inferior_events' is on.
8409 * remote.c (remote_detach_1): Print message when detaching
8410 from inferior and '!is_fork_parent'.
8412 2018-04-24 Tom Tromey <tom@tromey.com>
8414 * cli-out.h: Reindent.
8416 2018-04-24 Tom Tromey <tom@tromey.com>
8418 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8419 (cli_ui_out::do_field_string): Use fputs_filtered.
8420 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8422 2018-04-23 Tom Tromey <tom@tromey.com>
8424 * guile/scm-frame.c (gdbscm_frame_read_var): Use
8425 gdb::unique_xmalloc_ptr.
8427 2018-04-23 Tom Tromey <tom@tromey.com>
8429 * configure: Rebuild.
8431 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
8434 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8435 prepare_for_testing. Set normal_bp to r_debug_state if target
8438 2018-04-21 Pedro Alves <palves@redhat.com>
8439 Rajendra SY <rajendra.sy@gmail.com>
8441 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8442 * remote.c (extended_remote_attach): In all-stop mode, mark the
8443 thread as executing.
8445 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8447 * thread.c (thread_apply_all_command): Fix comment.
8448 (thread_command): Fix comment.
8450 2018-04-10 Alan Hayward <alan.hayward@arm.com>
8452 * common/tdesc.h (tdesc_create_feature): Remove xml filename
8454 * features/aarch64-core.c (create_feature_aarch64_core):
8456 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8458 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8460 * features/i386/32bit-avx512.c
8461 (create_feature_i386_32bit_avx512): Likewise.
8462 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8464 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8466 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8468 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8470 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8472 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8474 * features/i386/64bit-avx512.c
8475 (create_feature_i386_64bit_avx512): Likewise.
8476 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8478 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8480 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8482 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8484 * features/i386/64bit-segments.c
8485 (create_feature_i386_64bit_segments): Likewise.
8486 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8488 * features/i386/x32-core.c
8489 (create_feature_i386_x32_core): Likewise.
8490 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8491 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8492 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8493 * target-descriptions.c: In generated code, don't pass xml
8496 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8498 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8499 (print_xml_feature::visit_post): Likewise.
8500 (print_xml_feature::visit): Likewise.
8501 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8502 (print_xml_feature): Add new class.
8503 * regformats/regdat.sh: Null xmltarget on feature targets.
8504 * target-descriptions.c (struct target_desc): Add xmltarget.
8505 (maintenance_check_tdesc_xml_convert): Add unittest function.
8506 (tdesc_get_features_xml): Add function to get xml.
8507 (maintenance_check_xml_descriptions): Test xml generation.
8508 * xml-tdesc.c (string_read_description_xml): Add function.
8509 * xml-tdesc.h (string_read_description_xml): Add declaration.
8511 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8513 * features/Makefile: Add feature marker to targets with new style
8514 target descriptions.
8515 * regformats/aarch64.dat: Regenerate.
8516 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8517 * regformats/i386/amd64-avx-linux.dat: Likewise.
8518 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8519 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8520 * regformats/i386/amd64-linux.dat: Likewise.
8521 * regformats/i386/amd64-mpx-linux.dat: Likewise.
8522 * regformats/i386/amd64.dat: Likewise.
8523 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8524 * regformats/i386/i386-avx-linux.dat: Likewise.
8525 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8526 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8527 * regformats/i386/i386-linux.dat: Likewise.
8528 * regformats/i386/i386-mmx-linux.dat: Likewise.
8529 * regformats/i386/i386-mpx-linux.dat: Likewise.
8530 * regformats/i386/i386.dat: Likewise.
8531 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8532 * regformats/i386/x32-avx-linux.dat: Likewise.
8533 * regformats/i386/x32-linux.dat: Likewise.
8534 * regformats/tic6x-c62x-linux.dat: Likewise.
8535 * regformats/tic6x-c64x-linux.dat: Likewise.
8536 * regformats/tic6x-c64xp-linux.dat: Likewise.
8537 * regformats/regdat.sh: Parse feature marker.
8539 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8541 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8542 (tdesc_osabi_name): Likewise.
8543 * target-descriptions.c (tdesc_architecture_name): Add new
8545 (tdesc_osabi_name): Likewise.
8547 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8549 * common/tdesc.c (tdesc_predefined_type): Move to here.
8550 (tdesc_named_type): Likewise.
8551 (tdesc_create_vector): Likewise.
8552 (tdesc_create_struct): Likewise.
8553 (tdesc_set_struct_size): Likewise.
8554 (tdesc_create_union): Likewise.
8555 (tdesc_create_flags): Likewise.
8556 (tdesc_create_enum): Likewise.
8557 (tdesc_add_field): Likewise.
8558 (tdesc_add_typed_bitfield): Likewise.
8559 (tdesc_add_bitfield): Likewise.
8560 (tdesc_add_flag): Likewise.
8561 (tdesc_add_enum_value): Likewise.
8562 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8563 (struct tdesc_type_vector): Likewise.
8564 (struct tdesc_type_field): Likewise.
8565 (struct tdesc_type_with_fields): Likewise.
8566 (tdesc_create_enum): Add declaration.
8567 (tdesc_add_typed_bitfield): Likewise.
8568 (tdesc_add_enum_value): Likewise.
8569 * target-descriptions.c (tdesc_type_field): Move from here.
8570 (tdesc_type_builtin): Likewise.
8571 (tdesc_type_vector): Likewise.
8572 (tdesc_type_with_fields): Likewise.
8573 (tdesc_predefined_types): Likewise.
8574 (tdesc_named_type): Likewise.
8575 (tdesc_create_vector): Likewise.
8576 (tdesc_create_struct): Likewise.
8577 (tdesc_set_struct_size): Likewise.
8578 (tdesc_create_union): Likewise.
8579 (tdesc_create_flags): Likewise.
8580 (tdesc_create_enum): Likewise.
8581 (tdesc_add_field): Likewise.
8582 (tdesc_add_typed_bitfield): Likewise.
8583 (tdesc_add_bitfield): Likewise.
8584 (tdesc_add_flag): Likewise.
8585 (tdesc_add_enum_value): Likewise.
8586 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8587 (tdesc_add_typed_bitfield): Likewise.
8588 (tdesc_add_enum_value): Likewise.
8590 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8592 * common/tdesc.c (tdesc_feature::accept): Move to here.
8593 (tdesc_feature::operator==): Likewise.
8594 (tdesc_create_reg): Likewise.
8595 * common/tdesc.h (tdesc_type_kind): Likewise.
8596 (struct tdesc_type): Likewise.
8597 (struct tdesc_feature): Likewise.
8598 * regformats/regdat.sh: Create a feature.
8599 * target-descriptions.c (tdesc_type_kind): Move from here.
8600 (tdesc_type): Likewise.
8601 (tdesc_type_up): Likewise.
8602 (tdesc_feature): Likewise.
8603 (tdesc_create_reg): Likewise.
8605 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8607 * Makefile.in: Add arch/tdesc.c
8608 * common/tdesc.c: New file.
8609 * common/tdesc.h (tdesc_element_visitor): Move to here.
8610 (tdesc_element): Likewise.
8611 (tdesc_reg): Likewise.
8612 (tdesc_reg_up): Likewise.
8613 * regformats/regdef.h (reg): Add offset to constructors.
8614 * target-descriptions.c (tdesc_element_visitor): Move from here.
8615 (tdesc_element): Likewise.
8616 (tdesc_reg): Likewise.
8617 (tdesc_reg_up): Likewise.
8619 2018-04-17 Tom Tromey <tom@tromey.com>
8621 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8624 2018-04-17 Tom Tromey <tom@tromey.com>
8626 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8628 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
8630 * symtab.c (print_symbol_info): Skip printing filename and line
8631 number when `last' is NULL.
8632 (symtab_symbol_info): Use empty string instead of NULL for first
8633 invocation of print_symbol_info.
8634 (rbreak_command): Pass NULL to `last' parameter of
8637 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
8639 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8642 2018-04-16 Pedro Alves <palves@redhat.com>
8644 * MAINTAINERS (sh): Remove.
8645 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8646 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8647 (ALLDEPFILES): Remove sh64-tdep.c.
8648 * NEWS: Mentions that support for SH-5/SH64 is removed.
8649 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8650 (sh*-*-openbsd*): Ditto.
8651 (sh64-*-elf*): Remove.
8653 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8654 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8655 * sh-tdep.c: No longer include "sh64-tdep.h".
8656 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8657 * sh64-tdep.c, sh64-tdep.h: Remove files.
8659 2018-04-16 Pedro Alves <palves@redhat.com>
8661 * MAINTAINERS: Remove m88k.
8662 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8663 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8664 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8665 * NEWS: Mention that support for m88k was removed.
8666 * configure.host (m88*-*-*): Remove support.
8667 * configure.nat (m88k-*-*): Remove support.
8668 * configure.tgt (m88*-*-openbsd*): Remove.
8669 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8671 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
8673 * configure.tgt (x86_tobjs): New variable.
8674 (amd64_tobjs, i386_tobjs): Use it.
8676 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8678 * symtab.c (print_symbol_info): Precede the symbol definition by
8679 the line number when available.
8680 * NEWS: Advertise this enhancement.
8682 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8684 * NEWS (New options): announce set/show record btrace cpu.
8685 * btrace.c: Include record-btrace.h.
8686 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8687 the vendor is unknown.
8688 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
8689 Maybe overwrite the btrace configuration's cpu.
8690 (btrace_compute_ftrace): Add cpu parameter. Update callers.
8691 (btrace_fetch): Add cpu parameter. Update callers.
8692 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8693 Maybe overwrite the btrace configuration's cpu. Skip enabling
8694 errata workarounds if the vendor is unknown.
8695 * python/py-record-btrace.c: Include record-btrace.h.
8696 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8697 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8698 * record-btrace.c (record_btrace_cpu_state_kind): New.
8699 (record_btrace_cpu): New.
8700 (set_record_btrace_cpu_cmdlist): New.
8701 (record_btrace_get_cpu): New.
8702 (require_btrace_thread, record_btrace_info)
8703 (record_btrace_resume_thread): Call record_btrace_get_cpu.
8704 (cmd_set_record_btrace_cpu_none): New.
8705 (cmd_set_record_btrace_cpu_auto): New.
8706 (cmd_set_record_btrace_cpu): New.
8707 (cmd_show_record_btrace_cpu): New.
8708 (_initialize_record_btrace): Initialize set/show record btrace cpu
8710 * record-btrace.h (record_btrace_get_cpu): New.
8712 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8714 * record.c (set_record_command): Fix typo in message.
8716 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8718 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8720 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8722 * infrun.c (process_event_stop_test): Call
8723 gdbarch_in_indirect_branch_thunk.
8724 * gdbarch.sh (in_indirect_branch_thunk): New.
8725 * gdbarch.c: Regenerated.
8726 * gdbarch.h: Regenerated.
8729 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8730 (HFILES_NO_SRCDIR): Add x86-tdep.h.
8731 (ALLDEPFILES): Add x86-tdep.c.
8732 * arch-utils.h (default_in_indirect_branch_thunk): New.
8733 * arch-utils.c (default_in_indirect_branch_thunk): New.
8734 * i386-tdep: Include x86-tdep.h.
8735 (i386_in_indirect_branch_thunk): New.
8736 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8738 * amd64-tdep: Include x86-tdep.h.
8739 (amd64_in_indirect_branch_thunk): New.
8740 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8742 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8745 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8746 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8747 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8750 2018-04-12 Tom Tromey <tom@tromey.com>
8752 * rust-lang.c (rust_print_struct_def): Remove univariant code.
8753 (rust_evaluate_subexp): Likewise.
8755 2018-04-12 Pedro Alves <palves@redhat.com>
8757 * procfs.c (procfs_detach): Make forward declaration's prototype
8758 match definition's protototype.
8759 (proc_get_LDT_entry): Remove stale do_cleanups call.
8761 2018-04-12 Pedro Alves <palves@redhat.com>
8763 * target.h (target_ops::to_has_exited): Delete.
8764 (target_has_exited): Delete.
8765 * target-delegates.c: Regenerate.
8767 2018-04-11 Pedro Alves <palves@redhat.com>
8769 * target.c (fileio_fh_t::t): Add comment.
8770 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8771 (target_fileio_close): Handle a NULL target.
8772 (invalidate_fileio_fh): New.
8773 (target_close): Call it.
8774 * remote.c (remote_hostio_send_command): No longer check whether
8775 remote_desc is open.
8777 2018-04-11 Pedro Alves <palves@redhat.com>
8779 * target.c (fileio_fh_t): Make it a named struct instead of a
8781 (fileio_fh_t::is_closed): New method.
8782 (DEF_VEC_O (fileio_fh_t)): Remove.
8783 (fileio_fhandles): Now a std::vector.
8784 (is_closed_fileio_fh): Delete.
8785 (acquire_fileio_fd): Adjust. Rename parameters.
8786 (release_fileio_fd): Adjust.
8787 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8788 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8789 (target_fileio_close): Adjust.
8791 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
8793 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8796 2018-04-10 Pedro Alves <palves@redhat.com>
8798 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8799 (scoped_finish_thread_state): New class.
8800 * infcmd.c (run_command_1): Use it instead of finish_thread_state
8802 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8803 (fetch_inferior_event, normal_stop): Likewise.
8804 * thread.c (finish_thread_state_cleanup): Delete.
8806 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8807 Pedro Alves <palves@redhat.com>
8809 * value.c: Include "selftest.h" and "common/array-view.h".
8810 (struct range) <operator ==>: New.
8811 (test_ranges_contain): New.
8812 (check_ranges_vector): New.
8813 (test_insert_into_bit_range_vector): New.
8814 (_initialize_values): Register selftests.
8815 * common/array-view.h (operator==, operator!=): New.
8817 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8819 * common/gdb_vecs.h (unordered_remove): Add overload that takes
8821 * inline-frame.c: Include <algorithm>.
8822 (struct inline_state): Add constructor.
8823 (inline_state_s): Remove.
8824 (DEF_VEC_O(inline_state_s)): Remove.
8825 (inline_states): Change type to std::vector.
8826 (find_inline_frame_state): Adjust to std::vector.
8827 (allocate_inline_frame_state): Remove.
8828 (clear_inline_frame_state): Adjust to std::vector.
8829 (skip_inline_frames): Adjust to std::vector.
8831 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8833 * tracepoint.h (struct trace_state_variable): Add constructor.
8834 <name>: Change type to std::string.
8835 * tracepoint.c (tsv_s): Remove.
8836 (DEF_VEC_O(tsv_s)): Remove.
8837 (tvariables): Change to std::vector.
8838 (create_trace_state_variable): Adjust to std::vector.
8839 (find_trace_state_variable): Likewise.
8840 (find_trace_state_variable_by_number): Likewise.
8841 (delete_trace_state_variable): Likewise.
8842 (trace_variable_command): Adjust to std::string.
8843 (delete_trace_variable_command): Likewise.
8844 (tvariables_info_1): Adjust to std::vector.
8845 (save_trace_state_variables): Likewise.
8846 (start_tracing): Likewise.
8847 (merge_uploaded_trace_state_variables): Adjust to std::vector
8849 * target.h (struct target_ops)
8850 <to_download_trace_state_variable>: Pass reference to
8851 trace_state_variable.
8852 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8853 * target-delegates.c: Re-generate.
8854 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8855 (mi_tsv_deleted): Likewise.
8856 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8857 * remote.c (remote_download_trace_state_variable): Change
8858 pointer to reference and adjust.
8859 * make-target-delegates (parse_argtypes): Handle references.
8860 (write_function_header): Likewise.
8861 (munge_type): Likewise.
8863 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8865 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8866 string_view-selftests.c.
8867 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8869 * unittests/basic_string_view/cons/char/1.cc: Likewise.
8870 * unittests/basic_string_view/cons/char/2.cc: Likewise.
8871 * unittests/basic_string_view/cons/char/3.cc: Likewise.
8872 * unittests/basic_string_view/element_access/char/1.cc:
8874 * unittests/basic_string_view/element_access/char/empty.cc:
8876 * unittests/basic_string_view/element_access/char/front_back.cc:
8878 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8879 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8881 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8883 * unittests/basic_string_view/modifiers/swap/char/1.cc:
8885 * unittests/basic_string_view/operations/compare/char/1.cc:
8887 * unittests/basic_string_view/operations/compare/char/13650.cc:
8889 * unittests/basic_string_view/operations/copy/char/1.cc:
8891 * unittests/basic_string_view/operations/data/char/1.cc:
8893 * unittests/basic_string_view/operations/find/char/1.cc:
8895 * unittests/basic_string_view/operations/find/char/2.cc:
8897 * unittests/basic_string_view/operations/find/char/3.cc:
8899 * unittests/basic_string_view/operations/find/char/4.cc:
8901 * unittests/basic_string_view/operations/rfind/char/1.cc:
8903 * unittests/basic_string_view/operations/rfind/char/2.cc:
8905 * unittests/basic_string_view/operations/rfind/char/3.cc:
8907 * unittests/basic_string_view/operations/substr/char/1.cc:
8909 * unittests/basic_string_view/operators/char/2.cc: Likewise.
8910 * unittests/string_view-selftests.c: New file.
8912 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8914 * unittests/basic_string_view/capacity/1.cc: New file.
8915 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8916 * unittests/basic_string_view/cons/char/1.cc: New file.
8917 * unittests/basic_string_view/cons/char/2.cc: New file.
8918 * unittests/basic_string_view/cons/char/3.cc: New file.
8919 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8920 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8921 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8922 * unittests/basic_string_view/element_access/char/1.cc: New file.
8923 * unittests/basic_string_view/element_access/char/2.cc: New file.
8924 * unittests/basic_string_view/element_access/char/empty.cc: New file.
8925 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8926 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8927 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8928 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8929 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8930 * unittests/basic_string_view/include.cc: New file.
8931 * unittests/basic_string_view/inserters/char/1.cc: New file.
8932 * unittests/basic_string_view/inserters/char/2.cc: New file.
8933 * unittests/basic_string_view/inserters/char/3.cc: New file.
8934 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8935 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8936 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8937 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8938 * unittests/basic_string_view/literals/types.cc: New file.
8939 * unittests/basic_string_view/literals/values.cc: New file.
8940 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8941 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8942 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8943 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8944 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8945 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8946 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8947 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8948 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8949 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8950 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8951 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8952 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8953 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8954 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8955 * unittests/basic_string_view/operations/data/char/1.cc: New file.
8956 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8957 * unittests/basic_string_view/operations/find/char/1.cc: New file.
8958 * unittests/basic_string_view/operations/find/char/2.cc: New file.
8959 * unittests/basic_string_view/operations/find/char/3.cc: New file.
8960 * unittests/basic_string_view/operations/find/char/4.cc: New file.
8961 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8962 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8963 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8964 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8965 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8966 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8967 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8968 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8969 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8970 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8971 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8972 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8973 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8974 * unittests/basic_string_view/operators/char/2.cc: New file.
8975 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8976 * unittests/basic_string_view/range_access/char/1.cc: New file.
8977 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8978 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8979 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8980 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8981 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8982 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8983 * unittests/basic_string_view/requirements/typedefs.cc: New file.
8984 * unittests/basic_string_view/typedefs.cc: New file.
8985 * unittests/basic_string_view/types/1.cc: New file.
8987 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8989 * common/gdb_string_view.h: Remove libstdc++ implementation
8990 details, adjust to gdb reality.
8991 * common/gdb_string_view.tcc: Likewise.
8992 * cli/cli-script.c (struct string_view): Remove.
8993 (user_args) <m_args>: Change element type to gdb::string_view.
8994 (user_args::insert_args): Adjust.
8996 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8998 * common/gdb_string_view.h: New file.
8999 * common/gdb_string_view.tcc: New file.
9001 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
9003 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9004 * configure: Re-generate.
9006 2018-04-09 Pedro Alves <palves@redhat.com>
9008 * gdbarch.sh: Include "observable.h" instead of "observer.h".
9009 (set_target_gdbarch): Call
9010 gdb::observers::architecture_changed.notify instead of
9011 observer_notify_architecture_changed.
9013 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9015 * tracepoint.c (struct current_traceframe_cleanup): Remove.
9016 (do_restore_current_traceframe_cleanup): Remove.
9017 (restore_current_traceframe_cleanup_dtor): Remove.
9018 (make_cleanup_restore_current_traceframe): Remove.
9019 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9021 * tracepoint.h (struct scoped_restore_current_traceframe): New.
9022 * infrun.c (fetch_inferior_event): Use
9023 scoped_restore_current_traceframe.
9025 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9027 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9029 <n_allocated_type_units>: Remove.
9030 <all_type_units>: Change to std::vector.
9031 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9032 to std::vector change.
9033 (dwarf2_per_objfile::get_cutu): Likewise.
9034 (dwarf2_per_objfile::get_tu): Likewise.
9035 (create_signatured_type_table_from_index): Likewise.
9036 (create_signatured_type_table_from_debug_names): Likewise.
9037 (dw2_symtab_iter_next): Likewise.
9038 (dw2_print_stats): Likewise.
9039 (dw2_expand_all_symtabs): Likewise.
9040 (dw2_expand_marked_cus): Likewise.
9041 (dw2_debug_names_iterator::next): Likewise.
9042 (dwarf2_initialize_objfile): Likewise.
9043 (add_signatured_type_cu_to_table): Likewise.
9044 (create_all_type_units): Likewise.
9045 (add_type_unit): Likewise.
9046 (struct tu_abbrev_offset): Add constructor.
9047 (build_type_psymtabs_1): Adjust to std::vector change.
9048 (print_tu_stats): Likewise.
9049 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9050 (write_debug_names): Likewise.
9052 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9054 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9055 Make an std::vector.
9056 <n_comp_units>: Remove.
9057 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9058 to std::vector change.
9059 (dwarf2_per_objfile::get_cutu): Likewise.
9060 (dwarf2_per_objfile::get_cu): Likewise.
9061 (create_cus_from_index): Likewise.
9062 (create_addrmap_from_index): Likewise.
9063 (create_addrmap_from_aranges): Likewise.
9064 (dwarf2_read_index): Likewise.
9065 (dw2_find_last_source_symtab): Likewise.
9066 (dw2_map_symtabs_matching_filename): Likewise.
9067 (dw2_symtab_iter_next): Likewise.
9068 (dw2_print_stats): Likewise.
9069 (dw2_expand_all_symtabs): Likewise.
9070 (dw2_expand_symtabs_with_fullname): Likewise.
9071 (dw2_expand_marked_cus): Likewise.
9072 (dw2_map_symbol_filenames): Likewise.
9073 (create_cus_from_debug_names): Likewise.
9074 (dwarf2_read_debug_names): Likewise.
9075 (dw2_debug_names_iterator::next): Likewise.
9076 (dwarf2_initialize_objfile): Likewise.
9077 (set_partial_user): Likewise.
9078 (dwarf2_build_psymtabs_hard): Likewise.
9079 (read_comp_units_from_section): Remove arguments, adjust to
9081 (create_all_comp_units): Adjust to std::vector and
9082 read_comp_units_from_section changes.
9083 (dwarf2_find_containing_comp_unit): Adjust to std::vector
9085 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9086 (psyms_seen_size): Likewise.
9087 (write_gdbindex): Likewise.
9088 (write_debug_names): Likewise.
9090 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9092 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9093 with dwarf2_per_objfile.
9094 (create_cus_from_index): Likewise.
9095 (create_signatured_type_table_from_index): Likewise.
9096 (dwarf2_read_index): Likewise.
9097 (dwarf2_initialize_objfile): Likewise.
9098 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
9099 per_cu rather than get_dwarf2_per_objfile.
9101 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9103 * dwarf2read.h (struct signatured_type): Forward declare.
9104 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9106 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9107 (dw2_get_cutu): ...this.
9108 (dwarf2_per_objfile::get_cu): Rename from...
9109 (dw2_get_cu): ...this.
9110 (dwarf2_per_objfile::get_tu): New.
9111 (create_addrmap_from_index): Adjust.
9112 (create_addrmap_from_aranges): Adjust.
9113 (dw2_find_last_source_symtab): Adjust.
9114 (dw2_map_symtabs_matching_filename): Adjust.
9115 (dw2_symtab_iter_next): Adjust.
9116 (dw2_print_stats): Adjust.
9117 (dw2_expand_all_symtabs): Adjust.
9118 (dw2_expand_symtabs_with_fullname): Adjust.
9119 (dw2_expand_marked_cus): Adjust.
9120 (dw_expand_symtabs_matching_file_matcher): Adjust.
9121 (dw2_map_symbol_filenames): Adjust.
9122 (dw2_debug_names_iterator::next): Adjust.
9123 (dwarf2_initialize_objfile): Adjust.
9124 (set_partial_user): Adjust.
9125 (dwarf2_build_psymtabs_hard): Adjust.
9127 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9129 * dwarf2read.c (create_signatured_type_table_from_debug_names):
9130 Remove unused variables.
9131 (dw2_map_symtabs_matching_filename): Likewise.
9132 (dwarf2_record_block_ranges): Likewise.
9133 (dwarf2_read_addr_index): Likewise.
9134 (follow_die_offset): Likewise.
9136 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9138 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9139 to symbol_file_add_main.
9141 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9144 * mi/mi-console.c (do_fputc_async_safe): New.
9145 (mi_console_file::write_async_safe): New.
9146 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9147 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9149 * ui-file.c (ui_file::putstrn): Adjust call to
9150 fputstrn_unfiltered.
9151 * utils.c (printchar): Replace do_fputs and do_fprintf
9152 parameters by do_fputc.
9153 (fputstr_filtered): Adjust call to printchar.
9154 (fputstr_unfiltered): Likewise.
9155 (fputstrn_filtered): Likewise.
9156 (fputstrn_unfiltered): Add do_fputc parameter, pass to
9158 * utils.h (do_fputc_ftype): New typedef.
9159 (fputstrn_unfiltered): Add do_fputc parameter.
9161 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9163 * regformats/i386/i386-avx.dat: Remove.
9165 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9168 * amd64-tdep.c (amd64_none_init_abi): New function.
9169 (amd64_x32_none_init_abi): New function.
9170 (_initialize_amd64_tdep): Register handlers for x86-64 and
9171 x64_32 with GDB_OSABI_NONE.
9172 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9173 GDB_OSABI_NONE osabi.
9175 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9178 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9180 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9181 * osabi.c (gdb_osabi_names): Add "unknown" entry.
9183 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9185 * common/byte-vector.h (char_vector): New type.
9186 * target.h (target_read_alloc): Return
9187 gdb::optional<byte_vector>.
9188 (target_read_stralloc): Return gdb::optional<char_vector>.
9189 (target_get_osdata): Return gdb::optional<char_vector>.
9190 * target.c (target_read_alloc_1): Templatize. Replacement
9191 manual memory management with vector.
9192 (target_read_alloc): Change return type, adjust.
9193 (target_read_stralloc): Change return type, adjust.
9194 (target_get_osdata): Change return type, adjust.
9195 * auxv.c (struct auxv_info) <length>: Remove.
9196 <data>: Change type to gdb::optional<byte_vector>.
9197 (auxv_inferior_data_cleanup): Free auxv_info with delete.
9198 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9199 (target_auxv_search): Adjust.
9200 (fprint_target_auxv): Adjust.
9201 * avr-tdep.c (avr_io_reg_read_command): Adjust.
9202 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9203 (linux_make_corefile_notes): Adjust.
9204 * osdata.c (get_osdata): Adjust.
9205 * remote.c (remote_get_threads_with_qxfer): Adjust.
9206 (remote_memory_map): Adjust.
9207 (remote_traceframe_info): Adjust.
9208 (btrace_read_config): Adjust.
9209 (remote_read_btrace): Adjust.
9210 (remote_pid_to_exec_file): Adjust.
9211 * solib-aix.c (solib_aix_get_library_list): Adjust.
9212 * solib-dsbt.c (decode_loadmap): Don't free buf.
9213 (dsbt_get_initial_loadmaps): Adjust.
9214 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9215 * solib-target.c (solib_target_current_sos): Adjust.
9216 * tracepoint.c (sdata_make_value): Adjust.
9217 * xml-support.c (xinclude_start_include): Adjust.
9218 (xml_fetch_content_from_file): Adjust.
9219 * xml-support.h (xml_fetch_another): Change return type.
9220 (xml_fetch_content_from_file): Change return type.
9221 * xml-syscall.c (xml_init_syscalls_info): Adjust.
9222 * xml-tdesc.c (file_read_description_xml): Adjust.
9223 (fetch_available_features_from_target): Change return type.
9224 (target_fetch_description_xml): Adjust.
9225 (target_read_description_xml): Adjust.
9227 2018-04-06 Tom Tromey <tom@tromey.com>
9229 * value.c (~value): Update.
9230 (struct value) <contents>: Now unique_xmalloc_ptr.
9231 (value_contents_bits_eq, allocate_value_contents)
9232 (value_contents_raw, value_contents_all_raw)
9233 (value_contents_for_printing, value_contents_for_printing_const)
9234 (set_value_enclosing_type): Update.
9236 2018-04-06 Tom Tromey <tom@tromey.com>
9238 * value.c (range_s): Remove typedef, VEC.
9239 (struct range): Add operator<.
9240 (range_lessthan): Remove.
9241 (ranges_contain): Change type.
9243 (struct value) <unavailable, optimized_out>: Now std::vector.
9244 (value_entirely_available)
9245 (value_entirely_covered_by_range_vector)
9246 (value_entirely_unavailable, value_entirely_optimized_out):
9248 (insert_into_bit_range_vector): Change argument type.
9249 (find_first_range_overlap): Likewise.
9250 (struct ranges_and_idx, value_contents_bits_eq)
9251 (require_not_optimized_out, require_available): Update.
9252 (ranges_copy_adjusted): Change argument types.
9253 (value_optimized_out, value_copy, value_fetch_lazy): Update.
9255 2018-04-06 Tom Tromey <tom@tromey.com>
9257 * value.c (~value): Update.
9258 (struct value) <parent>: Now a value_ref_ptr.
9259 (value_parent, set_value_parent, value_address, value_copy):
9262 2018-04-06 Tom Tromey <tom@tromey.com>
9264 * value.c (struct value): Add constructor, destructor, and member
9266 (allocate_value_lazy, value_decref): Update.
9268 2018-04-06 Tom Tromey <tom@tromey.com>
9270 * value.c (struct value) <released, next>: Remove.
9271 (all_values): Now a std::vector.
9272 (allocate_value_lazy): Update.
9273 (value_next): Remove.
9274 (value_mark, value_free_to_mark, release_value)
9275 (value_release_to_mark): Update.
9277 2018-04-06 Tom Tromey <tom@tromey.com>
9279 * value.h (fetch_subexp_value, value_release_to_mark): Update.
9280 (free_value_chain): Remove.
9281 * value.c (free_value_chain): Remove.
9282 (value_release_to_mark): Return a std::vector.
9283 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9285 (check_condition): Update.
9286 * eval.c (fetch_subexp_value): Change "val_chain" to a
9288 * breakpoint.c (update_watchpoint): Update.
9289 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9291 2018-04-06 Tom Tromey <tom@tromey.com>
9293 * value.h (free_all_values): Remove.
9294 * value.c (free_all_values): Remove.
9296 2018-04-06 Tom Tromey <tom@tromey.com>
9298 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9299 (value_history_chain, value_history_count): Remove.
9300 (value_history): New global.
9301 (record_latest_value, access_value_history, show_values)
9302 (preserve_values): Update.
9304 2018-04-06 Tom Tromey <tom@tromey.com>
9306 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9307 * varobj.c (varobj_set_display_format, varobj_set_value)
9308 (install_default_visualizer, construct_visualizer)
9309 (install_new_value, ~varobj, varobj_get_value_type)
9310 (my_value_of_variable, varobj_editable_p): Update.
9311 * c-varobj.c (c_describe_child, c_value_of_variable)
9312 (cplus_number_of_children, cplus_describe_child): Update.
9313 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9314 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9315 (ada_value_of_variable, ada_value_is_changeable_p): Update.
9317 2018-04-06 Tom Tromey <tom@tromey.com>
9319 * printcmd.c (last_examine_address): Change type to
9321 (do_examine, x_command): Update.
9323 2018-04-06 Tom Tromey <tom@tromey.com>
9325 * value.c (release_value): Update.
9326 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9327 (struct bpstats) <val>: Now a value_ref_ptr.
9328 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9329 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9330 (~watchpoint, print_it_watchpoint, watch_command_1)
9331 (invalidate_bp_value_on_memory_change): Update.
9333 2018-04-06 Tom Tromey <tom@tromey.com>
9335 * varobj.c (varobj_clear_saved_item)
9336 (update_dynamic_varobj_children, install_new_value, ~varobj):
9338 * value.h (value_incref): Move declaration earlier.
9339 (value_decref): Rename from value_free.
9340 (struct value_ref_policy): New.
9341 (value_ref_ptr): New typedef.
9342 (struct value_deleter): Remove.
9343 (gdb_value_up): Remove typedef.
9344 (release_value): Change return type.
9345 (release_value_or_incref): Remove.
9346 * value.c (set_value_parent): Update.
9347 (value_incref): Change return type.
9348 (value_decref): Rename from value_free.
9349 (value_free_to_mark, free_all_values, free_value_chain): Update.
9350 (release_value): Return value_ref_ptr.
9351 (release_value_or_incref): Remove.
9352 (record_latest_value, set_internalvar, clear_internalvar):
9354 * stack.c (info_frame_command): Don't call value_free.
9355 * python/py-value.c (valpy_dealloc, valpy_new)
9356 (value_to_value_object): Update.
9357 * printcmd.c (do_examine): Update.
9358 * opencl-lang.c (lval_func_free_closure): Update.
9359 * mi/mi-main.c (register_changed_p): Don't call value_free.
9360 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9361 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9362 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9364 * guile/scm-value.c (vlscm_free_value_smob)
9365 (vlscm_scm_from_value): Update.
9366 * frame.c (frame_register_unwind, frame_unwind_register_signed)
9367 (frame_unwind_register_unsigned, get_frame_register_bytes)
9368 (put_frame_register_bytes): Don't call value_free.
9369 * findvar.c (address_from_register): Don't call value_free.
9370 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9371 * dwarf2loc.c (entry_data_value_free_closure)
9372 (value_of_dwarf_reg_entry, free_pieced_value_closure)
9373 (dwarf2_evaluate_loc_desc_full): Update.
9374 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9375 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9376 (~watchpoint, watch_command_1)
9377 (invalidate_bp_value_on_memory_change): Update.
9378 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9380 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
9383 * warning.m4: Add -Wno-error=deprecated-register.
9384 * configure: Re-generate.
9386 2018-04-05 Tom Tromey <tom@tromey.com>
9388 * linespec.h: Remove include of "vec.h".
9390 2018-04-05 Tom Tromey <tom@tromey.com>
9392 * linespec.c (typep): Remove typedef.
9393 (find_methods, find_superclass_methods): Take a std::vector.
9394 (find_method): Use std::vector.
9396 2018-04-05 Tom Tromey <tom@tromey.com>
9398 * utils.c (compare_strings): Remove.
9399 * utils.h (compare_strings): Remove.
9400 * objc-lang.h (find_imps): Update.
9401 * objc-lang.c (find_methods): Take a std::vector.
9402 (uniquify_strings, find_imps): Likewise.
9403 * linespec.c (find_methods): Take a std::vector.
9404 (decode_objc): Use std::vector.
9405 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9407 (find_method, find_function_symbols): Use std::vector.
9409 2018-04-05 Tom Tromey <tom@tromey.com>
9411 * completer.c (completion_tracker::completion_tracker): Remove
9413 (completion_tracker::discard_completions): Likewise.
9414 * breakpoint.c (ambiguous_names_p): Remove cast.
9415 * ada-lang.c (_initialize_ada_language): Remove cast.
9416 * utils.h (streq): Update.
9417 (streq_hash): Add new declaration.
9418 * utils.c (streq): Return bool.
9419 (streq_hash): New function.
9421 2018-04-05 Tom Tromey <tom@tromey.com>
9423 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9424 Remove a string copy.
9426 2018-04-05 Tom Tromey <tom@tromey.com>
9428 * linespec.c (filter_results): Use std::vector.
9429 (decode_line_2, decode_line_full): Update.
9431 2018-04-05 Tom Tromey <tom@tromey.com>
9433 * linespec.c (canonical_to_fullform): Return std::string.
9434 (filter_results): Update.
9435 (struct decode_line_2_item): Add constructor.
9436 <fullform, displayform>: Now std::string.
9437 (decode_line_2_compare_items): Now a std::sort comparator.
9438 (decode_line_2): Update.
9440 2018-04-05 Tom Tromey <tom@tromey.com>
9442 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9443 (unexpected_linespec_error): Update.
9444 (linespec_parse_basic, parse_linespec): Update.
9446 2018-04-05 Tom Tromey <tom@tromey.com>
9448 * linespec.c (linespec_parse_basic): Reindent.
9450 2018-04-05 Tom Tromey <tom@tromey.com>
9452 * minsyms.h (iterate_over_minimal_symbols): Update.
9453 * minsyms.c (iterate_over_minimal_symbols): Take a
9455 * linespec.c (struct collect_minsyms): Remove.
9456 (compare_msyms): Now a std::sort comparator.
9457 (add_minsym): Add parameters.
9458 (search_minsyms_for_name): Update. Use std::vector.
9460 2018-04-03 Tom Tromey <tom@tromey.com>
9462 * mipsread.c (read_alphacoff_dynamic_symtab): Use
9465 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9467 * MAINTAINERS (Write After Approval): Add Weimin Pan.
9469 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9472 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
9473 printing static type.
9475 2018-04-01 Tom Tromey <tom@tromey.com>
9477 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9478 (rs6000_xfer_shared_libraries): Update.
9480 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
9482 * common/gdb_vecs.h (char_ptr): Remove.
9483 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9485 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9487 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9489 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9491 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9493 * tracepoint.h (struct uploaded_tp): Initialize fields.
9494 <actions, step_actions, cmd_strings>: Change type to
9495 std::vector<char *>.
9496 * tracepoint.c (get_uploaded_tp): Allocate with new.
9497 (free_uploaded_tps): Free with delete.
9498 (parse_tracepoint_definition): Adjust to std::vector change.
9499 * breakpoint.c (read_uploaded_action): Likewise.
9500 (create_tracepoint_from_upload): Likewise.
9501 * ctf.c (ctf_write_uploaded_tp): Likewise.
9502 (SET_ARRAY_FIELD): Likewise.
9503 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9505 2018-03-30 Tom Tromey <tom@tromey.com>
9507 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
9509 (svr4_keep_data_in_core): Update.
9510 (svr4_read_so_list): Update.
9512 2018-03-30 Tom Tromey <tom@tromey.com>
9514 * windows-nat.c (handle_output_debug_string, handle_exception):
9516 * target.h (target_read_string): Update.
9517 * target.c (target_read_string): Change "string" to
9519 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9521 * solib-frv.c (frv_current_sos): Update.
9522 * solib-dsbt.c (dsbt_current_sos): Update.
9523 * solib-darwin.c (darwin_current_sos): Update.
9524 * linux-thread-db.c (inferior_has_bug): Update.
9525 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9526 Update. Remove alloca.
9527 * ada-lang.c (ada_main_name): Update.
9529 2018-03-30 Tom Tromey <tom@tromey.com>
9531 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9532 (struct dwo_file_deleter): New.
9533 (dwo_file_up): New typedef.
9534 (open_and_init_dwo_file): Use dwo_file_up.
9535 (free_dwo_file_cleanup): Remove.
9537 2018-03-30 Tom Tromey <tom@tromey.com>
9539 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9540 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9542 2018-03-30 Tom Tromey <tom@tromey.com>
9544 * dwarf2read.c (class free_cached_comp_units): New class.
9545 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9546 (free_cached_comp_units): Remove function.
9548 2018-03-30 Tom Tromey <tom@tromey.com>
9550 * utils.h (make_cleanup_unpush_target): Remove.
9551 * inf-ptrace.c (struct target_unpusher): New.
9552 (target_unpush_up) New typedef.
9553 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9555 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9557 2018-03-27 Tom Tromey <tom@tromey.com>
9559 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9561 2018-03-27 Pedro Alves <palves@redhat.com>
9562 Tom Tromey <tom@tromey.com>
9564 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9565 destructor. Now a class.
9566 (gdb_readline_wrapper_cleanup): Remove function.
9567 (gdb_readline_wrapper): Remove cleanups.
9569 2018-03-27 Tom Tromey <tom@tromey.com>
9571 * typeprint.h (struct type_print_options) <local_typedefs,
9572 global_typedefs>: Remove "struct" keyword.
9573 (class typedef_hash_table): New class.
9574 (recursively_update_typedef_hash, add_template_parameters)
9575 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9576 (find_typedef_in_hash): Don't declare.
9577 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9578 (typedef_hash_table::recursively_update): Rename from
9579 recursively_update_typedef_hash. Now a member.
9580 (typedef_hash_table::add_template_parameters): Rename from
9581 add_template_parameters. Now a member.
9582 (typedef_hash_table::typedef_hash_table): Now a constructor;
9583 rename from create_typedef_hash.
9584 (typedef_hash_table::~typedef_hash_table): Now a destructor;
9585 rename from free_typedef_hash.
9586 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9587 (do_free_global_table): Remove.
9588 (typedef_hash_table::typedef_hash_table): New constructor; renamed
9589 from copy_type_recursive.
9590 (create_global_typedef_table): Remove.
9591 (typedef_hash_table::find_global_typedef): Now a member of
9593 (typedef_hash_table::find_typedef): Rename from
9594 find_typedef_in_hash; now a member.
9595 (whatis_exp): Update.
9596 * extension.h (struct ext_lang_type_printers): Add constructor and
9598 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9600 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9601 Now a constructor; rename from start_ext_lang_type_printers.
9602 (ext_lang_type_printers): Now a destructor; rename from
9603 free_ext_lang_type_printers.
9604 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9606 (c_type_print_base_struct_union): Update. Remove cleanups.
9608 2018-03-27 Tom Tromey <tom@tromey.com>
9610 * dwarf-index-write.c: Include <cmath>.
9612 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9614 * NEWS: Add entry describing new "set|show varsize-limit" command.
9615 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9617 * printcmd.c (_initialize_printcmd): Add "set var" alias of
9620 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
9622 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9624 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9625 * dwarf-index-common.c: New file.
9626 * dwarf-index-common.h: New file.
9627 * dwarf-index-write.c: New file.
9628 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9629 (struct dwarf2_section_info): Move from here.
9630 (dwarf2_section_info_def): Likewise.
9631 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9632 (offset_type): Likewise.
9633 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9634 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9635 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9636 (byte_swap): Likewise.
9637 (MAYBE_SWAP): Likewise.
9638 (dwarf2_per_cu_ptr): Likewise.
9639 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9640 (struct tu_stats): Likewise.
9641 (struct dwarf2_per_objfile): Likewise.
9642 (struct dwarf2_per_cu_data): Likewise.
9643 (struct signatured_type): Likewise.
9644 (sig_type_ptr): Likewise.
9645 (DEF_VEC_P (sig_type_ptr)): Likewise.
9646 (INDEX4_SUFFIX): Likewise.
9647 (INDEX5_SUFFIX): Likewise.
9648 (DEBUG_STR_SUFFIX): Likewise.
9649 (dwarf2_read_section): Make non-static.
9650 (mapped_index_string_hash): Move from here.
9651 (dwarf5_djb_hash): Likewise.
9652 (file_write): Likewise.
9653 (class data_buf): Likewise.
9654 (struct symtab_index_entry): Likewise.
9655 (struct mapped_symtab): Likewise.
9656 (find_slot): Likewise.
9657 (hash_expand): Likewise.
9658 (add_index_entry): Likewise.
9659 (uniquify_cu_indices): Likewise.
9660 (class c_str_view): Likewise.
9661 (class c_str_view_hasher): Likewise.
9662 (class vector_hasher): Likewise.
9663 (write_hash_table): Likewise.
9664 (psym_index_map): Likewise.
9665 (struct addrmap_index_data): Likewise.
9666 (add_address_entry): Likewise.
9667 (add_address_entry_worker): Likewise.
9668 (write_address_map): Likewise.
9669 (symbol_kind): Likewise.
9670 (write_psymbols): Likewise.
9671 (struct signatured_type_index_data): Likewise.
9672 (write_one_signatured_type): Likewise.
9673 (recursively_count_psymbols): Likewise.
9674 (recursively_write_psymbols): Likewise.
9675 (class debug_names): Likewise.
9676 (check_dwarf64_offsets): Likewise.
9677 (psyms_seen_size): Likewise.
9678 (write_gdbindex): Likewise.
9679 (write_debug_names): Likewise.
9680 (assert_file_size): Likewise.
9681 (write_psymtabs_to_index): Likewise.
9682 (save_gdb_index_command): Likewise.
9683 (_initialize_dwarf2_read): Don't register the "save gdb-index"
9685 * dwarf2read.h: New file.
9687 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9690 * dwarf2read.c (dwarf2_physname): Do not return the demangled
9691 symbol name if the CU's language stores symbol names in linkage
9693 * language.h (struct language_defn)
9694 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
9695 all instances of this struct.
9697 2018-03-26 Tom Tromey <tom@tromey.com>
9699 * stack.c (backtrace_command_1): Remove verbose code.
9701 2018-03-26 Tom Tromey <tom@tromey.com>
9703 * python/py-framefilter.c (py_print_type): Don't catch
9704 exceptions. Return void.
9705 (py_print_value): Likewise.
9706 (py_print_single_arg): Likewise.
9707 (enumerate_args): Don't catch exceptions.
9708 (py_print_args): Likewise.
9709 (py_print_frame): Likewise.
9710 (gdbpy_apply_frame_filter): Catch exceptions here.
9712 2018-03-26 Tom Tromey <tom@tromey.com>
9714 * stack.c (_initialize_stack): Remove trailing newlines from help
9715 text. Add "Usage" line to "backtrace" help.
9717 2018-03-26 Tom Tromey <tom@tromey.com>
9720 * python/py-framefilter.c (py_print_args): Call wrap_hint.
9722 2018-03-26 Tom Tromey <tom@tromey.com>
9724 * python/py-framefilter.c (py_print_single_arg): Return
9725 EXT_LANG_BT_ERROR from catch.
9727 2018-03-26 Tom Tromey <tom@tromey.com>
9730 * stack.c (backtrace_command_1): Move some code into no-filters
9733 2018-03-26 Tom Tromey <tom@tromey.com>
9735 * python/py-framefilter.c (throw_quit_or_print_exception): New
9737 (gdbpy_apply_frame_filter): Use it.
9739 2018-03-26 Tom Tromey <tom@tromey.com>
9742 * python/py-framefilter.c (py_print_type, py_print_value)
9743 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9746 2018-03-26 Tom Tromey <tom@tromey.com>
9748 * python/py-framefilter.c (enumerate_args): Use
9749 gdb::unique_xmalloc_ptr.
9751 2018-03-26 Tom Tromey <tom@tromey.com>
9753 * python/py-framefilter.c (py_print_frame): Return
9755 (gdbpy_apply_frame_filter): Update comment.
9756 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9758 <EXT_LANG_BT_NO_FILTERS>: Change value.
9760 2018-03-26 Tom Tromey <tom@tromey.com>
9763 * stack.c (backtrace_command): Parse "hide" argument.
9764 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9765 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9768 2018-03-26 Tom Tromey <tom@tromey.com>
9770 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9772 (backtrace_command): Remove "fulltrace", add "flags".
9774 2018-03-26 Tom Tromey <tom@tromey.com>
9776 * stack.c (backtrace_command): Rewrite command line parsing.
9778 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9780 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9782 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9784 * filename-seen-cache.h: Add include guard.
9786 2018-03-26 Keith Seitz <keiths@redhat.com>
9788 * symfile.c (place_section): Remove "struct" from section_addr_info
9790 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9791 "struct" keyword from section_addr_info.
9793 2018-03-26 Alan Hayward <alan.hayward@arm.com>
9795 * regformats/regdef.h (reg): Add constructors.
9797 2018-03-25 Pedro Alves <palves@redhat.com>
9799 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9800 if then/else bodies in var_func_name extraction.
9802 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
9804 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9805 lookup_minimal_symbol() to find symbol entry.
9806 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9808 2018-03-23 Keith Seitz <keiths@redhat.com>
9811 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9812 nested type definitions for C++, too.
9814 2018-03-23 Tom Tromey <tom@tromey.com>
9816 * machoread.c (struct oso_el): Add a constructor. Don't define as
9818 (macho_register_oso): Remove.
9819 (macho_symtab_read): Take a std::vector.
9820 (oso_el_compare_name): Now a std::sort comparator.
9821 (macho_symfile_read_all_oso): Take a std::vector.
9822 (macho_symfile_read): Use std::vector. Remove cleanups.
9824 2018-03-22 Tom Tromey <tom@tromey.com>
9826 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9827 (record_full_goto_bookmark): Use std::string.
9829 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9832 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9835 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9837 * rs6000-tdep.c (store_insn_p): New function.
9838 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9839 and cr_reg to their unshifted values. Use store_insn_p to
9840 match LR saves using either R1 or fdata->alloca_reg. Use
9841 store_insn_p to match CR saves. Set alloca_reg_offset
9842 when alloca_reg and framep are set. Remove lr_reg shift
9843 when assigning to fdata->lr_register.
9845 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
9847 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9848 command line args instead of emitting a warning.
9850 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9852 * tracepoint.h (struct static_tracepoint_marker): Initialize
9853 fields, define default constructor, move constructor and move
9854 assignment, disable the rest.
9855 <str_id, extra>: Make std::string.
9856 (release_static_tracepoint_marker): Remove.
9857 (free_current_marker): Remove.
9858 * tracepoint.c (free_current_marker): Remove.
9859 (parse_static_tracepoint_marker_definition): Adjust to
9860 std::string, use new hex2str overload.
9861 (release_static_tracepoint_marker): Remove.
9862 (print_one_static_tracepoint_marker): Get marker by reference
9863 and adjust to std::string.
9864 (info_static_tracepoint_markers_command): Adjust to std::vector
9866 * target.h (static_tracepoint_marker_p): Remove typedef.
9867 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9868 (struct target_ops) <to_static_tracepoint_marker_at>: Return
9870 <to_static_tracepoint_markers_by_strid>: Return std::vector.
9872 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9873 (target_debug_print_std_vector_static_tracepoint_marker): New.
9874 (target_debug_print_struct_static_tracepoint_marker_p): Rename
9876 (target_debug_print_static_tracepoint_marker_p): ... this.
9877 * target-delegates.c: Re-generate.
9878 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9880 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9881 (decode_static_tracepoint_spec): Adjust to std::vector.
9882 (tracepoint_print_one_detail): Adjust to std::string.
9883 (strace_marker_decode_location): Adjust to std::string.
9884 (update_static_tracepoint): Adjust to std::string, remove call
9885 to release_static_tracepoint_marker.
9886 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9887 Adjust to std::vector.
9888 * remote.c (remote_static_tracepoint_marker_at): Return bool.
9889 (remote_static_tracepoint_markers_by_strid): Adjust to
9891 * common/rsp-low.h (hex2str): New overload with explicit count
9893 * common/rsp-low.c (hex2str): New overload with explicit count
9895 * unittests/rsp-low-selftests.c (test_hex2str): New function.
9896 (_initialize_rsp_low_selftests): Add test_hex2str test.
9897 * unittests/tracepoint-selftests.c
9898 (test_parse_static_tracepoint_marker_definition): Adjust to
9901 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9903 * tracepoint.c (parse_static_tracepoint_marker_definition):
9904 Consider case where the definition is followed by more
9906 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9907 tracepoint-selftests.c.
9908 * unittests/tracepoint-selftests.c: New.
9910 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9912 * MAINTAINERS (Write After Approval): Add Pedro Franco de
9915 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9917 * symtab.c (find_pc_sect_line): fixed indentation.
9919 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9921 * symtab.c (find_pc_sect_line): now uses binary search.
9923 2018-03-19 Tom Tromey <tom@tromey.com>
9925 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9928 2018-03-19 Pedro Alves <palves@redhat.com>
9929 Tom Tromey <tom@tromey.com>
9931 * unittests/observable-selftests.c: New file.
9932 * common/observable.h: New file.
9933 * observable.h: New file.
9934 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9935 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9936 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9937 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9938 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9939 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9940 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9941 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9942 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9943 python/py-breakpoint.c, python/py-finishbreakpoint.c,
9944 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9945 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9946 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9947 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9948 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9949 tui/tui-interp.c, valops.c: Update all users.
9950 * tui/tui-hooks.c (tui_bp_created_observer)
9951 (tui_bp_deleted_observer, tui_bp_modified_observer)
9952 (tui_inferior_exit_observer, tui_before_prompt_observer)
9953 (tui_normal_stop_observer, tui_register_changed_observer):
9955 (tui_observers_token): New global.
9956 (attach_or_detach, tui_attach_detach_observers): New functions.
9957 (tui_install_hooks, tui_remove_hooks): Use
9958 tui_attach_detach_observers.
9959 * record-btrace.c (record_btrace_thread_observer): Remove.
9960 (record_btrace_thread_observer_token): New global.
9961 * observer.sh: Remove.
9962 * observer.c: Rename to observable.c.
9963 * observable.c (namespace gdb_observers): Define new objects.
9964 (observer_debug): Move into gdb_observers namespace.
9965 (struct observer, struct observer_list, xalloc_observer_list_node)
9966 (xfree_observer_list_node, generic_observer_attach)
9967 (generic_observer_detach, generic_observer_notify): Remove.
9968 (_initialize_observer): Update.
9969 Don't include observer.inc.
9970 * Makefile.in (generated_files): Remove observer.h, observer.inc.
9971 (clean mostlyclean): Likewise.
9972 (observer.h, observer.inc): Remove targets.
9973 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9974 (COMMON_SFILES): Use observable.c, not observer.c.
9975 * .gitignore: Remove observer.h.
9977 2018-03-18 Tom Tromey <tom@tromey.com>
9979 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9981 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9983 2018-03-17 Tom Tromey <tom@tromey.com>
9985 * auto-load.c (auto_load_objfile_script_1): Use std::string.
9987 2018-03-17 Tom Tromey <tom@tromey.com>
9989 * target.c (class scoped_target_fd): New.
9990 (target_fileio_close_cleanup): Remove.
9991 (target_fileio_read_alloc_1): Use scoped_target_fd.
9993 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
9995 * silent-rules.mk: New.
9996 * Makefile.in: Include silent-rules.mk
9997 (srcdir, VPATH, top_srcdir): Move up.
9998 (COMPILE): Add ECHO_CXX.
9999 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10000 (init.c): Add ECHO_INIT_C.
10001 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10002 (version.c): Add ECHO_GEN.
10003 (printcmd.o): Add ECHO_CXX.
10004 (target-float.o): Add ECHO_CXX.
10005 (ada-exp.o): Add ECHO_CXX.
10006 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10007 (insight$(EXEEXT)): Add ECHO_CXXLD.
10008 * gnulib/configure.ac: Add AM_SILENT_RULES.
10009 * gnulib/aclocal.m4: Re-generate.
10010 * gnulib/configure: Re-generate.
10011 * gnulib/import/Makefile.in: Re-generate.
10013 2018-03-16 Tom Tromey <tom@tromey.com>
10015 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10016 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10017 * utils.c (do_free_section_addr_info)
10018 (make_cleanup_free_section_addr_info): Remove.
10019 * symfile.h (struct other_sections): Add constructor.
10020 (struct section_addr_info): Remove.
10021 (section_addr_info): New typedef.
10022 (struct sym_fns) <sym_offsets>: Change type of parameter.
10023 (build_section_addr_info_from_objfile)
10024 (relative_addr_info_to_section_offsets, addr_info_make_relative)
10025 (default_symfile_offsets, symbol_file_add)
10026 (symbol_file_add_from_bfd)
10027 (build_section_addr_info_from_section_table): Update.
10028 (alloc_section_addr_info, free_section_addr_info): Don't declare.
10029 * symfile.c (alloc_section_addr_info): Remove.
10030 (build_section_addr_info_from_section_table): Change return type.
10032 (build_section_addr_info_from_bfd)
10033 (build_section_addr_info_from_objfile): Likewise.
10034 (free_section_addr_info): Remove.
10035 (relative_addr_info_to_section_offsets): Change type of "addrs".
10036 (addrs_section_compar): Now a std::sort comparator.
10037 (addrs_section_sort): Change return type.
10038 (addr_info_make_relative): Change type of "addrs". Update.
10039 (default_symfile_offsets, syms_from_objfile_1)
10040 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10041 (symbol_file_add_separate): Update.
10042 (symbol_file_add): Change type of "addrs". Update.
10043 (add_symbol_file_command): Update. Remove cleanups.
10044 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
10046 * symfile-debug.c (debug_sym_offsets): Change type of "info".
10047 * solib.c (solib_read_symbols): Update.
10048 * objfiles.c (objfile_relocate): Update. Remove cleanups.
10049 * machoread.c (macho_symfile_offsets): Update.
10050 * jit.c (jit_bfd_try_read_symtab): Update.
10052 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
10054 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10055 unittests/utils-selftests.c.
10056 * unittests/utils-selftests.c: New file.
10058 2018-03-14 Tom Tromey <tom@tromey.com>
10061 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10064 2018-03-14 Tom Tromey <tom@tromey.com>
10067 * printcmd.c (printf_pointer): Allow "-" in format.
10069 2018-03-14 Tom Tromey <tom@tromey.com>
10071 * printcmd.c (_initialize_printcmd): Add usage to printf.
10073 2018-03-14 Yao Qi <qiyao@sourceware.org>
10075 * MAINTAINERS: Update my email address.
10077 2018-03-13 Tom Tromey <tom@tromey.com>
10079 * machoread.c (macho_check_dsym): Change filenamep to a
10081 (macho_symfile_read): Update.
10082 * symfile.c (load_command): Use std::string.
10084 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
10086 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10087 to error message string.
10088 (riscv_register_name): Use xsnprintf instead of sprintf.
10089 (riscv_insn::fetch_instruction): Use gdb_assert instead of
10091 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10093 (riscv_push_dummy_call): Likewise.
10095 2018-03-12 Tom Tromey <tom@tromey.com>
10097 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10098 Use gdb::byte_vector.
10099 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10101 2018-03-12 Yao Qi <yao.qi@linaro.org>
10103 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10104 parameter type to readable_regcache.
10105 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10108 2018-03-11 Tom Tromey <tom@tromey.com>
10110 * dwarf2read.c (struct nextfield): Add initializers.
10111 (struct nextfnfield): Remove.
10112 (struct fnfieldlist): Add initializers. Remove "length" and
10113 "head", use std::vector.
10114 (struct decl_field_list): Remove.
10115 (struct field_info): Add initializers.
10116 <fields, baseclasses>: Now std::vector.
10117 <nbaseclasses, nfnfields, typedef_field_list_count,
10118 nested_types_list_count>: Remove.
10119 (dwarf2_add_field, dwarf2_add_type_defn)
10120 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10121 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10122 (process_structure_scope): Update.
10124 2018-03-11 Tom Tromey <tom@tromey.com>
10126 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10127 for use by std::sort.
10128 (build_type_psymtabs_1): Use std::vector.
10130 2018-03-09 Eli Zaretskii <eliz@gnu.org>
10132 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10133 and LIBMPFR in the printed configuration.
10135 2018-03-08 Tom Tromey <tom@tromey.com>
10137 * source.c (get_filename_and_charpos): Use scoped_fd.
10138 * nto-procfs.c (procfs_open_1): Use scoped_fd.
10139 (procfs_pidlist): Likewise.
10140 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10141 (iterate_over_mappings): Likewise.
10143 2018-03-08 Tom Tromey <tom@tromey.com>
10145 * infcall.c (struct call_return_meta_info)
10146 <stack_temporaries_enabled>: Remove.
10147 (get_call_return_value, call_function_by_hand_dummy): Update.
10148 * thread.c (disable_thread_stack_temporaries): Remove.
10149 (enable_thread_stack_temporaries): Remove.
10150 (thread_stack_temporaries_enabled_p): Return bool.
10151 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10152 (get_last_thread_stack_temporary): Update.
10153 * eval.c (evaluate_subexp): Update.
10154 * gdbthread.h (class enable_thread_stack_temporaries): Now a
10155 class, not a function.
10156 (value_ptr, value_vec): Remove typedefs.
10157 (class thread_info) <stack_temporaries_enabled>: Now bool.
10158 <stack_temporaries>: Now a std::vector.
10159 (thread_stack_temporaries_enabled_p)
10160 (value_in_thread_stack_temporaries): Return bool.
10162 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
10164 * remote.c (putpkt_binary): Fix omitted bytes reporting.
10165 (getpkt_or_notif_sane_1): Likewise.
10167 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10169 * build-id.c (build_id_to_debug_bfd): Use std::string.
10171 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10173 * build-id.c (find_separate_debug_file_by_buildid): Return
10175 * build-id.h (find_separate_debug_file_by_buildid): Return
10177 * coffread.c (coff_symfile_read): Adjust to std::string.
10178 * elfread.c (elf_symfile_read): Adjust to std::string.
10179 * symfile.c (separate_debug_file_exists): Change parameter to
10181 (find_separate_debug_file): Return std::string.
10182 (find_separate_debug_file_by_debuglink): Return std::string.
10183 * symfile.h (find_separate_debug_file_by_debuglink): Return
10186 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10188 * common/xml-utils.c (xml_escape_text): Move code to...
10189 (xml_escape_text_append): ... this new function.
10190 * common/xml-utils.h (xml_escape_text_append): New declaration.
10191 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10193 (_initialize_xml_utils): register test_xml_escape_text_append as
10196 2018-03-07 Alan Hayward <alan.hayward@arm.com>
10198 * defs.h: Remove MAX_REGISTER_SIZE.
10199 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10201 * python/py-unwind.c (pyuw_sniffer): Likewise.
10203 2018-03-07 Tom Tromey <tom@tromey.com>
10205 * linux-tdep.c (linux_info_proc): Update.
10206 * target.h (struct target_ops) <to_fileio_readlink>: Return
10208 (target_fileio_readlink): Return optional<string>.
10209 * remote.c (remote_hostio_readlink): Return optional<string>.
10210 * inf-child.c (inf_child_fileio_readlink): Return
10212 * target.c (target_fileio_readlink): Return optional<string>.
10214 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
10216 * regcache.c (cooked_read_test): Add riscv to the list of
10217 architectures that have a save_reggroup.
10219 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
10221 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10222 value is not a dynamic class object.
10224 2018-03-06 Tom Tromey <tom@tromey.com>
10226 * rust-exp.y: Formatting fixes.
10228 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10230 * riscv-tdep.c (riscv_register_name): Remove target description
10232 (riscv_gdbarch_init): Remove target description check.
10234 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10236 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10238 * riscv-tdep.h: Likewise.
10240 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10242 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10243 (riscv_pseudo_register_write): Delete.
10244 (riscv_gdbarch_init): Remove all use of pseudo registers.
10246 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10248 * record-btrace.c (btrace_print_lines): Replace cleanup
10249 parameter with RAII equivalents.
10250 (btrace_insn_history): Replace cleanup with RAII equivalents.
10251 * ui-out.h (make_cleanup_ui_out_list_begin_end,
10252 make_cleanup_ui_out_tuple_begin_end): Remove.
10253 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10254 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10255 make_cleanup_ui_out_list_begin_end): Remove.
10257 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10259 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10260 parameter types to std::vector. Use bool.
10261 (record_btrace_wait): Replace VEC(tp_t) with
10262 std::vector<thread_info *>.
10263 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10265 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10267 * record-btrace.c (record_btrace_disable_callback): Remove.
10268 (struct scoped_btrace_disable): New.
10269 (record_btrace_open): Use scoped_btrace_disable.
10271 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10273 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10274 reading values from registers.
10276 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10278 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10281 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10283 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10284 change parameter type. Use GDB's print functions, and use
10285 core_addr_to_string where appropriate.
10286 (riscv_push_dummy_call): Use core_addr_to_string where
10287 appropriate, update call to riscv_print_arg_location, and reindent
10289 (riscv_return_value): Update call to riscv_print_arg_location.
10291 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10292 Tim Newsome <tim@sifive.com>
10293 Albert Ou <a0u@eecs.berkeley.edu>
10294 Darius Rad <darius@bluespec.com>
10296 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10297 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10298 (ALLDEPFILES): Add riscv-tdep.c
10299 * configure.tgt: Add riscv support.
10300 * riscv-tdep.c: New file.
10301 * riscv-tdep.h: New file.
10302 * NEWS: Mention new target.
10303 * MAINTAINERS: Add entry for riscv.
10305 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10307 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10308 fields within aggregates.
10310 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
10312 * record-btrace.c (btrace_print_lines): Change type of flags to
10313 gdb_disassembly_flags.
10315 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10317 * fbsd-nat.c: Include "inf-ptrace.h".
10318 (USE_SIGTRAP_SIGINFO): Conditionally define.
10319 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10320 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10321 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10323 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10325 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10327 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10328 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10329 "supports_stopped_by_hw_breakpoint" target methods.
10331 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10333 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10334 * fbsd-nat.c (debug_fbsd_nat): New variable.
10335 (show_fbsd_nat_debug): New function.
10336 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10337 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10339 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10341 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10342 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10344 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10345 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10348 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10350 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10351 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10353 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10355 * charset.c (struct charset_vector): New.
10356 (charsets): Change type to charset_vector.
10357 (find_charset_names): Adjust.
10359 (_initialize_charset): Adjust.
10361 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10363 * progspace.h (struct program_space) <deleted_solibs>: Change
10364 type to std::vector<std::string>.
10365 * progspace.c (clear_program_space_solib_cache): Adjust.
10366 * breakpoint.c (print_solib_event): Adjust.
10367 (check_status_catch_solib): Adjust.
10368 * solib.c (update_solib_list): Adjust.
10369 * ui-out.h (class ui_out) <field_string>: New overload.
10370 * ui-out.c (ui_out::field_string): New overload.
10372 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10374 * progspace.h (struct program_space): Add constructor and
10375 destructor, initialize fields.
10376 (add_program_space): Remove.
10377 * progspace.c (add_program_space): Rename to...
10378 (program_space::program_space): ... this.
10379 (release_program_space): Rename to...
10380 (program_space::~program_space): ... this.
10381 (delete_program_space): Use delete to delete program_space.
10382 (initialize_progspace): Use new to allocate program_space.
10383 * inferior.c (add_inferior_with_spaces): Likewise.
10384 (clone_inferior_command): Likewise.
10385 * infrun.c (follow_fork_inferior): Likewise.
10386 (handle_vfork_child_exec_or_exit): Likewise.
10388 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10390 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10391 (delim_string_to_char_ptr_vec): Return std::vector of
10392 gdb::unique_xmalloc_ptr.
10393 (dirnames_to_char_ptr_vec_append): Take std::vector of
10394 gdb::unique_xmalloc_ptr.
10395 (dirnames_to_char_ptr_vec): Return std::vector of
10396 gdb::unique_xmalloc_ptr.
10397 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10398 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10399 (delim_string_to_char_ptr_vec): Return an std::vector of
10400 gdb::unique_xmalloc_ptr, adjust the code.
10401 (dirnames_to_char_ptr_vec_append): Take an std::vector of
10402 gdb::unique_xmalloc_ptr, adjust the code.
10403 (dirnames_to_char_ptr_vec): Return an std::vector of
10404 gdb::unique_xmalloc_ptr, adjust the code.
10405 * auto-load.c (auto_load_safe_path_vec): Change type to
10406 std::vector of gdb::unique_xmalloc_ptr.
10407 (auto_load_expand_dir_vars): Return an std::vector of
10408 gdb::unique_xmalloc_ptr, adjust the code.
10409 (auto_load_safe_path_vec_update): Adjust.
10410 (filename_is_in_auto_load_safe_path_vec): Adjust.
10411 (auto_load_objfile_script_1): Adjust.
10412 * build-id.c (build_id_to_debug_bfd): Adjust.
10413 * linux-thread-db.c (thread_db_load_search): Adjust.
10414 * source.c (add_path): Adjust.
10416 * symfile.c (find_separate_debug_file): Adjust.
10417 * utils.c (do_free_char_ptr_vec): Remove.
10418 (make_cleanup_free_char_ptr_vec): Remove.
10420 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
10423 * common/pathstuff.c: Conditionally include "<windows.h>".
10425 2018-03-01 Georg Sauthoff <mail@georg.so>
10428 * gcore.in: Quote variables and switch interpreter to bash.
10430 2018-03-01 Tom Tromey <tom@tromey.com>
10432 * dwarf2read.c (alloc_discriminant_info): Fix default_index
10433 assertion. Add assertion for discriminant_index.
10434 (quirk_rust_enum): Use correct base type name in univariant case.
10436 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
10438 * record.c (get_call_history_modifiers): Return a
10439 record_print_flags.
10440 (cmd_record_call_history): Adjust.
10441 * record-btrace.c (record_btrace_call_history): Adjust.
10442 (record_btrace_call_history_range): Adjust.
10443 (record_btrace_call_history_from): Adjust.
10444 * target-debug.h (target_debug_print_record_print_flags): New.
10445 * target-delegates.c: Re-generate.
10446 * target.c (target_call_history): Change flags type.
10447 (target_call_history_from): Likewise.
10448 (target_call_history_range): Likewise.
10449 * target.h (struct target_ops) <target_call_history>: Likewise.
10450 (target_call_history_from): Likewise.
10451 (target_call_history_range): Likewise.
10453 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10454 Simon Marchi <simon.marchi@polymtl.ca>
10456 * common/common-utils.c: Include "sys/stat.h".
10457 (is_regular_file): Move here from "source.c"; change return
10459 * common/common-utils.h (is_regular_file): New prototype.
10460 * common/pathstuff.c (contains_dir_separator): New function.
10461 * common/pathstuff.h (contains_dir_separator): New prototype.
10462 * source.c: Don't include "sys/stat.h".
10463 (is_regular_file): Move to "common/common-utils.c".
10465 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10467 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10468 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10469 * auto-load.c: Include "common/pathstuff.h".
10470 * common/common-def.h (current_directory): Move here.
10471 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10473 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10475 * common/pathstuff.c: New file.
10476 * common/pathstuff.h: New file.
10477 * compile/compile.c: Include "common/pathstuff.h".
10478 * defs.h (current_directory): Move to "common/common-defs.h".
10479 * dwarf2read.c: Include "common/pathstuff.h".
10480 * exec.c: Likewise.
10481 * guile/scm-safe-call.c: Likewise.
10482 * linux-thread-db.c: Likewise.
10483 * main.c: Likewise.
10484 * nto-tdep.c: Likewise.
10485 * objfiles.c: Likewise.
10486 * source.c: Likewise.
10487 * symtab.c: Likewise.
10488 * utils.c: Include "common/pathstuff.h".
10489 (gdb_realpath): Move to "common/pathstuff.c".
10490 (gdb_realpath_keepfile): Likewise.
10491 (gdb_abspath): Likewise.
10492 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10493 (gdb_realpath_keepfile): Likewise.
10494 (gdb_abspath): Likewise.
10496 2018-02-28 John Baldwin <jhb@FreeBSD.org>
10498 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10499 wildcard process pid for super_resume for kernels with a
10502 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
10504 * compile/compile.c (get_args): Add additional comments
10505 explaining function.
10507 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
10508 Tom Tromey <tom@tromey.com>
10510 * target.h (memory_write_request_s): Remove typedef. Don't define
10512 (target_write_memory_blocks): Change argument to std::vector.
10513 (struct memory_write_request): Add constructor.
10514 * target-memory.c (compare_block_starting_address): Return bool.
10515 Change argument types.
10516 (claim_memory): Change arguments to use std::vector.
10517 (split_regular_and_flash_blocks, blocks_to_erase)
10518 (compute_garbled_blocks): Likewise.
10519 (cleanup_request_data, cleanup_write_requests_vector): Remove.
10520 (target_write_memory_blocks): Change argument to std::vector.
10521 * symfile.c (struct load_section_data): Add constructor and
10522 destructor. Use std::vector for "requests".
10523 (struct load_progress_data): Add initializers.
10524 (load_section_callback): Update. Use "new".
10525 (clear_memory_write_data): Remove.
10526 (generic_load): Update.
10528 2018-02-27 Alan Hayward <alan.hayward@arm.com>
10530 * arch/aarch64.h: Use common/tdesc.h.
10532 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10534 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10535 architecture with a 64-bit ABI.
10537 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10539 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10540 ahead of target description loading.
10542 2018-02-26 Tom Tromey <tom@tromey.com>
10544 * stack.c (backtrace_command_1): Update.
10545 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10547 * python/py-framefilter.c (py_print_frame)
10548 (gdbpy_apply_frame_filter): Change type of "flags".
10549 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10551 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10552 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10553 * extension.h (enum frame_filter_flag): Rename from
10554 frame_filter_flags.
10555 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10556 (apply_ext_lang_frame_filter): Change type of "flags".
10557 * extension.c (apply_ext_lang_frame_filter): Change type of
10559 * extension-priv.h (struct extension_language_ops)
10560 <apply_frame_filter>: Change type of "flags".
10562 2018-02-26 Tom Tromey <tom@tromey.com>
10565 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
10566 off-by-one in py_end computation.
10567 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10569 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10572 2018-02-26 Tom Tromey <tom@tromey.com>
10574 * dwarf2read.c (struct variant_field): New.
10575 (struct nextfield) <variant>: New field.
10576 (dwarf2_add_field): Handle DW_TAG_variant_part.
10577 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10578 discriminated union.
10579 (read_structure_type): Handle DW_TAG_variant_part.
10580 (handle_struct_member_die): New function, extracted from
10581 process_structure_scope. Handle DW_TAG_variant.
10582 (process_structure_scope): Handle discriminated unions. Call
10583 handle_struct_member_die.
10585 2018-02-26 Tom Tromey <tom@tromey.com>
10587 * rust-lang.h (rust_last_path_segment): Declare.
10588 * rust-lang.c (rust_last_path_segment): Now public. Change
10590 (struct disr_info): Remove.
10591 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10592 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10593 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10594 (rust_enum_p, rust_enum_variant): New function.
10595 (rust_underscore_fields): Remove "offset" parameter.
10596 (rust_print_enum): New function.
10597 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10598 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10599 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
10601 (rust_internal_print_type): New function, from rust_print_type.
10603 (rust_print_type): Call rust_internal_print_type.
10604 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10605 Update enum handling.
10606 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10607 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10608 (rust_union_quirks): New functions.
10609 (process_full_comp_unit, process_full_type_unit): Call
10611 (process_structure_scope): Update rust_unions if necessary.
10613 2018-02-26 Tom Tromey <tom@tromey.com>
10615 * value.h (value_union_variant): Declare.
10616 * valops.c (value_union_variant): New function.
10617 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10618 (struct discriminant_info): New.
10619 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10621 (struct main_type) <flag_discriminated_union>: New field.
10623 2018-02-26 Tom Tromey <tom@tromey.com>
10625 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10626 unittests/unpack-selftests.c.
10627 * unittests/unpack-selftests.c: New file.
10628 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10630 2018-02-26 Yao Qi <yao.qi@linaro.org>
10632 * dwarf2read.c (struct partial_die_info) <read>: New method.
10633 (read_partial_die): Remove the declaration.
10634 (load_partial_dies): Update.
10635 (partial_die_info::partial_die_info):
10636 (read_partial_die): Change it to partial_die_info::read.
10638 2018-02-26 Yao Qi <yao.qi@linaro.org>
10640 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10641 (fixup_partial_die): Remove declaration.
10642 (scan_partial_symbols): Update.
10643 (partial_die_parent_scope): Likewise.
10644 (partial_die_full_name): Likewise.
10645 (fixup_partial_die): Change it to partial_die_info::fixup.
10647 2018-02-26 Yao Qi <yao.qi@linaro.org>
10649 * dwarf2read.c (read_partial_die): Update the declaration.
10650 (load_partial_dies): Caller update.
10651 (read_partial_die): Remove one argument abbrev_len.
10653 2018-02-26 Yao Qi <yao.qi@linaro.org>
10655 * dwarf2read.c (struct partial_die_info): Add ctor, delete
10656 assignment operator.
10657 (load_partial_dies): Use ctor and copy ctor.
10658 (read_partial_die): Update.
10659 (dwarf2_cu::find_partial_die): Use ctor.
10661 2018-02-26 Yao Qi <yao.qi@linaro.org>
10663 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10664 (find_partial_die_in_comp_unit): Change it to
10665 dwarf2_cu::find_partial_die.
10666 (find_partial_die): Update.
10668 2018-02-26 Yao Qi <yao.qi@linaro.org>
10670 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10673 2018-02-26 Yao Qi <yao.qi@linaro.org>
10675 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10677 2018-02-26 Alan Hayward <alan.hayward@arm.com>
10679 * arch/amd64.h: Use common/tdesc.h.
10680 * arch/i386.c: Likewise.
10681 * arch/i386.h: Likewise.
10682 * arch/tic6x.c: Likewise.
10683 * arch/tdesc.h: Move file from here...
10684 * common/tdesc.h: ...to here.
10685 * features/aarch64-core.c: Regenerate.
10686 * features/aarch64-fpu.c: Regenerate.
10687 * features/i386/32bit-avx.c: Regenerate.
10688 * features/i386/32bit-avx512.c: Regenerate.
10689 * features/i386/32bit-core.c: Regenerate.
10690 * features/i386/32bit-linux.c: Regenerate.
10691 * features/i386/32bit-mpx.c: Regenerate.
10692 * features/i386/32bit-pkeys.c: Regenerate.
10693 * features/i386/32bit-sse.c: Regenerate.
10694 * features/i386/64bit-avx.c: Regenerate.
10695 * features/i386/64bit-avx512.c: Regenerate.
10696 * features/i386/64bit-core.c: Regenerate.
10697 * features/i386/64bit-linux.c: Regenerate.
10698 * features/i386/64bit-mpx.c: Regenerate.
10699 * features/i386/64bit-pkeys.c: Regenerate.
10700 * features/i386/64bit-segments.c: Regenerate.
10701 * features/i386/64bit-sse.c: Regenerate.
10702 * features/i386/x32-core.c: Regenerate.
10703 * features/tic6x-c6xp.c: Regenerate.
10704 * features/tic6x-core.c: Regenerate.
10705 * features/tic6x-gp.c: Regenerate.
10706 * target-descriptions.c: Use common/tdesc.h.
10707 * target-descriptions.h: Likewise.
10709 2018-02-24 Tom Tromey <tom@tromey.com>
10711 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10712 (try_thread_db_load_from_dir, thread_db_load_search): Use
10714 (info_auto_load_libthread_db_compare): Return bool. Change
10716 (info_auto_load_libthread_db): Use std::vector, std::string.
10719 2018-02-24 Tom Tromey <tom@tromey.com>
10721 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10723 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10725 * gdbarch.c: Rebuild.
10726 * gdbarch.h: Rebuild.
10727 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10728 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10729 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10732 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
10734 * gdbtypes.h (sect_offset): Change type to uint64_t.
10735 (sect_offset_str): New function.
10736 * dwarf2read.c (create_addrmap_from_aranges): Use
10738 (error_check_comp_unit_head): Likewise.
10739 (create_debug_type_hash_table): Likewise.
10740 (read_cutu_die_from_dwo): Likewise.
10741 (init_cutu_and_read_dies): Likewise.
10742 (init_cutu_and_read_dies_no_follow): Likewise.
10743 (process_psymtab_comp_unit_reader): Likewise.
10744 (partial_die_parent_scope): Likewise.
10745 (peek_die_abbrev): Likewise.
10746 (process_queue): Likewise.
10747 (dwarf2_physname): Likewise.
10748 (read_namespace_alias): Likewise.
10749 (read_import_statement): Likewise.
10750 (create_dwo_cu_reader): Likewise.
10751 (create_cus_hash_table): Likewise.
10752 (lookup_dwo_cutu): Likewise.
10753 (inherit_abstract_dies): Likewise.
10754 (read_func_scope): Likewise.
10755 (read_call_site_scope): Likewise.
10756 (dwarf2_add_member_fn): Likewise.
10757 (read_common_block): Likewise.
10758 (read_module_type): Likewise.
10759 (read_typedef): Likewise.
10760 (read_subrange_type): Likewise.
10761 (load_partial_dies): Likewise.
10762 (read_partial_die): Likewise.
10763 (find_partial_die): Likewise.
10764 (read_str_index): Likewise.
10765 (dwarf2_string_attr): Likewise.
10766 (build_error_marker_type): Likewise.
10767 (lookup_die_type): Likewise.
10768 (dump_die_shallow): Likewise.
10769 (follow_die_ref): Likewise.
10770 (dwarf2_fetch_die_loc_sect_off): Likewise.
10771 (dwarf2_fetch_constant_bytes): Likewise.
10772 (follow_die_sig): Likewise.
10773 (get_signatured_type): Likewise.
10774 (get_DW_AT_signature_type): Likewise.
10775 (dwarf2_find_containing_comp_unit): Likewise.
10776 (set_die_type): Likewise.
10778 2018-02-21 John Baldwin <jhb@FreeBSD.org>
10780 * arch/aarch64.c: Include "common-defs.h".
10781 * arch/amd64.c: Likewise.
10782 * arch/i386.c: Likewise.
10784 2018-02-21 Tom Tromey <tom@tromey.com>
10786 * value.h: (extract_field_op): Update.
10787 * eval.c (extract_field_op): Return a const char *.
10788 * expression.h (parse_expression_for_completion): Update.
10789 * completer.c (complete_expression): Update.
10790 (add_struct_fields): Make fieldname const.
10791 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10792 (mark_completion_tag, parse_exp_in_context_1): Update.
10793 (parse_expression_for_completion): Change "name" to
10794 unique_xmalloc_ptr*.
10796 2018-02-21 Tom Tromey <tom@tromey.com>
10798 * infcall.c (call_function_by_hand_dummy): Use std::vector.
10800 2018-02-21 Yao Qi <yao.qi@linaro.org>
10802 * avr-tdep.c (avr_read_pc): Change parameter type to
10804 * gdbarch.sh (read_pc): Likewise.
10805 * gdbarch.c: Re-generated.
10806 * gdbarch.h: Re-generated.
10807 * hppa-tdep.c (hppa_read_pc): Change parameter type to
10809 * ia64-tdep.c (ia64_read_pc): Likewise.
10810 * mips-tdep.c (mips_read_pc): Likewise.
10811 * spu-tdep.c (spu_read_pc): Likewise.
10813 2018-02-21 Yao Qi <yao.qi@linaro.org>
10815 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10816 * regcache-dump.c: New file.
10817 * regcache.c: Move register_dump to regcache-dump.c.
10818 (maintenance_print_registers): Likewise.
10819 (maintenance_print_raw_registers): Likewise.
10820 (maintenance_print_cooked_registers): Likewise.
10821 (maintenance_print_register_groups): Likewise.
10822 (maintenance_print_remote_registers): Likewise.
10823 (_initialize_regcache): Likewise.
10824 * regcache.h (register_dump): Moved from regcache.c.
10826 2018-02-21 Yao Qi <yao.qi@linaro.org>
10828 * regcache.c (regcache::regcache): Update.
10829 (regcache::invalidate): Move it to detached_regcache::invalidate.
10830 (get_thread_arch_aspace_regcache): Update.
10831 (regcache::raw_update): Update.
10832 (regcache::cooked_read): Remove some code.
10833 (regcache::cooked_read_value): Likewise.
10834 (regcache::raw_write): Remove assert on m_readonly_p.
10835 (regcache::raw_supply_integer): Move it to
10836 detached_regcache::raw_supply_integer.
10837 (regcache::raw_supply_zeroed): Likewise.
10838 * regcache.h (detached_regcache) <raw_supply_integer>: New
10840 <raw_supply_zeroed, invalidate>: Likewise.
10841 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10842 <invalidate>: Likewise.
10843 <m_readonly_p>: Removed.
10845 2018-02-21 Yao Qi <yao.qi@linaro.org>
10847 * infcmd.c (get_return_value): Let stop_regs point to
10848 get_current_regcache.
10849 * regcache.c (regcache::regcache): Remove.
10850 (register_dump_reg_buffer): New class.
10851 (regcache_print): Adjust.
10852 * regcache.h (regcache): Remove constructors.
10854 2018-02-21 Yao Qi <yao.qi@linaro.org>
10856 * regcache.c (class register_dump): New class.
10857 (register_dump_regcache, register_dump_none): New class.
10858 (register_dump_remote, register_dump_groups): New class.
10859 (regcache_print): Update.
10860 * regcache.h (regcache_dump_what): Move it to regcache.c.
10861 (regcache) <dump>: Remove.
10863 2018-02-21 Yao Qi <yao.qi@linaro.org>
10865 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10867 (jit_unwind_reg_set_impl): Call raw_supply.
10868 (jit_frame_sniffer): Use reg_buffer_rw.
10869 * record-full.c (record_full_core_regbuf): Change its type.
10870 (record_full_core_open_1): Use reg_buffer_rw.
10871 (record_full_close): Likewise.
10872 (record_full_core_fetch_registers): Use regcache->raw_supply.
10873 (record_full_core_store_registers): Likewise.
10874 * regcache.c (regcache::get_register_status): Move it to
10876 (regcache_raw_set_cached_value): Remove.
10877 (regcache::raw_set_cached_value): Remove.
10878 (regcache::raw_write): Call raw_supply.
10879 (regcache::raw_supply): Move it to reg_buffer_rw.
10880 * regcache.h (regcache_raw_set_cached_value): Remove.
10881 (reg_buffer_rw): New class.
10883 2018-02-21 Yao Qi <yao.qi@linaro.org>
10885 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10886 readonly_detached_regcache.
10887 (dummy_frame_prev_register): Use regcache->cooked_read.
10888 * frame.c (frame_save_as_regcache): Change return type.
10889 (frame_pop): Update.
10890 * frame.h (frame_save_as_regcache): Update declaration.
10891 * inferior.h (get_infcall_suspend_state_regcache): Update
10893 * infrun.c (infcall_suspend_state) <registers>: use
10894 readonly_detached_regcache.
10895 (save_infcall_suspend_state): Don't use regcache_dup.
10896 (get_infcall_suspend_state_regcache): Change return type.
10897 * linux-fork.c (struct fork_info) <savedregs>: Change to
10898 readonly_detached_regcache.
10900 (fork_save_infrun_state): Don't use regcache_dup.
10901 (info_checkpoints_command): Adjust.
10902 * mi/mi-main.c (register_changed_p): Update declaration.
10903 (mi_cmd_data_list_changed_registers): Use
10904 readonly_detached_regcache.
10905 (register_changed_p): Change parameter type to
10906 readonly_detached_regcache.
10907 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10908 readonly_detached_regcache.
10909 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10910 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10912 (regcache::save): Move it to reg_buffer.
10913 (regcache::restore): Change parameter type.
10914 (regcache_dup): Remove.
10915 * regcache.h (reg_buffer) <save>: New method.
10916 (readonly_detached_regcache): New class.
10917 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10918 readonly_detached_regcache.
10919 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10921 2018-02-21 Yao Qi <yao.qi@linaro.org>
10923 * frame.c (frame_save_as_regcache): Use regcache method save.
10924 (frame_pop): Use regcache method restore.
10925 * infrun.c (restore_infcall_suspend_state): Likewise.
10926 * linux-fork.c (fork_load_infrun_state): Likewise.
10927 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10929 * regcache.c (regcache_save): Remove.
10930 (regcache::restore): More asserts.
10931 (regcache_cpy): Remove.
10932 * regcache.h (regcache_save): Remove the declaration.
10933 (regcache::restore): Move from private to public.
10934 Remove the friend declaration of regcache_cpy.
10935 (regcache_cpy): Remove declaration.
10937 2018-02-21 Yao Qi <yao.qi@linaro.org>
10939 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10940 parameter type to 'readable_regcache *'.
10941 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10942 * arm-tdep.c (arm_neon_quad_read): Likewise.
10943 (arm_pseudo_read): Likewise.
10944 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10945 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10946 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10947 * gdbarch.c: Re-generated.
10948 * gdbarch.h: Re-generated.
10949 * gdbarch.sh (pseudo_register_read): Change parameter type to
10950 'readable_regcache *'.
10951 (pseudo_register_read_value): Likewise.
10952 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10953 (h8300_pseudo_register_read): Likewise.
10954 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10955 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10956 (i386_pseudo_register_read_into_value): Likewise.
10957 (i386_pseudo_register_read_value): Likewise.
10958 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10960 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10961 * m32c-tdep.c (m32c_raw_read): Likewise.
10962 (m32c_read_flg): Likewise.
10963 (m32c_banked_register): Likewise.
10964 (m32c_banked_read): Likewise.
10965 (m32c_sb_read): Likewise.
10966 (m32c_part_read): Likewise.
10967 (m32c_cat_read): Likewise.
10968 (m32c_r3r2r1r0_read): Likewise.
10969 (m32c_pseudo_register_read): Likewise.
10970 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10971 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10972 (mep_pseudo_cr64_read): Likewise.
10973 (mep_pseudo_register_read): Likewise.
10974 * mips-tdep.c (mips_pseudo_register_read): Likewise.
10975 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10976 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10977 * regcache.c (regcache::raw_read): Move it to readable_regcache.
10978 (regcache::cooked_read): Likewise.
10979 (regcache::cooked_read_value): Likewise.
10980 (regcache_cooked_read_signed):
10981 (regcache::cooked_read): Likewise.
10982 * regcache.h (readable_regcache): New class.
10983 (regcache): Inherit readable_regcache. Move some methods to
10985 * rl78-tdep.c (rl78_pseudo_register_read): Change
10986 parameter type to 'readable_regcache *'.
10987 * rs6000-tdep.c (do_regcache_raw_read): Remove.
10988 (e500_pseudo_register_read): Change parameter type to
10989 'readable_regcache *'.
10990 (dfp_pseudo_register_read): Likewise.
10991 (vsx_pseudo_register_read): Likewise.
10992 (efpr_pseudo_register_read): Likewise.
10993 * s390-tdep.c (s390_pseudo_register_read): Likewise.
10994 * sh-tdep.c (sh_pseudo_register_read): Likewise.
10995 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10996 (sh64_pseudo_register_read): Likewise.
10997 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10998 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10999 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11000 (spu_pseudo_register_read): Likewise.
11001 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11002 (xtensa_pseudo_register_read): Likewise.
11004 2018-02-21 Yao Qi <yao.qi@linaro.org>
11006 * regcache.c (regcache::regcache): Call reg_buffer ctor.
11007 (regcache::arch): Move it to reg_buffer::arch.
11008 (regcache::register_buffer): Likewise.
11009 (regcache::assert_regnum): Likewise.
11010 (regcache::num_raw_registers): Likewise.
11011 * regcache.h (reg_buffer): New class.
11012 (regcache): Inherit reg_buffer.
11014 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
11016 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11017 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11019 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
11021 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11023 2018-02-19 Alan Hayward <alan.hayward@arm.com>
11025 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11026 (SFILES): Remove common/*.c files.
11027 (COMMON_OBS): Remove some *.o files built from common/*.c files.
11028 * common/common.host: Add common reference.
11029 * configure.ac: Likewise.
11030 * configure: Regenerate.
11032 2018-02-16 Yao Qi <yao.qi@linaro.org>
11034 * block.c (block_namespace_info): Inherit allocate_on_obstack.
11035 (block_initialize_namespace): Use new.
11036 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11037 (dwarf2_free_objfile): Use delete.
11038 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11039 (copy_type_recursive): Use new.
11040 * gdb_obstack.h (allocate_on_obstack): New.
11042 2018-02-15 Yao Qi <yao.qi@linaro.org>
11045 * inferior.c (exit_inferior_1): Reset inf->control.
11047 2018-02-15 Joel Brobecker <brobecker@adacore.com>
11049 * ada-lang.c (ada_to_fixed_value_create): Delete advance
11052 2018-02-14 Pedro Alves <palves@redhat.com>
11054 * frame-unwind.c (frame_unwind_try_unwinder): Always call
11055 frame_cleanup_after_sniffer on exception.
11057 2018-02-14 Tom Tromey <tom@tromey.com>
11059 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11061 (solib_bfd_open): Make pathname const.
11062 * solib.c (solib_bfd_open): Make pathname const.
11063 * solib-spu.c (spu_bfd_fopen): Make name const.
11064 (spu_bfd_open): Make pathname const.
11065 * solib-darwin.c (darwin_bfd_open): Make pathname const.
11066 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11068 2018-02-14 Tom Tromey <tom@tromey.com>
11070 * symfile.c (symfile_bfd_open): Update.
11071 * source.h (openp, source_full_path_of, find_and_open_source):
11072 Change argument type to unique_xmalloc_ptr.
11073 * source.c (openp): Take a unique_xmalloc_ptr.
11074 (source_full_path_of, find_and_open_source): Likewise.
11075 (open_source_file, symtab_to_fullname): Update.
11076 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11077 unique_xmalloc_ptr.
11078 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11079 (exec_file_find): Update.
11080 * psymtab.c (psymtab_to_fullname): Update.
11081 * nto-tdep.h (nto_find_and_open_solib): Update.
11082 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11083 unique_xmalloc_ptr.
11084 * exec.c (exec_file_attach): Update.
11085 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11086 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11088 2018-02-14 Tom Tromey <tom@tromey.com>
11090 * solib.c: Include source.h.
11091 * nto-tdep.c: Include source.h.
11092 * mi/mi-cmd-env.c: Include source.h.
11093 * infcmd.c: Include source.h.
11094 * exec.c: Include source.h.
11095 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11096 (add_path, directory_switch, source_path, init_source_path): Move
11098 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11099 (add_path, directory_switch, source_path, init_source_path):
11102 2018-02-14 Tom Tromey <tom@tromey.com>
11104 * solist.h (exec_file_find, solib_find): Return
11105 unique_xmalloc_ptr.
11106 (solib_bfd_fopen): Take a const char *.
11107 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11108 (exec_file_find, solib_find): Likewise.
11109 (solib_bfd_fopen): Do not take ownership of "pathname".
11110 (solib_bfd_open): Use unique_xmalloc_ptr.
11111 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11112 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11113 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11114 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11116 2018-02-14 Joel Brobecker <brobecker@adacore.com>
11118 * ada-lang.c (name_match_type_from_name): Remove reference to
11119 ada_name_for_lookup in function's documentation.
11120 * ada-lang.h (ada_name_for_lookup): Delete declaration.
11122 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11124 * defs.h (enum openp_flags): New enum.
11125 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11126 Move to enum openp_flags.
11127 (openp_flags): New enum flags.
11128 (openp): Change parameter type to openp_flags.
11129 * source.c (openp): Change parameter type to openp_flags.
11130 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11131 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11133 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11135 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11138 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
11140 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11142 (class dwarf2_queue_guard): ...the destructor of this new class.
11143 (dw2_do_instantiate_symtab): Create instance of the new class
11144 dwarf2_queue_guard, remove cleanup.
11146 2018-02-09 Tom Tromey <tom@tromey.com>
11148 * source.c (find_source_lines): Don't reference past the end of
11151 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11153 * remote.c (remote_btrace_maybe_reopen): Change error message.
11154 * btrace.c (btrace_enable): Likewise.
11155 (parse_xml_btrace): Likewise.
11156 (parse_xml_btrace_conf): Likewise.
11158 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11160 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11161 (linux_enable_pt, linux_enable_bts): Call
11162 diagnose_perf_event_open_fail.
11164 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11166 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11167 Remove parameter and change return type. Update callers. Move it.
11168 (linux_enable_bts, linux_enable_pt): Improve error message.
11169 (linux_enable_pt): Remove zero buffer size check.
11170 (linux_enable_btrace): Improve error messages. Remove NULL return
11173 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11175 * btrace.c (btrace_enable): Remove target_supports_btrace call.
11176 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11177 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11178 (linux_supports_pt, linux_supports_btrace): Remove.
11179 (linux_enable_bts): Call cpu_supports_bts.
11180 * nat/linux-btrace.h (linux_supports_btrace): Remove.
11181 * remote.c (remote_supports_btrace): Remove.
11182 (init_remote_ops): Remove remote_supports_btrace.
11183 * target-delegates.c: Regenerated.
11184 * target.c (target_supports_btrace): Remove.
11185 * target.h (target_ops) <to_supports_btrace>: Remove
11186 (target_supports_btrace): Remove.
11187 * x86-linux-nat.c (x86_linux_create_target): Remove
11188 linux_supports_btrace.
11190 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11192 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11194 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11195 exception and use message in own exception.
11197 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11199 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11200 (perf_event_pt_event_type): Use gdb_file_up.
11201 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11202 scoped_fd, and scoped_mmap.
11204 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11206 * common/scoped_mmap.h: New.
11207 * unittests/scoped_mmap-selftest.c: New.
11208 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11209 unittests/scoped_mmap-selftest.c.
11211 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11213 * common/scoped_fd.h: New.
11214 * unittests/scoped_fd-selftest.c: New.
11215 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11216 unittests/scoped_fd-selftest.c.
11218 2018-02-09 Tom Tromey <tom@tromey.com>
11220 * auto-load.c (auto_load_section_scripts): Use
11221 gdb::unique_xmalloc_ptr.
11223 2018-02-09 Tom Tromey <tom@tromey.com>
11225 * auto-load.c (execute_script_contents): Use std::string.
11227 2018-02-09 Joel Brobecker <brobecker@adacore.com>
11229 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11230 Python function, rather than a new command.
11232 2018-02-08 Tom Tromey <tom@tromey.com>
11234 * solib.c (solib_find_1): Use std::string.
11235 (solib_bfd_fopen): Use unique_xmalloc_ptr.
11237 2018-02-08 Tom Tromey <tom@tromey.com>
11239 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11241 2018-02-08 Tom Tromey <tom@tromey.com>
11243 * source.c (find_source_lines): Use gdb::def_vector.
11245 2018-02-08 Tom Tromey <tom@tromey.com>
11247 * macrocmd.c (struct temporary_macro_definition): New.
11248 (macro_define_command): Use temporary_macro_definition. Remove
11250 (free_macro_definition_ptr): Remove.
11252 2018-02-08 Tom Tromey <tom@tromey.com>
11254 * macroexp.c (maybe_expand): Use std::string.
11256 2018-02-08 Tom Tromey <tom@tromey.com>
11258 * macroexp.c (struct macro_buffer): Add initializers for some
11260 (init_buffer, init_shared_buffer, free_buffer)
11261 (free_buffer_return_text): Remove.
11262 (macro_buffer): New constructors.
11263 (~macro_buffer): New destructor.
11264 (macro_buffer::set_shared): New method.
11265 (macro_buffer::resize_buffer, macro_buffer::appendc)
11266 (macro_buffer::appendmem): Now methods, not free functions.
11267 (set_token, append_tokens_without_splicing, stringify)
11268 (macro_stringify): Update.
11269 (gather_arguments): Change return type. Remove argc_p argument,
11270 add args_ptr argument. Use std::vector.
11271 (substitute_args): Remove argc argument. Accept std::vector.
11272 (expand): Update. Use std::vector.
11273 (scan, macro_expand, macro_expand_next): Update.
11275 2018-02-08 Tom Tromey <tom@tromey.com>
11277 * symtab.c (default_collect_symbol_completion_matches_break_on):
11278 Use unique_xmalloc_ptr.
11279 * macroscope.h: (sal_macro_scope, user_macro_scope)
11280 (default_macro_scope): Return unique_xmalloc_ptr.
11281 * macroscope.c (sal_macro_scope, user_macro_scope)
11282 (default_macro_scope): Return unique_xmalloc_ptr.
11283 * macroexp.h (macro_expand, macro_expand_once): Return
11284 unique_xmalloc_ptr.
11285 * macroexp.c (macro_expand, macro_expand_once): Return
11286 unique_xmalloc_ptr.
11287 * macrocmd.c (macro_expand_command, macro_expand_once_command)
11288 (info_macro_command, info_macros_command): Use
11289 unique_xmalloc_ptr.
11290 * compile/compile-c-support.c (write_macro_definitions): Use
11291 unique_xmalloc_ptr.
11292 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11294 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
11296 * value.c (value_static_field): Assign field type instead of
11297 containing type when returning an optimized out value.
11299 2018-02-06 Yao Qi <yao.qi@linaro.org>
11301 * ft32-tdep.c (ft32_read_pc): Remove.
11302 (ft32_write_pc): Remove.
11303 (ft32_gdbarch_init): Update.
11304 * m32r-tdep.c (m32r_read_pc): Remove.
11305 (m32r_gdbarch_init): Update.
11306 * mep-tdep.c (mep_read_pc): Remove.
11307 (mep_gdbarch_init): Update.
11308 * microblaze-tdep.c (microblaze_write_pc): Remove.
11309 (microblaze_gdbarch_init): Update.
11310 * mn10300-tdep.c (mn10300_read_pc): Remove.
11311 (mn10300_write_pc): Remove.
11312 (mn10300_gdbarch_init): Update.
11313 * moxie-tdep.c (moxie_read_pc): Remove.
11314 (moxie_write_pc): Remove.
11315 (moxie_gdbarch_init): Update.
11317 2018-02-06 Yao Qi <yao.qi@linaro.org>
11319 * expprint.c (print_subexp_standard): Handle
11320 OP_F77_UNDETERMINED_ARGLIST.
11321 (dump_subexp_body_standard): Likewise.
11323 2018-02-05 Alan Hayward <alan.hayward@arm.com>
11325 * target-descriptions.c (tdesc_element_visitor) Add empty
11327 (tdesc_type): Move make_gdb_type from here.
11328 (tdesc_type_builtin): Likewise.
11329 (tdesc_type_vector): Likewise.
11330 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11331 (make_gdb_type_struct): Move from tdesc_type_with_fields.
11332 (make_gdb_type_union): Likewise.
11333 (make_gdb_type_flags): Likewise.
11334 (make_gdb_type_enum): Likewise.
11335 (make_gdb_type): New function.
11336 (tdesc_register_type): Use static make_gdb_type.
11338 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
11340 * infcmd.c (default_print_one_register_info): Align natural-format
11341 column values consistently one under another.
11342 (pad_to_column): New function.
11344 2018-02-05 Joel Brobecker <brobecker@adacore.com>
11346 * dwarf2read.c (dwarf2_physname): Move commment.
11348 2018-02-01 Leszek Swirski <leszeks@google.com>
11350 * varobj.c (varobj_formatted_print_options): Allow recursive
11351 pretty printing if pretty printing is enabled.
11353 2018-02-01 Leszek Swirski <leszeks@google.com>
11355 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11356 names after a structop as a filename.
11358 2018-02-01 Yao Qi <yao.qi@linaro.org>
11360 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11361 (arm_record_coproc_data_proc): Likewise.
11363 2018-02-01 Yao Qi <yao.qi@linaro.org>
11365 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11367 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
11369 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11370 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11372 2018-01-31 Pedro Alves <palves@redhat.com>
11374 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11375 * inflow.c (child_terminal_save_inferior): Wrap reference to
11376 tcgetpgrp in HAVE_TERMIOS_H.
11377 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11379 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11380 always iterate over all inferiors.
11381 (gdbsim_cntrl_c): Adjust.
11382 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11384 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11386 * gdbtypes.c (lookup_array_range_type): Make sure the array's
11387 index type is objfile-owned if the element type is as well.
11389 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11393 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
11395 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11396 "features/s390x-linux64.c".
11397 (_initialize_s390_linux_tdep): Remove initialization of tdescs
11398 s390_linux32 and s390x_linux64.
11399 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11401 * s390-tdep.c: Include "features/s390-linux32.c" and
11402 "features/s390x-linux64.c".
11403 (s390_tdesc_valid): Add check for tdesc_has_registers.
11404 (s390_gdbarch_init): Make sure there is always a valid tdesc.
11405 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11406 tdesc_s390x_linux64.
11407 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11408 tdesc_s390x_linux64 to...
11409 * s390-tdep.h: ...here.
11411 2018-01-30 Pedro Alves <palves@redhat.com>
11414 * config.in, configure: Regenerate.
11415 * configure.ac: Check for getpgid.
11416 * go32-nat.c (go32_pass_ctrlc): New.
11417 (go32_target): Install it.
11418 * inf-child.c (inf_child_target): Install
11419 child_terminal_save_inferior, child_pass_ctrlc and
11421 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11422 (inf_ptrace_target): No longer install it.
11423 * infcmd.c (interrupt_target_1): Adjust.
11424 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11425 (child_interrupt): Declare.
11426 (inferior::terminal_state): New.
11427 * inflow.c (struct terminal_info): Update comments.
11428 (inferior_process_group): Delete.
11429 (terminal_is_ours): Delete.
11430 (gdb_tty_state): New.
11431 (child_terminal_init): Adjust.
11432 (is_gdb_terminal, sharing_input_terminal_1)
11433 (sharing_input_terminal): New functions.
11434 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
11435 Set the process's actual process group in the foreground if
11436 possible. Handle is_ours_for_output/is_ours distinction. Don't
11437 mark terminal as the inferior's if not sharing GDB's terminal.
11438 Don't check attach_flag.
11439 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11440 pass down a target_terminal_state.
11441 (child_terminal_save_inferior): New, factored out from ...
11442 (child_terminal_ours_1): ... this. Handle
11443 target_terminal_state::is_ours_for_output.
11444 (child_interrupt, child_pass_ctrlc): New.
11445 (inflow_inferior_exit): Clear the inferior's terminal_state.
11446 (copy_terminal_info): Copy the inferior's terminal state.
11447 (_initialize_inflow): Remove reference to terminal_is_ours.
11448 * inflow.h (inferior_process_group): Delete.
11449 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11450 * procfs.c (procfs_target): Don't install procfs_interrupt.
11451 (procfs_interrupt): Delete.
11452 * remote.c (remote_serial_quit_handler): Adjust.
11453 (remote_interrupt): Remove ptid parameter. Adjust.
11454 * target-delegates.c: Regenerate.
11455 * target.c: Include "terminal.h".
11456 (target_terminal::terminal_state): Rename to ...
11457 (target_terminal::m_terminal_state): ... this.
11458 (target_terminal::init): Adjust.
11459 (target_terminal::inferior): Adjust to per-inferior
11461 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11462 (target_terminal::ours, target_terminal::ours_for_output): Use
11463 target_terminal_is_ours_kind.
11464 (target_interrupt): Remove ptid parameter. Adjust.
11465 (default_target_pass_ctrlc): Adjust.
11466 * target.h (target_ops::to_terminal_save_inferior): New field.
11467 (target_ops::to_interrupt): Remove ptid_t parameter.
11468 (target_interrupt): Remove ptid_t parameter. Update comment.
11469 (target_pass_ctrlc): Update comment.
11470 * target/target.h (target_terminal_state): New scoped enum,
11471 factored out of ...
11472 (target_terminal::terminal_state): ... here.
11473 (target_terminal::inferior): Update comments.
11474 (target_terminal::restore_inferior): New.
11475 (target_terminal::is_inferior, target_terminal::is_ours)
11476 (target_terminal::is_ours_for_output): Adjust.
11477 (target_terminal::scoped_restore_terminal_state): Adjust to
11478 rename, and call restore_inferior() instead of inferior().
11479 (target_terminal::scoped_restore_terminal_state::m_state): Change
11481 (target_terminal::terminal_state): Rename to ...
11482 (target_terminal::m_terminal_state): ... this and change type.
11484 2018-01-30 Pedro Alves <palves@redhat.com>
11486 * linux-nat.c (wait_for_signal): New function.
11487 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11489 (async_terminal_is_ours)
11490 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11491 (linux_nat_add_target): Don't override
11492 to_terminal_inferior/to_terminal_ours.
11494 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
11496 * remote.c (remote_follow_fork): Don't call "detach_inferior".
11498 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
11500 * dwarf2read.c (free_dwo_files): Add forward-declaration.
11501 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11502 dwarf2_per_objfile_free here.
11503 (dwarf2_per_objfile_free): Remove.
11504 (_initialize_dwarf2_read): Don't register
11505 dwarf2_per_objfile_free as a registry cleanup.
11507 2018-01-27 Eli Zaretskii <eliz@gnu.org>
11509 Avoid compilation errors in MinGW native builds
11511 The error is triggered by including python-internal.h, and the
11514 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11515 from build-gnulib/import/math.h:27,
11516 from d:/usr/Python26/include/pyport.h:235,
11517 from d:/usr/Python26/include/Python.h:58,
11518 from python/python-internal.h:94,
11519 from python/py-arch.c:24:
11520 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11524 This happens because Python headers define 'hypot' to expand t
11525 '_hypot' in the Windows builds.
11526 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11527 'hypoth'. This avoids a compilation error.
11529 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11531 * MAINTAINERS (Write After Approval): Fix ordering.
11533 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11535 * MAINTAINERS (Write After Approval): Add Alan Hayward.
11537 2018-01-26 Alan Modra <amodra@gmail.com>
11539 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11540 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11541 Remove nop. Make const. Comment.
11542 (powerpc32_plt_stub_so_2): New.
11543 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11544 Correct count. Update uses.
11545 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11546 Move common code reading PLT entry word. Correct
11547 powerpc32_plt_stub PLT address calculation.
11548 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11549 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11550 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11551 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11552 (ppc64_standard_linkage8): Likewise.
11553 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11554 Correct insns description.
11555 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11557 2018-01-24 Pedro Alves <palves@redhat.com>
11559 GCC PR libstdc++/83906
11560 * gdbtypes.c (operator==(const dynamic_prop &,
11561 const dynamic_prop &)): New.
11562 (operator==(const range_bounds &, const range_bounds &)): New.
11563 (check_types_equal): Use them instead of memcmp.
11564 * gdbtypes.h (operator==(const dynamic_prop &,
11565 const dynamic_prop &)): Declare.
11566 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11567 (operator==(const range_bounds &, const range_bounds &)): Declare.
11568 (operator!=(const range_bounds &, const range_bounds &)): Declare.
11570 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11572 * s390-linux-tdep.c (s390_record_address_mask)
11573 (s390_record_calc_disp_common, s390_record_calc_disp)
11574 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11575 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11576 (s390_process_record): Move to s390-tdep.c.
11577 (s390_linux_init_abi_any): Adjust.
11578 * s390-tdep.c (s390_record_address_mask)
11579 (s390_record_calc_disp_common, s390_record_calc_disp)
11580 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11581 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11582 (s390_process_record): Moved from s390-linux-tdep.c
11583 (s390_gdbarch_init): Adjust.
11585 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11587 * s390-linux-nat.c (s390-tdep.h): New include.
11588 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11589 (HFILES_NO_SRCDIR): Add s390-tdep.h.
11590 (ALLDEPFILES): Add s390-tdep.c.
11591 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11592 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11593 * s390-tdep.h: ...this. New file.
11594 * s390-linux-tdep.c (s390-tdep.h): New include.
11595 (_initialize_s390_tdep): Rename to...
11596 (_initialize_s390_linux_tdep): ...this and adjust.
11597 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11598 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11600 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11601 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11602 (s390_is_partial_instruction, s390_software_single_step)
11603 (is_non_branch_ril, s390_displaced_step_copy_insn)
11604 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11605 (s390_prologue_data, s390_addr, s390_store, s390_load)
11606 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11607 (s390_register_call_saved, s390_guess_tracepoint_registers)
11608 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11609 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11610 (s390_pseudo_register_name, s390_pseudo_register_type)
11611 (s390_pseudo_register_read, s390_pseudo_register_write)
11612 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11613 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11614 (s390_addr_bits_remove, s390_address_class_type_flags)
11615 (s390_address_class_type_flags_to_name)
11616 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11617 (s390_function_arg_float, s390_function_arg_vector)
11618 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11619 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11620 (s390_frame_align, s390_register_return_value, s390_return_value)
11621 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11622 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11623 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11624 (s390_trad_frame_prev_register, s390_unwind_cache)
11625 (s390_prologue_frame_unwind_cache)
11626 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11627 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11628 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11629 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11630 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11631 (s390_frame_base_address, s390_local_base_address)
11632 (s390_frame_base, s390_gcc_target_options)
11633 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11634 (s390_validate_reg_range, s390_tdesc_valid)
11635 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11636 * s390-tdep.c: ...this. New file.
11638 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11640 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11641 (s390_process_record, s390_gdbarch_tdep_alloc)
11642 (s390_linux_init_abi_any): Use/set new hook.
11644 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11646 * s390-linux-tdep.c (osabi.h): New include.
11647 (s390_linux_init_abi_31, s390_linux_init_abi_64)
11648 (s390_linux_init_abi_any): New functions.
11649 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11651 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11653 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11654 tdesc_has_registers check
11656 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11658 * s390-linux-tdep.c (s390_tdesc_valid): New function.
11659 (s390_validate_reg_range): New macro.
11660 (s390_gdbarch_init): Adjust.
11662 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11664 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11665 (s390_gdbarch_tdep_alloc): Adjust.
11666 (s390_gdbarch_init): Adjust.
11668 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11670 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11671 <have_tdb>: Change type to bool.
11672 (s390_gdbarch_tdep_alloc): Adjust.
11673 (s390_gdbarch_init): Adjust.
11675 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11677 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11678 (gdbarch_tdep) <have_upper, have_vx>: New fields.
11679 (s390_gdbarch_tdep_alloc): New function.
11680 (s390_gdbarch_init): Allocate tdep at start and use its fields
11681 instead of separate variables.
11683 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11685 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11686 when looking for cached gdbarch and add comment for remaining.
11688 2018-01-22 Pedro Alves <palves@redhat.com>
11689 Sergio Durigan Junior <sergiodj@redhat.com>
11691 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11694 2018-01-22 Maciej W. Rozycki <macro@mips.com>
11696 * MAINTAINERS: Update my company e-mail address.
11698 2018-01-22 Yao Qi <yao.qi@linaro.org>
11700 * regcache.c (cooked_write_test): New function.
11701 (_initialize_regcache): Register the test.
11703 2018-01-22 Yao Qi <yao.qi@linaro.org>
11705 * ia64-tdep.c (ia64_pseudo_register_read): Call
11706 regcache->cooked_read instead of regcache_cooked_read_unsigned.
11707 * m32c-tdep.c (m32c_cat_read): Likewise.
11708 (m32c_r3r2r1r0_read): Likewise.
11709 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11710 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11712 2018-01-22 Yao Qi <yao.qi@linaro.org>
11714 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11715 method raw_read instead of regcache_raw_read.
11716 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11717 * arm-tdep.c (arm_neon_quad_read): Likewise.
11718 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11719 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11720 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11721 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11722 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11723 (i386_pseudo_register_read_into_value): Likewise.
11724 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11725 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11726 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11727 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11728 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11729 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11730 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11731 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11732 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11734 2018-01-22 Yao Qi <yao.qi@linaro.org>
11736 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11737 * configure.tgt: Remove target mt.
11738 * mt-tdep.c: Remove.
11739 * regcache.c (cooked_read_test): Remove the check for mt.
11741 2018-01-22 Yao Qi <yao.qi@linaro.org>
11743 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11744 instead of gdbarch_pseudo_register_read_value.
11746 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11748 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11751 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11753 * linespec.c (create_sals_line_offset): Remove code that preserved
11754 the symtab_and_line's line number.
11756 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11758 * varobj.c (varobj_create): Don't set valid_block when creating a
11761 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11763 * varobj.c (varobj_create): Remove out of date comment.
11765 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11768 * ada-exp.y (write_var_from_sym): Pass extra parameter when
11769 updating innermost block.
11770 * parse.c (innermost_block_tracker::update): Take extra type
11771 parameter, and check types match before updating innermost block.
11772 (write_dollar_variable): Update innermost block for registers.
11773 * parser-defs.h (enum innermost_block_tracker_type): New enum.
11774 (innermost_block_tracker::innermost_block_tracker): Initialise
11776 (innermost_block_tracker::reset): Take type parameter.
11777 (innermost_block_tracker::update): Take type parameter, and pass
11778 type through as needed.
11779 (innermost_block_tracker::m_types): New member.
11780 * varobj.c (varobj_create): Pass type when reseting innermost
11783 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11785 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11786 * ada-lang.c (resolve_subexp): Likewise.
11787 * breakpoint.c (set_breakpoint_condition) Likewise.
11788 (watch_command_1) Likewise.
11789 * c-exp.y (variable): Likewise.
11790 * d-exp.y (PrimaryExpression): Likewise.
11791 * f-exp.y (variable): Likewise.
11792 * go-exp.y (variable): Likewise.
11793 * m2-exp.y (variable): Likewise.
11794 * objfiles.c (objfile::~objfile): Likewise.
11795 * p-exp.y (variable): Likewise.
11796 * parse.c (innermost_block): Change type.
11797 * parser-defs.h (class innermost_block_tracker): New.
11798 (innermost_block): Change to innermost_block_tracker.
11799 * printcmd.c (display_command): Switch to innermost_block API.
11800 (do_one_display): Likewise.
11801 * rust-exp.y (do_one_display): Likewise.
11802 * symfile.c (clear_symtab_users): Likewise.
11803 * varobj.c (varobj_create): Switch to innermost_block API, replace
11804 use of innermost_block with block stored on varobj object.
11806 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11808 * expression.h (innermost_block): Remove declaration.
11809 * varobj.c: Add 'parser-defs.h' include.
11811 2018-01-19 Tom Tromey <tom@tromey.com>
11813 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11814 symbols in the static and global blocks.
11816 2018-01-19 James Clarke <jrtc27@jrtc27.com>
11818 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11819 gdb_ptrace.h, and move including gdb_wait.h ...
11820 * nat/linux-ptrace.h: ... to here.
11822 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11824 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11825 inf_ptrace_detach_success.
11826 (inf_ptrace_detach_success): Add inferior parameter, use it
11827 instead of inferior_ptid, pass it to detach_inferior.
11828 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11830 * inferior.c (detach_inferior): Add overload that takes an
11832 * inferior.h (detach_inferior): Likewise.
11833 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11834 use inferior_ptid, adjust call to inf_ptrace_detach_success.
11835 * linux-thread-db.c (thread_db_detach): Use inf parameter.
11837 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11839 * target.h (struct target_ops) <to_detach>: Add inferior
11841 (target_detach): Likewise.
11842 * target.c (dispose_inferior): Pass inferior down.
11843 (target_detach): Pass inferior down. Assert that it is equal to
11844 the current inferior.
11845 * aix-thread.c (aix_thread_detach): Pass inferior down.
11846 * corefile.c (core_file_command): Pass current_inferior() down.
11847 * corelow.c (core_detach): Add inferior parameter.
11848 * darwin-nat.c (darwin_detach): Likewise.
11849 * gnu-nat.c (gnu_detach): Likewise.
11850 * inf-ptrace.c (inf_ptrace_detach): Likewise.
11851 * infcmd.c (detach_command): Pass current_inferior() down to
11853 * infrun.c (follow_fork_inferior): Pass parent_inf to
11855 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11857 * linux-nat.c (linux_nat_detach): Add inferior parameter.
11858 * linux-thread-db.c (thread_db_detach): Likewise.
11859 * nto-procfs.c (procfs_detach): Likewise.
11860 * procfs.c (procfs_detach): Likewise.
11861 * record.c (record_detach): Likewise.
11862 * record.h (struct inferior): Forward-declare.
11863 (record_detach): Add inferior parameter.
11864 * remote-sim.c (gdbsim_detach): Likewise.
11865 * remote.c (remote_detach_1): Likewise.
11866 (remote_detach): Likewise.
11867 (extended_remote_detach): Likewise.
11868 * sol-thread.c (sol_thread_detach): Likewise.
11869 * target-debug.h (target_debug_print_inferior_p): New macro.
11870 * target-delegates.c: Re-generate.
11871 * top.c (kill_or_detach): Pass inferior down to target_detach.
11872 * windows-nat.c (windows_detach): Add inferior parameter.
11874 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11876 * target.h (struct target_ops) <to_detach>: Remove args
11878 (target_detach): Likewise.
11879 * target.c (dispose_inferior): Adjust.
11880 (target_detach): Remove args parameter, adjust.
11881 * aix-thread.c (aix_thread_detach): Adjust.
11882 * corefile.c (core_file_command): Adjust.
11883 * corelow.c (core_detach): Adjust.
11884 * darwin-nat.c (darwin_detach): Adjust.
11885 * gnu-nat.c (gnu_detach): Adjust.
11886 * inf-ptrace.c (inf_ptrace_detach): Adjust.
11887 * infcmd.c (detach_command): Adjust
11888 * infrun.c (follow_fork_inferior): Adjust.
11889 (handle_vfork_child_exec_or_exit): Adjust.
11890 * linux-fork.c (linux_fork_detach): Remove args parameter.
11891 * linux-fork.h (linux_fork_detach): Likewise.
11892 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11893 * linux-thread-db.c (thread_db_detach): Likewise.
11894 * nto-procfs.c (procfs_detach): Likewise.
11895 * procfs.c (procfs_detach): Likewise.
11896 (do_detach): Remove signo parameter.
11897 * record.c (record_detach): Remove args parameter.
11898 * record.h (record_detach): Likewise.
11899 * remote-sim.c (gdbsim_detach): Likewise.
11900 * remote.c (remote_detach_1): Likewise.
11901 (remote_detach): Likewise.
11902 (extended_remote_detach): Likewise.
11903 * sol-thread.c (sol_thread_detach): Likewise.
11904 * target-delegates.c: Re-generate.
11905 * top.c (struct qt_args) <args>: Remove field.
11906 (kill_or_detach): Don't pass args.
11907 (quit_force): Don't set args.
11908 * windows-nat.c (windows_detach): Remove args parameter.
11910 2018-01-19 Yao Qi <yao.qi@linaro.org>
11912 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11913 (arm_linux_init_abi): Install it.
11915 2018-01-19 Yao Qi <yao.qi@linaro.org>
11917 * osabi.c (gdb_osabi_names): Extend the regexp for
11918 arm-linux-gnueabihf.
11920 2018-01-18 Yao Qi <yao.qi@linaro.org>
11922 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11924 (abbrev_table::add_abbrev): Update.
11925 (abbrev_table::lookup_abbrev): Update.
11927 2018-01-18 Yao Qi <yao.qi@linaro.org>
11929 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11931 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
11933 * compile/compile.c (compile_to_object): Convert "triplet_rx"
11936 2018-01-17 Tom Tromey <tom@tromey.com>
11938 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
11940 2018-01-17 Tom Tromey <tom@tromey.com>
11942 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11943 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11944 (create_array_type_with_stride): Update.
11945 * dwarf2read.c (set_die_type): Update.
11947 2018-01-17 Tom Tromey <tom@tromey.com>
11949 * dwarf2read.c (delayed_method_info): Remove typedef.
11950 (dwarf2_cu::method_info): Now a std::vector.
11951 (add_to_method_list): Update.
11952 (free_delayed_list): Remove.
11953 (compute_delayed_physnames): Update.
11954 (process_full_comp_unit, process_full_type_unit): Clear the method
11955 list. Remove cleanups.
11956 (psymtab_include_file_name): Add name_holder parameter. Use
11957 unique_xmalloc_ptr.
11958 (dwarf_decode_lines): Update.
11960 2018-01-17 Tom Tromey <tom@tromey.com>
11961 Simon Marchi <simon.marchi@ericsson.com>
11963 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11964 (dwarf2_per_objfile::free_cached_comp_units)
11965 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11966 (init_cutu_and_read_dies_no_follow): Update.
11967 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11968 (dwarf2_cu::~dwarf2_cu): New.
11969 (free_heap_comp_unit, free_stack_comp_unit): Remove.
11970 (age_cached_comp_units, free_one_cached_comp_unit): Update.
11972 2018-01-17 Tom Tromey <tom@tromey.com>
11973 Simon Marchi <simon.marchi@ericsson.com>
11975 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11976 (struct die_reader_specs) <abbrev_table>: New member.
11977 (struct abbrev_table): Add constructor.
11978 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11979 <abbrev_obstack>: Now an auto_obstack.
11980 (abbrev_table_up): New typedef.
11981 (init_cu_die_reader): Add abbrev_table parameter.
11982 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11983 Add result_dwo_abbrev_table.
11984 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11985 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11987 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11989 (skip_children): Update.
11990 (abbrev_table::alloc_abbrev): Rename from
11991 abbrev_table_alloc_abbrev.
11992 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11993 (abbrev_table::lookup_abbrev): Rename from
11994 abbrev_table_lookup_abbrev.
11995 (abbrev_table_read_table): Return abbrev_table_up.
11996 (abbrev_table_free, abbrev_table_free_cleanup)
11997 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11998 (load_partial_dies): Update.
12000 2018-01-17 Tom Tromey <tom@tromey.com>
12002 * dwarf2read.c (dwarf2_compute_name): Update comment.
12003 (read_func_scope, read_variable): Update.
12004 (new_symbol): Remove.
12005 (new_symbol_full): Rename to new_symbol.
12007 2018-01-17 Mike Gulick <mgulick@mathworks.com>
12010 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12011 a warning instead of throwing an error, set section size to 0 and return
12013 * gdb_bfd.h (gdb_bfd_map_section): Update description.
12015 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
12017 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12019 (linux_ptrace_attach_fail_reason_string): Likewise.
12020 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12022 (linux_ptrace_attach_fail_reason_string): Likewise.
12023 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12025 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
12027 * linux-nat.c (linux_nat_attach): Remove xstrdup.
12029 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
12032 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12033 checking for fs_base/gs_base fields in struct user_regs_struct.
12034 * configure: Regenerate.
12036 2018-01-17 Yao Qi <yao.qi@linaro.org>
12038 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12040 (aarch64_linux_init_abi): Install it to gdbarch hook
12041 gcc_target_options.
12043 2018-01-15 Pedro Alves <palves@redhat.com>
12045 * common/signals-state-save-restore.c
12046 (save_original_signals_state): Fix typos.
12048 2017-01-12 Tom Tromey <tom@tromey.com>
12049 Sergio Durigan Junior <sergiodj@redhat.com>
12051 * Makefile.in (install-only): Install gdb-add-index.
12053 2018-01-12 John Baldwin <jhb@FreeBSD.org>
12055 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12057 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12059 * infrun.c (keep_going_pass_signal): Clear step-over info when
12060 insert_breakpoints fails.
12062 2018-01-11 Pedro Alves <palves@redhat.com>
12065 * infrun.c (resume): Rename to ...
12066 (resume_1): ... this.
12067 (resume): Reimplement as wrapper around resume_1.
12069 2018-01-11 Pedro Alves <palves@redhat.com>
12072 * remote.c (remote_parse_stop_reply): Default to the last-set
12073 general thread instead of to 'magic_null_ptid'.
12075 2018-01-10 Pedro Alves <palves@redhat.com>
12077 * language.h (language_get_symbol_name_matcher): Rename ...
12078 (get_symbol_name_matcher): ... this.
12079 * language.c (language_get_symbol_name_matcher): Ditto.
12080 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12083 2018-01-10 Pedro Alves <palves@redhat.com>
12087 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12088 Adjust to use language_get_symbol_name_matcher instead of
12089 language_defn::la_get_symbol_name_matcher.
12090 * language.c (language_get_symbol_name_matcher): If in Ada mode
12091 and the lookup name is a verbatim match, return Ada's matcher.
12092 * language.h (language_get_symbol_name_matcher): Adjust comment.
12093 (ada_lookup_name_info::verbatim_p):: New method.
12095 2018-01-10 Pedro Alves <palves@redhat.com>
12098 * ada-lang.c (ada_collect_symbol_completion_matches): If the
12099 minsym's language is language_auto or language_cplus, pass down
12100 language_ada instead.
12101 * symtab.c (compare_symbol_name): Don't frob symbol language here.
12103 2018-01-10 Pedro Alves <palves@redhat.com>
12106 * minsyms.c (linkage_name_str): New function.
12107 (iterate_over_minimal_symbols): Use it.
12109 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12111 * NEWS: Document that 'info proc' now works on FreeBSD.
12113 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12115 * configure.ac: Check for kinfo_getfile in libutil.
12116 * configure: Regenerate.
12117 * config.in: Regenerate.
12118 * fbsd-nat.c: Include "fbsd-tdep.h".
12119 (fbsd_fetch_cmdline): New.
12120 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12121 rather than calling error.
12122 (fbsd_info_proc): New.
12123 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12124 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12125 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12127 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12129 * fbsd-nat.c (struct free_deleter): Remove.
12130 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12132 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12134 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12135 NULL for an empty pathname.
12137 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12139 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12140 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12141 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12142 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12143 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12144 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12145 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12146 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12147 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12148 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12149 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12150 (fbsd_core_fetch_timeval, fbsd_print_sigset)
12151 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12152 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
12153 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12155 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
12157 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12158 (gnu_xfer_auxv): New function.
12159 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12160 TARGET_OBJECT_AUXV.
12162 2018-01-08 Yao Qi <yao.qi@linaro.org>
12163 Simon Marchi <simon.marchi@ericsson.com>
12165 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12167 (COMMON_OBS): Remove selftest.o.
12168 * configure.ac: Append selftest-arch.c and common/selftest.c to
12169 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
12170 * configure: Re-generated.
12171 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12173 (maintenance_info_selftests): Likewise.
12175 2018-01-08 Xavier Roirand <roirand@adacore.com>
12177 * ada-valprint.c (val_print_packed_array_elements): Use
12178 proper number of elements when printing an array indexed
12179 by an enumeration type.
12181 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12183 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12184 (dw2_get_file_names_reader): Adjust.
12185 (lookup_dwo_signatured_type): Adjust.
12186 (lookup_dwp_signatured_type): Adjust.
12187 (lookup_signatured_type): Adjust.
12188 (create_type_unit_group): Adjust.
12189 (get_type_unit_group): Adjust.
12190 (process_psymtab_comp_unit_reader): Adjust.
12191 (build_type_psymtabs_reader): Adjust.
12192 (scan_partial_symbols): Adjust.
12193 (add_partial_symbol): Adjust.
12194 (add_partial_subprogram): Adjust.
12195 (peek_die_abbrev): Adjust.
12196 (fixup_go_packaging): Adjust.
12197 (process_imported_unit_die): Adjust.
12198 (dwarf2_compute_name): Adjust.
12199 (dwarf2_physname): Adjust.
12200 (read_import_statement): Adjust.
12201 (handle_DW_AT_stmt_list): Adjust.
12202 (read_file_scope): Adjust.
12203 (read_func_scope): Adjust.
12204 (read_lexical_block_scope): Adjust.
12205 (read_call_site_scope): Adjust.
12206 (read_variable): Adjust.
12207 (dwarf2_rnglists_process): Adjust.
12208 (dwarf2_ranges_process): Adjust.
12209 (dwarf2_ranges_read): Adjust.
12210 (dwarf2_get_pc_bounds): Adjust.
12211 (dwarf2_record_block_ranges): Adjust.
12212 (dwarf2_add_field): Adjust.
12213 (dwarf2_add_member_fn): Adjust.
12214 (read_structure_type): Adjust.
12215 (process_structure_scope): Adjust.
12216 (read_enumeration_type): Adjust.
12217 (read_array_type): Adjust.
12218 (mark_common_block_symbol_computed): Adjust.
12219 (read_common_block): Adjust.
12220 (read_namespace_type): Adjust.
12221 (read_namespace): Adjust.
12222 (read_module_type): Adjust.
12223 (read_tag_pointer_type): Adjust.
12224 (read_tag_ptr_to_member_type): Adjust.
12225 (read_tag_string_type): Adjust.
12226 (read_subroutine_type): Adjust.
12227 (read_typedef): Adjust.
12228 (read_base_type): Adjust.
12229 (attr_to_dynamic_prop): Adjust.
12230 (read_subrange_type): Adjust.
12231 (read_unspecified_type): Adjust.
12232 (dwarf2_read_abbrevs): Adjust.
12233 (load_partial_dies): Adjust.
12234 (read_partial_die): Adjust.
12235 (find_partial_die): Adjust.
12236 (guess_partial_die_structure_name): Adjust.
12237 (fixup_partial_die): Adjust.
12238 (read_attribute_value): Adjust.
12239 (read_addr_index): Adjust.
12240 (read_addr_index_from_leb128): Adjust.
12241 (read_str_index): Adjust.
12242 (dwarf2_string_attr): Adjust.
12243 (get_debug_line_section): Adjust.
12244 (dwarf_decode_line_header): Adjust.
12245 (lnp_state_machine::check_line_address): Adjust.
12246 (dwarf_decode_lines_1): Adjust.
12247 (dwarf_decode_lines): Adjust.
12248 (dwarf2_start_symtab): Adjust.
12249 (var_decode_location): Adjust.
12250 (new_symbol_full): Adjust.
12251 (dwarf2_const_value_data): Adjust.
12252 (dwarf2_const_value_attr): Adjust.
12253 (dwarf2_const_value): Adjust.
12254 (die_type): Adjust.
12255 (die_containing_type): Adjust.
12256 (build_error_marker_type): Adjust.
12257 (lookup_die_type): Adjust.
12258 (guess_full_die_structure_name): Adjust.
12259 (anonymous_struct_prefix): Adjust.
12260 (determine_prefix): Adjust.
12261 (dwarf2_name): Adjust.
12262 (follow_die_ref_or_sig): Adjust.
12263 (follow_die_offset): Adjust.
12264 (follow_die_ref): Adjust.
12265 (follow_die_sig_1): Adjust.
12266 (follow_die_sig): Adjust.
12267 (get_signatured_type): Adjust.
12268 (get_DW_AT_signature_type): Adjust.
12269 (decode_locdesc): Adjust.
12270 (dwarf_decode_macros): Adjust.
12271 (cu_debug_loc_section): Adjust.
12272 (fill_in_loclist_baton): Adjust.
12273 (dwarf2_symbol_mark_computed): Adjust.
12274 (init_one_comp_unit): Don't assign
12275 dwarf2_cu::dwarf2_per_objfile.
12276 (set_die_type): Adjust.
12278 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12280 * dwarf2read.c (struct mapped_debug_names): Add constructor.
12281 <dwarf2_per_objfile>: New field.
12282 (dwarf2_per_objfile): Remove global.
12283 (get_dwarf2_per_objfile): New function.
12284 (set_dwarf2_per_objfile): New function.
12285 (dwarf2_build_psymtabs_hard): Change objfile parameter to
12286 dwarf2_per_objfile.
12287 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12288 (read_abbrev_offset): Likewise.
12289 (read_indirect_string): Likewise.
12290 (read_indirect_line_string): Likewise.
12291 (read_indirect_string_at_offset): Likewise.
12292 (read_indirect_string_from_dwz): Likewise.
12293 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12294 dwarf2_per_objfile.
12295 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12296 (create_all_comp_units): Change objfile parameter to
12297 dwarf2_per_objfile.
12298 (create_all_type_units): Likewise.
12299 (process_queue): Add dwarf2_per_objfile parameter.
12300 (read_and_check_comp_unit_head): Likewise.
12301 (lookup_dwo_unit_in_dwp): Likewise.
12302 (get_dwp_file): Likewise.
12303 (process_cu_includes): Likewise.
12304 (struct free_dwo_file_cleanup_data): New struct.
12305 (dwarf2_has_info): Use get_dwarf2_per_objfile and
12306 set_dwarf2_per_objfile.
12307 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12308 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12309 context, adjust calls.
12310 (dw2_instantiate_symtab): Likewise.
12311 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12312 (dw2_get_cu): Likewise.
12313 (create_cu_from_index_list): Change objfile parameter to
12314 dwarf2_per_objfile.
12315 (create_cus_from_index_list): Get dwarf2_per_objfile from
12316 context, adjust calls.
12317 (create_cus_from_index): Likewise.
12318 (create_signatured_type_table_from_index): Change objfile
12319 parameter to dwarf2_per_objfile.
12320 (create_signatured_type_table_from_debug_names): Change objfile
12321 parameter to dwarf2_per_objfile.
12322 (create_addrmap_from_index): Likewise.
12323 (create_addrmap_from_aranges): Likewise.
12324 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12325 (dw2_setup): Remove.
12326 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12328 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12329 get_dwarf2_per_objfile.
12330 (dw2_forget_cached_source_info): Likewise.
12331 (dw2_map_symtabs_matching_filename): Likewise.
12332 (struct dw2_symtab_iterator) <index>: Remove.
12333 <dwarf2_per_objfile>: New field.
12334 (dw2_symtab_iter_init): Replace index parameter with
12335 dwarf2_per_objfile.
12336 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12337 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12338 (dw2_print_stats): Likewise.
12339 (dw2_dump): Likewise.
12340 (dw2_expand_symtabs_for_function): Likewise.
12341 (dw2_expand_all_symtabs): Likewise.
12342 (dw2_expand_symtabs_with_fullname): Likewise.
12343 (dw2_expand_marked_cus): Replace index and objfile parameters
12344 with dwarf2_per_objfile.
12345 (dw_expand_symtabs_matching_file_matcher): Add
12346 dwarf2_per_objfile parameter and adjust calls.
12347 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12349 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12350 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12352 (create_cus_from_debug_names_list): Replace objfile parameter
12353 with dwarf2_per_objfile and adjust calls.
12354 (create_cus_from_debug_names): Likewise.
12355 (dwarf2_read_debug_names): Likewise.
12356 (mapped_debug_names::namei_to_name): Adjust call.
12357 (dw2_debug_names_iterator::next): Likewise.
12358 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12359 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12360 (dw2_debug_names_dump): Likewise.
12361 (dw2_debug_names_expand_symtabs_for_function): Likewise.
12362 (dw2_debug_names_expand_symtabs_matching): Likewise.
12363 (dwarf2_initialize_objfile): Likewise.
12364 (dwarf2_build_psymtabs): Likewise.
12365 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12367 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12368 (read_and_check_comp_unit_head): Likewise.
12369 (read_abbrev_offset): Likewise.
12370 (create_debug_type_hash_table): Likewise.
12371 (create_debug_types_hash_table): Likewise.
12372 (create_all_type_units): Replace objfile parameter with
12373 dwarf2_per_objfile.
12374 (add_type_unit): Add dwarf2_per_objfile parameter.
12375 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12376 with dwarf2_per_objfile.
12377 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12378 (lookup_dwp_signatured_type): Likewise.
12379 (lookup_signatured_type): Likewise.
12380 (read_cutu_die_from_dwo): Likewise.
12381 (init_tu_and_read_dwo_dies): Likewise.
12382 (init_cutu_and_read_dies): Likewise.
12383 (init_cutu_and_read_dies_no_follow): Likewise.
12384 (allocate_type_unit_groups_table): Add objfile parameter.
12385 (create_type_unit_group): Use dwarf2_per_objfile from cu.
12386 (get_type_unit_group): Likewise.
12387 (process_psymtab_comp_unit): Update call.
12388 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12389 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12390 (print_tu_stats): Likewise.
12391 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12392 in void* parameter.
12393 (build_type_psymtabs): Change objfile parameter to
12394 dwarf2_per_objfile.
12395 (process_skeletonless_type_unit): Use dwarf2_per_objfile
12396 passed in void* parameter.
12397 (process_skeletonless_type_units): Change objfile parameter to
12398 dwarf2_per_objfile.
12399 (set_partial_user): Likewise.
12400 (dwarf2_build_psymtabs_hard): Likewise.
12401 (read_comp_units_from_section): Likewise.
12402 (create_all_comp_units): Likewise.
12403 (scan_partial_symbols): Update calls.
12404 (add_partial_symbol): Likewise.
12405 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12406 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12407 (process_queue): Add dwarf2_per_objfile parameter.
12408 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12409 (compute_compunit_symtab_includes): Likewise.
12410 (process_cu_includes): Add dwarf2_per_objfile parameter.
12411 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12412 (process_full_type_unit): Likewise.
12413 (process_imported_unit_die): Update call.
12414 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12415 (read_file_scope): Likewise.
12416 (allocate_dwo_file_hash_table): Add objfile parameter.
12417 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12418 (create_cus_hash_table): Likewise.
12419 (create_dwp_hash_table): Likewise.
12420 (create_dwo_unit_in_dwp_v1): Likewise.
12421 (create_dwp_v2_section): Likewise.
12422 (create_dwo_unit_in_dwp_v2): Likewise.
12423 (lookup_dwo_unit_in_dwp): Likewise.
12424 (try_open_dwop_file): Likewise.
12425 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12426 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12427 cleanup to include a reference to dwarf2_per_objfile.
12428 (open_dwp_file): Add dwarf2_per_objfile parameter.
12429 (open_and_init_dwp_file): Likewise.
12430 (get_dwp_file): Likewise.
12431 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12432 (queue_and_load_all_dwo_tus): Update call.
12433 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12435 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12436 (dwarf2_ranges_process): Likewise.
12437 (dwarf2_get_pc_bounds): Likewise.
12438 (mark_common_block_symbol_computed): Likewise.
12439 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12440 (dwarf2_read_abbrevs): Update call.
12441 (read_partial_die): Use dwarf2_per_objfile from cu.
12442 (find_partial_die): Likewise.
12443 (fixup_partial_die): Likewise.
12444 (read_attribute_value): Likewise.
12445 (read_indirect_string_at_offset_from): Add objfile parameter.
12446 (read_indirect_string_at_offset): Add dwarf2_per_objfile
12448 (read_indirect_string_from_dwz): Add objfile parameter.
12449 (read_indirect_string): Add objfile parameter.
12450 (read_addr_index_1): Add dwarf2_per_objfile parameter.
12451 (read_addr_index): Use dwarf2_per_objfile from cu.
12452 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12454 (read_str_index): Use dwarf2_per_objfile from cu.
12455 (get_debug_line_section): Likewise.
12456 (read_formatted_entries): Add dwarf2_per_objfile parameter.
12457 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12458 (new_symbol_full): Use dwarf2_per_objfile from cu.
12459 (build_error_marker_type): Likewise.
12460 (lookup_die_type): Likewise.
12461 (determine_prefix): Likewise.
12462 (follow_die_offset): Likewise.
12463 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12464 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12465 (dwarf2_fetch_die_type_sect_off): Likewise.
12466 (dwarf2_get_die_type): Likewise.
12467 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12468 (get_signatured_type): Likewise.
12469 (get_DW_AT_signature_type): Likewise.
12470 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12471 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12472 (cu_debug_loc_section): Likewise.
12473 (fill_in_loclist_baton): Likewise.
12474 (dwarf2_symbol_mark_computed): Likewise.
12475 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12476 dwarf2_per_objfile.
12477 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12479 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12480 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12481 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12482 (set_die_type): Use dwarf2_free_objfile from cu.
12483 (get_die_type_at_offset): Likewise.
12484 (dwarf2_per_objfile_free): Don't assign global variable.
12485 (debug_names) <constructor>: Add dwarf2_per_objfile
12486 parameter, update m_debugstrlookup construction.
12487 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12489 <m_dwarf2_per_objfile>: New field.
12490 <lookup>: Use m_dwarf2_per_objfile.
12491 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12492 (psyms_seen_size): Likewise.
12493 (write_gdbindex): Replace objfile parameter with
12494 dwarf2_per_objfile.
12495 (write_debug_names): Likewise.
12496 (write_psymtabs_to_index): Likewise.
12497 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12500 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12502 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12503 <dwarf2_per_objfile>: New field.
12504 (struct dwarf2_per_cu_data) <objfile>: Remove.
12505 <dwarf2_per_objfile>: New field.
12506 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12508 (create_signatured_type_table_from_index): Likewise.
12509 (create_debug_type_hash_table): Likewise.
12510 (fill_in_sig_entry_from_dwo_entry): Likewise.
12511 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12512 (create_type_unit_group): Assign dwarf2_per_objfile instead of
12514 (create_partial_symtab): Access objfile through
12515 dwarf2_per_objfile.
12516 (process_psymtab_comp_unit_reader): Likewise.
12517 (read_comp_units_from_section): Likewise.
12518 (scan_partial_symbols): Likewise.
12519 (add_partial_symbol): Likewise.
12520 (add_partial_subprogram): Likewise.
12521 (peek_die_abbrev): Likewise.
12522 (fixup_go_packaging): Likewise.
12523 (process_full_comp_unit): Likewise.
12524 (process_full_type_unit): Likewise.
12525 (process_imported_unit_die): Likewise.
12526 (dwarf2_compute_name): Likewise.
12527 (dwarf2_physname): Likewise.
12528 (read_import_statement): Likewise.
12529 (create_cus_hash_table): Assign dwarf2_physname instead of
12531 (read_func_scope): Access objfile through dwarf2_per_objfile.
12532 (read_lexical_block_scope): Likewise.
12533 (read_call_site_scope): Likewise.
12534 (read_variable): Likewise.
12535 (dwarf2_rnglists_process): Likewise.
12536 (dwarf2_ranges_process): Likewise.
12537 (dwarf2_ranges_read): Likewise.
12538 (dwarf2_record_block_ranges): Likewise.
12539 (dwarf2_add_field): Likewise.
12540 (dwarf2_add_member_fn): Likewise.
12541 (read_structure_type): Likewise.
12542 (process_structure_scope): Likewise.
12543 (read_enumeration_type): Likewise.
12544 (read_array_type): Likewise.
12545 (read_common_block): Likewise.
12546 (read_namespace_type): Likewise.
12547 (read_namespace): Likewise.
12548 (read_module_type): Likewise.
12549 (read_tag_pointer_type): Likewise.
12550 (read_tag_ptr_to_member_type): Likewise.
12551 (read_tag_string_type): Likewise.
12552 (read_subroutine_type): Likewise.
12553 (read_typedef): Likewise.
12554 (read_base_type): Likewise.
12555 (attr_to_dynamic_prop): Likewise.
12556 (read_subrange_type): Likewise.
12557 (read_unspecified_type): Likewise.
12558 (load_partial_dies): Likewise.
12559 (read_partial_die): Likewise.
12560 (find_partial_die): Likewise.
12561 (guess_partial_die_structure_name): Likewise.
12562 (fixup_partial_die): Likewise.
12563 (read_attribute_value): Likewise.
12564 (read_addr_index_from_leb128): Likewise.
12565 (dwarf2_read_addr_index): Likewise.
12566 (dwarf2_string_attr): Likewise.
12567 (lnp_state_machine::check_line_address): Likewise.
12568 (dwarf_decode_lines_1): Likewise.
12569 (dwarf_decode_lines): Likewise.
12570 (dwarf2_start_symtab): Likewise.
12571 (var_decode_location): Likewise.
12572 (new_symbol_full): Likewise.
12573 (dwarf2_const_value_data): Likewise.
12574 (dwarf2_const_value_attr): Likewise.
12575 (dwarf2_const_value): Likewise.
12576 (die_type): Likewise.
12577 (die_containing_type): Likewise.
12578 (lookup_die_type): Likewise.
12579 (guess_full_die_structure_name): Likewise.
12580 (anonymous_struct_prefix): Likewise.
12581 (dwarf2_name): Likewise.
12582 (follow_die_ref_or_sig): Likewise.
12583 (follow_die_offset): Likewise.
12584 (follow_die_ref): Likewise.
12585 (dwarf2_fetch_die_loc_sect_off): Likewise.
12586 (dwarf2_fetch_constant_bytes): Likewise.
12587 (dwarf2_fetch_die_type_sect_off): Likewise.
12588 (dwarf2_get_die_type): Likewise.
12589 (follow_die_sig): Likewise.
12590 (decode_locdesc): Likewise.
12591 (dwarf2_per_cu_objfile): Likewise.
12592 (dwarf2_per_cu_text_offset): Likewise.
12593 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12595 (set_die_type): Access objfile through
12596 dwarf2_per_objfile.
12598 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12600 * valprint.c (converted_character_d): Remove typedef.
12601 (DEF_VEC_O (converted_character_d)): Remove.
12602 (count_next_character): Use std::vector.
12603 (print_converted_chars_to_obstack): Likewise.
12604 (generic_printstr): Likewise.
12606 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12608 * xml-support.h (struct gdb_xml_value): Add constructor.
12609 <value>: Change type to unique_xmalloc_ptr.
12610 (gdb_xml_value_s): Remove typedef.
12611 (DEF_VEC_O (gdb_xml_value_s)): Remove.
12612 (gdb_xml_element_start_handler): Change parameter type to
12614 (xml_find_attribute): Likewise.
12615 * xml-support.c (xml_find_attribute): Change parameter type to
12616 std::vector and adjust.
12617 (gdb_xml_values_cleanup): Remove.
12618 (gdb_xml_parser::start_element): Adjust to std::vector.
12619 (xinclude_start_include): Change paraeter type to std::vector
12621 * btrace.c (check_xml_btrace_version): Likewise.
12622 (parse_xml_btrace_block): Likewise.
12623 (parse_xml_btrace_pt_config_cpu): Likewise.
12624 (parse_xml_btrace_pt): Likewise.
12625 (parse_xml_btrace_conf_bts): Likewise.
12626 (parse_xml_btrace_conf_pt): Likewise.
12627 * memory-map.c (memory_map_start_memory): Likewise.
12628 (memory_map_start_property): Likewise.
12629 * osdata.c (osdata_start_osdata): Likewise.
12630 (osdata_start_item): Likewise.
12631 (osdata_start_column): Likewise.
12632 * remote.c (start_thread): Likewise.
12633 * solib-aix.c (library_list_start_library): Likewise.
12634 (library_list_start_list): Likewise.
12635 * solib-svr4.c (library_list_start_library): Likewise.
12636 (svr4_library_list_start_list): Likewise.
12637 * solib-target.c (library_list_start_segment): Likewise.
12638 (library_list_start_section): Likewise.
12639 (library_list_start_library): Likewise.
12640 (library_list_start_list): Likewise.
12641 * tracepoint.c (traceframe_info_start_memory): Likewise.
12642 (traceframe_info_start_tvar): Likewise.
12643 * xml-syscall.c (syscall_start_syscall): Likewise.
12644 * xml-tdesc.c (tdesc_start_target): Likewise.
12645 (tdesc_start_feature): Likewise.
12646 (tdesc_start_reg): Likewise.
12647 (tdesc_start_union): Likewise.
12648 (tdesc_start_struct): Likewise.
12649 (tdesc_start_flags): Likewise.
12650 (tdesc_start_enum): Likewise.
12651 (tdesc_start_field): Likewise.
12652 (tdesc_start_enum_value): Likewise.
12653 (tdesc_start_vector): Likewise.
12655 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12657 * extension.h (struct xmethod_worker) <clone>: Remove.
12658 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12660 (python_xmethod_worker::clone): Remove.
12661 * valops.c (find_overload_match): Use std::move instead of
12664 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12666 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12667 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12668 <free_xmethod_worker_data>: Remove.
12669 <get_matching_xmethod_workers>: Chance VEC to std::vector.
12670 <get_xmethod_arg_types>: Remove.
12671 <get_xmethod_result_type>: Remove.
12672 <invoke_xmethod>: Remove.
12673 * extension.c (new_xmethod_worker): Remove.
12674 (clone_xmethod_worker): Remove.
12675 (get_matching_xmethod_workers): Return void, pass std::vector by
12677 (get_xmethod_arg_types): Rename to...
12678 (xmethod_worker::get_arg_types): ... this, and adjust.
12679 (get_xmethod_result_type): Rename to...
12680 (xmethod_worker::get_result_type): ... this, and adjust.
12681 (invoke_xmethod): Remove.
12682 (free_xmethod_worker): Remove.
12683 (free_xmethod_worker_vec): Remove.
12684 * extension.h (enum ext_lang_rc): Move here from
12686 (struct xmethod_worker): Add constructor and destructor.
12689 <invoke, clone, do_get_result_type, do_get_arg_types>: New
12690 virtual pure methods.
12691 <get_arg_types, get_result_type>: New methods.
12692 (xmethod_worker_ptr): Remove typedef.
12693 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12694 (xmethod_worker_vec): Remove typedef.
12695 (xmethod_worker_up): New typedef.
12696 (invoke_xmethod): Remove.
12697 (clone_xmethod_worker): Remove.
12698 (free_xmethod_worker): Remove.
12699 (free_xmethod_worker_vec): Remove.
12700 (get_xmethod_arg_types): Remove.
12701 (get_xmethod_result_type): Remove.
12702 * valops.c (find_method_list): Use std::vector, don't use
12703 intermediate vector.
12704 (value_find_oload_method_list): Use std::vector.
12705 (find_overload_match): Use std::vector.
12706 (find_oload_champ): Use std::vector.
12707 * value.c (value_free): Use operator delete.
12708 (value_of_xmethod): Rename to...
12709 (value_from_xmethod): ... this. Don't assign
12710 xmethod_worker::value, take rvalue-reference.
12711 (result_type_of_xmethod): Adjust.
12712 (call_xmethod): Adjust.
12713 * value.h: Include extension.h.
12714 (struct xmethod_worker): Don't forward-declare.
12715 (value_of_xmethod): Rename to...
12716 (value_from_xmethod): ... this, take rvalue-reference.
12717 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12718 (struct python_xmethod_worker): ... this, add constructor and
12720 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12721 (gdbpy_free_xmethod_worker_data): Rename to...
12722 (python_xmethod_worker::~python_xmethod_worker): ... this and
12724 (gdbpy_clone_xmethod_worker_data): Rename to...
12725 (python_xmethod_worker::clone): ... this and adjust.
12726 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12728 (gdbpy_get_xmethod_arg_types): Rename to...
12729 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12730 (gdbpy_get_xmethod_result_type): Rename to...
12731 (python_xmethod_worker::do_get_result_type): ... this and
12733 (gdbpy_invoke_xmethod): Rename to...
12734 (python_xmethod_worker::invoke): ... this and adjust.
12735 (new_python_xmethod_worker): Rename to...
12736 (python_xmethod_worker::python_xmethod_worker): ... this and
12738 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12740 (gdbpy_free_xmethod_worker_data): Remove.
12741 (gdbpy_get_matching_xmethod_workers): Use std::vector.
12742 (gdbpy_get_xmethod_arg_types): Remove.
12743 (gdbpy_get_xmethod_result_type): Remove.
12744 (gdbpy_invoke_xmethod): Remove.
12745 * python/python.c (python_extension_ops): Remove obsolete
12748 2018-01-05 Pedro Alves <palves@redhat.com>
12751 * common/signals-state-save-restore.c
12752 (save_original_signals_state): New parameter 'quiet'. Warn if we
12753 find a custom handler preinstalled, instead of internal erroring.
12754 But only warn if !quiet.
12755 * common/signals-state-save-restore.h
12756 (save_original_signals_state): New parameter 'quiet'.
12757 * main.c (captured_main_1): Move save_original_signals_state call
12758 after option handling, and pass QUIET.
12760 2018-01-05 Pedro Alves <palves@redhat.com>
12762 * spu-tdep.c (spu_catch_start): Pass
12763 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12765 2018-01-05 Pedro Alves <palves@redhat.com>
12768 * ada-lang.c (literal_symbol_name_matcher): New function.
12769 (ada_get_symbol_name_matcher): Use it for
12770 symbol_name_match_type::SEARCH_NAME.
12771 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
12772 it down instead of assuming symbol_name_match_type::FULL.
12773 * block.h (block_lookup_symbol): New parameter 'match_type'.
12774 * c-valprint.c (print_unpacked_pointer): Use
12775 lookup_symbol_search_name instead of lookup_symbol.
12776 * compile/compile-object-load.c (get_out_value_type): Pass down
12777 symbol_name_match_type::SEARCH_NAME.
12778 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12779 symbol_name_match_type::FULL.
12780 * cp-support.c (cp_get_symbol_name_matcher): Handle
12781 symbol_name_match_type::SEARCH_NAME.
12782 * infrun.c (insert_exception_resume_breakpoint): Use
12783 lookup_symbol_search_name.
12784 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12785 * psymtab.c (maintenance_check_psymtabs): Use
12786 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12787 * stack.c (print_frame_args): Use lookup_symbol_search_name and
12788 SYMBOL_SEARCH_NAME.
12789 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12790 if symbol_name_match_type::SEARCH_NAME.
12791 (lookup_symbol_in_language): Pass down
12792 symbol_name_match_type::FULL.
12793 (lookup_symbol_search_name): New.
12794 (lookup_language_this): Pass down
12795 symbol_name_match_type::SEARCH_NAME.
12796 (lookup_symbol_aux, lookup_local_symbol): New parameter
12797 'match_type'. Pass it down.
12798 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12799 (lookup_symbol_search_name): New declaration.
12800 (lookup_symbol_in_block): New 'match_type' parameter.
12802 2018-01-05 Pedro Alves <palves@redhat.com>
12805 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12807 (ada_lookup_symbol): Reimplement in terms of
12808 ada_lookup_symbol_list, bits factored out from
12809 ada_lookup_encoded_symbol.
12811 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12813 * ada-exp.y (write_object_renaming): When subscripting an array
12814 using a symbol as the index, pass the block in call to
12815 ada_lookup_encoded_symbol when looking that symbol up.
12817 2018-01-05 Jerome Guitton <guitton@adacore.com>
12819 * ada-lang.c (ada_array_length): Use ada_index_type instead of
12822 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12824 * ada-lang.c (ada_to_fixed_value_create): Add handling of
12825 the case where VALUE_LVAL (val0) is not lval_memory.
12827 2018-01-05 Xavier Roirand <roirand@adacore.com>
12829 * ada-valprint.c (print_optional_low_bound): Handle
12830 character-indexed array printing like boolean-indexed array
12833 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12835 * NEWS: Create a new section for the next release branch.
12836 Rename the section of the current branch, now that it has
12839 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12841 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12842 * version.in: Bump version to 8.1.50.DATE-git.
12844 2018-01-03 Xavier Roirand <roirand@adacore.com>
12846 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12848 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12850 (default_exception_support_info) <catch_handlers_sym>: Add field.
12851 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12852 (ada_exception_name_addr_1): Add "catch handlers" handling.
12853 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12854 Update all callers.
12855 (create_excep_cond_exprs) <ex>: Add parameter.
12856 (re_set_exception): Update create_excep_cond_exprs call.
12857 (print_it_exception, print_one_exception, print_mention_exception)
12858 (print_recreate_exception): Add "catch handler" handling.
12859 (allocate_location_catch_handlers, re_set_catch_handlers)
12860 (check_status_catch_handlers, print_it_catch_handlers)
12861 (print_one_catch_handlers, print_mention_catch_handlers)
12862 (print_recreate_catch_handlers): New function.
12863 (catch_handlers_breakpoint_ops): New variable.
12864 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12865 Add parameter. Add "catch handler" handling.
12866 (ada_exception_sym_name, ada_exception_breakpoint_ops):
12867 Add "catch handler" handling.
12868 (ada_exception_catchpoint_cond_string): Add "catch handler"
12870 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12872 (catch_ada_handlers_command): New function.
12873 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12874 operations structure.
12875 (_initialize_ada_language): Add "catch handlers" command entry.
12876 * NEWS: Document "catch handlers" feature.
12878 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12880 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12881 account when creating the array type of the slice.
12882 (ada_value_slice): Likewise.
12884 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12886 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12888 (create_array_type_with_stride): Add byte_stride_prop parameter.
12889 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12890 New parameter. Update all callers in this file.
12891 (array_type_has_dynamic_stride): New function.
12892 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12893 of arrays with dynamic byte strides.
12894 * dwarf2read.c (read_array_type): Add support for dynamic
12895 DW_AT_byte_stride attributes.
12897 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12899 * dwarf2read.c (read_unspecified_type): Treat
12900 DW_TAG_enumeration_type DIEs from Ada units as stubs.
12902 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12904 Update copyright year range in all GDB files.
12906 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12908 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12909 and gdb/testsuite/gdb.base/step-line.c.
12911 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12913 * copyright.py (main): Dump the contents of
12914 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12915 even if BY_HAND is empty.
12917 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12919 * top.c (print_gdb_version): Update Copyright year in version
12922 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12924 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12926 For older changes see ChangeLog-2017.
12932 version-control: never