1 2018-09-08 Joel Brobecker <brobecker@adacore.com>
3 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
4 call to ada_to_fixed_value_create.
6 2018-09-08 Jerome Guitton <guitton@adacore.com>
8 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
10 2018-09-08 Joel Brobecker <brobecker@adacore.com>
12 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
15 2018-09-08 Joel Brobecker <brobecker@adacore.com>
17 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
18 Move update of loop variable "fi".
20 2018-09-08 Joel Brobecker <brobecker@adacore.com>
22 * ada-lang.c (value_assign_to_component): In the case of
23 big-endian targets, extract the bits of the given VAL
24 using an src_offset of zero if container is not a scalar.
26 2018-09-06 Simon Ser <contact@emersion.fr>
29 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
30 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
31 * fbsd-tdep.c (fbsd_make_note_desc): New.
32 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
33 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
34 * target.h (enum target_object) Add FreeBSD-specific
35 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
37 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
39 * compile/compile-c.h (generate_c_for_variable_locations):
40 Change reference to pointer.
41 * compile/compile-c-support.c (compile_program) <compute>:
43 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
44 (generate_c_for_for_one_variable): Likewise
45 (generate_c_for_variable_locations): Likewise
46 * compile/compile-c-types.c (compile_c_instance::convert_type):
48 * compile/compile-cplus-symbols.c (convert_one_symbol):
49 std::move the scope passed to enter_scope.
50 * compile/compile-cplus-types.c
51 (compile_cplus_instance::enter_scope): Make parameter
53 (compile_cplus_instance::new_scope): Change reference to
55 (compile_cplus_instance::convert_type): Likewise
56 (compile_cplus_convert_typedef): std::move the scope passed to
58 (compile_cplus_convert_struct_or_union): Likewise.
59 (compile_cplus_convert_enum): Likewise.
60 (compile_cplus_convert_namespace): Likewise.
61 * compile/compile-cplus.h (compile_cplus_instance)
62 <enter_scope>: Make parameter rvalue-reference.
63 * compile/compile-internal.h (compile_instance)
64 <get_cached_type>: Likewise
65 * compile/compile-loc2c.c (push): Likewise
69 (print_label): Likewise
70 (pushf_register_address): Likewise
71 (pushf_register): Likewise
72 (do_compile_dwarf_expr_to_c): Likewise
73 (compile_dwarf_expr_to_c): Likewise
74 (compile_dwarf_bounds_to_c): Likewise
75 * compile/compile.c (compile_instance::get_cached_type):
77 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
78 (compile_dwarf_bounds_to_c): Likewise
79 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
80 (dwarf2_compile_property_to_c): Likewise
81 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
82 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
85 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
87 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
88 * tui/tui-data.c (init_content_element): Don't initialize it.
90 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
92 * tui/tui-data.h (struct tui_win_info)
93 <detail::opaque>: Remove.
94 * tui/tui-data.c (init_win_info): Remove assignment.
96 2018-09-05 Tom Tromey <tom@tromey.com>
98 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
100 * target-float.c (host_float_ops<T>::to_string)
101 (host_float_ops<T>::from_string): Use
102 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
103 * configure: Rebuild.
105 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
107 * printcmd.c (printf_c_string): Use
108 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
109 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
111 2018-09-05 Tom Tromey <tom@tromey.com>
113 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
115 2018-09-05 Tom de Vries <tdevries@suse.de>
117 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
118 with resolve_abstract_p == true.
119 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
120 defaulting to false. Propagate resolve_abstract_p to
121 dwarf2_fetch_die_loc_sect_off.
122 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
123 parameter, defaulting to false.
124 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
125 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
127 * dwarf2read.h (struct die_info): Forward-declare.
128 (die_info_ptr): New typedef.
129 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
131 2018-09-05 Joel Brobecker <brobecker@adacore.com>
135 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
136 Pedro Alves <palves@redhat.com>
138 * gnulib/Makefile.in (aclocal_m4_deps): Move to
139 "aclocal-m4-deps.mk". Include file here.
140 $(srcdir)/aclocal.m4: Add "configure.ac".
141 * gnulib/aclocal-m4-deps.mk: New file.
142 * gnulib/update-gnulib.sh: Automatically update
143 "aclocal-m4-deps.mk".
145 2018-09-04 Tom Tromey <tom@tromey.com>
147 * configure: Rebuild.
148 * configure.ac: Remove multi-ice code.
150 2018-09-04 Tom Tromey <tom@tromey.com>
152 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
155 2018-09-04 Tom Tromey <tom@tromey.com>
157 * Makefile.in (printcmd.o, target-float.o): Remove.
158 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
160 2018-09-04 Tom Tromey <tom@tromey.com>
162 * gnulib/Makefile.in: Remove obsolete comment.
163 * Makefile.in: Remove obsolete comment.
165 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
167 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
170 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
172 * riscv-tdep.c: Add 'prologue-value.h' include.
173 (struct riscv_unwind_cache): New struct.
174 (riscv_debug_unwinder): New global.
175 (riscv_scan_prologue): Update arguments, capture register details
177 (riscv_skip_prologue): Reformat arguments line, move end of
178 prologue calculation into riscv_scan_prologue.
179 (riscv_frame_cache): Update return type, create
180 riscv_unwind_cache, scan the prologue, and fill in remaining cache
182 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
183 (riscv_frame_prev_register): Use the trad_frame within the
185 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
188 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
190 * trad-frame.h (trad_frame_set_realreg): Declare.
191 (trad_frame_set_addr): Declare.
192 * trad-frame.c (trad_frame_set_realreg): Define new function.
193 (trad_frame_set_addr): Define new function.
194 (trad_frame_set_reg_realreg): Use new function.
195 (trad_frame_set_reg_addr): Use new function.
197 2018-09-01 Keith Seitz <keiths@redhat.com>
199 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
200 pulongest instead of "%lld".
201 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
204 2018-08-31 Tom Tromey <tom@tromey.com>
206 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
209 2018-08-31 Pedro Alves <palves@redhat.com>
211 * gdbarch.h: Regenerate.
213 2018-08-31 Pedro Alves <palves@redhat.com>
215 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
216 * target.h (Hardware watchpoint interfaces): Describe
217 continuable/steppable/non-steppable watchpoints.
218 * gdbarch.h, gdbarch.c: Regenerate.
220 2018-08-31 Pedro Alves <palves@redhat.com>
222 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
225 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
226 * target.h (target_ops::have_continuable_watchpoint): Delete.
227 (target_have_continuable_watchpoint): Delete.
228 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
229 * target-delegates.c: Regenerate.
231 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
233 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
234 the files present in "gnulib/import/m4/".
236 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
238 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
239 c.sw, c.swsp, and c.sdsp.
241 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
243 * riscv-tdep.c (struct riscv_inferior_data): Delete.
244 (riscv_read_misa_reg): Don't cache value read into inferior data.
245 (riscv_new_inferior_data): Delete.
246 (riscv_inferior_data_cleanup): Delete.
247 (riscv_inferior_data): Delete.
248 (riscv_invalidate_inferior_data): Delete.
249 (_initialize_riscv_tdep): Remove initialisation of inferior data.
251 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
253 * compile/compile-cplus-types.c
254 (compile_cplus_instance::leave_scope): Take the address of scope
256 (compile_cplus_instance::convert_qualified_base): Compare quals
259 2018-08-30 Keith Seitz <keiths@redhat.com>
261 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
262 Use "%s" and host_address_to_string instead of "%p" in printf.
264 2018-08-29 Keith Seitz <keiths@redhat.com>
266 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
267 and compile-cplus-types.c.
268 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
269 * c-lang.c (cplus_language_defn): Set C++ compile functions.
270 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
272 * compile/compile-c-support.c: Include compile-cplus.h.
273 (load_libcompile): Templatize.
274 (get_compile_context): "New" function.
275 (c_get_compile_context): Use get_compile_context.
276 (cplus_get_compile_context): New function.
277 (cplus_push_user_expression, cplus_pop_user_expression)
278 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
279 (cplus_compute_program): Define new structs/functions.
280 * compile/compile-cplus-symmbols.c: New file.
281 * compile/compile-cplus-types.c: New file.
282 * compile/compile-cplus.h: New file.
283 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
285 * compile/compile-object-load.c (get_out_value_type): Use
286 strncmp_iw when comparing symbol names.
287 (compile_object_load): Add mst_bss and mst_data.
288 * compile/compile.c (_initialize_compile): Remove
289 -Wno-implicit-function-declaration from `compile_args'.
290 * compile/gcc-cp-plugin.h: New file.
291 * NEWS: Mention C++ compile support and new debug options.
293 2018-08-29 Keith Seitz <keiths@redhat.com>
295 * linespec.c (collect_info::add_symbol): Make virtual.
296 (struct symbol_searcher_collect_info): New struct.
297 (symbol_searcher::find_all_symbols): New method.
298 * symtab.h (class symbol_searcher): New class.
300 2018-08-29 Keith Seitz <keiths@redhat.com>
302 * linespec.c (struct linespec) <function_symbols, label_symbols>:
303 Change to vector of block_symbol. Update all users.
304 (struct collect_info) <symbols>: Likewise.
305 (collect_info::add_symbol): Take block_symbol as argument.
307 (decode_compound_collector) <m_symbols>: Change type to vector
308 of block_symbol. Update all users.
309 (decode_compound_collector::operator ()): Change parameter type
311 (find_method, find_function_symbols, find_linespec_symbols)
312 (find_label_symbols_in_block, find_label_symbols): Change symbol
313 vectors to block_symbol vectors.
314 * symtab.h (symbol_found_callback_ftype): Change parameter type to
317 2018-08-29 Keith Seitz <keiths@redhat.com>
319 * linespec.c (symbolp): Remove typedef and VEC definitions.
320 (bound_minimal_symbol_d): Likewise.
322 2018-08-29 Keith Seitz <keiths@redhat.com>
324 * linespec.c (decode_compound_collector::decode_compound_collector):
325 Remove initialization for `m_symtabs'.
326 (decode_compound_collector::release_symbols): Change return type
327 to std::vector. Update all callers.
328 (class decode_compound_collector) <m_symbols>: Change type to
330 (lookup_prefix_sym): Change return type to std::vector. Update all
332 (compare_symbols): Remove.
333 (std_compare_symbols): Rename to `compare_symbols'.
334 (find_method): Change `sym_classes' parameter to std::vector.
335 Update all callers. Use std::sort to sort sym_classes.
336 (find_linespec_symbols): Remove cleanup.
338 2018-08-29 Keith Seitz <keiths@redhat.com>
340 * linespec.c (struct linespec) <minimal_symbols>: Change type to
341 std::vector. Update all users.
342 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
343 (struct collect_info) <minimal_symbols>: Likewise.
344 (compare_msymbols): Return bool. Change parameters to const
345 bound_minimal_symbol references.
346 (find_method, find_function_symbols, find_linespec_symbols): Change
347 `minsyms' parameter to std::vector. Update all callers.
349 2018-08-29 Keith Seitz <keiths@redhat.com>
351 * linespec.c (struct linespec) <label_symbols>: Change type to
352 std::vector. Update all users.
353 (find_label_symbols_in_block): Change `result' parameter to
354 std::vector. Update all callers.
355 (find_label_symbols): Return std::vector. Update all callers.
357 2018-08-29 Keith Seitz <keiths@redhat.com>
359 * linespec.c (struct linespec) <function_symbols>: Change type to
360 std::vector. Update all users.
361 (struct collect_info) <function_symbols>: Likewise.
362 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
363 (std_compare_symbols): New function.
364 (find_method, find_function_symbols, find_linespec_symbols)
365 (find_label_symbols_in_block): Change `symbols' parameter to
366 std::vector. Update all callers.
367 (find_label_symbols): Likewise for `function_symbols' and
370 2018-08-29 Keith Seitz <keiths@redhat.com>
372 * linespec.c (symtab_vector_up): Define.
373 (struct linespec) <file_symtabs>: Change type to std::vector *.
375 (struct collect_info) <file_symtabs>: Likewise.
376 (collect_symtabs_from_filename): Return symtab_vector_up.
378 (decode_objc): Remove cleanup.
379 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
380 (symtab_collector::release_symtabs): Return symtab_vector_up.
382 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
384 (collect_symtabs_from_filename, symtabs_from_filename): Return
385 symtab_vector_up. Update all callers.
387 2018-08-29 Tom Tromey <tom@tromey.com>
389 * csky-tdep.c (csky_analyze_prologue): Use
390 core_addr_to_string_nz.
392 2018-08-29 Tom Tromey <tom@tromey.com>
394 * windows-nat.c (struct xlate_exception) <them>: Change type to
396 (xlate): Fix formatting. Remove last entry.
397 (struct xlate_exception, xlate): Comment out.
398 (windows_nat_target::resume): Use ranged for.
400 2018-08-29 Jim Wilson <jimw@sifive.com>
402 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
403 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
405 (riscv_linux_nat_target::store_registers): Likewise.
407 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
411 * gnulib/aclocal.m4: Regenerate.
412 * gnulib/config.in: Regenerate.
413 * gnulib/configure: Regenerate.
414 * gnulib/import/Makefile.am: Update.
415 * gnulib/import/Makefile.in: Update.
416 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
417 * gnulib/import/_Noreturn.h: ... this.
418 * gnulib/import/alloca.in.h: Update.
419 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
420 * gnulib/import/arg-nonnull.h: ... this.
421 * gnulib/import/assure.h: Update.
422 * gnulib/import/at-func.c: Update.
423 * gnulib/import/basename-lgpl.c: Update.
424 * gnulib/import/extra/snippet/c++defs.h: Rename to...
425 * gnulib/import/c++defs.h: ... this.
426 * gnulib/import/canonicalize-lgpl.c: Update.
427 * gnulib/import/cdefs.h: Update.
428 * gnulib/import/chdir-long.c: Update.
429 * gnulib/import/chdir-long.h: Update.
430 * gnulib/import/cloexec.c: Update.
431 * gnulib/import/cloexec.h: Update.
432 * gnulib/import/close.c: Update.
433 * gnulib/import/closedir.c: Update.
434 * gnulib/import/config.charset: Update.
435 * gnulib/import/dirent-private.h: Update.
436 * gnulib/import/dirent.in.h: Update.
437 * gnulib/import/dirfd.c: Update.
438 * gnulib/import/dirname-lgpl.c: Update.
439 * gnulib/import/dirname.h: Update.
440 * gnulib/import/dosname.h: Update.
441 * gnulib/import/dup-safer-flag.c: Update.
442 * gnulib/import/dup-safer.c: Update.
443 * gnulib/import/dup.c: Update.
444 * gnulib/import/dup2.c: Update.
445 * gnulib/import/errno.in.h: Update.
446 * gnulib/import/error.c: Update.
447 * gnulib/import/error.h: Update.
448 * gnulib/import/exitfail.c: Update.
449 * gnulib/import/exitfail.h: Update.
450 * gnulib/import/extra/update-copyright: Update.
451 * gnulib/import/fchdir.c: Update.
452 * gnulib/import/fcntl.c: Update.
453 * gnulib/import/fcntl.in.h: Update.
454 * gnulib/import/fd-hook.c: Update.
455 * gnulib/import/fd-hook.h: Update.
456 * gnulib/import/fd-safer-flag.c: Update.
457 * gnulib/import/fd-safer.c: Update.
458 * gnulib/import/fdopendir.c: Update.
459 * gnulib/import/filename.h: Update.
460 * gnulib/import/filenamecat-lgpl.c: Update.
461 * gnulib/import/filenamecat.h: Update.
462 * gnulib/import/flexmember.h: Update.
463 * gnulib/import/float+.h: Update.
464 * gnulib/import/float.c: Update.
465 * gnulib/import/float.in.h: Update.
466 * gnulib/import/fnmatch.c: Update.
467 * gnulib/import/fnmatch.in.h: Update.
468 * gnulib/import/fnmatch_loop.c: Update.
469 * gnulib/import/fpucw.h: Update.
470 * gnulib/import/frexp.c: Update.
471 * gnulib/import/frexpl.c: Update.
472 * gnulib/import/fstat.c: Update.
473 * gnulib/import/fstatat.c: Update.
474 * gnulib/import/getcwd-lgpl.c: Update.
475 * gnulib/import/getcwd.c: Update.
476 * gnulib/import/getdtablesize.c: Update.
477 * gnulib/import/getlogin_r.c: Update.
478 * gnulib/import/getprogname.c: Update.
479 * gnulib/import/getprogname.h: Update.
480 * gnulib/import/gettext.h: Update.
481 * gnulib/import/gettimeofday.c: Update.
482 * gnulib/import/glob-libc.h: Update.
483 * gnulib/import/glob.c: Update.
484 * gnulib/import/glob.in.h: Update.
485 * gnulib/import/glob_internal.h: Update.
486 * gnulib/import/glob_pattern_p.c: Update.
487 * gnulib/import/globfree.c: Update.
488 * gnulib/import/hard-locale.c: Update.
489 * gnulib/import/hard-locale.h: Update.
490 * gnulib/import/intprops.h: Update.
491 * gnulib/import/inttypes.in.h: Update.
492 * gnulib/import/isnan.c: Update.
493 * gnulib/import/isnand-nolibm.h: Update.
494 * gnulib/import/isnand.c: Update.
495 * gnulib/import/isnanl-nolibm.h: Update.
496 * gnulib/import/isnanl.c: Update.
497 * gnulib/import/itold.c: Update.
498 * gnulib/import/libc-config.h: Update.
499 * gnulib/import/limits.in.h: Update.
500 * gnulib/import/localcharset.c: Update.
501 * gnulib/import/localcharset.h: Update.
502 * gnulib/import/localtime-buffer.c: Update.
503 * gnulib/import/localtime-buffer.h: Update.
504 * gnulib/import/lstat.c: Update.
505 * gnulib/import/m4/00gnulib.m4: Update.
506 * gnulib/import/m4/__inline.m4: Update.
507 * gnulib/import/m4/absolute-header.m4: Update.
508 * gnulib/import/m4/alloca.m4: Update.
509 * gnulib/import/m4/builtin-expect.m4: Update.
510 * gnulib/import/m4/canonicalize.m4: Update.
511 * gnulib/import/m4/chdir-long.m4: Update.
512 * gnulib/import/m4/close.m4: Update.
513 * gnulib/import/m4/closedir.m4: Update.
514 * gnulib/import/m4/configmake.m4: Update.
515 * gnulib/import/m4/d-ino.m4: Update.
516 * gnulib/import/m4/d-type.m4: Update.
517 * gnulib/import/m4/dirent_h.m4: Update.
518 * gnulib/import/m4/dirfd.m4: Update.
519 * gnulib/import/m4/dirname.m4: Update.
520 * gnulib/import/m4/double-slash-root.m4: Update.
521 * gnulib/import/m4/dup.m4: Update.
522 * gnulib/import/m4/dup2.m4: Update.
523 * gnulib/import/m4/eealloc.m4: Update.
524 * gnulib/import/m4/environ.m4: Update.
525 * gnulib/import/m4/errno_h.m4: Update.
526 * gnulib/import/m4/error.m4: Update.
527 * gnulib/import/m4/exponentd.m4: Update.
528 * gnulib/import/m4/exponentl.m4: Update.
529 * gnulib/import/m4/extensions.m4: Update.
530 * gnulib/import/m4/extern-inline.m4: Update.
531 * gnulib/import/m4/fchdir.m4: Update.
532 * gnulib/import/m4/fcntl-o.m4: Update.
533 * gnulib/import/m4/fcntl.m4: Update.
534 * gnulib/import/m4/fcntl_h.m4: Update.
535 * gnulib/import/m4/fdopendir.m4: Update.
536 * gnulib/import/m4/filenamecat.m4: Update.
537 * gnulib/import/m4/flexmember.m4: Update.
538 * gnulib/import/m4/float_h.m4: Update.
539 * gnulib/import/m4/fnmatch.m4: Update.
540 * gnulib/import/m4/fnmatch_h.m4: Update.
541 * gnulib/import/m4/fpieee.m4: Update.
542 * gnulib/import/m4/frexp.m4: Update.
543 * gnulib/import/m4/frexpl.m4: Update.
544 * gnulib/import/m4/fstat.m4: Update.
545 * gnulib/import/m4/fstatat.m4: Update.
546 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
547 * gnulib/import/m4/getcwd-path-max.m4: Update.
548 * gnulib/import/m4/getcwd.m4: Update.
549 * gnulib/import/m4/getdtablesize.m4: Update.
550 * gnulib/import/m4/getlogin.m4: Update.
551 * gnulib/import/m4/getlogin_r.m4: Update.
552 * gnulib/import/m4/getpagesize.m4: Update.
553 * gnulib/import/m4/getprogname.m4: Update.
554 * gnulib/import/m4/gettimeofday.m4: Update.
555 * gnulib/import/m4/glibc21.m4: Update.
556 * gnulib/import/m4/glob.m4: Update.
557 * gnulib/import/m4/glob_h.m4: Update.
558 * gnulib/import/m4/gnulib-cache.m4: Update.
559 * gnulib/import/m4/gnulib-common.m4: Update.
560 * gnulib/import/m4/gnulib-comp.m4: Update.
561 * gnulib/import/m4/gnulib-tool.m4: Update.
562 * gnulib/import/m4/hard-locale.m4: Update.
563 * gnulib/import/m4/include_next.m4: Update.
564 * gnulib/import/m4/inttypes-pri.m4: Update.
565 * gnulib/import/m4/inttypes.m4: Update.
566 * gnulib/import/m4/isnand.m4: Update.
567 * gnulib/import/m4/isnanl.m4: Update.
568 * gnulib/import/m4/largefile.m4: Update.
569 * gnulib/import/m4/limits-h.m4: Update.
570 * gnulib/import/m4/localcharset.m4: Update.
571 * gnulib/import/m4/locale-fr.m4: Update.
572 * gnulib/import/m4/locale-ja.m4: Update.
573 * gnulib/import/m4/locale-zh.m4: Update.
574 * gnulib/import/m4/localtime-buffer.m4: Update.
575 * gnulib/import/m4/longlong.m4: Update.
576 * gnulib/import/m4/lstat.m4: Update.
577 * gnulib/import/m4/malloc.m4: Update.
578 * gnulib/import/m4/malloca.m4: Update.
579 * gnulib/import/m4/math_h.m4: Update.
580 * gnulib/import/m4/mbrtowc.m4: Update.
581 * gnulib/import/m4/mbsinit.m4: Update.
582 * gnulib/import/m4/mbsrtowcs.m4: Update.
583 * gnulib/import/m4/mbstate_t.m4: Update.
584 * gnulib/import/m4/memchr.m4: Update.
585 * gnulib/import/m4/memmem.m4: Update.
586 * gnulib/import/m4/mempcpy.m4: Update.
587 * gnulib/import/m4/memrchr.m4: Update.
588 * gnulib/import/m4/mkdir.m4: Update.
589 * gnulib/import/m4/mkstemp.m4: Update.
590 * gnulib/import/m4/mmap-anon.m4: Update.
591 * gnulib/import/m4/mode_t.m4: Update.
592 * gnulib/import/m4/msvc-inval.m4: Update.
593 * gnulib/import/m4/msvc-nothrow.m4: Update.
594 * gnulib/import/m4/multiarch.m4: Update.
595 * gnulib/import/m4/nocrash.m4: Update.
596 * gnulib/import/m4/off_t.m4: Update.
597 * gnulib/import/m4/onceonly.m4: Update.
598 * gnulib/import/m4/open-cloexec.m4: Update.
599 * gnulib/import/m4/open.m4: Update.
600 * gnulib/import/m4/openat.m4: Update.
601 * gnulib/import/m4/opendir.m4: Update.
602 * gnulib/import/m4/pathmax.m4: Update.
603 * gnulib/import/m4/rawmemchr.m4: Update.
604 * gnulib/import/m4/readdir.m4: Update.
605 * gnulib/import/m4/readlink.m4: Update.
606 * gnulib/import/m4/realloc.m4: Update.
607 * gnulib/import/m4/rename.m4: Update.
608 * gnulib/import/m4/rewinddir.m4: Update.
609 * gnulib/import/m4/rmdir.m4: Update.
610 * gnulib/import/m4/save-cwd.m4: Update.
611 * gnulib/import/m4/secure_getenv.m4: Update.
612 * gnulib/import/m4/setenv.m4: Update.
613 * gnulib/import/m4/signal_h.m4: Update.
614 * gnulib/import/m4/ssize_t.m4: Update.
615 * gnulib/import/m4/stat-time.m4: Update.
616 * gnulib/import/m4/stat.m4: Update.
617 * gnulib/import/m4/std-gnu11.m4: Update.
618 * gnulib/import/m4/stdbool.m4: Update.
619 * gnulib/import/m4/stddef_h.m4: Update.
620 * gnulib/import/m4/stdint.m4: Update.
621 * gnulib/import/m4/stdio_h.m4: Update.
622 * gnulib/import/m4/stdlib_h.m4: Update.
623 * gnulib/import/m4/strchrnul.m4: Update.
624 * gnulib/import/m4/strdup.m4: Update.
625 * gnulib/import/m4/strerror.m4: Update.
626 * gnulib/import/m4/string_h.m4: Update.
627 * gnulib/import/m4/strstr.m4: Update.
628 * gnulib/import/m4/strtok_r.m4: Update.
629 * gnulib/import/m4/sys_socket_h.m4: Update.
630 * gnulib/import/m4/sys_stat_h.m4: Update.
631 * gnulib/import/m4/sys_time_h.m4: Update.
632 * gnulib/import/m4/sys_types_h.m4: Update.
633 * gnulib/import/m4/tempname.m4: Update.
634 * gnulib/import/m4/time_h.m4: Update.
635 * gnulib/import/m4/unistd-safer.m4: Update.
636 * gnulib/import/m4/unistd_h.m4: Update.
637 * gnulib/import/m4/warn-on-use.m4: Update.
638 * gnulib/import/m4/wchar_h.m4: Update.
639 * gnulib/import/m4/wchar_t.m4: Update.
640 * gnulib/import/m4/wctype_h.m4: Update.
641 * gnulib/import/m4/wint_t.m4: Update.
642 * gnulib/import/malloc.c: Update.
643 * gnulib/import/malloc/scratch_buffer.h: Update.
644 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
645 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
646 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
647 * gnulib/import/malloca.c: Update.
648 * gnulib/import/malloca.h: Update.
649 * gnulib/import/malloca.valgrind: Update.
650 * gnulib/import/math.in.h: Update.
651 * gnulib/import/mbrtowc.c: Update.
652 * gnulib/import/mbsinit.c: Update.
653 * gnulib/import/mbsrtowcs-impl.h: Update.
654 * gnulib/import/mbsrtowcs-state.c: Update.
655 * gnulib/import/mbsrtowcs.c: Update.
656 * gnulib/import/memchr.c: Update.
657 * gnulib/import/memmem.c: Update.
658 * gnulib/import/mempcpy.c: Update.
659 * gnulib/import/memrchr.c: Update.
660 * gnulib/import/mkdir.c: Update.
661 * gnulib/import/mkstemp.c: Update.
662 * gnulib/import/msvc-inval.c: Update.
663 * gnulib/import/msvc-inval.h: Update.
664 * gnulib/import/msvc-nothrow.c: Update.
665 * gnulib/import/msvc-nothrow.h: Update.
666 * gnulib/import/open.c: Update.
667 * gnulib/import/openat-die.c: Update.
668 * gnulib/import/openat-priv.h: Update.
669 * gnulib/import/openat-proc.c: Update.
670 * gnulib/import/openat.c: Update.
671 * gnulib/import/openat.h: Update.
672 * gnulib/import/opendir.c: Update.
673 * gnulib/import/pathmax.h: Update.
674 * gnulib/import/pipe-safer.c: Update.
675 * gnulib/import/rawmemchr.c: Update.
676 * gnulib/import/readdir.c: Update.
677 * gnulib/import/readlink.c: Update.
678 * gnulib/import/realloc.c: Update.
679 * gnulib/import/ref-add.sin: Update.
680 * gnulib/import/ref-del.sin: Update.
681 * gnulib/import/rename.c: Update.
682 * gnulib/import/rewinddir.c: Update.
683 * gnulib/import/rmdir.c: Update.
684 * gnulib/import/same-inode.h: Update.
685 * gnulib/import/save-cwd.c: Update.
686 * gnulib/import/save-cwd.h: Update.
687 * gnulib/import/scratch_buffer.h: Update.
688 * gnulib/import/secure_getenv.c: Update.
689 * gnulib/import/setenv.c: Update.
690 * gnulib/import/signal.in.h: Update.
691 * gnulib/import/stat-time.c: Update.
692 * gnulib/import/stat-time.h: Update.
693 * gnulib/import/stat-w32.c: Update.
694 * gnulib/import/stat-w32.h: Update.
695 * gnulib/import/stat.c: Update.
696 * gnulib/import/stdbool.in.h: Update.
697 * gnulib/import/stddef.in.h: Update.
698 * gnulib/import/stdint.in.h: Update.
699 * gnulib/import/stdio.in.h: Update.
700 * gnulib/import/stdlib.in.h: Update.
701 * gnulib/import/str-two-way.h: Update.
702 * gnulib/import/strchrnul.c: Update.
703 * gnulib/import/strdup.c: Update.
704 * gnulib/import/streq.h: Update.
705 * gnulib/import/strerror-override.c: Update.
706 * gnulib/import/strerror-override.h: Update.
707 * gnulib/import/strerror.c: Update.
708 * gnulib/import/string.in.h: Update.
709 * gnulib/import/stripslash.c: Update.
710 * gnulib/import/strnlen1.c: Update.
711 * gnulib/import/strnlen1.h: Update.
712 * gnulib/import/strstr.c: Update.
713 * gnulib/import/strtok_r.c: Update.
714 * gnulib/import/sys_stat.in.h: Update.
715 * gnulib/import/sys_time.in.h: Update.
716 * gnulib/import/sys_types.in.h: Update.
717 * gnulib/import/tempname.c: Update.
718 * gnulib/import/tempname.h: Update.
719 * gnulib/import/time.in.h: Update.
720 * gnulib/import/unistd--.h: Update.
721 * gnulib/import/unistd-safer.h: Update.
722 * gnulib/import/unistd.in.h: Update.
723 * gnulib/import/unsetenv.c: Update.
724 * gnulib/import/verify.h: Update.
725 * gnulib/import/extra/snippet/warn-on-use.h: Update.
726 * gnulib/import/wchar.in.h: Update.
727 * gnulib/import/wctype.in.h: Update.
728 * gnulib/import/xalloc-oversized.h: Update.
729 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
730 "53e2c179f26a890fa6685af4b6c1397ee370433b".
732 2018-08-16 Gary Benson <gbenson@redhat.com>
735 * gdb/main.c (captured_main_1): Exit with nonzero status
736 in batch mode if the last command to be executed failed.
737 * NEWS: Mention the above.
739 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
741 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
742 end of warning message.
744 2018-08-29 Alan Hayward <alan.hayward@arm.com>
747 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
748 (aarch64_extract_return_value): Use
749 aapcs_is_vfp_call_or_return_candidate.
750 (aarch64_return_in_memory): Likewise.
751 (aarch64_store_return_value): Likewise.
753 2018-08-29 Alan Hayward <alan.hayward@arm.com>
756 (aapcs_is_vfp_call_or_return_candidate): Make static
757 (pass_in_v_or_stack): Remove function.
758 (pass_in_v_vfp_candidate): New function.
759 (aarch64_push_dummy_call): Check for float register candidates.
761 2018-08-29 Alan Hayward <alan.hayward@arm.com>
763 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
764 (aapcs_is_vfp_call_or_return_candidate_1): New function.
765 (aapcs_is_vfp_call_or_return_candidate): Likewise.
767 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
770 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
771 (struct ipa_sym_addresses): Rename to...
772 (struct ipa_sym_addresses_common): ... this.
773 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
775 2018-08-28 Tom Tromey <tom@tromey.com>
777 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
778 (token_fifo): Now a std::vector.
779 (yylex, c_parse): Update.
780 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
781 (token_fifo): Now a std::vector.
782 (yylex, d_parse): Update.
783 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
784 (token_fifo): Now a std::vector.
785 (yylex, go_parse): Update.
787 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
789 * parser-defs.h (struct type_stack) <elements>: Change type to
790 std::vector<union type_stack_elt>.
791 <depth, size>: Remove.
792 * parse.c (parse_exp_in_context_1): Adjust.
793 (type_stack_reserve): Remove.
794 (check_type_stack_depth): Remove.
795 (insert_into_type_stack): Adjust to std::vector.
796 (insert_type): Likewise.
797 (push_type): Likewise.
798 (push_type_int): Likewise.
799 (insert_type_address_space): Likewise.
800 (pop_type): Likewise.
801 (pop_type_int): Likewise.
802 (pop_typelist): Likewise.
803 (pop_type_stack): Likewise.
804 (append_type_stack): Likewise.
805 (push_type_stack): Likewise.
806 (get_type_stack): Likewise.
807 (type_stack_cleanup): Likewise.
808 (push_typelist): Likewise.
809 (follow_types): Likewise.
810 (_initialize_parse): Likewise.
812 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
814 * NEWS: Mention csky target.
816 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
817 Hafiz Abid Qadeer <abidh@codesourcery.com>
818 Don Breazeal <donb@codesourcery.com>
820 * csky-linux-tdep.c: New file.
821 * csky-tdep.c: Likewise.
822 * csky-tdep.h: Likewise.
823 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
825 (HFILES_NO_SRCDIR): Add csky-tdep.h.
826 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
827 * configure.tgt: Add csky support.
829 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
831 * python/py-framefilter.c (py_print_frame): Print frame architecture
832 when printing on an MI output.
834 2018-08-27 Tom Tromey <tom@tromey.com>
837 * configure: Rebuild.
838 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
840 2018-08-27 Tom Tromey <tom@tromey.com>
842 * aarch64-linux-tdep.c
843 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
846 2018-08-27 Tom Tromey <tom@tromey.com>
848 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
850 (ppc64_standard_linkage1, ppc64_standard_linkage2)
851 (ppc64_standard_linkage3, ppc64_standard_linkage4)
852 (ppc64_standard_linkage5, ppc64_standard_linkage6)
853 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
856 2018-08-27 Tom Tromey <tom@tromey.com>
858 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
859 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
861 2018-08-27 Tom Tromey <tom@tromey.com>
863 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
864 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
866 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
868 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
870 * sparc-linux-tdep.c (sparc32_linux_sigframe)
871 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
872 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
874 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
875 (ppc64_linux_sigaction_tramp_frame)
876 (ppc32_linux_sighandler_tramp_frame)
877 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
878 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
879 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
880 * mn10300-linux-tdep.c (am33_linux_sigframe)
881 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
882 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
883 * mips-linux-tdep.c (mips_linux_o32_sigframe)
884 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
885 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
886 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
887 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
888 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
889 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
890 * microblaze-linux-tdep.c
891 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
892 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
893 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
894 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
895 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
896 * common/common-types.h (ULONGEST_MAX): New define.
897 (CORE_ADDR_MAX): Fix formatting.
898 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
899 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
900 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
901 (arm_linux_rt_sigreturn_tramp_frame)
902 (arm_eabi_linux_sigreturn_tramp_frame)
903 (arm_eabi_linux_rt_sigreturn_tramp_frame)
904 (thumb2_eabi_linux_sigreturn_tramp_frame)
905 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
906 (arm_linux_restart_syscall_tramp_frame)
907 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
908 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
909 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
911 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
913 2018-08-27 Tom Tromey <tom@tromey.com>
915 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
917 * mips-tdep.c (mips_deal_with_atomic_sequence)
918 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
919 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
920 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
921 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
923 * aarch64-tdep.c (aarch64_software_single_step): Use
926 2018-08-27 Tom Tromey <tom@tromey.com>
928 * linespec.c (complete_linespec_component): Add cast to "char".
929 * completer.c (completion_tracker::build_completion_result): Add
932 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
934 * solist.h (struct solist, struct target_so_ops): Fix
937 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
939 * ada-tasks.c (ada_task_info_s): Remove typedef.
940 (DEF_VEC_O(ada_task_info_s)): Remove.
941 (struct ada_tasks_inferior_data): Initialize fields.
942 <task_list>: Make an std::vector.
943 (get_ada_tasks_inferior_data): Allocate with new.
944 (ada_get_task_number): Adjust.
945 (get_task_number_from_id): Likewise.
946 (valid_task_id): Likewise.
947 (ada_get_task_info_from_ptid): Likewise.
948 (iterate_over_live_ada_tasks): Likewise.
949 (add_ada_task): Likewise.
950 (read_known_tasks): Likewise.
951 (ada_build_task_list): Likewise.
952 (print_ada_task_info): Likewise.
953 (info_task): Likewise.
954 (task_command_1): Likewise.
956 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
958 * ada-lang.c (add_angle_brackets): Return std::string.
960 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
962 * python/py-threadevent.c (py_get_event_thread): Initialize
965 2018-08-24 Pedro Alves <palves@redhat.com>
967 * python/py-bpevent.c (create_breakpoint_event_object): Use
969 * python/py-continueevent.c (emit_continue_event): Use
971 * python/py-exitedevent.c (create_exited_event_object): Return a
973 (emit_exited_event): Use copy-initialization.
974 * python/py-inferior.c (python_new_inferior)
975 (python_inferior_deleted, add_thread_object): Use
977 * python/py-infevents.c (create_inferior_call_event_object)
978 (create_register_changed_event_object)
979 (create_memory_changed_event_object): Return a gdbpy_ref<>.
980 (emit_inferior_call_event, emit_memory_changed_event)
981 (emit_register_changed_event): Use copy-initialization.
982 * python/py-newobjfileevent.c (create_new_objfile_event_object):
983 Return a gdbpy_ref<>.
984 (emit_new_objfile_event): Use copy-initialization.
985 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
986 (emit_clear_objfiles_event): Use copy-initialization.
987 * python/py-signalevent.c (create_signal_event_object): Use
989 * python/py-threadevent.c (create_thread_event_object): Use
992 2018-08-24 Pedro Alves <palves@redhat.com>
993 Simon Marchi <simon.marchi@ericsson.com>
996 * python/py-continueevent.c: Include "gdbthread.h".
997 (create_continue_event_object): Add intro comment. Add 'ptid'
998 parameter. Use it to find thread to pass to
999 create_thread_event_object.
1000 (emit_continue_event): Pass PTID down to
1001 create_continue_event_object.
1002 * python/py-event.h (py_get_event_thread): Declare.
1003 (create_thread_event_object): Remove default from 'thread'
1005 * python/py-stopevent.c (create_stop_event_object): Use
1006 py_get_event_thread.
1007 * python/py-threadevent.c (get_event_thread): Rename to ...
1008 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1009 and use it to find the thread.
1010 (create_thread_event_object): Assert that THREAD isn't null.
1011 Don't find the event thread here.
1013 2018-08-23 Kevin Buettner <kevinb@redhat.com>
1015 * block.h (blockrange, blockranges): New struct declarations.
1016 (struct block): Add new field named `ranges'.
1017 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1018 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1019 macros for accessing ranges in struct block.
1020 (make_blockranges): New declaration.
1021 block.c (make_blockranges): New function.
1022 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1024 * symtab.h (find_pc_partial_function): Add new parameter `block'.
1025 * blockframe.c (cache_pc_function_block): New static global.
1026 (clear_pc_function_cache): Clear cache_pc_function_block.
1027 (find_pc_partial_function): Move comment to symtab.h. Add
1028 support for non-contiguous blocks.
1029 * cli/cli-cmds.c (block.h): Include.
1030 (print_disassembly): Handle printing of non-contiguous blocks.
1031 (disassemble_current_function): Likewise.
1032 (disassemble_command): Likewise.
1034 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1036 * blockframe.c (get_pc_function_start): Likewise.
1037 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1038 (gcc_symbol_address): Likewise.
1039 * compile/compile-object-run.c (compile_object_run): Likewise.
1040 * compile/compile.c (get_expr_block_and_pc): Likewise.
1041 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1042 (func_addr_to_tail_call_list): Likewise.
1043 * findvar.c (default_read_var_value): Likewise.
1044 * inline-frame.c (inline_frame_this_id): Likewise.
1045 (skip-inline_frames): Likewise.
1046 * infcmd.c (until_next_command): Likewise.
1047 * linespec.c (convert_linespec_to_sals): Likewise.
1048 * parse.c (parse_exp_in_context_1): Likewise.
1049 * printcmd.c (build_address_symbolic): likewise.
1050 (info_address_command): Likewise.
1051 symtab.c (find_function_start_sal): Likewise.
1052 (skip_prologue_sal): Likewise.
1053 (find_function_alias_target): Likewise.
1054 (find_gnu_ifunc): Likewise.
1055 * stack.c (find_frame_funname): Likewise.
1056 * symtab.c (fixup_symbol_section): Likewise.
1057 (find_function_start_sal): Likewise.
1058 (skip_prologue_sal): Likewsie.
1059 (find_function_alias_target): Likewise.
1060 (find_gnu_ifunc): Likewise.
1061 * tracepoint.c (info_scope_command): Likewise.
1062 * value.c (value_fn_field): Likewise.
1064 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1065 in place of find_pc_partial_function.
1066 * blockframe.c (find_function_entry_range_from_pc): New function.
1067 * symtab.h (find_function_entry_range_from_pc): Declare and document.
1068 * objfiles.c (objfile_relocate1): Relocate start and end addresses
1069 for each range in a block.
1072 2018-08-23 Xavier Roirand <roirand@adacore.com>
1074 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1077 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1079 * solib-svr4.c (read_program_headers_from_bfd): Return
1080 gdb::optional<gdb::byte_vector>.
1081 (svr4_exec_displacement): Adjust.
1083 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1085 * solib-svr4.c (read_program_header): Return
1086 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1087 (find_program_interpreter): Return
1088 gdb::optional<gdb::byte_vector>.
1089 (scan_dyntag_auxv): Adjust.
1090 (enable_break): Adjust.
1091 (svr4_exec_displacement): Adjust.
1093 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1095 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1096 * inf-child.c (inf_child_target::terminal_save_inferior): New.
1098 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1100 * guile/scm-string.c (gdbscm_scm_from_printf): Use
1102 * guile/scm-utils.c (gdbscm_printf): Likewise.
1103 * serial.c (serial_printf): Likewise.
1104 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1106 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
1108 * stack.c (print_frame): Print frame architecture when printing on
1110 * NEWS: Mention new "arch" attribute in frame output.
1112 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1114 * arch/aarch64.h (aarch64_regnum): Update comment.
1116 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1118 * NEWS: Add SVE to 8.2 section.
1120 2018-08-21 Pedro Alves <palves@redhat.com>
1122 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1123 out from gdbscm_parse_function_args.
1124 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1125 gdbscm_parse_function_args_1.
1127 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
1130 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1133 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
1135 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1137 2018-08-19 Michael Spang <spang@google.com>
1140 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1141 for PT_TLS segments.
1143 2018-08-18 Kevin Buettner <kevinb@redhat.com>
1145 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1146 dwarf_variable_value.
1147 * dwarf2-frame.c (class dwarf_expr_executor):
1148 Add override for dwarf_variable_value.
1149 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1150 (class symbol_needs_eval_context): Likewise.
1151 (indirect_synthetic_pointer): Add forward declaration.
1152 (sect_variable_value): New function.
1153 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1154 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1155 for DW_OP_GNU_variable_value.
1157 2018-08-16 Tom Tromey <tom@tromey.com>
1159 * top.c (read_command_file): Update.
1160 (command_line_input): Remove "repeat" argument.
1161 * ada-lang.c (get_selections): Update.
1162 * linespec.c (decode_line_2): Update.
1163 * defs.h (command_line_input): Remove argument.
1164 * cli/cli-script.c (read_next_line): Update.
1165 * python/py-gdb-readline.c: Update.
1167 2018-08-17 Tom Tromey <tom@tromey.com>
1169 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1172 2018-08-15 Tom Tromey <tom@tromey.com>
1174 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1176 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
1178 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1179 If used, use find_pc_partial_function to find address range
1181 * mi/mi-main.c (mi_cmd_list_features): Report
1182 "data-disassemble-a-option" feature.
1183 * NEWS: Mention new -data-disassemble option -a.
1185 2018-08-13 Tom Tromey <tom@tromey.com>
1187 * common/common-defs.h (_FORTIFY_SOURCE): Define.
1189 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1191 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1192 (aarch64_linux_collect_sve_regset): Likewise.
1193 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1194 * regcache.h (regcache_map_entry_size): New function.
1196 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1198 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1199 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1200 (SVE_HEADER_VL_LENGTH): Likewise.
1201 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1202 (SVE_HEADER_FLAGS_LENGTH): Likewise.
1203 (SVE_HEADER_RESERVED_LENGTH): Likewise.
1204 (SVE_HEADER_SIZE_OFFSET): Likewise.
1205 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1206 (SVE_HEADER_VL_OFFSET): Likewise.
1207 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1208 (SVE_HEADER_FLAGS_OFFSET): Likewise.
1209 (SVE_HEADER_RESERVED_OFFSET): Likewise.
1210 (SVE_HEADER_SIZE): Likewise.
1211 (aarch64_linux_core_read_vq): Add function.
1212 (aarch64_linux_core_read_description): Check for SVE section.
1214 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1216 * aarch64-fbsd-tdep.c
1217 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1219 * aarch64-linux-tdep.c
1220 (aarch64_linux_iterate_over_regset_sections): Likewise.
1221 * alpha-linux-tdep.c
1222 (alpha_linux_iterate_over_regset_sections):
1224 (alphanbsd_iterate_over_regset_sections): Likewise.
1226 (amd64fbsd_iterate_over_regset_sections): Likewise.
1227 * amd64-linux-tdep.c
1228 (amd64_linux_iterate_over_regset_sections): Likewise.
1230 (armbsd_iterate_over_regset_sections): Likewise.
1232 (arm_fbsd_iterate_over_regset_sections): Likewise.
1234 (arm_linux_iterate_over_regset_sections): Likewise.
1235 * corelow.c (get_core_registers_cb): Likewise.
1236 (core_target::fetch_registers): Likewise.
1237 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1238 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1239 * gdbarch.h (void): Regenerate.
1240 * gdbarch.sh: Add supply_size and collect_size.
1241 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1242 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1243 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1244 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1245 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1246 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1247 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1248 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1249 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1250 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1251 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1252 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1253 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1254 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1255 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1256 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1257 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1258 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1259 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1260 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1261 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1262 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1263 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1264 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1265 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1266 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1267 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1268 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1269 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1270 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1272 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
1274 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1277 2018-08-10 Keith Seitz <keiths@redhat.com>
1279 * compile/compile-c-support.c (add_code_header, add_code_footer):
1280 Move into policy class.
1281 (c_push_user_expression, pop_user_expression_nop)
1282 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1283 (compile_program): New host class.
1284 (c_compile_program): New typedef.
1285 (c_compute_porgram): Use c_compile_program.
1287 2018-08-10 Keith Seitz <keiths@redhat.com>
1289 * compile/compile-internal.h (compile_instance::~compile_instance):
1290 Remove calls to htab_delete.
1291 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1292 * compile.c (compile_instance::compile_instance): Initialize
1293 htab unique pointers.
1294 (compile_instance::get_cached_type, compile_instance::insert_type)
1295 (compile_instance::error_symbol_once): Update for unique_ptr.
1297 2018-08-10 Keith Seitz <keiths@redhat.com>
1299 * compile/compile-c-symbols.c (struct symbol_error)
1300 (hash_symbol_error, eq_symbol_error, del_symbol_error)
1301 (compile_instance::insert_symbol_error)
1302 (compile_instance::error_symbol_once): Move to ...
1303 * compile/compile.c: ... here.
1305 2018-08-10 Keith Seitz <keiths@redhat.com>
1307 * compile/compile-c-support.c (c_get_compile_context): Use `new'
1308 instead of `new_compile_instance'.
1309 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1311 If the symbol error map is not initialized, create it.
1312 (generate_c_for_for_one_symbol): Do not check/initialize
1313 the symbol error map.
1314 * compile/compile-c-types.c (compile_c_instance): Make a class.
1316 (compile_instance::compile_instance): Initialize the type cache.
1317 (get_cached_type): New function.
1318 (insert_type): Update description.
1319 (compile_c_instance::m_default_cflags): Define.
1320 (convert_type): Update description. Use get_cached_type.
1321 (delete_instance): Moved to destructor.
1322 (new_compile_instance): Moved to constructor.
1323 * compile/compile-c.h (compile_c_instance): Make class inheriting
1324 from compile_instance.
1325 <base>: Remove field.
1326 <type_map, symbol_err_map>: Move to base class.
1327 <c_plugin>: Rename to `m_plugin' and remove pointer type.
1328 * compile/compile-internal.h (compile_instance): Make class.
1329 <type_map_t, symbol_err_map_t>: Define.
1330 <fe>: Rename to `m_gcc_fe'.
1331 <scope, block, gcc_target_options>: Add `m_' prefix.
1332 <m_type_map, m_symbol_err_map>: New fields, moved from
1335 (convert_type, new_compile_instance): Remove.
1336 * compile/compile.c (cleanup_compile_instance): Remove.
1337 (compile_to_object): Use unique_ptr to eliminate cleanups.
1338 (compile_instance::set_print_callback, compile_instance::version)
1339 (compile_instance::set_verbose)
1340 (compile_instance::set_driver_filename)
1341 (compile_instance::set_triplet_regexp)
1342 (compile_instance::set_arguments)
1343 (compile_instance::set_source_file)
1344 (compile_instance::compile): Define.
1346 2018-08-10 Keith Seitz <keiths@redhat.com>
1348 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1349 * compile/compile-c-types.c: Define GCC_METHODN macros and include
1350 gcc-c-fe.def to define C plugin.
1351 (delete_instance): Delete `c_plugin'.
1352 (new_compile_instance): Initialize `c_plugin'.
1353 * compile/compile-c.h: Include gcc_c_plugin.h.
1354 (struct compile_c_instance) <c_plugin>: New member.
1355 * gcc-c-plugin.h: New file.
1356 Update all callers with API change.
1358 2018-08-10 Keith Seitz <keiths@redhat.com>
1360 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1361 (HFILES_NO_SRCDIR): ... to here.
1362 Add compile-internal.h and compile-c.h.
1363 * compile/compile-c-support.c: Include compile-c.h.
1364 * compile/compile-c-symbols.c: Include compile-c.h.
1365 (generate_c_for_variable_locations): Update comment.
1366 * compile/compile-c-types.c: Include compile-c.h.
1367 * compile/compile-c.h: New file -- moved C language declarations
1368 from other files here.
1369 * compile/compile-internal.h: Do not include hashtab.h or
1370 common/enum-flags.h.
1371 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1372 (gcc_convert_symbol, gcc_symbol_address)
1373 (generate_c_for_variable_locations, c_get_mode_for_size)
1374 (c_get_range_decl_name): Definitions moved to compile-c.h.
1375 * compile/compile-loc2c.c: Include compile-c.h.
1377 2018-08-10 Keith Seitz <keiths@redhat.com>
1379 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1380 (c_symbol_substitution_name): ... this.
1383 2018-08-10 Keith Seitz <keiths@redhat.com>
1385 * compile/compile-c-support.c (c_compute_program): Use
1386 unique_xmalloc_ptr to eliminate cleanup.
1387 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1388 Return a unique_xmalloc_ptr and eliminate cleanup.
1389 * compile/compile-internal.h (generate_c_for_variable_locations):
1390 Return unique_xmalloc_ptr and update description.
1392 2018-08-10 Alan Hayward <alan.hayward@arm.com>
1394 * corelow.c (core_target::get_core_register_section): Rename
1395 min_size to section_min_size.
1397 2018-08-09 Jim Wilson <jimw@sifive.com>
1399 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1400 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1401 * NEWS: Mention new GNU/Linux RISC-V target.
1402 * configure.host: Add riscv*-*-linux*.
1403 * configure.nat: Add riscv*.
1404 * configure.tgt: Add riscv*-*-linux*.
1405 * riscv-linux-nat.c: New file.
1406 * riscv-linux-tdep.c: New file.
1408 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1410 * infrun.c (resume): Make static, add forward declaration.
1411 (proceed): Update header comment.
1412 * infrun.h (resume): Delete declaration.
1414 2018-08-09 Tom Tromey <tom@tromey.com>
1416 * riscv-tdep.h: Minor formatting fixes.
1418 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
1420 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1421 * dwarf-index-cache.c (create_dir_and_check): Likewise.
1422 (test_mkdir_recursive): Likewise.
1423 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1425 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1427 * valarith.c (value_subscripted_rvalue): If an array is not in
1428 memory, and we don't know the upper bound, then we can't know that
1429 the requested element exists or not.
1431 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
1433 * target.c (str_comma_list_concat_elem): Fix typo in comment.
1434 (target_options_to_string): Add comment.
1436 2018-08-08 Tom Tromey <tom@tromey.com>
1438 * unittests/scoped_mmap-selftests.c: Check result of "write".
1440 2018-08-08 Jim Wilson <jimw@sifive.com>
1442 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1443 (decode_register_index_short): New.
1444 (decode_j_type_insn, decode_cj_type_insn): New.
1445 (decode_b_type_insn, decode_cb_type_insn): New.
1446 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
1447 local xlen. Check xlen when decoding ambiguous compressed insns. In
1448 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1449 is_c_sw_insn instead of is_sw_insn.
1450 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1451 (riscv_software_single_step): New.
1452 * riscv-tdep.h (riscv_software_single_step): Declare.
1454 * riscv-tdep.c (riscv_isa_xlen): Drop static.
1455 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1457 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
1460 * target.c (dispose_inferior): Don't dispose of inferiors that are
1463 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
1465 * remote.c (remote_target::download_tracepoint): Change char* to
1468 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
1470 * target.h (target_options_to_string): Return an std::string.
1471 * target.c (str_comma_list_concat_elem): Return void, use
1473 (do_option): Likewise.
1474 (target_options_to_string): Return an std::string.
1475 * linux-nat.c (linux_nat_target::wait): Adjust.
1476 * target-debug.h (target_debug_print_options): Adjust.
1478 2018-08-07 Tom Tromey <tom@tromey.com>
1480 * Makefile.in (CPPFLAGS): New variable.
1481 (INTERNAL_CPPFLAGS): Use it.
1483 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1485 * NEWS: Mention the index cache.
1487 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1489 * common/pathstuff.h (get_standard_cache_dir): New.
1490 * common/pathstuff.c (get_standard_cache_dir): New.
1491 * build-id.h (build_id_to_string): New.
1492 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1493 DEBUG_STR_SUFFIX): Move to here.
1494 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1495 DEBUG_STR_SUFFIX): Move from there.
1496 (write_psymtabs_to_index): Make non-static, add basename
1497 parameter. Write to temporary files, rename when done.
1498 (save_gdb_index_command): Adjust call to
1499 write_psymtabs_to_index.
1500 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1502 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1503 (get_gdb_index_contents_from_cache): New.
1504 (get_gdb_index_contents_from_cache_dwz): New.
1505 (dwarf2_initialize_objfile): Read index from cache.
1506 (dwarf2_build_psymtabs): Save to index.
1507 * dwarf-index-cache.h: New file.
1508 * dwarf-index-cache.c: New file.
1509 * dwarf-index-write.h: New file.
1511 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1513 * gnulib/aclocal.m4: Re-generate.
1514 * gnulib/config.in: Re-generate.
1515 * gnulib/configure: Re-generate.
1516 * gnulib/import/Makefile.am: Re-generate.
1517 * gnulib/import/Makefile.in: Re-generate.
1518 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1519 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1520 * gnulib/import/m4/mkdir.m4: New file.
1521 * gnulib/import/mkdir.c: New file.
1522 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1525 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1527 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1528 * common/scoped_mmap.c: New file.
1529 * common/scoped_mmap.h (destroy): New method.
1530 (~scoped_mmap, reset): Use destroy.
1531 (scoped_mmap): New move constructor.
1532 (mmap_file): New declaration.
1533 * unittests/scoped_mmap-selftests.c (test_normal,
1534 test_invalid_filename, run_tests): New functions.
1535 (_initialize_scoped_mmap_selftests): Register selftest.
1537 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1539 * dwarf2read.c (read_gdb_index_from_section): Rename to...
1540 (read_gdb_index_from_buffer): ... this. Remove section
1541 parameter, add buffer parameter.
1542 (get_gdb_index_contents_ftype,
1543 get_gdb_index_contents_dwz_ftype): New typedefs.
1544 (dwarf2_read_gdb_index): Add callback parameters to get the
1546 (get_gdb_index_contents_from_section): New.
1547 (dwarf2_initialize_objfile): Update call to
1548 dwarf2_read_gdb_index.
1550 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1552 * common/filestuff.h (gdb_fopen_cloexec): New overload.
1553 (gdb_open_cloexec): Likewise.
1554 * nat/linux-osdata.c (command_from_pid): Use string_printf.
1555 (commandline_from_pid): Likewise.
1556 (linux_xfer_osdata_threads): Likewise.
1557 (linux_xfer_osdata_fds): Likewise.
1558 * ada-lang.c (is_package_name): Likewise.
1559 * auxv.c (procfs_xfer_auxv): Likewise.
1560 * breakpoint.c (print_one_breakpoint_location): Use
1562 (print_one_catch_solib): Use string_printf.
1563 * coff-pe-read.c (add_pe_exported_sym): Likewise.
1564 (add_pe_forwarded_sym): Likewise.
1565 * dwarf2read.c (create_type_unit_group): Likewise.
1566 (build_error_marker_type): Likewise.
1567 * infcall.c (get_function_name): Likewise.
1568 * valprint.c (print_converted_chars_to_obstack): Likewise.
1569 * xtensa-tdep.c (xtensa_register_type): Likewise.
1571 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
1573 * remote.c (remote_target::download_tracepoint): Fix format
1576 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1578 * tracefile.c: Include common/byte-vector.h.
1579 (trace_save): Change type of buf to gdb::byte_vector. Initialize
1580 with trace_regblock_size if needed. Update uses of buf.
1582 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1584 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1585 std::vector<unsigned char>.
1586 * tracepoint.c (collection_list::collection_list): Remove
1587 m_regs_mask initializer from initializer list. Resize
1588 m_regs_mask using the largest remote register number.
1589 (collection_list::add_remote_register): Remove size check on
1590 m_regs_mask. Use at to access element.
1591 (collection_list::stringify): Change type of temp_buf to
1592 gdb::char_vector. Update uses of temp_buf. Resize if needed to
1593 stringify the register mask. Use pack_hex_byte for the register
1596 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1598 * tracepoint.h (class collection_list) <add_register>: Remove.
1599 <add_remote_register, add_ax_registers, add_local_register>:
1601 <add_memrange>: Add scope parameter.
1602 * tracepoint.c (encode_actions_1): Likewise.
1603 (collection_list::add_register): Rename to ...
1604 (collection_list::add_remote_register): ... this. Update
1606 (collection_list::add_ax_registers, add_local_register): New
1608 (collection_list::add_memrange): Add scope parameter. Call
1609 add_local_register instead of add_register.
1610 (finalize_tracepoint_aexpr): New function.
1611 (collection_list::collect_symbol): Update calls to add_memrange.
1612 Call add_local_register instead of add_register. Call
1613 add_ax_registers. Call finalize_tracepoint_aexpr.
1614 (encode_actions_1): Get remote regnos for $reg action. Call
1615 add_remote_register, add_ax_registers, and add_local_register.
1616 Update call to add_memrange. Call finalize_tracepoint_aexpr.
1617 (validate_actionline): Call finalize_tracepoint_aexpr.
1619 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1621 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1622 Replace array buf with gdb::char_vector buf, of size
1623 get_remote_packet_size (). Replace references to buf and
1624 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
1625 and xsnprintf with snprintf. Raise errors if the buffer is too
1628 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1630 * remote.c (remote_target::download_tracepoint): Fix the has_more
1631 predicate in the QTDP action list iteration.
1633 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1635 * remote.c (remote_target::download_tracepoint): Fix indentation
1638 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1640 * proc-api.c (_initialize_proc_api): Remove c, unused.
1641 * procfs.c (procfs_init_inferior): Remove signals, unused.
1642 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1645 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
1646 Andrew Burgess <andrew.burgess@embecosm.com>
1648 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1649 'W_STOPCODE (0)' as this could be ambiguous.
1651 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
1653 * ser-tcp.c (net_open): Fix thinko when deciding whether to
1654 disable TCP's Nagle algorithm (use "ai_protocol" instead of
1657 2018-08-02 Tom Tromey <tom@tromey.com>
1660 * dwarf2read.c (read_func_scope): Set symtab on template parameter
1662 (process_structure_scope): Likewise.
1664 2018-08-02 Xavier Roirand <roirand@adacore.com>
1667 * darwin-nat.c (darwin_kill_inferior): Fix handling of
1670 2018-08-02 Tom Tromey <tom@tromey.com>
1672 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1673 (darwin_suspend_inferior, darwin_resume_inferior)
1674 (darwin_decode_notify_message, darwin_resume_inferior_threads)
1675 (darwin_check_new_threads): Check result of get_darwin_inferior.
1677 2018-07-31 Joel Brobecker <brobecker@adacore.com>
1681 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
1683 * varobj.c (varobj_get_path_expr_parent): Report an error if
1684 parent is a dynamic varobj.
1686 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1688 * gnulib/aclocal.m4: Re-generate.
1689 * gnulib/config.in: Re-generate.
1690 * gnulib/configure: Re-generate.
1691 * gnulib/import/Makefile.in: Re-generate.
1692 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1693 * gnulib/import/m4/onceonly.m4: Re-generate.
1695 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1697 * target-descriptions.c (struct xml_test_tdesc): New.
1698 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1699 (record_xml_tdesc): Update.
1700 (maintenance_check_xml_descriptions): Update.
1701 * target-descriptions.h (record_xml_tdesc): Update comment.
1703 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
1705 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1706 checking array bounds are defined.
1708 2018-07-30 Tom Tromey <tom@tromey.com>
1710 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1711 irreflexivity violation.
1713 2018-07-30 Tom Tromey <tom@tromey.com>
1715 * cli/cli-decode.c (lookup_cmd): Remove lint code.
1716 * value.c (unpack_long): Remove lint code.
1717 * valops.c (value_ind): Remove lint code.
1718 * valarith.c (value_x_binop, value_x_unop, value_equal)
1719 (value_pos): Remove lint code.
1721 2018-07-28 Tom de Vries <tdevries@suse.de>
1723 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1724 with undefined upper bound as <optimized out>.
1726 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
1728 * gcore.in: Rename variable "name" to "prefix". Expand
1731 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
1733 * windows-nat.c (windows_nat_target::create_inferior): Update to
1734 call close() in global namespace.
1736 2018-07-26 Tom Tromey <tom@tromey.com>
1738 * dwarf-index-write.c (add_address_entry): Don't add objfile
1740 * dbxread.c (find_stab_function): Rename from
1741 find_stab_function_addr. Return a bound_minimal_symbol.
1742 (read_dbx_symtab): Use raw_text_low, raw_text_high.
1743 Don't add objfile offsets.
1744 (end_psymtab): Use raw_text_low, raw_text_high,
1745 MSYMBOL_VALUE_RAW_ADDRESS.
1746 (read_ofile_symtab): Update.
1747 (process_one_symbol): Update.
1748 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1750 (dw2_relocate): Remove.
1751 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1753 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1755 (process_psymtab_comp_unit_reader, add_partial_symbol)
1756 (add_partial_subprogram, dwarf2_ranges_read): Update.
1757 (load_partial_dies): Update.
1758 (add_address_entry): Don't add objfile offsets.
1759 (dwarf2_build_include_psymtabs): Update.
1760 (create_addrmap_from_aranges): Don't add objfile offsets.
1761 (dw2_find_pc_sect_compunit_symtab): Update.
1762 * mdebugread.c (parse_symbol): Don't add objfile offsets.
1763 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1765 (parse_partial_symbols): Don't add objfile offsets. Use
1766 raw_text_low, raw_text_high. Update.
1767 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1768 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1769 or call 'relocate' quick function. Clear psymbol_map.
1770 * psympriv.h (struct partial_symbol) <address>: Add section
1772 <set_unrelocated_address>: Rename from set_address.
1773 <raw_text_low, raw_text_high>: New methods.
1774 <text_low, text_high>: Add objfile parameter.
1775 (add_psymbol_to_bcache): Add 'section' parameter. Call
1776 set_unrelocated_address.
1777 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1778 (find_pc_psymbol): Update.
1779 (fixup_psymbol_section, relocate_psymtabs): Remove.
1780 (dump_psymtab, psym_functions): Update.
1781 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1783 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1784 (start_psymtab_common): Update.
1785 * symfile-debug.c (debug_qf_relocate): Remove.
1786 (debug_sym_quick_functions): Update.
1787 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1788 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1791 2018-07-26 Tom Tromey <tromey@redhat.com>
1793 * dbxread.c (end_psymtab): Use text_high_valid and
1795 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1796 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1797 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1799 <text_low_valid, text_high_valid>: New fields.
1800 <set_text_low, set_text_high>: Update.
1801 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1803 2018-07-26 Tom Tromey <tom@tromey.com>
1805 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1807 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1808 textlow and texthigh fields.
1809 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1811 * mdebugread.c (parse_lines, parse_partial_symbols)
1812 (psymtab_to_symtab_1): Update.
1813 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1814 Rename fields. Update comment. Now private.
1815 <text_low, text_high, set_text_low, set_text_high>: New methods.
1816 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1817 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1818 (start_psymtab_common, maintenance_info_psymtabs)
1819 (maintenance_check_psymtabs): Update.
1820 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1822 (scan_xcoff_symtab): Update.
1824 2018-07-26 Tom Tromey <tromey@redhat.com>
1826 * psympriv.h (struct partial_symbol) <unrelocated_address,
1827 address, set_address>: New methods.
1828 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1829 (fixup_psymbol_section, relocate_psymtabs): Update.
1830 (print_partial_symbols): Add 'objfile' parameter. Update.
1831 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1834 2018-07-26 Tom Tromey <tom@tromey.com>
1836 * dwarf-index-write.c (write_psymbols, debug_names::insert)
1837 (debug_names::write_psymbols): Update.
1838 * psympriv.h (struct partial_symbol): Derive from
1839 general_symbol_info.
1840 <obj_section>: New method.
1841 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1842 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1843 (find_pc_sect_psymbol, fixup_psymbol_section)
1844 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1845 (print_partial_symbols, recursively_search_psymtabs)
1846 (compare_psymbols, psymbol_hash, psymbol_compare)
1847 (add_psymbol_to_bcache, maintenance_check_psymtabs)
1848 (psymbol_name_matches, psym_fill_psymbol_map): Update.
1850 2018-07-26 Tom Tromey <tromey@redhat.com>
1852 * dbxread.c (end_psymtab): Remove dead code.
1854 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
1856 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1857 DWARF unwinders are disabled.
1858 * dwarf2-frame.c: Add dwarf2read.h include.
1859 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1861 (dwarf2_frame_unwinders_enabled_p): Define.
1862 (show_dwarf_unwinders_enabled_p): New function.
1863 (_initialize_dwarf2_frame): Register switch to control DWARF
1865 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1866 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1867 (show_dwarf_cmdlist): Remove static keyword.
1868 * dwarf2read.h (set_dwarf_cmdlist): Declare.
1869 (show_dwarf_cmdlist): Declare.
1870 * NEWS: Document new feature.
1872 2018-07-26 Tom de Vries <tdevries@suse.de>
1874 PR breakpoints/23366
1875 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1877 2018-07-26 Tom de Vries <tdevries@suse.de>
1879 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1880 DW_AT_count can't be translated to a dynamic prop.
1882 2018-07-25 Tom de Vries <tdevries@suse.de>
1884 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1887 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
1889 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1891 2018-07-25 Joel Brobecker <brobecker@adacore.com>
1893 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1895 2018-07-24 Keith Seitz <keiths@redhat.comt
1898 * dwarf2read.c (dw2_add_symbol_to_list): New function.
1899 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1900 instead of add_symbol_to_list.
1901 (read_file_scope): Call prepare_one_comp_unit before reading
1904 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
1906 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1908 2018-07-24 Tom Tromey <tom@tromey.com>
1910 * utils.c (malloc, realloc, free): Don't declare.
1911 * configure, config.in: Rebuild.
1912 * configure.ac: Don't check for declarations of free, malloc, or
1915 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1917 * aarch64-linux-nat.c
1918 (aarch64_linux_nat_target::stopped_data_address): Remove unused
1920 * arm-linux-nat.c (fetch_regs): Likewise.
1921 (store_regs): Likewise.
1922 (fetch_vfp_regs): Likewise.
1923 (store_vfp_regs): Likewise.
1924 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1925 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1926 (arm_linux_nat_target::insert_watchpoint): Likewise.
1927 (arm_linux_nat_target::remove_watchpoint): Likewise.
1928 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1930 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1932 * ppc-linux-nat.c (fetch_register): Likewise.
1933 (fetch_all_gp_regs): Likewise.
1934 (fetch_ppc_registers): Likewise.
1935 (store_all_gp_regs): Likewise.
1936 (store_ppc_registers): Likewise.
1937 (hwdebug_insert_point): Likewise.
1938 (can_use_watchpoint_cond_accel): Likewise.
1939 * remote-sim.c (gdb_os_write_stdout): Likewise.
1941 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1942 Tom Tromey <tom@tromey.com>
1944 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1946 * configure: Rebuild.
1948 2018-07-22 Tom Tromey <tom@tromey.com>
1950 * regformats/regdat.sh: Define xmltarget_${name} inside
1951 #ifndef IN_PROCESS_AGENT.
1953 2018-07-22 Tom Tromey <tom@tromey.com>
1955 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1957 2018-07-22 Tom Tromey <tom@tromey.com>
1959 * symfile.c (reread_symbols): Notify iter, not objfile.
1961 2018-07-22 Tom Tromey <tom@tromey.com>
1963 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1965 (ravenscar_thread_target::prepare_to_store): Likewise.
1967 2018-07-22 Tom Tromey <tom@tromey.com>
1969 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1970 unused variable. Call value_fetch_lazy when needed.
1971 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1972 Remove unused variable. Call value_fetch_lazy when needed.
1974 2018-07-22 Tom Tromey <tom@tromey.com>
1976 * m32c-tdep.c (mark_dma): Return void.
1977 (make_regs): Remove unused declarations.
1979 2018-07-22 Tom Tromey <tom@tromey.com>
1981 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1982 cmdscm_get_valid_command_smob_arg_unsafe for effect.
1983 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1984 bkscm_get_valid_block_smob_arg_unsafe for effect.
1986 2018-07-22 Tom Tromey <tom@tromey.com>
1988 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1991 2018-07-22 Tom Tromey <tom@tromey.com>
1993 * windows-nat.c (saved_context): Conditionally define.
1994 * remote.c (remote_target::remote_btrace_maybe_reopen):
1995 Conditionally declare "warned".
1996 * inflow.c (sigquit_ours): Conditionally define.
1997 (new_tty): Move "tty" declaration inside #if.
1998 * guile/guile.c (guile_datadir): Conditionally define.
1999 * charset.c (set_be_le_names): Move some declarations inside #if.
2000 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2002 (parse_xml_btrace_conf): Likewise.
2004 2018-07-22 Tom Tromey <tom@tromey.com>
2006 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2008 2018-07-22 Tom Tromey <tom@tromey.com>
2010 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2011 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2012 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2013 * buildsym-legacy.c (get_macro_table): Remove unused variable.
2014 * stack.c (frame_apply_level_command): Remove unused variable.
2015 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2016 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2017 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2019 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2020 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2021 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2023 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2024 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2026 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2027 Remove unused variable.
2028 * cli/cli-script.c (recurse_read_control_structure): Remove unused
2030 * common/tdesc.c (print_xml_feature::visit): Remove unused
2032 * compile/compile-object-load.c (store_regs): Remove unused
2034 * complaints.c (clear_complaints): Remove unused variable.
2035 * corelow.c (core_target_open): Remove unused variable.
2036 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2038 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2040 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2042 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2044 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2046 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2048 * ia64-tdep.c (examine_prologue): Remove unused variable.
2049 * infcall.c (run_inferior_call): Remove unused variable.
2050 * inferior.c (exit_inferior): Remove unused variable.
2051 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2052 * linespec.c (decode_line_2): Remove unused variable.
2053 * linux-nat.c (super_close): Remove.
2054 * linux-tdep.c (linux_info_proc): Remove unused variable.
2055 * mi/mi-main.c (mi_execute_command): Remove unused variable.
2056 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2057 Remove unused variable.
2058 * parse.c (find_minsym_type_and_address): Remove unused variable.
2059 * printcmd.c (info_symbol_command, printf_floating): Remove unused
2061 * python/py-breakpoint.c (bppy_set_commands): Remove unused
2063 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2065 * record-btrace.c (record_btrace_target::store_registers): Remove
2067 (cmd_show_record_btrace_cpu): Remove unused variable.
2068 * riscv-tdep.c (riscv_register_reggroup_p)
2069 (riscv_push_dummy_call, riscv_return_value): Remove unused
2071 * rust-exp.y (literal): Remove unused variable.
2072 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2074 <STRUCTOP_ANONYMOUS>: Likewise.
2075 * s390-linux-tdep.c (s390_linux_init_abi_31)
2076 (s390_linux_init_abi_64): Remove unused variable.
2077 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2078 (file_select_thread, net_windows_open, _initialize_ser_windows):
2079 Remove unused variables.
2080 * symtab.c (find_pc_sect_line): Remove unused variable.
2081 * target-memory.c (compute_garbled_blocks): Remove unused
2083 (target_write_memory_blocks): Remove unused variable.
2084 * target.c (target_stack::unpush): Remove unused variables.
2085 * tracepoint.c (start_tracing, all_tracepoint_actions)
2086 (merge_uploaded_trace_state_variables)
2087 (print_one_static_tracepoint_marker): Remove unused variable.
2088 * unittests/basic_string_view/element_access/char/1.cc (test01):
2089 Remove unused variable.
2090 * windows-nat.c (windows_continue, windows_add_all_dlls)
2091 (do_initial_windows_stuff, windows_nat_target::create_inferior):
2092 Remove unused variables.
2094 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
2096 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2097 attr_profile in HAVE_ELF.
2098 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2101 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
2103 * frame.c (frame_register_unwind): Change parameter name.
2104 (frame_unwind_register): Likewise.
2105 (frame_unwind_register_value): Likewise.
2106 (frame_unwind_register_signed): Likewise.
2107 (frame_unwind_register_unsigned): Likewise.
2108 * frame.h (frame_register_unwind): Likewise.
2109 (frame_unwind_register): Likewise.
2110 (frame_unwind_register_value): Likewise.
2111 (frame_unwind_register_signed): Likewise.
2112 (frame_unwind_register_unsigned): Likewise.
2113 (frame_unwind_arch): Likewise.
2115 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2117 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2120 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2122 * mips-linux-nat.c (mips_linux_nat_target::read_description):
2123 Call `get_ptrace_pid' rather than extracting the ptrace PID by
2126 2018-07-20 Keith Seitz <keiths@redhat.com>
2128 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2129 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2130 m_compunit_symtab, m_language>: Add "m_" prefix.
2132 * buildsym.c: Update all uses.
2134 2018-07-20 Tom Tromey <tom@tromey.com>
2136 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2137 * buildsym.h (record_line_ftype): Remove typedef.
2139 2018-07-20 Tom Tromey <tom@tromey.com>
2141 * buildsym-legacy.h (augment_type_symtab): Don't declare.
2142 (end_expandable_symtab): Likewise.
2143 (end_symtab_get_static_block): Likewise.
2144 (end_symtab_from_static_block): Likewise.
2145 * buildsym-legacy.c (augment_type_symtab): Remove.
2146 (end_expandable_symtab): Remove.
2147 (end_symtab_get_static_block): Remove.
2148 (end_symtab_from_static_block): Remove.
2150 2018-07-20 Tom Tromey <tom@tromey.com>
2152 * dwarf2read.c: Include buildsym.h.
2153 (struct dwarf2_cu) <builder>: New method.
2154 (fixup_go_packaging): Update.
2155 (process_full_comp_unit, process_full_type_unit): Update. Don't
2156 use scoped_free_pendings.
2157 (using_directives): Add "cu" parameter, remove "language".
2158 (read_import_statement, setup_type_unit_groups, )
2159 (read_func_scope, read_lexical_block_scope)
2160 (dwarf2_record_block_ranges, read_namespace): Update.
2161 (lnp_state_machine::lnp_state_machine): Add cu parameter.
2162 (lnp_state_machine::handle_end_sequence): Update.
2163 (class lnp_state_machine) <m_cu>: New member.
2164 <m_record_line_callback>: Remove.
2165 <m_currently_recording_lines>: New member.
2166 (lnp_state_machine::handle_set_file): Update.
2167 (noop_record_line): Remove.
2168 (dwarf_record_line_p): Add cu parameter.
2169 (dwarf_record_line_1, dwarf_finish_line): Likewise.
2170 (lnp_state_machine::record_line)
2171 (lnp_state_machine::lnp_state_machine)
2172 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2173 (dwarf_decode_lines): Update.
2174 (dwarf2_start_subfile): Add cu parameter.
2175 (dwarf2_start_symtab, new_symbol): Update.
2176 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2177 Remove dwarf2_per_objfile parameter.
2178 (dwarf_decode_macros): Update.
2180 2018-07-20 Tom Tromey <tom@tromey.com>
2182 * stabsread.c (define_symbol): Update.
2183 * buildsym-legacy.h (get_buildsym_compunit): Declare.
2184 * dwarf2read.c (new_symbol): Update.
2185 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2186 * cp-namespace.c: Include buildsym.h.
2187 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2188 * buildsym-legacy.c (get_buildsym_compunit): New function.
2190 2018-07-20 Tom Tromey <tom@tromey.com>
2192 * xcoffread.c: Include buildsym-legacy.h.
2193 * windows-nat.c: Include buildsym-legacy.h.
2194 * stabsread.c: Include buildsym-legacy.h.
2195 * mdebugread.c: Include buildsym-legacy.h.
2196 * buildsym-legacy.h: New file.
2197 * buildsym-legacy.c: New file, from buildsym.c.
2198 * go32-nat.c: Include buildsym-legacy.h.
2199 * dwarf2read.c: Include buildsym-legacy.h.
2200 * dbxread.c: Include buildsym-legacy.h.
2201 * cp-namespace.c: Include buildsym-legacy.h.
2202 * coffread.c: Include buildsym-legacy.h.
2203 * buildsym.h: Move some contents to buildsym-legacy.h.
2204 * buildsym.c: Include buildsym-legacy.h. Move many functions to
2206 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2208 2018-07-20 Tom Tromey <tom@tromey.com>
2210 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2211 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2212 (buildsym_compunit::buildsym_compunit)
2213 (buildsym_compunit::~buildsym_compunit)
2214 (buildsym_compunit::get_macro_table): Define.
2216 2018-07-20 Tom Tromey <tom@tromey.com>
2218 * buildsym.c (reset_symtab_globals): Remove.
2219 (buildsym_compunit::end_symtab_from_static_block): Update.
2220 (buildsym_compunit::augment_type_symtab): Update.
2221 (end_symtab_from_static_block): Call free_buildsym_compunit.
2222 (augment_type_symtab, end_symtab, end_expandable_symtab):
2225 2018-07-20 Tom Tromey <tom@tromey.com>
2227 * arch-utils.c: Do not include buildsym.h.
2228 * mipsread.c: Do not include buildsym.h.
2229 * machoread.c: Do not include buildsym.h.
2230 * elfread.c: Do not include buildsym.h.
2232 2018-07-20 Tom Tromey <tom@tromey.com>
2234 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2236 (buildsym_compunit): Add new constructor.
2237 (struct buildsym_compunit) <get_last_source_file, finish_block,
2238 record_block_range, start_subfile, patch_subfile_names,
2239 push_subfile, pop_subfile, record_line, get_compunit_symtab,
2240 set_last_source_start_addr, get_last_source_start_addr,
2241 get_local_using_directives, set_local_using_directives,
2242 get_global_using_directives, outermost_context_p,
2243 get_current_context_stack, get_context_stack_depth,
2244 get_current_subfile, get_local_symbols, get_file_symbols,
2245 get_global_symbols, record_debugformat, record_producer,
2246 push_context, pop_context, end_symtab_get_static_block,
2247 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2249 <record_pending_block, finish_block_internal, make_blockvector,
2250 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2254 2018-05-22 Tom Tromey <tom@tromey.com>
2256 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2258 (finish_block_internal): Update.
2260 2018-07-20 Tom Tromey <tom@tromey.com>
2262 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2264 (finish_block_internal): Update.
2266 2018-07-20 Tom Tromey <tom@tromey.com>
2268 * buildsym.h (EXTERN): Don't define or undef.
2269 * buildsym.c (EXTERN): Don't define.
2271 2018-07-20 Tom Tromey <tom@tromey.com>
2273 * buildsym.c: Remove TODO comment.
2275 2018-07-20 Tom Tromey <tom@tromey.com>
2277 * coffread.c (coff_symtab_read): Update.
2278 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2279 (xcoff_new_init): Update.
2280 * mipsread.c (mipscoff_new_init): Update.
2281 * mdebugread.c (mdebug_build_psymtabs): Update.
2282 * elfread.c (elf_new_init): Update.
2283 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2285 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2286 (coffstab_build_psymtabs, elfstab_build_psymtabs)
2287 (stabsect_build_psymtabs): Update.
2288 * buildsym.h (buildsym_init): Don't declare.
2289 * buildsym.c: Update comment.
2290 (prepare_for_building): Remove.
2291 (start_symtab, restart_symtab): Update.
2292 (reset_symtab_globals): Update comment.
2293 (buildsym_init): Remove.
2295 2018-07-20 Tom Tromey <tom@tromey.com>
2297 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2298 * stabsread.c (patch_block_stabs, define_symbol, read_type)
2299 (read_enum_type, common_block_start, common_block_end)
2300 (cleanup_undefined_types_1, finish_global_stabs): Update.
2301 * mdebugread.c (psymtab_to_symtab_1): Update.
2302 * dwarf2read.c (fixup_go_packaging, read_func_scope)
2303 (read_lexical_block_scope, new_symbol): Update.
2304 * dbxread.c (process_one_symbol): Update.
2305 * coffread.c (coff_symtab_read, process_coff_symbol)
2306 (coff_read_enum_type): Update.
2307 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2309 (get_local_symbols, get_file_symbols, get_global_symbols): New
2311 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2313 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2314 (~scoped_free_pendings): Update.
2315 (finish_block, prepare_for_building, reset_symtab_globals)
2316 (end_symtab_get_static_block, end_symtab_with_blockvector)
2317 (augment_type_symtab, push_context): Update.
2318 (get_local_symbols, get_file_symbols, get_global_symbols): New
2320 (buildsym_init): Update.
2322 2018-07-20 Tom Tromey <tom@tromey.com>
2324 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2325 (process_full_type_unit): Likewise.
2326 (dwarf2_start_symtab): Set list_in_scope.
2328 2018-07-20 Tom Tromey <tom@tromey.com>
2330 * dwarf2read.c (process_psymtab_comp_unit_reader)
2331 (build_type_psymtabs_reader): Do not set list_in_scope.
2333 2018-07-20 Tom Tromey <tom@tromey.com>
2335 * buildsym.c (free_pendings): Remove.
2336 (add_symbol_to_list, scoped_free_pendings)
2337 (finish_block_internal, buildsym_init): Update.
2339 2018-07-20 Tom Tromey <tom@tromey.com>
2341 * xcoffread.c (read_xcoff_symtab): Update.
2342 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2344 * dbxread.c (process_one_symbol): Update.
2345 * coffread.c (coff_symtab_read): Update.
2346 * buildsym.h (finish_block): Update.
2347 * buildsym.c (finish_block): Remove "listhead" argument.
2348 (end_symtab_get_static_block): Update.
2350 2018-07-20 Tom Tromey <tom@tromey.com>
2352 * buildsym.h (class scoped_free_pendings): Remove constructor.
2353 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2355 <m_pending_block_obstack, m_pending_blocks>: New members.
2356 (pending_block_obstack, pending_blocks): Remove.
2357 (scoped_free_pendings::scoped_free_pendings): Default.
2358 (~scoped_free_pendings): Update.
2359 (free_pending_blocks): Remove.
2360 (finish_block_internal, record_pending_block, make_blockvector)
2361 (end_symtab_get_static_block, augment_type_symtab, push_context)
2362 (buildsym_init): Update.
2364 2018-07-20 Tom Tromey <tom@tromey.com>
2366 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2367 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2369 (pending_addrmap, pending_addrmap_obstack)
2370 (pending_addrmap_interesting): Remove.
2371 (scoped_free_pendings, record_block_range, make_blockvector)
2372 (prepare_for_building, reset_symtab_globals, buildsym_init):
2375 2018-07-20 Tom Tromey <tom@tromey.com>
2377 * xcoffread.c (process_linenos): Update.
2378 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2379 * mdebugread.c (psymtab_to_symtab_1): Update.
2380 * dwarf2read.c (setup_type_unit_groups)
2381 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2382 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2383 * dbxread.c (process_one_symbol): Update.
2384 * coffread.c (coff_symtab_read, enter_linenos)
2385 (process_coff_symbol): Update.
2386 * buildsym.h (current_subfile): Don't declare.
2387 (get_current_subfile): Declare.
2388 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2390 (start_subfile, free_buildsym_compunit, push_subfile)
2391 (prepare_for_building, start_symtab): Update.
2392 (get_current_subfile): New function.
2394 2018-07-20 Tom Tromey <tom@tromey.com>
2396 * coffread.c (coff_symtab_read): Update.
2397 * xcoffread.c (read_xcoff_symtab): Update.
2398 * dwarf2read.c (new_symbol): Update.
2399 (read_func_scope, read_lexical_block_scope): Update.
2400 * dbxread.c (process_one_symbol): Update.
2401 * buildsym.h (context_stack, context_stack_depth): Don't declare.
2402 (outermost_context_p): Remove macro.
2403 (outermost_context_p, get_current_context_stack)
2404 (get_context_stack_depth): Declare.
2405 (pop_context): Return struct context_stack.
2406 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2408 (context_stack_size): Remove.
2409 (INITIAL_CONTEXT_STACK_SIZE): Remove.
2410 (prepare_for_building, end_symtab_get_static_block)
2411 (augment_type_symtab, push_context): Update.
2412 (pop_context): Return struct context_stack.
2413 (outermost_context_p, get_current_context_stack)
2414 (get_context_stack_depth): New functions.
2415 (buildsym_init): Update.
2417 2018-07-20 Tom Tromey <tom@tromey.com>
2419 * rust-exp.y: Now a pure parser. Update all rules.
2420 (%union): Move earlier.
2421 (current_parser, work_obstack): Remove globals.
2422 (rust_parser, ~rust_parser): Update.
2423 (class rust_parser) <copy_name, concat3, crate_name, super_name,
2424 lex_character, lex_number, lex_string, lex_identifier,
2425 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2426 convert_name, convert_params_to_expression,
2427 convert_ast_to_expression, ast_basic_type, ast_operation,
2428 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2429 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2430 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2431 ast_array_type, ast_slice_type, ast_reference_type,
2432 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2433 (rust_parse): Update.
2434 (rustyyerror, rustyylex): Add parser parameter.
2435 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2436 (rust_lex_stringish_test, rust_lex_test_sequence)
2437 (rust_lex_test_trailing_dot, rust_lex_test_completion)
2438 (rust_lex_test_push_back, rust_lex_tests): Update.
2440 2018-07-19 Pedro Alves <palves@redhat.com>
2442 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2443 gdb::unique_xmalloc_ptr.
2444 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2445 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2446 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2447 copy-initialization.
2448 * guile/scm-pretty-print.c (ppscm_print_children): Use
2449 gdb::unique_xmalloc_ptr instead of cleanups.
2450 (gdbscm_apply_val_pretty_printer): Remove cleanups.
2451 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2452 gdb::unique_xmalloc_ptr.
2453 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2454 Adjust to use gdb::unique_xmalloc_ptr.
2455 * guile/scm-utils.c (extract_arg): Adjust.
2456 * guile/scm-value.c (gdbscm_value_field): Adjust to use
2457 gdb::unique_xmalloc_ptr instead of a cleanup.
2459 2018-07-19 Tom Tromey <tom@tromey.com>
2461 * utils.c (do_value_free_to_mark)
2462 (make_cleanup_value_free_to_mark): Remove.
2463 * utils.h (make_cleanup_value_free_to_mark): Remove.
2465 2018-07-19 Pedro Alves <palves@redhat.com>
2467 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2468 forwarding reference.
2470 2018-07-18 Pedro Alves <palves@redhat.com>
2472 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2473 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
2476 2018-07-18 Pedro Alves <palves@redhat.com>
2478 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2480 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2482 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2483 directly instead of a cleanup.
2484 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2485 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
2486 (vlscm_binop_gdbthrow): New, factored out from ...
2487 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
2488 (vlscm_rich_compare): Use gdbscm_wrap.
2489 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2490 instead of a cleanup.
2491 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2493 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2494 Use xfree directly instead of a cleanup.
2495 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2496 Adjust to use gdbscm_wrap and scoped_value_mark.
2497 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2498 (gdbscm_value_address, gdbscm_value_dereference)
2499 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2501 (gdbscm_value_dynamic_type): Use scoped_value_mark.
2502 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2504 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2505 gdbscm_wrap and scoped_value_mark.
2506 (gdbscm_value_to_string): Use xfree directly instead of a
2507 cleanup. Move 'buffer' unique_ptr to TRY scope.
2508 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2509 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
2511 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2512 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2514 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2517 2018-07-18 Tom de Vries <tdevries@suse.de>
2519 * findvar.c (default_read_var_value): Also resolve dynamic type for
2520 LOC_OPTIMIZED_OUT vars.
2522 2018-07-18 Maciej W. Rozycki <macro@mips.com>
2524 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2527 2018-07-17 Tom Tromey <tom@tromey.com>
2529 * guile/scm-param.c (pascm_set_func, pascm_show_func)
2530 (compute_enum_list, pascm_set_param_value_x)
2531 (gdbscm_parameter_value): Update.
2532 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2533 (gdbscm_scm_to_host_string): Update.
2534 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2536 * guile/scm-cmd.c (cmdscm_add_completion): Update.
2537 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2538 * guile/scm-string.c (gdbscm_scm_to_string): Return
2540 (gdbscm_scm_to_host_string): Likewise.
2542 2018-07-17 Tom Tromey <tom@tromey.com>
2544 * guile/guile.c (gdbscm_eval_from_control_command): Update.
2545 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2546 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2547 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2550 2018-07-17 Tom Tromey <tom@tromey.com>
2552 * guile/scm-param.c (pascm_signal_setshow_error): Update.
2553 * guile/guile-internal.h (gdbscm_exception_message_to_string):
2555 * guile/scm-cmd.c (cmdscm_function): Update.
2556 * guile/scm-pretty-print.c
2557 (ppscm_print_exception_unless_memory_error): Update.
2558 * guile/scm-exception.c (gdbscm_exception_message_to_string):
2559 Return unique_xmalloc_ptr.
2561 2018-07-17 Tom Tromey <tom@tromey.com>
2563 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2566 2018-07-17 Jim Wilson <jimw@sifive.com>
2568 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2569 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
2570 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
2571 unecessary braces after EF_RISCV_RVC test. Delete call to
2572 set_gdbarch_decr_pc_after_break.
2574 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2575 RISCV_LAST_FP_REGNUM + 1.
2576 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2578 2018-07-17 Tom Tromey <tom@tromey.com>
2580 * configure.ac: Remove --disable-gdbcli.
2581 * configure: Rebuild.
2582 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2583 (SUBDIR_CLI_CFLAGS): Remove.
2584 (SFILES): Use SUBDIR_CLI_SRCS.
2585 (COMMON_OBS): Use SUBDIR_CLI_OBS.
2587 2018-07-17 Tom Tromey <tom@tromey.com>
2590 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2592 2018-07-16 Jim Wilson <jimw@sifive.com>
2594 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2596 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2598 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2600 (libunwind_frame_sniffer): Likewise.
2601 (libunwind_frame_prev_register): Likewise.
2602 (libunwind_sigtramp_frame_sniffer): Likewise.
2603 * ia64-tdep.c (ia64_access_reg): Likewise.
2604 (ia64_access_rse_reg): Likewise.
2605 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2606 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2608 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2610 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2612 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2614 * remote-sim.c (gdbsim_target::close,
2615 gdbsim_target::mourn_inferior): Remove unused variables.
2617 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
2619 * ia64-tdep.c (ktab_buf): New global.
2620 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2621 (get_kernel_table): Adjust.
2623 2018-07-16 Tom Tromey <tom@tromey.com>
2625 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2626 * dwarf2read.c (using_directives, new_symbol): Use
2627 outermost_context_p.
2628 * dbxread.c (process_one_symbol): Use outermost_context_p.
2629 * coffread.c (coff_symtab_read): Use outermost_context_p.
2631 2018-07-16 Tom Tromey <tom@tromey.com>
2633 * dwarf2read.c (using_directives, read_func_scope)
2634 (read_lexical_block_scope): Update.
2635 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2636 * buildsym.h (local_using_directives, global_using_directives):
2638 (get_local_using_directives, set_local_using_directives)
2639 (get_global_using_directives): Declare.
2640 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2641 m_global_using_directives>: New members.
2642 (finish_block_internal, prepare_for_building)
2643 (reset_symtab_globals, end_symtab_get_static_block)
2644 (push_context): Update.
2645 (get_local_using_directives, set_local_using_directives)
2646 (get_global_using_directives): New functions.
2647 (buildsym_init): Update.
2649 2018-07-16 Tom Tromey <tom@tromey.com>
2651 * xcoffread.c (xcoff_initial_scan): Don't call
2652 free_pending_blocks.
2653 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2654 * buildsym.h (class scoped_free_pendings): Add constructor.
2655 (free_pending_blocks): Don't declare.
2656 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2657 (free_pending_blocks): Now static.
2659 2018-07-16 Tom Tromey <tom@tromey.com>
2661 * buildsym.h (push_subfile, pop_subfile): Update declarations.
2662 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2664 (struct subfile_stack): Remove.
2665 (subfile_stack): Remove.
2666 (push_subfile, pop_subfile, buildsym_init): Update.
2668 2018-07-16 Tom Tromey <tom@tromey.com>
2670 * buildsym.c (push_subfile): Use gdb_assert.
2671 (pop_subfile): Use gdb_assert.
2673 2018-07-16 Tom Tromey <tom@tromey.com>
2675 * buildsym.h (merge_symbol_lists): Remove.
2676 * buildsym.c (merge_symbol_lists): Remove.
2678 2018-07-16 Tom Tromey <tom@tromey.com>
2680 * stabsread.c (scan_file_globals): Update comment.
2681 * stabsread.h (scan_file_globals): Move from buildsym.h.
2682 * buildsym.h (scan_file_globals): Move to stabsread.h.
2684 2018-07-16 Tom Tromey <tom@tromey.com>
2686 * xcoffread.c (xcoff_new_init): Update.
2687 * mipsread.c (mipscoff_new_init): Update.
2688 * mdebugread.c (mdebug_build_psymtabs): Update.
2689 * elfread.c (elf_new_init): Update.
2690 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2691 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2692 * buildsym.h (buildsym_new_init): Don't declare.
2693 * buildsym.c (buildsym_new_init): Remove.
2695 2018-07-16 Tom Tromey <tom@tromey.com>
2697 * stabsread.h (within_function): Move from buildsym.h.
2698 * stabsread.c (start_stabs): Clear within_function.
2699 * coffread.c (coff_start_symtab): Clear within_function.
2700 * buildsym.h (within_function): Move to stabsread.h.
2701 * buildsym.c (prepare_for_building): Update.
2703 2018-07-16 Tom Tromey <tom@tromey.com>
2705 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2706 * dwarf2read.c (dwarf2_start_symtab): Don't set
2707 processing_gcc_compilation.
2708 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2710 2018-07-16 Tom Tromey <tom@tromey.com>
2712 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2713 (next_symbol_text_func): Move from buildsym.h.
2714 * stabsread.c (hashname): Move from buildsym.c.
2715 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2716 (next_symbol_text_func, hashname): Move to stabsread.h.
2717 * buildsym.c: Don't include bcache.h
2718 (hashname): Move to stasbread.c.
2720 2018-07-16 Tom Tromey <tom@tromey.com>
2722 * buildsym.h (context_stack_size): Don't declare.
2723 * buildsym.c (context_stack_size): New global.
2725 2018-07-16 Tom Tromey <tom@tromey.com>
2727 * dbxread.c (processing_acc_compilation): New global.
2728 * buildsym.h (processing_acc_compilation): Don't declare.
2730 2018-07-16 Tom Tromey <tom@tromey.com>
2732 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2733 * dbxread.c (read_ofile_symtab): Update.
2734 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2735 * buildsym.h (last_source_start_addr): Remove.
2736 (set_last_source_start_addr, get_last_source_start_addr):
2738 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2740 (struct buildsym_compunit) <m_last_source_start_addr>: New
2742 (prepare_for_building): Remove start_addr parameter.
2743 (start_symtab, restart_symtab, end_symtab_get_static_block)
2744 (end_symtab_with_blockvector): Update.
2745 (set_last_source_start_addr, get_last_source_start_addr): New
2748 2018-07-16 Tom Tromey <tom@tromey.com>
2750 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2752 (have_line_numbers): Remove.
2753 (record_line, prepare_for_building, end_symtab_get_static_block)
2754 (augment_type_symtab): Update.
2756 2018-07-16 Tom Tromey <tom@tromey.com>
2758 * buildsym.c (~buildsym_compunit): Free the macro table.
2759 (struct buildsym_compunit) <get_macro_table, release_macros>: New
2761 <m_pending_macros>: New member.
2762 (pending_macros): Remove.
2763 (~scoped_free_pendings, get_macro_table, prepare_for_building)
2764 (reset_symtab_globals, end_symtab_get_static_block)
2765 (end_symtab_with_blockvector, augment_type_symtab)
2766 (buildsym_init): Update.
2768 2018-07-16 Tom Tromey <tom@tromey.com>
2770 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2772 (buildsym_compunit::set_last_source_file): New method.
2773 <m_last_source_file>: New member.
2774 (prepare_for_building): Remove "name" parameter.
2775 (start_symtab, restart_symtab, reset_symtab_globals): Update.
2776 (last_source_file): Remove.
2777 (set_last_source_file, get_last_source_file): Update.
2779 2018-07-16 Tom Tromey <tom@tromey.com>
2781 * buildsym.c (prepare_for_building): Add assert.
2783 2018-07-16 Tom Tromey <tom@tromey.com>
2785 * buildsym.c (~buildsym_compunit): Update.
2786 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2787 (start_subfile, patch_subfile_names)
2788 (end_symtab_with_blockvector): Update.
2790 2018-07-16 Tom Tromey <tom@tromey.com>
2792 * buildsym.c (struct buildsym_compunit): Add constructor,
2793 destructor, initializers.
2794 (start_buildsym_compunit): Remove.
2795 (free_buildsym_compunit): Use "delete".
2796 (start_symtab, restart_symtab): Use "new".
2798 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
2800 * symfile.c (set_objfile_default_section_offset): Remove struct
2803 2018-07-14 Stafford Horne <shorne@gmail.com>
2805 * (Responsible Maintainers): Add myself as or1k maintainer.
2807 2018-07-13 Tom Tromey <tom@tromey.com>
2809 * symfile.c (set_objfile_default_section_offset): Use extra braces
2812 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2814 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2817 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2819 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2820 unittests/cli-utils-selftests.c
2821 * unittests/cli-utils-selftests.c: New file.
2823 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2825 * NEWS: Mention new commands. Mention change to 'thread apply'.
2827 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2829 * thread.c (thr_try_catch_cmd): New function.
2830 (thread_apply_all_command): Handle qcs flags.
2831 (thread_apply_command): Handle qcs flags.
2832 (taas_command): New function.
2833 (tfaas_command): New function.
2834 (_initialize_thread): Update to setup the new commands 'taas
2835 and 'tfaas'. Change doc string for 'thread apply'.
2837 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2839 * stack.c: (trailing_outermost_frame): New function, mostly
2840 extracted from backtrace_command_1.
2841 (leading_innermost_frame): New function.
2842 (backtrace_command_1): Update to call trailing_outermost_frame.
2843 (frame_apply_command_count): New function.
2844 (frame_apply_level_command): New function.
2845 (frame_apply_all_command): New function.
2846 (frame_apply_command): New function.
2847 (faas_command): New function.
2848 (frame_cmd_list): New variable.
2849 (_initialize_stack): Update to setup the new commands 'frame apply'
2852 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2854 * cli-utils.c (number_or_range_parser::get_number): Only handle
2855 numbers or convenience var as numbers.
2856 (parse_flags): New function.
2857 (parse_flags_qcs): New function.
2858 (number_or_range_parser::finished): Ensure parsing end is detected
2859 before end of string.
2860 * cli-utils.h (parse_flags): New function.
2861 (parse_flags_qcs): New function.
2862 (number_or_range_parser): Remove m_finished bool.
2863 (number_or_range_parser::skip_range): Set m_in_range to false.
2865 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
2867 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2870 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2871 Jan Kratochvil <jan.kratochvil@redhat.com>
2872 Paul Fertser <fercerpav@gmail.com>
2873 Tsutomu Seki <sekiriki@gmail.com>
2874 Pedro Alves <palves@redhat.com>
2876 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2877 'unittests/parse-connection-spec-selftests.c'.
2878 (COMMON_SFILES): Add 'common/netstuff.c'.
2879 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2880 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2881 * common/netstuff.c: New file.
2882 * common/netstuff.h: New file.
2883 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2884 (wait_for_connect): Update comment. New parameter
2885 'gdb::optional<int> sock' instead of 'struct serial *scb'.
2886 Use 'sock' directly instead of 'scb->fd'.
2887 (try_connect): New function, with code from 'net_open'.
2888 (net_open): Rewrite main loop to deal with multiple
2889 sockets/addresses. Handle IPv6-style hostnames; implement
2890 support for IPv6 connections.
2891 * unittests/parse-connection-spec-selftests.c: New file.
2893 2018-07-11 Pedro Alves <palves@redhat.com>
2896 * remote.c (remote_target::remote_detach_pid): Call
2897 set_current_process.
2899 2018-07-11 Pedro Alves <palves@redhat.com>
2901 * h8300-tdep.c (h8300_gdbarch_init): Remove
2902 set_gdbarch_ecoff_reg_to_regnum calls.
2904 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2907 * c-typeprint.c (c_type_print_base_struct_union): Don't print
2908 offsets/sizes for static members of a class/struct.
2910 2018-07-11 Alan Hayward <alan.hayward@arm.com>
2912 * target-descriptions.c (tdesc_register_bitsize): Rename.
2913 * target-descriptions.h (tdesc_register_bitsize): Likewise.
2914 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2915 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2917 2018-07-10 Tom Tromey <tom@tromey.com>
2919 * breakpoint.c (moribund_locations): Now static and a
2921 (breakpoint_init_inferior, moribund_breakpoint_here_p)
2922 (build_bpstat_chain, update_global_location_list)
2923 (breakpoint_retire_moribund): Update.
2924 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
2927 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2929 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2930 (riscv_register_reggroup_p): Use new function, remove unneeded
2932 (riscv_push_dummy_call): Extend assert to compare against xlen or
2933 flen based on register type.
2935 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2937 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2939 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
2941 * remote.c (show_hardware_watchpoint_limit): New function.
2942 (show_hardware_watchpoint_length_limit): New function.
2943 (show_hardware_breakpoint_limit): New function.
2944 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2945 where appropriate, update help text.
2947 2018-07-09 Tom Tromey <tom@tromey.com>
2949 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2950 (CLIBS): Don't mention NAT_CLIBS.
2952 2018-07-09 Tom Tromey <tom@tromey.com>
2954 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2955 (LIBGDB_OBS, clean mostlyclean): Update.
2956 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2958 2018-07-09 Tom Tromey <tom@tromey.com>
2960 * Makefile.in (%.c: %.y): Use ECHO_YACC.
2961 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
2962 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2964 2018-07-09 Tom Tromey <tom@tromey.com>
2966 * Makefile.in (ALLDEPFILES): Remove exec.c.
2967 (COMMON_OBS): Remove exec.o.
2968 (COMMON_SFILES): Add exec.c.
2970 2018-07-09 Tom Tromey <tom@tromey.com>
2972 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2974 2018-07-09 Tom Tromey <tom@tromey.com>
2976 * Makefile.in (clean mostlyclean): Remove stamp-version.
2977 (version.c): Depend on stamp-version.
2978 (stamp-version): New rule, from version.c rule.
2980 2018-07-09 Tom Tromey <tom@tromey.com>
2982 * Makefile.in (init.c): Depend on stamp-init.
2983 (stamp-init): New rule, from init.c rule.
2984 (clean mostlyclean): Remove stamp-init.
2986 2018-07-09 Tom Tromey <tom@tromey.com>
2988 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2989 SUBDIR_GCC_COMPILE_SRCS.
2991 2018-07-09 Tom Tromey <tom@tromey.com>
2993 * Makefile.in (init.c): Remove some unused sed rules.
2995 2018-07-09 Tom Tromey <tom@tromey.com>
2997 * Makefile.in (TSOBS): Remove.
2998 (INIT_FILES): Update.
2999 (LIBGDB_OBS): Update.
3000 (COMMON_SFILES): Add inflow.c.
3001 (SFILES): Remove inflow.c.
3003 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3005 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3007 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
3009 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3010 get_saveloc_name, is_signal_frame_name, step_name,
3011 init_remote_name, create_addr_space_name,
3012 destroy_addr_space_name, search_unwind_table_name,
3013 find_dyn_list_name): Constify.
3015 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
3017 * darwin-nat.c (darwin_pthread_kill): New function.
3018 (darwin_resume_thread): Use darwin_pthread_kill.
3020 2018-07-05 Tom de Vries <tdevries@suse.de>
3022 * macroexp.c (macro_buffer) <operator=>: New member function.
3024 2018-07-04 Tom Tromey <tom@tromey.com>
3026 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3028 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
3030 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3031 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3032 * maint.c: Likewise.
3035 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3037 * NEWS: Create a new section for the next release branch.
3038 Rename the section of the current branch, now that it has
3041 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3043 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3044 * version.in: Bump version to 8.2.50.DATE-git.
3046 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
3047 Pedro Alves <palves@redhat.com>
3049 * linux-nat.c (linux_init_ptrace): Rename to ...
3050 (linux_init_ptrace_procfs): ... this. Call
3051 linux_proc_init_warnings.
3052 (linux_nat_target::post_attach)
3053 (linux_nat_target::post_startup_inferior): Adjust.
3054 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3055 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3057 2018-07-04 Tom de Vries <tdevries@suse.de>
3059 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3061 (read_comp_unit_head): ... here.
3063 2018-07-03 Tom Tromey <tom@tromey.com>
3065 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3066 (stop_tracing, tstatus_command)
3067 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3068 (print_one_static_tracepoint_marker): Update.
3069 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3071 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
3073 (all_tracepoints, static_tracepoints_here): Return std::vector.
3075 2018-07-03 Tom Tromey <tom@tromey.com>
3077 * common/ptid.c (ptid_equal): Remove.
3078 * common/ptid.h (ptid_equal): Don't declare.
3079 * ada-tasks.c: Update.
3080 * breakpoint.c: Update.
3081 * common/agent.c: Update.
3082 * corelow.c: Update.
3083 * darwin-nat-info.c: Update.
3084 * darwin-nat.c: Update.
3086 * dtrace-probe.c: Update.
3087 * dummy-frame.c: Update.
3088 * fbsd-nat.c: Update.
3090 * gdbthread.h: Update.
3091 * gnu-nat.c: Update.
3092 * go32-nat.c: Update.
3093 * inf-loop.c: Update.
3094 * inf-ptrace.c: Update.
3095 * infcall.c: Update.
3099 * linux-fork.c: Update.
3100 * linux-nat.c: Update.
3101 * linux-thread-db.c: Update.
3102 * mi/mi-cmd-var.c: Update.
3103 * mi/mi-interp.c: Update.
3104 * mi/mi-main.c: Update.
3105 * nto-procfs.c: Update.
3106 * ppc-linux-tdep.c: Update.
3108 * python/py-inferior.c: Update.
3109 * python/py-record-btrace.c: Update.
3110 * python/py-record.c: Update.
3111 * ravenscar-thread.c: Update.
3112 * regcache.c: Update.
3113 * remote-sim.c: Update.
3115 * sol-thread.c: Update.
3118 * tui/tui-stack.c: Update.
3120 * windows-nat.c: Update.
3121 * windows-tdep.c: Update.
3123 2018-07-03 Tom Tromey <tom@tromey.com>
3125 * common/ptid.c (ptid_match): Remove.
3126 * common/ptid.h (ptid_match): Don't declare.
3127 * fbsd-nat.c: Update.
3130 * linux-nat.c: Update.
3131 * record-btrace.c: Update.
3132 * regcache.c: Update.
3135 2018-07-03 Tom Tromey <tom@tromey.com>
3137 * common/ptid.c (ptid_tid_p): Remove.
3138 * common/ptid.h (ptid_tid_p): Don't declare.
3139 * sol-thread.c: Update.
3141 2018-07-03 Tom Tromey <tom@tromey.com>
3143 * common/ptid.c (ptid_lwp_p): Remove.
3144 * common/ptid.h (ptid_lwp_p): Don't declare.
3145 * fbsd-nat.c: Update.
3146 * linux-nat.c: Update.
3147 * nat/linux-procfs.c: Update.
3148 * nat/x86-linux-dregs.c: Update.
3149 * sol-thread.c: Update.
3151 2018-07-03 Tom Tromey <tom@tromey.com>
3153 * common/ptid.c (ptid_is_pid): Remove.
3154 * common/ptid.h (ptid_is_pid): Don't declare.
3156 * linux-nat.c: Update.
3157 * mi/mi-interp.c: Update.
3161 2018-07-03 Tom Tromey <tom@tromey.com>
3163 * common/ptid.c (ptid_get_tid): Remove.
3164 * common/ptid.h (ptid_get_tid): Don't declare.
3165 * ada-tasks.c: Update.
3166 * aix-thread.c: Update.
3167 * bsd-uthread.c: Update.
3168 * darwin-nat.c: Update.
3169 * fbsd-nat.c: Update.
3170 * i386-darwin-nat.c: Update.
3172 * linux-tdep.c: Update.
3173 * nto-procfs.c: Update.
3174 * ppc-ravenscar-thread.c: Update.
3175 * python/py-infthread.c: Update.
3176 * ravenscar-thread.c: Update.
3177 * sol-thread.c: Update.
3178 * sparc-ravenscar-thread.c: Update.
3179 * windows-nat.c: Update.
3181 2018-07-03 Tom Tromey <tom@tromey.com>
3183 * common/ptid.c (ptid_get_lwp): Remove.
3184 * common/ptid.h (ptid_get_lwp): Don't declare.
3185 * aarch64-linux-nat.c: Update.
3186 * ada-tasks.c: Update.
3187 * aix-thread.c: Update.
3188 * amd64-linux-nat.c: Update.
3189 * arm-linux-nat.c: Update.
3190 * corelow.c: Update.
3191 * fbsd-nat.c: Update.
3192 * fbsd-tdep.c: Update.
3193 * gnu-nat.c: Update.
3194 * i386-cygwin-tdep.c: Update.
3195 * i386-gnu-nat.c: Update.
3196 * i386-linux-nat.c: Update.
3197 * ia64-linux-nat.c: Update.
3198 * inf-ptrace.c: Update.
3200 * linux-fork.c: Update.
3201 * linux-nat.c: Update.
3202 * linux-tdep.c: Update.
3203 * linux-thread-db.c: Update.
3204 * mips-linux-nat.c: Update.
3205 * nat/aarch64-linux-hw-point.c: Update.
3206 * nat/aarch64-linux.c: Update.
3207 * nat/linux-btrace.c: Update.
3208 * nat/linux-osdata.c: Update.
3209 * nat/linux-procfs.c: Update.
3210 * nat/x86-linux-dregs.c: Update.
3211 * obsd-nat.c: Update.
3212 * ppc-fbsd-nat.c: Update.
3213 * ppc-linux-nat.c: Update.
3215 * python/py-infthread.c: Update.
3216 * ravenscar-thread.c: Update.
3218 * s390-linux-nat.c: Update.
3219 * sol-thread.c: Update.
3220 * sol2-tdep.c: Update.
3221 * spu-linux-nat.c: Update.
3222 * x86-linux-nat.c: Update.
3223 * xtensa-linux-nat.c: Update.
3225 2018-07-03 Tom Tromey <tom@tromey.com>
3227 * common/ptid.c (ptid_get_pid): Remove.
3228 * common/ptid.h (ptid_get_pid): Don't declare.
3229 * aarch64-linux-nat.c: Update.
3230 * ada-lang.c: Update.
3231 * aix-thread.c: Update.
3232 * alpha-bsd-nat.c: Update.
3233 * amd64-fbsd-nat.c: Update.
3234 * amd64-linux-nat.c: Update.
3235 * arm-linux-nat.c: Update.
3236 * arm-nbsd-nat.c: Update.
3238 * break-catch-syscall.c: Update.
3239 * breakpoint.c: Update.
3240 * bsd-uthread.c: Update.
3241 * corelow.c: Update.
3243 * darwin-nat.c: Update.
3244 * fbsd-nat.c: Update.
3245 * fbsd-tdep.c: Update.
3247 * gnu-nat.c: Update.
3248 * hppa-nbsd-nat.c: Update.
3249 * hppa-obsd-nat.c: Update.
3250 * i386-fbsd-nat.c: Update.
3251 * ia64-linux-nat.c: Update.
3252 * inf-ptrace.c: Update.
3254 * inferior.c: Update.
3255 * inferior.h: Update.
3258 * linux-fork.c: Update.
3259 * linux-nat.c: Update.
3260 * linux-tdep.c: Update.
3261 * linux-thread-db.c: Update.
3262 * m68k-bsd-nat.c: Update.
3263 * mi/mi-interp.c: Update.
3264 * mi/mi-main.c: Update.
3265 * mips-linux-nat.c: Update.
3266 * mips-nbsd-nat.c: Update.
3267 * mips64-obsd-nat.c: Update.
3268 * nat/aarch64-linux-hw-point.c: Update.
3269 * nat/aarch64-linux.c: Update.
3270 * nat/linux-btrace.c: Update.
3271 * nat/linux-osdata.c: Update.
3272 * nat/linux-procfs.c: Update.
3273 * nat/x86-linux-dregs.c: Update.
3274 * nto-procfs.c: Update.
3275 * obsd-nat.c: Update.
3276 * ppc-linux-nat.c: Update.
3277 * ppc-nbsd-nat.c: Update.
3278 * ppc-obsd-nat.c: Update.
3279 * proc-service.c: Update.
3281 * python/py-inferior.c: Update.
3282 * python/py-infthread.c: Update.
3283 * ravenscar-thread.c: Update.
3285 * remote-sim.c: Update.
3287 * rs6000-nat.c: Update.
3288 * s390-linux-nat.c: Update.
3289 * sh-nbsd-nat.c: Update.
3290 * sol-thread.c: Update.
3291 * sparc-nat.c: Update.
3292 * sparc64-tdep.c: Update.
3293 * spu-linux-nat.c: Update.
3294 * spu-tdep.c: Update.
3295 * target-debug.h: Update.
3298 * tid-parse.c: Update.
3299 * tracefile-tfile.c: Update.
3300 * vax-bsd-nat.c: Update.
3301 * windows-nat.c: Update.
3302 * x86-linux-nat.c: Update.
3303 * x86-nat.c: Update.
3305 2018-07-03 Tom Tromey <tom@tromey.com>
3307 * common/ptid.c (pid_to_ptid): Remove.
3308 * common/ptid.h (pid_to_ptid): Don't declare.
3309 * aix-thread.c: Update.
3310 * arm-linux-nat.c: Update.
3311 * common/ptid.c: Update.
3312 * common/ptid.h: Update.
3313 * corelow.c: Update.
3315 * darwin-nat.c: Update.
3316 * fbsd-nat.c: Update.
3317 * fork-child.c: Update.
3318 * gnu-nat.c: Update.
3319 * go32-nat.c: Update.
3320 * inf-ptrace.c: Update.
3322 * inferior.c: Update.
3324 * linux-fork.c: Update.
3325 * linux-nat.c: Update.
3326 * nat/aarch64-linux-hw-point.c: Update.
3327 * nat/fork-inferior.c: Update.
3328 * nat/x86-linux-dregs.c: Update.
3329 * nto-procfs.c: Update.
3330 * obsd-nat.c: Update.
3332 * progspace.c: Update.
3334 * rs6000-nat.c: Update.
3335 * s390-linux-nat.c: Update.
3336 * sol-thread.c: Update.
3337 * spu-linux-nat.c: Update.
3340 * tracefile-tfile.c: Update.
3341 * windows-nat.c: Update.
3343 2018-07-03 Tom Tromey <tom@tromey.com>
3345 * common/ptid.h (ptid_build): Don't declare.
3346 * common/ptid.c (ptid_build): Remove.
3347 * aix-thread.c: Update.
3348 * bsd-kvm.c: Update.
3349 * bsd-uthread.c: Update.
3350 * common/agent.c: Update.
3351 * common/ptid.c: Update.
3352 * common/ptid.h: Update.
3353 * corelow.c: Update.
3354 * darwin-nat.c: Update.
3355 * fbsd-nat.c: Update.
3356 * gnu-nat.c: Update.
3357 * linux-fork.c: Update.
3358 * linux-nat.c: Update.
3359 * linux-thread-db.c: Update.
3360 * nat/linux-osdata.c: Update.
3361 * nat/linux-procfs.c: Update.
3362 * nto-procfs.c: Update.
3363 * obsd-nat.c: Update.
3364 * proc-service.c: Update.
3366 * ravenscar-thread.c: Update.
3367 * remote-sim.c: Update.
3369 * sol-thread.c: Update.
3371 * windows-nat.c: Update.
3373 2018-07-03 Tom Tromey <tom@tromey.com>
3375 * infrun.c (follow_exec): Use exit_inferior_silent.
3376 * inferior.c (exit_inferior_num_silent): Remove.
3377 * inferior.h (exit_inferior_num_silent): Don't declare.
3379 2018-07-03 Tom Tromey <tom@tromey.com>
3382 * darwin-nat.c (darwin_attach_pid): Reset inferior and
3383 inferior_ptid on error.
3385 2018-07-02 Maciej W. Rozycki <macro@mips.com>
3386 Simon Marchi <simon.marchi@polymtl.ca>
3389 * disasm.h (gdb_disassembler): Add
3390 `m_disassembler_options_holder'. member
3391 * disasm.c (get_all_disassembler_options): New function.
3392 (gdb_disassembler::gdb_disassembler): Use it.
3393 (gdb_buffered_insn_length_init_dis): Likewise.
3394 (gdb_buffered_insn_length): Adjust accordingly.
3395 (set_disassembler_options): Handle options with arguments.
3396 (show_disassembler_options_sfunc): Likewise. Add a leading new
3397 line if showing options with descriptions.
3398 (disassembler_options_completer): Adapt to using the
3399 `disasm_options_and_args_t' structure.
3400 * mips-tdep.c (mips_disassembler_options): New variable.
3401 (mips_disassembler_options_o32): Likewise.
3402 (mips_disassembler_options_n32): Likewise.
3403 (mips_disassembler_options_n64): Likewise.
3404 (gdb_print_insn_mips): Don't set `disassembler_options'.
3405 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3407 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3408 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
3409 `gdbarch_disassembler_options_implicit' and
3410 `gdbarch_valid_disassembler_options'.
3411 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3412 `disasm_options_and_args_t' structure.
3413 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3415 (valid_disassembler_options): Switch from `disasm_options_t' to
3416 the `disasm_options_and_args_t' structure.
3417 * NEWS: Document `set disassembler-options' support for the MIPS
3419 * gdbarch.h: Regenerate.
3420 * gdbarch.c: Regenerate.
3422 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
3424 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3426 2018-06-29 Joel Brobecker <brobecker@adacore.com>
3428 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3429 parameter in call to amd64_target_description.
3430 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3431 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3432 (amd64fbsd_init_abi): Likewise.
3433 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3434 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3435 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3436 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3438 2018-06-29 Pedro Alves <palves@redhat.com>
3440 * gdb/amd64-tdep.h (amd64_create_target_description): Add
3441 "segments" parameter.
3442 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3443 (_initialize_amd64_tdep): Update call to
3444 amd64_create_target_description.
3445 (amd64_target_description): Add "segments" parameter. Adjust
3446 the implementation to use it.
3447 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3448 call to amd64_create_target_description.
3449 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3450 * gdb/arch/amd64.h (amd64_create_target_description): Add
3451 "segments" register.
3452 * gdb/arch/amd64.c (amd64_create_target_description): Add
3453 "segments" parameter. Call create_feature_i386_64bit_segments
3454 only if SEGMENTS is true.
3455 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3456 call to amd64_create_target_description.
3458 2018-06-29 Pedro Alves <palves@redhat.com>
3460 * thread.c (thread_target_id_str): New, factored out from ...
3461 (print_thread_info_1): ... here. Use it to compute the max
3462 "Target Id" column width.
3464 2018-06-29 Pedro Alves <palves@redhat.com>
3466 * remote.c (remote_target::extra_thread_info): Delete
3467 'display_buf' and 'n' locals. from the cache, regardless of
3468 packet mechanims is in use. Use cache for qThreadExtra and qP
3471 2018-06-29 Pedro Alves <palves@redhat.com>
3473 * blockframe.c (find_pc_sect_containing_function): New function.
3474 * breakpoint.c (print_breakpoint_location): Don't call
3475 find_pc_sect_function.
3476 * linespec.c (create_sals_line_offset): Record the location's
3478 * linespec.c (convert_address_location_to_sals): Fill in sal's
3479 symbol with find_pc_sect_containing_function.
3480 * symtab.c (find_function_start_sal): Rename to ...
3481 (find_function_start_sal_1): ... this.
3482 (find_function_start_sal): Reimplement as wrapper around
3483 find_function_start_sal_1, and use
3484 find_pc_sect_containing_function to fill in the sal's symbol.
3485 (find_function_start_sal(symbol*, bool)): Adjust.
3486 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3488 (find_pc_sect_containing_function): Declare.
3490 2018-06-29 Pedro Alves <palves@redhat.com>
3492 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3493 true if the the location has no symbol.
3495 2018-06-28 Tom Tromey <tom@tromey.com>
3497 * NEWS: Mention --enable-codesign.
3498 * silent-rules.mk (ECHO_SIGN): New variable.
3499 * configure.ac: Add --enable-codesign.
3500 * configure: Rebuild.
3501 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3502 (gdb$(EXEEXT)): Optionally invoke codesign.
3504 2018-06-28 Pedro Alves <palves@redhat.com>
3506 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3508 (switch_to_thread_no_regs): Adjust comment.
3509 * infcmd.c (stop_pc): Delete.
3510 (post_create_inferior, info_program_command): Replace references
3511 to stop_pc with references to thread_info->suspend.stop_pc.
3512 * inferior.h (stop_pc): Delete declaration.
3513 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3514 (handle_inferior_event_1, handle_signal_stop)
3515 (process_event_stop_test, keep_going_stepped_thread)
3516 (handle_step_into_function, handle_step_into_function_backward)
3517 (print_stop_location): Replace references to stop_pc with
3518 references to thread_info->suspend.stop_pc.
3519 (struct infcall_suspend_state) <stop_pc>: Delete field.
3520 (save_infcall_suspend_state, restore_infcall_suspend_state):
3521 Remove references to inf_stat->stop_pc.
3522 * linux-fork.c (fork_load_infrun_state): Likewise.
3523 * record-btrace.c (record_btrace_set_replay): Likewise.
3524 * record-full.c (record_full_goto_entry): Likewise.
3525 * remote.c (print_one_stopped_thread): Likewise.
3526 * target.c (target_resume): Extend comment.
3527 * thread.c (set_executing_thread): New.
3528 (set_executing): Use it.
3529 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3530 Remove references to stop_pc.
3532 2018-06-28 Pedro Alves <palves@redhat.com>
3534 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3535 Moving fetching stop_pc until after ecs->event_thread is refreshed.
3537 2018-06-28 Tom Tromey <tom@tromey.com>
3539 * coffread.c (coff_symfile_finish): Update.
3540 * xcoffread.c (xcoff_symfile_finish): Update.
3541 * elfread.c (elf_symfile_finish): Update.
3542 * symfile.h (dwarf2_free_objfile): Don't declare.
3543 * dwarf2read.c (_initialize_dwarf2_read): Use
3544 register_objfile_data_with_cleanup.
3545 (dwarf2_free_objfile): Now static. Change signature.
3547 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3549 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3550 option "-o" to add-symbol-file-load to add an offset to each
3551 section's load address.
3552 * symfile.c (set_objfile_default_section_offset): New function.
3554 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3556 * symfile.c (add_symbol_file_command): Make sure that sections
3557 with the same name are sorted in the same order.
3559 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3561 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3562 require the second argument. If omitted, load sections at the
3563 addresses specified in the file.
3565 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3567 * symfile.c (symbol_file_command, symbol_file_add_main_1)
3568 (_initialize_symfile): Add option "-o" to symbol-file to add an
3569 offset to each section of the symbol file.
3571 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3573 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3575 2018-06-27 Tom Tromey <tom@tromey.com>
3577 * stack.c (_initialize_stack): Update "func" help text.
3579 2018-06-27 Tom Tromey <tom@tromey.com>
3581 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3583 (unwind_infopy_str, pyuw_create_unwind_info)
3584 (unwind_infopy_add_saved_register, pyuw_sniffer)
3585 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3587 (struct saved_reg): Add constructor.
3588 <value>: Now a gdbpy_ref<>.
3590 2018-06-27 Tom Tromey <tom@tromey.com>
3592 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3594 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3596 * gdb-gdb.py.in: Format using autopep8.
3598 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3600 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3601 (type_lookup_function): Recognize CORE_ADDR values.
3603 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3605 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3608 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3610 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3613 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3615 * gdb-gdb.py: Move to...
3616 * gdb-gdb.py.in: ... here.
3617 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3618 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3620 (distclean): Remove gdb-gdb.py when cleaning.
3621 (gdb-gdb.py, gdb-gdb.gdb): New rules.
3622 * configure: Re-generate.
3624 2018-06-27 Pedro Alves <palves@redhat.com>
3626 * proc-service.c (get_ps_regcache): New.
3627 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3628 (ps_lsetfpregs): Use it.
3630 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
3633 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3634 (dwarf_decode_lines_1): Adjust.
3636 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3638 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3640 <info_proc>: Likewise.
3642 2018-06-26 Joel Brobecker <brobecker@adacore.com>
3644 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3645 to windows_fetch_one_register, and only handle the case of
3646 fetching one register. Move the code that reloads the context
3647 and iterates over all registers if R is negative to...
3648 (windows_nat_target::fetch_registers): ... here.
3649 (do_windows_store_inferior_registers): Rename to
3650 windows_store_one_register, and only handle the case of storing
3651 one register. Move the code that handles the case where r is
3653 (windows_nat_target::store_registers) ... here.
3655 2018-06-26 Tom Tromey <tom@tromey.com>
3658 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3659 * rust-lang.c (rust_print_struct_def): Add podata parameter.
3661 (rust_internal_print_type): Add podata parameter.
3662 (rust_print_type): Update.
3664 2018-06-26 Tom Tromey <tom@tromey.com>
3666 * typeprint.h (struct print_offset_data) <update, finish,
3667 maybe_print_hole>: New methods.
3668 <indentation>: New constant.
3669 * typeprint.c (print_offset_data::indentation): Define.
3670 (print_offset_data::maybe_print_hole, print_offset_data::update)
3671 (print_offset_data::finish): Move from c-typeprint.c and rename.
3672 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3673 (print_spaces_filtered_with_print_options): Update.
3674 (c_print_type_union_field_offset, maybe_print_hole)
3675 (c_print_type_struct_field_offset): Move to typeprint.c and
3677 (c_type_print_base_struct_union): Update.
3679 2018-06-25 Pedro Alves <palves@redhat.com>
3681 * gdbthread.h (thread_info_ref, delete_thread)
3682 (delete_thread_silent, first_thread_of_inferior)
3683 (any_thread_of_inferior, switch_to_thread)
3684 (enable_thread_stack_temporaries)
3685 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3686 (get_last_thread_stack_temporary)
3687 (value_in_thread_stack_temporaries, can_access_registers_thread):
3688 Spell out "struct thread_info" instead of just "thread_info".
3689 * inferior.h (notice_new_inferior): Likewise.
3691 2018-06-25 Pedro Alves <palves@redhat.com>
3693 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3694 pass thread_info pointer to delete_thread.
3695 (windows_nat_target::detach): Pass inferior pointer to
3697 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3699 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3700 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3701 and pass a thread_info pointer to delete_thread.
3702 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3703 pass thread_info pointer to delete_thread.
3704 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3705 delete_thread_silent call.
3706 * procfs.c (procfs_target::detach): Pass inferior pointer to
3708 (procfs_target::wait): Pass thread_info pointer to delete_thread.
3709 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3710 delete_thread_silent call.
3711 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3712 pass thread_info pointer to delete_thread.
3713 (windows_nat_target::detach): Pass inferior pointer to
3716 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3718 * regcache.c (readable_regcache::read_part): Fix asserts.
3719 (reg_buffer::raw_collect_part): New function.
3720 (regcache::write_part): Fix asserts.
3721 (reg_buffer::raw_supply_part): New function.
3722 (regcache::transfer_regset_register): New helper function.
3723 (regcache::transfer_regset): Call new functions.
3724 (regcache_supply_regset): Use gdb_byte*.
3725 (regcache::supply_regset): Likewise.
3726 (regcache_collect_regset): Likewise.
3727 (regcache::collect_regset): Likewise.
3728 * regcache.h (reg_buffer::raw_collect_part): New declaration.
3729 (reg_buffer::raw_supply_part): Likewise.
3730 (regcache::transfer_regset_register): Likewise.
3731 (regcache::transfer_regset): Use gdb_byte*.
3733 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3735 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3737 2018-06-21 Pedro Alves <palves@redhat.com>
3739 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3740 instead of a ptid_t. All callers adjusted.
3741 * ada-tasks.c (ada_get_task_number): Likewise. All callers
3743 (print_ada_task_info, display_current_task_id, task_command_1):
3745 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3747 (breakpoint_kind): Adjust.
3748 (remove_breakpoints_pid): Rename to ...
3749 (remove_breakpoints_inf): ... this. Adjust to take an inferior
3750 pointer. All callers adjusted.
3751 (bpstat_clear_actions): Use inferior_thread.
3752 (get_bpstat_thread): New.
3753 (bpstat_do_actions): Use it.
3754 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3755 to take a thread_info pointer. All callers adjusted.
3756 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3757 (breakpoint_re_set_thread): Use inferior_thread.
3758 * breakpoint.h (struct inferior): Forward declare.
3759 (bpstat_stop_status): Update.
3760 (remove_breakpoints_pid): Delete.
3761 (remove_breakpoints_inf): New.
3762 * bsd-uthread.c (bsd_uthread_target::wait)
3763 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3764 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3765 (maint_btrace_packet_history_cmd)
3766 (maint_btrace_clear_packet_history_cmd): Adjust.
3767 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3769 * cli/cli-interp.c: Include "inferior.h".
3770 * common/refcounted-object.h (struct
3771 refcounted_object_ref_policy): New.
3772 * compile/compile-object-load.c: Include gdbthread.h.
3773 (store_regs): Use inferior_thread.
3774 * corelow.c (core_target::close): Use current_inferior.
3775 (core_target_open): Adjust to use first_thread_of_inferior and use
3776 the current inferior.
3777 * ctf.c (ctf_target::close): Adjust to use current_inferior.
3778 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3779 <thread>: ... this new field. All references adjusted.
3780 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3781 Take a thread_info pointer instead of a ptid_t.
3782 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3783 (dummy_frame_discard, register_dummy_frame_dtor): Take a
3784 thread_info pointer instead of a ptid_t.
3785 * elfread.c: Include "inferior.h".
3786 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3787 Use inferior_thread.
3788 * eval.c (evaluate_subexp): Likewise.
3789 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3791 * gdb_proc_service.h (struct thread_info): Forward declare.
3792 (struct ps_prochandle) <ptid>: Delete, replaced by ...
3793 <thread>: ... this new field. All references adjusted.
3794 * gdbarch.h, gdbarch.c: Regenerate.
3795 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3796 'thread' parameter. All implementations and callers adjusted.
3797 * gdbthread.h (thread_info) <set_running>: New method.
3798 (delete_thread, delete_thread_silent): Take a thread_info pointer
3800 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3801 (first_thread_of_process): Delete, replaced by ...
3802 (first_thread_of_inferior): ... this new function. All callers
3804 (any_live_thread_of_process): Delete, replaced by ...
3805 (any_live_thread_of_inferior): ... this new function. All callers
3807 (switch_to_thread, switch_to_no_thread): Declare.
3808 (is_executing): Delete.
3809 (enable_thread_stack_temporaries): Update comment.
3810 <enable_thread_stack_temporaries>: Take a thread_info pointer
3811 instead of a ptid_t. Incref the thread.
3812 <~enable_thread_stack_temporaries>: Decref the thread.
3815 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3816 (get_last_thread_stack_temporary)
3817 (value_in_thread_stack_temporaries, can_access_registers_thread):
3818 Take a thread_info pointer instead of a ptid_t. All callers
3820 * infcall.c (get_call_return_value): Use inferior_thread.
3821 (run_inferior_call): Work with thread pointers instead of ptid_t.
3822 (call_function_by_hand_dummy): Work with thread pointers instead
3823 of ptid_t. Use thread_info_ref.
3824 * infcmd.c (proceed_thread_callback): Access thread's state
3826 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3827 access thread's state directly.
3828 (continue_command): Use inferior_thread.
3829 (info_program_command): Use find_thread_ptid and access thread
3831 (proceed_after_attach_callback): Use thread state directly.
3832 (notice_new_inferior): Take a thread_info pointer instead of a
3833 ptid_t. All callers adjusted.
3834 (exit_inferior): Take an inferior pointer instead of a pid. All
3836 (exit_inferior_silent): New.
3837 (detach_inferior): Delete.
3838 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3839 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3840 (detach_inferior_command, kill_inferior_command): Use
3841 find_inferior_id instead of valid_gdb_inferior_id and
3842 gdb_inferior_id_to_pid.
3843 (inferior_command): Use inferior and thread pointers.
3844 * inferior.h (struct thread_info): Forward declare.
3845 (notice_new_inferior): Take a thread_info pointer instead of a
3846 ptid_t. All callers adjusted.
3847 (detach_inferior): Delete declaration.
3848 (exit_inferior, exit_inferior_silent): Take an inferior pointer
3849 instead of a pid. All callers adjusted.
3850 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3851 (valid_gdb_inferior_id): Delete.
3852 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3853 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3854 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3856 <inf>: ... this new field.
3857 <step_ptid>: Delete, replaced by ...
3858 <step_thread>: ... this new field.
3859 (get_displaced_stepping_state): Take an inferior pointer instead
3860 of a pid. All callers adjusted.
3861 (displaced_step_in_progress_any_inferior): Adjust.
3862 (displaced_step_in_progress_thread): Take a thread pointer instead
3863 of a ptid_t. All callers adjusted.
3864 (displaced_step_in_progress, add_displaced_stepping_state): Take
3865 an inferior pointer instead of a pid. All callers adjusted.
3866 (get_displaced_step_closure_by_addr): Adjust.
3867 (remove_displaced_stepping_state): Take an inferior pointer
3868 instead of a pid. All callers adjusted.
3869 (displaced_step_prepare_throw, displaced_step_prepare)
3870 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3871 All callers adjusted.
3872 (start_step_over): Adjust.
3873 (infrun_thread_ptid_changed): Remove bit updating ptids in the
3874 displaced step queue.
3875 (do_target_resume): Adjust.
3876 (fetch_inferior_event): Use inferior_thread.
3877 (context_switch, get_inferior_stop_soon): Take an
3878 execution_control_state pointer instead of a ptid_t. All callers
3880 (switch_to_thread_cleanup): Delete.
3881 (stop_all_threads): Use scoped_restore_current_thread.
3882 * inline-frame.c: Include "gdbthread.h".
3883 (inline_state) <inline_state>: Take a thread pointer instead of a
3884 ptid_t. All callers adjusted.
3885 <ptid>: Delete, replaced by ...
3886 <thread>: ... this new field.
3887 (find_inline_frame_state): Take a thread pointer instead of a
3888 ptid_t. All callers adjusted.
3889 (skip_inline_frames, step_into_inline_frame)
3890 (inline_skipped_frames, inline_skipped_symbol): Take a thread
3891 pointer instead of a ptid_t. All callers adjusted.
3892 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3893 (inline_skipped_frames, inline_skipped_symbol): Likewise.
3894 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3896 * linux-nat.c (get_detach_signal): Likewise.
3897 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3898 (thread_db_notice_clone): Adjust.
3899 (thread_db_find_new_threads_silently)
3900 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3901 a thread pointer instead of a ptid_t. All callers adjusted.
3902 * mi/mi-cmd-var.c: Include "inferior.h".
3903 (mi_cmd_var_update_iter): Update to use thread pointers.
3904 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3906 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3908 (mi_output_running): ... this new function.
3909 (mi_on_resume_1): Adjust to use it.
3910 (mi_user_selected_context_changed): Adjust to use inferior_thread.
3911 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3913 (interrupt_thread_callback): : Adjust to use thread and inferior
3915 * proc-service.c: Include "gdbthread.h".
3916 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3917 * progspace-and-thread.c: Include "inferior.h".
3918 * progspace.c: Include "inferior.h".
3919 * python/py-exitedevent.c (create_exited_event_object): Adjust to
3920 hold a reference to an inferior_object.
3921 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3923 * python/py-inferior.c (struct inferior_object): Give the type a
3924 tag name instead of a typedef.
3925 (python_on_normal_stop): No need to check if the current thread is
3927 (inferior_to_inferior_object): Change return type to
3928 inferior_object. All callers adjusted.
3929 (find_thread_object): Delete, bits factored out to ...
3930 (thread_to_thread_object): ... this new function.
3931 * python/py-infthread.c (create_thread_object): Use
3932 inferior_to_inferior_object.
3933 (thpy_is_stopped): Use thread pointer directly.
3934 (gdbpy_selected_thread): Use inferior_thread.
3935 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3936 field, replaced with ...
3937 <thread>: ... this new field. All users adjusted.
3938 (btpy_insn_or_gap_new): Drop const.
3939 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
3941 * python/py-record.c: Include "gdbthread.h".
3942 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3943 a ptid_t. All callers adjusted.
3944 (gdbpy_current_recording): Use inferior_thread.
3945 * python/py-record.h (recpy_record_object) <ptid>: Delete
3946 field, replaced with ...
3947 <thread>: ... this new field. All users adjusted.
3948 (recpy_element_object) <ptid>: Delete
3949 field, replaced with ...
3950 <thread>: ... this new field. All users adjusted.
3951 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3952 a ptid_t. All callers adjusted.
3953 * python/py-threadevent.c: Include "gdbthread.h".
3954 (get_event_thread): Use thread_to_thread_object.
3955 * python/python-internal.h (struct inferior_object): Forward
3957 (find_thread_object, find_inferior_object): Delete declarations.
3958 (thread_to_thread_object, inferior_to_inferior_object): New
3960 * record-btrace.c: Include "inferior.h".
3961 (require_btrace_thread): Use inferior_thread.
3962 (record_btrace_frame_sniffer)
3963 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3964 (get_thread_current_frame): Use scoped_restore_current_thread and
3966 (get_thread_current_frame): Use thread pointer directly.
3967 (record_btrace_replay_at_breakpoint): Use thread's inferior
3969 * record-full.c: Include "inferior.h".
3970 * regcache.c: Include "gdbthread.h".
3971 (get_thread_arch_regcache): Use the inferior's address space
3973 (get_thread_regcache, registers_changed_thread): New.
3974 * regcache.h (get_thread_regcache(thread_info *thread)): New
3976 (registers_changed_thread): New.
3977 (remote_target) <remote_detach_1>: Swap order of parameters.
3978 (remote_add_thread): <remote_add_thread>: Return the new thread.
3979 (get_remote_thread_info(ptid_t)): New overload.
3980 (remote_target::remote_notice_new_inferior): Use thread pointers
3982 (remote_target::process_initial_stop_replies): Use
3983 thread_info::set_running.
3984 (remote_target::remote_detach_1, remote_target::detach)
3985 (extended_remote_target::detach): Adjust.
3986 * stack.c (frame_show_address): Use inferior_thread.
3987 * target-debug.h (target_debug_print_thread_info_pp): New.
3988 * target-delegates.c: Regenerate.
3989 * target.c (default_thread_address_space): Delete.
3990 (memory_xfer_partial_1): Use current_inferior.
3991 (target_detach): Use current_inferior.
3992 (target_thread_address_space): Delete.
3993 (generic_mourn_inferior): Use current_inferior.
3994 * target.h (struct target_ops) <thread_address_space>: Delete.
3995 (target_thread_address_space): Delete.
3996 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
3998 (delete_thread_1, delete_thread, delete_thread_silent): Take a
3999 thread pointer instead of a ptid_t. Adjust all callers.
4000 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4001 (first_thread_of_process): Delete, replaced by ...
4002 (first_thread_of_inferior): ... this new function. All callers
4004 (any_thread_of_process): Rename to ...
4005 (any_thread_of_inferior): ... this, and take an inferior pointer.
4006 (any_live_thread_of_process): Rename to ...
4007 (any_live_thread_of_inferior): ... this, and take an inferior
4009 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4010 (value_in_thread_stack_temporaries)
4011 (get_last_thread_stack_temporary): Take a thread pointer instead
4012 of a ptid_t. Adjust all callers.
4013 (thread_info::set_running): New.
4014 (validate_registers_access): Use inferior_thread.
4015 (can_access_registers_ptid): Rename to ...
4016 (can_access_registers_thread): ... this, and take a thread
4018 (print_thread_info_1): Adjust to compare thread pointers instead
4020 (switch_to_no_thread, switch_to_thread): Make extern.
4021 (scoped_restore_current_thread::~scoped_restore_current_thread):
4022 Use m_thread pointer directly.
4023 (scoped_restore_current_thread::scoped_restore_current_thread):
4024 Use inferior_thread.
4025 (thread_command): Use thread pointer directly.
4026 (thread_num_make_value_helper): Use inferior_thread.
4027 * top.c (execute_command): Use inferior_thread.
4028 * tui/tui-interp.c: Include "inferior.h".
4029 * varobj.c (varobj_create): Use inferior_thread.
4030 (value_of_root_1): Use find_thread_global_id instead of
4031 global_thread_id_to_ptid.
4033 2018-06-21 Alan Hayward <alan.hayward@arm.com>
4035 * regcache.c (readable_regcache::read_part): Avoid memcpy when
4037 (regcache::write_part): Likewise.
4038 (readable_regcache::cooked_read_part): Update comment.
4039 (readable_regcache::cooked_write_part): Likewise.
4040 * regcache.h: (readable_regcache::read_part): Likewise.
4041 (regcache::write_part): Likewise.
4043 2018-06-21 Richard Bunt <richard.bunt@arm.com>
4044 Dirk Schubert <dirk.schubert@arm.com>
4046 * aarch64-linux-nat.c (post_attach): New.
4047 (aarch64_linux_nat_target::post_attach): Override post_attach to
4048 record the number of hardware debug registers.
4050 2018-06-20 Tom Tromey <tom@tromey.com>
4052 * python/py-param.c (add_setshow_generic): Make parameters const.
4053 (parmpy_init): Update.
4055 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4057 * regcache.h (regcache_cooked_read_ftype): Rename to...
4058 (register_read_ftype): ...this, change type to function_view.
4059 (class reg_buffer) <save>: Remove src parameter.
4060 (readonly_detached_regcache) <readonly_detached_regcache>: Make
4061 parameter non-const in first overload. Remove src parameter in
4063 * regcache.c (do_cooked_read): Remove.
4064 (readonly_detached_regcache::readonly_detached_regcache): Make
4065 parameter non-const, adjust call to other constructor.
4066 (reg_buffer::save): Remove src parameter.
4067 * frame.c (do_frame_register_read): Remove.
4068 (frame_save_as_regcache): Use lambda function.
4069 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4070 parameter to ppu2spu_data *.
4071 (ppu2spu_sniffer): Use lambda function.
4073 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4075 * record-full.c (record_full_target::insert_breakpoint): Remove
4076 "struct" keyword, add const.
4078 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
4080 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4081 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4082 * configure.ac: Remove AC_PREREQ, add missing quoting.
4083 * gnulib/configure.ac: Modernize usage of
4084 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
4085 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4086 (AUTOMAKE_VERSION): Bump to 1.15.1.
4087 * configure: Re-generate.
4088 * config.in: Re-generate.
4089 * aclocal.m4: Re-generate.
4090 * gnulib/aclocal.m4: Re-generate.
4091 * gnulib/config.in: Re-generate.
4092 * gnulib/configure: Re-generate.
4093 * gnulib/import/Makefile.in: Re-generate.
4095 2018-06-19 Pedro Alves <palves@redhat.com>
4097 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4098 (lookup_minimal_symbol_by_pc_section): ... here with
4099 gdb_assert_not_reached added.
4101 2018-06-19 Pedro Alves <palves@redhat.com>
4103 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4104 parameter with a block parameter. Compare location's block symbol
4105 with the frame's block instead of addresses.
4106 (skip_inline_frames): Pass the current block instead of the
4107 frame's address. Break out as soon as we determine the frame
4108 should not be skipped.
4110 2018-06-18 Tom Tromey <tom@tromey.com>
4112 * solib-aix.c (solib_aix_get_section_offsets): Return
4114 (solib_aix_solib_create_inferior_hook): Update.
4116 2018-06-18 Tom Tromey <tom@tromey.com>
4118 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4120 2018-06-18 Tom Tromey <tom@tromey.com>
4122 * solib-frv.c (frv_relocate_main_executable): Use
4124 * solib-dsbt.c (dsbt_relocate_main_executable): Use
4127 2018-06-18 Tom Tromey <tom@tromey.com>
4129 * objfiles.h (inhibit_section_map_updates): Update.
4130 (resume_section_map_updates, resume_section_map_updates_cleanup):
4132 * solib-svr4.c (svr4_handle_solib_event): Update.
4133 * objfiles.c (inhibit_section_map_updates): Return
4134 scoped_restore_tmpl<int>.
4135 (resume_section_map_updates, resume_section_map_updates_cleanup):
4138 2018-06-18 Tom Tromey <tom@tromey.com>
4140 * valprint.h (read_string): Update.
4141 * valprint.c (read_string): Change type of "buffer".
4142 (val_print_string): Update.
4143 * python/py-value.c (valpy_string): Update.
4144 * language.h (struct language_defn) <la_get_string>: Change
4146 (default_get_string, c_get_string): Update.
4147 * language.c (default_get_string): Change type of "buffer".
4148 * guile/scm-value.c (gdbscm_value_to_string): Update.
4149 * c-lang.c (c_get_string): Change type of "buffer".
4151 2018-06-18 Tom Tromey <tom@tromey.com>
4153 * ser-mingw.c (struct pipe_state_destroyer): New.
4154 (pipe_state_up): New typedef.
4155 (cleanup_pipe_state): Remove.
4156 (pipe_windows_open): Use pipe_state_up. Don't release argv.
4158 2018-06-18 Tom Tromey <tom@tromey.com>
4160 * rust-lang.h (rust_yyerror): Don't declare.
4161 * rust-lang.c (rust_language_defn): Update.
4162 * rust-exp.y (yyerror): Now static.
4163 * parse.c (parse_exp_in_context_1): Update.
4164 * p-lang.h (p_yyerror): Don't declare.
4165 * p-lang.c (p_language_defn): Update.
4166 * p-exp.y (yyerror): Now static.
4167 * opencl-lang.c (opencl_language_defn): Update.
4168 * objc-lang.c (objc_language_defn): Update.
4169 * m2-lang.h (m2_yyerror): Don't declare.
4170 * m2-lang.c (m2_language_defn): Update.
4171 * m2-exp.y (yyerror): Now static.
4172 * language.h (struct language_defn) <la_error>: Remove.
4173 * language.c (unk_lang_error): Remove.
4174 (unknown_language_defn, auto_language_defn): Remove.
4175 * go-lang.h (go_yyerror): Don't declare.
4176 * go-lang.c (go_language_defn): Update.
4177 * go-exp.y (yyerror): Now static.
4178 * f-lang.h (f_yyerror): Don't declare.
4179 * f-lang.c (f_language_defn): Update.
4180 * f-exp.y (yyerror): Now static.
4181 * d-lang.h (d_yyerror): Don't declare.
4182 * d-lang.c (d_language_defn): Update.
4183 * d-exp.y (yyerror): Now static.
4184 * c-lang.h (c_yyerror): Don't declare.
4185 * c-lang.c (c_language_defn, cplus_language_defn)
4186 (asm_language_defn, minimal_language_defn): Update.
4187 * c-exp.y (yyerror): Now static.
4188 * ada-lang.h (ada_yyerror): Don't declare.
4189 * ada-lang.c (ada_language_defn): Update.
4190 * ada-exp.y (yyerror): Now static.
4192 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4194 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4195 (store_sveregs_to_thread): Likewise.
4196 (aarch64_linux_fetch_inferior_registers): Check for SVE.
4197 (aarch64_linux_store_inferior_registers): Likewise.
4198 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4200 (aarch64_sve_regs_copy_to_regcache): Likewise.
4201 (aarch64_sve_regs_copy_from_regcache): Likewise.
4202 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4204 (aarch64_sve_regs_copy_to_regcache): Likewise.
4205 (aarch64_sve_regs_copy_from_regcache): Likewise.
4206 (sve_context): Structure from Linux headers.
4207 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4208 (SVE_SIG_ZREG_SIZE): Likewise.
4209 (SVE_SIG_PREG_SIZE): Likewise.
4210 (SVE_SIG_FFR_SIZE): Likewise.
4211 (SVE_SIG_REGS_OFFSET): Likewise.
4212 (SVE_SIG_ZREGS_OFFSET): Likewise.
4213 (SVE_SIG_ZREG_OFFSET): Likewise.
4214 (SVE_SIG_ZREGS_SIZE): Likewise.
4215 (SVE_SIG_PREGS_OFFSET): Likewise.
4216 (SVE_SIG_PREG_OFFSET): Likewise.
4217 (SVE_SIG_PREGS_SIZE): Likewise.
4218 (SVE_SIG_FFR_OFFSET): Likewise.
4219 (SVE_SIG_REGS_SIZE): Likewise.
4220 (SVE_SIG_CONTEXT_SIZE): Likewise.
4221 (SVE_PT_REGS_MASK): Likewise.
4222 (SVE_PT_REGS_FPSIMD): Likewise.
4223 (SVE_PT_REGS_SVE): Likewise.
4224 (SVE_PT_VL_INHERIT): Likewise.
4225 (SVE_PT_VL_ONEXEC): Likewise.
4226 (SVE_PT_REGS_OFFSET): Likewise.
4227 (SVE_PT_FPSIMD_OFFSET): Likewise.
4228 (SVE_PT_FPSIMD_SIZE): Likewise.
4229 (SVE_PT_SVE_ZREG_SIZE): Likewise.
4230 (SVE_PT_SVE_PREG_SIZE): Likewise.
4231 (SVE_PT_SVE_FFR_SIZE): Likewise.
4232 (SVE_PT_SVE_FPSR_SIZE): Likewise.
4233 (SVE_PT_SVE_FPCR_SIZE): Likewise.
4234 (__SVE_SIG_TO_PT): Likewise.
4235 (SVE_PT_SVE_OFFSET): Likewise.
4236 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4237 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4238 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4239 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4240 (SVE_PT_SVE_PREG_OFFSET): Likewise.
4241 (SVE_PT_SVE_PREGS_SIZE): Likewise.
4242 (SVE_PT_SVE_FFR_OFFSET): Likewise.
4243 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4244 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4245 (SVE_PT_SVE_SIZE): Likewise.
4246 (SVE_PT_SIZE): Likewise.
4247 (HAS_SVE_STATE): New define.
4249 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4251 * nat/aarch64-sve-linux-sigcontext.h: New file.
4252 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4254 (SVE_VQ_MIN): Likewise.
4255 (SVE_VQ_MAX): Likewise.
4256 (SVE_VL_MIN): Likewise.
4257 (SVE_VL_MAX): Likewise.
4258 (SVE_NUM_ZREGS): Likewise.
4259 (SVE_NUM_PREGS): Likewise.
4260 (sve_vl_valid): Likewise.
4261 (struct user_sve_header): Likewise.
4263 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
4264 Richard Bunt <Richard.Bunt@arm.com>
4266 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4267 was requested by GDB.
4269 2018-06-15 Tom de Vries <tdevries@suse.de>
4271 * MAINTAINERS (Write After Approval): Add Tom de Vries.
4273 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
4275 * gnulib/update-gnulib.sh: Print expected versions of
4278 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
4280 * arch-utils.c (default_type_align): Use type_length_units.
4281 * gdbtypes.c (type_align): Use type_length_units.
4283 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4285 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4286 of 'define' command.
4288 2018-06-14 Tom de Vries <tdevries@suse.de>
4291 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4292 get_no_prettyformat_print_options.
4294 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
4296 * sparc-nat.h: Include target.h.
4297 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4298 <fetch_registers>: Remove this argument in function call.
4299 <store_registers>: Remove this argument in function call, remove
4301 <low_forget_process>: Call sparc64_forget_process instead of
4302 sparc_forget_process.
4304 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4306 * procfs.c (_initialize_procfs): Use add_inf_child_target.
4307 (procfs_target::make_corefile_notes): Adjust to new
4308 target_read_alloc return type.
4310 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4311 Stephen Roberts <stephen.roberts@arm.com>
4314 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4315 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4316 Move should_notify_stop local into more inner scope.
4318 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4319 Stephen Roberts <stephen.roberts@arm.com>
4322 * infrun.c (resume_1): Add call to mark_async_event_handler.
4324 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4326 * infrun.c (do_target_wait): Change old version of $pc printed.
4328 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
4330 * dwarf2read.c (read_index_from_section): Rename to...
4331 (read_gdb_index_from_section): ... this, update all callers.
4332 (dwarf2_read_index): Rename to...
4333 (dwarf2_read_gdb_index): ... this, update all callers.
4335 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
4337 * gdb/hppa-linux-nat.c
4338 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4339 hppa_linux_nat_target::fetch_registers.
4341 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4343 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4344 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4345 (AARCH64_DWARF_SVE_FFR): Likewise.
4346 (AARCH64_DWARF_SVE_P0): Likewise.
4347 (AARCH64_DWARF_SVE_Z0): Likewise.
4349 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4351 * common/common-regcache.h (raw_compare): New function.
4352 * regcache.c (regcache::raw_compare): Likewise.
4353 * regcache.h (regcache::raw_compare): New declaration.
4355 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4357 * common/common-regcache.h (reg_buffer_common): New structure.
4358 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4359 (reg_buffer::raw_supply): Likewise.
4360 (reg_buffer::raw_supply_integer): Likewise.
4361 (reg_buffer::raw_supply_zeroed): Likewise.
4362 (reg_buffer::raw_collect): Likewise.
4363 (reg_buffer::raw_collect_integer): Likewise.
4364 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4365 (reg_buffer::raw_supply): Likewise.
4366 (reg_buffer::raw_supply_integer): Likewise.
4367 (reg_buffer::raw_supply_zeroed): Likewise.
4368 (reg_buffer::raw_collect): Likewise.
4369 (reg_buffer::raw_collect_integer): Likewise.
4371 2018-06-10 Tom Tromey <tom@tromey.com>
4373 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
4374 (class remote_state) <stop_reply_queue>: Now std::vector.
4375 (remote_state::~remote_state)
4376 (remote_target::stop_reply_queue_length): Update.
4377 (struct queue_iter_param, remove_child_of_pending_fork)
4378 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4379 (check_pending_event_prevents_wildcard_vcont_callback)
4380 (remove_stop_reply_for_inferior)
4381 (remove_stop_reply_of_remote_state)
4382 (remote_notif_remove_once_on_match)
4383 (stop_reply_match_ptid_and_ws)
4384 (remote_kill_child_of_pending_fork): Remove.
4385 (remote_target::remove_new_fork_children)
4386 (remote_target::check_pending_events_prevent_wildcard_vcont)
4387 (remote_target::discard_pending_stop_replies)
4388 (remote_target::discard_pending_stop_replies_in_queue)
4389 (remote_target::remote_notif_remove_queued_reply)
4390 (remote_target::queued_stop_reply)
4391 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4392 (remote_target::wait, remote_target::kill_new_fork_children)
4393 (remote_target::async): Update.
4395 2018-06-10 Tom Tromey <tom@tromey.com>
4397 * record-full.c (record_full_arch_list_cleanups): Remove.
4398 (record_full_message): Use try/catch.
4399 (record_full_wait_cleanups): Remove.
4400 (record_full_wait_1): Use try/catch.
4401 (record_full_restore): Likewise.
4403 2018-06-10 Tom Tromey <tom@tromey.com>
4405 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
4406 declare VEC. Add constructor.
4407 <in_target_beneath>: Now bool.
4408 (record_full_breakpoints): Now a std::vector, static.
4409 (record_full_sync_record_breakpoints)
4410 (record_full_init_record_breakpoints)
4411 (record_full_target::insert_breakpoint)
4412 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
4414 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
4416 * dwarf2read.c (process_cu_includes): Remove struct keyword.
4417 * serial.c (serial_interface_lookup): Remove struct keyword.
4419 2018-06-10 Tom Tromey <tom@tromey.com>
4421 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4423 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4425 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4427 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4428 "beneath" as a method.
4429 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4430 Use "beneath" as a method.
4432 2018-06-10 Tom Tromey <tom@tromey.com>
4434 * tracefile.c (struct trace_file_writer_deleter): New.
4435 <operator()>: Rename from trace_file_writer_xfree.
4436 (trace_file_writer_up): New typedef.
4437 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4439 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4441 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4442 <m_registers, m_register_status>: Change type to
4444 * regcache.c (reg_buffer::reg_buffer): Use new instead of
4447 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4449 * common/common-regcache.h (enum register_status): Add
4450 underlying type "signed char".
4451 * regcache.h (reg_buffer) <m_register_status>: Change type to
4453 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4454 register_status instead of signed char.
4455 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4456 (reg_buffer::get_register_status): Remove cast.
4457 (readable_regcache::raw_read): Remove cast.
4458 (readable_regcache::cooked_read): Remove cast.
4460 2018-06-09 Tom Tromey <tom@tromey.com>
4462 * source.c (reverse_search_command, forward_search_command): Use
4465 2018-06-09 Tom Tromey <tom@tromey.com>
4467 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
4468 (serial_ops_list): Now static, std::vector.
4469 (serial_interface_lookup, serial_add_interface): Update.
4471 2018-06-09 Tom Tromey <tom@tromey.com>
4473 * dwarf2read.c (process_cu_includes): Update.
4474 (process_full_comp_unit): Update.
4475 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4478 2018-06-08 Paul Koning <paul_koning@dell.com>
4482 * python/python.c (do_start_initialization):
4483 Avoid call to internal Python API.
4484 (init__gdb_module): New function.
4486 2018-06-08 Gary Benson <gbenson@redhat.com>
4488 * linux-thread-db.c (valprint.h): New include.
4489 (struct check_thread_db_info): New structure.
4490 (check_thread_db_on_load, tdb_testinfo): New static globals.
4491 (check_thread_db, check_thread_db_callback): New functions.
4492 (try_thread_db_load_1): Run integrity checks if requested.
4493 (maintenance_check_libthread_db): New function.
4494 (_initialize_thread_db): Register "maint check libthread-db"
4495 and "maint set/show check-libthread-db".
4496 * NEWS: Mention the above new commands.
4498 2018-06-08 Tom Tromey <tom@tromey.com>
4500 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4503 2018-06-08 Tom Tromey <tom@tromey.com>
4505 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4507 2018-06-08 Tom Tromey <tom@tromey.com>
4509 * common/btrace-common.h (struct btrace_data): Add constructor,
4510 destructor, move assignment operator.
4511 <empty, clear, fini>: New methods.
4512 <format>: Initialize.
4513 (btrace_data_init, btrace_data_fini, btrace_data_clear)
4514 (btrace_data_empty): Don't declare.
4515 * common/btrace-common.c (btrace_data_init): Remove.
4516 (btrace_data::fini): Rename from btrace_data_fini.
4517 (btrace_data::empty): Rename from btrace_data_empty.
4518 (btrace_data::clear): Rename from btrace_data_clear. Return
4520 * btrace.h (make_cleanup_btrace_data): Don't declare.
4521 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4522 (parse_xml_btrace): Update.
4523 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4524 (maint_btrace_clear_packet_history_cmd): Update.
4526 2018-06-07 Pedro Alves <palves@redhat.com>
4528 * target.h (target_ops) <beneath>: Now a method. All references
4530 (class target_stack): New.
4531 * target.c (g_target_stack): New.
4532 (g_current_top_target): Delete.
4533 (current_top_target): Get the top target out of g_target_stack.
4534 (target_stack::push, target_stack::unpush): New.
4535 (push_target, unpush_target): Reimplement.
4536 (target_is_pushed): Reimplement in terms of g_target_stack.
4537 (target_ops::beneath, target_stack::find_beneath): New.
4539 2018-06-07 Pedro Alves <palves@redhat.com>
4541 * target.h (find_target_beneath): Delete declaration.
4542 * target.c (find_target_beneath): Delete definition.
4543 * aix-thread.c: All callers of find_target_beneath adjusted to
4544 call target_ops::beneath instead.
4545 * bsd-uthread.c: Likewise.
4546 * linux-thread-db.c: Likewise.
4547 * ravenscar-thread.c: Likewise.
4548 * sol-thread.c: Likewise.
4549 * spu-multiarch.c: Likewise.
4551 2018-06-07 Pedro Alves <palves@redhat.com>
4553 * target.h (target_ops) <beneath>: Now a method. All references
4555 (target_ops) <m_beneath>: New.
4556 * target.c (target_ops::beneath): New.
4557 * corelow.c: Adjust all references to target_ops::beneath.
4558 * linux-thread-db.c: Likewise.
4559 * make-target-delegates: Likewise.
4560 * record-btrace.c: Likewise.
4561 * record-full.c: Likewise.
4562 * remote.c: Likewise.
4563 * target.c: Likewise.
4564 * target-delegates.c: Regenerate.
4566 2018-06-07 Pedro Alves <palves@redhat.com>
4568 * target.h (target_stack): Delete.
4569 (current_top_target): Declare function.
4570 * target.c (target_stack): Delete.
4571 (g_current_top_target): New.
4572 (current_top_target): New function.
4573 * auxv.c: Use current_top_target instead of target_stack
4575 * avr-tdep.c: Likewise.
4576 * breakpoint.c: Likewise.
4577 * corefile.c: Likewise.
4578 * elfread.c: Likewise.
4580 * exceptions.c: Likewise.
4581 * frame.c: Likewise.
4582 * gdbarch-selftests.c: Likewise.
4583 * gnu-v3-abi.c: Likewise.
4584 * ia64-tdep.c: Likewise.
4585 * ia64-vms-tdep.c: Likewise.
4586 * infcall.c: Likewise.
4587 * infcmd.c: Likewise.
4588 * infrun.c: Likewise.
4589 * linespec.c: Likewise.
4590 * linux-tdep.c: Likewise.
4591 * minsyms.c: Likewise.
4592 * ppc-linux-nat.c: Likewise.
4593 * ppc-linux-tdep.c: Likewise.
4594 * procfs.c: Likewise.
4595 * regcache.c: Likewise.
4596 * remote.c: Likewise.
4597 * rs6000-tdep.c: Likewise.
4598 * s390-linux-nat.c: Likewise.
4599 * s390-tdep.c: Likewise.
4600 * solib-aix.c: Likewise.
4601 * solib-darwin.c: Likewise.
4602 * solib-dsbt.c: Likewise.
4603 * solib-spu.c: Likewise.
4604 * solib-svr4.c: Likewise.
4605 * solib-target.c: Likewise.
4606 * sparc-tdep.c: Likewise.
4607 * sparc64-tdep.c: Likewise.
4608 * spu-tdep.c: Likewise.
4609 * symfile.c: Likewise.
4610 * symtab.c: Likewise.
4611 * target-descriptions.c: Likewise.
4612 * target-memory.c: Likewise.
4613 * target.c: Likewise.
4614 * target.h: Likewise.
4615 * tracefile-tfile.c: Likewise.
4616 * tracepoint.c: Likewise.
4617 * valops.c: Likewise.
4618 * valprint.c: Likewise.
4619 * value.c: Likewise.
4620 * windows-tdep.c: Likewise.
4621 * mi/mi-main.c: Likewise.
4623 2018-06-07 Tom Tromey <tom@tromey.com>
4625 * valprint.h (build_address_symbolic): Declare.
4626 * printcmd.c (print_address_symbolic): Update.
4627 (build_address_symbolic): Change "name" and "filename" to
4629 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4631 * defs.h (build_address_symbolic): Remove declaration.
4633 2018-06-07 Alan Hayward <alan.hayward@arm.com>
4635 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4636 (aarch64_vnv_type): Add function.
4637 (aarch64_pseudo_register_name): Add V regs for SVE.
4638 (aarch64_pseudo_register_type): Likewise.
4639 (aarch64_pseudo_register_reggroup_p): Likewise.
4640 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4641 (aarch64_pseudo_read_value): Add V regs for SVE.
4642 (aarch64_pseudo_write_2): Use V0 offset for SVE
4643 (aarch64_pseudo_write): Add V regs for SVE.
4644 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4646 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
4648 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4649 (sve_vl_from_vq): Likewise.
4651 2018-06-05 Tom Tromey <tom@tromey.com>
4653 * cli/cli-cmds.c (show_version): Update.
4654 * top.c (print_gdb_version): Add "interactive" parameter.
4656 * main.c (captured_main_1): Update.
4657 * top.h (print_gdb_version): Add "interactive" parameter and a
4660 2018-06-05 David Malcolm <dmalcolm@redhat.com>
4662 * common/enum-flags.h: Add trailing semicolon to example in
4665 2018-06-05 Tom Tromey <tom@tromey.com>
4668 * NEWS: Add entry about pager.
4669 * utils.c (pagination_disabled_for_command): New global.
4670 (prompt_for_continue): Allow "c" response to prompt.
4671 (reinitialize_more_filter): Clear
4672 pagination_disabled_for_command.
4673 (fputs_maybe_filtered): Check pagination_disabled_for_command.
4675 2018-06-04 Tom Tromey <tom@tromey.com>
4677 * ada-lang.h (ada_lookup_symbol_list): Update.
4678 * ada-lang.c (resolve_subexp): Update.
4679 (symbols_are_identical_enums): Change type of syms. Remove nsyms
4681 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4682 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4683 results parameter to std::vector.
4684 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4686 * ada-exp.y (block_lookup): Update.
4687 (select_possible_type_sym): Change type of syms. Remove nsyms
4689 (write_var_or_type, write_name_assoc): Update.
4691 2018-06-04 Joel Brobecker <brobecker@adacore.com>
4693 * windows-nat.c (windows_nat_target::xfer_partial): Return
4694 TARGET_XFER_E_IO if we need to delegate to the target beneath
4695 but BENEATH is NULL.
4697 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
4699 * Makefile.in (config.status): Add configure.nat as a
4702 2018-06-04 Tom Tromey <tom@tromey.com>
4704 * cp-name-parser.y (cpname_state): Add method declarations.
4705 (HANDLE_QUAL): Update.
4706 (cpname_state::d_grab, cpname_state::fill_comp)
4707 (cpname_state::make_operator, cpname_state::make_dtor)
4708 (cpname_state::make_builtin_type, cpname_state::make_name)
4709 (cpname_state::d_qualify, cpname_state::d_int_type)
4710 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4711 (%union): Move earlier.
4713 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4715 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4717 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4719 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4720 (aarch64_pseudo_write_1): Likewise.
4721 (aarch64_pseudo_read_value): Use helper.
4722 (aarch64_pseudo_write): Likewise.
4724 2018-06-04 Pedro Alves <palves@redhat.com>
4726 * darwin-nat.c (darwin_ops): Delete.
4727 (darwin_attach_pid): Use get_native_target.
4729 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4731 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4732 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4734 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4736 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4737 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4738 (aarch64_gdbarch_init): Check for SVE.
4739 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4741 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4743 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4744 * aarch64-tdep.h (aarch64_read_description): Likewise.
4745 * arch/aarch64.c (aarch64_create_target_description): Likewise.
4746 * arch/aarch64.h (aarch64_create_target_description): Likewise.
4747 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4748 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4749 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4751 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
4753 * value.c (value_fetch_lazy_bitfield): New.
4754 (value_fetch_lazy_memory): New.
4755 (value_fetch_lazy_register): New.
4756 (value_fetch_lazy): Factor out to smaller functions.
4758 2018-06-01 Tom Tromey <tom@tromey.com>
4760 * cp-name-parser.y (backslashable, represented): Now const.
4762 2018-06-01 Tom Tromey <tom@tromey.com>
4764 * cp-name-parser.y: Include parser-defs.h.
4765 (parser_fprintf): Remove declaration.
4767 2018-06-01 Tom Tromey <tom@tromey.com>
4769 * cp-name-parser.y: Use %pure-parser, %lex-param, and
4771 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4772 (global_result): Remove globals.
4773 (struct cpname_state): New.
4774 (yyparse): Don't declare.
4775 (yylex, yyerror): Move declarations after %union.
4776 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4777 (make_name): Add state parameter.
4779 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4781 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4783 (yylex): Add lvalp, state parameters.
4784 (yyerror): Add state parameter.
4785 (cp_demangled_name_to_comp): Update.
4787 2018-06-01 Tom Tromey <tom@tromey.com>
4789 * cp-name-parser.y (parser_fprintf): Declare.
4790 (GDB_YY_REMAP_PREFIX): Define.
4791 Include yy-remap.h. Don't redefine yy* identifiers.
4793 2018-06-01 Tom Tromey <tom@tromey.com>
4795 * python/py-type.c (typy_legacy_template_argument): Update.
4796 * cp-support.h (cp_demangled_name_to_comp): Update.
4797 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4798 parameter to be a "std::string *".
4801 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
4803 * ada-lex.l: Include "diagnostics.h" instead of
4804 "common/diagnostics.h".
4805 * unittests/environ-selftests.c: Likewise.
4806 * common/diagnostics.h: Moved to ../include.
4808 2018-06-01 Joel Brobecker <brobecker@adacore.com>
4810 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4811 to language_mode_manual while calling breakpoint_re_set_one.
4813 2018-06-01 Tom Tromey <tom@tromey.com>
4815 * valops.c (value_cast_structs, destructor_name_p): Update.
4816 * symtab.c (gdb_mangle_name): Update.
4817 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4819 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4820 (pascal_object_print_value_fields, pascal_object_print_value):
4822 * p-typeprint.c (pascal_type_print_derivation_info): Update.
4823 * linespec.c (find_methods): Update.
4824 * gdbtypes.h (type_name_no_tag): Remove.
4825 (type_name_or_error): Rename from type_name_no_tag_or_error.
4826 * gdbtypes.c (type_name_no_tag): Remove.
4827 (type_name_or_error): Rename from type_name_no_tag_or_error.
4828 (lookup_struct_elt_type, check_typedef): Update.
4829 * expprint.c (print_subexp_standard): Update.
4830 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4831 * d-namespace.c (d_lookup_nested_symbol): Update.
4832 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4833 (cp_print_class_member): Update.
4834 * cp-namespace.c (cp_lookup_nested_symbol): Update.
4835 * completer.c (add_struct_fields): Update.
4836 * c-typeprint.c (cp_type_print_derivation_info)
4837 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4839 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4840 (ada_prefer_type, ada_is_exception_sym): Update.
4842 2018-06-01 Tom Tromey <tom@tromey.com>
4844 * valops.c (enum_constant_from_type, value_namespace_elt)
4845 (value_maybe_namespace_elt): Update.
4846 * valarith.c (find_size_for_pointer_math): Update.
4847 * target-descriptions.c (make_gdb_type): Update.
4848 * symmisc.c (print_symbol): Update.
4849 * stabsread.c (define_symbol, read_type)
4850 (complain_about_struct_wipeout, add_undefined_type)
4851 (cleanup_undefined_types_1): Update.
4852 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4853 (rust_range_type_p, val_print_struct, rust_print_struct_def)
4854 (rust_internal_print_type, rust_composite_type)
4855 (rust_evaluate_funcall, rust_evaluate_subexp)
4856 (rust_inclusive_range_type_p): Update.
4857 * python/py-type.c (typy_get_tag): Update.
4858 * p-typeprint.c (pascal_type_print_base): Update.
4859 * mdebugread.c (parse_symbol, parse_type): Update.
4860 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4862 * guile/scm-type.c (gdbscm_type_tag): Update.
4863 * go-lang.c (sixg_string_p): Update.
4864 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4866 * gdbtypes.h (struct main_type) <tag_name>: Remove.
4867 (TYPE_TAG_NAME): Remove.
4868 * gdbtypes.c (type_name_no_tag): Simplify.
4869 (check_typedef, check_types_equal, recursive_dump_type)
4870 (copy_type_recursive, arch_composite_type): Update.
4871 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
4872 in summary mode when needed.
4873 * eval.c (evaluate_funcall): Update.
4874 * dwarf2read.c (fixup_go_packaging, read_structure_type)
4875 (process_structure_scope, read_enumeration_type)
4876 (read_namespace_type, read_module_type, determine_prefix): Update.
4877 * cp-support.c (inspect_type): Update.
4878 * coffread.c (process_coff_symbol, decode_base_type): Update.
4879 * c-varobj.c (c_is_path_expr_parent): Update.
4880 * c-typeprint.c (c_type_print_base_struct_union): Update.
4881 (c_type_print_base_1): Update. Print struct/class/union/enum in
4882 summary when using C language.
4883 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4884 (gen_maybe_namespace_elt): Update.
4885 * ada-lang.c (ada_type_name): Simplify.
4886 (empty_record, ada_template_to_fixed_record_type_1)
4887 (template_to_static_fixed_type)
4888 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4890 2018-06-01 Tom Tromey <tom@tromey.com>
4892 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4894 * c-typeprint.c (c_print_type_1): Add "language" parameter.
4895 (c_print_type): Update.
4896 (c_print_type): New overload.
4897 (c_type_print_varspec_prefix, c_type_print_args)
4898 (c_type_print_varspec_suffix, c_print_type_no_offsets)
4899 (c_type_print_base_struct_union, c_type_print_base_1)
4900 (cp_type_print_method_args): Add "language" parameter.
4901 (c_type_print_base): Update.
4902 * c-lang.h (c_print_type): Add new overload.
4904 2018-06-01 Tom Tromey <tom@tromey.com>
4906 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4907 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4909 2018-06-01 Alan Hayward <alan.hayward@arm.com>
4911 * aarch64-tdep.c (aarch64_sve_register_names): New const
4913 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4914 (AARCH64_SVE_Z_REGS_NUM): New define.
4915 (AARCH64_SVE_P_REGS_NUM): Likewise.
4916 (AARCH64_SVE_NUM_REGS): Likewise.
4918 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4920 * nat/linux-ptrace.h [__alpha__]
4921 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4924 2018-05-31 Maciej W. Rozycki <macro@mips.com>
4926 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4927 the endianness selected.
4928 * NEWS: Document `set endian auto' mode operation update.
4930 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4932 * Makefile.in: Add new header.
4933 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4934 (sve_vl_from_vg): Likewise.
4935 (sve_vq_from_vl): Likewise.
4936 (sve_vl_from_vq): Likewise.
4937 (sve_vq_from_vg): Likewise.
4938 (sve_vg_from_vq): Likewise.
4939 * configure.nat: Add new c file.
4940 * nat/aarch64-sve-linux-ptrace.c: New file.
4941 * nat/aarch64-sve-linux-ptrace.h: New file.
4943 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4945 * aarch64-linux-nat.c (aarch64_linux_read_description):
4947 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4949 * aarch64-tdep.c (tdesc_aarch64_list): Add.
4950 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4951 (aarch64_gdbarch_init): Add parmeter zero.
4952 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4953 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4954 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4956 * doc/gdb.texinfo: Describe SVE feature
4957 * features/aarch64-sve.c: New file.
4959 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
4962 * gdbarch.sh (significant_addr_bit): Default to zero when
4963 not set by target architecture.
4964 * gdbarch.c: Re-generated.
4965 * utils.c (address_significant): Update.
4967 2018-05-30 Joel Brobecker <brobecker@adacore.com>
4969 * stack.c (func_command): Remove trailing newline in call to error.
4971 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4973 * regcache.h (regcache_raw_collect): Remove, update callers to
4974 use regcache::raw_collect.
4975 * regcache.c (regcache_raw_collect): Remove.
4977 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4979 * regcache.h (regcache_raw_supply): Remove, update callers to
4980 use detached_regcache::raw_supply.
4981 * regcache.c (regcache_raw_supply): Remove.
4983 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4985 * regcache.h (regcache_cooked_write_part): Remove, update
4986 callers to use regcache::cooked_write_part.
4987 * regcache.c (regcache_cooked_write_part): Remove.
4989 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4991 * regcache.h (regcache_cooked_read_part): Remove, update callers
4992 to use readable_regcache::cooked_read_part.
4993 * regcache.c (regcache_cooked_read_part): Remove.
4995 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4997 * regcache.h (regcache_cooked_read_value): Remove, update
4998 callers to use readable_regcache::cooked_read_value.
4999 * regcache.c (regcache_cooked_read_value): Remove.
5001 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5003 * regcache.h (regcache_cooked_write): Remove, update callers to
5004 use regcache::cooked_write.
5005 * regcache.c (regcache_cooked_write): Remove.
5007 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5009 * regcache.h (regcache_invalidate): Remove, update callers to
5010 use detached_regcache::invalidate instead.
5011 * regcache.c (regcache_invalidate): Remove.
5013 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5015 * regcache.h (regcache_raw_write_part): Remove, update callers
5016 to use regcache::raw_write_part instead.
5017 * regcache.c (regcache_raw_write_part): Remove.
5019 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5021 * regcache.h (regcache_raw_read_part): Remove, update callers to
5022 use readable_regcache::raw_read_part instead.
5023 * regcache.c (regcache_raw_read_part): Remove.
5025 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5027 * regcache.h (regcache_cooked_read): Remove, update callers to
5028 use readable_regcache::cooked_read instead.
5029 * regcache.c (regcache_cooked_read): Remove.
5031 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5033 * regcache.h (regcache_raw_write): Remove, update callers to use
5034 regcache::raw_write instead.
5035 * regcache.c (regcache_raw_write): Remove.
5037 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5039 * regcache.h (regcache_raw_read): Remove, update callers to use
5040 readable_regcache::raw_read instead.
5041 * regcache.c (regcache_raw_read): Remove.
5043 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5045 * regcache.h (regcache_raw_update): Remove, update callers to
5046 use readable_regcache::raw_update instead.
5047 * regcache.c (regcache_raw_update): Remove.
5049 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5051 * regcache.h (regcache_register_status): Remove, update callers
5052 to use reg_buffer::get_register_status directly instead.
5053 * regcache.c (regcache_register_status): Remove.
5055 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5057 * regcache.h (regcache_get_ptid): Remove, update all callers to
5058 call regcache::ptid instead.
5059 * regcache.c (regcache_get_ptid): Remove.
5061 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5063 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5065 2018-05-30 Pedro Alves <palves@redhat.com>
5067 * common/common-exceptions.h (exception_rethrow): Use
5070 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
5072 * breakpoint.c (print_solib_event, check_status_catch_solib):
5073 Remove struct keyword in range-based for loops.
5074 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5075 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5077 * linespec.c (find_superclass_methods, search_minsyms_for_name):
5079 * symfile.c (addr_info_make_relative): Likewise.
5080 * thread.c (value_in_thread_stack_temporaries): Likewise.
5082 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
5085 * valops.c (value_struct_elt_for_reference): Call check_typedef on
5086 aggregate type to get its real type before accessing it.
5088 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
5090 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5091 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5092 * coff-pe-read.c (add_pe_forwarded_sym): Replace
5093 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5094 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5095 * jit.c (jit_breakpoint_re_set_internal): Likewise.
5096 * printcmd.c (info_address_command): Likewise.
5098 2018-05-29 Tom Tromey <tom@tromey.com>
5100 * windows-nat.c (handle_exception): Update fall-through comment.
5102 2018-05-29 Tom Tromey <tom@tromey.com>
5104 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
5105 (struct program_space) <added_solibs>: Now a std::vector.
5106 * breakpoint.c (print_solib_event): Update.
5107 (check_status_catch_solib): Update.
5108 * progspace.c (clear_program_space_solib_cache): Update.
5109 * solib.c (update_solib_list): Update.
5111 2018-05-29 Tom Tromey <tom@tromey.com>
5113 * python/py-type.c (typy_richcompare): Update.
5114 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5115 * gdbtypes.h (types_deeply_equal): Return bool.
5116 (types_equal): Likewise.
5117 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
5119 (check_types_equal): Change worklist to std::vector. Return
5121 (struct type_equality_entry): Add constructor.
5122 (compare_maybe_null_strings): Return bool.
5123 (check_types_worklist): Return bool. Change worklist to
5125 (types_deeply_equal): Use std::vector.
5126 (types_equal): Return bool.
5127 (compare_maybe_null_strings): Simplify.
5129 2018-05-29 Tom Tromey <tom@tromey.com>
5131 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
5133 2018-05-29 Tom Tromey <tom@tromey.com>
5135 * objc-lang.h: Don't include cp-support.h.
5136 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
5139 2018-05-27 Tom Tromey <tom@tromey.com>
5141 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5143 2018-05-25 Tom Tromey <tom@tromey.com>
5145 * value.c (value::location): Initialize.
5147 2018-05-25 Tom Tromey <tom@tromey.com>
5149 * dbxread.c (init_bincl_list): Remove.
5150 (bincl_list): Now a std::vector.
5151 (bincls_allocated, next_bincl): Remove.
5152 (free_bincl_list, do_free_bincl_list_cleanup)
5153 (make_cleanup_free_bincl_list): Remove.
5154 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5156 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5157 (struct header_file_location): Add constructor.
5158 (add_bincl_to_list): Remove.
5160 2018-05-25 Tom Tromey <tom@tromey.com>
5162 * tui/tui.c (tui_enable): Update.
5163 * mi/mi-interp.c (mi_interp::init): Update.
5164 * interps.h (class interp) <name>: New method.
5165 <m_name>: Rename from name.
5166 (~scoped_restore_interp): Update.
5167 * interps.c (interp::interp): Update.
5168 (interp_add, interp_set, interp_lookup_existing)
5169 (current_interp_named_p): Update.
5171 2018-05-25 Tom Tromey <tom@tromey.com>
5173 * interps.c (interp_name): Remove.
5174 * mi/mi-interp.c (mi_interp::init): Update.
5175 * interps.h (interp_name): Remove.
5176 (~scoped_restore_interp): Update.
5177 * tui/tui.c (tui_enable): Update.
5179 2018-05-25 Tom Tromey <tom@tromey.com>
5181 * utils.c (fputs_maybe_filtered): Update.
5182 * linespec.c (decode_line_full): Update.
5183 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5184 (mi_print_breakpoint_for_event, mi_solib_loaded)
5185 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5186 (mi_user_selected_context_changed): Update.
5187 * mi/mi-main.c (mi_execute_command): Update.
5188 * cli/cli-script.c (execute_control_command): Update.
5189 * python/python.c (execute_gdb_command): Update.
5190 * solib.c (info_sharedlibrary_command): Update.
5191 * interps.c (interp_ui_out): Remove.
5192 * interps.h (interp_ui_out): Remove.
5194 2018-05-25 Tom Tromey <tom@tromey.com>
5196 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5197 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5198 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5200 2018-05-25 Tom Tromey <tom@tromey.com>
5202 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5203 * interps.c (interp_exec): Use scoped_restore.
5205 2018-05-25 Tom Tromey <tom@tromey.com>
5207 * remote.c (remote_target::remote_file_get): Use
5209 (remote_target::remote_file_put): Likewise.
5211 2018-05-25 Tom Tromey <tom@tromey.com>
5213 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5215 (get_pe_section_index, add_pe_exported_sym): Update.
5216 (read_pe_exported_syms): Use gdb::def_vector.
5218 2018-05-25 Tom Tromey <tom@tromey.com>
5220 * frame.c (remove_prev_frame): Remove.
5221 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5223 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5225 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5227 * mips-linux-nat.c (supply_fpregset): Always call
5228 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5229 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5230 `mips_fill_fpregset'.
5231 * mips-linux-tdep.c (mips_supply_fpregset)
5232 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5233 (mips_fill_fpregset_wrapper): Remove functions.
5234 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5235 (mips_linux_fpregset): Remove variable.
5236 (mips_linux_iterate_over_regset_sections): Use
5237 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5238 (mips_linux_o32_sigframe_init): Remove comment.
5240 2018-05-25 Pedro Alves <palves@redhat.com>
5242 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5243 (struct readahead_cache, struct packet_reg, struct
5244 remote_arch_state, class remote_state): Move higher up in the
5246 (remote_target::m_remote_state): Now an object instead of a pointer.
5247 (remote_target::get_remote_state): Adjust.
5249 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5251 * stack.c (select_and_print_frame): Delete.
5252 (struct function_bounds): Move struct within function.
5253 (func_command): Most content moved into new function
5254 find_frame_for_function, use new function, print result, add
5256 (find_frame_for_function): New function, now returns a result.
5258 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5260 * stack.c (iterate_over_block_arg_vars): Fix comment.
5261 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5263 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5267 (scoped_restore_selected_frame::scoped_restore_selected_frame):
5269 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5271 * frame.h (class scoped_restore_selected_frame): New class.
5272 * stack.c (print_frame_local_vars): Remove catching and rethrowing
5273 of any exception, use scoped_restore_selected_frame to restore the
5276 2018-05-24 Pedro Alves <palves@redhat.com>
5278 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5281 2018-05-23 Tom Tromey <tom@tromey.com>
5283 * complaints.c (struct complaints): Remove.
5284 (symfile_complaint_book): Remove.
5285 (series): New global.
5286 (complaint_internal): Update.
5287 (clear_complaints): Update.
5289 2018-05-23 Tom Tromey <tom@tromey.com>
5291 * complaints.c (counters): New global.
5292 (struct complain): Remove.
5293 (struct complaints) <root>: Remove.
5294 (complaint_sentinel): Remove.
5295 (symfile_complaint_book): Update.
5296 (find_complaint) Remove.
5297 (complaint_internal, clear_complaints): Update.
5299 2018-05-23 Tom Tromey <tom@tromey.com>
5301 * complaints.c (struct complain) <file, line>: Remove.
5302 (find_complaint): Remove file, line parameters.
5303 (complaint_internal): Update.
5305 2018-05-23 Tom Tromey <tom@tromey.com>
5307 * complaints.c (vcomplaint): Remove.
5308 (complaint_internal) Merge in contents of vcomplaint.
5310 2018-05-23 Tom Tromey <tom@tromey.com>
5312 * complaints.c (struct complaints) <explanation>: Remove.
5313 (symfile_explanations): Remove.
5314 (symfile_complaint_book): Update.
5315 (vcomplaint): Update.
5316 (struct explanation): Remove.
5318 2018-05-23 Tom Tromey <tom@tromey.com>
5320 * complaints.c (symfile_complaints): Remove.
5321 (complaint_internal): Remove "complaints" parameter.
5322 (clear_complaints, vcomplaint): Remove "c" parameter.
5323 (get_complaints): Remove.
5324 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5325 (dwarf2_debug_line_missing_file_complaint)
5326 (dwarf2_debug_line_missing_end_sequence_complaint)
5327 (dwarf2_complex_location_expr_complaint)
5328 (dwarf2_const_value_length_mismatch_complaint)
5329 (dwarf2_section_buffer_overflow_complaint)
5330 (dwarf2_macro_malformed_definition_complaint)
5331 (dwarf2_invalid_attrib_class_complaint)
5332 (create_addrmap_from_index, dw2_symtab_iter_next)
5333 (dw2_expand_marked_cus)
5334 (dw2_debug_names_iterator::find_vec_in_debug_names)
5335 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5336 (create_debug_type_hash_table, init_cutu_and_read_dies)
5337 (partial_die_parent_scope, add_partial_enumeration)
5338 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5339 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5340 (read_import_statement, read_file_scope, create_dwo_cu_reader)
5341 (create_cus_hash_table, create_dwp_hash_table)
5342 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5343 (dwarf2_rnglists_process, dwarf2_ranges_process)
5344 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5345 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5346 (handle_struct_member_die, process_structure_scope)
5347 (read_array_type, read_common_block, read_module_type)
5348 (read_tag_pointer_type, read_typedef, read_base_type)
5349 (read_subrange_type, load_partial_dies, partial_die_info::read)
5350 (partial_die_info::read, partial_die_info::read)
5351 (partial_die_info::read, read_checked_initial_length_and_offset)
5352 (dwarf2_string_attr, read_formatted_entries)
5353 (dwarf_decode_line_header)
5354 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5355 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5356 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5357 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5358 (get_signatured_type, get_DW_AT_signature_type)
5359 (decode_locdesc, file_file_name, consume_improper_spaces)
5360 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5361 (dwarf_decode_macro_bytes, dwarf_decode_macros)
5362 (dwarf2_symbol_mark_computed, set_die_type)
5363 (read_attribute_value): Update.
5364 * stap-probe.c (handle_stap_probe, get_stap_base_address):
5366 * dbxread.c (unknown_symtype_complaint)
5367 (lbrac_mismatch_complaint, repeated_header_complaint)
5368 (set_namestring, function_outside_compilation_unit_complaint)
5369 (read_dbx_symtab, process_one_symbol): Update.
5370 * gdbtypes.c (stub_noname_complaint): Update.
5371 * windows-nat.c (handle_unload_dll): Update.
5372 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5373 (decode_base_type): Update.
5374 * xcoffread.c (bf_notfound_complaint, ef_complaint)
5375 (eb_complaint, record_include_begin, record_include_end)
5376 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5377 (process_xcoff_symbol, read_symbol)
5378 (function_outside_compilation_unit_complaint)
5379 (scan_xcoff_symtab): Update.
5380 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5381 * buildsym.c (finish_block_internal, make_blockvector)
5382 (end_symtab_get_static_block, augment_type_symtab): Update.
5383 * dtrace-probe.c (dtrace_process_dof)
5384 (dtrace_static_probe_ops::get_probes): Update.
5385 * complaints.h (struct complaint): Don't declare.
5386 (symfile_complaints): Remove.
5387 (complaint_internal): Remove "complaints" parameter.
5388 (complaint): Likewise.
5389 (clear_complaints): Likewise.
5390 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5391 (reread_symbols): Update.
5392 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5393 (dwarf2_frame_cache, decode_frame_entry): Update.
5394 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5395 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5396 (info_selectors_command): Update.
5397 * macrotab.c (macro_include, check_for_redefinition)
5398 (macro_undef): Update.
5399 * objfiles.c (filter_overlapping_sections): Update.
5400 * stabsread.c (invalid_cpp_abbrev_complaint)
5401 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5402 (define_symbol, error_type, read_type, rs6000_builtin_type)
5403 (stabs_method_name_from_physname, read_member_functions)
5404 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5405 (attach_fields_to_type, complain_about_struct_wipeout)
5406 (read_range_type, read_args, common_block_start)
5407 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5409 * mdebugread.c (index_complaint, unknown_ext_complaint)
5410 (basic_type_complaint, bad_tag_guess_complaint)
5411 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5412 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5413 (parse_procedure, parse_lines)
5414 (function_outside_compilation_unit_complaint)
5415 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5416 (bad_tag_guess_complaint, reg_value_complaint): Update.
5417 * cp-support.c (demangled_name_complaint): Update.
5418 * macroscope.c (sal_macro_scope): Update.
5419 * dwarf-index-write.c (class debug_names): Update.
5421 2018-05-23 Tom Tromey <tom@tromey.com>
5423 * complaints.c (clear_complaints): Remove "noisy" parameter.
5424 * complaints.h (clear_complaints): Update.
5425 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5426 (reread_symbols): Update.
5428 2018-05-23 Tom Tromey <tom@tromey.com>
5430 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5432 (vcomplaint, clear_complaints): Update.
5433 (symfile_explanations): Remove some messages.
5435 2018-05-23 Tom Tromey <tom@tromey.com>
5437 * complaints.c (internal_complaint): Remove.
5438 * complaints.h (internal_complaint): Remove.
5440 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5442 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5444 2018-05-22 Pedro Alves <palves@redhat.com>
5446 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5447 (remote_fileio_badfd, remote_fileio_return_errno)
5448 (remote_fileio_return_success, remote_fileio_func_open)
5449 (remote_fileio_func_open, remote_fileio_func_close)
5450 (remote_fileio_func_read, remote_fileio_func_write)
5451 (remote_fileio_func_lseek, remote_fileio_func_rename)
5452 (remote_fileio_func_unlink, remote_fileio_func_stat)
5453 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5454 (remote_fileio_func_isatty, remote_fileio_func_system): Add
5455 remote_target parameter.
5456 (remote_fio_func_map) <func>: Add remote_target parameter.
5457 (do_remote_fileio_request, remote_fileio_request):
5458 * remote-fileio.h (remote_fileio_request):
5459 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5460 remote_target parameter.
5461 (remote_notif_process, handle_notification): Adjust to pass down
5463 (remote_notif_state_allocate): Add remote_target parameter. Save
5465 * remote-notif.h (struct remote_target): Forward declare.
5466 (struct notif_client) <parse, ack, can_get_pending_events>: Add
5467 remote_target parameter.
5468 (struct remote_notif_state) <remote>: New field.
5469 (remote_notif_ack, remote_notif_parse): Add remote_target
5471 (remote_notif_state_allocate, remote_notif_state_allocate): Add
5472 remote_target parameter.
5473 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5474 (threads_listing_context, rmt_thread_action, protocol_feature)
5475 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5476 (packet_result, struct threads_listing_context, remote_state):
5477 Move definitions and declarations higher up.
5478 (remote_target) <~remote_target>: Declare.
5479 (remote_download_command_source, remote_file_put, remote_file_get)
5480 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5481 (remote_hostio_pread_vFile, remote_hostio_send_command)
5482 (remote_hostio_set_filesystem, remote_hostio_open)
5483 (remote_hostio_close, remote_hostio_unlink, remote_state)
5484 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5485 (get_memory_write_packet_size, get_memory_read_packet_size)
5486 (append_pending_thread_resumptions, remote_detach_1)
5487 (append_resumption, remote_resume_with_vcont)
5488 (add_current_inferior_and_thread, wait_ns, wait_as)
5489 (process_stop_reply, remote_notice_new_inferior)
5490 (process_initial_stop_replies, remote_add_thread)
5491 (btrace_sync_conf, remote_btrace_maybe_reopen)
5492 (remove_new_fork_children, kill_new_fork_children)
5493 (discard_pending_stop_replies, stop_reply_queue_length)
5494 (check_pending_events_prevent_wildcard_vcont)
5495 (discard_pending_stop_replies_in_queue, stop_reply)
5496 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5497 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5498 (remote_interrupt_as, remote_interrupt_ns)
5499 (remote_get_noisy_reply, remote_query_attached)
5500 (remote_add_inferior, remote_current_thread, get_current_thread)
5501 (set_thread, set_general_thread, set_continue_thread)
5502 (set_general_process, write_ptid)
5503 (remote_unpack_thread_info_response, remote_get_threadinfo)
5504 (parse_threadlist_response, remote_get_threadlist)
5505 (remote_threadlist_iterator, remote_get_threads_with_ql)
5506 (remote_get_threads_with_qxfer)
5507 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5508 (get_offsets, remote_check_symbols, remote_supported_packet)
5509 (remote_query_supported, remote_packet_size)
5510 (remote_serial_quit_handler, remote_detach_pid)
5511 (remote_vcont_probe, remote_resume_with_hc)
5512 (send_interrupt_sequence, interrupt_query)
5513 (remote_notif_get_pending_events, fetch_register_using_p)
5514 (send_g_packet, process_g_packet, fetch_registers_using_g)
5515 (store_register_using_P, store_registers_using_G)
5516 (set_remote_traceframe, check_binary_download)
5517 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5518 (remote_xfer_live_readonly_partial, remote_read_bytes)
5519 (remote_send_printf, remote_flash_write, readchar)
5520 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5521 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5522 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5523 (extended_remote_disable_randomization, extended_remote_run)
5524 (send_environment_packet, extended_remote_environment_support)
5525 (extended_remote_set_inferior_cwd, remote_write_qxfer)
5526 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5527 (packet_command): Now methods of ...
5528 (remote_target): ... this class.
5529 (m_remote_state) <remote_target>: New field.
5530 (struct remote_state) <stop_reply_queue,
5531 remote_async_inferior_event_token, wait_forever_enabled_p>: New
5533 (remote_state::remote_state): Allocate stop_reply_queue.
5534 (remote_state): Delete global.
5535 (get_remote_state_raw): Delete.
5536 (remote_target::get_remote_state): Allocate m_remote_state on
5538 (get_current_remote_target): New.
5539 (remote_ops, extended_remote_ops): Delete.
5540 (wait_forever_enabled_p, remote_async_inferior_event_token):
5541 Delete, moved to struct remote_state.
5542 (remote_target::close): Delete self. Destruction bits split to
5544 (remote_target::~remote_target): ... this.
5545 (show_memory_packet_size): Adjust to use
5546 get_current_remote_target.
5547 (struct protocol_feature) <func>: Add remote_target parameter.
5548 All callers adjusted.
5549 (curr_quit_handler_target): New.
5550 (remote_serial_quit_handler): Reimplement.
5551 (remote_target::open_1): Adjust to use get_current_remote_target.
5552 Heap-allocate remote_target/extended_remote_target instances.
5553 (vcont_builder::vcont_builder): Add remote_target parameter, and
5554 save it in m_remote. All callers adjusted.
5555 (vcont_builder::m_remote): New field.
5556 (vcont_builder::restart, vcont_builder::flush)
5557 (vcont_builder::push_action): Use it.
5558 (remote_target::commit_resume): Use it.
5559 (struct queue_iter_param) <remote>: New field.
5560 (remote_target::remove_new_fork_children): Fill in 'remote' field.
5561 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5562 (check_pending_event_prevents_wildcard_vcont_callback)
5563 (remote_target::check_pending_events_prevent_wildcard_vcont)
5564 (remote_target::discard_pending_stop_replies)
5565 (remote_target::discard_pending_stop_replies_in_queue)
5566 (remote_target::remote_notif_remove_queued_reply): Fill in
5568 (remote_notif_get_pending_events): New.
5569 (remote_target::readchar, remote_target::remote_serial_write):
5570 Save/restore curr_quit_handler_target.
5572 (kill_new_fork_children): Fill in 'remote' field.
5573 (packet_command): Use get_current_remote_target, defer to
5574 remote_target method of same name.
5575 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5576 parameter, and save it in m_remote. All callers adjusted.
5577 (scoped_remote_fd::release): Use m_remote.
5578 (scoped_remote_fd::m_remote): New field.
5579 (remote_file_put, remote_file_get, remote_file_delete): Use
5580 get_current_remote_target, defer to remote_target method of same
5582 (remote_btrace_reset): Add remote_state paremeter. Update all
5584 (remote_async_inferior_event_handler). Pass down 'data'.
5585 (remote_new_objfile): Use get_current_remote_target.
5586 (remote_target::vcont_r_supported): New.
5587 (set_range_stepping): Use get_current_remote_target and
5588 remote_target::vcont_r_supported.
5589 (_initialize_remote): Don't allocate 'remote_state' and
5590 'stop_reply_queue' globals.
5591 * remote.h (struct remote_target): Forward declare.
5592 (getpkt, putpkt, remote_notif_get_pending_events): Add
5593 'remote_target' parameter.
5595 2018-05-22 Pedro Alves <palves@redhat.com>
5597 * remote.c (vcont_builder): Now a class. Make all data members
5599 (vcont_builder) <vcont_builder, restart, flush, push_action>:
5601 (vcont_builder_restart): Rename to ...
5602 (vcont_builder::restart): ... this.
5603 (vcont_builder_flush): Rename to ...
5604 (vcont_builder::flush): ... this.
5605 (vcont_builder_push_action): Rename to ...
5606 (vcont_builder::push_action): ... this.
5607 (remote_target::commit_resume): Adjust.
5609 2018-05-22 Pedro Alves <palves@redhat.com>
5611 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5612 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5613 (get_fixed_memory_packet_size): New.
5614 (get_memory_packet_size): Use it.
5615 (set_memory_packet_size): Don't override the config size with
5616 DEFAULT_MAX_MEMORY_PACKET_SIZE.
5617 (show_memory_packet_size): Use get_fixed_memory_packet_size.
5618 Don't refer to get_memory_packet_size if not connected to a remote
5619 target. Show "(default)" if configured size is 0.
5621 2018-05-22 Pedro Alves <palves@redhat.com>
5623 * remote.c (remote_target::mourn_inferior): Move
5624 discard_pending_stop_replies call here from ...
5625 (_initialize_remote): ... here.
5627 2018-05-22 Pedro Alves <palves@redhat.com>
5629 * remote.c (compare_section_command): Remove set_general_process
5632 2018-05-22 Pedro Alves <palves@redhat.com>
5634 * remote.c (struct packet_reg, struct remote_arch_state):
5635 Move higher up in the file.
5636 (remote_state) <m_arch_states>: Store remote_arch_state values
5637 instead of remote_arch_state pointers.
5638 (remote_state::get_remote_arch_state): Adjust.
5640 2018-05-22 Pedro Alves <palves@redhat.com>
5642 * remote.c: Include <unordered_map>.
5643 (remote_state): Now a class.
5644 (remote_state) <get_remote_arch_state>: Declare method.
5645 <get_remote_arch_state>: New field.
5646 (remote_arch_state) <remote_arch_state>: Declare ctor.
5647 <regs>: Now a unique_ptr.
5648 (remote_gdbarch_data_handle): Delete.
5649 (get_remote_arch_state): Delete.
5650 (remote_state::get_remote_arch_state): New.
5651 (get_remote_state): Adjust to call remote_state's
5652 get_remote_arch_state method.
5653 (init_remote_state): Delete, bits factored out to ...
5654 (remote_arch_state::remote_arch_state): ... this new method.
5655 (get_remote_packet_size, get_memory_packet_size)
5656 (process_g_packet, remote_target::fetch_registers)
5657 (remote_target::prepare_to_store, store_registers_using_G)
5658 (remote_target::store_registers, remote_target::get_trace_status):
5659 Adjust to call remote_state's method.
5660 (_initialize_remote): Remove reference to
5661 remote_gdbarch_data_handle.
5663 2018-05-22 Pedro Alves <palves@redhat.com>
5665 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5666 pread>: New method declarations.
5667 (remote_target::open_1): Adjust.
5668 (readahead_cache_invalidate): Rename to ...
5669 (readahead_cache::invalidate): ... this, and adjust to be a class
5671 (readahead_cache_invalidate_fd): Rename to ...
5672 (readahead_cache::invalidate_fd): ... this, and adjust to be a
5674 (remote_hostio_pwrite): Adjust.
5675 (remote_hostio_pread_from_cache): Rename to ...
5676 (readahead_cache::pread): ... this, and adjust to be a class
5678 (remote_hostio_close): Adjust.
5680 2018-05-22 Pedro Alves <palves@redhat.com>
5682 * remote.c (remote_hostio_close_cleanup): Delete.
5683 (class scoped_remote_fd): New.
5684 (remote_file_put, remote_file_get): Use it.
5686 2018-05-22 Pedro Alves <palves@redhat.com>
5688 (struct vCont_action_support): Use bool and initialize all fields.
5689 (struct readahead_cache): Initialize all fields.
5690 (remote_state): Use bool and initialize all fields.
5691 (remote_state::remote_state, remote_state::~remote_state): New.
5692 (new_remote_state): Delete.
5693 (_initialize_remote): Use new to allocate remote_state.
5695 2018-05-22 Pedro Alves <palves@redhat.com>
5699 * c-exp.y: Include "c-support.h".
5700 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5701 of tolower. Use c_ident_is_alpha to scan names.
5702 * c-lang.c: Include "c-support.h".
5703 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5704 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5705 * c-support.h: New file, with bits factored out from ...
5706 * cp-name-parser.y: ... this file.
5707 Include "c-support.h".
5708 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5709 c-support.h and renamed.
5710 (symbol_end, yylex): Adjust.
5712 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5714 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5715 parameter type to CORE_ADDR.
5716 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5717 parameter type in declaration to CORE_ADDR.
5718 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5719 target_auxv_search to get AT_HWCAP and use the result to get the
5721 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5722 to CORE_ADDR. Remove the cast of the return value to unsigned
5723 long. Fix error predicate of target_auxv_search.
5724 (ppc_linux_nat_target::read_description): Change the type of the
5725 hwcap variable to CORE_ADDR.
5727 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5729 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5730 if the size of fpscr is larger than 32 bits.
5732 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5734 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5735 (ppc32_linux_vsxregmap): New global.
5736 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5737 regcache_supply_regset, and regcache_collect_regset.
5738 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5739 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5740 (fetch_vsx_register, store_vsx_register): Remove.
5741 (fetch_vsx_registers): Add regno parameter. Get regset using
5742 ppc_linux_vsxregset. Use regset to supply registers.
5743 (store_vsx_registers): Add regno parameter. Get regset using
5744 ppc_linux_vsxregset. Use regset to collect registers.
5745 (fetch_register): Call fetch_vsx_registers instead of
5747 (store_register): Call store_vsx_registers instead of
5749 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5750 new regno parameter.
5751 (store_ppc_registers): Call store_vsx_registers with -1 for the
5752 new regno parameter.
5753 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5754 (ppc_collect_vsxregset): Remove.
5756 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5758 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5760 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5761 for vector register offset fields.
5762 (ppc64_fbsd_reg_offsets): Likewise.
5763 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5764 to vector register offset fields.
5765 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5766 to vector register offset fields.
5767 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5768 vector register offset fields.
5769 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5770 initializers for vector register offset fields.
5771 (rs6000_aix64_reg_offsets): Likewise.
5772 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5773 (ppc_supply_vrregset): Remove.
5774 (ppc_collect_vrregset): Remove.
5775 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5776 (ppc_linux_vrregset) : New function.
5777 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5778 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5779 (ppc32_linux_vrregset): Remove.
5780 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5781 and use result instead of ppc32_linux_vrregset.
5782 (ppc32_linux_reg_offsets): Remove initializers for vector register
5784 (ppc64_linux_reg_offsets): Likewise.
5785 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5786 * ppc-linux-nat.c: Include regset.h.
5787 (gdb_vrregset_t): Adjust comment to account for little-endian
5789 (supply_vrregset, fill_vrregset): Remove.
5790 (fetch_altivec_register, store_altivec_register): Remove.
5791 (fetch_altivec_registers): Add regno parameter. Get regset using
5792 ppc_linux_vrregset. Use regset to supply registers.
5793 (store_altivec_registers): Add regno parameter. Get regset using
5794 ppc_linux_vrregset. Use regset to collect registers.
5795 (fetch_register): Call fetch_altivec_registers instead of
5796 fetch_altivec_register.
5797 (store_register): Call store_altivec_registers instead of
5798 store_altivec_register.
5799 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5800 the new regno parameter.
5801 (store_ppc_registers): Call store_altivec_registers with -1 for
5802 the new regno parameter.
5804 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5806 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5807 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5808 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5809 (gdb_vrregset_t): Change array type size to
5810 PPC_LINUX_SIZEOF_VRREGSET.
5811 (gdb_vsxregset_t): Change array type size to
5812 PPC_LINUX_SIZEOF_VSXREGSET.
5813 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5814 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5815 PPC_LINUX_SIZEOF_VSXREGSET.
5817 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5819 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5820 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5822 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5823 ppc_linux_target_wordsize with tid.
5824 (ppc_linux_nat_target::read_description): Call ppc_linux_target
5826 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5827 (ppc64_64bit_inferior_p): Add static and inline specifiers.
5828 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5829 tid parameter. Remove static specifier.
5830 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5831 (ppc_linux_target_wordsize): New declaration.
5833 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5835 * arch/ppc-linux-common.c: New file.
5836 * arch/ppc-linux-common.h: New file.
5837 * arch/ppc-linux-tdesc.h: New file.
5838 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5839 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5840 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5841 arch/ppc-linux-tdesc.h.
5842 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5843 arch/ppc-linux-tdesc.h.
5844 (ppc_linux_nat_target::read_description): Remove target
5845 description matching code. Fill a ppc_linux_features struct and
5846 call ppc_linux_match_description with it. Move comment about ISA
5847 2.05 to ppc-linux-common.c.
5848 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5849 arch/ppc-linux-tdesc.h.
5850 (ppc_linux_core_read_description): Remove target description
5851 matching code. Fill a ppc_linux_features struct and call
5852 ppc_linux_match_description with it.
5853 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5854 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5855 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5856 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5857 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5858 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5859 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5860 (tdesc_powerpc_e500l): Remove.
5862 2018-05-22 Joel Brobecker <brobecker@adacore.com>
5864 * ada-lang.c (catch_assert_command): Pass empty string instead
5865 of NULL for excep_string argument.
5867 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5869 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5870 the width of the requested register exceeds the width of the
5873 2018-05-21 Tom Tromey <tom@tromey.com>
5875 * printcmd.c (output_command): Remove.
5876 (output_command_const): Rename to output_command.
5877 * valprint.h (output_command): Rename from output_command_const.
5878 * tracepoint.c (trace_dump_actions): Call output_command.
5880 2018-05-21 Tom Tromey <tom@tromey.com>
5882 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5883 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5884 * ada-lang.h (create_ada_exception_catchpoint): Update.
5885 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5887 (create_excep_cond_exprs, ~ada_catchpoint)
5888 (should_stop_exception, print_one_exception)
5889 (print_mention_exception, print_recreate_exception): Update.
5890 (ada_get_next_arg): Remove.
5891 (catch_ada_exception_command_split): Use std::string. Change type
5892 of "excep_string", "cond_string".
5893 (catch_ada_exception_command): Update.
5894 (create_ada_exception_catchpoint): Change type of excep_string.
5895 (ada_exception_sal): Remove excep_string parameter.
5896 (~ada_catchpoint): Remove.
5898 2018-05-21 Tom Tromey <tom@tromey.com>
5900 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5903 2018-05-21 Tom Tromey <tom@tromey.com>
5905 * ada-lang.c (ada_exception_message_1, ada_exception_message):
5906 Return unique_xmalloc_ptr.
5907 (print_it_exception): Update.
5909 2018-05-21 Tom Tromey <tom@tromey.com>
5911 * tracepoint.c (trace_dump_actions): Use std::string.
5913 2018-05-21 Tom Tromey <tom@tromey.com>
5915 * symfile.c (reread_symbols): Use std::string for original_name.
5917 2018-05-21 Tom Tromey <tom@tromey.com>
5919 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5920 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
5923 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
5925 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5927 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5928 * objfiles.c (get_objfile_bfd_data): Allocate
5929 objfile_per_bfd_storage with obstack_new when allocating on
5932 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5934 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5936 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5937 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5938 * mdebugread.c (mdebug_build_psymtabs): Likewise.
5939 (add_pending): Likewise.
5940 (parse_symbol): Likewise.
5941 (parse_partial_symbols): Likewise.
5942 (psymtab_to_symtab_1): Likewise.
5943 (new_psymtab): Likewise.
5944 (elfmdebug_build_psymtabs): Likewise.
5945 * minsyms.c (terminate_minimal_symbol_table): Likewise.
5946 * objfiles.c (get_objfile_bfd_data): Likewise.
5947 (objfile_register_static_link): Likewise.
5948 * psymtab.c (allocate_psymtab): Likewise.
5949 * stabsread.c (read_member_functions): Likewise.
5950 * xcoffread.c (xcoff_end_psymtab): Likewise.
5952 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5954 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5955 compiler supports std::is_trivially_constructible.
5956 * common/poison.h: Include obstack.h.
5957 (IsMallocable): Define to is_trivially_constructible if the
5958 compiler supports it, define to true_type otherwise.
5962 (XOBNEWVEC): Redefine.
5963 * gdb_obstack.h (obstack_zalloc): New.
5964 (OBSTACK_ZALLOC): Redefine.
5965 (obstack_calloc): New.
5966 (OBSTACK_CALLOC): Redefine.
5968 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5969 (gdbarch_obstack): New declaration in gdbarch.h, definition in
5971 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5972 obstack_calloc/obstack_zalloc.
5973 (gdbarch_obstack_zalloc): Remove.
5974 * target-descriptions.c (tdesc_data_init): Use obstack_new.
5976 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5978 * stack.c (backtrace_command_1): Remove useless variable int i.
5980 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5982 * stack.c (print_frame_info): Fix comment.
5984 2018-05-18 Tom Tromey <tom@tromey.com>
5986 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5987 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5988 (~dwarf2_per_objfile): Update
5989 (dwarf2_get_dwz_file): Use new.
5990 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5993 2018-05-18 Tom Tromey <tom@tromey.com>
5995 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5997 * dwarf2read.c (struct dwp_file): Add constructor and
5999 (open_and_init_dwp_file): Return a unique_ptr.
6000 (dwarf2_per_objfile, create_dwp_hash_table)
6001 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6002 (lookup_dwo_unit_in_dwp): Update.
6003 (open_and_init_dwp_file, get_dwp_file): Update.
6005 2018-05-18 Tom Tromey <tom@tromey.com>
6007 * dwarf2read.c (dwarf2_per_objfile): Update.
6008 (struct mapped_index): Add initializers.
6009 (dwarf2_read_index): Use new.
6010 (dw2_symtab_iter_init): Update.
6011 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6014 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6016 * dwarf2read.c (mapped_index) <total_size>: Remove.
6018 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6020 * unittests/format_pieces-selftests.c (test_format_specifier):
6023 2018-05-18 Tom Tromey <tom@tromey.com>
6025 * c-typeprint.c (maybe_print_hole): New function.
6026 (c_print_type_struct_field_offset): Update.
6027 (c_type_print_base_struct_union): Call maybe_print_hole.
6029 2018-05-17 Keith Seitz <keiths@redhat.com>
6031 * breakpoint.c (build_bpstat_chain): New function, moved from
6033 (bpstat_stop_status): Add optional parameter, `stop_chain'.
6034 If no stop chain is passed, call build_bpstat_chain to build it.
6035 * breakpoint.h (build_bpstat_chain): Declare.
6036 (bpstat_stop_status): Move documentation here from breakpoint.c.
6037 * infrun.c (handle_signal_stop): Before eliding inlined frames,
6038 build the stop chain and pass it to skip_inline_frames.
6039 Pass this stop chain to bpstat_stop_status.
6040 * inline-frame.c: Include breakpoint.h.
6041 (stopped_by_user_bp_inline_frame): New function.
6042 (skip_inline_frames): Add parameter `stop_chain'.
6043 Move documention to inline-frame.h.
6044 If non-NULL, use stopped_by_user_bp_inline_frame to determine
6045 whether the frame should be elided.
6046 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6047 Add moved documentation and update for new parameter.
6049 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6052 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6053 unittests/format_pieces-selftests.c.
6054 * common/format.h (format_piece) <operator==>: New.
6055 (format_pieces) <operator[]>: Remove.
6056 * common/format.c (format_pieces::format_pieces): Handle \e.
6057 * unittests/format_pieces-selftests.c: New.
6059 2018-05-17 Tom Tromey <tom@tromey.com>
6062 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6063 (dw2_instantiate_symtab): Add skip_partial parameter.
6064 (dw2_find_last_source_symtab, dw2_map_expand_apply)
6065 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6066 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6067 (dw2_expand_symtabs_matching_one)
6068 (dw2_find_pc_sect_compunit_symtab)
6069 (dw2_debug_names_lookup_symbol)
6070 (dw2_debug_names_expand_symtabs_for_function): Update.
6071 (init_cutu_and_read_dies): Add skip_partial parameter.
6072 (process_psymtab_comp_unit, build_type_psymtabs_1)
6073 (process_skeletonless_type_unit, load_partial_comp_unit)
6074 (psymtab_to_symtab_1): Update.
6075 (load_full_comp_unit): Add skip_partial parameter.
6076 (process_imported_unit_die, dwarf2_read_addr_index)
6077 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6078 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6079 (read_signatured_type): Update.
6081 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6083 * value.c (release_value): Remove unused variable.
6084 (record_latest_value): Likewise.
6085 (access_value_history): Likewise.
6086 (preserve_values): Likewise.
6088 2018-05-17 Tom Tromey <tom@tromey.com>
6090 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6093 2018-05-16 Maciej W. Rozycki <macro@mips.com>
6096 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6097 Also handle registers whose width is not a multiple of
6099 (linux_nat_trad_target::store_register): Likewise.
6101 2018-05-16 Tom Tromey <tom@tromey.com>
6103 * gdbcore.h (core_bfd): Redefine.
6104 * corelow.c (core_target::close): Update.
6105 (core_target_open): Update.
6106 * progspace.h (struct program_space) <cbfd>: Now a
6109 2018-05-16 Tom Tromey <tom@tromey.com>
6112 * symfile-add-flags.h (enum symfile_add_flags)
6113 <SYMFILE_NOT_FILENAME>: New constant.
6114 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
6115 objfile name from BFD.
6116 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6117 * minidebug.c (find_separate_debug_file_in_section): Put
6118 ".gnu_debugdata" into BFD's file name.
6120 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
6122 * regcache.c (regcache_read_ftype, regcache_write_ftype):
6125 2018-05-15 Tamar Christina <tamar.christina@arm.com>
6128 * aarch64-tdep.c (aarch64_analyze_prologue,
6129 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6130 Indicate not interested in errors.
6132 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6134 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6135 Supply the MIPS_ZERO_REGNUM register.
6137 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6139 * mips-tdep.c (mask_address_var): Make variable static.
6141 2018-05-14 Tom Tromey <tom@tromey.com>
6143 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6145 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
6147 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6148 FXSAVE_ADDR for the mxcsr register.
6150 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
6152 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6154 2018-05-11 Pedro Alves <palves@redhat.com>
6156 * corelow.c (core_target) <core_target>: No longer inline.
6157 Initialize m_core_gdbarch, m_core_vec and build the section table
6159 <~core_target>: New.
6160 <core_gdbarch, get_core_register_section>: New methods.
6161 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6162 factored out from ...
6163 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6165 (sniff_core_bfd): Add gdbarch parameter.
6166 (core_close): Delete, merged into ...
6167 (core_target::close): ... here. Delete self.
6168 (core_close_cleanup): Delete.
6169 (core_target_open): Allocate a core_target on the heap. Use a
6170 unique_ptr instead of a cleanup. Bits moved into the core_target
6171 ctor. Adjust to use core_target methods instead of globals.
6172 (get_core_register_section): Rename to ...
6173 (core_target::get_core_register_section): ... this and adjust.
6174 (struct get_core_registers_cb_data): New.
6175 (get_core_registers_cb): Use it. Use bool.
6176 (core_target::fetch_registers, core_target::files_info)
6177 (core_target::xfer_partial, core_target::read_description)
6178 (core_target::pid_to, core_target::thread_name): Adjust to
6179 reference class fields instead of globals.
6180 * target.h (struct target_ops_deleter, target_ops_up): New.
6182 2018-05-11 Pedro Alves <palves@redhat.com>
6184 * corefile.c (core_file_command): Move to corelow.c.
6185 * corelow.c (the_core_target): Delete.
6186 (core_file_command): Moved from corefile.c. Check exec_bfd
6187 instead of the_core_target. Use target_detach instead of calling
6188 into the_core_target directly.
6189 (maybe_say_no_core_file_now): New.
6190 (core_target::detach): Use it.
6191 (_initialize_corelow): Remove references to the_core_target.
6192 * gdbcore.h (the_core_target): Delete.
6194 2018-05-11 Tom Tromey <tromey@redhat.com>
6195 Pedro Alves <palves@redhat.com>
6197 * corefile.c (core_bfd): Remove.
6198 * gdbcore.h (core_bfd): Now a macro.
6199 * progspace.h (struct program_space) <cbfd>: New field.
6201 2018-05-11 Tom Tromey <tom@tromey.com>
6203 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6206 2018-05-10 Tom Tromey <tom@tromey.com>
6208 * configure: Rebuild.
6209 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6211 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6214 * regformats/regdat.sh: Adjust script, following the addition
6215 of the new expedite_regs parameter to init_target_desc.
6217 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
6220 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6221 set_gdbarch_significant_addr_bit.
6222 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6223 set_gdbarch_significant_addr_bit.
6224 * utils.c (address_significant): Update to sign extend addr.
6226 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
6228 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6229 (xtensa_linux_init_abi): Limit tdep->num_regs by
6230 tdep->num_nopriv_regs.
6231 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6232 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6235 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
6237 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6239 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
6241 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6242 (I387_MXCSR_INIT_VAL): New constant.
6243 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6244 buffer if it was supplied by the inferior.
6245 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6246 (i387_xsave_get_clear_bv): New function.
6247 (i387_supply_xsave): Only read x87 control registers from the
6248 xsave buffer if the feature is enabled, and the state will have
6249 been written, otherwise, provide a suitable default.
6250 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6251 including x87 control registers. Update control registers if they
6252 have changed from the default value, and mark features as enabled
6254 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6256 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6258 * spu-tdep.c (info_spu_event_command): Fix output formatting.
6260 2018-05-07 Tom Tromey <tom@tromey.com>
6262 * configure: Rebuild.
6263 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6265 2018-05-07 Tom Tromey <tom@tromey.com>
6268 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6269 bit. Use correct value for VDIV.
6271 2018-05-04 Tom Tromey <tom@tromey.com>
6273 * configure: Rebuild.
6274 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6276 2018-05-04 Tom Tromey <tom@tromey.com>
6278 * linux-record.c (record_linux_system_call) <case
6279 RECORD_SYS_RECVFROM>: Add "break".
6281 2018-05-04 Tom Tromey <tom@tromey.com>
6283 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6284 Add missing "break".
6285 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6286 Add missing "break".
6288 2018-05-04 Tom Tromey <tom@tromey.com>
6290 * rs6000-tdep.c (ppc_process_record_op4)
6291 (ppc_process_record_op63): Add fall-through comment.
6293 2018-05-04 Tom Tromey <tom@tromey.com>
6295 * i386-tdep.c (i386_process_record): Add fall-through comment.
6297 2018-05-04 Tom Tromey <tom@tromey.com>
6299 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6302 2018-05-04 Tom Tromey <tom@tromey.com>
6304 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6305 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6306 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6308 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6310 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6313 2018-05-04 Tom Tromey <tom@tromey.com>
6315 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6317 2018-05-04 Tom Tromey <tom@tromey.com>
6319 * s390-tdep.c (s390_process_record): Fix fall-through comments.
6320 * xcoffread.c (scan_xcoff_symtab): Move comment later.
6321 * symfile.c (section_is_mapped): Fix fall-through comment.
6322 * stabsread.c (define_symbol, read_member_functions): Fix
6323 fall-through comment.
6324 * s390-linux-tdep.c (s390_process_record): Fix fall-through
6326 * remote.c (remote_wait_as): Fix fall-through comment.
6327 * p-exp.y (yylex): Fix fall-through comment.
6328 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6330 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6331 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6332 * jv-exp.y (yylex): Fix fall-through comment.
6333 * go-exp.y (lex_one_token): Fix fall-through comment.
6334 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6335 fall-through comment.
6336 * f-exp.y (yylex): Fix fall-through comment.
6337 * dwarf2read.c (process_die): Fix fall-through comments.
6338 * dbxread.c (process_one_symbol): Fix fall-through comment.
6339 * d-exp.y (lex_one_token): Fix fall-through comment.
6340 * cp-name-parser.y (yylex): Fix fall-through comment.
6341 * coffread.c (coff_symtab_read): Fix fall-through comment.
6342 * c-exp.y (lex_one_token): Fix fall-through comment.
6343 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6345 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6348 2018-05-04 Tom Tromey <tom@tromey.com>
6351 * NEWS: Mention gdb.execute change.
6352 * gdbcmd.h (execute_control_command): Don't declare.
6353 * python/python.c (execute_gdb_command): Use read_command_lines_1,
6354 execute_control_commands, execute_control_commands_to_string.
6355 * cli/cli-script.h (execute_control_commands)
6356 (execute_control_commands_to_string): Declare.
6357 (execute_control_command): Add from_tty parameter.
6358 * cli/cli-script.c (execute_control_commands)
6359 (execute_control_commands_to_string): New functions.
6360 (execute_user_command): Use execute_control_commands.
6361 (execute_control_command_1): Add "from_tty" parameter. Update.
6362 (execute_control_command): Likewise.
6364 2018-05-04 Tom Tromey <tom@tromey.com>
6367 * NEWS: Mention that breakpoint commands are writable.
6368 * python/py-breakpoint.c (bppy_set_commands): New function.
6369 (breakpoint_object_getset) <"commands">: Use it.
6371 2018-05-04 Tom Tromey <tom@tromey.com>
6373 * tracepoint.c (actions_command): Update.
6374 * mi/mi-cmd-break.c (mi_command_line_array)
6375 (mi_command_line_array_cnt, mi_command_line_array_ptr)
6376 (mi_read_next_line): Remove.
6377 (mi_cmd_break_commands): Update.
6378 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6380 * cli/cli-script.c (get_command_line): Update.
6381 (process_next_line): Use function_view. Constify.
6382 (recurse_read_control_structure, read_command_lines)
6383 (read_command_lines_1): Change argument types to function_view.
6384 (do_define_command, document_command): Update.
6385 * breakpoint.h (check_tracepoint_command): Don't declare.
6386 * breakpoint.c (check_tracepoint_command): Remove.
6387 (commands_command_1, create_tracepoint_from_upload): Update.
6389 2018-05-04 Tom Tromey <tom@tromey.com>
6392 * cli/cli-script.h (enum command_control_type) <define_control>:
6394 * cli/cli-script.c (multi_line_command_p): Handle define_control.
6395 (build_command_line, execute_control_command_1)
6396 (process_next_line): Likewise.
6397 (do_define_command): New function, extracted from define_command.
6398 (define_command): Use it.
6400 2018-05-04 Tom Tromey <tom@tromey.com>
6402 * tracepoint.c (actions_command): Update.
6403 * cli/cli-script.h (read_command_lines): Update.
6404 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6405 (MAX_TMPBUF): Remove define.
6406 (define_command): Use string_printf.
6407 (document_command): Likewise.
6408 * breakpoint.c (commands_command_1): Update.
6410 2018-05-04 Tom Tromey <tom@tromey.com>
6412 * top.c (execute_command): Update.
6413 * cli/cli-script.h (print_command_lines): Now varargs.
6414 * cli/cli-script.c (print_command_lines): Now varargs.
6415 (execute_control_command_1) <case while_control, case if_control>:
6418 2018-05-04 Tom Tromey <tom@tromey.com>
6420 * tracepoint.c (all_tracepoint_actions): Rename from
6421 all_tracepoint_actions_and_cleanup. Change return type.
6422 (actions_command, encode_actions_1, encode_actions)
6423 (trace_dump_actions, tdump_command): Update.
6424 * remote.c (remote_download_command_source): Update.
6425 * python/python.c (gdbpy_eval_from_control_command)
6426 (python_command, python_interactive_command): Update.
6427 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6428 * guile/guile.c (guile_command)
6429 (gdbscm_eval_from_control_command, guile_command): Update.
6430 * compile/compile.c (compile_code_command)
6431 (compile_print_command, compile_to_object): Update.
6432 * cli/cli-script.h (struct command_lines_deleter): New.
6433 (counted_command_line): New typedef.
6434 (struct command_line): Add constructor, destructor.
6435 <body_list>: Remove.
6436 <body_list_0, body_list_1>: New members.
6437 (command_line_up): Remove typedef.
6438 (read_command_lines, read_command_lines_1, get_command_line):
6440 (copy_command_lines): Don't declare.
6441 * cli/cli-script.c (build_command_line): Use "new".
6442 (get_command_line): Return counted_command_line.
6443 (print_command_lines, execute_user_command)
6444 (execute_control_command_1, while_command, if_command): Update.
6445 (realloc_body_list): Remove.
6446 (process_next_line, recurse_read_control_structure): Update.
6447 (read_command_lines, read_command_lines_1): Return counted_command_line.
6448 (free_command_lines): Use "delete".
6449 (copy_command_lines): Remove.
6450 (define_command, document_command, show_user_1): Update.
6451 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6452 a counted_command_line.
6453 * breakpoint.h (counted_command_line): Remove typedef.
6454 (breakpoint_set_commands): Update.
6455 * breakpoint.c (check_no_tracepoint_commands)
6456 (validate_commands_for_breakpoint): Update.
6457 (breakpoint_set_commands): Change commands to be a
6458 counted_command_line.
6459 (commands_command_1, update_dprintf_command_list)
6460 (create_tracepoint_from_upload): Update.
6462 2018-05-04 Tom Tromey <tom@tromey.com>
6464 * cli/cli-decode.h (cmd_list_element): New constructor.
6465 (~cmd_list_element): New destructor.
6466 (struct cmd_list_element): Add initializers.
6467 * cli/cli-decode.c (do_add_cmd): Use "new".
6468 (delete_cmd): Use "delete".
6470 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6471 Pedro Alves <palves@redhat.com>
6473 PR breakpoints/19806 and support for PR external/20207.
6474 * NEWS: Mention Aarch64 watchpoint improvements.
6475 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6476 watchpoints and PR external/20207 watchpoints.
6477 * nat/aarch64-linux-hw-point.c
6478 (kernel_supports_any_contiguous_range): New.
6479 (aarch64_watchpoint_offset): New.
6480 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6481 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6482 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6483 (aarch64_align_watchpoint): New parameters aligned_offset_p and
6484 next_addr_orig_p. Support PR external/20207 watchpoints.
6485 (aarch64_downgrade_regs): New.
6486 (aarch64_dr_state_insert_one_point): New parameters offset and
6488 (aarch64_dr_state_remove_one_point): Likewise.
6489 (aarch64_handle_breakpoint): Update caller.
6490 (aarch64_handle_aligned_watchpoint): Likewise.
6491 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6493 (aarch64_linux_set_debug_regs): Remove const from state. Call
6494 aarch64_downgrade_regs.
6495 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6496 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6497 (DR_CONTROL_MASK): ... this.
6498 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6499 (unsigned int aarch64_watchpoint_offset): New prototype.
6500 (aarch64_linux_set_debug_regs): Remove const from state.
6501 * utils.c (align_up, align_down): Move to ...
6502 * common/common-utils.c (align_up, align_down): ... here.
6503 * utils.h (align_up, align_down): Move to ...
6504 * common/common-utils.h (align_up, align_down): ... here.
6506 2018-05-04 Joel Brobecker <brobecker@adacore.com>
6508 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6509 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6510 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6511 Re-implement to match the ABI as summarized in GCC's
6512 gcc/config/sparc/sparc.c. All callers updated.
6513 (sparc32_store_arguments): Remove assertion.
6515 2018-05-04 Tom Tromey <tom@tromey.com>
6517 * printcmd.c: Don't include tui.h.
6518 (decode_format): Use skip_spaces.
6520 2018-05-04 Tom Tromey <tom@tromey.com>
6523 * printcmd.c (last_count): New global.
6524 (x_command): Use saved count when repeating.
6526 2018-05-04 Tom Tromey <tom@tromey.com>
6528 * nto-procfs.c (do_closedir_cleanup): Remove.
6529 (procfs_pidlist): Use gdb_dir_up.
6530 * procfs.c (do_closedir_cleanup): Remove.
6531 (proc_update_threads): Use gdb_dir_up.
6532 * common/filestuff.h (struct gdb_dir_deleter): New.
6533 (gdb_dir_up): New typedef.
6535 2018-05-04 Tom Tromey <tom@tromey.com>
6537 * ada-lang.c (print_mention_exception): Use std::string.
6539 2018-05-04 Tom Tromey <tom@tromey.com>
6541 * ada-lang.c (create_excep_cond_exprs): Update.
6542 (ada_exception_catchpoint_cond_string): Use std::string.
6544 2018-05-04 Tom Tromey <tom@tromey.com>
6546 * ada-lang.c (xget_renaming_scope): Return std::string.
6547 (old_renaming_is_invisible): Update.
6549 2018-05-04 Tom Tromey <tom@tromey.com>
6551 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6552 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6554 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
6556 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6558 2018-05-04 Tom Tromey <tom@tromey.com>
6560 * remote.c (remote_query_supported_append): Change type.
6561 (remote_check_symbols): Update.
6563 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
6566 * configure.ac: Prepend libpython.
6567 * python/python-config.py: Likewise.
6568 * configure: Regenerate.
6570 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
6572 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6574 2018-05-03 Pedro Alves <palves@redhat.com>
6577 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6578 override. Write 'true' instead of '1'.
6579 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6582 2018-05-02 Pedro Alves <palves@redhat.com>
6584 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6585 add_inf_child_target.
6586 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6587 add_inf_child_target.
6588 * aix-thread.c (aix_thread_target_info): New.
6589 (aix_thread_target) <shortname, longname, doc>: Delete.
6591 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6592 add_inf_child_target.
6593 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6594 add_inf_child_target.
6595 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6596 add_inf_child_target.
6597 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6598 add_inf_child_target.
6599 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6600 add_inf_child_target.
6601 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6602 add_inf_child_target.
6603 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6604 add_inf_child_target.
6605 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6606 add_inf_child_target.
6607 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6608 add_inf_child_target.
6609 * bfd-target.c (target_bfd_target_info): New.
6610 (target_bfd) <shortname, longname, doc>: Delete.
6612 * bsd-kvm.c (bsd_kvm_target_info): New.
6613 (bsd_kvm_target) <shortname, longname, doc>: Delete.
6615 (bsd_kvm_target::open): Rename to ...
6616 (bsd_kvm_target_open): ... this. Adjust.
6617 * bsd-uthread.c (bsd_uthread_target_info): New.
6618 (bsd_uthread_target) <shortname, longname, doc>: Delete.
6620 * corefile.c (core_file_command): Adjust.
6621 * corelow.c (core_target_info): New.
6622 (core_target) <shortname, longname, doc>: Delete.
6624 (core_target::open): Rename to ...
6625 (core_target_open): ... this. Adjust.
6626 * ctf.c (ctf_target_info): New.
6627 (ctf_target) <shortname, longname, doc>: Delete.
6629 (ctf_target::open): Rename to ...
6630 (ctf_target_open): ... this.
6631 (_initialize_ctf): Adjust.
6632 * exec.c (exec_target_info): New.
6633 (exec_target) <shortname, longname, doc>: Delete.
6635 (exec_target::open): Rename to ...
6636 (exec_target_open): ... this.
6637 * gdbcore.h (core_target_open): Declare.
6638 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6639 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6640 add_inf_child_target.
6641 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6642 add_inf_child_target.
6643 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6644 add_inf_child_target.
6645 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6646 add_inf_child_target.
6647 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6648 add_inf_child_target.
6649 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6650 add_inf_child_target.
6651 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6652 add_inf_child_target.
6653 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6654 add_inf_child_target.
6655 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6656 add_inf_child_target.
6657 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6658 add_inf_child_target.
6659 * inf-child.c (inf_child_target_info): New.
6660 (inf_child_target::info): New.
6661 (inf_child_open_target): Remove 'target' parameter. Use
6662 get_native_target instead.
6663 (inf_child_target::open): Delete.
6664 (add_inf_child_target): New.
6665 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6668 (add_inf_child_target): Declare.
6669 (inf_child_open_target): Declare.
6670 * linux-thread-db.c (thread_db_target_info): New.
6671 (thread_db_target) <shortname, longname, doc>: Delete.
6673 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6674 add_inf_child_target.
6675 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6676 add_inf_child_target.
6677 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6678 add_inf_child_target.
6679 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6680 add_inf_child_target.
6681 * make-target-delegates (print_class): Adjust.
6682 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6683 add_inf_child_target.
6684 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6685 add_inf_child_target.
6686 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6687 add_inf_child_target.
6688 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6689 add_inf_child_target.
6690 * nto-procfs.c (nto_native_target_info): New.
6691 (nto_procfs_target_native) <shortname, longname, doc>:
6694 (nto_procfs_target_info): New.
6695 (nto_procfs_target_procfs) <shortname, longname, doc>:
6698 (init_procfs_targets): Adjust.
6699 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6700 add_inf_child_target.
6701 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6702 add_inf_child_target.
6703 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6704 add_inf_child_target.
6705 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6706 add_inf_child_target.
6707 * ravenscar-thread.c (ravenscar_target_info): New.
6708 (ravenscar_thread_target) <shortname, longname, doc>:
6711 * record-btrace.c (record_btrace_target_info):
6712 (record_btrace_target) <shortname, longname, doc>: Delete.
6714 (record_btrace_target::open): Rename to ...
6715 (record_btrace_target_open): ... this. Adjust.
6716 * record-full.c (record_longname, record_doc): New.
6717 (record_full_base_target) <shortname, longname, doc>: Delete.
6719 (record_full_target_info): New.
6720 (record_full_target): <shortname>: Delete.
6722 (record_full_core_open_1, record_full_open_1): Update comments.
6723 (record_full_base_target::open): Rename to ...
6724 (record_full_open): ... this.
6725 (cmd_record_full_restore): Update.
6726 (_initialize_record_full): Update.
6727 * remote-sim.c (remote_sim_target_info): New.
6728 (gdbsim_target) <shortname, longname, doc>: Delete.
6730 (gdbsim_target::open): Rename to ...
6731 (gdbsim_target_open): ... this.
6732 (_initialize_remote_sim): Adjust.
6733 * remote.c (remote_doc): New.
6734 (remote_target_info): New.
6735 (remote_target) <shortname, longname, doc>: Delete.
6737 (extended_remote_target_info): New.
6738 (extended_remote_target) <shortname, longname, doc>: Delete.
6740 (remote_target::open_1): Make static. Adjust.
6741 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6742 * s390-linux-nat.c (_initialize_s390_nat): Use
6743 add_inf_child_target.
6744 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6745 add_inf_child_target.
6746 * sol-thread.c (thread_db_target_info): New.
6747 (sol_thread_target) <shortname, longname, doc>: Delete.
6749 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6750 add_inf_child_target.
6751 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6752 add_inf_child_target.
6753 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6754 add_inf_child_target.
6755 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6756 add_inf_child_target.
6757 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6758 add_inf_child_target.
6759 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6760 add_inf_child_target.
6761 * spu-linux-nat.c (_initialize_spu_nat): Use
6762 add_inf_child_target.
6763 * spu-multiarch.c (spu_multiarch_target_info): New.
6764 (spu_multiarch_target) <shortname, longname, doc>: Delete.
6766 * target-delegates.c: Regenerate.
6767 * target.c: Include <unordered_map>.
6768 (target_ops_p): Delete.
6769 (DEF_VEC_P(target_ops_p)): Delete.
6770 (target_factories): New.
6771 (test_target_info): New.
6772 (test_target_ops::info): New.
6773 (open_target): Adjust to use target_factories.
6774 (add_target_with_completer): Rename to ...
6775 (add_target): ... this. Change prototype. Register target_info
6776 and open callback in target_factories. Register target_info in
6777 command context instead of target_ops.
6778 (add_target): Delete old implementation.
6779 (add_deprecated_target_alias): Change prototype. Adjust.
6780 (the_native_target): New.
6781 (set_native_target, get_native_target): New.
6782 (find_default_run_target): Use the_native_target.
6783 (find_attach_target, find_run_target): Simplify.
6784 (target_ops::open): Delete.
6785 (dummy_target_info): New.
6786 (dummy_target::shortname, dummy_target::longname)
6787 (dummy_target::doc): Delete.
6788 (dummy_target::info): New.
6789 (debug_target::shortname, debug_target::longname)
6790 (debug_target::doc): Delete.
6791 (debug_target::info): New.
6792 * target.h (struct target_info): New.
6793 (target_ops::~target_ops): Add comment.
6794 (target_ops::info): New.
6795 (target_ops::shortname, target_ops::longname, target_ops::doc): No
6796 longer virtual. Implement in terms of target_info.
6797 (set_native_target, get_native_target): Declare.
6798 (target_open_ftype): New.
6799 (add_target, add_target_with_completer)
6800 (add_deprecated_target_alias): Change prototype.
6801 (test_target) <shortname, longname, doc>: Delete.
6803 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6804 add_inf_child_target.
6805 * tracefile-tfile.c (tfile_target_info): New.
6806 (tfile_target) <shortname, longname, doc>: Delete.
6808 (tfile_target::open): Rename to ...
6809 (tfile_target_open): ... this.
6810 (_initialize_tracefile_tfile): Adjust.
6811 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6812 add_inf_child_target.
6813 * windows-nat.c (_initialize_windows_nat): Use
6814 add_inf_child_target.
6815 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6816 add_inf_child_target.
6818 2018-05-02 Pedro Alves <palves@redhat.com>
6820 * linux-nat.h (linux_nat_target) <low_new_thread,
6821 low_delete_thread, low_new_fork, low_forget_process,
6822 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6823 New virtual methods.
6824 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6825 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6826 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6827 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6828 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6830 * linux-fork.c (delete_fork): Adjust to call low method.
6831 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6832 (linux_nat_new_fork, linux_nat_forget_process_hook)
6833 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6834 (linux_nat_status_is_event):
6835 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6836 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6838 (sigtrap_is_event): Rename to ...
6839 (linux_nat_target::low_status_is_event): ... this.
6840 (linux_nat_set_status_is_event): Delete.
6841 (save_stop_reason, linux_nat_wait_1)
6842 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6844 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6845 (linux_nat_set_new_fork, linux_nat_set_forget_process)
6846 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6847 (linux_nat_set_prepare_to_resume): Delete.
6848 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6849 low virtual methods.
6850 * amd64-linux-nat.c: Likewise.
6851 * arm-linux-nat.c: Likewise.
6852 * i386-linux-nat.c: Likewise.
6853 * ia64-linux-nat.c: Likewise.
6854 * mips-linux-nat.c: Likewise.
6855 * ppc-linux-nat.c: Likewise.
6856 * s390-linux-nat.c: Likewise.
6857 * sparc64-linux-nat.c: Likewise.
6858 * x86-linux-nat.c: Likewise.
6859 * x86-linux-nat.h: Include "nat/x86-linux.h".
6860 (x86_linux_nat_target) <low_new_fork, low_forget_process,
6861 low_prepare_to_resume, low_new_thread, low_delete_thread>:
6864 2018-05-02 Pedro Alves <palves@redhat.com>
6866 * target.h (target_ops)
6867 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6868 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6869 stopped_by_watchpoint, have_continuable_watchpoint,
6870 stopped_data_address, watchpoint_addr_within_range,
6871 can_accel_watchpoint_condition, can_run, thread_alive,
6872 has_all_memory, has_memory, has_stack, has_registers,
6873 has_execution, can_async_p, is_async_p, supports_non_stop,
6874 always_non_stop_p, can_execute_reverse, supports_multi_process,
6875 supports_enable_disable_tracepoint,
6876 supports_disable_randomization, supports_string_tracing,
6877 supports_evaluation_of_breakpoint_conditions,
6878 can_run_breakpoint_commands, filesystem_is_local,
6879 can_download_tracepoint, get_trace_state_variable_value,
6880 set_trace_notes, get_tib_address, use_agent, can_use_agent,
6881 record_is_replaying, record_will_replay,
6882 augmented_libraries_svr4_read>: Adjust to return bool.
6883 * aarch64-linux-nat.c: All implementations adjusted.
6884 * aix-thread.c: All implementations adjusted.
6885 * arm-linux-nat.c: All implementations adjusted.
6886 * breakpoint.c: All implementations adjusted.
6887 * bsd-kvm.c: All implementations adjusted.
6888 * bsd-uthread.c: All implementations adjusted.
6889 * corelow.c: All implementations adjusted.
6890 * ctf.c: All implementations adjusted.
6891 * darwin-nat.c: All implementations adjusted.
6892 * darwin-nat.h: All implementations adjusted.
6893 * exec.c: All implementations adjusted.
6894 * fbsd-nat.c: All implementations adjusted.
6895 * fbsd-nat.h: All implementations adjusted.
6896 * gnu-nat.c: All implementations adjusted.
6897 * gnu-nat.h: All implementations adjusted.
6898 * go32-nat.c: All implementations adjusted.
6899 * ia64-linux-nat.c: All implementations adjusted.
6900 * inf-child.c: All implementations adjusted.
6901 * inf-child.h: All implementations adjusted.
6902 * inf-ptrace.c: All implementations adjusted.
6903 * inf-ptrace.h: All implementations adjusted.
6904 * linux-nat.c: All implementations adjusted.
6905 * linux-nat.h: All implementations adjusted.
6906 * mips-linux-nat.c: All implementations adjusted.
6907 * nto-procfs.c: All implementations adjusted.
6908 * ppc-linux-nat.c: All implementations adjusted.
6909 * procfs.c: All implementations adjusted.
6910 * ravenscar-thread.c: All implementations adjusted.
6911 * record-btrace.c: All implementations adjusted.
6912 * record-full.c: All implementations adjusted.
6913 * remote-sim.c: All implementations adjusted.
6914 * remote.c: All implementations adjusted.
6915 * s390-linux-nat.c: All implementations adjusted.
6916 * sol-thread.c: All implementations adjusted.
6917 * spu-multiarch.c: All implementations adjusted.
6918 * target-delegates.c: All implementations adjusted.
6919 * target.c: All implementations adjusted.
6920 * target.h: All implementations adjusted.
6921 * tracefile-tfile.c: All implementations adjusted.
6922 * tracefile.c: All implementations adjusted.
6923 * tracefile.h: All implementations adjusted.
6924 * windows-nat.c: All implementations adjusted.
6925 * x86-linux-nat.h: All implementations adjusted.
6926 * x86-nat.h: All implementations adjusted.
6928 2018-05-02 Pedro Alves <palves@redhat.com>
6930 * make-target-delegates (scan_target_h): Don't trim lines here.
6931 Replace sequences of tabs and/or whitespace with a single
6933 (top level, parsing methods): Trim each line before processing it
6936 2018-05-02 Pedro Alves <palves@redhat.com>
6937 John Baldwin <jhb@freebsd.org>
6939 * target.h (enum strata) <debug_stratum>: New.
6940 (struct target_ops) <all delegation methods>: Replace by C++
6941 virtual methods, and drop "to_" prefix. All references updated
6943 <to_shortname, to_longname, to_doc, to_data,
6944 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6945 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6946 virtual methods. All references updated throughout.
6947 <can_attach, supports_terminal_ours, can_create_inferior,
6948 get_thread_control_capabilities, attach_no_wait>: New
6950 <insert_breakpoint, remove_breakpoint>: Now
6951 TARGET_DEFAULT_NORETURN methods.
6952 <info_proc>: Now returns bool.
6954 (OPS_MAGIC): Delete.
6955 (current_target): Delete. All references replaced by references
6957 (target_stack): ... this. New.
6958 (target_shortname, target_longname): Adjust.
6959 (target_can_run): Now a function declaration.
6960 (default_child_has_all_memory, default_child_has_memory)
6961 (default_child_has_stack, default_child_has_registers)
6962 (default_child_has_execution): Remove target_ops parameter.
6963 (complete_target_initialization): Delete.
6964 (memory_breakpoint_target): New template class.
6965 (test_target_ops): Refactor as a C++ class with virtual methods.
6966 * make-target-delegates (NAME_PART): Tighten.
6967 (POINTER_PART, CP_SYMBOL): New.
6968 (SIMPLE_RETURN_PART): Reimplement.
6969 (VEC_RETURN_PART): Expect less.
6970 (RETURN_PART, VIRTUAL_PART): New.
6971 (METHOD): Adjust to C++ virtual methods.
6972 (scan_target_h): Remove reference to C99.
6973 (dname): Output "target_ops::" prefix.
6974 (write_function_header): Adjust to output a C++ class method.
6975 (write_declaration): New.
6976 (write_delegator): Adjust to output a C++ class method.
6977 (tdname): Output "dummy_target::" prefix.
6978 (write_tdefault, write_debugmethod): Adjust to output a C++ class
6980 (tdefault_names, debug_names): Delete.
6981 (return_types, tdefaults, styles, argtypes_array): New.
6982 (top level): All methods are delegators.
6984 (top level): Print dummy_target and debug_target classes.
6985 * target-delegates.c: Regenerate.
6986 * target-debug.h (target_debug_print_enum_info_proc_what)
6987 (target_debug_print_thread_control_capabilities)
6988 (target_debug_print_thread_info_p): New.
6989 * target.c (dummy_target): Delete.
6990 (the_dummy_target, the_debug_target): New.
6991 (target_stack): Now extern.
6992 (set_targetdebug): Push/unpush debug target.
6993 (default_child_has_all_memory, default_child_has_memory)
6994 (default_child_has_stack, default_child_has_registers)
6995 (default_child_has_execution): Remove target_ops parameter.
6996 (complete_target_initialization): Delete.
6997 (add_target_with_completer): No longer call
6998 complete_target_initialization.
6999 (target_supports_terminal_ours): Use regular delegation.
7000 (update_current_target): Delete.
7001 (push_target): No longer check magic number. Don't call
7002 update_current_target.
7003 (unpush_target): Don't call update_current_target.
7004 (target_is_pushed): No longer check magic number.
7005 (target_require_runnable): Skip for all stratums over
7007 (target_ops::info_proc): New.
7008 (target_info_proc): Use find_target_at and
7009 find_default_run_target.
7010 (target_supports_disable_randomization): Use regular delegation.
7011 (target_get_osdata): Use find_target_at.
7012 (target_ops::open, target_ops::close, target_ops::can_attach)
7013 (target_ops::attach, target_ops::can_create_inferior)
7014 (target_ops::create_inferior, target_ops::can_run)
7015 (target_can_run): New.
7016 (default_fileio_target): Use regular delegation.
7017 (target_ops::fileio_open, target_ops::fileio_pwrite)
7018 (target_ops::fileio_pread, target_ops::fileio_fstat)
7019 (target_ops::fileio_close, target_ops::fileio_unlink)
7020 (target_ops::fileio_readlink): New.
7021 (target_fileio_open_1, target_fileio_unlink)
7022 (target_fileio_readlink): Always call the target method. Handle
7024 (return_zero, return_zero_has_execution): Delete.
7025 (init_dummy_target): Delete.
7026 (dummy_target::dummy_target, dummy_target::shortname)
7027 (dummy_target::longname, dummy_target::doc)
7028 (debug_target::debug_target, debug_target::shortname)
7029 (debug_target::longname, debug_target::doc): New.
7030 (target_supports_delete_record): Use regular delegation.
7031 (setup_target_debug): Delete.
7032 (maintenance_print_target_stack): Skip debug_stratum.
7033 (initialize_targets): Instantiate the_dummy_target and
7035 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
7037 (target_auxv_search, fprint_target_auxv): Adjust.
7038 (info_auxv_command): Adjust to use target_stack.
7039 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7040 * exceptions.c (print_flush): Handle a NULL target_stack.
7041 * regcache.c (target_ops_no_register): Refactor as class with
7044 * exec.c (exec_target): New class.
7045 (exec_ops): Now an exec_target.
7046 (exec_open, exec_close_1, exec_get_section_table)
7047 (exec_xfer_partial, exec_files_info, exec_has_memory)
7048 (exec_make_note_section): Refactor as exec_target methods.
7049 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7051 (exec_target::find_memory_regions): New.
7052 (_initialize_exec): Don't call init_exec_ops.
7053 * gdbcore.h (exec_file_clear): Delete.
7055 * corefile.c (core_target): Delete.
7056 (core_file_command): Adjust.
7057 * corelow.c (core_target): New class.
7058 (the_core_target): New.
7059 (core_close): Remove target_ops parameter.
7060 (core_close_cleanup): Adjust.
7061 (core_target::close): New.
7062 (core_open, core_detach, get_core_registers, core_files_info)
7063 (core_xfer_partial, core_thread_alive, core_read_description)
7064 (core_pid_to_str, core_thread_name, core_has_memory)
7065 (core_has_stack, core_has_registers, core_info_proc): Rework as
7066 core_target methods.
7067 (ignore, core_remove_breakpoint, init_core_ops): Delete.
7068 (_initialize_corelow): Initialize the_core_target.
7069 * gdbcore.h (core_target): Delete.
7070 (the_core_target): New.
7072 * ctf.c: (ctf_target): New class.
7073 (ctf_ops): Now a ctf_target.
7074 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7075 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7076 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7078 (init_ctf_ops): Delete.
7079 (_initialize_ctf): Don't call it.
7080 * tracefile-tfile.c (tfile_target): New class.
7081 (tfile_ops): Now a tfile_target.
7082 (tfile_open, tfile_close, tfile_files_info)
7083 (tfile_get_tracepoint_status, tfile_trace_find)
7084 (tfile_fetch_registers, tfile_xfer_partial)
7085 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7086 Refactor as tfile_target methods.
7087 (tfile_xfer_partial_features): Remove target_ops parameter.
7088 (init_tfile_ops): Delete.
7089 (_initialize_tracefile_tfile): Don't call it.
7090 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7091 (tracefile_has_stack, tracefile_has_registers)
7092 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7093 tracefile_target methods.
7094 (init_tracefile_ops): Delete.
7095 (tracefile_target::tracefile_target): New.
7096 * tracefile.h: Include "target.h".
7097 (tracefile_target): New class.
7098 (init_tracefile_ops): Delete.
7100 * spu-multiarch.c (spu_multiarch_target): New class.
7101 (spu_ops): Now a spu_multiarch_target.
7102 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7103 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7104 (spu_search_memory, spu_mourn_inferior): Refactor as
7105 spu_multiarch_target methods.
7106 (init_spu_ops): Delete.
7107 (_initialize_spu_multiarch): Remove references to init_spu_ops,
7108 complete_target_initialization.
7110 * ravenscar-thread.c (ravenscar_thread_target): New class.
7111 (ravenscar_ops): Now a ravenscar_thread_target.
7112 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7113 (ravenscar_thread_alive, ravenscar_pid_to_str)
7114 (ravenscar_fetch_registers, ravenscar_store_registers)
7115 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7116 (ravenscar_stopped_by_hw_breakpoint)
7117 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7118 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7119 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7121 (init_ravenscar_thread_ops): Delete.
7122 (_initialize_ravenscar): Remove references to
7123 init_ravenscar_thread_ops and complete_target_initialization.
7125 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7126 (bsd_uthread_target): New class.
7127 (bsd_uthread_ops): Now a bsd_uthread_target.
7128 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7129 (bsd_uthread_close, bsd_uthread_mourn_inferior)
7130 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7131 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7132 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7133 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7134 (bsd_uthread_target): Delete function.
7135 (_initialize_bsd_uthread): Remove reference to
7136 complete_target_initialization.
7138 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
7139 (target_bfd): ... this new class.
7140 (target_bfd_xfer_partial, target_bfd_get_section_table)
7141 (target_bfd_close): Refactor as target_bfd methods.
7142 (target_bfd::~target_bfd): New.
7143 (target_bfd_reopen): Adjust.
7144 (target_bfd::close): New.
7146 * record-btrace.c (record_btrace_target): New class.
7147 (record_btrace_ops): Now a record_btrace_target.
7148 (record_btrace_open, record_btrace_stop_recording)
7149 (record_btrace_disconnect, record_btrace_close)
7150 (record_btrace_async, record_btrace_info)
7151 (record_btrace_insn_history, record_btrace_insn_history_range)
7152 (record_btrace_insn_history_from, record_btrace_call_history)
7153 (record_btrace_call_history_range)
7154 (record_btrace_call_history_from, record_btrace_record_method)
7155 (record_btrace_is_replaying, record_btrace_will_replay)
7156 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7157 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7158 (record_btrace_store_registers, record_btrace_prepare_to_store)
7159 (record_btrace_to_get_unwinder)
7160 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7161 (record_btrace_commit_resume, record_btrace_wait)
7162 (record_btrace_stop, record_btrace_can_execute_reverse)
7163 (record_btrace_stopped_by_sw_breakpoint)
7164 (record_btrace_supports_stopped_by_sw_breakpoint)
7165 (record_btrace_stopped_by_hw_breakpoint)
7166 (record_btrace_supports_stopped_by_hw_breakpoint)
7167 (record_btrace_update_thread_list, record_btrace_thread_alive)
7168 (record_btrace_goto_begin, record_btrace_goto_end)
7169 (record_btrace_goto, record_btrace_stop_replaying_all)
7170 (record_btrace_execution_direction)
7171 (record_btrace_prepare_to_generate_core)
7172 (record_btrace_done_generating_core): Refactor as
7173 record_btrace_target methods.
7174 (init_record_btrace_ops): Delete.
7175 (_initialize_record_btrace): Remove reference to
7176 init_record_btrace_ops.
7177 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7178 the execution_direction global.
7179 (record_full_base_target, record_full_target)
7180 (record_full_core_target): New classes.
7181 (record_full_ops): Now a record_full_target.
7182 (record_full_core_ops): Now a record_full_core_target.
7183 (record_full_target::detach, record_full_target::disconnect)
7184 (record_full_core_target::disconnect)
7185 (record_full_target::mourn_inferior, record_full_target::kill):
7187 (record_full_open, record_full_close, record_full_async): Refactor
7188 as methods of the record_full_base_target class.
7189 (record_full_resume, record_full_commit_resume): Refactor
7190 as methods of the record_full_target class.
7191 (record_full_wait, record_full_stopped_by_watchpoint)
7192 (record_full_stopped_data_address)
7193 (record_full_stopped_by_sw_breakpoint)
7194 (record_full_supports_stopped_by_sw_breakpoint)
7195 (record_full_stopped_by_hw_breakpoint)
7196 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7197 methods of the record_full_base_target class.
7198 (record_full_store_registers, record_full_xfer_partial)
7199 (record_full_insert_breakpoint, record_full_remove_breakpoint):
7200 Refactor as methods of the record_full_target class.
7201 (record_full_can_execute_reverse, record_full_get_bookmark)
7202 (record_full_goto_bookmark, record_full_execution_direction)
7203 (record_full_record_method, record_full_info, record_full_delete)
7204 (record_full_is_replaying, record_full_will_replay)
7205 (record_full_goto_begin, record_full_goto_end, record_full_goto)
7206 (record_full_stop_replaying): Refactor as methods of the
7207 record_full_base_target class.
7208 (record_full_core_resume, record_full_core_kill)
7209 (record_full_core_fetch_registers)
7210 (record_full_core_prepare_to_store)
7211 (record_full_core_store_registers, record_full_core_xfer_partial)
7212 (record_full_core_insert_breakpoint)
7213 (record_full_core_remove_breakpoint)
7214 (record_full_core_has_execution): Refactor
7215 as methods of the record_full_core_target class.
7216 (record_full_base_target::supports_delete_record): New.
7217 (init_record_full_ops): Delete.
7218 (init_record_full_core_ops): Delete.
7219 (record_full_save): Refactor as method of the
7220 record_full_base_target class.
7221 (_initialize_record_full): Remove references to
7222 init_record_full_ops and init_record_full_core_ops.
7224 * remote.c (remote_target, extended_remote_target): New classes.
7225 (remote_ops): Now a remote_target.
7226 (extended_remote_ops): Now an extended_remote_target.
7227 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7228 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7229 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7230 (remote_pass_signals, remote_set_syscall_catchpoint)
7231 (remote_program_signals, )
7232 (remote_thread_always_alive): Remove target_ops parameter.
7233 (remote_thread_alive, remote_thread_name)
7234 (remote_update_thread_list, remote_threads_extra_info)
7235 (remote_static_tracepoint_marker_at)
7236 (remote_static_tracepoint_markers_by_strid)
7237 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7238 (remote_open): Refactor as methods of remote_target.
7239 (extended_remote_open, extended_remote_detach)
7240 (extended_remote_attach, extended_remote_post_attach):
7241 (extended_remote_supports_disable_randomization)
7242 (extended_remote_create_inferior): : Refactor as method of
7243 extended_remote_target.
7244 (remote_set_permissions, remote_open_1, remote_detach)
7245 (remote_follow_fork, remote_follow_exec, remote_disconnect)
7246 (remote_resume, remote_commit_resume, remote_stop)
7247 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7248 (remote_terminal_ours, remote_wait, remote_fetch_registers)
7249 (remote_prepare_to_store, remote_store_registers)
7250 (remote_flash_erase, remote_flash_done, remote_files_info)
7251 (remote_kill, remote_mourn, remote_insert_breakpoint)
7252 (remote_remove_breakpoint, remote_insert_watchpoint)
7253 (remote_watchpoint_addr_within_range)
7254 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7255 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7256 (remote_supports_stopped_by_sw_breakpoint)
7257 (remote_stopped_by_hw_breakpoint)
7258 (remote_supports_stopped_by_hw_breakpoint)
7259 (remote_stopped_by_watchpoint, remote_stopped_data_address)
7260 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7261 (remote_verify_memory): Refactor as methods of remote_target.
7262 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7264 (remote_xfer_partial, remote_get_memory_xfer_limit)
7265 (remote_search_memory, remote_rcmd, remote_memory_map)
7266 (remote_pid_to_str, remote_get_thread_local_address)
7267 (remote_get_tib_address, remote_read_description): Refactor as
7268 methods of remote_target.
7269 (remote_target::fileio_open, remote_target::fileio_pwrite)
7270 (remote_target::fileio_pread, remote_target::fileio_close): New.
7271 (remote_hostio_readlink, remote_hostio_fstat)
7272 (remote_filesystem_is_local, remote_can_execute_reverse)
7273 (remote_supports_non_stop, remote_supports_disable_randomization)
7274 (remote_supports_multi_process, remote_supports_cond_breakpoints)
7275 (remote_supports_enable_disable_tracepoint)
7276 (remote_supports_string_tracing)
7277 (remote_can_run_breakpoint_commands, remote_trace_init)
7278 (remote_download_tracepoint, remote_can_download_tracepoint)
7279 (remote_download_trace_state_variable, remote_enable_tracepoint)
7280 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7281 (remote_trace_start, remote_get_trace_status)
7282 (remote_get_tracepoint_status, remote_trace_stop)
7283 (remote_trace_find, remote_get_trace_state_variable_value)
7284 (remote_save_trace_data, remote_get_raw_trace_data)
7285 (remote_set_disconnected_tracing, remote_core_of_thread)
7286 (remote_set_circular_trace_buffer, remote_traceframe_info)
7287 (remote_get_min_fast_tracepoint_insn_len)
7288 (remote_set_trace_buffer_size, remote_set_trace_notes)
7289 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7290 (remote_disable_btrace, remote_teardown_btrace)
7291 (remote_read_btrace, remote_btrace_conf)
7292 (remote_augmented_libraries_svr4_read, remote_load)
7293 (remote_pid_to_exec_file, remote_can_do_single_step)
7294 (remote_execution_direction, remote_thread_handle_to_thread_info):
7295 Refactor as methods of remote_target.
7296 (init_remote_ops, init_extended_remote_ops): Delete.
7297 (remote_can_async_p, remote_is_async_p, remote_async)
7298 (remote_thread_events, remote_upload_tracepoints)
7299 (remote_upload_trace_state_variables): Refactor as methods of
7301 (_initialize_remote): Remove references to init_remote_ops and
7302 init_extended_remote_ops.
7304 * remote-sim.c (gdbsim_target): New class.
7305 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7306 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7307 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7308 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7309 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7310 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7311 Refactor as methods of gdbsim_target.
7312 (gdbsim_ops): Now a gdbsim_target.
7313 (init_gdbsim_ops): Delete.
7314 (gdbsim_cntrl_c): Adjust.
7315 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7317 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7318 (the_amd64_linux_nat_target): New.
7319 (amd64_linux_fetch_inferior_registers)
7320 (amd64_linux_store_inferior_registers): Refactor as methods of
7321 amd64_linux_nat_target.
7322 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
7323 * i386-linux-nat.c: Don't include "linux-nat.h".
7324 (i386_linux_nat_target): New class.
7325 (the_i386_linux_nat_target): New.
7326 (i386_linux_fetch_inferior_registers)
7327 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7328 as methods of i386_linux_nat_target.
7329 (_initialize_i386_linux_nat): Adjust. Set linux_target.
7330 * inf-child.c (inf_child_ops): Delete.
7331 (inf_child_fetch_inferior_registers)
7332 (inf_child_store_inferior_registers): Delete.
7333 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7334 methods of inf_child_target.
7335 (inf_child_target::supports_terminal_ours)
7336 (inf_child_target::terminal_init)
7337 (inf_child_target::terminal_inferior)
7338 (inf_child_target::terminal_ours_for_output)
7339 (inf_child_target::terminal_ours, inf_child_target::interrupt)
7340 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7342 (inf_child_open, inf_child_disconnect, inf_child_close)
7343 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7344 (inf_child_post_startup_inferior, inf_child_can_run)
7345 (inf_child_pid_to_exec_file): Refactor as methods of
7347 (inf_child_follow_fork): Delete.
7348 (inf_child_target::can_create_inferior)
7349 (inf_child_target::can_attach): New.
7350 (inf_child_target::has_all_memory, inf_child_target::has_memory)
7351 (inf_child_target::has_stack, inf_child_target::has_registers)
7352 (inf_child_target::has_execution): New.
7353 (inf_child_fileio_open, inf_child_fileio_pwrite)
7354 (inf_child_fileio_pread, inf_child_fileio_fstat)
7355 (inf_child_fileio_close, inf_child_fileio_unlink)
7356 (inf_child_fileio_readlink, inf_child_use_agent)
7357 (inf_child_can_use_agent): Refactor as methods of
7359 (return_zero, inf_child_target): Delete.
7360 (inf_child_target::inf_child_target): New.
7361 * inf-child.h: Include "target.h".
7362 (inf_child_target): Delete function prototype.
7363 (inf_child_target): New class.
7364 (inf_child_open_target, inf_child_mourn_inferior)
7365 (inf_child_maybe_unpush_target): Delete.
7366 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7367 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7368 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7369 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7370 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7371 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7372 (inf_ptrace_wait, inf_ptrace_xfer_partial)
7373 (inf_ptrace_thread_alive, inf_ptrace_files_info)
7374 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7375 methods of inf_ptrace_target.
7376 (inf_ptrace_target): Delete function.
7377 * inf-ptrace.h: Include "inf-child.h".
7378 (inf_ptrace_target): Delete function declaration.
7379 (inf_ptrace_target): New class.
7380 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7381 * linux-nat.c (linux_target): New.
7382 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7383 (linux_nat_target::~linux_nat_target): New.
7384 (linux_child_post_attach, linux_child_post_startup_inferior)
7385 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7386 (linux_child_remove_fork_catchpoint)
7387 (linux_child_insert_vfork_catchpoint)
7388 (linux_child_remove_vfork_catchpoint)
7389 (linux_child_insert_exec_catchpoint)
7390 (linux_child_remove_exec_catchpoint)
7391 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7392 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7393 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7394 (linux_nat_stopped_data_address)
7395 (linux_nat_stopped_by_sw_breakpoint)
7396 (linux_nat_supports_stopped_by_sw_breakpoint)
7397 (linux_nat_stopped_by_hw_breakpoint)
7398 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7399 (linux_nat_kill, linux_nat_mourn_inferior)
7400 (linux_nat_xfer_partial, linux_nat_thread_alive)
7401 (linux_nat_update_thread_list, linux_nat_pid_to_str)
7402 (linux_nat_thread_name, linux_child_pid_to_exec_file)
7403 (linux_child_static_tracepoint_markers_by_strid)
7404 (linux_nat_is_async_p, linux_nat_can_async_p)
7405 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7406 (linux_nat_supports_multi_process)
7407 (linux_nat_supports_disable_randomization, linux_nat_async)
7408 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7409 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7410 (linux_nat_fileio_open, linux_nat_fileio_readlink)
7411 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7412 methods of linux_nat_target.
7413 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7414 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7416 (check_stopped_by_watchpoint): Adjust.
7417 (linux_xfer_partial): Delete.
7418 (linux_target_install_ops, linux_target, linux_nat_add_target):
7420 (linux_nat_target::linux_nat_target): New.
7421 * linux-nat.h: Include "inf-ptrace.h".
7422 (linux_nat_target): New.
7423 (linux_target, linux_target_install_ops, linux_nat_add_target):
7424 Delete function declarations.
7425 (linux_target): Declare global.
7426 * linux-thread-db.c (thread_db_target): New.
7427 (thread_db_target::thread_db_target): New.
7428 (thread_db_ops): Delete.
7429 (the_thread_db_target): New.
7430 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7431 (thread_db_update_thread_list, thread_db_pid_to_str)
7432 (thread_db_extra_thread_info)
7433 (thread_db_thread_handle_to_thread_info)
7434 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7435 (thread_db_resume): Refactor as methods of thread_db_target.
7436 (init_thread_db_ops): Delete.
7437 (_initialize_thread_db): Remove reference to init_thread_db_ops.
7438 * x86-linux-nat.c: Don't include "linux-nat.h".
7439 (super_post_startup_inferior): Delete.
7440 (x86_linux_nat_target::~x86_linux_nat_target): New.
7441 (x86_linux_child_post_startup_inferior)
7442 (x86_linux_read_description, x86_linux_enable_btrace)
7443 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7444 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7445 methods of x86_linux_nat_target.
7446 (x86_linux_create_target): Delete. Bits folded ...
7447 (x86_linux_add_target): ... here. Now takes a linux_nat_target
7449 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7450 (x86_linux_nat_target): New class.
7451 (x86_linux_create_target): Delete.
7452 (x86_linux_add_target): Now takes a linux_nat_target pointer.
7453 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7454 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7455 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7456 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7457 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7459 (x86_use_watchpoints): Delete.
7460 * x86-nat.h: Include "breakpoint.h" and "target.h".
7461 (x86_use_watchpoints): Delete.
7462 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7463 (x86_stopped_by_watchpoint, x86_stopped_data_address)
7464 (x86_insert_watchpoint, x86_remove_watchpoint)
7465 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7466 (x86_stopped_by_hw_breakpoint): New declarations.
7467 (x86_nat_target): New template class.
7469 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7470 (the_ppc_linux_nat_target): New.
7471 (ppc_linux_fetch_inferior_registers)
7472 (ppc_linux_can_use_hw_breakpoint)
7473 (ppc_linux_region_ok_for_hw_watchpoint)
7474 (ppc_linux_ranged_break_num_registers)
7475 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7476 (ppc_linux_insert_mask_watchpoint)
7477 (ppc_linux_remove_mask_watchpoint)
7478 (ppc_linux_can_accel_watchpoint_condition)
7479 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7480 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7481 (ppc_linux_watchpoint_addr_within_range)
7482 (ppc_linux_masked_watch_num_registers)
7483 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7484 (ppc_linux_read_description): Refactor as methods of
7485 ppc_linux_nat_target.
7486 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
7488 * procfs.c (procfs_xfer_partial): Delete forward declaration.
7489 (procfs_target): New class.
7490 (the_procfs_target): New.
7491 (procfs_target): Delete function.
7492 (procfs_auxv_parse, procfs_attach, procfs_detach)
7493 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7494 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7495 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7496 (procfs_create_inferior, procfs_update_thread_list)
7497 (procfs_thread_alive, procfs_pid_to_str)
7498 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7499 (procfs_stopped_data_address, procfs_insert_watchpoint)
7500 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7501 (proc_find_memory_regions, procfs_info_proc)
7502 (procfs_make_note_section): Refactor as methods of procfs_target.
7503 (_initialize_procfs): Adjust.
7504 * sol-thread.c (sol_thread_target): New class.
7505 (sol_thread_ops): Now a sol_thread_target.
7506 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7507 (sol_thread_fetch_registers, sol_thread_store_registers)
7508 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7509 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7510 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7511 (init_sol_thread_ops): Delete.
7512 (_initialize_sol_thread): Adjust. Remove references to
7513 init_sol_thread_ops and complete_target_initialization.
7515 * windows-nat.c (windows_nat_target): New class.
7516 (windows_fetch_inferior_registers)
7517 (windows_store_inferior_registers, windows_resume, windows_wait)
7518 (windows_attach, windows_detach, windows_pid_to_exec_file)
7519 (windows_files_info, windows_create_inferior)
7520 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7521 (windows_close, windows_pid_to_str, windows_xfer_partial)
7522 (windows_get_tib_address, windows_get_ada_task_ptid)
7523 (windows_thread_name, windows_thread_alive): Refactor as
7524 windows_nat_target methods.
7525 (do_initial_windows_stuff): Adjust.
7526 (windows_target): Delete function.
7527 (_initialize_windows_nat): Adjust.
7529 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7530 (darwin_mourn_inferior, darwin_kill_inferior)
7531 (darwin_create_inferior, darwin_attach, darwin_detach)
7532 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7533 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7534 (darwin_supports_multi_process): Refactor as darwin_nat_target
7536 (darwin_resume_to, darwin_files_info): Delete.
7537 (_initialize_darwin_inferior): Rename to ...
7538 (_initialize_darwin_nat): ... this. Adjust to C++ification.
7539 * darwin-nat.h: Include "inf-child.h".
7540 (darwin_nat_target): New class.
7541 (darwin_complete_target): Delete.
7542 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7543 (darwin_target): New.
7544 (i386_darwin_fetch_inferior_registers)
7545 (i386_darwin_store_inferior_registers): Refactor as methods of
7547 (darwin_complete_target): Delete, with ...
7548 (_initialize_i386_darwin_nat): ... bits factored out here.
7550 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7551 (the_alpha_linux_nat_target): New.
7552 (alpha_linux_register_u_offset): Refactor as
7553 alpha_linux_nat_target method.
7554 (_initialize_alpha_linux_nat): Adjust.
7555 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7556 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7557 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7558 methods of linux_nat_trad_target.
7559 (linux_trad_target): Delete.
7560 * linux-nat-trad.h (linux_trad_target): Delete function.
7561 (linux_nat_trad_target): New class.
7562 * mips-linux-nat.c (mips_linux_nat_target): New class.
7563 (super_fetch_registers, super_store_registers, super_close):
7565 (the_mips_linux_nat_target): New.
7566 (mips64_linux_regsets_fetch_registers)
7567 (mips64_linux_regsets_store_registers)
7568 (mips64_linux_fetch_registers, mips64_linux_store_registers)
7569 (mips_linux_register_u_offset, mips_linux_read_description)
7570 (mips_linux_can_use_hw_breakpoint)
7571 (mips_linux_stopped_by_watchpoint)
7572 (mips_linux_stopped_data_address)
7573 (mips_linux_region_ok_for_hw_watchpoint)
7574 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7575 (mips_linux_close): Refactor as methods of mips_linux_nat.
7576 (_initialize_mips_linux_nat): Adjust to C++ification.
7578 * aix-thread.c (aix_thread_target): New class.
7579 (aix_thread_ops): Now an aix_thread_target.
7580 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7581 (aix_thread_fetch_registers, aix_thread_store_registers)
7582 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7583 (aix_thread_thread_alive, aix_thread_pid_to_str)
7584 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7585 Refactor as methods of aix_thread_target.
7586 (init_aix_thread_ops): Delete.
7587 (_initialize_aix_thread): Remove references to init_aix_thread_ops
7588 and complete_target_initialization.
7589 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7590 (rs6000_nat_target): New class.
7591 (the_rs6000_nat_target): New.
7592 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7593 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7594 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7595 (super_create_inferior): Delete.
7596 (_initialize_rs6000_nat): Adjust to C++ification.
7598 * arm-linux-nat.c (arm_linux_nat_target): New class.
7599 (the_arm_linux_nat_target): New.
7600 (arm_linux_fetch_inferior_registers)
7601 (arm_linux_store_inferior_registers, arm_linux_read_description)
7602 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7603 (arm_linux_remove_hw_breakpoint)
7604 (arm_linux_region_ok_for_hw_watchpoint)
7605 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7606 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7607 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7608 arm_linux_nat_target.
7609 (_initialize_arm_linux_nat): Adjust to C++ification.
7611 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7612 (the_aarch64_linux_nat_target): New.
7613 (aarch64_linux_fetch_inferior_registers)
7614 (aarch64_linux_store_inferior_registers)
7615 (aarch64_linux_child_post_startup_inferior)
7616 (aarch64_linux_read_description)
7617 (aarch64_linux_can_use_hw_breakpoint)
7618 (aarch64_linux_insert_hw_breakpoint)
7619 (aarch64_linux_remove_hw_breakpoint)
7620 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7621 (aarch64_linux_region_ok_for_hw_watchpoint)
7622 (aarch64_linux_stopped_data_address)
7623 (aarch64_linux_stopped_by_watchpoint)
7624 (aarch64_linux_watchpoint_addr_within_range)
7625 (aarch64_linux_can_do_single_step): Refactor as methods of
7626 aarch64_linux_nat_target.
7627 (super_post_startup_inferior): Delete.
7628 (_initialize_aarch64_linux_nat): Adjust to C++ification.
7630 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7631 (the_hppa_linux_nat_target): New.
7632 (hppa_linux_fetch_inferior_registers)
7633 (hppa_linux_store_inferior_registers): Refactor as methods of
7634 hppa_linux_nat_target.
7635 (_initialize_hppa_linux_nat): Adjust to C++ification.
7637 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7638 (the_ia64_linux_nat_target): New.
7639 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7640 (ia64_linux_stopped_data_address)
7641 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7642 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7643 ia64_linux_nat_target methods.
7644 (super_xfer_partial): Delete.
7645 (_initialize_ia64_linux_nat): Adjust to C++ification.
7647 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7648 (the_m32r_linux_nat_target): New.
7649 (m32r_linux_fetch_inferior_registers)
7650 (m32r_linux_store_inferior_registers): Refactor as
7651 m32r_linux_nat_target methods.
7652 (_initialize_m32r_linux_nat): Adjust to C++ification.
7654 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7655 (the_m68k_linux_nat_target): New.
7656 (m68k_linux_fetch_inferior_registers)
7657 (m68k_linux_store_inferior_registers): Refactor as
7658 m68k_linux_nat_target methods.
7659 (_initialize_m68k_linux_nat): Adjust to C++ification.
7661 * s390-linux-nat.c (s390_linux_nat_target): New class.
7662 (the_s390_linux_nat_target): New.
7663 (s390_linux_fetch_inferior_registers)
7664 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7665 (s390_insert_watchpoint, s390_remove_watchpoint)
7666 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7667 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7668 (s390_auxv_parse, s390_read_description): Refactor as methods of
7669 s390_linux_nat_target.
7670 (_initialize_s390_nat): Adjust to C++ification.
7672 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7673 (the_sparc_linux_nat_target): New.
7674 (_initialize_sparc_linux_nat): Adjust to C++ification.
7675 * sparc-nat.c (sparc_fetch_inferior_registers)
7676 (sparc_store_inferior_registers): Remove target_ops parameter.
7677 * sparc-nat.h (sparc_fetch_inferior_registers)
7678 (sparc_store_inferior_registers): Remove target_ops parameter.
7679 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7680 (the_sparc64_linux_nat_target): New.
7681 (_initialize_sparc64_linux_nat): Adjust to C++ification.
7683 * spu-linux-nat.c (spu_linux_nat_target): New class.
7684 (the_spu_linux_nat_target): New.
7685 (spu_child_post_startup_inferior, spu_child_post_attach)
7686 (spu_child_wait, spu_fetch_inferior_registers)
7687 (spu_store_inferior_registers, spu_xfer_partial)
7688 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7690 (_initialize_spu_nat): Adjust to C++ification.
7692 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7693 (the_tilegx_linux_nat_target): New.
7694 (fetch_inferior_registers, store_inferior_registers):
7695 Refactor as methods.
7696 (_initialize_tile_linux_nat): Adjust to C++ification.
7698 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7699 (the_xtensa_linux_nat_target): New.
7700 (xtensa_linux_fetch_inferior_registers)
7701 (xtensa_linux_store_inferior_registers): Refactor as
7702 xtensa_linux_nat_target methods.
7703 (_initialize_xtensa_linux_nat): Adjust to C++ification.
7705 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7706 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7707 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7708 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7709 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7710 (fbsd_stopped_by_sw_breakpoint)
7711 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7712 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7713 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7714 (fbsd_post_startup_inferior, fbsd_post_attach)
7715 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7716 (fbsd_set_syscall_catchpoint)
7717 (super_xfer_partial, super_resume, super_wait)
7718 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7719 (fbsd_handle_debug_trap): Remove target_ops parameter.
7720 (fbsd_nat_add_target): Delete.
7721 * fbsd-nat.h: Include "inf-ptrace.h".
7722 (fbsd_nat_add_target): Delete.
7723 (USE_SIGTRAP_SIGINFO): Define.
7724 (fbsd_nat_target): New class.
7726 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7727 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7728 (amd64bsd_target): Delete.
7729 * amd64-bsd-nat.h: New file.
7730 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7732 (amd64_fbsd_nat_target): New class.
7733 (the_amd64_fbsd_nat_target): New.
7734 (amd64fbsd_read_description): Refactor as method of
7735 amd64_fbsd_nat_target.
7736 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7737 (_initialize_amd64fbsd_nat): Adjust to C++ification.
7738 * amd64-nat.h (amd64bsd_target): Delete function declaration.
7739 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7740 (i386bsd_store_inferior_registers): Remove target_ops parameter.
7741 (i386bsd_target): Delete.
7742 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7743 (i386bsd_fetch_inferior_registers)
7744 (i386bsd_store_inferior_registers): Declare.
7745 (i386_bsd_nat_target): New class.
7746 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7747 (the_i386_fbsd_nat_target): New.
7748 (i386fbsd_resume, i386fbsd_read_description): Refactor as
7749 i386_fbsd_nat_target methods.
7750 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7751 (_initialize_i386fbsd_nat): Adjust to C++ification.
7752 * x86-bsd-nat.c (super_mourn_inferior): Delete.
7753 (x86bsd_mourn_inferior, x86bsd_target): Delete.
7754 (_initialize_x86_bsd_nat): Adjust to C++ification.
7755 * x86-bsd-nat.h: Include "x86-nat.h".
7756 (x86bsd_target): Delete declaration.
7757 (x86bsd_nat_target): New class.
7759 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7760 (the_aarch64_fbsd_nat_target): New.
7761 (aarch64_fbsd_fetch_inferior_registers)
7762 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7763 aarch64_fbsd_nat_target.
7764 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7765 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7766 (the_alpha_bsd_nat_target): New.
7767 (alphabsd_fetch_inferior_registers)
7768 (alphabsd_store_inferior_registers): Refactor as
7769 alpha_bsd_nat_target methods.
7770 (_initialize_alphabsd_nat): Refactor as methods of
7771 alpha_bsd_nat_target.
7772 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7773 (the_amd64_nbsd_nat_target): New.
7774 (_initialize_amd64nbsd_nat): Adjust to C++ification.
7775 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7776 (the_amd64_obsd_nat_target): New.
7777 (_initialize_amd64obsd_nat): Adjust to C++ification.
7778 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7779 (the_arm_fbsd_nat_target): New.
7780 (arm_fbsd_fetch_inferior_registers)
7781 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7782 (_initialize_arm_fbsd_nat): Refactor as methods of
7783 arm_fbsd_nat_target.
7784 (_initialize_arm_fbsd_nat): Adjust to C++ification.
7785 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7786 (the_arm_netbsd_nat_target): New.
7787 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7788 arm_netbsd_nat_target.
7789 (_initialize_arm_netbsd_nat): Adjust to C++ification.
7790 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7791 (the_hppa_nbsd_nat_target): New.
7792 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7793 hppa_nbsd_nat_target methods.
7794 (_initialize_hppanbsd_nat): Adjust to C++ification.
7795 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7796 (the_hppa_obsd_nat_target): New.
7797 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7798 methods of hppa_obsd_nat_target.
7799 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
7801 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7802 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
7804 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7805 (_initialize_i386obsd_nat): Use add_target.
7806 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7807 (the_m68k_bsd_nat_target): New.
7808 (m68kbsd_fetch_inferior_registers)
7809 (m68kbsd_store_inferior_registers): Refactor as methods of
7810 m68k_bsd_nat_target.
7811 (_initialize_m68kbsd_nat): Adjust to C++ification.
7812 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7813 (the_mips_fbsd_nat_target): New.
7814 (mips_fbsd_fetch_inferior_registers)
7815 (mips_fbsd_store_inferior_registers): Refactor as methods of
7816 mips_fbsd_nat_target.
7817 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
7819 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7820 (the_mips_nbsd_nat_target): New.
7821 (mipsnbsd_fetch_inferior_registers)
7822 (mipsnbsd_store_inferior_registers): Refactor as methods of
7823 mips_nbsd_nat_target.
7824 (_initialize_mipsnbsd_nat): Adjust to C++ification.
7825 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7826 (the_mips64_obsd_nat_target): New.
7827 (mips64obsd_fetch_inferior_registers)
7828 (mips64obsd_store_inferior_registers): Refactor as methods of
7829 mips64_obsd_nat_target.
7830 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
7832 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7834 * nbsd-nat.h: Include "inf-ptrace.h".
7835 (nbsd_nat_target): New class.
7836 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7837 (obsd_wait): Refactor as methods of obsd_nat_target.
7838 (obsd_add_target): Delete.
7839 * obsd-nat.h: Include "inf-ptrace.h".
7840 (obsd_nat_target): New class.
7841 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7842 (the_ppc_fbsd_nat_target): New.
7843 (ppcfbsd_fetch_inferior_registers)
7844 (ppcfbsd_store_inferior_registers): Refactor as methods of
7845 ppc_fbsd_nat_target.
7846 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
7848 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7849 (the_ppc_nbsd_nat_target): New.
7850 (ppcnbsd_fetch_inferior_registers)
7851 (ppcnbsd_store_inferior_registers): Refactor as methods of
7852 ppc_nbsd_nat_target.
7853 (_initialize_ppcnbsd_nat): Adjust to C++ification.
7854 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7855 (the_ppc_obsd_nat_target): New.
7856 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7857 methods of ppc_obsd_nat_target.
7858 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
7860 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7861 (the_sh_nbsd_nat_target): New.
7862 (shnbsd_fetch_inferior_registers)
7863 (shnbsd_store_inferior_registers): Refactor as methods of
7865 (_initialize_shnbsd_nat): Adjust to C++ification.
7866 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7867 (inf_ptrace_xfer_partial): Delete.
7868 (sparc_xfer_partial, sparc_target): Delete.
7869 * sparc-nat.h (sparc_fetch_inferior_registers)
7870 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7871 (sparc_target): Delete function declaration.
7872 (sparc_target): New template class.
7873 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7874 (_initialize_sparcnbsd_nat): Adjust to C++ification.
7875 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7876 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
7878 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7879 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7880 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7881 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
7883 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7884 (the_vax_bsd_nat_target): New.
7885 (vaxbsd_fetch_inferior_registers)
7886 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7888 (_initialize_vaxbsd_nat): Adjust to C++ification.
7890 * bsd-kvm.c (bsd_kvm_target): New class.
7891 (bsd_kvm_ops): Now a bsd_kvm_target.
7892 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7893 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7894 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7896 (bsd_kvm_return_one): Delete.
7897 (bsd_kvm_add_target): Adjust to C++ification.
7899 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7900 (nto_procfs_target_procfs): New classes.
7901 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7902 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7903 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7904 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7905 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7906 (procfs_remove_hw_breakpoint, procfs_resume)
7907 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7908 (procfs_kill_inferior, procfs_store_registers)
7909 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7910 as methods of nto_procfs_target.
7911 (nto_procfs_ops): Now an nto_procfs_target_procfs.
7912 (nto_native_ops): Delete.
7913 (procfs_open, procfs_native_open): Delete.
7914 (nto_native_ops): Now an nto_procfs_target_native.
7915 (init_procfs_targets): Adjust to C++ification.
7916 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7917 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7918 Refactor as methods of nto_procfs_target.
7920 * go32-nat.c (go32_nat_target): New class.
7921 (the_go32_nat_target): New.
7922 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7923 (go32_store_registers, go32_xfer_partial, go32_files_info)
7924 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7925 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7926 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7927 (go32_pid_to_str): Refactor as methods of go32_nat_target.
7928 (go32_target): Delete.
7929 (_initialize_go32_nat): Adjust to C++ification.
7931 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7932 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7933 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7934 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7936 (gnu_target): Delete.
7937 * gnu-nat.h (gnu_target): Delete.
7938 (gnu_nat_target): New class.
7939 * i386-gnu-nat.c (gnu_base_target): New.
7940 (i386_gnu_nat_target): New class.
7941 (the_i386_gnu_nat_target): New.
7942 (_initialize_i386gnu_nat): Adjust to C++ification.
7944 2018-05-02 Pedro Alves <palves@redhat.com>
7946 * bfd-target.c (target_bfd_xclose): Rename to ...
7947 (target_bfd_close): ... this.
7948 (target_bfd_reopen): Adjust.
7949 * target.c (target_close): Remove references to to_xclose.
7950 * target.h (target_ops::to_xclose): Delete.
7951 (target_ops::to_close): Update comments.
7953 2018-05-02 Pedro Alves <palves@redhat.com>
7955 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7957 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7958 * inf-ptrace.c (inf_ptrace_register_u_offset)
7959 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7960 (inf_ptrace_store_register, inf_ptrace_store_registers)
7961 (inf_ptrace_trad_target): Move to ...
7962 * linux-nat-trad.c: ... this new file.
7963 * linux-nat-trad.h: New file.
7964 * linux-nat.c (linux_target_install_ops): Make extern.
7965 (linux_trad_target): Delete.
7966 * linux-nat.h (linux_trad_target): Delete declaration.
7967 (linux_target_install_ops): Declare.
7968 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7971 2018-05-02 Pedro Alves <palves@redhat.com>
7973 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7974 procfs_target/add_target here.
7975 * procfs.c (procfs_target): Make static.
7976 (_initialize_procfs): Call add_target here.
7977 * procfs.h (struct target_ops): Remove forward declaration.
7978 (procfs_target): Remove declaration.
7979 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7981 2018-05-02 Pedro Alves <palves@redhat.com>
7983 * procfs.c (procfs_stopped_by_watchpoint)
7984 (procfs_insert_watchpoint, procfs_remove_watchpoint)
7985 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7987 (procfs_use_watchpoints): Delete, move contents...
7988 (procfs_target): ... here.
7989 * procfs.h (procfs_use_watchpoints): Delete declaration.
7990 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7991 procfs_use_watchpoints.
7992 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7993 procfs_use_watchpoints.
7995 2018-05-02 Tom Tromey <tom@tromey.com>
7998 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7999 and var_zuinteger_unlimited.
8000 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8001 and PARAM_ZUINTEGER_UNLIMITED.
8002 (set_parameter_value): Handle var_zuinteger and
8003 var_zuinteger_unlimited.
8004 (add_setshow_generic): Likewise.
8005 (parmpy_init): Likewise.
8007 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
8010 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8011 pointer is not null before dereferencing it.
8013 2018-04-30 Tom Tromey <tom@tromey.com>
8015 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8018 2018-04-30 Tom Tromey <tom@tromey.com>
8020 * breakpoint.c (mention): Remove use of is_mi_like_p.
8021 (print_mention_ranged_breakpoint): Likewise.
8022 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8025 2018-04-30 Tom Tromey <tom@tromey.com>
8027 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8029 2018-04-30 Tom Tromey <tom@tromey.com>
8031 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8032 (info_spu_event_command): Remove some uses of is_mi_like_p.
8034 2018-04-30 Tom Tromey <tom@tromey.com>
8036 * python/py-framefilter.c (py_print_single_arg)
8037 (enumerate_locals, py_print_args, py_print_frame): Remove some
8038 uses of is_mi_like_p.
8040 2018-04-30 Tom Tromey <tom@tromey.com>
8043 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8044 * ui-out.h (ui_out::is_mi_like_p): Now const.
8045 (ui_out::do_is_mi_like_p): Now const.
8046 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8048 2018-04-30 Tom Tromey <tom@tromey.com>
8050 * varobj.c (varobj_set_visualizer): Use new_reference.
8051 * python/python.c (gdbpy_decode_line): Use new_reference.
8052 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8055 2018-04-30 Tom Tromey <tom@tromey.com>
8057 * varobj.c (install_new_value): Use new_reference.
8058 * value.h (value_incref): Return void. Swap intro comment with
8060 * value.c (set_value_parent): Use new_reference.
8061 (value_incref): Return void. Update intro comment.
8062 (release_value): Use new_reference.
8063 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8065 2018-04-30 Tom Tromey <tom@tromey.com>
8067 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8068 * gdb_bfd.h (new_bfd_ref): Remove.
8069 (gdb_bfd_open): Update comment.
8070 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8071 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8072 (gdb_bfd_fdopenr): Use new_reference.
8073 * exec.c (exec_file_attach): Use new_reference.
8075 2018-04-30 Tom Tromey <tom@tromey.com>
8077 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8080 2018-04-30 Tom Tromey <tom@tromey.com>
8082 * jit.c (jit_read_code_entry): Use type_align.
8083 * i386-tdep.c (i386_gdbarch_init): Don't call
8084 set_gdbarch_long_long_align_bit.
8085 * gdbarch.sh: Remove long_long_align_bit.
8086 * gdbarch.c, gdbarch.h: Rebuild.
8087 * arc-tdep.c (arc_type_align): New function.
8088 (arc_gdbarch_init): Use arc_type_align. Don't call
8089 set_gdbarch_long_long_align_bit.
8091 2018-04-30 Tom Tromey <tom@tromey.com>
8093 * rust-lang.c (rust_type_alignment): Remove.
8094 (rust_composite_type): Use type_align.
8096 2018-04-30 Tom Tromey <tom@tromey.com>
8098 * NEWS: Mention Type.align.
8099 * python/py-type.c (typy_get_alignof): New function.
8100 (type_object_getset): Add "alignof".
8102 2018-04-30 Tom Tromey <tom@tromey.com>
8106 * std-operator.def (UNOP_ALIGNOF): New operator.
8107 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8109 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8110 * c-lang.c (c_op_print_tab): Add alignof.
8111 * c-exp.y (ALIGNOF): New token.
8112 (exp): Add "ALIGNOF" production.
8113 (ident_tokens): Add _Alignof and alignof.
8115 2018-04-30 Tom Tromey <tom@tromey.com>
8117 * i386-tdep.c (i386_type_align): New function.
8118 (i386_gdbarch_init): Update.
8119 * gdbarch.sh (type_align): New method.
8120 * gdbarch.c, gdbarch.h: Rebuild.
8121 * arch-utils.h (default_type_align): Declare.
8122 * arch-utils.c (default_type_align): New function.
8123 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8124 (struct type) <align_log2>: New field.
8125 <instance_flags>: Now a bitfield.
8126 (TYPE_RAW_ALIGN): New macro.
8127 (type_align, type_raw_align, set_type_align): Declare.
8128 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8130 * dwarf2read.c (quirk_rust_enum): Set type alignment.
8131 (get_alignment, maybe_set_alignment): New functions.
8132 (read_structure_type, read_enumeration_type, read_array_type)
8133 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8134 (read_subrange_type, read_base_type): Set type alignment.
8136 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
8138 * dwarf2read.c (read_index_from_section): Use bool.
8140 2018-04-29 Fabian Groffen <grobian@gentoo.org>
8143 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8146 2018-04-29 John Reiser <jreiser@BitWagon.com>
8149 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8150 last step, and do it atomically.
8152 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
8154 * compile/compile-c-types.c (convert_int, convert_float):
8157 2018-04-27 Tom Tromey <tom@tromey.com>
8160 * rust-lang.c (rust_inclusive_range_type_p): New function.
8161 (rust_range): Handle inclusive ranges.
8162 (rust_compute_range): Likewise.
8163 * rust-exp.y (struct rust_op) <inclusive>: New field.
8164 (DOTDOTEQ): New constant.
8165 (range_expr): Add "..=" productions.
8166 (operator_tokens): Add "..=" token.
8167 (ast_range): Add "inclusive" parameter.
8168 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8170 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8172 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8173 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8175 * expprint.c (print_subexp_standard): Handle new bounds values.
8176 (dump_subexp_body_standard): Likewise.
8178 2018-04-27 Tom Tromey <tom@tromey.com>
8180 * configure: Rebuild.
8181 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8182 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8184 (class symbol_needs_eval_context): Likewise.
8185 * dwarf2read.c (mock_mapped_index::symbol_name_count)
8186 (mock_mapped_index::symbol_name_at): Use "override". Remove
8188 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8190 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8191 * aarch64-tdep.c (instruction_reader::read): Use "override".
8192 (instruction_reader_test::read): Likewise.
8193 * arm-tdep.c (instruction_reader::read): Use "override".
8194 (instruction_reader_thumb::read): Likewise.
8196 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
8199 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8200 instead of remote_send.
8201 (remote_send): Remove.
8203 2018-04-26 Pedro Alves <palves@redhat.com>
8205 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8206 find_function_start_sal instead of find_pc_line.
8208 2018-04-26 Pedro Alves <palves@redhat.com>
8210 * breakpoint.c (set_breakpoint_location_function): Handle
8212 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8213 * elfread.c (elf_symtab_read): Give data symbols with
8214 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8215 (elf_rel_plt_read): Update comment.
8216 * linespec.c (convert_linespec_to_sals): Handle
8218 (minsym_found): Handle mst_data_gnu_ifunc.
8219 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8220 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8221 * parse.c (find_minsym_type_and_address): Handle
8223 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8224 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8225 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8227 <mst_data_gnu_ifunc>: New enumerator.
8229 2018-04-26 Pedro Alves <palves@redhat.com>
8231 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8232 (lookup_minimal_symbol_by_pc_section): ... this. Replace
8233 'want_trampoline' parameter by a lookup_msym_prefer parameter.
8235 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8236 (lookup_minimal_symbol_by_pc): Adjust.
8237 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8238 (lookup_solib_trampoline_symbol_by_pc): Adjust.
8239 * minsyms.h (lookup_msym_prefer): New enum.
8240 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8241 parameter by a lookup_msym_prefer parameter.
8243 2018-04-26 Pedro Alves <palves@redhat.com>
8245 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8246 ends in "@plt" instead of looking at the symbol's section.
8248 2018-04-26 Pedro Alves <palves@redhat.com>
8250 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
8252 (find_pc_partial_function_gnu_ifunc): Rename to ...
8253 (find_pc_partial_function): ... this, and remove references to
8255 (find_pc_partial_function): Delete old implementation.
8256 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8258 2018-04-26 Pedro Alves <palves@redhat.com>
8260 * linespec.c (struct bound_minimal_symbol_search_key): New.
8261 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
8262 skip first line if we found a GNU ifunc minimal symbol by name.
8263 (compare_msymbols): Change parameters to work with a destructured
8265 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8268 2018-04-26 Pedro Alves <palves@redhat.com>
8270 * breakpoint.c (set_breakpoint_location_function): Don't resolve
8271 ifunc targets here. Instead, if we have an ifunc minsym, use its
8273 (add_location_to_breakpoint): Store the minsym and the objfile in
8274 the breakpoint location.
8275 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8276 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8277 Record the minsym in the sal.
8278 * symtab.h (symtab_and_line) <msymbol>: New field.
8280 2018-04-26 Pedro Alves <palves@redhat.com>
8282 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8283 unless we actually resolved the ifunc.
8285 2018-04-26 Pedro Alves <palves@redhat.com>
8287 * c-exp.y (variable production): Prefer ifunc minsyms over
8288 regular function symbols.
8289 * symtab.c (find_gnu_ifunc): New function.
8290 * minsyms.h (lookup_msym_prefer): New enum.
8291 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8292 parameter by a lookup_msym_prefer parameter.
8293 * symtab.h (find_gnu_ifunc): New declaration.
8295 2018-04-26 Pedro Alves <palves@redhat.com>
8297 * blockframe.c (find_gnu_ifunc_target_type): New function.
8298 (find_function_type): New.
8299 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8300 return a value with a memory address.
8301 (eval_call): For calls to GNU ifunc functions, try to find the
8302 type of the target function from the type that the resolver
8304 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8306 * infcall.c (find_function_return_type): Delete.
8307 (find_function_addr): Add 'function_type' parameter. For calls to
8308 GNU ifunc functions, try to find the type of the target function
8309 from the type that the resolver returns, and return it via
8311 (call_function_by_hand_dummy): Adjust to use the function type
8312 returned by find_function_addr.
8313 (find_function_addr): Add 'function_type' parameter and move
8315 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8318 2018-04-26 Pedro Alves <palves@redhat.com>
8320 * c-exp.y (variable production): Skip finding an alias for ifunc
8323 2018-04-26 Pedro Alves <palves@redhat.com>
8325 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8327 2018-04-25 Pedro Alves <palves@redhat.com>
8329 * infcmd.c (kill_command): Print the pid as string, not the whole
8330 thread's ptid. Add comment. s/has been killed/killed/ in output
8332 * remote.c (remote_detach_1): Print the pid as string, not the
8333 whole thread's ptid.
8335 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8336 Sergio Durigan Junior <sergiodj@redhat.com>
8337 Pedro Alves <palves@redhat.com>
8339 * infcmd.c (kill_command): Print message when inferior has
8341 * inferior.c (print_inferior_events): Remove 'static'. Set as
8343 (add_inferior): Improve message printed when
8344 'print_inferior_events' is on.
8345 (exit_inferior): Remove message printed when
8346 'print_inferior_events' is on.
8347 (detach_inferior): Improve message printed when
8348 'print_inferior_events' is on.
8349 (initialize_inferiors): Use 'add_inferior_silent' to set
8350 'current_inferior_'.
8351 * inferior.h (print_inferior_events): Declare here as
8353 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8354 '[Detaching...]' messages when 'print_inferior_events' is on.
8355 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
8356 as prefix/suffix for messages. Remove periods. Fix erroneous
8357 'Detaching after fork from child...', replace it by '... from
8359 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8360 prefix/suffix when printing 'Detaching...' messages. Print
8361 them when 'print_inferior_events' is on.
8362 * remote.c (remote_detach_1): Print message when detaching
8363 from inferior and '!is_fork_parent'.
8365 2018-04-24 Tom Tromey <tom@tromey.com>
8367 * cli-out.h: Reindent.
8369 2018-04-24 Tom Tromey <tom@tromey.com>
8371 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8372 (cli_ui_out::do_field_string): Use fputs_filtered.
8373 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8375 2018-04-23 Tom Tromey <tom@tromey.com>
8377 * guile/scm-frame.c (gdbscm_frame_read_var): Use
8378 gdb::unique_xmalloc_ptr.
8380 2018-04-23 Tom Tromey <tom@tromey.com>
8382 * configure: Rebuild.
8384 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
8387 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8388 prepare_for_testing. Set normal_bp to r_debug_state if target
8391 2018-04-21 Pedro Alves <palves@redhat.com>
8392 Rajendra SY <rajendra.sy@gmail.com>
8394 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8395 * remote.c (extended_remote_attach): In all-stop mode, mark the
8396 thread as executing.
8398 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8400 * thread.c (thread_apply_all_command): Fix comment.
8401 (thread_command): Fix comment.
8403 2018-04-10 Alan Hayward <alan.hayward@arm.com>
8405 * common/tdesc.h (tdesc_create_feature): Remove xml filename
8407 * features/aarch64-core.c (create_feature_aarch64_core):
8409 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8411 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8413 * features/i386/32bit-avx512.c
8414 (create_feature_i386_32bit_avx512): Likewise.
8415 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8417 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8419 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8421 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8423 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8425 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8427 * features/i386/64bit-avx512.c
8428 (create_feature_i386_64bit_avx512): Likewise.
8429 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8431 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8433 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8435 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8437 * features/i386/64bit-segments.c
8438 (create_feature_i386_64bit_segments): Likewise.
8439 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8441 * features/i386/x32-core.c
8442 (create_feature_i386_x32_core): Likewise.
8443 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8444 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8445 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8446 * target-descriptions.c: In generated code, don't pass xml
8449 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8451 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8452 (print_xml_feature::visit_post): Likewise.
8453 (print_xml_feature::visit): Likewise.
8454 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8455 (print_xml_feature): Add new class.
8456 * regformats/regdat.sh: Null xmltarget on feature targets.
8457 * target-descriptions.c (struct target_desc): Add xmltarget.
8458 (maintenance_check_tdesc_xml_convert): Add unittest function.
8459 (tdesc_get_features_xml): Add function to get xml.
8460 (maintenance_check_xml_descriptions): Test xml generation.
8461 * xml-tdesc.c (string_read_description_xml): Add function.
8462 * xml-tdesc.h (string_read_description_xml): Add declaration.
8464 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8466 * features/Makefile: Add feature marker to targets with new style
8467 target descriptions.
8468 * regformats/aarch64.dat: Regenerate.
8469 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8470 * regformats/i386/amd64-avx-linux.dat: Likewise.
8471 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8472 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8473 * regformats/i386/amd64-linux.dat: Likewise.
8474 * regformats/i386/amd64-mpx-linux.dat: Likewise.
8475 * regformats/i386/amd64.dat: Likewise.
8476 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8477 * regformats/i386/i386-avx-linux.dat: Likewise.
8478 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8479 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8480 * regformats/i386/i386-linux.dat: Likewise.
8481 * regformats/i386/i386-mmx-linux.dat: Likewise.
8482 * regformats/i386/i386-mpx-linux.dat: Likewise.
8483 * regformats/i386/i386.dat: Likewise.
8484 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8485 * regformats/i386/x32-avx-linux.dat: Likewise.
8486 * regformats/i386/x32-linux.dat: Likewise.
8487 * regformats/tic6x-c62x-linux.dat: Likewise.
8488 * regformats/tic6x-c64x-linux.dat: Likewise.
8489 * regformats/tic6x-c64xp-linux.dat: Likewise.
8490 * regformats/regdat.sh: Parse feature marker.
8492 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8494 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8495 (tdesc_osabi_name): Likewise.
8496 * target-descriptions.c (tdesc_architecture_name): Add new
8498 (tdesc_osabi_name): Likewise.
8500 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8502 * common/tdesc.c (tdesc_predefined_type): Move to here.
8503 (tdesc_named_type): Likewise.
8504 (tdesc_create_vector): Likewise.
8505 (tdesc_create_struct): Likewise.
8506 (tdesc_set_struct_size): Likewise.
8507 (tdesc_create_union): Likewise.
8508 (tdesc_create_flags): Likewise.
8509 (tdesc_create_enum): Likewise.
8510 (tdesc_add_field): Likewise.
8511 (tdesc_add_typed_bitfield): Likewise.
8512 (tdesc_add_bitfield): Likewise.
8513 (tdesc_add_flag): Likewise.
8514 (tdesc_add_enum_value): Likewise.
8515 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8516 (struct tdesc_type_vector): Likewise.
8517 (struct tdesc_type_field): Likewise.
8518 (struct tdesc_type_with_fields): Likewise.
8519 (tdesc_create_enum): Add declaration.
8520 (tdesc_add_typed_bitfield): Likewise.
8521 (tdesc_add_enum_value): Likewise.
8522 * target-descriptions.c (tdesc_type_field): Move from here.
8523 (tdesc_type_builtin): Likewise.
8524 (tdesc_type_vector): Likewise.
8525 (tdesc_type_with_fields): Likewise.
8526 (tdesc_predefined_types): Likewise.
8527 (tdesc_named_type): Likewise.
8528 (tdesc_create_vector): Likewise.
8529 (tdesc_create_struct): Likewise.
8530 (tdesc_set_struct_size): Likewise.
8531 (tdesc_create_union): Likewise.
8532 (tdesc_create_flags): Likewise.
8533 (tdesc_create_enum): Likewise.
8534 (tdesc_add_field): Likewise.
8535 (tdesc_add_typed_bitfield): Likewise.
8536 (tdesc_add_bitfield): Likewise.
8537 (tdesc_add_flag): Likewise.
8538 (tdesc_add_enum_value): Likewise.
8539 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8540 (tdesc_add_typed_bitfield): Likewise.
8541 (tdesc_add_enum_value): Likewise.
8543 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8545 * common/tdesc.c (tdesc_feature::accept): Move to here.
8546 (tdesc_feature::operator==): Likewise.
8547 (tdesc_create_reg): Likewise.
8548 * common/tdesc.h (tdesc_type_kind): Likewise.
8549 (struct tdesc_type): Likewise.
8550 (struct tdesc_feature): Likewise.
8551 * regformats/regdat.sh: Create a feature.
8552 * target-descriptions.c (tdesc_type_kind): Move from here.
8553 (tdesc_type): Likewise.
8554 (tdesc_type_up): Likewise.
8555 (tdesc_feature): Likewise.
8556 (tdesc_create_reg): Likewise.
8558 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8560 * Makefile.in: Add arch/tdesc.c
8561 * common/tdesc.c: New file.
8562 * common/tdesc.h (tdesc_element_visitor): Move to here.
8563 (tdesc_element): Likewise.
8564 (tdesc_reg): Likewise.
8565 (tdesc_reg_up): Likewise.
8566 * regformats/regdef.h (reg): Add offset to constructors.
8567 * target-descriptions.c (tdesc_element_visitor): Move from here.
8568 (tdesc_element): Likewise.
8569 (tdesc_reg): Likewise.
8570 (tdesc_reg_up): Likewise.
8572 2018-04-17 Tom Tromey <tom@tromey.com>
8574 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8577 2018-04-17 Tom Tromey <tom@tromey.com>
8579 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8581 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
8583 * symtab.c (print_symbol_info): Skip printing filename and line
8584 number when `last' is NULL.
8585 (symtab_symbol_info): Use empty string instead of NULL for first
8586 invocation of print_symbol_info.
8587 (rbreak_command): Pass NULL to `last' parameter of
8590 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
8592 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8595 2018-04-16 Pedro Alves <palves@redhat.com>
8597 * MAINTAINERS (sh): Remove.
8598 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8599 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8600 (ALLDEPFILES): Remove sh64-tdep.c.
8601 * NEWS: Mentions that support for SH-5/SH64 is removed.
8602 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8603 (sh*-*-openbsd*): Ditto.
8604 (sh64-*-elf*): Remove.
8606 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8607 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8608 * sh-tdep.c: No longer include "sh64-tdep.h".
8609 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8610 * sh64-tdep.c, sh64-tdep.h: Remove files.
8612 2018-04-16 Pedro Alves <palves@redhat.com>
8614 * MAINTAINERS: Remove m88k.
8615 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8616 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8617 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8618 * NEWS: Mention that support for m88k was removed.
8619 * configure.host (m88*-*-*): Remove support.
8620 * configure.nat (m88k-*-*): Remove support.
8621 * configure.tgt (m88*-*-openbsd*): Remove.
8622 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8624 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
8626 * configure.tgt (x86_tobjs): New variable.
8627 (amd64_tobjs, i386_tobjs): Use it.
8629 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8631 * symtab.c (print_symbol_info): Precede the symbol definition by
8632 the line number when available.
8633 * NEWS: Advertise this enhancement.
8635 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8637 * NEWS (New options): announce set/show record btrace cpu.
8638 * btrace.c: Include record-btrace.h.
8639 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8640 the vendor is unknown.
8641 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
8642 Maybe overwrite the btrace configuration's cpu.
8643 (btrace_compute_ftrace): Add cpu parameter. Update callers.
8644 (btrace_fetch): Add cpu parameter. Update callers.
8645 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8646 Maybe overwrite the btrace configuration's cpu. Skip enabling
8647 errata workarounds if the vendor is unknown.
8648 * python/py-record-btrace.c: Include record-btrace.h.
8649 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8650 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8651 * record-btrace.c (record_btrace_cpu_state_kind): New.
8652 (record_btrace_cpu): New.
8653 (set_record_btrace_cpu_cmdlist): New.
8654 (record_btrace_get_cpu): New.
8655 (require_btrace_thread, record_btrace_info)
8656 (record_btrace_resume_thread): Call record_btrace_get_cpu.
8657 (cmd_set_record_btrace_cpu_none): New.
8658 (cmd_set_record_btrace_cpu_auto): New.
8659 (cmd_set_record_btrace_cpu): New.
8660 (cmd_show_record_btrace_cpu): New.
8661 (_initialize_record_btrace): Initialize set/show record btrace cpu
8663 * record-btrace.h (record_btrace_get_cpu): New.
8665 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8667 * record.c (set_record_command): Fix typo in message.
8669 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8671 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8673 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8675 * infrun.c (process_event_stop_test): Call
8676 gdbarch_in_indirect_branch_thunk.
8677 * gdbarch.sh (in_indirect_branch_thunk): New.
8678 * gdbarch.c: Regenerated.
8679 * gdbarch.h: Regenerated.
8682 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8683 (HFILES_NO_SRCDIR): Add x86-tdep.h.
8684 (ALLDEPFILES): Add x86-tdep.c.
8685 * arch-utils.h (default_in_indirect_branch_thunk): New.
8686 * arch-utils.c (default_in_indirect_branch_thunk): New.
8687 * i386-tdep: Include x86-tdep.h.
8688 (i386_in_indirect_branch_thunk): New.
8689 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8691 * amd64-tdep: Include x86-tdep.h.
8692 (amd64_in_indirect_branch_thunk): New.
8693 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8695 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8698 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8699 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8700 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8703 2018-04-12 Tom Tromey <tom@tromey.com>
8705 * rust-lang.c (rust_print_struct_def): Remove univariant code.
8706 (rust_evaluate_subexp): Likewise.
8708 2018-04-12 Pedro Alves <palves@redhat.com>
8710 * procfs.c (procfs_detach): Make forward declaration's prototype
8711 match definition's protototype.
8712 (proc_get_LDT_entry): Remove stale do_cleanups call.
8714 2018-04-12 Pedro Alves <palves@redhat.com>
8716 * target.h (target_ops::to_has_exited): Delete.
8717 (target_has_exited): Delete.
8718 * target-delegates.c: Regenerate.
8720 2018-04-11 Pedro Alves <palves@redhat.com>
8722 * target.c (fileio_fh_t::t): Add comment.
8723 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8724 (target_fileio_close): Handle a NULL target.
8725 (invalidate_fileio_fh): New.
8726 (target_close): Call it.
8727 * remote.c (remote_hostio_send_command): No longer check whether
8728 remote_desc is open.
8730 2018-04-11 Pedro Alves <palves@redhat.com>
8732 * target.c (fileio_fh_t): Make it a named struct instead of a
8734 (fileio_fh_t::is_closed): New method.
8735 (DEF_VEC_O (fileio_fh_t)): Remove.
8736 (fileio_fhandles): Now a std::vector.
8737 (is_closed_fileio_fh): Delete.
8738 (acquire_fileio_fd): Adjust. Rename parameters.
8739 (release_fileio_fd): Adjust.
8740 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8741 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8742 (target_fileio_close): Adjust.
8744 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
8746 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8749 2018-04-10 Pedro Alves <palves@redhat.com>
8751 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8752 (scoped_finish_thread_state): New class.
8753 * infcmd.c (run_command_1): Use it instead of finish_thread_state
8755 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8756 (fetch_inferior_event, normal_stop): Likewise.
8757 * thread.c (finish_thread_state_cleanup): Delete.
8759 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8760 Pedro Alves <palves@redhat.com>
8762 * value.c: Include "selftest.h" and "common/array-view.h".
8763 (struct range) <operator ==>: New.
8764 (test_ranges_contain): New.
8765 (check_ranges_vector): New.
8766 (test_insert_into_bit_range_vector): New.
8767 (_initialize_values): Register selftests.
8768 * common/array-view.h (operator==, operator!=): New.
8770 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8772 * common/gdb_vecs.h (unordered_remove): Add overload that takes
8774 * inline-frame.c: Include <algorithm>.
8775 (struct inline_state): Add constructor.
8776 (inline_state_s): Remove.
8777 (DEF_VEC_O(inline_state_s)): Remove.
8778 (inline_states): Change type to std::vector.
8779 (find_inline_frame_state): Adjust to std::vector.
8780 (allocate_inline_frame_state): Remove.
8781 (clear_inline_frame_state): Adjust to std::vector.
8782 (skip_inline_frames): Adjust to std::vector.
8784 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8786 * tracepoint.h (struct trace_state_variable): Add constructor.
8787 <name>: Change type to std::string.
8788 * tracepoint.c (tsv_s): Remove.
8789 (DEF_VEC_O(tsv_s)): Remove.
8790 (tvariables): Change to std::vector.
8791 (create_trace_state_variable): Adjust to std::vector.
8792 (find_trace_state_variable): Likewise.
8793 (find_trace_state_variable_by_number): Likewise.
8794 (delete_trace_state_variable): Likewise.
8795 (trace_variable_command): Adjust to std::string.
8796 (delete_trace_variable_command): Likewise.
8797 (tvariables_info_1): Adjust to std::vector.
8798 (save_trace_state_variables): Likewise.
8799 (start_tracing): Likewise.
8800 (merge_uploaded_trace_state_variables): Adjust to std::vector
8802 * target.h (struct target_ops)
8803 <to_download_trace_state_variable>: Pass reference to
8804 trace_state_variable.
8805 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8806 * target-delegates.c: Re-generate.
8807 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8808 (mi_tsv_deleted): Likewise.
8809 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8810 * remote.c (remote_download_trace_state_variable): Change
8811 pointer to reference and adjust.
8812 * make-target-delegates (parse_argtypes): Handle references.
8813 (write_function_header): Likewise.
8814 (munge_type): Likewise.
8816 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8818 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8819 string_view-selftests.c.
8820 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8822 * unittests/basic_string_view/cons/char/1.cc: Likewise.
8823 * unittests/basic_string_view/cons/char/2.cc: Likewise.
8824 * unittests/basic_string_view/cons/char/3.cc: Likewise.
8825 * unittests/basic_string_view/element_access/char/1.cc:
8827 * unittests/basic_string_view/element_access/char/empty.cc:
8829 * unittests/basic_string_view/element_access/char/front_back.cc:
8831 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8832 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8834 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8836 * unittests/basic_string_view/modifiers/swap/char/1.cc:
8838 * unittests/basic_string_view/operations/compare/char/1.cc:
8840 * unittests/basic_string_view/operations/compare/char/13650.cc:
8842 * unittests/basic_string_view/operations/copy/char/1.cc:
8844 * unittests/basic_string_view/operations/data/char/1.cc:
8846 * unittests/basic_string_view/operations/find/char/1.cc:
8848 * unittests/basic_string_view/operations/find/char/2.cc:
8850 * unittests/basic_string_view/operations/find/char/3.cc:
8852 * unittests/basic_string_view/operations/find/char/4.cc:
8854 * unittests/basic_string_view/operations/rfind/char/1.cc:
8856 * unittests/basic_string_view/operations/rfind/char/2.cc:
8858 * unittests/basic_string_view/operations/rfind/char/3.cc:
8860 * unittests/basic_string_view/operations/substr/char/1.cc:
8862 * unittests/basic_string_view/operators/char/2.cc: Likewise.
8863 * unittests/string_view-selftests.c: New file.
8865 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8867 * unittests/basic_string_view/capacity/1.cc: New file.
8868 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8869 * unittests/basic_string_view/cons/char/1.cc: New file.
8870 * unittests/basic_string_view/cons/char/2.cc: New file.
8871 * unittests/basic_string_view/cons/char/3.cc: New file.
8872 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8873 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8874 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8875 * unittests/basic_string_view/element_access/char/1.cc: New file.
8876 * unittests/basic_string_view/element_access/char/2.cc: New file.
8877 * unittests/basic_string_view/element_access/char/empty.cc: New file.
8878 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8879 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8880 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8881 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8882 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8883 * unittests/basic_string_view/include.cc: New file.
8884 * unittests/basic_string_view/inserters/char/1.cc: New file.
8885 * unittests/basic_string_view/inserters/char/2.cc: New file.
8886 * unittests/basic_string_view/inserters/char/3.cc: New file.
8887 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8888 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8889 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8890 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8891 * unittests/basic_string_view/literals/types.cc: New file.
8892 * unittests/basic_string_view/literals/values.cc: New file.
8893 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8894 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8895 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8896 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8897 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8898 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8899 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8900 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8901 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8902 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8903 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8904 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8905 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8906 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8907 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8908 * unittests/basic_string_view/operations/data/char/1.cc: New file.
8909 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8910 * unittests/basic_string_view/operations/find/char/1.cc: New file.
8911 * unittests/basic_string_view/operations/find/char/2.cc: New file.
8912 * unittests/basic_string_view/operations/find/char/3.cc: New file.
8913 * unittests/basic_string_view/operations/find/char/4.cc: New file.
8914 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8915 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8916 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8917 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8918 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8919 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8920 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8921 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8922 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8923 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8924 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8925 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8926 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8927 * unittests/basic_string_view/operators/char/2.cc: New file.
8928 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8929 * unittests/basic_string_view/range_access/char/1.cc: New file.
8930 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8931 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8932 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8933 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8934 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8935 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8936 * unittests/basic_string_view/requirements/typedefs.cc: New file.
8937 * unittests/basic_string_view/typedefs.cc: New file.
8938 * unittests/basic_string_view/types/1.cc: New file.
8940 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8942 * common/gdb_string_view.h: Remove libstdc++ implementation
8943 details, adjust to gdb reality.
8944 * common/gdb_string_view.tcc: Likewise.
8945 * cli/cli-script.c (struct string_view): Remove.
8946 (user_args) <m_args>: Change element type to gdb::string_view.
8947 (user_args::insert_args): Adjust.
8949 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8951 * common/gdb_string_view.h: New file.
8952 * common/gdb_string_view.tcc: New file.
8954 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8956 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8957 * configure: Re-generate.
8959 2018-04-09 Pedro Alves <palves@redhat.com>
8961 * gdbarch.sh: Include "observable.h" instead of "observer.h".
8962 (set_target_gdbarch): Call
8963 gdb::observers::architecture_changed.notify instead of
8964 observer_notify_architecture_changed.
8966 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8968 * tracepoint.c (struct current_traceframe_cleanup): Remove.
8969 (do_restore_current_traceframe_cleanup): Remove.
8970 (restore_current_traceframe_cleanup_dtor): Remove.
8971 (make_cleanup_restore_current_traceframe): Remove.
8972 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8974 * tracepoint.h (struct scoped_restore_current_traceframe): New.
8975 * infrun.c (fetch_inferior_event): Use
8976 scoped_restore_current_traceframe.
8978 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8980 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8982 <n_allocated_type_units>: Remove.
8983 <all_type_units>: Change to std::vector.
8984 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8985 to std::vector change.
8986 (dwarf2_per_objfile::get_cutu): Likewise.
8987 (dwarf2_per_objfile::get_tu): Likewise.
8988 (create_signatured_type_table_from_index): Likewise.
8989 (create_signatured_type_table_from_debug_names): Likewise.
8990 (dw2_symtab_iter_next): Likewise.
8991 (dw2_print_stats): Likewise.
8992 (dw2_expand_all_symtabs): Likewise.
8993 (dw2_expand_marked_cus): Likewise.
8994 (dw2_debug_names_iterator::next): Likewise.
8995 (dwarf2_initialize_objfile): Likewise.
8996 (add_signatured_type_cu_to_table): Likewise.
8997 (create_all_type_units): Likewise.
8998 (add_type_unit): Likewise.
8999 (struct tu_abbrev_offset): Add constructor.
9000 (build_type_psymtabs_1): Adjust to std::vector change.
9001 (print_tu_stats): Likewise.
9002 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9003 (write_debug_names): Likewise.
9005 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9007 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9008 Make an std::vector.
9009 <n_comp_units>: Remove.
9010 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9011 to std::vector change.
9012 (dwarf2_per_objfile::get_cutu): Likewise.
9013 (dwarf2_per_objfile::get_cu): Likewise.
9014 (create_cus_from_index): Likewise.
9015 (create_addrmap_from_index): Likewise.
9016 (create_addrmap_from_aranges): Likewise.
9017 (dwarf2_read_index): Likewise.
9018 (dw2_find_last_source_symtab): Likewise.
9019 (dw2_map_symtabs_matching_filename): Likewise.
9020 (dw2_symtab_iter_next): Likewise.
9021 (dw2_print_stats): Likewise.
9022 (dw2_expand_all_symtabs): Likewise.
9023 (dw2_expand_symtabs_with_fullname): Likewise.
9024 (dw2_expand_marked_cus): Likewise.
9025 (dw2_map_symbol_filenames): Likewise.
9026 (create_cus_from_debug_names): Likewise.
9027 (dwarf2_read_debug_names): Likewise.
9028 (dw2_debug_names_iterator::next): Likewise.
9029 (dwarf2_initialize_objfile): Likewise.
9030 (set_partial_user): Likewise.
9031 (dwarf2_build_psymtabs_hard): Likewise.
9032 (read_comp_units_from_section): Remove arguments, adjust to
9034 (create_all_comp_units): Adjust to std::vector and
9035 read_comp_units_from_section changes.
9036 (dwarf2_find_containing_comp_unit): Adjust to std::vector
9038 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9039 (psyms_seen_size): Likewise.
9040 (write_gdbindex): Likewise.
9041 (write_debug_names): Likewise.
9043 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9045 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9046 with dwarf2_per_objfile.
9047 (create_cus_from_index): Likewise.
9048 (create_signatured_type_table_from_index): Likewise.
9049 (dwarf2_read_index): Likewise.
9050 (dwarf2_initialize_objfile): Likewise.
9051 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
9052 per_cu rather than get_dwarf2_per_objfile.
9054 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9056 * dwarf2read.h (struct signatured_type): Forward declare.
9057 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9059 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9060 (dw2_get_cutu): ...this.
9061 (dwarf2_per_objfile::get_cu): Rename from...
9062 (dw2_get_cu): ...this.
9063 (dwarf2_per_objfile::get_tu): New.
9064 (create_addrmap_from_index): Adjust.
9065 (create_addrmap_from_aranges): Adjust.
9066 (dw2_find_last_source_symtab): Adjust.
9067 (dw2_map_symtabs_matching_filename): Adjust.
9068 (dw2_symtab_iter_next): Adjust.
9069 (dw2_print_stats): Adjust.
9070 (dw2_expand_all_symtabs): Adjust.
9071 (dw2_expand_symtabs_with_fullname): Adjust.
9072 (dw2_expand_marked_cus): Adjust.
9073 (dw_expand_symtabs_matching_file_matcher): Adjust.
9074 (dw2_map_symbol_filenames): Adjust.
9075 (dw2_debug_names_iterator::next): Adjust.
9076 (dwarf2_initialize_objfile): Adjust.
9077 (set_partial_user): Adjust.
9078 (dwarf2_build_psymtabs_hard): Adjust.
9080 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9082 * dwarf2read.c (create_signatured_type_table_from_debug_names):
9083 Remove unused variables.
9084 (dw2_map_symtabs_matching_filename): Likewise.
9085 (dwarf2_record_block_ranges): Likewise.
9086 (dwarf2_read_addr_index): Likewise.
9087 (follow_die_offset): Likewise.
9089 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9091 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9092 to symbol_file_add_main.
9094 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9097 * mi/mi-console.c (do_fputc_async_safe): New.
9098 (mi_console_file::write_async_safe): New.
9099 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9100 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9102 * ui-file.c (ui_file::putstrn): Adjust call to
9103 fputstrn_unfiltered.
9104 * utils.c (printchar): Replace do_fputs and do_fprintf
9105 parameters by do_fputc.
9106 (fputstr_filtered): Adjust call to printchar.
9107 (fputstr_unfiltered): Likewise.
9108 (fputstrn_filtered): Likewise.
9109 (fputstrn_unfiltered): Add do_fputc parameter, pass to
9111 * utils.h (do_fputc_ftype): New typedef.
9112 (fputstrn_unfiltered): Add do_fputc parameter.
9114 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9116 * regformats/i386/i386-avx.dat: Remove.
9118 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9121 * amd64-tdep.c (amd64_none_init_abi): New function.
9122 (amd64_x32_none_init_abi): New function.
9123 (_initialize_amd64_tdep): Register handlers for x86-64 and
9124 x64_32 with GDB_OSABI_NONE.
9125 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9126 GDB_OSABI_NONE osabi.
9128 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9131 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9133 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9134 * osabi.c (gdb_osabi_names): Add "unknown" entry.
9136 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9138 * common/byte-vector.h (char_vector): New type.
9139 * target.h (target_read_alloc): Return
9140 gdb::optional<byte_vector>.
9141 (target_read_stralloc): Return gdb::optional<char_vector>.
9142 (target_get_osdata): Return gdb::optional<char_vector>.
9143 * target.c (target_read_alloc_1): Templatize. Replacement
9144 manual memory management with vector.
9145 (target_read_alloc): Change return type, adjust.
9146 (target_read_stralloc): Change return type, adjust.
9147 (target_get_osdata): Change return type, adjust.
9148 * auxv.c (struct auxv_info) <length>: Remove.
9149 <data>: Change type to gdb::optional<byte_vector>.
9150 (auxv_inferior_data_cleanup): Free auxv_info with delete.
9151 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9152 (target_auxv_search): Adjust.
9153 (fprint_target_auxv): Adjust.
9154 * avr-tdep.c (avr_io_reg_read_command): Adjust.
9155 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9156 (linux_make_corefile_notes): Adjust.
9157 * osdata.c (get_osdata): Adjust.
9158 * remote.c (remote_get_threads_with_qxfer): Adjust.
9159 (remote_memory_map): Adjust.
9160 (remote_traceframe_info): Adjust.
9161 (btrace_read_config): Adjust.
9162 (remote_read_btrace): Adjust.
9163 (remote_pid_to_exec_file): Adjust.
9164 * solib-aix.c (solib_aix_get_library_list): Adjust.
9165 * solib-dsbt.c (decode_loadmap): Don't free buf.
9166 (dsbt_get_initial_loadmaps): Adjust.
9167 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9168 * solib-target.c (solib_target_current_sos): Adjust.
9169 * tracepoint.c (sdata_make_value): Adjust.
9170 * xml-support.c (xinclude_start_include): Adjust.
9171 (xml_fetch_content_from_file): Adjust.
9172 * xml-support.h (xml_fetch_another): Change return type.
9173 (xml_fetch_content_from_file): Change return type.
9174 * xml-syscall.c (xml_init_syscalls_info): Adjust.
9175 * xml-tdesc.c (file_read_description_xml): Adjust.
9176 (fetch_available_features_from_target): Change return type.
9177 (target_fetch_description_xml): Adjust.
9178 (target_read_description_xml): Adjust.
9180 2018-04-06 Tom Tromey <tom@tromey.com>
9182 * value.c (~value): Update.
9183 (struct value) <contents>: Now unique_xmalloc_ptr.
9184 (value_contents_bits_eq, allocate_value_contents)
9185 (value_contents_raw, value_contents_all_raw)
9186 (value_contents_for_printing, value_contents_for_printing_const)
9187 (set_value_enclosing_type): Update.
9189 2018-04-06 Tom Tromey <tom@tromey.com>
9191 * value.c (range_s): Remove typedef, VEC.
9192 (struct range): Add operator<.
9193 (range_lessthan): Remove.
9194 (ranges_contain): Change type.
9196 (struct value) <unavailable, optimized_out>: Now std::vector.
9197 (value_entirely_available)
9198 (value_entirely_covered_by_range_vector)
9199 (value_entirely_unavailable, value_entirely_optimized_out):
9201 (insert_into_bit_range_vector): Change argument type.
9202 (find_first_range_overlap): Likewise.
9203 (struct ranges_and_idx, value_contents_bits_eq)
9204 (require_not_optimized_out, require_available): Update.
9205 (ranges_copy_adjusted): Change argument types.
9206 (value_optimized_out, value_copy, value_fetch_lazy): Update.
9208 2018-04-06 Tom Tromey <tom@tromey.com>
9210 * value.c (~value): Update.
9211 (struct value) <parent>: Now a value_ref_ptr.
9212 (value_parent, set_value_parent, value_address, value_copy):
9215 2018-04-06 Tom Tromey <tom@tromey.com>
9217 * value.c (struct value): Add constructor, destructor, and member
9219 (allocate_value_lazy, value_decref): Update.
9221 2018-04-06 Tom Tromey <tom@tromey.com>
9223 * value.c (struct value) <released, next>: Remove.
9224 (all_values): Now a std::vector.
9225 (allocate_value_lazy): Update.
9226 (value_next): Remove.
9227 (value_mark, value_free_to_mark, release_value)
9228 (value_release_to_mark): Update.
9230 2018-04-06 Tom Tromey <tom@tromey.com>
9232 * value.h (fetch_subexp_value, value_release_to_mark): Update.
9233 (free_value_chain): Remove.
9234 * value.c (free_value_chain): Remove.
9235 (value_release_to_mark): Return a std::vector.
9236 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9238 (check_condition): Update.
9239 * eval.c (fetch_subexp_value): Change "val_chain" to a
9241 * breakpoint.c (update_watchpoint): Update.
9242 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9244 2018-04-06 Tom Tromey <tom@tromey.com>
9246 * value.h (free_all_values): Remove.
9247 * value.c (free_all_values): Remove.
9249 2018-04-06 Tom Tromey <tom@tromey.com>
9251 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9252 (value_history_chain, value_history_count): Remove.
9253 (value_history): New global.
9254 (record_latest_value, access_value_history, show_values)
9255 (preserve_values): Update.
9257 2018-04-06 Tom Tromey <tom@tromey.com>
9259 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9260 * varobj.c (varobj_set_display_format, varobj_set_value)
9261 (install_default_visualizer, construct_visualizer)
9262 (install_new_value, ~varobj, varobj_get_value_type)
9263 (my_value_of_variable, varobj_editable_p): Update.
9264 * c-varobj.c (c_describe_child, c_value_of_variable)
9265 (cplus_number_of_children, cplus_describe_child): Update.
9266 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9267 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9268 (ada_value_of_variable, ada_value_is_changeable_p): Update.
9270 2018-04-06 Tom Tromey <tom@tromey.com>
9272 * printcmd.c (last_examine_address): Change type to
9274 (do_examine, x_command): Update.
9276 2018-04-06 Tom Tromey <tom@tromey.com>
9278 * value.c (release_value): Update.
9279 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9280 (struct bpstats) <val>: Now a value_ref_ptr.
9281 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9282 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9283 (~watchpoint, print_it_watchpoint, watch_command_1)
9284 (invalidate_bp_value_on_memory_change): Update.
9286 2018-04-06 Tom Tromey <tom@tromey.com>
9288 * varobj.c (varobj_clear_saved_item)
9289 (update_dynamic_varobj_children, install_new_value, ~varobj):
9291 * value.h (value_incref): Move declaration earlier.
9292 (value_decref): Rename from value_free.
9293 (struct value_ref_policy): New.
9294 (value_ref_ptr): New typedef.
9295 (struct value_deleter): Remove.
9296 (gdb_value_up): Remove typedef.
9297 (release_value): Change return type.
9298 (release_value_or_incref): Remove.
9299 * value.c (set_value_parent): Update.
9300 (value_incref): Change return type.
9301 (value_decref): Rename from value_free.
9302 (value_free_to_mark, free_all_values, free_value_chain): Update.
9303 (release_value): Return value_ref_ptr.
9304 (release_value_or_incref): Remove.
9305 (record_latest_value, set_internalvar, clear_internalvar):
9307 * stack.c (info_frame_command): Don't call value_free.
9308 * python/py-value.c (valpy_dealloc, valpy_new)
9309 (value_to_value_object): Update.
9310 * printcmd.c (do_examine): Update.
9311 * opencl-lang.c (lval_func_free_closure): Update.
9312 * mi/mi-main.c (register_changed_p): Don't call value_free.
9313 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9314 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9315 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9317 * guile/scm-value.c (vlscm_free_value_smob)
9318 (vlscm_scm_from_value): Update.
9319 * frame.c (frame_register_unwind, frame_unwind_register_signed)
9320 (frame_unwind_register_unsigned, get_frame_register_bytes)
9321 (put_frame_register_bytes): Don't call value_free.
9322 * findvar.c (address_from_register): Don't call value_free.
9323 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9324 * dwarf2loc.c (entry_data_value_free_closure)
9325 (value_of_dwarf_reg_entry, free_pieced_value_closure)
9326 (dwarf2_evaluate_loc_desc_full): Update.
9327 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9328 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9329 (~watchpoint, watch_command_1)
9330 (invalidate_bp_value_on_memory_change): Update.
9331 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9333 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
9336 * warning.m4: Add -Wno-error=deprecated-register.
9337 * configure: Re-generate.
9339 2018-04-05 Tom Tromey <tom@tromey.com>
9341 * linespec.h: Remove include of "vec.h".
9343 2018-04-05 Tom Tromey <tom@tromey.com>
9345 * linespec.c (typep): Remove typedef.
9346 (find_methods, find_superclass_methods): Take a std::vector.
9347 (find_method): Use std::vector.
9349 2018-04-05 Tom Tromey <tom@tromey.com>
9351 * utils.c (compare_strings): Remove.
9352 * utils.h (compare_strings): Remove.
9353 * objc-lang.h (find_imps): Update.
9354 * objc-lang.c (find_methods): Take a std::vector.
9355 (uniquify_strings, find_imps): Likewise.
9356 * linespec.c (find_methods): Take a std::vector.
9357 (decode_objc): Use std::vector.
9358 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9360 (find_method, find_function_symbols): Use std::vector.
9362 2018-04-05 Tom Tromey <tom@tromey.com>
9364 * completer.c (completion_tracker::completion_tracker): Remove
9366 (completion_tracker::discard_completions): Likewise.
9367 * breakpoint.c (ambiguous_names_p): Remove cast.
9368 * ada-lang.c (_initialize_ada_language): Remove cast.
9369 * utils.h (streq): Update.
9370 (streq_hash): Add new declaration.
9371 * utils.c (streq): Return bool.
9372 (streq_hash): New function.
9374 2018-04-05 Tom Tromey <tom@tromey.com>
9376 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9377 Remove a string copy.
9379 2018-04-05 Tom Tromey <tom@tromey.com>
9381 * linespec.c (filter_results): Use std::vector.
9382 (decode_line_2, decode_line_full): Update.
9384 2018-04-05 Tom Tromey <tom@tromey.com>
9386 * linespec.c (canonical_to_fullform): Return std::string.
9387 (filter_results): Update.
9388 (struct decode_line_2_item): Add constructor.
9389 <fullform, displayform>: Now std::string.
9390 (decode_line_2_compare_items): Now a std::sort comparator.
9391 (decode_line_2): Update.
9393 2018-04-05 Tom Tromey <tom@tromey.com>
9395 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9396 (unexpected_linespec_error): Update.
9397 (linespec_parse_basic, parse_linespec): Update.
9399 2018-04-05 Tom Tromey <tom@tromey.com>
9401 * linespec.c (linespec_parse_basic): Reindent.
9403 2018-04-05 Tom Tromey <tom@tromey.com>
9405 * minsyms.h (iterate_over_minimal_symbols): Update.
9406 * minsyms.c (iterate_over_minimal_symbols): Take a
9408 * linespec.c (struct collect_minsyms): Remove.
9409 (compare_msyms): Now a std::sort comparator.
9410 (add_minsym): Add parameters.
9411 (search_minsyms_for_name): Update. Use std::vector.
9413 2018-04-03 Tom Tromey <tom@tromey.com>
9415 * mipsread.c (read_alphacoff_dynamic_symtab): Use
9418 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9420 * MAINTAINERS (Write After Approval): Add Weimin Pan.
9422 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9425 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
9426 printing static type.
9428 2018-04-01 Tom Tromey <tom@tromey.com>
9430 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9431 (rs6000_xfer_shared_libraries): Update.
9433 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
9435 * common/gdb_vecs.h (char_ptr): Remove.
9436 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9438 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9440 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9442 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9444 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9446 * tracepoint.h (struct uploaded_tp): Initialize fields.
9447 <actions, step_actions, cmd_strings>: Change type to
9448 std::vector<char *>.
9449 * tracepoint.c (get_uploaded_tp): Allocate with new.
9450 (free_uploaded_tps): Free with delete.
9451 (parse_tracepoint_definition): Adjust to std::vector change.
9452 * breakpoint.c (read_uploaded_action): Likewise.
9453 (create_tracepoint_from_upload): Likewise.
9454 * ctf.c (ctf_write_uploaded_tp): Likewise.
9455 (SET_ARRAY_FIELD): Likewise.
9456 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9458 2018-03-30 Tom Tromey <tom@tromey.com>
9460 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
9462 (svr4_keep_data_in_core): Update.
9463 (svr4_read_so_list): Update.
9465 2018-03-30 Tom Tromey <tom@tromey.com>
9467 * windows-nat.c (handle_output_debug_string, handle_exception):
9469 * target.h (target_read_string): Update.
9470 * target.c (target_read_string): Change "string" to
9472 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9474 * solib-frv.c (frv_current_sos): Update.
9475 * solib-dsbt.c (dsbt_current_sos): Update.
9476 * solib-darwin.c (darwin_current_sos): Update.
9477 * linux-thread-db.c (inferior_has_bug): Update.
9478 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9479 Update. Remove alloca.
9480 * ada-lang.c (ada_main_name): Update.
9482 2018-03-30 Tom Tromey <tom@tromey.com>
9484 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9485 (struct dwo_file_deleter): New.
9486 (dwo_file_up): New typedef.
9487 (open_and_init_dwo_file): Use dwo_file_up.
9488 (free_dwo_file_cleanup): Remove.
9490 2018-03-30 Tom Tromey <tom@tromey.com>
9492 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9493 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9495 2018-03-30 Tom Tromey <tom@tromey.com>
9497 * dwarf2read.c (class free_cached_comp_units): New class.
9498 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9499 (free_cached_comp_units): Remove function.
9501 2018-03-30 Tom Tromey <tom@tromey.com>
9503 * utils.h (make_cleanup_unpush_target): Remove.
9504 * inf-ptrace.c (struct target_unpusher): New.
9505 (target_unpush_up) New typedef.
9506 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9508 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9510 2018-03-27 Tom Tromey <tom@tromey.com>
9512 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9514 2018-03-27 Pedro Alves <palves@redhat.com>
9515 Tom Tromey <tom@tromey.com>
9517 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9518 destructor. Now a class.
9519 (gdb_readline_wrapper_cleanup): Remove function.
9520 (gdb_readline_wrapper): Remove cleanups.
9522 2018-03-27 Tom Tromey <tom@tromey.com>
9524 * typeprint.h (struct type_print_options) <local_typedefs,
9525 global_typedefs>: Remove "struct" keyword.
9526 (class typedef_hash_table): New class.
9527 (recursively_update_typedef_hash, add_template_parameters)
9528 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9529 (find_typedef_in_hash): Don't declare.
9530 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9531 (typedef_hash_table::recursively_update): Rename from
9532 recursively_update_typedef_hash. Now a member.
9533 (typedef_hash_table::add_template_parameters): Rename from
9534 add_template_parameters. Now a member.
9535 (typedef_hash_table::typedef_hash_table): Now a constructor;
9536 rename from create_typedef_hash.
9537 (typedef_hash_table::~typedef_hash_table): Now a destructor;
9538 rename from free_typedef_hash.
9539 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9540 (do_free_global_table): Remove.
9541 (typedef_hash_table::typedef_hash_table): New constructor; renamed
9542 from copy_type_recursive.
9543 (create_global_typedef_table): Remove.
9544 (typedef_hash_table::find_global_typedef): Now a member of
9546 (typedef_hash_table::find_typedef): Rename from
9547 find_typedef_in_hash; now a member.
9548 (whatis_exp): Update.
9549 * extension.h (struct ext_lang_type_printers): Add constructor and
9551 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9553 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9554 Now a constructor; rename from start_ext_lang_type_printers.
9555 (ext_lang_type_printers): Now a destructor; rename from
9556 free_ext_lang_type_printers.
9557 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9559 (c_type_print_base_struct_union): Update. Remove cleanups.
9561 2018-03-27 Tom Tromey <tom@tromey.com>
9563 * dwarf-index-write.c: Include <cmath>.
9565 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9567 * NEWS: Add entry describing new "set|show varsize-limit" command.
9568 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9570 * printcmd.c (_initialize_printcmd): Add "set var" alias of
9573 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
9575 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9577 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9578 * dwarf-index-common.c: New file.
9579 * dwarf-index-common.h: New file.
9580 * dwarf-index-write.c: New file.
9581 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9582 (struct dwarf2_section_info): Move from here.
9583 (dwarf2_section_info_def): Likewise.
9584 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9585 (offset_type): Likewise.
9586 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9587 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9588 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9589 (byte_swap): Likewise.
9590 (MAYBE_SWAP): Likewise.
9591 (dwarf2_per_cu_ptr): Likewise.
9592 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9593 (struct tu_stats): Likewise.
9594 (struct dwarf2_per_objfile): Likewise.
9595 (struct dwarf2_per_cu_data): Likewise.
9596 (struct signatured_type): Likewise.
9597 (sig_type_ptr): Likewise.
9598 (DEF_VEC_P (sig_type_ptr)): Likewise.
9599 (INDEX4_SUFFIX): Likewise.
9600 (INDEX5_SUFFIX): Likewise.
9601 (DEBUG_STR_SUFFIX): Likewise.
9602 (dwarf2_read_section): Make non-static.
9603 (mapped_index_string_hash): Move from here.
9604 (dwarf5_djb_hash): Likewise.
9605 (file_write): Likewise.
9606 (class data_buf): Likewise.
9607 (struct symtab_index_entry): Likewise.
9608 (struct mapped_symtab): Likewise.
9609 (find_slot): Likewise.
9610 (hash_expand): Likewise.
9611 (add_index_entry): Likewise.
9612 (uniquify_cu_indices): Likewise.
9613 (class c_str_view): Likewise.
9614 (class c_str_view_hasher): Likewise.
9615 (class vector_hasher): Likewise.
9616 (write_hash_table): Likewise.
9617 (psym_index_map): Likewise.
9618 (struct addrmap_index_data): Likewise.
9619 (add_address_entry): Likewise.
9620 (add_address_entry_worker): Likewise.
9621 (write_address_map): Likewise.
9622 (symbol_kind): Likewise.
9623 (write_psymbols): Likewise.
9624 (struct signatured_type_index_data): Likewise.
9625 (write_one_signatured_type): Likewise.
9626 (recursively_count_psymbols): Likewise.
9627 (recursively_write_psymbols): Likewise.
9628 (class debug_names): Likewise.
9629 (check_dwarf64_offsets): Likewise.
9630 (psyms_seen_size): Likewise.
9631 (write_gdbindex): Likewise.
9632 (write_debug_names): Likewise.
9633 (assert_file_size): Likewise.
9634 (write_psymtabs_to_index): Likewise.
9635 (save_gdb_index_command): Likewise.
9636 (_initialize_dwarf2_read): Don't register the "save gdb-index"
9638 * dwarf2read.h: New file.
9640 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9643 * dwarf2read.c (dwarf2_physname): Do not return the demangled
9644 symbol name if the CU's language stores symbol names in linkage
9646 * language.h (struct language_defn)
9647 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
9648 all instances of this struct.
9650 2018-03-26 Tom Tromey <tom@tromey.com>
9652 * stack.c (backtrace_command_1): Remove verbose code.
9654 2018-03-26 Tom Tromey <tom@tromey.com>
9656 * python/py-framefilter.c (py_print_type): Don't catch
9657 exceptions. Return void.
9658 (py_print_value): Likewise.
9659 (py_print_single_arg): Likewise.
9660 (enumerate_args): Don't catch exceptions.
9661 (py_print_args): Likewise.
9662 (py_print_frame): Likewise.
9663 (gdbpy_apply_frame_filter): Catch exceptions here.
9665 2018-03-26 Tom Tromey <tom@tromey.com>
9667 * stack.c (_initialize_stack): Remove trailing newlines from help
9668 text. Add "Usage" line to "backtrace" help.
9670 2018-03-26 Tom Tromey <tom@tromey.com>
9673 * python/py-framefilter.c (py_print_args): Call wrap_hint.
9675 2018-03-26 Tom Tromey <tom@tromey.com>
9677 * python/py-framefilter.c (py_print_single_arg): Return
9678 EXT_LANG_BT_ERROR from catch.
9680 2018-03-26 Tom Tromey <tom@tromey.com>
9683 * stack.c (backtrace_command_1): Move some code into no-filters
9686 2018-03-26 Tom Tromey <tom@tromey.com>
9688 * python/py-framefilter.c (throw_quit_or_print_exception): New
9690 (gdbpy_apply_frame_filter): Use it.
9692 2018-03-26 Tom Tromey <tom@tromey.com>
9695 * python/py-framefilter.c (py_print_type, py_print_value)
9696 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9699 2018-03-26 Tom Tromey <tom@tromey.com>
9701 * python/py-framefilter.c (enumerate_args): Use
9702 gdb::unique_xmalloc_ptr.
9704 2018-03-26 Tom Tromey <tom@tromey.com>
9706 * python/py-framefilter.c (py_print_frame): Return
9708 (gdbpy_apply_frame_filter): Update comment.
9709 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9711 <EXT_LANG_BT_NO_FILTERS>: Change value.
9713 2018-03-26 Tom Tromey <tom@tromey.com>
9716 * stack.c (backtrace_command): Parse "hide" argument.
9717 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9718 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9721 2018-03-26 Tom Tromey <tom@tromey.com>
9723 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9725 (backtrace_command): Remove "fulltrace", add "flags".
9727 2018-03-26 Tom Tromey <tom@tromey.com>
9729 * stack.c (backtrace_command): Rewrite command line parsing.
9731 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9733 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9735 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9737 * filename-seen-cache.h: Add include guard.
9739 2018-03-26 Keith Seitz <keiths@redhat.com>
9741 * symfile.c (place_section): Remove "struct" from section_addr_info
9743 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9744 "struct" keyword from section_addr_info.
9746 2018-03-26 Alan Hayward <alan.hayward@arm.com>
9748 * regformats/regdef.h (reg): Add constructors.
9750 2018-03-25 Pedro Alves <palves@redhat.com>
9752 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9753 if then/else bodies in var_func_name extraction.
9755 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
9757 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9758 lookup_minimal_symbol() to find symbol entry.
9759 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9761 2018-03-23 Keith Seitz <keiths@redhat.com>
9764 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9765 nested type definitions for C++, too.
9767 2018-03-23 Tom Tromey <tom@tromey.com>
9769 * machoread.c (struct oso_el): Add a constructor. Don't define as
9771 (macho_register_oso): Remove.
9772 (macho_symtab_read): Take a std::vector.
9773 (oso_el_compare_name): Now a std::sort comparator.
9774 (macho_symfile_read_all_oso): Take a std::vector.
9775 (macho_symfile_read): Use std::vector. Remove cleanups.
9777 2018-03-22 Tom Tromey <tom@tromey.com>
9779 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9780 (record_full_goto_bookmark): Use std::string.
9782 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9785 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9788 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9790 * rs6000-tdep.c (store_insn_p): New function.
9791 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9792 and cr_reg to their unshifted values. Use store_insn_p to
9793 match LR saves using either R1 or fdata->alloca_reg. Use
9794 store_insn_p to match CR saves. Set alloca_reg_offset
9795 when alloca_reg and framep are set. Remove lr_reg shift
9796 when assigning to fdata->lr_register.
9798 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
9800 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9801 command line args instead of emitting a warning.
9803 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9805 * tracepoint.h (struct static_tracepoint_marker): Initialize
9806 fields, define default constructor, move constructor and move
9807 assignment, disable the rest.
9808 <str_id, extra>: Make std::string.
9809 (release_static_tracepoint_marker): Remove.
9810 (free_current_marker): Remove.
9811 * tracepoint.c (free_current_marker): Remove.
9812 (parse_static_tracepoint_marker_definition): Adjust to
9813 std::string, use new hex2str overload.
9814 (release_static_tracepoint_marker): Remove.
9815 (print_one_static_tracepoint_marker): Get marker by reference
9816 and adjust to std::string.
9817 (info_static_tracepoint_markers_command): Adjust to std::vector
9819 * target.h (static_tracepoint_marker_p): Remove typedef.
9820 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9821 (struct target_ops) <to_static_tracepoint_marker_at>: Return
9823 <to_static_tracepoint_markers_by_strid>: Return std::vector.
9825 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9826 (target_debug_print_std_vector_static_tracepoint_marker): New.
9827 (target_debug_print_struct_static_tracepoint_marker_p): Rename
9829 (target_debug_print_static_tracepoint_marker_p): ... this.
9830 * target-delegates.c: Re-generate.
9831 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9833 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9834 (decode_static_tracepoint_spec): Adjust to std::vector.
9835 (tracepoint_print_one_detail): Adjust to std::string.
9836 (strace_marker_decode_location): Adjust to std::string.
9837 (update_static_tracepoint): Adjust to std::string, remove call
9838 to release_static_tracepoint_marker.
9839 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9840 Adjust to std::vector.
9841 * remote.c (remote_static_tracepoint_marker_at): Return bool.
9842 (remote_static_tracepoint_markers_by_strid): Adjust to
9844 * common/rsp-low.h (hex2str): New overload with explicit count
9846 * common/rsp-low.c (hex2str): New overload with explicit count
9848 * unittests/rsp-low-selftests.c (test_hex2str): New function.
9849 (_initialize_rsp_low_selftests): Add test_hex2str test.
9850 * unittests/tracepoint-selftests.c
9851 (test_parse_static_tracepoint_marker_definition): Adjust to
9854 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9856 * tracepoint.c (parse_static_tracepoint_marker_definition):
9857 Consider case where the definition is followed by more
9859 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9860 tracepoint-selftests.c.
9861 * unittests/tracepoint-selftests.c: New.
9863 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9865 * MAINTAINERS (Write After Approval): Add Pedro Franco de
9868 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9870 * symtab.c (find_pc_sect_line): fixed indentation.
9872 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9874 * symtab.c (find_pc_sect_line): now uses binary search.
9876 2018-03-19 Tom Tromey <tom@tromey.com>
9878 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9881 2018-03-19 Pedro Alves <palves@redhat.com>
9882 Tom Tromey <tom@tromey.com>
9884 * unittests/observable-selftests.c: New file.
9885 * common/observable.h: New file.
9886 * observable.h: New file.
9887 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9888 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9889 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9890 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9891 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9892 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9893 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9894 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9895 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9896 python/py-breakpoint.c, python/py-finishbreakpoint.c,
9897 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9898 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9899 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9900 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9901 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9902 tui/tui-interp.c, valops.c: Update all users.
9903 * tui/tui-hooks.c (tui_bp_created_observer)
9904 (tui_bp_deleted_observer, tui_bp_modified_observer)
9905 (tui_inferior_exit_observer, tui_before_prompt_observer)
9906 (tui_normal_stop_observer, tui_register_changed_observer):
9908 (tui_observers_token): New global.
9909 (attach_or_detach, tui_attach_detach_observers): New functions.
9910 (tui_install_hooks, tui_remove_hooks): Use
9911 tui_attach_detach_observers.
9912 * record-btrace.c (record_btrace_thread_observer): Remove.
9913 (record_btrace_thread_observer_token): New global.
9914 * observer.sh: Remove.
9915 * observer.c: Rename to observable.c.
9916 * observable.c (namespace gdb_observers): Define new objects.
9917 (observer_debug): Move into gdb_observers namespace.
9918 (struct observer, struct observer_list, xalloc_observer_list_node)
9919 (xfree_observer_list_node, generic_observer_attach)
9920 (generic_observer_detach, generic_observer_notify): Remove.
9921 (_initialize_observer): Update.
9922 Don't include observer.inc.
9923 * Makefile.in (generated_files): Remove observer.h, observer.inc.
9924 (clean mostlyclean): Likewise.
9925 (observer.h, observer.inc): Remove targets.
9926 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9927 (COMMON_SFILES): Use observable.c, not observer.c.
9928 * .gitignore: Remove observer.h.
9930 2018-03-18 Tom Tromey <tom@tromey.com>
9932 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9934 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9936 2018-03-17 Tom Tromey <tom@tromey.com>
9938 * auto-load.c (auto_load_objfile_script_1): Use std::string.
9940 2018-03-17 Tom Tromey <tom@tromey.com>
9942 * target.c (class scoped_target_fd): New.
9943 (target_fileio_close_cleanup): Remove.
9944 (target_fileio_read_alloc_1): Use scoped_target_fd.
9946 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
9948 * silent-rules.mk: New.
9949 * Makefile.in: Include silent-rules.mk
9950 (srcdir, VPATH, top_srcdir): Move up.
9951 (COMPILE): Add ECHO_CXX.
9952 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9953 (init.c): Add ECHO_INIT_C.
9954 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9955 (version.c): Add ECHO_GEN.
9956 (printcmd.o): Add ECHO_CXX.
9957 (target-float.o): Add ECHO_CXX.
9958 (ada-exp.o): Add ECHO_CXX.
9959 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9960 (insight$(EXEEXT)): Add ECHO_CXXLD.
9961 * gnulib/configure.ac: Add AM_SILENT_RULES.
9962 * gnulib/aclocal.m4: Re-generate.
9963 * gnulib/configure: Re-generate.
9964 * gnulib/import/Makefile.in: Re-generate.
9966 2018-03-16 Tom Tromey <tom@tromey.com>
9968 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9969 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9970 * utils.c (do_free_section_addr_info)
9971 (make_cleanup_free_section_addr_info): Remove.
9972 * symfile.h (struct other_sections): Add constructor.
9973 (struct section_addr_info): Remove.
9974 (section_addr_info): New typedef.
9975 (struct sym_fns) <sym_offsets>: Change type of parameter.
9976 (build_section_addr_info_from_objfile)
9977 (relative_addr_info_to_section_offsets, addr_info_make_relative)
9978 (default_symfile_offsets, symbol_file_add)
9979 (symbol_file_add_from_bfd)
9980 (build_section_addr_info_from_section_table): Update.
9981 (alloc_section_addr_info, free_section_addr_info): Don't declare.
9982 * symfile.c (alloc_section_addr_info): Remove.
9983 (build_section_addr_info_from_section_table): Change return type.
9985 (build_section_addr_info_from_bfd)
9986 (build_section_addr_info_from_objfile): Likewise.
9987 (free_section_addr_info): Remove.
9988 (relative_addr_info_to_section_offsets): Change type of "addrs".
9989 (addrs_section_compar): Now a std::sort comparator.
9990 (addrs_section_sort): Change return type.
9991 (addr_info_make_relative): Change type of "addrs". Update.
9992 (default_symfile_offsets, syms_from_objfile_1)
9993 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9994 (symbol_file_add_separate): Update.
9995 (symbol_file_add): Change type of "addrs". Update.
9996 (add_symbol_file_command): Update. Remove cleanups.
9997 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
9999 * symfile-debug.c (debug_sym_offsets): Change type of "info".
10000 * solib.c (solib_read_symbols): Update.
10001 * objfiles.c (objfile_relocate): Update. Remove cleanups.
10002 * machoread.c (macho_symfile_offsets): Update.
10003 * jit.c (jit_bfd_try_read_symtab): Update.
10005 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
10007 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10008 unittests/utils-selftests.c.
10009 * unittests/utils-selftests.c: New file.
10011 2018-03-14 Tom Tromey <tom@tromey.com>
10014 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10017 2018-03-14 Tom Tromey <tom@tromey.com>
10020 * printcmd.c (printf_pointer): Allow "-" in format.
10022 2018-03-14 Tom Tromey <tom@tromey.com>
10024 * printcmd.c (_initialize_printcmd): Add usage to printf.
10026 2018-03-14 Yao Qi <qiyao@sourceware.org>
10028 * MAINTAINERS: Update my email address.
10030 2018-03-13 Tom Tromey <tom@tromey.com>
10032 * machoread.c (macho_check_dsym): Change filenamep to a
10034 (macho_symfile_read): Update.
10035 * symfile.c (load_command): Use std::string.
10037 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
10039 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10040 to error message string.
10041 (riscv_register_name): Use xsnprintf instead of sprintf.
10042 (riscv_insn::fetch_instruction): Use gdb_assert instead of
10044 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10046 (riscv_push_dummy_call): Likewise.
10048 2018-03-12 Tom Tromey <tom@tromey.com>
10050 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10051 Use gdb::byte_vector.
10052 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10054 2018-03-12 Yao Qi <yao.qi@linaro.org>
10056 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10057 parameter type to readable_regcache.
10058 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10061 2018-03-11 Tom Tromey <tom@tromey.com>
10063 * dwarf2read.c (struct nextfield): Add initializers.
10064 (struct nextfnfield): Remove.
10065 (struct fnfieldlist): Add initializers. Remove "length" and
10066 "head", use std::vector.
10067 (struct decl_field_list): Remove.
10068 (struct field_info): Add initializers.
10069 <fields, baseclasses>: Now std::vector.
10070 <nbaseclasses, nfnfields, typedef_field_list_count,
10071 nested_types_list_count>: Remove.
10072 (dwarf2_add_field, dwarf2_add_type_defn)
10073 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10074 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10075 (process_structure_scope): Update.
10077 2018-03-11 Tom Tromey <tom@tromey.com>
10079 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10080 for use by std::sort.
10081 (build_type_psymtabs_1): Use std::vector.
10083 2018-03-09 Eli Zaretskii <eliz@gnu.org>
10085 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10086 and LIBMPFR in the printed configuration.
10088 2018-03-08 Tom Tromey <tom@tromey.com>
10090 * source.c (get_filename_and_charpos): Use scoped_fd.
10091 * nto-procfs.c (procfs_open_1): Use scoped_fd.
10092 (procfs_pidlist): Likewise.
10093 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10094 (iterate_over_mappings): Likewise.
10096 2018-03-08 Tom Tromey <tom@tromey.com>
10098 * infcall.c (struct call_return_meta_info)
10099 <stack_temporaries_enabled>: Remove.
10100 (get_call_return_value, call_function_by_hand_dummy): Update.
10101 * thread.c (disable_thread_stack_temporaries): Remove.
10102 (enable_thread_stack_temporaries): Remove.
10103 (thread_stack_temporaries_enabled_p): Return bool.
10104 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10105 (get_last_thread_stack_temporary): Update.
10106 * eval.c (evaluate_subexp): Update.
10107 * gdbthread.h (class enable_thread_stack_temporaries): Now a
10108 class, not a function.
10109 (value_ptr, value_vec): Remove typedefs.
10110 (class thread_info) <stack_temporaries_enabled>: Now bool.
10111 <stack_temporaries>: Now a std::vector.
10112 (thread_stack_temporaries_enabled_p)
10113 (value_in_thread_stack_temporaries): Return bool.
10115 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
10117 * remote.c (putpkt_binary): Fix omitted bytes reporting.
10118 (getpkt_or_notif_sane_1): Likewise.
10120 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10122 * build-id.c (build_id_to_debug_bfd): Use std::string.
10124 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10126 * build-id.c (find_separate_debug_file_by_buildid): Return
10128 * build-id.h (find_separate_debug_file_by_buildid): Return
10130 * coffread.c (coff_symfile_read): Adjust to std::string.
10131 * elfread.c (elf_symfile_read): Adjust to std::string.
10132 * symfile.c (separate_debug_file_exists): Change parameter to
10134 (find_separate_debug_file): Return std::string.
10135 (find_separate_debug_file_by_debuglink): Return std::string.
10136 * symfile.h (find_separate_debug_file_by_debuglink): Return
10139 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10141 * common/xml-utils.c (xml_escape_text): Move code to...
10142 (xml_escape_text_append): ... this new function.
10143 * common/xml-utils.h (xml_escape_text_append): New declaration.
10144 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10146 (_initialize_xml_utils): register test_xml_escape_text_append as
10149 2018-03-07 Alan Hayward <alan.hayward@arm.com>
10151 * defs.h: Remove MAX_REGISTER_SIZE.
10152 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10154 * python/py-unwind.c (pyuw_sniffer): Likewise.
10156 2018-03-07 Tom Tromey <tom@tromey.com>
10158 * linux-tdep.c (linux_info_proc): Update.
10159 * target.h (struct target_ops) <to_fileio_readlink>: Return
10161 (target_fileio_readlink): Return optional<string>.
10162 * remote.c (remote_hostio_readlink): Return optional<string>.
10163 * inf-child.c (inf_child_fileio_readlink): Return
10165 * target.c (target_fileio_readlink): Return optional<string>.
10167 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
10169 * regcache.c (cooked_read_test): Add riscv to the list of
10170 architectures that have a save_reggroup.
10172 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
10174 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10175 value is not a dynamic class object.
10177 2018-03-06 Tom Tromey <tom@tromey.com>
10179 * rust-exp.y: Formatting fixes.
10181 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10183 * riscv-tdep.c (riscv_register_name): Remove target description
10185 (riscv_gdbarch_init): Remove target description check.
10187 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10189 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10191 * riscv-tdep.h: Likewise.
10193 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10195 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10196 (riscv_pseudo_register_write): Delete.
10197 (riscv_gdbarch_init): Remove all use of pseudo registers.
10199 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10201 * record-btrace.c (btrace_print_lines): Replace cleanup
10202 parameter with RAII equivalents.
10203 (btrace_insn_history): Replace cleanup with RAII equivalents.
10204 * ui-out.h (make_cleanup_ui_out_list_begin_end,
10205 make_cleanup_ui_out_tuple_begin_end): Remove.
10206 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10207 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10208 make_cleanup_ui_out_list_begin_end): Remove.
10210 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10212 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10213 parameter types to std::vector. Use bool.
10214 (record_btrace_wait): Replace VEC(tp_t) with
10215 std::vector<thread_info *>.
10216 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10218 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10220 * record-btrace.c (record_btrace_disable_callback): Remove.
10221 (struct scoped_btrace_disable): New.
10222 (record_btrace_open): Use scoped_btrace_disable.
10224 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10226 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10227 reading values from registers.
10229 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10231 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10234 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10236 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10237 change parameter type. Use GDB's print functions, and use
10238 core_addr_to_string where appropriate.
10239 (riscv_push_dummy_call): Use core_addr_to_string where
10240 appropriate, update call to riscv_print_arg_location, and reindent
10242 (riscv_return_value): Update call to riscv_print_arg_location.
10244 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10245 Tim Newsome <tim@sifive.com>
10246 Albert Ou <a0u@eecs.berkeley.edu>
10247 Darius Rad <darius@bluespec.com>
10249 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10250 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10251 (ALLDEPFILES): Add riscv-tdep.c
10252 * configure.tgt: Add riscv support.
10253 * riscv-tdep.c: New file.
10254 * riscv-tdep.h: New file.
10255 * NEWS: Mention new target.
10256 * MAINTAINERS: Add entry for riscv.
10258 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10260 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10261 fields within aggregates.
10263 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
10265 * record-btrace.c (btrace_print_lines): Change type of flags to
10266 gdb_disassembly_flags.
10268 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10270 * fbsd-nat.c: Include "inf-ptrace.h".
10271 (USE_SIGTRAP_SIGINFO): Conditionally define.
10272 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10273 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10274 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10276 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10278 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10280 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10281 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10282 "supports_stopped_by_hw_breakpoint" target methods.
10284 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10286 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10287 * fbsd-nat.c (debug_fbsd_nat): New variable.
10288 (show_fbsd_nat_debug): New function.
10289 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10290 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10292 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10294 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10295 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10297 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10298 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10301 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10303 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10304 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10306 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10308 * charset.c (struct charset_vector): New.
10309 (charsets): Change type to charset_vector.
10310 (find_charset_names): Adjust.
10312 (_initialize_charset): Adjust.
10314 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10316 * progspace.h (struct program_space) <deleted_solibs>: Change
10317 type to std::vector<std::string>.
10318 * progspace.c (clear_program_space_solib_cache): Adjust.
10319 * breakpoint.c (print_solib_event): Adjust.
10320 (check_status_catch_solib): Adjust.
10321 * solib.c (update_solib_list): Adjust.
10322 * ui-out.h (class ui_out) <field_string>: New overload.
10323 * ui-out.c (ui_out::field_string): New overload.
10325 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10327 * progspace.h (struct program_space): Add constructor and
10328 destructor, initialize fields.
10329 (add_program_space): Remove.
10330 * progspace.c (add_program_space): Rename to...
10331 (program_space::program_space): ... this.
10332 (release_program_space): Rename to...
10333 (program_space::~program_space): ... this.
10334 (delete_program_space): Use delete to delete program_space.
10335 (initialize_progspace): Use new to allocate program_space.
10336 * inferior.c (add_inferior_with_spaces): Likewise.
10337 (clone_inferior_command): Likewise.
10338 * infrun.c (follow_fork_inferior): Likewise.
10339 (handle_vfork_child_exec_or_exit): Likewise.
10341 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10343 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10344 (delim_string_to_char_ptr_vec): Return std::vector of
10345 gdb::unique_xmalloc_ptr.
10346 (dirnames_to_char_ptr_vec_append): Take std::vector of
10347 gdb::unique_xmalloc_ptr.
10348 (dirnames_to_char_ptr_vec): Return std::vector of
10349 gdb::unique_xmalloc_ptr.
10350 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10351 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10352 (delim_string_to_char_ptr_vec): Return an std::vector of
10353 gdb::unique_xmalloc_ptr, adjust the code.
10354 (dirnames_to_char_ptr_vec_append): Take an std::vector of
10355 gdb::unique_xmalloc_ptr, adjust the code.
10356 (dirnames_to_char_ptr_vec): Return an std::vector of
10357 gdb::unique_xmalloc_ptr, adjust the code.
10358 * auto-load.c (auto_load_safe_path_vec): Change type to
10359 std::vector of gdb::unique_xmalloc_ptr.
10360 (auto_load_expand_dir_vars): Return an std::vector of
10361 gdb::unique_xmalloc_ptr, adjust the code.
10362 (auto_load_safe_path_vec_update): Adjust.
10363 (filename_is_in_auto_load_safe_path_vec): Adjust.
10364 (auto_load_objfile_script_1): Adjust.
10365 * build-id.c (build_id_to_debug_bfd): Adjust.
10366 * linux-thread-db.c (thread_db_load_search): Adjust.
10367 * source.c (add_path): Adjust.
10369 * symfile.c (find_separate_debug_file): Adjust.
10370 * utils.c (do_free_char_ptr_vec): Remove.
10371 (make_cleanup_free_char_ptr_vec): Remove.
10373 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
10376 * common/pathstuff.c: Conditionally include "<windows.h>".
10378 2018-03-01 Georg Sauthoff <mail@georg.so>
10381 * gcore.in: Quote variables and switch interpreter to bash.
10383 2018-03-01 Tom Tromey <tom@tromey.com>
10385 * dwarf2read.c (alloc_discriminant_info): Fix default_index
10386 assertion. Add assertion for discriminant_index.
10387 (quirk_rust_enum): Use correct base type name in univariant case.
10389 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
10391 * record.c (get_call_history_modifiers): Return a
10392 record_print_flags.
10393 (cmd_record_call_history): Adjust.
10394 * record-btrace.c (record_btrace_call_history): Adjust.
10395 (record_btrace_call_history_range): Adjust.
10396 (record_btrace_call_history_from): Adjust.
10397 * target-debug.h (target_debug_print_record_print_flags): New.
10398 * target-delegates.c: Re-generate.
10399 * target.c (target_call_history): Change flags type.
10400 (target_call_history_from): Likewise.
10401 (target_call_history_range): Likewise.
10402 * target.h (struct target_ops) <target_call_history>: Likewise.
10403 (target_call_history_from): Likewise.
10404 (target_call_history_range): Likewise.
10406 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10407 Simon Marchi <simon.marchi@polymtl.ca>
10409 * common/common-utils.c: Include "sys/stat.h".
10410 (is_regular_file): Move here from "source.c"; change return
10412 * common/common-utils.h (is_regular_file): New prototype.
10413 * common/pathstuff.c (contains_dir_separator): New function.
10414 * common/pathstuff.h (contains_dir_separator): New prototype.
10415 * source.c: Don't include "sys/stat.h".
10416 (is_regular_file): Move to "common/common-utils.c".
10418 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10420 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10421 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10422 * auto-load.c: Include "common/pathstuff.h".
10423 * common/common-def.h (current_directory): Move here.
10424 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10426 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10428 * common/pathstuff.c: New file.
10429 * common/pathstuff.h: New file.
10430 * compile/compile.c: Include "common/pathstuff.h".
10431 * defs.h (current_directory): Move to "common/common-defs.h".
10432 * dwarf2read.c: Include "common/pathstuff.h".
10433 * exec.c: Likewise.
10434 * guile/scm-safe-call.c: Likewise.
10435 * linux-thread-db.c: Likewise.
10436 * main.c: Likewise.
10437 * nto-tdep.c: Likewise.
10438 * objfiles.c: Likewise.
10439 * source.c: Likewise.
10440 * symtab.c: Likewise.
10441 * utils.c: Include "common/pathstuff.h".
10442 (gdb_realpath): Move to "common/pathstuff.c".
10443 (gdb_realpath_keepfile): Likewise.
10444 (gdb_abspath): Likewise.
10445 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10446 (gdb_realpath_keepfile): Likewise.
10447 (gdb_abspath): Likewise.
10449 2018-02-28 John Baldwin <jhb@FreeBSD.org>
10451 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10452 wildcard process pid for super_resume for kernels with a
10455 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
10457 * compile/compile.c (get_args): Add additional comments
10458 explaining function.
10460 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
10461 Tom Tromey <tom@tromey.com>
10463 * target.h (memory_write_request_s): Remove typedef. Don't define
10465 (target_write_memory_blocks): Change argument to std::vector.
10466 (struct memory_write_request): Add constructor.
10467 * target-memory.c (compare_block_starting_address): Return bool.
10468 Change argument types.
10469 (claim_memory): Change arguments to use std::vector.
10470 (split_regular_and_flash_blocks, blocks_to_erase)
10471 (compute_garbled_blocks): Likewise.
10472 (cleanup_request_data, cleanup_write_requests_vector): Remove.
10473 (target_write_memory_blocks): Change argument to std::vector.
10474 * symfile.c (struct load_section_data): Add constructor and
10475 destructor. Use std::vector for "requests".
10476 (struct load_progress_data): Add initializers.
10477 (load_section_callback): Update. Use "new".
10478 (clear_memory_write_data): Remove.
10479 (generic_load): Update.
10481 2018-02-27 Alan Hayward <alan.hayward@arm.com>
10483 * arch/aarch64.h: Use common/tdesc.h.
10485 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10487 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10488 architecture with a 64-bit ABI.
10490 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10492 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10493 ahead of target description loading.
10495 2018-02-26 Tom Tromey <tom@tromey.com>
10497 * stack.c (backtrace_command_1): Update.
10498 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10500 * python/py-framefilter.c (py_print_frame)
10501 (gdbpy_apply_frame_filter): Change type of "flags".
10502 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10504 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10505 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10506 * extension.h (enum frame_filter_flag): Rename from
10507 frame_filter_flags.
10508 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10509 (apply_ext_lang_frame_filter): Change type of "flags".
10510 * extension.c (apply_ext_lang_frame_filter): Change type of
10512 * extension-priv.h (struct extension_language_ops)
10513 <apply_frame_filter>: Change type of "flags".
10515 2018-02-26 Tom Tromey <tom@tromey.com>
10518 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
10519 off-by-one in py_end computation.
10520 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10522 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10525 2018-02-26 Tom Tromey <tom@tromey.com>
10527 * dwarf2read.c (struct variant_field): New.
10528 (struct nextfield) <variant>: New field.
10529 (dwarf2_add_field): Handle DW_TAG_variant_part.
10530 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10531 discriminated union.
10532 (read_structure_type): Handle DW_TAG_variant_part.
10533 (handle_struct_member_die): New function, extracted from
10534 process_structure_scope. Handle DW_TAG_variant.
10535 (process_structure_scope): Handle discriminated unions. Call
10536 handle_struct_member_die.
10538 2018-02-26 Tom Tromey <tom@tromey.com>
10540 * rust-lang.h (rust_last_path_segment): Declare.
10541 * rust-lang.c (rust_last_path_segment): Now public. Change
10543 (struct disr_info): Remove.
10544 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10545 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10546 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10547 (rust_enum_p, rust_enum_variant): New function.
10548 (rust_underscore_fields): Remove "offset" parameter.
10549 (rust_print_enum): New function.
10550 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10551 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10552 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
10554 (rust_internal_print_type): New function, from rust_print_type.
10556 (rust_print_type): Call rust_internal_print_type.
10557 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10558 Update enum handling.
10559 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10560 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10561 (rust_union_quirks): New functions.
10562 (process_full_comp_unit, process_full_type_unit): Call
10564 (process_structure_scope): Update rust_unions if necessary.
10566 2018-02-26 Tom Tromey <tom@tromey.com>
10568 * value.h (value_union_variant): Declare.
10569 * valops.c (value_union_variant): New function.
10570 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10571 (struct discriminant_info): New.
10572 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10574 (struct main_type) <flag_discriminated_union>: New field.
10576 2018-02-26 Tom Tromey <tom@tromey.com>
10578 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10579 unittests/unpack-selftests.c.
10580 * unittests/unpack-selftests.c: New file.
10581 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10583 2018-02-26 Yao Qi <yao.qi@linaro.org>
10585 * dwarf2read.c (struct partial_die_info) <read>: New method.
10586 (read_partial_die): Remove the declaration.
10587 (load_partial_dies): Update.
10588 (partial_die_info::partial_die_info):
10589 (read_partial_die): Change it to partial_die_info::read.
10591 2018-02-26 Yao Qi <yao.qi@linaro.org>
10593 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10594 (fixup_partial_die): Remove declaration.
10595 (scan_partial_symbols): Update.
10596 (partial_die_parent_scope): Likewise.
10597 (partial_die_full_name): Likewise.
10598 (fixup_partial_die): Change it to partial_die_info::fixup.
10600 2018-02-26 Yao Qi <yao.qi@linaro.org>
10602 * dwarf2read.c (read_partial_die): Update the declaration.
10603 (load_partial_dies): Caller update.
10604 (read_partial_die): Remove one argument abbrev_len.
10606 2018-02-26 Yao Qi <yao.qi@linaro.org>
10608 * dwarf2read.c (struct partial_die_info): Add ctor, delete
10609 assignment operator.
10610 (load_partial_dies): Use ctor and copy ctor.
10611 (read_partial_die): Update.
10612 (dwarf2_cu::find_partial_die): Use ctor.
10614 2018-02-26 Yao Qi <yao.qi@linaro.org>
10616 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10617 (find_partial_die_in_comp_unit): Change it to
10618 dwarf2_cu::find_partial_die.
10619 (find_partial_die): Update.
10621 2018-02-26 Yao Qi <yao.qi@linaro.org>
10623 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10626 2018-02-26 Yao Qi <yao.qi@linaro.org>
10628 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10630 2018-02-26 Alan Hayward <alan.hayward@arm.com>
10632 * arch/amd64.h: Use common/tdesc.h.
10633 * arch/i386.c: Likewise.
10634 * arch/i386.h: Likewise.
10635 * arch/tic6x.c: Likewise.
10636 * arch/tdesc.h: Move file from here...
10637 * common/tdesc.h: ...to here.
10638 * features/aarch64-core.c: Regenerate.
10639 * features/aarch64-fpu.c: Regenerate.
10640 * features/i386/32bit-avx.c: Regenerate.
10641 * features/i386/32bit-avx512.c: Regenerate.
10642 * features/i386/32bit-core.c: Regenerate.
10643 * features/i386/32bit-linux.c: Regenerate.
10644 * features/i386/32bit-mpx.c: Regenerate.
10645 * features/i386/32bit-pkeys.c: Regenerate.
10646 * features/i386/32bit-sse.c: Regenerate.
10647 * features/i386/64bit-avx.c: Regenerate.
10648 * features/i386/64bit-avx512.c: Regenerate.
10649 * features/i386/64bit-core.c: Regenerate.
10650 * features/i386/64bit-linux.c: Regenerate.
10651 * features/i386/64bit-mpx.c: Regenerate.
10652 * features/i386/64bit-pkeys.c: Regenerate.
10653 * features/i386/64bit-segments.c: Regenerate.
10654 * features/i386/64bit-sse.c: Regenerate.
10655 * features/i386/x32-core.c: Regenerate.
10656 * features/tic6x-c6xp.c: Regenerate.
10657 * features/tic6x-core.c: Regenerate.
10658 * features/tic6x-gp.c: Regenerate.
10659 * target-descriptions.c: Use common/tdesc.h.
10660 * target-descriptions.h: Likewise.
10662 2018-02-24 Tom Tromey <tom@tromey.com>
10664 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10665 (try_thread_db_load_from_dir, thread_db_load_search): Use
10667 (info_auto_load_libthread_db_compare): Return bool. Change
10669 (info_auto_load_libthread_db): Use std::vector, std::string.
10672 2018-02-24 Tom Tromey <tom@tromey.com>
10674 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10676 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10678 * gdbarch.c: Rebuild.
10679 * gdbarch.h: Rebuild.
10680 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10681 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10682 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10685 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
10687 * gdbtypes.h (sect_offset): Change type to uint64_t.
10688 (sect_offset_str): New function.
10689 * dwarf2read.c (create_addrmap_from_aranges): Use
10691 (error_check_comp_unit_head): Likewise.
10692 (create_debug_type_hash_table): Likewise.
10693 (read_cutu_die_from_dwo): Likewise.
10694 (init_cutu_and_read_dies): Likewise.
10695 (init_cutu_and_read_dies_no_follow): Likewise.
10696 (process_psymtab_comp_unit_reader): Likewise.
10697 (partial_die_parent_scope): Likewise.
10698 (peek_die_abbrev): Likewise.
10699 (process_queue): Likewise.
10700 (dwarf2_physname): Likewise.
10701 (read_namespace_alias): Likewise.
10702 (read_import_statement): Likewise.
10703 (create_dwo_cu_reader): Likewise.
10704 (create_cus_hash_table): Likewise.
10705 (lookup_dwo_cutu): Likewise.
10706 (inherit_abstract_dies): Likewise.
10707 (read_func_scope): Likewise.
10708 (read_call_site_scope): Likewise.
10709 (dwarf2_add_member_fn): Likewise.
10710 (read_common_block): Likewise.
10711 (read_module_type): Likewise.
10712 (read_typedef): Likewise.
10713 (read_subrange_type): Likewise.
10714 (load_partial_dies): Likewise.
10715 (read_partial_die): Likewise.
10716 (find_partial_die): Likewise.
10717 (read_str_index): Likewise.
10718 (dwarf2_string_attr): Likewise.
10719 (build_error_marker_type): Likewise.
10720 (lookup_die_type): Likewise.
10721 (dump_die_shallow): Likewise.
10722 (follow_die_ref): Likewise.
10723 (dwarf2_fetch_die_loc_sect_off): Likewise.
10724 (dwarf2_fetch_constant_bytes): Likewise.
10725 (follow_die_sig): Likewise.
10726 (get_signatured_type): Likewise.
10727 (get_DW_AT_signature_type): Likewise.
10728 (dwarf2_find_containing_comp_unit): Likewise.
10729 (set_die_type): Likewise.
10731 2018-02-21 John Baldwin <jhb@FreeBSD.org>
10733 * arch/aarch64.c: Include "common-defs.h".
10734 * arch/amd64.c: Likewise.
10735 * arch/i386.c: Likewise.
10737 2018-02-21 Tom Tromey <tom@tromey.com>
10739 * value.h: (extract_field_op): Update.
10740 * eval.c (extract_field_op): Return a const char *.
10741 * expression.h (parse_expression_for_completion): Update.
10742 * completer.c (complete_expression): Update.
10743 (add_struct_fields): Make fieldname const.
10744 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10745 (mark_completion_tag, parse_exp_in_context_1): Update.
10746 (parse_expression_for_completion): Change "name" to
10747 unique_xmalloc_ptr*.
10749 2018-02-21 Tom Tromey <tom@tromey.com>
10751 * infcall.c (call_function_by_hand_dummy): Use std::vector.
10753 2018-02-21 Yao Qi <yao.qi@linaro.org>
10755 * avr-tdep.c (avr_read_pc): Change parameter type to
10757 * gdbarch.sh (read_pc): Likewise.
10758 * gdbarch.c: Re-generated.
10759 * gdbarch.h: Re-generated.
10760 * hppa-tdep.c (hppa_read_pc): Change parameter type to
10762 * ia64-tdep.c (ia64_read_pc): Likewise.
10763 * mips-tdep.c (mips_read_pc): Likewise.
10764 * spu-tdep.c (spu_read_pc): Likewise.
10766 2018-02-21 Yao Qi <yao.qi@linaro.org>
10768 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10769 * regcache-dump.c: New file.
10770 * regcache.c: Move register_dump to regcache-dump.c.
10771 (maintenance_print_registers): Likewise.
10772 (maintenance_print_raw_registers): Likewise.
10773 (maintenance_print_cooked_registers): Likewise.
10774 (maintenance_print_register_groups): Likewise.
10775 (maintenance_print_remote_registers): Likewise.
10776 (_initialize_regcache): Likewise.
10777 * regcache.h (register_dump): Moved from regcache.c.
10779 2018-02-21 Yao Qi <yao.qi@linaro.org>
10781 * regcache.c (regcache::regcache): Update.
10782 (regcache::invalidate): Move it to detached_regcache::invalidate.
10783 (get_thread_arch_aspace_regcache): Update.
10784 (regcache::raw_update): Update.
10785 (regcache::cooked_read): Remove some code.
10786 (regcache::cooked_read_value): Likewise.
10787 (regcache::raw_write): Remove assert on m_readonly_p.
10788 (regcache::raw_supply_integer): Move it to
10789 detached_regcache::raw_supply_integer.
10790 (regcache::raw_supply_zeroed): Likewise.
10791 * regcache.h (detached_regcache) <raw_supply_integer>: New
10793 <raw_supply_zeroed, invalidate>: Likewise.
10794 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10795 <invalidate>: Likewise.
10796 <m_readonly_p>: Removed.
10798 2018-02-21 Yao Qi <yao.qi@linaro.org>
10800 * infcmd.c (get_return_value): Let stop_regs point to
10801 get_current_regcache.
10802 * regcache.c (regcache::regcache): Remove.
10803 (register_dump_reg_buffer): New class.
10804 (regcache_print): Adjust.
10805 * regcache.h (regcache): Remove constructors.
10807 2018-02-21 Yao Qi <yao.qi@linaro.org>
10809 * regcache.c (class register_dump): New class.
10810 (register_dump_regcache, register_dump_none): New class.
10811 (register_dump_remote, register_dump_groups): New class.
10812 (regcache_print): Update.
10813 * regcache.h (regcache_dump_what): Move it to regcache.c.
10814 (regcache) <dump>: Remove.
10816 2018-02-21 Yao Qi <yao.qi@linaro.org>
10818 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10820 (jit_unwind_reg_set_impl): Call raw_supply.
10821 (jit_frame_sniffer): Use reg_buffer_rw.
10822 * record-full.c (record_full_core_regbuf): Change its type.
10823 (record_full_core_open_1): Use reg_buffer_rw.
10824 (record_full_close): Likewise.
10825 (record_full_core_fetch_registers): Use regcache->raw_supply.
10826 (record_full_core_store_registers): Likewise.
10827 * regcache.c (regcache::get_register_status): Move it to
10829 (regcache_raw_set_cached_value): Remove.
10830 (regcache::raw_set_cached_value): Remove.
10831 (regcache::raw_write): Call raw_supply.
10832 (regcache::raw_supply): Move it to reg_buffer_rw.
10833 * regcache.h (regcache_raw_set_cached_value): Remove.
10834 (reg_buffer_rw): New class.
10836 2018-02-21 Yao Qi <yao.qi@linaro.org>
10838 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10839 readonly_detached_regcache.
10840 (dummy_frame_prev_register): Use regcache->cooked_read.
10841 * frame.c (frame_save_as_regcache): Change return type.
10842 (frame_pop): Update.
10843 * frame.h (frame_save_as_regcache): Update declaration.
10844 * inferior.h (get_infcall_suspend_state_regcache): Update
10846 * infrun.c (infcall_suspend_state) <registers>: use
10847 readonly_detached_regcache.
10848 (save_infcall_suspend_state): Don't use regcache_dup.
10849 (get_infcall_suspend_state_regcache): Change return type.
10850 * linux-fork.c (struct fork_info) <savedregs>: Change to
10851 readonly_detached_regcache.
10853 (fork_save_infrun_state): Don't use regcache_dup.
10854 (info_checkpoints_command): Adjust.
10855 * mi/mi-main.c (register_changed_p): Update declaration.
10856 (mi_cmd_data_list_changed_registers): Use
10857 readonly_detached_regcache.
10858 (register_changed_p): Change parameter type to
10859 readonly_detached_regcache.
10860 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10861 readonly_detached_regcache.
10862 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10863 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10865 (regcache::save): Move it to reg_buffer.
10866 (regcache::restore): Change parameter type.
10867 (regcache_dup): Remove.
10868 * regcache.h (reg_buffer) <save>: New method.
10869 (readonly_detached_regcache): New class.
10870 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10871 readonly_detached_regcache.
10872 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10874 2018-02-21 Yao Qi <yao.qi@linaro.org>
10876 * frame.c (frame_save_as_regcache): Use regcache method save.
10877 (frame_pop): Use regcache method restore.
10878 * infrun.c (restore_infcall_suspend_state): Likewise.
10879 * linux-fork.c (fork_load_infrun_state): Likewise.
10880 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10882 * regcache.c (regcache_save): Remove.
10883 (regcache::restore): More asserts.
10884 (regcache_cpy): Remove.
10885 * regcache.h (regcache_save): Remove the declaration.
10886 (regcache::restore): Move from private to public.
10887 Remove the friend declaration of regcache_cpy.
10888 (regcache_cpy): Remove declaration.
10890 2018-02-21 Yao Qi <yao.qi@linaro.org>
10892 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10893 parameter type to 'readable_regcache *'.
10894 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10895 * arm-tdep.c (arm_neon_quad_read): Likewise.
10896 (arm_pseudo_read): Likewise.
10897 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10898 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10899 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10900 * gdbarch.c: Re-generated.
10901 * gdbarch.h: Re-generated.
10902 * gdbarch.sh (pseudo_register_read): Change parameter type to
10903 'readable_regcache *'.
10904 (pseudo_register_read_value): Likewise.
10905 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10906 (h8300_pseudo_register_read): Likewise.
10907 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10908 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10909 (i386_pseudo_register_read_into_value): Likewise.
10910 (i386_pseudo_register_read_value): Likewise.
10911 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10913 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10914 * m32c-tdep.c (m32c_raw_read): Likewise.
10915 (m32c_read_flg): Likewise.
10916 (m32c_banked_register): Likewise.
10917 (m32c_banked_read): Likewise.
10918 (m32c_sb_read): Likewise.
10919 (m32c_part_read): Likewise.
10920 (m32c_cat_read): Likewise.
10921 (m32c_r3r2r1r0_read): Likewise.
10922 (m32c_pseudo_register_read): Likewise.
10923 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10924 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10925 (mep_pseudo_cr64_read): Likewise.
10926 (mep_pseudo_register_read): Likewise.
10927 * mips-tdep.c (mips_pseudo_register_read): Likewise.
10928 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10929 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10930 * regcache.c (regcache::raw_read): Move it to readable_regcache.
10931 (regcache::cooked_read): Likewise.
10932 (regcache::cooked_read_value): Likewise.
10933 (regcache_cooked_read_signed):
10934 (regcache::cooked_read): Likewise.
10935 * regcache.h (readable_regcache): New class.
10936 (regcache): Inherit readable_regcache. Move some methods to
10938 * rl78-tdep.c (rl78_pseudo_register_read): Change
10939 parameter type to 'readable_regcache *'.
10940 * rs6000-tdep.c (do_regcache_raw_read): Remove.
10941 (e500_pseudo_register_read): Change parameter type to
10942 'readable_regcache *'.
10943 (dfp_pseudo_register_read): Likewise.
10944 (vsx_pseudo_register_read): Likewise.
10945 (efpr_pseudo_register_read): Likewise.
10946 * s390-tdep.c (s390_pseudo_register_read): Likewise.
10947 * sh-tdep.c (sh_pseudo_register_read): Likewise.
10948 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10949 (sh64_pseudo_register_read): Likewise.
10950 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10951 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10952 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10953 (spu_pseudo_register_read): Likewise.
10954 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10955 (xtensa_pseudo_register_read): Likewise.
10957 2018-02-21 Yao Qi <yao.qi@linaro.org>
10959 * regcache.c (regcache::regcache): Call reg_buffer ctor.
10960 (regcache::arch): Move it to reg_buffer::arch.
10961 (regcache::register_buffer): Likewise.
10962 (regcache::assert_regnum): Likewise.
10963 (regcache::num_raw_registers): Likewise.
10964 * regcache.h (reg_buffer): New class.
10965 (regcache): Inherit reg_buffer.
10967 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
10969 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10970 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10972 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
10974 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10976 2018-02-19 Alan Hayward <alan.hayward@arm.com>
10978 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10979 (SFILES): Remove common/*.c files.
10980 (COMMON_OBS): Remove some *.o files built from common/*.c files.
10981 * common/common.host: Add common reference.
10982 * configure.ac: Likewise.
10983 * configure: Regenerate.
10985 2018-02-16 Yao Qi <yao.qi@linaro.org>
10987 * block.c (block_namespace_info): Inherit allocate_on_obstack.
10988 (block_initialize_namespace): Use new.
10989 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10990 (dwarf2_free_objfile): Use delete.
10991 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10992 (copy_type_recursive): Use new.
10993 * gdb_obstack.h (allocate_on_obstack): New.
10995 2018-02-15 Yao Qi <yao.qi@linaro.org>
10998 * inferior.c (exit_inferior_1): Reset inf->control.
11000 2018-02-15 Joel Brobecker <brobecker@adacore.com>
11002 * ada-lang.c (ada_to_fixed_value_create): Delete advance
11005 2018-02-14 Pedro Alves <palves@redhat.com>
11007 * frame-unwind.c (frame_unwind_try_unwinder): Always call
11008 frame_cleanup_after_sniffer on exception.
11010 2018-02-14 Tom Tromey <tom@tromey.com>
11012 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11014 (solib_bfd_open): Make pathname const.
11015 * solib.c (solib_bfd_open): Make pathname const.
11016 * solib-spu.c (spu_bfd_fopen): Make name const.
11017 (spu_bfd_open): Make pathname const.
11018 * solib-darwin.c (darwin_bfd_open): Make pathname const.
11019 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11021 2018-02-14 Tom Tromey <tom@tromey.com>
11023 * symfile.c (symfile_bfd_open): Update.
11024 * source.h (openp, source_full_path_of, find_and_open_source):
11025 Change argument type to unique_xmalloc_ptr.
11026 * source.c (openp): Take a unique_xmalloc_ptr.
11027 (source_full_path_of, find_and_open_source): Likewise.
11028 (open_source_file, symtab_to_fullname): Update.
11029 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11030 unique_xmalloc_ptr.
11031 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11032 (exec_file_find): Update.
11033 * psymtab.c (psymtab_to_fullname): Update.
11034 * nto-tdep.h (nto_find_and_open_solib): Update.
11035 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11036 unique_xmalloc_ptr.
11037 * exec.c (exec_file_attach): Update.
11038 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11039 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11041 2018-02-14 Tom Tromey <tom@tromey.com>
11043 * solib.c: Include source.h.
11044 * nto-tdep.c: Include source.h.
11045 * mi/mi-cmd-env.c: Include source.h.
11046 * infcmd.c: Include source.h.
11047 * exec.c: Include source.h.
11048 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11049 (add_path, directory_switch, source_path, init_source_path): Move
11051 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11052 (add_path, directory_switch, source_path, init_source_path):
11055 2018-02-14 Tom Tromey <tom@tromey.com>
11057 * solist.h (exec_file_find, solib_find): Return
11058 unique_xmalloc_ptr.
11059 (solib_bfd_fopen): Take a const char *.
11060 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11061 (exec_file_find, solib_find): Likewise.
11062 (solib_bfd_fopen): Do not take ownership of "pathname".
11063 (solib_bfd_open): Use unique_xmalloc_ptr.
11064 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11065 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11066 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11067 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11069 2018-02-14 Joel Brobecker <brobecker@adacore.com>
11071 * ada-lang.c (name_match_type_from_name): Remove reference to
11072 ada_name_for_lookup in function's documentation.
11073 * ada-lang.h (ada_name_for_lookup): Delete declaration.
11075 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11077 * defs.h (enum openp_flags): New enum.
11078 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11079 Move to enum openp_flags.
11080 (openp_flags): New enum flags.
11081 (openp): Change parameter type to openp_flags.
11082 * source.c (openp): Change parameter type to openp_flags.
11083 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11084 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11086 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11088 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11091 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
11093 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11095 (class dwarf2_queue_guard): ...the destructor of this new class.
11096 (dw2_do_instantiate_symtab): Create instance of the new class
11097 dwarf2_queue_guard, remove cleanup.
11099 2018-02-09 Tom Tromey <tom@tromey.com>
11101 * source.c (find_source_lines): Don't reference past the end of
11104 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11106 * remote.c (remote_btrace_maybe_reopen): Change error message.
11107 * btrace.c (btrace_enable): Likewise.
11108 (parse_xml_btrace): Likewise.
11109 (parse_xml_btrace_conf): Likewise.
11111 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11113 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11114 (linux_enable_pt, linux_enable_bts): Call
11115 diagnose_perf_event_open_fail.
11117 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11119 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11120 Remove parameter and change return type. Update callers. Move it.
11121 (linux_enable_bts, linux_enable_pt): Improve error message.
11122 (linux_enable_pt): Remove zero buffer size check.
11123 (linux_enable_btrace): Improve error messages. Remove NULL return
11126 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11128 * btrace.c (btrace_enable): Remove target_supports_btrace call.
11129 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11130 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11131 (linux_supports_pt, linux_supports_btrace): Remove.
11132 (linux_enable_bts): Call cpu_supports_bts.
11133 * nat/linux-btrace.h (linux_supports_btrace): Remove.
11134 * remote.c (remote_supports_btrace): Remove.
11135 (init_remote_ops): Remove remote_supports_btrace.
11136 * target-delegates.c: Regenerated.
11137 * target.c (target_supports_btrace): Remove.
11138 * target.h (target_ops) <to_supports_btrace>: Remove
11139 (target_supports_btrace): Remove.
11140 * x86-linux-nat.c (x86_linux_create_target): Remove
11141 linux_supports_btrace.
11143 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11145 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11147 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11148 exception and use message in own exception.
11150 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11152 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11153 (perf_event_pt_event_type): Use gdb_file_up.
11154 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11155 scoped_fd, and scoped_mmap.
11157 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11159 * common/scoped_mmap.h: New.
11160 * unittests/scoped_mmap-selftest.c: New.
11161 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11162 unittests/scoped_mmap-selftest.c.
11164 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11166 * common/scoped_fd.h: New.
11167 * unittests/scoped_fd-selftest.c: New.
11168 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11169 unittests/scoped_fd-selftest.c.
11171 2018-02-09 Tom Tromey <tom@tromey.com>
11173 * auto-load.c (auto_load_section_scripts): Use
11174 gdb::unique_xmalloc_ptr.
11176 2018-02-09 Tom Tromey <tom@tromey.com>
11178 * auto-load.c (execute_script_contents): Use std::string.
11180 2018-02-09 Joel Brobecker <brobecker@adacore.com>
11182 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11183 Python function, rather than a new command.
11185 2018-02-08 Tom Tromey <tom@tromey.com>
11187 * solib.c (solib_find_1): Use std::string.
11188 (solib_bfd_fopen): Use unique_xmalloc_ptr.
11190 2018-02-08 Tom Tromey <tom@tromey.com>
11192 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11194 2018-02-08 Tom Tromey <tom@tromey.com>
11196 * source.c (find_source_lines): Use gdb::def_vector.
11198 2018-02-08 Tom Tromey <tom@tromey.com>
11200 * macrocmd.c (struct temporary_macro_definition): New.
11201 (macro_define_command): Use temporary_macro_definition. Remove
11203 (free_macro_definition_ptr): Remove.
11205 2018-02-08 Tom Tromey <tom@tromey.com>
11207 * macroexp.c (maybe_expand): Use std::string.
11209 2018-02-08 Tom Tromey <tom@tromey.com>
11211 * macroexp.c (struct macro_buffer): Add initializers for some
11213 (init_buffer, init_shared_buffer, free_buffer)
11214 (free_buffer_return_text): Remove.
11215 (macro_buffer): New constructors.
11216 (~macro_buffer): New destructor.
11217 (macro_buffer::set_shared): New method.
11218 (macro_buffer::resize_buffer, macro_buffer::appendc)
11219 (macro_buffer::appendmem): Now methods, not free functions.
11220 (set_token, append_tokens_without_splicing, stringify)
11221 (macro_stringify): Update.
11222 (gather_arguments): Change return type. Remove argc_p argument,
11223 add args_ptr argument. Use std::vector.
11224 (substitute_args): Remove argc argument. Accept std::vector.
11225 (expand): Update. Use std::vector.
11226 (scan, macro_expand, macro_expand_next): Update.
11228 2018-02-08 Tom Tromey <tom@tromey.com>
11230 * symtab.c (default_collect_symbol_completion_matches_break_on):
11231 Use unique_xmalloc_ptr.
11232 * macroscope.h: (sal_macro_scope, user_macro_scope)
11233 (default_macro_scope): Return unique_xmalloc_ptr.
11234 * macroscope.c (sal_macro_scope, user_macro_scope)
11235 (default_macro_scope): Return unique_xmalloc_ptr.
11236 * macroexp.h (macro_expand, macro_expand_once): Return
11237 unique_xmalloc_ptr.
11238 * macroexp.c (macro_expand, macro_expand_once): Return
11239 unique_xmalloc_ptr.
11240 * macrocmd.c (macro_expand_command, macro_expand_once_command)
11241 (info_macro_command, info_macros_command): Use
11242 unique_xmalloc_ptr.
11243 * compile/compile-c-support.c (write_macro_definitions): Use
11244 unique_xmalloc_ptr.
11245 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11247 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
11249 * value.c (value_static_field): Assign field type instead of
11250 containing type when returning an optimized out value.
11252 2018-02-06 Yao Qi <yao.qi@linaro.org>
11254 * ft32-tdep.c (ft32_read_pc): Remove.
11255 (ft32_write_pc): Remove.
11256 (ft32_gdbarch_init): Update.
11257 * m32r-tdep.c (m32r_read_pc): Remove.
11258 (m32r_gdbarch_init): Update.
11259 * mep-tdep.c (mep_read_pc): Remove.
11260 (mep_gdbarch_init): Update.
11261 * microblaze-tdep.c (microblaze_write_pc): Remove.
11262 (microblaze_gdbarch_init): Update.
11263 * mn10300-tdep.c (mn10300_read_pc): Remove.
11264 (mn10300_write_pc): Remove.
11265 (mn10300_gdbarch_init): Update.
11266 * moxie-tdep.c (moxie_read_pc): Remove.
11267 (moxie_write_pc): Remove.
11268 (moxie_gdbarch_init): Update.
11270 2018-02-06 Yao Qi <yao.qi@linaro.org>
11272 * expprint.c (print_subexp_standard): Handle
11273 OP_F77_UNDETERMINED_ARGLIST.
11274 (dump_subexp_body_standard): Likewise.
11276 2018-02-05 Alan Hayward <alan.hayward@arm.com>
11278 * target-descriptions.c (tdesc_element_visitor) Add empty
11280 (tdesc_type): Move make_gdb_type from here.
11281 (tdesc_type_builtin): Likewise.
11282 (tdesc_type_vector): Likewise.
11283 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11284 (make_gdb_type_struct): Move from tdesc_type_with_fields.
11285 (make_gdb_type_union): Likewise.
11286 (make_gdb_type_flags): Likewise.
11287 (make_gdb_type_enum): Likewise.
11288 (make_gdb_type): New function.
11289 (tdesc_register_type): Use static make_gdb_type.
11291 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
11293 * infcmd.c (default_print_one_register_info): Align natural-format
11294 column values consistently one under another.
11295 (pad_to_column): New function.
11297 2018-02-05 Joel Brobecker <brobecker@adacore.com>
11299 * dwarf2read.c (dwarf2_physname): Move commment.
11301 2018-02-01 Leszek Swirski <leszeks@google.com>
11303 * varobj.c (varobj_formatted_print_options): Allow recursive
11304 pretty printing if pretty printing is enabled.
11306 2018-02-01 Leszek Swirski <leszeks@google.com>
11308 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11309 names after a structop as a filename.
11311 2018-02-01 Yao Qi <yao.qi@linaro.org>
11313 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11314 (arm_record_coproc_data_proc): Likewise.
11316 2018-02-01 Yao Qi <yao.qi@linaro.org>
11318 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11320 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
11322 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11323 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11325 2018-01-31 Pedro Alves <palves@redhat.com>
11327 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11328 * inflow.c (child_terminal_save_inferior): Wrap reference to
11329 tcgetpgrp in HAVE_TERMIOS_H.
11330 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11332 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11333 always iterate over all inferiors.
11334 (gdbsim_cntrl_c): Adjust.
11335 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11337 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11339 * gdbtypes.c (lookup_array_range_type): Make sure the array's
11340 index type is objfile-owned if the element type is as well.
11342 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11346 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
11348 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11349 "features/s390x-linux64.c".
11350 (_initialize_s390_linux_tdep): Remove initialization of tdescs
11351 s390_linux32 and s390x_linux64.
11352 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11354 * s390-tdep.c: Include "features/s390-linux32.c" and
11355 "features/s390x-linux64.c".
11356 (s390_tdesc_valid): Add check for tdesc_has_registers.
11357 (s390_gdbarch_init): Make sure there is always a valid tdesc.
11358 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11359 tdesc_s390x_linux64.
11360 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11361 tdesc_s390x_linux64 to...
11362 * s390-tdep.h: ...here.
11364 2018-01-30 Pedro Alves <palves@redhat.com>
11367 * config.in, configure: Regenerate.
11368 * configure.ac: Check for getpgid.
11369 * go32-nat.c (go32_pass_ctrlc): New.
11370 (go32_target): Install it.
11371 * inf-child.c (inf_child_target): Install
11372 child_terminal_save_inferior, child_pass_ctrlc and
11374 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11375 (inf_ptrace_target): No longer install it.
11376 * infcmd.c (interrupt_target_1): Adjust.
11377 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11378 (child_interrupt): Declare.
11379 (inferior::terminal_state): New.
11380 * inflow.c (struct terminal_info): Update comments.
11381 (inferior_process_group): Delete.
11382 (terminal_is_ours): Delete.
11383 (gdb_tty_state): New.
11384 (child_terminal_init): Adjust.
11385 (is_gdb_terminal, sharing_input_terminal_1)
11386 (sharing_input_terminal): New functions.
11387 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
11388 Set the process's actual process group in the foreground if
11389 possible. Handle is_ours_for_output/is_ours distinction. Don't
11390 mark terminal as the inferior's if not sharing GDB's terminal.
11391 Don't check attach_flag.
11392 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11393 pass down a target_terminal_state.
11394 (child_terminal_save_inferior): New, factored out from ...
11395 (child_terminal_ours_1): ... this. Handle
11396 target_terminal_state::is_ours_for_output.
11397 (child_interrupt, child_pass_ctrlc): New.
11398 (inflow_inferior_exit): Clear the inferior's terminal_state.
11399 (copy_terminal_info): Copy the inferior's terminal state.
11400 (_initialize_inflow): Remove reference to terminal_is_ours.
11401 * inflow.h (inferior_process_group): Delete.
11402 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11403 * procfs.c (procfs_target): Don't install procfs_interrupt.
11404 (procfs_interrupt): Delete.
11405 * remote.c (remote_serial_quit_handler): Adjust.
11406 (remote_interrupt): Remove ptid parameter. Adjust.
11407 * target-delegates.c: Regenerate.
11408 * target.c: Include "terminal.h".
11409 (target_terminal::terminal_state): Rename to ...
11410 (target_terminal::m_terminal_state): ... this.
11411 (target_terminal::init): Adjust.
11412 (target_terminal::inferior): Adjust to per-inferior
11414 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11415 (target_terminal::ours, target_terminal::ours_for_output): Use
11416 target_terminal_is_ours_kind.
11417 (target_interrupt): Remove ptid parameter. Adjust.
11418 (default_target_pass_ctrlc): Adjust.
11419 * target.h (target_ops::to_terminal_save_inferior): New field.
11420 (target_ops::to_interrupt): Remove ptid_t parameter.
11421 (target_interrupt): Remove ptid_t parameter. Update comment.
11422 (target_pass_ctrlc): Update comment.
11423 * target/target.h (target_terminal_state): New scoped enum,
11424 factored out of ...
11425 (target_terminal::terminal_state): ... here.
11426 (target_terminal::inferior): Update comments.
11427 (target_terminal::restore_inferior): New.
11428 (target_terminal::is_inferior, target_terminal::is_ours)
11429 (target_terminal::is_ours_for_output): Adjust.
11430 (target_terminal::scoped_restore_terminal_state): Adjust to
11431 rename, and call restore_inferior() instead of inferior().
11432 (target_terminal::scoped_restore_terminal_state::m_state): Change
11434 (target_terminal::terminal_state): Rename to ...
11435 (target_terminal::m_terminal_state): ... this and change type.
11437 2018-01-30 Pedro Alves <palves@redhat.com>
11439 * linux-nat.c (wait_for_signal): New function.
11440 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11442 (async_terminal_is_ours)
11443 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11444 (linux_nat_add_target): Don't override
11445 to_terminal_inferior/to_terminal_ours.
11447 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
11449 * remote.c (remote_follow_fork): Don't call "detach_inferior".
11451 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
11453 * dwarf2read.c (free_dwo_files): Add forward-declaration.
11454 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11455 dwarf2_per_objfile_free here.
11456 (dwarf2_per_objfile_free): Remove.
11457 (_initialize_dwarf2_read): Don't register
11458 dwarf2_per_objfile_free as a registry cleanup.
11460 2018-01-27 Eli Zaretskii <eliz@gnu.org>
11462 Avoid compilation errors in MinGW native builds
11464 The error is triggered by including python-internal.h, and the
11467 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11468 from build-gnulib/import/math.h:27,
11469 from d:/usr/Python26/include/pyport.h:235,
11470 from d:/usr/Python26/include/Python.h:58,
11471 from python/python-internal.h:94,
11472 from python/py-arch.c:24:
11473 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11477 This happens because Python headers define 'hypot' to expand t
11478 '_hypot' in the Windows builds.
11479 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11480 'hypoth'. This avoids a compilation error.
11482 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11484 * MAINTAINERS (Write After Approval): Fix ordering.
11486 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11488 * MAINTAINERS (Write After Approval): Add Alan Hayward.
11490 2018-01-26 Alan Modra <amodra@gmail.com>
11492 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11493 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11494 Remove nop. Make const. Comment.
11495 (powerpc32_plt_stub_so_2): New.
11496 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11497 Correct count. Update uses.
11498 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11499 Move common code reading PLT entry word. Correct
11500 powerpc32_plt_stub PLT address calculation.
11501 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11502 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11503 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11504 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11505 (ppc64_standard_linkage8): Likewise.
11506 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11507 Correct insns description.
11508 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11510 2018-01-24 Pedro Alves <palves@redhat.com>
11512 GCC PR libstdc++/83906
11513 * gdbtypes.c (operator==(const dynamic_prop &,
11514 const dynamic_prop &)): New.
11515 (operator==(const range_bounds &, const range_bounds &)): New.
11516 (check_types_equal): Use them instead of memcmp.
11517 * gdbtypes.h (operator==(const dynamic_prop &,
11518 const dynamic_prop &)): Declare.
11519 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11520 (operator==(const range_bounds &, const range_bounds &)): Declare.
11521 (operator!=(const range_bounds &, const range_bounds &)): Declare.
11523 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11525 * s390-linux-tdep.c (s390_record_address_mask)
11526 (s390_record_calc_disp_common, s390_record_calc_disp)
11527 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11528 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11529 (s390_process_record): Move to s390-tdep.c.
11530 (s390_linux_init_abi_any): Adjust.
11531 * s390-tdep.c (s390_record_address_mask)
11532 (s390_record_calc_disp_common, s390_record_calc_disp)
11533 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11534 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11535 (s390_process_record): Moved from s390-linux-tdep.c
11536 (s390_gdbarch_init): Adjust.
11538 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11540 * s390-linux-nat.c (s390-tdep.h): New include.
11541 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11542 (HFILES_NO_SRCDIR): Add s390-tdep.h.
11543 (ALLDEPFILES): Add s390-tdep.c.
11544 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11545 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11546 * s390-tdep.h: ...this. New file.
11547 * s390-linux-tdep.c (s390-tdep.h): New include.
11548 (_initialize_s390_tdep): Rename to...
11549 (_initialize_s390_linux_tdep): ...this and adjust.
11550 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11551 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11553 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11554 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11555 (s390_is_partial_instruction, s390_software_single_step)
11556 (is_non_branch_ril, s390_displaced_step_copy_insn)
11557 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11558 (s390_prologue_data, s390_addr, s390_store, s390_load)
11559 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11560 (s390_register_call_saved, s390_guess_tracepoint_registers)
11561 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11562 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11563 (s390_pseudo_register_name, s390_pseudo_register_type)
11564 (s390_pseudo_register_read, s390_pseudo_register_write)
11565 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11566 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11567 (s390_addr_bits_remove, s390_address_class_type_flags)
11568 (s390_address_class_type_flags_to_name)
11569 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11570 (s390_function_arg_float, s390_function_arg_vector)
11571 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11572 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11573 (s390_frame_align, s390_register_return_value, s390_return_value)
11574 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11575 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11576 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11577 (s390_trad_frame_prev_register, s390_unwind_cache)
11578 (s390_prologue_frame_unwind_cache)
11579 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11580 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11581 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11582 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11583 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11584 (s390_frame_base_address, s390_local_base_address)
11585 (s390_frame_base, s390_gcc_target_options)
11586 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11587 (s390_validate_reg_range, s390_tdesc_valid)
11588 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11589 * s390-tdep.c: ...this. New file.
11591 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11593 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11594 (s390_process_record, s390_gdbarch_tdep_alloc)
11595 (s390_linux_init_abi_any): Use/set new hook.
11597 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11599 * s390-linux-tdep.c (osabi.h): New include.
11600 (s390_linux_init_abi_31, s390_linux_init_abi_64)
11601 (s390_linux_init_abi_any): New functions.
11602 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11604 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11606 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11607 tdesc_has_registers check
11609 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11611 * s390-linux-tdep.c (s390_tdesc_valid): New function.
11612 (s390_validate_reg_range): New macro.
11613 (s390_gdbarch_init): Adjust.
11615 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11617 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11618 (s390_gdbarch_tdep_alloc): Adjust.
11619 (s390_gdbarch_init): Adjust.
11621 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11623 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11624 <have_tdb>: Change type to bool.
11625 (s390_gdbarch_tdep_alloc): Adjust.
11626 (s390_gdbarch_init): Adjust.
11628 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11630 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11631 (gdbarch_tdep) <have_upper, have_vx>: New fields.
11632 (s390_gdbarch_tdep_alloc): New function.
11633 (s390_gdbarch_init): Allocate tdep at start and use its fields
11634 instead of separate variables.
11636 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11638 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11639 when looking for cached gdbarch and add comment for remaining.
11641 2018-01-22 Pedro Alves <palves@redhat.com>
11642 Sergio Durigan Junior <sergiodj@redhat.com>
11644 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11647 2018-01-22 Maciej W. Rozycki <macro@mips.com>
11649 * MAINTAINERS: Update my company e-mail address.
11651 2018-01-22 Yao Qi <yao.qi@linaro.org>
11653 * regcache.c (cooked_write_test): New function.
11654 (_initialize_regcache): Register the test.
11656 2018-01-22 Yao Qi <yao.qi@linaro.org>
11658 * ia64-tdep.c (ia64_pseudo_register_read): Call
11659 regcache->cooked_read instead of regcache_cooked_read_unsigned.
11660 * m32c-tdep.c (m32c_cat_read): Likewise.
11661 (m32c_r3r2r1r0_read): Likewise.
11662 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11663 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11665 2018-01-22 Yao Qi <yao.qi@linaro.org>
11667 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11668 method raw_read instead of regcache_raw_read.
11669 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11670 * arm-tdep.c (arm_neon_quad_read): Likewise.
11671 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11672 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11673 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11674 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11675 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11676 (i386_pseudo_register_read_into_value): Likewise.
11677 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11678 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11679 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11680 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11681 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11682 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11683 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11684 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11685 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11687 2018-01-22 Yao Qi <yao.qi@linaro.org>
11689 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11690 * configure.tgt: Remove target mt.
11691 * mt-tdep.c: Remove.
11692 * regcache.c (cooked_read_test): Remove the check for mt.
11694 2018-01-22 Yao Qi <yao.qi@linaro.org>
11696 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11697 instead of gdbarch_pseudo_register_read_value.
11699 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11701 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11704 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11706 * linespec.c (create_sals_line_offset): Remove code that preserved
11707 the symtab_and_line's line number.
11709 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11711 * varobj.c (varobj_create): Don't set valid_block when creating a
11714 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11716 * varobj.c (varobj_create): Remove out of date comment.
11718 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11721 * ada-exp.y (write_var_from_sym): Pass extra parameter when
11722 updating innermost block.
11723 * parse.c (innermost_block_tracker::update): Take extra type
11724 parameter, and check types match before updating innermost block.
11725 (write_dollar_variable): Update innermost block for registers.
11726 * parser-defs.h (enum innermost_block_tracker_type): New enum.
11727 (innermost_block_tracker::innermost_block_tracker): Initialise
11729 (innermost_block_tracker::reset): Take type parameter.
11730 (innermost_block_tracker::update): Take type parameter, and pass
11731 type through as needed.
11732 (innermost_block_tracker::m_types): New member.
11733 * varobj.c (varobj_create): Pass type when reseting innermost
11736 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11738 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11739 * ada-lang.c (resolve_subexp): Likewise.
11740 * breakpoint.c (set_breakpoint_condition) Likewise.
11741 (watch_command_1) Likewise.
11742 * c-exp.y (variable): Likewise.
11743 * d-exp.y (PrimaryExpression): Likewise.
11744 * f-exp.y (variable): Likewise.
11745 * go-exp.y (variable): Likewise.
11746 * m2-exp.y (variable): Likewise.
11747 * objfiles.c (objfile::~objfile): Likewise.
11748 * p-exp.y (variable): Likewise.
11749 * parse.c (innermost_block): Change type.
11750 * parser-defs.h (class innermost_block_tracker): New.
11751 (innermost_block): Change to innermost_block_tracker.
11752 * printcmd.c (display_command): Switch to innermost_block API.
11753 (do_one_display): Likewise.
11754 * rust-exp.y (do_one_display): Likewise.
11755 * symfile.c (clear_symtab_users): Likewise.
11756 * varobj.c (varobj_create): Switch to innermost_block API, replace
11757 use of innermost_block with block stored on varobj object.
11759 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11761 * expression.h (innermost_block): Remove declaration.
11762 * varobj.c: Add 'parser-defs.h' include.
11764 2018-01-19 Tom Tromey <tom@tromey.com>
11766 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11767 symbols in the static and global blocks.
11769 2018-01-19 James Clarke <jrtc27@jrtc27.com>
11771 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11772 gdb_ptrace.h, and move including gdb_wait.h ...
11773 * nat/linux-ptrace.h: ... to here.
11775 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11777 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11778 inf_ptrace_detach_success.
11779 (inf_ptrace_detach_success): Add inferior parameter, use it
11780 instead of inferior_ptid, pass it to detach_inferior.
11781 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11783 * inferior.c (detach_inferior): Add overload that takes an
11785 * inferior.h (detach_inferior): Likewise.
11786 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11787 use inferior_ptid, adjust call to inf_ptrace_detach_success.
11788 * linux-thread-db.c (thread_db_detach): Use inf parameter.
11790 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11792 * target.h (struct target_ops) <to_detach>: Add inferior
11794 (target_detach): Likewise.
11795 * target.c (dispose_inferior): Pass inferior down.
11796 (target_detach): Pass inferior down. Assert that it is equal to
11797 the current inferior.
11798 * aix-thread.c (aix_thread_detach): Pass inferior down.
11799 * corefile.c (core_file_command): Pass current_inferior() down.
11800 * corelow.c (core_detach): Add inferior parameter.
11801 * darwin-nat.c (darwin_detach): Likewise.
11802 * gnu-nat.c (gnu_detach): Likewise.
11803 * inf-ptrace.c (inf_ptrace_detach): Likewise.
11804 * infcmd.c (detach_command): Pass current_inferior() down to
11806 * infrun.c (follow_fork_inferior): Pass parent_inf to
11808 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11810 * linux-nat.c (linux_nat_detach): Add inferior parameter.
11811 * linux-thread-db.c (thread_db_detach): Likewise.
11812 * nto-procfs.c (procfs_detach): Likewise.
11813 * procfs.c (procfs_detach): Likewise.
11814 * record.c (record_detach): Likewise.
11815 * record.h (struct inferior): Forward-declare.
11816 (record_detach): Add inferior parameter.
11817 * remote-sim.c (gdbsim_detach): Likewise.
11818 * remote.c (remote_detach_1): Likewise.
11819 (remote_detach): Likewise.
11820 (extended_remote_detach): Likewise.
11821 * sol-thread.c (sol_thread_detach): Likewise.
11822 * target-debug.h (target_debug_print_inferior_p): New macro.
11823 * target-delegates.c: Re-generate.
11824 * top.c (kill_or_detach): Pass inferior down to target_detach.
11825 * windows-nat.c (windows_detach): Add inferior parameter.
11827 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11829 * target.h (struct target_ops) <to_detach>: Remove args
11831 (target_detach): Likewise.
11832 * target.c (dispose_inferior): Adjust.
11833 (target_detach): Remove args parameter, adjust.
11834 * aix-thread.c (aix_thread_detach): Adjust.
11835 * corefile.c (core_file_command): Adjust.
11836 * corelow.c (core_detach): Adjust.
11837 * darwin-nat.c (darwin_detach): Adjust.
11838 * gnu-nat.c (gnu_detach): Adjust.
11839 * inf-ptrace.c (inf_ptrace_detach): Adjust.
11840 * infcmd.c (detach_command): Adjust
11841 * infrun.c (follow_fork_inferior): Adjust.
11842 (handle_vfork_child_exec_or_exit): Adjust.
11843 * linux-fork.c (linux_fork_detach): Remove args parameter.
11844 * linux-fork.h (linux_fork_detach): Likewise.
11845 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11846 * linux-thread-db.c (thread_db_detach): Likewise.
11847 * nto-procfs.c (procfs_detach): Likewise.
11848 * procfs.c (procfs_detach): Likewise.
11849 (do_detach): Remove signo parameter.
11850 * record.c (record_detach): Remove args parameter.
11851 * record.h (record_detach): Likewise.
11852 * remote-sim.c (gdbsim_detach): Likewise.
11853 * remote.c (remote_detach_1): Likewise.
11854 (remote_detach): Likewise.
11855 (extended_remote_detach): Likewise.
11856 * sol-thread.c (sol_thread_detach): Likewise.
11857 * target-delegates.c: Re-generate.
11858 * top.c (struct qt_args) <args>: Remove field.
11859 (kill_or_detach): Don't pass args.
11860 (quit_force): Don't set args.
11861 * windows-nat.c (windows_detach): Remove args parameter.
11863 2018-01-19 Yao Qi <yao.qi@linaro.org>
11865 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11866 (arm_linux_init_abi): Install it.
11868 2018-01-19 Yao Qi <yao.qi@linaro.org>
11870 * osabi.c (gdb_osabi_names): Extend the regexp for
11871 arm-linux-gnueabihf.
11873 2018-01-18 Yao Qi <yao.qi@linaro.org>
11875 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11877 (abbrev_table::add_abbrev): Update.
11878 (abbrev_table::lookup_abbrev): Update.
11880 2018-01-18 Yao Qi <yao.qi@linaro.org>
11882 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11884 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
11886 * compile/compile.c (compile_to_object): Convert "triplet_rx"
11889 2018-01-17 Tom Tromey <tom@tromey.com>
11891 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
11893 2018-01-17 Tom Tromey <tom@tromey.com>
11895 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11896 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11897 (create_array_type_with_stride): Update.
11898 * dwarf2read.c (set_die_type): Update.
11900 2018-01-17 Tom Tromey <tom@tromey.com>
11902 * dwarf2read.c (delayed_method_info): Remove typedef.
11903 (dwarf2_cu::method_info): Now a std::vector.
11904 (add_to_method_list): Update.
11905 (free_delayed_list): Remove.
11906 (compute_delayed_physnames): Update.
11907 (process_full_comp_unit, process_full_type_unit): Clear the method
11908 list. Remove cleanups.
11909 (psymtab_include_file_name): Add name_holder parameter. Use
11910 unique_xmalloc_ptr.
11911 (dwarf_decode_lines): Update.
11913 2018-01-17 Tom Tromey <tom@tromey.com>
11914 Simon Marchi <simon.marchi@ericsson.com>
11916 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11917 (dwarf2_per_objfile::free_cached_comp_units)
11918 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11919 (init_cutu_and_read_dies_no_follow): Update.
11920 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11921 (dwarf2_cu::~dwarf2_cu): New.
11922 (free_heap_comp_unit, free_stack_comp_unit): Remove.
11923 (age_cached_comp_units, free_one_cached_comp_unit): Update.
11925 2018-01-17 Tom Tromey <tom@tromey.com>
11926 Simon Marchi <simon.marchi@ericsson.com>
11928 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11929 (struct die_reader_specs) <abbrev_table>: New member.
11930 (struct abbrev_table): Add constructor.
11931 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11932 <abbrev_obstack>: Now an auto_obstack.
11933 (abbrev_table_up): New typedef.
11934 (init_cu_die_reader): Add abbrev_table parameter.
11935 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11936 Add result_dwo_abbrev_table.
11937 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11938 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11940 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11942 (skip_children): Update.
11943 (abbrev_table::alloc_abbrev): Rename from
11944 abbrev_table_alloc_abbrev.
11945 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11946 (abbrev_table::lookup_abbrev): Rename from
11947 abbrev_table_lookup_abbrev.
11948 (abbrev_table_read_table): Return abbrev_table_up.
11949 (abbrev_table_free, abbrev_table_free_cleanup)
11950 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11951 (load_partial_dies): Update.
11953 2018-01-17 Tom Tromey <tom@tromey.com>
11955 * dwarf2read.c (dwarf2_compute_name): Update comment.
11956 (read_func_scope, read_variable): Update.
11957 (new_symbol): Remove.
11958 (new_symbol_full): Rename to new_symbol.
11960 2018-01-17 Mike Gulick <mgulick@mathworks.com>
11963 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11964 a warning instead of throwing an error, set section size to 0 and return
11966 * gdb_bfd.h (gdb_bfd_map_section): Update description.
11968 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11970 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11972 (linux_ptrace_attach_fail_reason_string): Likewise.
11973 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11975 (linux_ptrace_attach_fail_reason_string): Likewise.
11976 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11978 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11980 * linux-nat.c (linux_nat_attach): Remove xstrdup.
11982 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
11985 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11986 checking for fs_base/gs_base fields in struct user_regs_struct.
11987 * configure: Regenerate.
11989 2018-01-17 Yao Qi <yao.qi@linaro.org>
11991 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11993 (aarch64_linux_init_abi): Install it to gdbarch hook
11994 gcc_target_options.
11996 2018-01-15 Pedro Alves <palves@redhat.com>
11998 * common/signals-state-save-restore.c
11999 (save_original_signals_state): Fix typos.
12001 2017-01-12 Tom Tromey <tom@tromey.com>
12002 Sergio Durigan Junior <sergiodj@redhat.com>
12004 * Makefile.in (install-only): Install gdb-add-index.
12006 2018-01-12 John Baldwin <jhb@FreeBSD.org>
12008 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12010 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12012 * infrun.c (keep_going_pass_signal): Clear step-over info when
12013 insert_breakpoints fails.
12015 2018-01-11 Pedro Alves <palves@redhat.com>
12018 * infrun.c (resume): Rename to ...
12019 (resume_1): ... this.
12020 (resume): Reimplement as wrapper around resume_1.
12022 2018-01-11 Pedro Alves <palves@redhat.com>
12025 * remote.c (remote_parse_stop_reply): Default to the last-set
12026 general thread instead of to 'magic_null_ptid'.
12028 2018-01-10 Pedro Alves <palves@redhat.com>
12030 * language.h (language_get_symbol_name_matcher): Rename ...
12031 (get_symbol_name_matcher): ... this.
12032 * language.c (language_get_symbol_name_matcher): Ditto.
12033 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12036 2018-01-10 Pedro Alves <palves@redhat.com>
12040 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12041 Adjust to use language_get_symbol_name_matcher instead of
12042 language_defn::la_get_symbol_name_matcher.
12043 * language.c (language_get_symbol_name_matcher): If in Ada mode
12044 and the lookup name is a verbatim match, return Ada's matcher.
12045 * language.h (language_get_symbol_name_matcher): Adjust comment.
12046 (ada_lookup_name_info::verbatim_p):: New method.
12048 2018-01-10 Pedro Alves <palves@redhat.com>
12051 * ada-lang.c (ada_collect_symbol_completion_matches): If the
12052 minsym's language is language_auto or language_cplus, pass down
12053 language_ada instead.
12054 * symtab.c (compare_symbol_name): Don't frob symbol language here.
12056 2018-01-10 Pedro Alves <palves@redhat.com>
12059 * minsyms.c (linkage_name_str): New function.
12060 (iterate_over_minimal_symbols): Use it.
12062 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12064 * NEWS: Document that 'info proc' now works on FreeBSD.
12066 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12068 * configure.ac: Check for kinfo_getfile in libutil.
12069 * configure: Regenerate.
12070 * config.in: Regenerate.
12071 * fbsd-nat.c: Include "fbsd-tdep.h".
12072 (fbsd_fetch_cmdline): New.
12073 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12074 rather than calling error.
12075 (fbsd_info_proc): New.
12076 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12077 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12078 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12080 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12082 * fbsd-nat.c (struct free_deleter): Remove.
12083 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12085 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12087 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12088 NULL for an empty pathname.
12090 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12092 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12093 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12094 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12095 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12096 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12097 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12098 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12099 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12100 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12101 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12102 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12103 (fbsd_core_fetch_timeval, fbsd_print_sigset)
12104 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12105 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
12106 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12108 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
12110 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12111 (gnu_xfer_auxv): New function.
12112 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12113 TARGET_OBJECT_AUXV.
12115 2018-01-08 Yao Qi <yao.qi@linaro.org>
12116 Simon Marchi <simon.marchi@ericsson.com>
12118 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12120 (COMMON_OBS): Remove selftest.o.
12121 * configure.ac: Append selftest-arch.c and common/selftest.c to
12122 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
12123 * configure: Re-generated.
12124 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12126 (maintenance_info_selftests): Likewise.
12128 2018-01-08 Xavier Roirand <roirand@adacore.com>
12130 * ada-valprint.c (val_print_packed_array_elements): Use
12131 proper number of elements when printing an array indexed
12132 by an enumeration type.
12134 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12136 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12137 (dw2_get_file_names_reader): Adjust.
12138 (lookup_dwo_signatured_type): Adjust.
12139 (lookup_dwp_signatured_type): Adjust.
12140 (lookup_signatured_type): Adjust.
12141 (create_type_unit_group): Adjust.
12142 (get_type_unit_group): Adjust.
12143 (process_psymtab_comp_unit_reader): Adjust.
12144 (build_type_psymtabs_reader): Adjust.
12145 (scan_partial_symbols): Adjust.
12146 (add_partial_symbol): Adjust.
12147 (add_partial_subprogram): Adjust.
12148 (peek_die_abbrev): Adjust.
12149 (fixup_go_packaging): Adjust.
12150 (process_imported_unit_die): Adjust.
12151 (dwarf2_compute_name): Adjust.
12152 (dwarf2_physname): Adjust.
12153 (read_import_statement): Adjust.
12154 (handle_DW_AT_stmt_list): Adjust.
12155 (read_file_scope): Adjust.
12156 (read_func_scope): Adjust.
12157 (read_lexical_block_scope): Adjust.
12158 (read_call_site_scope): Adjust.
12159 (read_variable): Adjust.
12160 (dwarf2_rnglists_process): Adjust.
12161 (dwarf2_ranges_process): Adjust.
12162 (dwarf2_ranges_read): Adjust.
12163 (dwarf2_get_pc_bounds): Adjust.
12164 (dwarf2_record_block_ranges): Adjust.
12165 (dwarf2_add_field): Adjust.
12166 (dwarf2_add_member_fn): Adjust.
12167 (read_structure_type): Adjust.
12168 (process_structure_scope): Adjust.
12169 (read_enumeration_type): Adjust.
12170 (read_array_type): Adjust.
12171 (mark_common_block_symbol_computed): Adjust.
12172 (read_common_block): Adjust.
12173 (read_namespace_type): Adjust.
12174 (read_namespace): Adjust.
12175 (read_module_type): Adjust.
12176 (read_tag_pointer_type): Adjust.
12177 (read_tag_ptr_to_member_type): Adjust.
12178 (read_tag_string_type): Adjust.
12179 (read_subroutine_type): Adjust.
12180 (read_typedef): Adjust.
12181 (read_base_type): Adjust.
12182 (attr_to_dynamic_prop): Adjust.
12183 (read_subrange_type): Adjust.
12184 (read_unspecified_type): Adjust.
12185 (dwarf2_read_abbrevs): Adjust.
12186 (load_partial_dies): Adjust.
12187 (read_partial_die): Adjust.
12188 (find_partial_die): Adjust.
12189 (guess_partial_die_structure_name): Adjust.
12190 (fixup_partial_die): Adjust.
12191 (read_attribute_value): Adjust.
12192 (read_addr_index): Adjust.
12193 (read_addr_index_from_leb128): Adjust.
12194 (read_str_index): Adjust.
12195 (dwarf2_string_attr): Adjust.
12196 (get_debug_line_section): Adjust.
12197 (dwarf_decode_line_header): Adjust.
12198 (lnp_state_machine::check_line_address): Adjust.
12199 (dwarf_decode_lines_1): Adjust.
12200 (dwarf_decode_lines): Adjust.
12201 (dwarf2_start_symtab): Adjust.
12202 (var_decode_location): Adjust.
12203 (new_symbol_full): Adjust.
12204 (dwarf2_const_value_data): Adjust.
12205 (dwarf2_const_value_attr): Adjust.
12206 (dwarf2_const_value): Adjust.
12207 (die_type): Adjust.
12208 (die_containing_type): Adjust.
12209 (build_error_marker_type): Adjust.
12210 (lookup_die_type): Adjust.
12211 (guess_full_die_structure_name): Adjust.
12212 (anonymous_struct_prefix): Adjust.
12213 (determine_prefix): Adjust.
12214 (dwarf2_name): Adjust.
12215 (follow_die_ref_or_sig): Adjust.
12216 (follow_die_offset): Adjust.
12217 (follow_die_ref): Adjust.
12218 (follow_die_sig_1): Adjust.
12219 (follow_die_sig): Adjust.
12220 (get_signatured_type): Adjust.
12221 (get_DW_AT_signature_type): Adjust.
12222 (decode_locdesc): Adjust.
12223 (dwarf_decode_macros): Adjust.
12224 (cu_debug_loc_section): Adjust.
12225 (fill_in_loclist_baton): Adjust.
12226 (dwarf2_symbol_mark_computed): Adjust.
12227 (init_one_comp_unit): Don't assign
12228 dwarf2_cu::dwarf2_per_objfile.
12229 (set_die_type): Adjust.
12231 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12233 * dwarf2read.c (struct mapped_debug_names): Add constructor.
12234 <dwarf2_per_objfile>: New field.
12235 (dwarf2_per_objfile): Remove global.
12236 (get_dwarf2_per_objfile): New function.
12237 (set_dwarf2_per_objfile): New function.
12238 (dwarf2_build_psymtabs_hard): Change objfile parameter to
12239 dwarf2_per_objfile.
12240 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12241 (read_abbrev_offset): Likewise.
12242 (read_indirect_string): Likewise.
12243 (read_indirect_line_string): Likewise.
12244 (read_indirect_string_at_offset): Likewise.
12245 (read_indirect_string_from_dwz): Likewise.
12246 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12247 dwarf2_per_objfile.
12248 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12249 (create_all_comp_units): Change objfile parameter to
12250 dwarf2_per_objfile.
12251 (create_all_type_units): Likewise.
12252 (process_queue): Add dwarf2_per_objfile parameter.
12253 (read_and_check_comp_unit_head): Likewise.
12254 (lookup_dwo_unit_in_dwp): Likewise.
12255 (get_dwp_file): Likewise.
12256 (process_cu_includes): Likewise.
12257 (struct free_dwo_file_cleanup_data): New struct.
12258 (dwarf2_has_info): Use get_dwarf2_per_objfile and
12259 set_dwarf2_per_objfile.
12260 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12261 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12262 context, adjust calls.
12263 (dw2_instantiate_symtab): Likewise.
12264 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12265 (dw2_get_cu): Likewise.
12266 (create_cu_from_index_list): Change objfile parameter to
12267 dwarf2_per_objfile.
12268 (create_cus_from_index_list): Get dwarf2_per_objfile from
12269 context, adjust calls.
12270 (create_cus_from_index): Likewise.
12271 (create_signatured_type_table_from_index): Change objfile
12272 parameter to dwarf2_per_objfile.
12273 (create_signatured_type_table_from_debug_names): Change objfile
12274 parameter to dwarf2_per_objfile.
12275 (create_addrmap_from_index): Likewise.
12276 (create_addrmap_from_aranges): Likewise.
12277 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12278 (dw2_setup): Remove.
12279 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12281 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12282 get_dwarf2_per_objfile.
12283 (dw2_forget_cached_source_info): Likewise.
12284 (dw2_map_symtabs_matching_filename): Likewise.
12285 (struct dw2_symtab_iterator) <index>: Remove.
12286 <dwarf2_per_objfile>: New field.
12287 (dw2_symtab_iter_init): Replace index parameter with
12288 dwarf2_per_objfile.
12289 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12290 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12291 (dw2_print_stats): Likewise.
12292 (dw2_dump): Likewise.
12293 (dw2_expand_symtabs_for_function): Likewise.
12294 (dw2_expand_all_symtabs): Likewise.
12295 (dw2_expand_symtabs_with_fullname): Likewise.
12296 (dw2_expand_marked_cus): Replace index and objfile parameters
12297 with dwarf2_per_objfile.
12298 (dw_expand_symtabs_matching_file_matcher): Add
12299 dwarf2_per_objfile parameter and adjust calls.
12300 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12302 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12303 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12305 (create_cus_from_debug_names_list): Replace objfile parameter
12306 with dwarf2_per_objfile and adjust calls.
12307 (create_cus_from_debug_names): Likewise.
12308 (dwarf2_read_debug_names): Likewise.
12309 (mapped_debug_names::namei_to_name): Adjust call.
12310 (dw2_debug_names_iterator::next): Likewise.
12311 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12312 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12313 (dw2_debug_names_dump): Likewise.
12314 (dw2_debug_names_expand_symtabs_for_function): Likewise.
12315 (dw2_debug_names_expand_symtabs_matching): Likewise.
12316 (dwarf2_initialize_objfile): Likewise.
12317 (dwarf2_build_psymtabs): Likewise.
12318 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12320 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12321 (read_and_check_comp_unit_head): Likewise.
12322 (read_abbrev_offset): Likewise.
12323 (create_debug_type_hash_table): Likewise.
12324 (create_debug_types_hash_table): Likewise.
12325 (create_all_type_units): Replace objfile parameter with
12326 dwarf2_per_objfile.
12327 (add_type_unit): Add dwarf2_per_objfile parameter.
12328 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12329 with dwarf2_per_objfile.
12330 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12331 (lookup_dwp_signatured_type): Likewise.
12332 (lookup_signatured_type): Likewise.
12333 (read_cutu_die_from_dwo): Likewise.
12334 (init_tu_and_read_dwo_dies): Likewise.
12335 (init_cutu_and_read_dies): Likewise.
12336 (init_cutu_and_read_dies_no_follow): Likewise.
12337 (allocate_type_unit_groups_table): Add objfile parameter.
12338 (create_type_unit_group): Use dwarf2_per_objfile from cu.
12339 (get_type_unit_group): Likewise.
12340 (process_psymtab_comp_unit): Update call.
12341 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12342 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12343 (print_tu_stats): Likewise.
12344 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12345 in void* parameter.
12346 (build_type_psymtabs): Change objfile parameter to
12347 dwarf2_per_objfile.
12348 (process_skeletonless_type_unit): Use dwarf2_per_objfile
12349 passed in void* parameter.
12350 (process_skeletonless_type_units): Change objfile parameter to
12351 dwarf2_per_objfile.
12352 (set_partial_user): Likewise.
12353 (dwarf2_build_psymtabs_hard): Likewise.
12354 (read_comp_units_from_section): Likewise.
12355 (create_all_comp_units): Likewise.
12356 (scan_partial_symbols): Update calls.
12357 (add_partial_symbol): Likewise.
12358 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12359 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12360 (process_queue): Add dwarf2_per_objfile parameter.
12361 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12362 (compute_compunit_symtab_includes): Likewise.
12363 (process_cu_includes): Add dwarf2_per_objfile parameter.
12364 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12365 (process_full_type_unit): Likewise.
12366 (process_imported_unit_die): Update call.
12367 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12368 (read_file_scope): Likewise.
12369 (allocate_dwo_file_hash_table): Add objfile parameter.
12370 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12371 (create_cus_hash_table): Likewise.
12372 (create_dwp_hash_table): Likewise.
12373 (create_dwo_unit_in_dwp_v1): Likewise.
12374 (create_dwp_v2_section): Likewise.
12375 (create_dwo_unit_in_dwp_v2): Likewise.
12376 (lookup_dwo_unit_in_dwp): Likewise.
12377 (try_open_dwop_file): Likewise.
12378 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12379 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12380 cleanup to include a reference to dwarf2_per_objfile.
12381 (open_dwp_file): Add dwarf2_per_objfile parameter.
12382 (open_and_init_dwp_file): Likewise.
12383 (get_dwp_file): Likewise.
12384 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12385 (queue_and_load_all_dwo_tus): Update call.
12386 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12388 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12389 (dwarf2_ranges_process): Likewise.
12390 (dwarf2_get_pc_bounds): Likewise.
12391 (mark_common_block_symbol_computed): Likewise.
12392 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12393 (dwarf2_read_abbrevs): Update call.
12394 (read_partial_die): Use dwarf2_per_objfile from cu.
12395 (find_partial_die): Likewise.
12396 (fixup_partial_die): Likewise.
12397 (read_attribute_value): Likewise.
12398 (read_indirect_string_at_offset_from): Add objfile parameter.
12399 (read_indirect_string_at_offset): Add dwarf2_per_objfile
12401 (read_indirect_string_from_dwz): Add objfile parameter.
12402 (read_indirect_string): Add objfile parameter.
12403 (read_addr_index_1): Add dwarf2_per_objfile parameter.
12404 (read_addr_index): Use dwarf2_per_objfile from cu.
12405 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12407 (read_str_index): Use dwarf2_per_objfile from cu.
12408 (get_debug_line_section): Likewise.
12409 (read_formatted_entries): Add dwarf2_per_objfile parameter.
12410 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12411 (new_symbol_full): Use dwarf2_per_objfile from cu.
12412 (build_error_marker_type): Likewise.
12413 (lookup_die_type): Likewise.
12414 (determine_prefix): Likewise.
12415 (follow_die_offset): Likewise.
12416 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12417 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12418 (dwarf2_fetch_die_type_sect_off): Likewise.
12419 (dwarf2_get_die_type): Likewise.
12420 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12421 (get_signatured_type): Likewise.
12422 (get_DW_AT_signature_type): Likewise.
12423 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12424 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12425 (cu_debug_loc_section): Likewise.
12426 (fill_in_loclist_baton): Likewise.
12427 (dwarf2_symbol_mark_computed): Likewise.
12428 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12429 dwarf2_per_objfile.
12430 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12432 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12433 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12434 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12435 (set_die_type): Use dwarf2_free_objfile from cu.
12436 (get_die_type_at_offset): Likewise.
12437 (dwarf2_per_objfile_free): Don't assign global variable.
12438 (debug_names) <constructor>: Add dwarf2_per_objfile
12439 parameter, update m_debugstrlookup construction.
12440 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12442 <m_dwarf2_per_objfile>: New field.
12443 <lookup>: Use m_dwarf2_per_objfile.
12444 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12445 (psyms_seen_size): Likewise.
12446 (write_gdbindex): Replace objfile parameter with
12447 dwarf2_per_objfile.
12448 (write_debug_names): Likewise.
12449 (write_psymtabs_to_index): Likewise.
12450 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12453 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12455 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12456 <dwarf2_per_objfile>: New field.
12457 (struct dwarf2_per_cu_data) <objfile>: Remove.
12458 <dwarf2_per_objfile>: New field.
12459 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12461 (create_signatured_type_table_from_index): Likewise.
12462 (create_debug_type_hash_table): Likewise.
12463 (fill_in_sig_entry_from_dwo_entry): Likewise.
12464 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12465 (create_type_unit_group): Assign dwarf2_per_objfile instead of
12467 (create_partial_symtab): Access objfile through
12468 dwarf2_per_objfile.
12469 (process_psymtab_comp_unit_reader): Likewise.
12470 (read_comp_units_from_section): Likewise.
12471 (scan_partial_symbols): Likewise.
12472 (add_partial_symbol): Likewise.
12473 (add_partial_subprogram): Likewise.
12474 (peek_die_abbrev): Likewise.
12475 (fixup_go_packaging): Likewise.
12476 (process_full_comp_unit): Likewise.
12477 (process_full_type_unit): Likewise.
12478 (process_imported_unit_die): Likewise.
12479 (dwarf2_compute_name): Likewise.
12480 (dwarf2_physname): Likewise.
12481 (read_import_statement): Likewise.
12482 (create_cus_hash_table): Assign dwarf2_physname instead of
12484 (read_func_scope): Access objfile through dwarf2_per_objfile.
12485 (read_lexical_block_scope): Likewise.
12486 (read_call_site_scope): Likewise.
12487 (read_variable): Likewise.
12488 (dwarf2_rnglists_process): Likewise.
12489 (dwarf2_ranges_process): Likewise.
12490 (dwarf2_ranges_read): Likewise.
12491 (dwarf2_record_block_ranges): Likewise.
12492 (dwarf2_add_field): Likewise.
12493 (dwarf2_add_member_fn): Likewise.
12494 (read_structure_type): Likewise.
12495 (process_structure_scope): Likewise.
12496 (read_enumeration_type): Likewise.
12497 (read_array_type): Likewise.
12498 (read_common_block): Likewise.
12499 (read_namespace_type): Likewise.
12500 (read_namespace): Likewise.
12501 (read_module_type): Likewise.
12502 (read_tag_pointer_type): Likewise.
12503 (read_tag_ptr_to_member_type): Likewise.
12504 (read_tag_string_type): Likewise.
12505 (read_subroutine_type): Likewise.
12506 (read_typedef): Likewise.
12507 (read_base_type): Likewise.
12508 (attr_to_dynamic_prop): Likewise.
12509 (read_subrange_type): Likewise.
12510 (read_unspecified_type): Likewise.
12511 (load_partial_dies): Likewise.
12512 (read_partial_die): Likewise.
12513 (find_partial_die): Likewise.
12514 (guess_partial_die_structure_name): Likewise.
12515 (fixup_partial_die): Likewise.
12516 (read_attribute_value): Likewise.
12517 (read_addr_index_from_leb128): Likewise.
12518 (dwarf2_read_addr_index): Likewise.
12519 (dwarf2_string_attr): Likewise.
12520 (lnp_state_machine::check_line_address): Likewise.
12521 (dwarf_decode_lines_1): Likewise.
12522 (dwarf_decode_lines): Likewise.
12523 (dwarf2_start_symtab): Likewise.
12524 (var_decode_location): Likewise.
12525 (new_symbol_full): Likewise.
12526 (dwarf2_const_value_data): Likewise.
12527 (dwarf2_const_value_attr): Likewise.
12528 (dwarf2_const_value): Likewise.
12529 (die_type): Likewise.
12530 (die_containing_type): Likewise.
12531 (lookup_die_type): Likewise.
12532 (guess_full_die_structure_name): Likewise.
12533 (anonymous_struct_prefix): Likewise.
12534 (dwarf2_name): Likewise.
12535 (follow_die_ref_or_sig): Likewise.
12536 (follow_die_offset): Likewise.
12537 (follow_die_ref): Likewise.
12538 (dwarf2_fetch_die_loc_sect_off): Likewise.
12539 (dwarf2_fetch_constant_bytes): Likewise.
12540 (dwarf2_fetch_die_type_sect_off): Likewise.
12541 (dwarf2_get_die_type): Likewise.
12542 (follow_die_sig): Likewise.
12543 (decode_locdesc): Likewise.
12544 (dwarf2_per_cu_objfile): Likewise.
12545 (dwarf2_per_cu_text_offset): Likewise.
12546 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12548 (set_die_type): Access objfile through
12549 dwarf2_per_objfile.
12551 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12553 * valprint.c (converted_character_d): Remove typedef.
12554 (DEF_VEC_O (converted_character_d)): Remove.
12555 (count_next_character): Use std::vector.
12556 (print_converted_chars_to_obstack): Likewise.
12557 (generic_printstr): Likewise.
12559 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12561 * xml-support.h (struct gdb_xml_value): Add constructor.
12562 <value>: Change type to unique_xmalloc_ptr.
12563 (gdb_xml_value_s): Remove typedef.
12564 (DEF_VEC_O (gdb_xml_value_s)): Remove.
12565 (gdb_xml_element_start_handler): Change parameter type to
12567 (xml_find_attribute): Likewise.
12568 * xml-support.c (xml_find_attribute): Change parameter type to
12569 std::vector and adjust.
12570 (gdb_xml_values_cleanup): Remove.
12571 (gdb_xml_parser::start_element): Adjust to std::vector.
12572 (xinclude_start_include): Change paraeter type to std::vector
12574 * btrace.c (check_xml_btrace_version): Likewise.
12575 (parse_xml_btrace_block): Likewise.
12576 (parse_xml_btrace_pt_config_cpu): Likewise.
12577 (parse_xml_btrace_pt): Likewise.
12578 (parse_xml_btrace_conf_bts): Likewise.
12579 (parse_xml_btrace_conf_pt): Likewise.
12580 * memory-map.c (memory_map_start_memory): Likewise.
12581 (memory_map_start_property): Likewise.
12582 * osdata.c (osdata_start_osdata): Likewise.
12583 (osdata_start_item): Likewise.
12584 (osdata_start_column): Likewise.
12585 * remote.c (start_thread): Likewise.
12586 * solib-aix.c (library_list_start_library): Likewise.
12587 (library_list_start_list): Likewise.
12588 * solib-svr4.c (library_list_start_library): Likewise.
12589 (svr4_library_list_start_list): Likewise.
12590 * solib-target.c (library_list_start_segment): Likewise.
12591 (library_list_start_section): Likewise.
12592 (library_list_start_library): Likewise.
12593 (library_list_start_list): Likewise.
12594 * tracepoint.c (traceframe_info_start_memory): Likewise.
12595 (traceframe_info_start_tvar): Likewise.
12596 * xml-syscall.c (syscall_start_syscall): Likewise.
12597 * xml-tdesc.c (tdesc_start_target): Likewise.
12598 (tdesc_start_feature): Likewise.
12599 (tdesc_start_reg): Likewise.
12600 (tdesc_start_union): Likewise.
12601 (tdesc_start_struct): Likewise.
12602 (tdesc_start_flags): Likewise.
12603 (tdesc_start_enum): Likewise.
12604 (tdesc_start_field): Likewise.
12605 (tdesc_start_enum_value): Likewise.
12606 (tdesc_start_vector): Likewise.
12608 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12610 * extension.h (struct xmethod_worker) <clone>: Remove.
12611 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12613 (python_xmethod_worker::clone): Remove.
12614 * valops.c (find_overload_match): Use std::move instead of
12617 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12619 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12620 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12621 <free_xmethod_worker_data>: Remove.
12622 <get_matching_xmethod_workers>: Chance VEC to std::vector.
12623 <get_xmethod_arg_types>: Remove.
12624 <get_xmethod_result_type>: Remove.
12625 <invoke_xmethod>: Remove.
12626 * extension.c (new_xmethod_worker): Remove.
12627 (clone_xmethod_worker): Remove.
12628 (get_matching_xmethod_workers): Return void, pass std::vector by
12630 (get_xmethod_arg_types): Rename to...
12631 (xmethod_worker::get_arg_types): ... this, and adjust.
12632 (get_xmethod_result_type): Rename to...
12633 (xmethod_worker::get_result_type): ... this, and adjust.
12634 (invoke_xmethod): Remove.
12635 (free_xmethod_worker): Remove.
12636 (free_xmethod_worker_vec): Remove.
12637 * extension.h (enum ext_lang_rc): Move here from
12639 (struct xmethod_worker): Add constructor and destructor.
12642 <invoke, clone, do_get_result_type, do_get_arg_types>: New
12643 virtual pure methods.
12644 <get_arg_types, get_result_type>: New methods.
12645 (xmethod_worker_ptr): Remove typedef.
12646 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12647 (xmethod_worker_vec): Remove typedef.
12648 (xmethod_worker_up): New typedef.
12649 (invoke_xmethod): Remove.
12650 (clone_xmethod_worker): Remove.
12651 (free_xmethod_worker): Remove.
12652 (free_xmethod_worker_vec): Remove.
12653 (get_xmethod_arg_types): Remove.
12654 (get_xmethod_result_type): Remove.
12655 * valops.c (find_method_list): Use std::vector, don't use
12656 intermediate vector.
12657 (value_find_oload_method_list): Use std::vector.
12658 (find_overload_match): Use std::vector.
12659 (find_oload_champ): Use std::vector.
12660 * value.c (value_free): Use operator delete.
12661 (value_of_xmethod): Rename to...
12662 (value_from_xmethod): ... this. Don't assign
12663 xmethod_worker::value, take rvalue-reference.
12664 (result_type_of_xmethod): Adjust.
12665 (call_xmethod): Adjust.
12666 * value.h: Include extension.h.
12667 (struct xmethod_worker): Don't forward-declare.
12668 (value_of_xmethod): Rename to...
12669 (value_from_xmethod): ... this, take rvalue-reference.
12670 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12671 (struct python_xmethod_worker): ... this, add constructor and
12673 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12674 (gdbpy_free_xmethod_worker_data): Rename to...
12675 (python_xmethod_worker::~python_xmethod_worker): ... this and
12677 (gdbpy_clone_xmethod_worker_data): Rename to...
12678 (python_xmethod_worker::clone): ... this and adjust.
12679 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12681 (gdbpy_get_xmethod_arg_types): Rename to...
12682 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12683 (gdbpy_get_xmethod_result_type): Rename to...
12684 (python_xmethod_worker::do_get_result_type): ... this and
12686 (gdbpy_invoke_xmethod): Rename to...
12687 (python_xmethod_worker::invoke): ... this and adjust.
12688 (new_python_xmethod_worker): Rename to...
12689 (python_xmethod_worker::python_xmethod_worker): ... this and
12691 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12693 (gdbpy_free_xmethod_worker_data): Remove.
12694 (gdbpy_get_matching_xmethod_workers): Use std::vector.
12695 (gdbpy_get_xmethod_arg_types): Remove.
12696 (gdbpy_get_xmethod_result_type): Remove.
12697 (gdbpy_invoke_xmethod): Remove.
12698 * python/python.c (python_extension_ops): Remove obsolete
12701 2018-01-05 Pedro Alves <palves@redhat.com>
12704 * common/signals-state-save-restore.c
12705 (save_original_signals_state): New parameter 'quiet'. Warn if we
12706 find a custom handler preinstalled, instead of internal erroring.
12707 But only warn if !quiet.
12708 * common/signals-state-save-restore.h
12709 (save_original_signals_state): New parameter 'quiet'.
12710 * main.c (captured_main_1): Move save_original_signals_state call
12711 after option handling, and pass QUIET.
12713 2018-01-05 Pedro Alves <palves@redhat.com>
12715 * spu-tdep.c (spu_catch_start): Pass
12716 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12718 2018-01-05 Pedro Alves <palves@redhat.com>
12721 * ada-lang.c (literal_symbol_name_matcher): New function.
12722 (ada_get_symbol_name_matcher): Use it for
12723 symbol_name_match_type::SEARCH_NAME.
12724 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
12725 it down instead of assuming symbol_name_match_type::FULL.
12726 * block.h (block_lookup_symbol): New parameter 'match_type'.
12727 * c-valprint.c (print_unpacked_pointer): Use
12728 lookup_symbol_search_name instead of lookup_symbol.
12729 * compile/compile-object-load.c (get_out_value_type): Pass down
12730 symbol_name_match_type::SEARCH_NAME.
12731 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12732 symbol_name_match_type::FULL.
12733 * cp-support.c (cp_get_symbol_name_matcher): Handle
12734 symbol_name_match_type::SEARCH_NAME.
12735 * infrun.c (insert_exception_resume_breakpoint): Use
12736 lookup_symbol_search_name.
12737 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12738 * psymtab.c (maintenance_check_psymtabs): Use
12739 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12740 * stack.c (print_frame_args): Use lookup_symbol_search_name and
12741 SYMBOL_SEARCH_NAME.
12742 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12743 if symbol_name_match_type::SEARCH_NAME.
12744 (lookup_symbol_in_language): Pass down
12745 symbol_name_match_type::FULL.
12746 (lookup_symbol_search_name): New.
12747 (lookup_language_this): Pass down
12748 symbol_name_match_type::SEARCH_NAME.
12749 (lookup_symbol_aux, lookup_local_symbol): New parameter
12750 'match_type'. Pass it down.
12751 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12752 (lookup_symbol_search_name): New declaration.
12753 (lookup_symbol_in_block): New 'match_type' parameter.
12755 2018-01-05 Pedro Alves <palves@redhat.com>
12758 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12760 (ada_lookup_symbol): Reimplement in terms of
12761 ada_lookup_symbol_list, bits factored out from
12762 ada_lookup_encoded_symbol.
12764 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12766 * ada-exp.y (write_object_renaming): When subscripting an array
12767 using a symbol as the index, pass the block in call to
12768 ada_lookup_encoded_symbol when looking that symbol up.
12770 2018-01-05 Jerome Guitton <guitton@adacore.com>
12772 * ada-lang.c (ada_array_length): Use ada_index_type instead of
12775 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12777 * ada-lang.c (ada_to_fixed_value_create): Add handling of
12778 the case where VALUE_LVAL (val0) is not lval_memory.
12780 2018-01-05 Xavier Roirand <roirand@adacore.com>
12782 * ada-valprint.c (print_optional_low_bound): Handle
12783 character-indexed array printing like boolean-indexed array
12786 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12788 * NEWS: Create a new section for the next release branch.
12789 Rename the section of the current branch, now that it has
12792 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12794 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12795 * version.in: Bump version to 8.1.50.DATE-git.
12797 2018-01-03 Xavier Roirand <roirand@adacore.com>
12799 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12801 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12803 (default_exception_support_info) <catch_handlers_sym>: Add field.
12804 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12805 (ada_exception_name_addr_1): Add "catch handlers" handling.
12806 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12807 Update all callers.
12808 (create_excep_cond_exprs) <ex>: Add parameter.
12809 (re_set_exception): Update create_excep_cond_exprs call.
12810 (print_it_exception, print_one_exception, print_mention_exception)
12811 (print_recreate_exception): Add "catch handler" handling.
12812 (allocate_location_catch_handlers, re_set_catch_handlers)
12813 (check_status_catch_handlers, print_it_catch_handlers)
12814 (print_one_catch_handlers, print_mention_catch_handlers)
12815 (print_recreate_catch_handlers): New function.
12816 (catch_handlers_breakpoint_ops): New variable.
12817 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12818 Add parameter. Add "catch handler" handling.
12819 (ada_exception_sym_name, ada_exception_breakpoint_ops):
12820 Add "catch handler" handling.
12821 (ada_exception_catchpoint_cond_string): Add "catch handler"
12823 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12825 (catch_ada_handlers_command): New function.
12826 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12827 operations structure.
12828 (_initialize_ada_language): Add "catch handlers" command entry.
12829 * NEWS: Document "catch handlers" feature.
12831 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12833 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12834 account when creating the array type of the slice.
12835 (ada_value_slice): Likewise.
12837 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12839 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12841 (create_array_type_with_stride): Add byte_stride_prop parameter.
12842 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12843 New parameter. Update all callers in this file.
12844 (array_type_has_dynamic_stride): New function.
12845 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12846 of arrays with dynamic byte strides.
12847 * dwarf2read.c (read_array_type): Add support for dynamic
12848 DW_AT_byte_stride attributes.
12850 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12852 * dwarf2read.c (read_unspecified_type): Treat
12853 DW_TAG_enumeration_type DIEs from Ada units as stubs.
12855 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12857 Update copyright year range in all GDB files.
12859 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12861 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12862 and gdb/testsuite/gdb.base/step-line.c.
12864 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12866 * copyright.py (main): Dump the contents of
12867 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12868 even if BY_HAND is empty.
12870 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12872 * top.c (print_gdb_version): Update Copyright year in version
12875 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12877 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12879 For older changes see ChangeLog-2017.
12885 version-control: never