1 2018-09-08 Jerome Guitton <guitton@adacore.com>
3 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
5 2018-09-08 Joel Brobecker <brobecker@adacore.com>
7 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
10 2018-09-08 Joel Brobecker <brobecker@adacore.com>
12 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
13 Move update of loop variable "fi".
15 2018-09-08 Joel Brobecker <brobecker@adacore.com>
17 * ada-lang.c (value_assign_to_component): In the case of
18 big-endian targets, extract the bits of the given VAL
19 using an src_offset of zero if container is not a scalar.
21 2018-09-06 Simon Ser <contact@emersion.fr>
24 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
25 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
26 * fbsd-tdep.c (fbsd_make_note_desc): New.
27 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
28 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
29 * target.h (enum target_object) Add FreeBSD-specific
30 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
32 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
34 * compile/compile-c.h (generate_c_for_variable_locations):
35 Change reference to pointer.
36 * compile/compile-c-support.c (compile_program) <compute>:
38 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
39 (generate_c_for_for_one_variable): Likewise
40 (generate_c_for_variable_locations): Likewise
41 * compile/compile-c-types.c (compile_c_instance::convert_type):
43 * compile/compile-cplus-symbols.c (convert_one_symbol):
44 std::move the scope passed to enter_scope.
45 * compile/compile-cplus-types.c
46 (compile_cplus_instance::enter_scope): Make parameter
48 (compile_cplus_instance::new_scope): Change reference to
50 (compile_cplus_instance::convert_type): Likewise
51 (compile_cplus_convert_typedef): std::move the scope passed to
53 (compile_cplus_convert_struct_or_union): Likewise.
54 (compile_cplus_convert_enum): Likewise.
55 (compile_cplus_convert_namespace): Likewise.
56 * compile/compile-cplus.h (compile_cplus_instance)
57 <enter_scope>: Make parameter rvalue-reference.
58 * compile/compile-internal.h (compile_instance)
59 <get_cached_type>: Likewise
60 * compile/compile-loc2c.c (push): Likewise
64 (print_label): Likewise
65 (pushf_register_address): Likewise
66 (pushf_register): Likewise
67 (do_compile_dwarf_expr_to_c): Likewise
68 (compile_dwarf_expr_to_c): Likewise
69 (compile_dwarf_bounds_to_c): Likewise
70 * compile/compile.c (compile_instance::get_cached_type):
72 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
73 (compile_dwarf_bounds_to_c): Likewise
74 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
75 (dwarf2_compile_property_to_c): Likewise
76 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
77 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
80 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
82 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
83 * tui/tui-data.c (init_content_element): Don't initialize it.
85 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
87 * tui/tui-data.h (struct tui_win_info)
88 <detail::opaque>: Remove.
89 * tui/tui-data.c (init_win_info): Remove assignment.
91 2018-09-05 Tom Tromey <tom@tromey.com>
93 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
95 * target-float.c (host_float_ops<T>::to_string)
96 (host_float_ops<T>::from_string): Use
97 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
100 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
102 * printcmd.c (printf_c_string): Use
103 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
104 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
106 2018-09-05 Tom Tromey <tom@tromey.com>
108 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
110 2018-09-05 Tom de Vries <tdevries@suse.de>
112 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
113 with resolve_abstract_p == true.
114 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
115 defaulting to false. Propagate resolve_abstract_p to
116 dwarf2_fetch_die_loc_sect_off.
117 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
118 parameter, defaulting to false.
119 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
120 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
122 * dwarf2read.h (struct die_info): Forward-declare.
123 (die_info_ptr): New typedef.
124 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
126 2018-09-05 Joel Brobecker <brobecker@adacore.com>
130 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
131 Pedro Alves <palves@redhat.com>
133 * gnulib/Makefile.in (aclocal_m4_deps): Move to
134 "aclocal-m4-deps.mk". Include file here.
135 $(srcdir)/aclocal.m4: Add "configure.ac".
136 * gnulib/aclocal-m4-deps.mk: New file.
137 * gnulib/update-gnulib.sh: Automatically update
138 "aclocal-m4-deps.mk".
140 2018-09-04 Tom Tromey <tom@tromey.com>
142 * configure: Rebuild.
143 * configure.ac: Remove multi-ice code.
145 2018-09-04 Tom Tromey <tom@tromey.com>
147 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
150 2018-09-04 Tom Tromey <tom@tromey.com>
152 * Makefile.in (printcmd.o, target-float.o): Remove.
153 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
155 2018-09-04 Tom Tromey <tom@tromey.com>
157 * gnulib/Makefile.in: Remove obsolete comment.
158 * Makefile.in: Remove obsolete comment.
160 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
162 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
165 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
167 * riscv-tdep.c: Add 'prologue-value.h' include.
168 (struct riscv_unwind_cache): New struct.
169 (riscv_debug_unwinder): New global.
170 (riscv_scan_prologue): Update arguments, capture register details
172 (riscv_skip_prologue): Reformat arguments line, move end of
173 prologue calculation into riscv_scan_prologue.
174 (riscv_frame_cache): Update return type, create
175 riscv_unwind_cache, scan the prologue, and fill in remaining cache
177 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
178 (riscv_frame_prev_register): Use the trad_frame within the
180 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
183 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
185 * trad-frame.h (trad_frame_set_realreg): Declare.
186 (trad_frame_set_addr): Declare.
187 * trad-frame.c (trad_frame_set_realreg): Define new function.
188 (trad_frame_set_addr): Define new function.
189 (trad_frame_set_reg_realreg): Use new function.
190 (trad_frame_set_reg_addr): Use new function.
192 2018-09-01 Keith Seitz <keiths@redhat.com>
194 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
195 pulongest instead of "%lld".
196 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
199 2018-08-31 Tom Tromey <tom@tromey.com>
201 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
204 2018-08-31 Pedro Alves <palves@redhat.com>
206 * gdbarch.h: Regenerate.
208 2018-08-31 Pedro Alves <palves@redhat.com>
210 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
211 * target.h (Hardware watchpoint interfaces): Describe
212 continuable/steppable/non-steppable watchpoints.
213 * gdbarch.h, gdbarch.c: Regenerate.
215 2018-08-31 Pedro Alves <palves@redhat.com>
217 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
220 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
221 * target.h (target_ops::have_continuable_watchpoint): Delete.
222 (target_have_continuable_watchpoint): Delete.
223 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
224 * target-delegates.c: Regenerate.
226 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
228 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
229 the files present in "gnulib/import/m4/".
231 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
233 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
234 c.sw, c.swsp, and c.sdsp.
236 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
238 * riscv-tdep.c (struct riscv_inferior_data): Delete.
239 (riscv_read_misa_reg): Don't cache value read into inferior data.
240 (riscv_new_inferior_data): Delete.
241 (riscv_inferior_data_cleanup): Delete.
242 (riscv_inferior_data): Delete.
243 (riscv_invalidate_inferior_data): Delete.
244 (_initialize_riscv_tdep): Remove initialisation of inferior data.
246 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
248 * compile/compile-cplus-types.c
249 (compile_cplus_instance::leave_scope): Take the address of scope
251 (compile_cplus_instance::convert_qualified_base): Compare quals
254 2018-08-30 Keith Seitz <keiths@redhat.com>
256 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
257 Use "%s" and host_address_to_string instead of "%p" in printf.
259 2018-08-29 Keith Seitz <keiths@redhat.com>
261 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
262 and compile-cplus-types.c.
263 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
264 * c-lang.c (cplus_language_defn): Set C++ compile functions.
265 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
267 * compile/compile-c-support.c: Include compile-cplus.h.
268 (load_libcompile): Templatize.
269 (get_compile_context): "New" function.
270 (c_get_compile_context): Use get_compile_context.
271 (cplus_get_compile_context): New function.
272 (cplus_push_user_expression, cplus_pop_user_expression)
273 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
274 (cplus_compute_program): Define new structs/functions.
275 * compile/compile-cplus-symmbols.c: New file.
276 * compile/compile-cplus-types.c: New file.
277 * compile/compile-cplus.h: New file.
278 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
280 * compile/compile-object-load.c (get_out_value_type): Use
281 strncmp_iw when comparing symbol names.
282 (compile_object_load): Add mst_bss and mst_data.
283 * compile/compile.c (_initialize_compile): Remove
284 -Wno-implicit-function-declaration from `compile_args'.
285 * compile/gcc-cp-plugin.h: New file.
286 * NEWS: Mention C++ compile support and new debug options.
288 2018-08-29 Keith Seitz <keiths@redhat.com>
290 * linespec.c (collect_info::add_symbol): Make virtual.
291 (struct symbol_searcher_collect_info): New struct.
292 (symbol_searcher::find_all_symbols): New method.
293 * symtab.h (class symbol_searcher): New class.
295 2018-08-29 Keith Seitz <keiths@redhat.com>
297 * linespec.c (struct linespec) <function_symbols, label_symbols>:
298 Change to vector of block_symbol. Update all users.
299 (struct collect_info) <symbols>: Likewise.
300 (collect_info::add_symbol): Take block_symbol as argument.
302 (decode_compound_collector) <m_symbols>: Change type to vector
303 of block_symbol. Update all users.
304 (decode_compound_collector::operator ()): Change parameter type
306 (find_method, find_function_symbols, find_linespec_symbols)
307 (find_label_symbols_in_block, find_label_symbols): Change symbol
308 vectors to block_symbol vectors.
309 * symtab.h (symbol_found_callback_ftype): Change parameter type to
312 2018-08-29 Keith Seitz <keiths@redhat.com>
314 * linespec.c (symbolp): Remove typedef and VEC definitions.
315 (bound_minimal_symbol_d): Likewise.
317 2018-08-29 Keith Seitz <keiths@redhat.com>
319 * linespec.c (decode_compound_collector::decode_compound_collector):
320 Remove initialization for `m_symtabs'.
321 (decode_compound_collector::release_symbols): Change return type
322 to std::vector. Update all callers.
323 (class decode_compound_collector) <m_symbols>: Change type to
325 (lookup_prefix_sym): Change return type to std::vector. Update all
327 (compare_symbols): Remove.
328 (std_compare_symbols): Rename to `compare_symbols'.
329 (find_method): Change `sym_classes' parameter to std::vector.
330 Update all callers. Use std::sort to sort sym_classes.
331 (find_linespec_symbols): Remove cleanup.
333 2018-08-29 Keith Seitz <keiths@redhat.com>
335 * linespec.c (struct linespec) <minimal_symbols>: Change type to
336 std::vector. Update all users.
337 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
338 (struct collect_info) <minimal_symbols>: Likewise.
339 (compare_msymbols): Return bool. Change parameters to const
340 bound_minimal_symbol references.
341 (find_method, find_function_symbols, find_linespec_symbols): Change
342 `minsyms' parameter to std::vector. Update all callers.
344 2018-08-29 Keith Seitz <keiths@redhat.com>
346 * linespec.c (struct linespec) <label_symbols>: Change type to
347 std::vector. Update all users.
348 (find_label_symbols_in_block): Change `result' parameter to
349 std::vector. Update all callers.
350 (find_label_symbols): Return std::vector. Update all callers.
352 2018-08-29 Keith Seitz <keiths@redhat.com>
354 * linespec.c (struct linespec) <function_symbols>: Change type to
355 std::vector. Update all users.
356 (struct collect_info) <function_symbols>: Likewise.
357 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
358 (std_compare_symbols): New function.
359 (find_method, find_function_symbols, find_linespec_symbols)
360 (find_label_symbols_in_block): Change `symbols' parameter to
361 std::vector. Update all callers.
362 (find_label_symbols): Likewise for `function_symbols' and
365 2018-08-29 Keith Seitz <keiths@redhat.com>
367 * linespec.c (symtab_vector_up): Define.
368 (struct linespec) <file_symtabs>: Change type to std::vector *.
370 (struct collect_info) <file_symtabs>: Likewise.
371 (collect_symtabs_from_filename): Return symtab_vector_up.
373 (decode_objc): Remove cleanup.
374 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
375 (symtab_collector::release_symtabs): Return symtab_vector_up.
377 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
379 (collect_symtabs_from_filename, symtabs_from_filename): Return
380 symtab_vector_up. Update all callers.
382 2018-08-29 Tom Tromey <tom@tromey.com>
384 * csky-tdep.c (csky_analyze_prologue): Use
385 core_addr_to_string_nz.
387 2018-08-29 Tom Tromey <tom@tromey.com>
389 * windows-nat.c (struct xlate_exception) <them>: Change type to
391 (xlate): Fix formatting. Remove last entry.
392 (struct xlate_exception, xlate): Comment out.
393 (windows_nat_target::resume): Use ranged for.
395 2018-08-29 Jim Wilson <jimw@sifive.com>
397 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
398 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
400 (riscv_linux_nat_target::store_registers): Likewise.
402 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
406 * gnulib/aclocal.m4: Regenerate.
407 * gnulib/config.in: Regenerate.
408 * gnulib/configure: Regenerate.
409 * gnulib/import/Makefile.am: Update.
410 * gnulib/import/Makefile.in: Update.
411 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
412 * gnulib/import/_Noreturn.h: ... this.
413 * gnulib/import/alloca.in.h: Update.
414 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
415 * gnulib/import/arg-nonnull.h: ... this.
416 * gnulib/import/assure.h: Update.
417 * gnulib/import/at-func.c: Update.
418 * gnulib/import/basename-lgpl.c: Update.
419 * gnulib/import/extra/snippet/c++defs.h: Rename to...
420 * gnulib/import/c++defs.h: ... this.
421 * gnulib/import/canonicalize-lgpl.c: Update.
422 * gnulib/import/cdefs.h: Update.
423 * gnulib/import/chdir-long.c: Update.
424 * gnulib/import/chdir-long.h: Update.
425 * gnulib/import/cloexec.c: Update.
426 * gnulib/import/cloexec.h: Update.
427 * gnulib/import/close.c: Update.
428 * gnulib/import/closedir.c: Update.
429 * gnulib/import/config.charset: Update.
430 * gnulib/import/dirent-private.h: Update.
431 * gnulib/import/dirent.in.h: Update.
432 * gnulib/import/dirfd.c: Update.
433 * gnulib/import/dirname-lgpl.c: Update.
434 * gnulib/import/dirname.h: Update.
435 * gnulib/import/dosname.h: Update.
436 * gnulib/import/dup-safer-flag.c: Update.
437 * gnulib/import/dup-safer.c: Update.
438 * gnulib/import/dup.c: Update.
439 * gnulib/import/dup2.c: Update.
440 * gnulib/import/errno.in.h: Update.
441 * gnulib/import/error.c: Update.
442 * gnulib/import/error.h: Update.
443 * gnulib/import/exitfail.c: Update.
444 * gnulib/import/exitfail.h: Update.
445 * gnulib/import/extra/update-copyright: Update.
446 * gnulib/import/fchdir.c: Update.
447 * gnulib/import/fcntl.c: Update.
448 * gnulib/import/fcntl.in.h: Update.
449 * gnulib/import/fd-hook.c: Update.
450 * gnulib/import/fd-hook.h: Update.
451 * gnulib/import/fd-safer-flag.c: Update.
452 * gnulib/import/fd-safer.c: Update.
453 * gnulib/import/fdopendir.c: Update.
454 * gnulib/import/filename.h: Update.
455 * gnulib/import/filenamecat-lgpl.c: Update.
456 * gnulib/import/filenamecat.h: Update.
457 * gnulib/import/flexmember.h: Update.
458 * gnulib/import/float+.h: Update.
459 * gnulib/import/float.c: Update.
460 * gnulib/import/float.in.h: Update.
461 * gnulib/import/fnmatch.c: Update.
462 * gnulib/import/fnmatch.in.h: Update.
463 * gnulib/import/fnmatch_loop.c: Update.
464 * gnulib/import/fpucw.h: Update.
465 * gnulib/import/frexp.c: Update.
466 * gnulib/import/frexpl.c: Update.
467 * gnulib/import/fstat.c: Update.
468 * gnulib/import/fstatat.c: Update.
469 * gnulib/import/getcwd-lgpl.c: Update.
470 * gnulib/import/getcwd.c: Update.
471 * gnulib/import/getdtablesize.c: Update.
472 * gnulib/import/getlogin_r.c: Update.
473 * gnulib/import/getprogname.c: Update.
474 * gnulib/import/getprogname.h: Update.
475 * gnulib/import/gettext.h: Update.
476 * gnulib/import/gettimeofday.c: Update.
477 * gnulib/import/glob-libc.h: Update.
478 * gnulib/import/glob.c: Update.
479 * gnulib/import/glob.in.h: Update.
480 * gnulib/import/glob_internal.h: Update.
481 * gnulib/import/glob_pattern_p.c: Update.
482 * gnulib/import/globfree.c: Update.
483 * gnulib/import/hard-locale.c: Update.
484 * gnulib/import/hard-locale.h: Update.
485 * gnulib/import/intprops.h: Update.
486 * gnulib/import/inttypes.in.h: Update.
487 * gnulib/import/isnan.c: Update.
488 * gnulib/import/isnand-nolibm.h: Update.
489 * gnulib/import/isnand.c: Update.
490 * gnulib/import/isnanl-nolibm.h: Update.
491 * gnulib/import/isnanl.c: Update.
492 * gnulib/import/itold.c: Update.
493 * gnulib/import/libc-config.h: Update.
494 * gnulib/import/limits.in.h: Update.
495 * gnulib/import/localcharset.c: Update.
496 * gnulib/import/localcharset.h: Update.
497 * gnulib/import/localtime-buffer.c: Update.
498 * gnulib/import/localtime-buffer.h: Update.
499 * gnulib/import/lstat.c: Update.
500 * gnulib/import/m4/00gnulib.m4: Update.
501 * gnulib/import/m4/__inline.m4: Update.
502 * gnulib/import/m4/absolute-header.m4: Update.
503 * gnulib/import/m4/alloca.m4: Update.
504 * gnulib/import/m4/builtin-expect.m4: Update.
505 * gnulib/import/m4/canonicalize.m4: Update.
506 * gnulib/import/m4/chdir-long.m4: Update.
507 * gnulib/import/m4/close.m4: Update.
508 * gnulib/import/m4/closedir.m4: Update.
509 * gnulib/import/m4/configmake.m4: Update.
510 * gnulib/import/m4/d-ino.m4: Update.
511 * gnulib/import/m4/d-type.m4: Update.
512 * gnulib/import/m4/dirent_h.m4: Update.
513 * gnulib/import/m4/dirfd.m4: Update.
514 * gnulib/import/m4/dirname.m4: Update.
515 * gnulib/import/m4/double-slash-root.m4: Update.
516 * gnulib/import/m4/dup.m4: Update.
517 * gnulib/import/m4/dup2.m4: Update.
518 * gnulib/import/m4/eealloc.m4: Update.
519 * gnulib/import/m4/environ.m4: Update.
520 * gnulib/import/m4/errno_h.m4: Update.
521 * gnulib/import/m4/error.m4: Update.
522 * gnulib/import/m4/exponentd.m4: Update.
523 * gnulib/import/m4/exponentl.m4: Update.
524 * gnulib/import/m4/extensions.m4: Update.
525 * gnulib/import/m4/extern-inline.m4: Update.
526 * gnulib/import/m4/fchdir.m4: Update.
527 * gnulib/import/m4/fcntl-o.m4: Update.
528 * gnulib/import/m4/fcntl.m4: Update.
529 * gnulib/import/m4/fcntl_h.m4: Update.
530 * gnulib/import/m4/fdopendir.m4: Update.
531 * gnulib/import/m4/filenamecat.m4: Update.
532 * gnulib/import/m4/flexmember.m4: Update.
533 * gnulib/import/m4/float_h.m4: Update.
534 * gnulib/import/m4/fnmatch.m4: Update.
535 * gnulib/import/m4/fnmatch_h.m4: Update.
536 * gnulib/import/m4/fpieee.m4: Update.
537 * gnulib/import/m4/frexp.m4: Update.
538 * gnulib/import/m4/frexpl.m4: Update.
539 * gnulib/import/m4/fstat.m4: Update.
540 * gnulib/import/m4/fstatat.m4: Update.
541 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
542 * gnulib/import/m4/getcwd-path-max.m4: Update.
543 * gnulib/import/m4/getcwd.m4: Update.
544 * gnulib/import/m4/getdtablesize.m4: Update.
545 * gnulib/import/m4/getlogin.m4: Update.
546 * gnulib/import/m4/getlogin_r.m4: Update.
547 * gnulib/import/m4/getpagesize.m4: Update.
548 * gnulib/import/m4/getprogname.m4: Update.
549 * gnulib/import/m4/gettimeofday.m4: Update.
550 * gnulib/import/m4/glibc21.m4: Update.
551 * gnulib/import/m4/glob.m4: Update.
552 * gnulib/import/m4/glob_h.m4: Update.
553 * gnulib/import/m4/gnulib-cache.m4: Update.
554 * gnulib/import/m4/gnulib-common.m4: Update.
555 * gnulib/import/m4/gnulib-comp.m4: Update.
556 * gnulib/import/m4/gnulib-tool.m4: Update.
557 * gnulib/import/m4/hard-locale.m4: Update.
558 * gnulib/import/m4/include_next.m4: Update.
559 * gnulib/import/m4/inttypes-pri.m4: Update.
560 * gnulib/import/m4/inttypes.m4: Update.
561 * gnulib/import/m4/isnand.m4: Update.
562 * gnulib/import/m4/isnanl.m4: Update.
563 * gnulib/import/m4/largefile.m4: Update.
564 * gnulib/import/m4/limits-h.m4: Update.
565 * gnulib/import/m4/localcharset.m4: Update.
566 * gnulib/import/m4/locale-fr.m4: Update.
567 * gnulib/import/m4/locale-ja.m4: Update.
568 * gnulib/import/m4/locale-zh.m4: Update.
569 * gnulib/import/m4/localtime-buffer.m4: Update.
570 * gnulib/import/m4/longlong.m4: Update.
571 * gnulib/import/m4/lstat.m4: Update.
572 * gnulib/import/m4/malloc.m4: Update.
573 * gnulib/import/m4/malloca.m4: Update.
574 * gnulib/import/m4/math_h.m4: Update.
575 * gnulib/import/m4/mbrtowc.m4: Update.
576 * gnulib/import/m4/mbsinit.m4: Update.
577 * gnulib/import/m4/mbsrtowcs.m4: Update.
578 * gnulib/import/m4/mbstate_t.m4: Update.
579 * gnulib/import/m4/memchr.m4: Update.
580 * gnulib/import/m4/memmem.m4: Update.
581 * gnulib/import/m4/mempcpy.m4: Update.
582 * gnulib/import/m4/memrchr.m4: Update.
583 * gnulib/import/m4/mkdir.m4: Update.
584 * gnulib/import/m4/mkstemp.m4: Update.
585 * gnulib/import/m4/mmap-anon.m4: Update.
586 * gnulib/import/m4/mode_t.m4: Update.
587 * gnulib/import/m4/msvc-inval.m4: Update.
588 * gnulib/import/m4/msvc-nothrow.m4: Update.
589 * gnulib/import/m4/multiarch.m4: Update.
590 * gnulib/import/m4/nocrash.m4: Update.
591 * gnulib/import/m4/off_t.m4: Update.
592 * gnulib/import/m4/onceonly.m4: Update.
593 * gnulib/import/m4/open-cloexec.m4: Update.
594 * gnulib/import/m4/open.m4: Update.
595 * gnulib/import/m4/openat.m4: Update.
596 * gnulib/import/m4/opendir.m4: Update.
597 * gnulib/import/m4/pathmax.m4: Update.
598 * gnulib/import/m4/rawmemchr.m4: Update.
599 * gnulib/import/m4/readdir.m4: Update.
600 * gnulib/import/m4/readlink.m4: Update.
601 * gnulib/import/m4/realloc.m4: Update.
602 * gnulib/import/m4/rename.m4: Update.
603 * gnulib/import/m4/rewinddir.m4: Update.
604 * gnulib/import/m4/rmdir.m4: Update.
605 * gnulib/import/m4/save-cwd.m4: Update.
606 * gnulib/import/m4/secure_getenv.m4: Update.
607 * gnulib/import/m4/setenv.m4: Update.
608 * gnulib/import/m4/signal_h.m4: Update.
609 * gnulib/import/m4/ssize_t.m4: Update.
610 * gnulib/import/m4/stat-time.m4: Update.
611 * gnulib/import/m4/stat.m4: Update.
612 * gnulib/import/m4/std-gnu11.m4: Update.
613 * gnulib/import/m4/stdbool.m4: Update.
614 * gnulib/import/m4/stddef_h.m4: Update.
615 * gnulib/import/m4/stdint.m4: Update.
616 * gnulib/import/m4/stdio_h.m4: Update.
617 * gnulib/import/m4/stdlib_h.m4: Update.
618 * gnulib/import/m4/strchrnul.m4: Update.
619 * gnulib/import/m4/strdup.m4: Update.
620 * gnulib/import/m4/strerror.m4: Update.
621 * gnulib/import/m4/string_h.m4: Update.
622 * gnulib/import/m4/strstr.m4: Update.
623 * gnulib/import/m4/strtok_r.m4: Update.
624 * gnulib/import/m4/sys_socket_h.m4: Update.
625 * gnulib/import/m4/sys_stat_h.m4: Update.
626 * gnulib/import/m4/sys_time_h.m4: Update.
627 * gnulib/import/m4/sys_types_h.m4: Update.
628 * gnulib/import/m4/tempname.m4: Update.
629 * gnulib/import/m4/time_h.m4: Update.
630 * gnulib/import/m4/unistd-safer.m4: Update.
631 * gnulib/import/m4/unistd_h.m4: Update.
632 * gnulib/import/m4/warn-on-use.m4: Update.
633 * gnulib/import/m4/wchar_h.m4: Update.
634 * gnulib/import/m4/wchar_t.m4: Update.
635 * gnulib/import/m4/wctype_h.m4: Update.
636 * gnulib/import/m4/wint_t.m4: Update.
637 * gnulib/import/malloc.c: Update.
638 * gnulib/import/malloc/scratch_buffer.h: Update.
639 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
640 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
641 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
642 * gnulib/import/malloca.c: Update.
643 * gnulib/import/malloca.h: Update.
644 * gnulib/import/malloca.valgrind: Update.
645 * gnulib/import/math.in.h: Update.
646 * gnulib/import/mbrtowc.c: Update.
647 * gnulib/import/mbsinit.c: Update.
648 * gnulib/import/mbsrtowcs-impl.h: Update.
649 * gnulib/import/mbsrtowcs-state.c: Update.
650 * gnulib/import/mbsrtowcs.c: Update.
651 * gnulib/import/memchr.c: Update.
652 * gnulib/import/memmem.c: Update.
653 * gnulib/import/mempcpy.c: Update.
654 * gnulib/import/memrchr.c: Update.
655 * gnulib/import/mkdir.c: Update.
656 * gnulib/import/mkstemp.c: Update.
657 * gnulib/import/msvc-inval.c: Update.
658 * gnulib/import/msvc-inval.h: Update.
659 * gnulib/import/msvc-nothrow.c: Update.
660 * gnulib/import/msvc-nothrow.h: Update.
661 * gnulib/import/open.c: Update.
662 * gnulib/import/openat-die.c: Update.
663 * gnulib/import/openat-priv.h: Update.
664 * gnulib/import/openat-proc.c: Update.
665 * gnulib/import/openat.c: Update.
666 * gnulib/import/openat.h: Update.
667 * gnulib/import/opendir.c: Update.
668 * gnulib/import/pathmax.h: Update.
669 * gnulib/import/pipe-safer.c: Update.
670 * gnulib/import/rawmemchr.c: Update.
671 * gnulib/import/readdir.c: Update.
672 * gnulib/import/readlink.c: Update.
673 * gnulib/import/realloc.c: Update.
674 * gnulib/import/ref-add.sin: Update.
675 * gnulib/import/ref-del.sin: Update.
676 * gnulib/import/rename.c: Update.
677 * gnulib/import/rewinddir.c: Update.
678 * gnulib/import/rmdir.c: Update.
679 * gnulib/import/same-inode.h: Update.
680 * gnulib/import/save-cwd.c: Update.
681 * gnulib/import/save-cwd.h: Update.
682 * gnulib/import/scratch_buffer.h: Update.
683 * gnulib/import/secure_getenv.c: Update.
684 * gnulib/import/setenv.c: Update.
685 * gnulib/import/signal.in.h: Update.
686 * gnulib/import/stat-time.c: Update.
687 * gnulib/import/stat-time.h: Update.
688 * gnulib/import/stat-w32.c: Update.
689 * gnulib/import/stat-w32.h: Update.
690 * gnulib/import/stat.c: Update.
691 * gnulib/import/stdbool.in.h: Update.
692 * gnulib/import/stddef.in.h: Update.
693 * gnulib/import/stdint.in.h: Update.
694 * gnulib/import/stdio.in.h: Update.
695 * gnulib/import/stdlib.in.h: Update.
696 * gnulib/import/str-two-way.h: Update.
697 * gnulib/import/strchrnul.c: Update.
698 * gnulib/import/strdup.c: Update.
699 * gnulib/import/streq.h: Update.
700 * gnulib/import/strerror-override.c: Update.
701 * gnulib/import/strerror-override.h: Update.
702 * gnulib/import/strerror.c: Update.
703 * gnulib/import/string.in.h: Update.
704 * gnulib/import/stripslash.c: Update.
705 * gnulib/import/strnlen1.c: Update.
706 * gnulib/import/strnlen1.h: Update.
707 * gnulib/import/strstr.c: Update.
708 * gnulib/import/strtok_r.c: Update.
709 * gnulib/import/sys_stat.in.h: Update.
710 * gnulib/import/sys_time.in.h: Update.
711 * gnulib/import/sys_types.in.h: Update.
712 * gnulib/import/tempname.c: Update.
713 * gnulib/import/tempname.h: Update.
714 * gnulib/import/time.in.h: Update.
715 * gnulib/import/unistd--.h: Update.
716 * gnulib/import/unistd-safer.h: Update.
717 * gnulib/import/unistd.in.h: Update.
718 * gnulib/import/unsetenv.c: Update.
719 * gnulib/import/verify.h: Update.
720 * gnulib/import/extra/snippet/warn-on-use.h: Update.
721 * gnulib/import/wchar.in.h: Update.
722 * gnulib/import/wctype.in.h: Update.
723 * gnulib/import/xalloc-oversized.h: Update.
724 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
725 "53e2c179f26a890fa6685af4b6c1397ee370433b".
727 2018-08-16 Gary Benson <gbenson@redhat.com>
730 * gdb/main.c (captured_main_1): Exit with nonzero status
731 in batch mode if the last command to be executed failed.
732 * NEWS: Mention the above.
734 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
736 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
737 end of warning message.
739 2018-08-29 Alan Hayward <alan.hayward@arm.com>
742 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
743 (aarch64_extract_return_value): Use
744 aapcs_is_vfp_call_or_return_candidate.
745 (aarch64_return_in_memory): Likewise.
746 (aarch64_store_return_value): Likewise.
748 2018-08-29 Alan Hayward <alan.hayward@arm.com>
751 (aapcs_is_vfp_call_or_return_candidate): Make static
752 (pass_in_v_or_stack): Remove function.
753 (pass_in_v_vfp_candidate): New function.
754 (aarch64_push_dummy_call): Check for float register candidates.
756 2018-08-29 Alan Hayward <alan.hayward@arm.com>
758 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
759 (aapcs_is_vfp_call_or_return_candidate_1): New function.
760 (aapcs_is_vfp_call_or_return_candidate): Likewise.
762 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
765 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
766 (struct ipa_sym_addresses): Rename to...
767 (struct ipa_sym_addresses_common): ... this.
768 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
770 2018-08-28 Tom Tromey <tom@tromey.com>
772 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
773 (token_fifo): Now a std::vector.
774 (yylex, c_parse): Update.
775 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
776 (token_fifo): Now a std::vector.
777 (yylex, d_parse): Update.
778 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
779 (token_fifo): Now a std::vector.
780 (yylex, go_parse): Update.
782 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
784 * parser-defs.h (struct type_stack) <elements>: Change type to
785 std::vector<union type_stack_elt>.
786 <depth, size>: Remove.
787 * parse.c (parse_exp_in_context_1): Adjust.
788 (type_stack_reserve): Remove.
789 (check_type_stack_depth): Remove.
790 (insert_into_type_stack): Adjust to std::vector.
791 (insert_type): Likewise.
792 (push_type): Likewise.
793 (push_type_int): Likewise.
794 (insert_type_address_space): Likewise.
795 (pop_type): Likewise.
796 (pop_type_int): Likewise.
797 (pop_typelist): Likewise.
798 (pop_type_stack): Likewise.
799 (append_type_stack): Likewise.
800 (push_type_stack): Likewise.
801 (get_type_stack): Likewise.
802 (type_stack_cleanup): Likewise.
803 (push_typelist): Likewise.
804 (follow_types): Likewise.
805 (_initialize_parse): Likewise.
807 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
809 * NEWS: Mention csky target.
811 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
812 Hafiz Abid Qadeer <abidh@codesourcery.com>
813 Don Breazeal <donb@codesourcery.com>
815 * csky-linux-tdep.c: New file.
816 * csky-tdep.c: Likewise.
817 * csky-tdep.h: Likewise.
818 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
820 (HFILES_NO_SRCDIR): Add csky-tdep.h.
821 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
822 * configure.tgt: Add csky support.
824 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
826 * python/py-framefilter.c (py_print_frame): Print frame architecture
827 when printing on an MI output.
829 2018-08-27 Tom Tromey <tom@tromey.com>
832 * configure: Rebuild.
833 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
835 2018-08-27 Tom Tromey <tom@tromey.com>
837 * aarch64-linux-tdep.c
838 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
841 2018-08-27 Tom Tromey <tom@tromey.com>
843 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
845 (ppc64_standard_linkage1, ppc64_standard_linkage2)
846 (ppc64_standard_linkage3, ppc64_standard_linkage4)
847 (ppc64_standard_linkage5, ppc64_standard_linkage6)
848 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
851 2018-08-27 Tom Tromey <tom@tromey.com>
853 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
854 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
856 2018-08-27 Tom Tromey <tom@tromey.com>
858 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
859 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
861 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
863 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
865 * sparc-linux-tdep.c (sparc32_linux_sigframe)
866 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
867 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
869 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
870 (ppc64_linux_sigaction_tramp_frame)
871 (ppc32_linux_sighandler_tramp_frame)
872 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
873 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
874 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
875 * mn10300-linux-tdep.c (am33_linux_sigframe)
876 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
877 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
878 * mips-linux-tdep.c (mips_linux_o32_sigframe)
879 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
880 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
881 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
882 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
883 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
884 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
885 * microblaze-linux-tdep.c
886 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
887 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
888 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
889 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
890 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
891 * common/common-types.h (ULONGEST_MAX): New define.
892 (CORE_ADDR_MAX): Fix formatting.
893 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
894 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
895 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
896 (arm_linux_rt_sigreturn_tramp_frame)
897 (arm_eabi_linux_sigreturn_tramp_frame)
898 (arm_eabi_linux_rt_sigreturn_tramp_frame)
899 (thumb2_eabi_linux_sigreturn_tramp_frame)
900 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
901 (arm_linux_restart_syscall_tramp_frame)
902 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
903 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
904 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
906 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
908 2018-08-27 Tom Tromey <tom@tromey.com>
910 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
912 * mips-tdep.c (mips_deal_with_atomic_sequence)
913 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
914 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
915 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
916 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
918 * aarch64-tdep.c (aarch64_software_single_step): Use
921 2018-08-27 Tom Tromey <tom@tromey.com>
923 * linespec.c (complete_linespec_component): Add cast to "char".
924 * completer.c (completion_tracker::build_completion_result): Add
927 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
929 * solist.h (struct solist, struct target_so_ops): Fix
932 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
934 * ada-tasks.c (ada_task_info_s): Remove typedef.
935 (DEF_VEC_O(ada_task_info_s)): Remove.
936 (struct ada_tasks_inferior_data): Initialize fields.
937 <task_list>: Make an std::vector.
938 (get_ada_tasks_inferior_data): Allocate with new.
939 (ada_get_task_number): Adjust.
940 (get_task_number_from_id): Likewise.
941 (valid_task_id): Likewise.
942 (ada_get_task_info_from_ptid): Likewise.
943 (iterate_over_live_ada_tasks): Likewise.
944 (add_ada_task): Likewise.
945 (read_known_tasks): Likewise.
946 (ada_build_task_list): Likewise.
947 (print_ada_task_info): Likewise.
948 (info_task): Likewise.
949 (task_command_1): Likewise.
951 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
953 * ada-lang.c (add_angle_brackets): Return std::string.
955 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
957 * python/py-threadevent.c (py_get_event_thread): Initialize
960 2018-08-24 Pedro Alves <palves@redhat.com>
962 * python/py-bpevent.c (create_breakpoint_event_object): Use
964 * python/py-continueevent.c (emit_continue_event): Use
966 * python/py-exitedevent.c (create_exited_event_object): Return a
968 (emit_exited_event): Use copy-initialization.
969 * python/py-inferior.c (python_new_inferior)
970 (python_inferior_deleted, add_thread_object): Use
972 * python/py-infevents.c (create_inferior_call_event_object)
973 (create_register_changed_event_object)
974 (create_memory_changed_event_object): Return a gdbpy_ref<>.
975 (emit_inferior_call_event, emit_memory_changed_event)
976 (emit_register_changed_event): Use copy-initialization.
977 * python/py-newobjfileevent.c (create_new_objfile_event_object):
978 Return a gdbpy_ref<>.
979 (emit_new_objfile_event): Use copy-initialization.
980 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
981 (emit_clear_objfiles_event): Use copy-initialization.
982 * python/py-signalevent.c (create_signal_event_object): Use
984 * python/py-threadevent.c (create_thread_event_object): Use
987 2018-08-24 Pedro Alves <palves@redhat.com>
988 Simon Marchi <simon.marchi@ericsson.com>
991 * python/py-continueevent.c: Include "gdbthread.h".
992 (create_continue_event_object): Add intro comment. Add 'ptid'
993 parameter. Use it to find thread to pass to
994 create_thread_event_object.
995 (emit_continue_event): Pass PTID down to
996 create_continue_event_object.
997 * python/py-event.h (py_get_event_thread): Declare.
998 (create_thread_event_object): Remove default from 'thread'
1000 * python/py-stopevent.c (create_stop_event_object): Use
1001 py_get_event_thread.
1002 * python/py-threadevent.c (get_event_thread): Rename to ...
1003 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1004 and use it to find the thread.
1005 (create_thread_event_object): Assert that THREAD isn't null.
1006 Don't find the event thread here.
1008 2018-08-23 Kevin Buettner <kevinb@redhat.com>
1010 * block.h (blockrange, blockranges): New struct declarations.
1011 (struct block): Add new field named `ranges'.
1012 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1013 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1014 macros for accessing ranges in struct block.
1015 (make_blockranges): New declaration.
1016 block.c (make_blockranges): New function.
1017 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1019 * symtab.h (find_pc_partial_function): Add new parameter `block'.
1020 * blockframe.c (cache_pc_function_block): New static global.
1021 (clear_pc_function_cache): Clear cache_pc_function_block.
1022 (find_pc_partial_function): Move comment to symtab.h. Add
1023 support for non-contiguous blocks.
1024 * cli/cli-cmds.c (block.h): Include.
1025 (print_disassembly): Handle printing of non-contiguous blocks.
1026 (disassemble_current_function): Likewise.
1027 (disassemble_command): Likewise.
1029 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1031 * blockframe.c (get_pc_function_start): Likewise.
1032 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1033 (gcc_symbol_address): Likewise.
1034 * compile/compile-object-run.c (compile_object_run): Likewise.
1035 * compile/compile.c (get_expr_block_and_pc): Likewise.
1036 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1037 (func_addr_to_tail_call_list): Likewise.
1038 * findvar.c (default_read_var_value): Likewise.
1039 * inline-frame.c (inline_frame_this_id): Likewise.
1040 (skip-inline_frames): Likewise.
1041 * infcmd.c (until_next_command): Likewise.
1042 * linespec.c (convert_linespec_to_sals): Likewise.
1043 * parse.c (parse_exp_in_context_1): Likewise.
1044 * printcmd.c (build_address_symbolic): likewise.
1045 (info_address_command): Likewise.
1046 symtab.c (find_function_start_sal): Likewise.
1047 (skip_prologue_sal): Likewise.
1048 (find_function_alias_target): Likewise.
1049 (find_gnu_ifunc): Likewise.
1050 * stack.c (find_frame_funname): Likewise.
1051 * symtab.c (fixup_symbol_section): Likewise.
1052 (find_function_start_sal): Likewise.
1053 (skip_prologue_sal): Likewsie.
1054 (find_function_alias_target): Likewise.
1055 (find_gnu_ifunc): Likewise.
1056 * tracepoint.c (info_scope_command): Likewise.
1057 * value.c (value_fn_field): Likewise.
1059 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1060 in place of find_pc_partial_function.
1061 * blockframe.c (find_function_entry_range_from_pc): New function.
1062 * symtab.h (find_function_entry_range_from_pc): Declare and document.
1063 * objfiles.c (objfile_relocate1): Relocate start and end addresses
1064 for each range in a block.
1067 2018-08-23 Xavier Roirand <roirand@adacore.com>
1069 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1072 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1074 * solib-svr4.c (read_program_headers_from_bfd): Return
1075 gdb::optional<gdb::byte_vector>.
1076 (svr4_exec_displacement): Adjust.
1078 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1080 * solib-svr4.c (read_program_header): Return
1081 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1082 (find_program_interpreter): Return
1083 gdb::optional<gdb::byte_vector>.
1084 (scan_dyntag_auxv): Adjust.
1085 (enable_break): Adjust.
1086 (svr4_exec_displacement): Adjust.
1088 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1090 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1091 * inf-child.c (inf_child_target::terminal_save_inferior): New.
1093 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1095 * guile/scm-string.c (gdbscm_scm_from_printf): Use
1097 * guile/scm-utils.c (gdbscm_printf): Likewise.
1098 * serial.c (serial_printf): Likewise.
1099 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1101 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
1103 * stack.c (print_frame): Print frame architecture when printing on
1105 * NEWS: Mention new "arch" attribute in frame output.
1107 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1109 * arch/aarch64.h (aarch64_regnum): Update comment.
1111 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1113 * NEWS: Add SVE to 8.2 section.
1115 2018-08-21 Pedro Alves <palves@redhat.com>
1117 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1118 out from gdbscm_parse_function_args.
1119 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1120 gdbscm_parse_function_args_1.
1122 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
1125 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1128 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
1130 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1132 2018-08-19 Michael Spang <spang@google.com>
1135 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1136 for PT_TLS segments.
1138 2018-08-18 Kevin Buettner <kevinb@redhat.com>
1140 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1141 dwarf_variable_value.
1142 * dwarf2-frame.c (class dwarf_expr_executor):
1143 Add override for dwarf_variable_value.
1144 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1145 (class symbol_needs_eval_context): Likewise.
1146 (indirect_synthetic_pointer): Add forward declaration.
1147 (sect_variable_value): New function.
1148 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1149 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1150 for DW_OP_GNU_variable_value.
1152 2018-08-16 Tom Tromey <tom@tromey.com>
1154 * top.c (read_command_file): Update.
1155 (command_line_input): Remove "repeat" argument.
1156 * ada-lang.c (get_selections): Update.
1157 * linespec.c (decode_line_2): Update.
1158 * defs.h (command_line_input): Remove argument.
1159 * cli/cli-script.c (read_next_line): Update.
1160 * python/py-gdb-readline.c: Update.
1162 2018-08-17 Tom Tromey <tom@tromey.com>
1164 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1167 2018-08-15 Tom Tromey <tom@tromey.com>
1169 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1171 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
1173 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1174 If used, use find_pc_partial_function to find address range
1176 * mi/mi-main.c (mi_cmd_list_features): Report
1177 "data-disassemble-a-option" feature.
1178 * NEWS: Mention new -data-disassemble option -a.
1180 2018-08-13 Tom Tromey <tom@tromey.com>
1182 * common/common-defs.h (_FORTIFY_SOURCE): Define.
1184 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1186 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1187 (aarch64_linux_collect_sve_regset): Likewise.
1188 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1189 * regcache.h (regcache_map_entry_size): New function.
1191 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1193 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1194 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1195 (SVE_HEADER_VL_LENGTH): Likewise.
1196 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1197 (SVE_HEADER_FLAGS_LENGTH): Likewise.
1198 (SVE_HEADER_RESERVED_LENGTH): Likewise.
1199 (SVE_HEADER_SIZE_OFFSET): Likewise.
1200 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1201 (SVE_HEADER_VL_OFFSET): Likewise.
1202 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1203 (SVE_HEADER_FLAGS_OFFSET): Likewise.
1204 (SVE_HEADER_RESERVED_OFFSET): Likewise.
1205 (SVE_HEADER_SIZE): Likewise.
1206 (aarch64_linux_core_read_vq): Add function.
1207 (aarch64_linux_core_read_description): Check for SVE section.
1209 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1211 * aarch64-fbsd-tdep.c
1212 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1214 * aarch64-linux-tdep.c
1215 (aarch64_linux_iterate_over_regset_sections): Likewise.
1216 * alpha-linux-tdep.c
1217 (alpha_linux_iterate_over_regset_sections):
1219 (alphanbsd_iterate_over_regset_sections): Likewise.
1221 (amd64fbsd_iterate_over_regset_sections): Likewise.
1222 * amd64-linux-tdep.c
1223 (amd64_linux_iterate_over_regset_sections): Likewise.
1225 (armbsd_iterate_over_regset_sections): Likewise.
1227 (arm_fbsd_iterate_over_regset_sections): Likewise.
1229 (arm_linux_iterate_over_regset_sections): Likewise.
1230 * corelow.c (get_core_registers_cb): Likewise.
1231 (core_target::fetch_registers): Likewise.
1232 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1233 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1234 * gdbarch.h (void): Regenerate.
1235 * gdbarch.sh: Add supply_size and collect_size.
1236 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1237 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1238 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1239 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1240 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1241 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1242 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1243 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1244 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1245 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1246 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1247 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1248 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1249 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1250 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1251 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1252 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1253 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1254 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1255 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1256 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1257 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1258 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1259 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1260 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1261 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1262 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1263 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1264 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1265 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1267 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
1269 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1272 2018-08-10 Keith Seitz <keiths@redhat.com>
1274 * compile/compile-c-support.c (add_code_header, add_code_footer):
1275 Move into policy class.
1276 (c_push_user_expression, pop_user_expression_nop)
1277 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1278 (compile_program): New host class.
1279 (c_compile_program): New typedef.
1280 (c_compute_porgram): Use c_compile_program.
1282 2018-08-10 Keith Seitz <keiths@redhat.com>
1284 * compile/compile-internal.h (compile_instance::~compile_instance):
1285 Remove calls to htab_delete.
1286 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1287 * compile.c (compile_instance::compile_instance): Initialize
1288 htab unique pointers.
1289 (compile_instance::get_cached_type, compile_instance::insert_type)
1290 (compile_instance::error_symbol_once): Update for unique_ptr.
1292 2018-08-10 Keith Seitz <keiths@redhat.com>
1294 * compile/compile-c-symbols.c (struct symbol_error)
1295 (hash_symbol_error, eq_symbol_error, del_symbol_error)
1296 (compile_instance::insert_symbol_error)
1297 (compile_instance::error_symbol_once): Move to ...
1298 * compile/compile.c: ... here.
1300 2018-08-10 Keith Seitz <keiths@redhat.com>
1302 * compile/compile-c-support.c (c_get_compile_context): Use `new'
1303 instead of `new_compile_instance'.
1304 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1306 If the symbol error map is not initialized, create it.
1307 (generate_c_for_for_one_symbol): Do not check/initialize
1308 the symbol error map.
1309 * compile/compile-c-types.c (compile_c_instance): Make a class.
1311 (compile_instance::compile_instance): Initialize the type cache.
1312 (get_cached_type): New function.
1313 (insert_type): Update description.
1314 (compile_c_instance::m_default_cflags): Define.
1315 (convert_type): Update description. Use get_cached_type.
1316 (delete_instance): Moved to destructor.
1317 (new_compile_instance): Moved to constructor.
1318 * compile/compile-c.h (compile_c_instance): Make class inheriting
1319 from compile_instance.
1320 <base>: Remove field.
1321 <type_map, symbol_err_map>: Move to base class.
1322 <c_plugin>: Rename to `m_plugin' and remove pointer type.
1323 * compile/compile-internal.h (compile_instance): Make class.
1324 <type_map_t, symbol_err_map_t>: Define.
1325 <fe>: Rename to `m_gcc_fe'.
1326 <scope, block, gcc_target_options>: Add `m_' prefix.
1327 <m_type_map, m_symbol_err_map>: New fields, moved from
1330 (convert_type, new_compile_instance): Remove.
1331 * compile/compile.c (cleanup_compile_instance): Remove.
1332 (compile_to_object): Use unique_ptr to eliminate cleanups.
1333 (compile_instance::set_print_callback, compile_instance::version)
1334 (compile_instance::set_verbose)
1335 (compile_instance::set_driver_filename)
1336 (compile_instance::set_triplet_regexp)
1337 (compile_instance::set_arguments)
1338 (compile_instance::set_source_file)
1339 (compile_instance::compile): Define.
1341 2018-08-10 Keith Seitz <keiths@redhat.com>
1343 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1344 * compile/compile-c-types.c: Define GCC_METHODN macros and include
1345 gcc-c-fe.def to define C plugin.
1346 (delete_instance): Delete `c_plugin'.
1347 (new_compile_instance): Initialize `c_plugin'.
1348 * compile/compile-c.h: Include gcc_c_plugin.h.
1349 (struct compile_c_instance) <c_plugin>: New member.
1350 * gcc-c-plugin.h: New file.
1351 Update all callers with API change.
1353 2018-08-10 Keith Seitz <keiths@redhat.com>
1355 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1356 (HFILES_NO_SRCDIR): ... to here.
1357 Add compile-internal.h and compile-c.h.
1358 * compile/compile-c-support.c: Include compile-c.h.
1359 * compile/compile-c-symbols.c: Include compile-c.h.
1360 (generate_c_for_variable_locations): Update comment.
1361 * compile/compile-c-types.c: Include compile-c.h.
1362 * compile/compile-c.h: New file -- moved C language declarations
1363 from other files here.
1364 * compile/compile-internal.h: Do not include hashtab.h or
1365 common/enum-flags.h.
1366 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1367 (gcc_convert_symbol, gcc_symbol_address)
1368 (generate_c_for_variable_locations, c_get_mode_for_size)
1369 (c_get_range_decl_name): Definitions moved to compile-c.h.
1370 * compile/compile-loc2c.c: Include compile-c.h.
1372 2018-08-10 Keith Seitz <keiths@redhat.com>
1374 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1375 (c_symbol_substitution_name): ... this.
1378 2018-08-10 Keith Seitz <keiths@redhat.com>
1380 * compile/compile-c-support.c (c_compute_program): Use
1381 unique_xmalloc_ptr to eliminate cleanup.
1382 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1383 Return a unique_xmalloc_ptr and eliminate cleanup.
1384 * compile/compile-internal.h (generate_c_for_variable_locations):
1385 Return unique_xmalloc_ptr and update description.
1387 2018-08-10 Alan Hayward <alan.hayward@arm.com>
1389 * corelow.c (core_target::get_core_register_section): Rename
1390 min_size to section_min_size.
1392 2018-08-09 Jim Wilson <jimw@sifive.com>
1394 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1395 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1396 * NEWS: Mention new GNU/Linux RISC-V target.
1397 * configure.host: Add riscv*-*-linux*.
1398 * configure.nat: Add riscv*.
1399 * configure.tgt: Add riscv*-*-linux*.
1400 * riscv-linux-nat.c: New file.
1401 * riscv-linux-tdep.c: New file.
1403 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1405 * infrun.c (resume): Make static, add forward declaration.
1406 (proceed): Update header comment.
1407 * infrun.h (resume): Delete declaration.
1409 2018-08-09 Tom Tromey <tom@tromey.com>
1411 * riscv-tdep.h: Minor formatting fixes.
1413 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
1415 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1416 * dwarf-index-cache.c (create_dir_and_check): Likewise.
1417 (test_mkdir_recursive): Likewise.
1418 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1420 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1422 * valarith.c (value_subscripted_rvalue): If an array is not in
1423 memory, and we don't know the upper bound, then we can't know that
1424 the requested element exists or not.
1426 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
1428 * target.c (str_comma_list_concat_elem): Fix typo in comment.
1429 (target_options_to_string): Add comment.
1431 2018-08-08 Tom Tromey <tom@tromey.com>
1433 * unittests/scoped_mmap-selftests.c: Check result of "write".
1435 2018-08-08 Jim Wilson <jimw@sifive.com>
1437 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1438 (decode_register_index_short): New.
1439 (decode_j_type_insn, decode_cj_type_insn): New.
1440 (decode_b_type_insn, decode_cb_type_insn): New.
1441 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
1442 local xlen. Check xlen when decoding ambiguous compressed insns. In
1443 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1444 is_c_sw_insn instead of is_sw_insn.
1445 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1446 (riscv_software_single_step): New.
1447 * riscv-tdep.h (riscv_software_single_step): Declare.
1449 * riscv-tdep.c (riscv_isa_xlen): Drop static.
1450 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1452 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
1455 * target.c (dispose_inferior): Don't dispose of inferiors that are
1458 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
1460 * remote.c (remote_target::download_tracepoint): Change char* to
1463 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
1465 * target.h (target_options_to_string): Return an std::string.
1466 * target.c (str_comma_list_concat_elem): Return void, use
1468 (do_option): Likewise.
1469 (target_options_to_string): Return an std::string.
1470 * linux-nat.c (linux_nat_target::wait): Adjust.
1471 * target-debug.h (target_debug_print_options): Adjust.
1473 2018-08-07 Tom Tromey <tom@tromey.com>
1475 * Makefile.in (CPPFLAGS): New variable.
1476 (INTERNAL_CPPFLAGS): Use it.
1478 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1480 * NEWS: Mention the index cache.
1482 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1484 * common/pathstuff.h (get_standard_cache_dir): New.
1485 * common/pathstuff.c (get_standard_cache_dir): New.
1486 * build-id.h (build_id_to_string): New.
1487 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1488 DEBUG_STR_SUFFIX): Move to here.
1489 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1490 DEBUG_STR_SUFFIX): Move from there.
1491 (write_psymtabs_to_index): Make non-static, add basename
1492 parameter. Write to temporary files, rename when done.
1493 (save_gdb_index_command): Adjust call to
1494 write_psymtabs_to_index.
1495 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1497 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1498 (get_gdb_index_contents_from_cache): New.
1499 (get_gdb_index_contents_from_cache_dwz): New.
1500 (dwarf2_initialize_objfile): Read index from cache.
1501 (dwarf2_build_psymtabs): Save to index.
1502 * dwarf-index-cache.h: New file.
1503 * dwarf-index-cache.c: New file.
1504 * dwarf-index-write.h: New file.
1506 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1508 * gnulib/aclocal.m4: Re-generate.
1509 * gnulib/config.in: Re-generate.
1510 * gnulib/configure: Re-generate.
1511 * gnulib/import/Makefile.am: Re-generate.
1512 * gnulib/import/Makefile.in: Re-generate.
1513 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1514 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1515 * gnulib/import/m4/mkdir.m4: New file.
1516 * gnulib/import/mkdir.c: New file.
1517 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1520 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1522 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1523 * common/scoped_mmap.c: New file.
1524 * common/scoped_mmap.h (destroy): New method.
1525 (~scoped_mmap, reset): Use destroy.
1526 (scoped_mmap): New move constructor.
1527 (mmap_file): New declaration.
1528 * unittests/scoped_mmap-selftests.c (test_normal,
1529 test_invalid_filename, run_tests): New functions.
1530 (_initialize_scoped_mmap_selftests): Register selftest.
1532 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1534 * dwarf2read.c (read_gdb_index_from_section): Rename to...
1535 (read_gdb_index_from_buffer): ... this. Remove section
1536 parameter, add buffer parameter.
1537 (get_gdb_index_contents_ftype,
1538 get_gdb_index_contents_dwz_ftype): New typedefs.
1539 (dwarf2_read_gdb_index): Add callback parameters to get the
1541 (get_gdb_index_contents_from_section): New.
1542 (dwarf2_initialize_objfile): Update call to
1543 dwarf2_read_gdb_index.
1545 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1547 * common/filestuff.h (gdb_fopen_cloexec): New overload.
1548 (gdb_open_cloexec): Likewise.
1549 * nat/linux-osdata.c (command_from_pid): Use string_printf.
1550 (commandline_from_pid): Likewise.
1551 (linux_xfer_osdata_threads): Likewise.
1552 (linux_xfer_osdata_fds): Likewise.
1553 * ada-lang.c (is_package_name): Likewise.
1554 * auxv.c (procfs_xfer_auxv): Likewise.
1555 * breakpoint.c (print_one_breakpoint_location): Use
1557 (print_one_catch_solib): Use string_printf.
1558 * coff-pe-read.c (add_pe_exported_sym): Likewise.
1559 (add_pe_forwarded_sym): Likewise.
1560 * dwarf2read.c (create_type_unit_group): Likewise.
1561 (build_error_marker_type): Likewise.
1562 * infcall.c (get_function_name): Likewise.
1563 * valprint.c (print_converted_chars_to_obstack): Likewise.
1564 * xtensa-tdep.c (xtensa_register_type): Likewise.
1566 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
1568 * remote.c (remote_target::download_tracepoint): Fix format
1571 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1573 * tracefile.c: Include common/byte-vector.h.
1574 (trace_save): Change type of buf to gdb::byte_vector. Initialize
1575 with trace_regblock_size if needed. Update uses of buf.
1577 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1579 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1580 std::vector<unsigned char>.
1581 * tracepoint.c (collection_list::collection_list): Remove
1582 m_regs_mask initializer from initializer list. Resize
1583 m_regs_mask using the largest remote register number.
1584 (collection_list::add_remote_register): Remove size check on
1585 m_regs_mask. Use at to access element.
1586 (collection_list::stringify): Change type of temp_buf to
1587 gdb::char_vector. Update uses of temp_buf. Resize if needed to
1588 stringify the register mask. Use pack_hex_byte for the register
1591 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1593 * tracepoint.h (class collection_list) <add_register>: Remove.
1594 <add_remote_register, add_ax_registers, add_local_register>:
1596 <add_memrange>: Add scope parameter.
1597 * tracepoint.c (encode_actions_1): Likewise.
1598 (collection_list::add_register): Rename to ...
1599 (collection_list::add_remote_register): ... this. Update
1601 (collection_list::add_ax_registers, add_local_register): New
1603 (collection_list::add_memrange): Add scope parameter. Call
1604 add_local_register instead of add_register.
1605 (finalize_tracepoint_aexpr): New function.
1606 (collection_list::collect_symbol): Update calls to add_memrange.
1607 Call add_local_register instead of add_register. Call
1608 add_ax_registers. Call finalize_tracepoint_aexpr.
1609 (encode_actions_1): Get remote regnos for $reg action. Call
1610 add_remote_register, add_ax_registers, and add_local_register.
1611 Update call to add_memrange. Call finalize_tracepoint_aexpr.
1612 (validate_actionline): Call finalize_tracepoint_aexpr.
1614 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1616 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1617 Replace array buf with gdb::char_vector buf, of size
1618 get_remote_packet_size (). Replace references to buf and
1619 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
1620 and xsnprintf with snprintf. Raise errors if the buffer is too
1623 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1625 * remote.c (remote_target::download_tracepoint): Fix the has_more
1626 predicate in the QTDP action list iteration.
1628 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1630 * remote.c (remote_target::download_tracepoint): Fix indentation
1633 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1635 * proc-api.c (_initialize_proc_api): Remove c, unused.
1636 * procfs.c (procfs_init_inferior): Remove signals, unused.
1637 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1640 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
1641 Andrew Burgess <andrew.burgess@embecosm.com>
1643 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1644 'W_STOPCODE (0)' as this could be ambiguous.
1646 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
1648 * ser-tcp.c (net_open): Fix thinko when deciding whether to
1649 disable TCP's Nagle algorithm (use "ai_protocol" instead of
1652 2018-08-02 Tom Tromey <tom@tromey.com>
1655 * dwarf2read.c (read_func_scope): Set symtab on template parameter
1657 (process_structure_scope): Likewise.
1659 2018-08-02 Xavier Roirand <roirand@adacore.com>
1662 * darwin-nat.c (darwin_kill_inferior): Fix handling of
1665 2018-08-02 Tom Tromey <tom@tromey.com>
1667 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1668 (darwin_suspend_inferior, darwin_resume_inferior)
1669 (darwin_decode_notify_message, darwin_resume_inferior_threads)
1670 (darwin_check_new_threads): Check result of get_darwin_inferior.
1672 2018-07-31 Joel Brobecker <brobecker@adacore.com>
1676 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
1678 * varobj.c (varobj_get_path_expr_parent): Report an error if
1679 parent is a dynamic varobj.
1681 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1683 * gnulib/aclocal.m4: Re-generate.
1684 * gnulib/config.in: Re-generate.
1685 * gnulib/configure: Re-generate.
1686 * gnulib/import/Makefile.in: Re-generate.
1687 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1688 * gnulib/import/m4/onceonly.m4: Re-generate.
1690 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1692 * target-descriptions.c (struct xml_test_tdesc): New.
1693 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1694 (record_xml_tdesc): Update.
1695 (maintenance_check_xml_descriptions): Update.
1696 * target-descriptions.h (record_xml_tdesc): Update comment.
1698 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
1700 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1701 checking array bounds are defined.
1703 2018-07-30 Tom Tromey <tom@tromey.com>
1705 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1706 irreflexivity violation.
1708 2018-07-30 Tom Tromey <tom@tromey.com>
1710 * cli/cli-decode.c (lookup_cmd): Remove lint code.
1711 * value.c (unpack_long): Remove lint code.
1712 * valops.c (value_ind): Remove lint code.
1713 * valarith.c (value_x_binop, value_x_unop, value_equal)
1714 (value_pos): Remove lint code.
1716 2018-07-28 Tom de Vries <tdevries@suse.de>
1718 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1719 with undefined upper bound as <optimized out>.
1721 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
1723 * gcore.in: Rename variable "name" to "prefix". Expand
1726 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
1728 * windows-nat.c (windows_nat_target::create_inferior): Update to
1729 call close() in global namespace.
1731 2018-07-26 Tom Tromey <tom@tromey.com>
1733 * dwarf-index-write.c (add_address_entry): Don't add objfile
1735 * dbxread.c (find_stab_function): Rename from
1736 find_stab_function_addr. Return a bound_minimal_symbol.
1737 (read_dbx_symtab): Use raw_text_low, raw_text_high.
1738 Don't add objfile offsets.
1739 (end_psymtab): Use raw_text_low, raw_text_high,
1740 MSYMBOL_VALUE_RAW_ADDRESS.
1741 (read_ofile_symtab): Update.
1742 (process_one_symbol): Update.
1743 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1745 (dw2_relocate): Remove.
1746 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1748 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1750 (process_psymtab_comp_unit_reader, add_partial_symbol)
1751 (add_partial_subprogram, dwarf2_ranges_read): Update.
1752 (load_partial_dies): Update.
1753 (add_address_entry): Don't add objfile offsets.
1754 (dwarf2_build_include_psymtabs): Update.
1755 (create_addrmap_from_aranges): Don't add objfile offsets.
1756 (dw2_find_pc_sect_compunit_symtab): Update.
1757 * mdebugread.c (parse_symbol): Don't add objfile offsets.
1758 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1760 (parse_partial_symbols): Don't add objfile offsets. Use
1761 raw_text_low, raw_text_high. Update.
1762 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1763 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1764 or call 'relocate' quick function. Clear psymbol_map.
1765 * psympriv.h (struct partial_symbol) <address>: Add section
1767 <set_unrelocated_address>: Rename from set_address.
1768 <raw_text_low, raw_text_high>: New methods.
1769 <text_low, text_high>: Add objfile parameter.
1770 (add_psymbol_to_bcache): Add 'section' parameter. Call
1771 set_unrelocated_address.
1772 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1773 (find_pc_psymbol): Update.
1774 (fixup_psymbol_section, relocate_psymtabs): Remove.
1775 (dump_psymtab, psym_functions): Update.
1776 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1778 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1779 (start_psymtab_common): Update.
1780 * symfile-debug.c (debug_qf_relocate): Remove.
1781 (debug_sym_quick_functions): Update.
1782 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1783 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1786 2018-07-26 Tom Tromey <tromey@redhat.com>
1788 * dbxread.c (end_psymtab): Use text_high_valid and
1790 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1791 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1792 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1794 <text_low_valid, text_high_valid>: New fields.
1795 <set_text_low, set_text_high>: Update.
1796 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1798 2018-07-26 Tom Tromey <tom@tromey.com>
1800 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1802 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1803 textlow and texthigh fields.
1804 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1806 * mdebugread.c (parse_lines, parse_partial_symbols)
1807 (psymtab_to_symtab_1): Update.
1808 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1809 Rename fields. Update comment. Now private.
1810 <text_low, text_high, set_text_low, set_text_high>: New methods.
1811 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1812 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1813 (start_psymtab_common, maintenance_info_psymtabs)
1814 (maintenance_check_psymtabs): Update.
1815 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1817 (scan_xcoff_symtab): Update.
1819 2018-07-26 Tom Tromey <tromey@redhat.com>
1821 * psympriv.h (struct partial_symbol) <unrelocated_address,
1822 address, set_address>: New methods.
1823 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1824 (fixup_psymbol_section, relocate_psymtabs): Update.
1825 (print_partial_symbols): Add 'objfile' parameter. Update.
1826 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1829 2018-07-26 Tom Tromey <tom@tromey.com>
1831 * dwarf-index-write.c (write_psymbols, debug_names::insert)
1832 (debug_names::write_psymbols): Update.
1833 * psympriv.h (struct partial_symbol): Derive from
1834 general_symbol_info.
1835 <obj_section>: New method.
1836 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1837 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1838 (find_pc_sect_psymbol, fixup_psymbol_section)
1839 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1840 (print_partial_symbols, recursively_search_psymtabs)
1841 (compare_psymbols, psymbol_hash, psymbol_compare)
1842 (add_psymbol_to_bcache, maintenance_check_psymtabs)
1843 (psymbol_name_matches, psym_fill_psymbol_map): Update.
1845 2018-07-26 Tom Tromey <tromey@redhat.com>
1847 * dbxread.c (end_psymtab): Remove dead code.
1849 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
1851 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1852 DWARF unwinders are disabled.
1853 * dwarf2-frame.c: Add dwarf2read.h include.
1854 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1856 (dwarf2_frame_unwinders_enabled_p): Define.
1857 (show_dwarf_unwinders_enabled_p): New function.
1858 (_initialize_dwarf2_frame): Register switch to control DWARF
1860 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1861 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1862 (show_dwarf_cmdlist): Remove static keyword.
1863 * dwarf2read.h (set_dwarf_cmdlist): Declare.
1864 (show_dwarf_cmdlist): Declare.
1865 * NEWS: Document new feature.
1867 2018-07-26 Tom de Vries <tdevries@suse.de>
1869 PR breakpoints/23366
1870 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1872 2018-07-26 Tom de Vries <tdevries@suse.de>
1874 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1875 DW_AT_count can't be translated to a dynamic prop.
1877 2018-07-25 Tom de Vries <tdevries@suse.de>
1879 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1882 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
1884 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1886 2018-07-25 Joel Brobecker <brobecker@adacore.com>
1888 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1890 2018-07-24 Keith Seitz <keiths@redhat.comt
1893 * dwarf2read.c (dw2_add_symbol_to_list): New function.
1894 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1895 instead of add_symbol_to_list.
1896 (read_file_scope): Call prepare_one_comp_unit before reading
1899 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
1901 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1903 2018-07-24 Tom Tromey <tom@tromey.com>
1905 * utils.c (malloc, realloc, free): Don't declare.
1906 * configure, config.in: Rebuild.
1907 * configure.ac: Don't check for declarations of free, malloc, or
1910 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1912 * aarch64-linux-nat.c
1913 (aarch64_linux_nat_target::stopped_data_address): Remove unused
1915 * arm-linux-nat.c (fetch_regs): Likewise.
1916 (store_regs): Likewise.
1917 (fetch_vfp_regs): Likewise.
1918 (store_vfp_regs): Likewise.
1919 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1920 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1921 (arm_linux_nat_target::insert_watchpoint): Likewise.
1922 (arm_linux_nat_target::remove_watchpoint): Likewise.
1923 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1925 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1927 * ppc-linux-nat.c (fetch_register): Likewise.
1928 (fetch_all_gp_regs): Likewise.
1929 (fetch_ppc_registers): Likewise.
1930 (store_all_gp_regs): Likewise.
1931 (store_ppc_registers): Likewise.
1932 (hwdebug_insert_point): Likewise.
1933 (can_use_watchpoint_cond_accel): Likewise.
1934 * remote-sim.c (gdb_os_write_stdout): Likewise.
1936 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1937 Tom Tromey <tom@tromey.com>
1939 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1941 * configure: Rebuild.
1943 2018-07-22 Tom Tromey <tom@tromey.com>
1945 * regformats/regdat.sh: Define xmltarget_${name} inside
1946 #ifndef IN_PROCESS_AGENT.
1948 2018-07-22 Tom Tromey <tom@tromey.com>
1950 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1952 2018-07-22 Tom Tromey <tom@tromey.com>
1954 * symfile.c (reread_symbols): Notify iter, not objfile.
1956 2018-07-22 Tom Tromey <tom@tromey.com>
1958 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1960 (ravenscar_thread_target::prepare_to_store): Likewise.
1962 2018-07-22 Tom Tromey <tom@tromey.com>
1964 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1965 unused variable. Call value_fetch_lazy when needed.
1966 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1967 Remove unused variable. Call value_fetch_lazy when needed.
1969 2018-07-22 Tom Tromey <tom@tromey.com>
1971 * m32c-tdep.c (mark_dma): Return void.
1972 (make_regs): Remove unused declarations.
1974 2018-07-22 Tom Tromey <tom@tromey.com>
1976 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1977 cmdscm_get_valid_command_smob_arg_unsafe for effect.
1978 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1979 bkscm_get_valid_block_smob_arg_unsafe for effect.
1981 2018-07-22 Tom Tromey <tom@tromey.com>
1983 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1986 2018-07-22 Tom Tromey <tom@tromey.com>
1988 * windows-nat.c (saved_context): Conditionally define.
1989 * remote.c (remote_target::remote_btrace_maybe_reopen):
1990 Conditionally declare "warned".
1991 * inflow.c (sigquit_ours): Conditionally define.
1992 (new_tty): Move "tty" declaration inside #if.
1993 * guile/guile.c (guile_datadir): Conditionally define.
1994 * charset.c (set_be_le_names): Move some declarations inside #if.
1995 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1997 (parse_xml_btrace_conf): Likewise.
1999 2018-07-22 Tom Tromey <tom@tromey.com>
2001 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2003 2018-07-22 Tom Tromey <tom@tromey.com>
2005 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2006 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2007 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2008 * buildsym-legacy.c (get_macro_table): Remove unused variable.
2009 * stack.c (frame_apply_level_command): Remove unused variable.
2010 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2011 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2012 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2014 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2015 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2016 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2018 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2019 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2021 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2022 Remove unused variable.
2023 * cli/cli-script.c (recurse_read_control_structure): Remove unused
2025 * common/tdesc.c (print_xml_feature::visit): Remove unused
2027 * compile/compile-object-load.c (store_regs): Remove unused
2029 * complaints.c (clear_complaints): Remove unused variable.
2030 * corelow.c (core_target_open): Remove unused variable.
2031 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2033 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2035 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2037 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2039 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2041 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2043 * ia64-tdep.c (examine_prologue): Remove unused variable.
2044 * infcall.c (run_inferior_call): Remove unused variable.
2045 * inferior.c (exit_inferior): Remove unused variable.
2046 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2047 * linespec.c (decode_line_2): Remove unused variable.
2048 * linux-nat.c (super_close): Remove.
2049 * linux-tdep.c (linux_info_proc): Remove unused variable.
2050 * mi/mi-main.c (mi_execute_command): Remove unused variable.
2051 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2052 Remove unused variable.
2053 * parse.c (find_minsym_type_and_address): Remove unused variable.
2054 * printcmd.c (info_symbol_command, printf_floating): Remove unused
2056 * python/py-breakpoint.c (bppy_set_commands): Remove unused
2058 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2060 * record-btrace.c (record_btrace_target::store_registers): Remove
2062 (cmd_show_record_btrace_cpu): Remove unused variable.
2063 * riscv-tdep.c (riscv_register_reggroup_p)
2064 (riscv_push_dummy_call, riscv_return_value): Remove unused
2066 * rust-exp.y (literal): Remove unused variable.
2067 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2069 <STRUCTOP_ANONYMOUS>: Likewise.
2070 * s390-linux-tdep.c (s390_linux_init_abi_31)
2071 (s390_linux_init_abi_64): Remove unused variable.
2072 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2073 (file_select_thread, net_windows_open, _initialize_ser_windows):
2074 Remove unused variables.
2075 * symtab.c (find_pc_sect_line): Remove unused variable.
2076 * target-memory.c (compute_garbled_blocks): Remove unused
2078 (target_write_memory_blocks): Remove unused variable.
2079 * target.c (target_stack::unpush): Remove unused variables.
2080 * tracepoint.c (start_tracing, all_tracepoint_actions)
2081 (merge_uploaded_trace_state_variables)
2082 (print_one_static_tracepoint_marker): Remove unused variable.
2083 * unittests/basic_string_view/element_access/char/1.cc (test01):
2084 Remove unused variable.
2085 * windows-nat.c (windows_continue, windows_add_all_dlls)
2086 (do_initial_windows_stuff, windows_nat_target::create_inferior):
2087 Remove unused variables.
2089 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
2091 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2092 attr_profile in HAVE_ELF.
2093 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2096 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
2098 * frame.c (frame_register_unwind): Change parameter name.
2099 (frame_unwind_register): Likewise.
2100 (frame_unwind_register_value): Likewise.
2101 (frame_unwind_register_signed): Likewise.
2102 (frame_unwind_register_unsigned): Likewise.
2103 * frame.h (frame_register_unwind): Likewise.
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_unwind_arch): Likewise.
2110 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2112 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2115 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2117 * mips-linux-nat.c (mips_linux_nat_target::read_description):
2118 Call `get_ptrace_pid' rather than extracting the ptrace PID by
2121 2018-07-20 Keith Seitz <keiths@redhat.com>
2123 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2124 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2125 m_compunit_symtab, m_language>: Add "m_" prefix.
2127 * buildsym.c: Update all uses.
2129 2018-07-20 Tom Tromey <tom@tromey.com>
2131 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2132 * buildsym.h (record_line_ftype): Remove typedef.
2134 2018-07-20 Tom Tromey <tom@tromey.com>
2136 * buildsym-legacy.h (augment_type_symtab): Don't declare.
2137 (end_expandable_symtab): Likewise.
2138 (end_symtab_get_static_block): Likewise.
2139 (end_symtab_from_static_block): Likewise.
2140 * buildsym-legacy.c (augment_type_symtab): Remove.
2141 (end_expandable_symtab): Remove.
2142 (end_symtab_get_static_block): Remove.
2143 (end_symtab_from_static_block): Remove.
2145 2018-07-20 Tom Tromey <tom@tromey.com>
2147 * dwarf2read.c: Include buildsym.h.
2148 (struct dwarf2_cu) <builder>: New method.
2149 (fixup_go_packaging): Update.
2150 (process_full_comp_unit, process_full_type_unit): Update. Don't
2151 use scoped_free_pendings.
2152 (using_directives): Add "cu" parameter, remove "language".
2153 (read_import_statement, setup_type_unit_groups, )
2154 (read_func_scope, read_lexical_block_scope)
2155 (dwarf2_record_block_ranges, read_namespace): Update.
2156 (lnp_state_machine::lnp_state_machine): Add cu parameter.
2157 (lnp_state_machine::handle_end_sequence): Update.
2158 (class lnp_state_machine) <m_cu>: New member.
2159 <m_record_line_callback>: Remove.
2160 <m_currently_recording_lines>: New member.
2161 (lnp_state_machine::handle_set_file): Update.
2162 (noop_record_line): Remove.
2163 (dwarf_record_line_p): Add cu parameter.
2164 (dwarf_record_line_1, dwarf_finish_line): Likewise.
2165 (lnp_state_machine::record_line)
2166 (lnp_state_machine::lnp_state_machine)
2167 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2168 (dwarf_decode_lines): Update.
2169 (dwarf2_start_subfile): Add cu parameter.
2170 (dwarf2_start_symtab, new_symbol): Update.
2171 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2172 Remove dwarf2_per_objfile parameter.
2173 (dwarf_decode_macros): Update.
2175 2018-07-20 Tom Tromey <tom@tromey.com>
2177 * stabsread.c (define_symbol): Update.
2178 * buildsym-legacy.h (get_buildsym_compunit): Declare.
2179 * dwarf2read.c (new_symbol): Update.
2180 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2181 * cp-namespace.c: Include buildsym.h.
2182 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2183 * buildsym-legacy.c (get_buildsym_compunit): New function.
2185 2018-07-20 Tom Tromey <tom@tromey.com>
2187 * xcoffread.c: Include buildsym-legacy.h.
2188 * windows-nat.c: Include buildsym-legacy.h.
2189 * stabsread.c: Include buildsym-legacy.h.
2190 * mdebugread.c: Include buildsym-legacy.h.
2191 * buildsym-legacy.h: New file.
2192 * buildsym-legacy.c: New file, from buildsym.c.
2193 * go32-nat.c: Include buildsym-legacy.h.
2194 * dwarf2read.c: Include buildsym-legacy.h.
2195 * dbxread.c: Include buildsym-legacy.h.
2196 * cp-namespace.c: Include buildsym-legacy.h.
2197 * coffread.c: Include buildsym-legacy.h.
2198 * buildsym.h: Move some contents to buildsym-legacy.h.
2199 * buildsym.c: Include buildsym-legacy.h. Move many functions to
2201 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2203 2018-07-20 Tom Tromey <tom@tromey.com>
2205 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2206 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2207 (buildsym_compunit::buildsym_compunit)
2208 (buildsym_compunit::~buildsym_compunit)
2209 (buildsym_compunit::get_macro_table): Define.
2211 2018-07-20 Tom Tromey <tom@tromey.com>
2213 * buildsym.c (reset_symtab_globals): Remove.
2214 (buildsym_compunit::end_symtab_from_static_block): Update.
2215 (buildsym_compunit::augment_type_symtab): Update.
2216 (end_symtab_from_static_block): Call free_buildsym_compunit.
2217 (augment_type_symtab, end_symtab, end_expandable_symtab):
2220 2018-07-20 Tom Tromey <tom@tromey.com>
2222 * arch-utils.c: Do not include buildsym.h.
2223 * mipsread.c: Do not include buildsym.h.
2224 * machoread.c: Do not include buildsym.h.
2225 * elfread.c: Do not include buildsym.h.
2227 2018-07-20 Tom Tromey <tom@tromey.com>
2229 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2231 (buildsym_compunit): Add new constructor.
2232 (struct buildsym_compunit) <get_last_source_file, finish_block,
2233 record_block_range, start_subfile, patch_subfile_names,
2234 push_subfile, pop_subfile, record_line, get_compunit_symtab,
2235 set_last_source_start_addr, get_last_source_start_addr,
2236 get_local_using_directives, set_local_using_directives,
2237 get_global_using_directives, outermost_context_p,
2238 get_current_context_stack, get_context_stack_depth,
2239 get_current_subfile, get_local_symbols, get_file_symbols,
2240 get_global_symbols, record_debugformat, record_producer,
2241 push_context, pop_context, end_symtab_get_static_block,
2242 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2244 <record_pending_block, finish_block_internal, make_blockvector,
2245 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2249 2018-05-22 Tom Tromey <tom@tromey.com>
2251 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2253 (finish_block_internal): Update.
2255 2018-07-20 Tom Tromey <tom@tromey.com>
2257 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2259 (finish_block_internal): Update.
2261 2018-07-20 Tom Tromey <tom@tromey.com>
2263 * buildsym.h (EXTERN): Don't define or undef.
2264 * buildsym.c (EXTERN): Don't define.
2266 2018-07-20 Tom Tromey <tom@tromey.com>
2268 * buildsym.c: Remove TODO comment.
2270 2018-07-20 Tom Tromey <tom@tromey.com>
2272 * coffread.c (coff_symtab_read): Update.
2273 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2274 (xcoff_new_init): Update.
2275 * mipsread.c (mipscoff_new_init): Update.
2276 * mdebugread.c (mdebug_build_psymtabs): Update.
2277 * elfread.c (elf_new_init): Update.
2278 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2280 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2281 (coffstab_build_psymtabs, elfstab_build_psymtabs)
2282 (stabsect_build_psymtabs): Update.
2283 * buildsym.h (buildsym_init): Don't declare.
2284 * buildsym.c: Update comment.
2285 (prepare_for_building): Remove.
2286 (start_symtab, restart_symtab): Update.
2287 (reset_symtab_globals): Update comment.
2288 (buildsym_init): Remove.
2290 2018-07-20 Tom Tromey <tom@tromey.com>
2292 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2293 * stabsread.c (patch_block_stabs, define_symbol, read_type)
2294 (read_enum_type, common_block_start, common_block_end)
2295 (cleanup_undefined_types_1, finish_global_stabs): Update.
2296 * mdebugread.c (psymtab_to_symtab_1): Update.
2297 * dwarf2read.c (fixup_go_packaging, read_func_scope)
2298 (read_lexical_block_scope, new_symbol): Update.
2299 * dbxread.c (process_one_symbol): Update.
2300 * coffread.c (coff_symtab_read, process_coff_symbol)
2301 (coff_read_enum_type): Update.
2302 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2304 (get_local_symbols, get_file_symbols, get_global_symbols): New
2306 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2308 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2309 (~scoped_free_pendings): Update.
2310 (finish_block, prepare_for_building, reset_symtab_globals)
2311 (end_symtab_get_static_block, end_symtab_with_blockvector)
2312 (augment_type_symtab, push_context): Update.
2313 (get_local_symbols, get_file_symbols, get_global_symbols): New
2315 (buildsym_init): Update.
2317 2018-07-20 Tom Tromey <tom@tromey.com>
2319 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2320 (process_full_type_unit): Likewise.
2321 (dwarf2_start_symtab): Set list_in_scope.
2323 2018-07-20 Tom Tromey <tom@tromey.com>
2325 * dwarf2read.c (process_psymtab_comp_unit_reader)
2326 (build_type_psymtabs_reader): Do not set list_in_scope.
2328 2018-07-20 Tom Tromey <tom@tromey.com>
2330 * buildsym.c (free_pendings): Remove.
2331 (add_symbol_to_list, scoped_free_pendings)
2332 (finish_block_internal, buildsym_init): Update.
2334 2018-07-20 Tom Tromey <tom@tromey.com>
2336 * xcoffread.c (read_xcoff_symtab): Update.
2337 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2339 * dbxread.c (process_one_symbol): Update.
2340 * coffread.c (coff_symtab_read): Update.
2341 * buildsym.h (finish_block): Update.
2342 * buildsym.c (finish_block): Remove "listhead" argument.
2343 (end_symtab_get_static_block): Update.
2345 2018-07-20 Tom Tromey <tom@tromey.com>
2347 * buildsym.h (class scoped_free_pendings): Remove constructor.
2348 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2350 <m_pending_block_obstack, m_pending_blocks>: New members.
2351 (pending_block_obstack, pending_blocks): Remove.
2352 (scoped_free_pendings::scoped_free_pendings): Default.
2353 (~scoped_free_pendings): Update.
2354 (free_pending_blocks): Remove.
2355 (finish_block_internal, record_pending_block, make_blockvector)
2356 (end_symtab_get_static_block, augment_type_symtab, push_context)
2357 (buildsym_init): Update.
2359 2018-07-20 Tom Tromey <tom@tromey.com>
2361 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2362 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2364 (pending_addrmap, pending_addrmap_obstack)
2365 (pending_addrmap_interesting): Remove.
2366 (scoped_free_pendings, record_block_range, make_blockvector)
2367 (prepare_for_building, reset_symtab_globals, buildsym_init):
2370 2018-07-20 Tom Tromey <tom@tromey.com>
2372 * xcoffread.c (process_linenos): Update.
2373 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2374 * mdebugread.c (psymtab_to_symtab_1): Update.
2375 * dwarf2read.c (setup_type_unit_groups)
2376 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2377 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2378 * dbxread.c (process_one_symbol): Update.
2379 * coffread.c (coff_symtab_read, enter_linenos)
2380 (process_coff_symbol): Update.
2381 * buildsym.h (current_subfile): Don't declare.
2382 (get_current_subfile): Declare.
2383 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2385 (start_subfile, free_buildsym_compunit, push_subfile)
2386 (prepare_for_building, start_symtab): Update.
2387 (get_current_subfile): New function.
2389 2018-07-20 Tom Tromey <tom@tromey.com>
2391 * coffread.c (coff_symtab_read): Update.
2392 * xcoffread.c (read_xcoff_symtab): Update.
2393 * dwarf2read.c (new_symbol): Update.
2394 (read_func_scope, read_lexical_block_scope): Update.
2395 * dbxread.c (process_one_symbol): Update.
2396 * buildsym.h (context_stack, context_stack_depth): Don't declare.
2397 (outermost_context_p): Remove macro.
2398 (outermost_context_p, get_current_context_stack)
2399 (get_context_stack_depth): Declare.
2400 (pop_context): Return struct context_stack.
2401 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2403 (context_stack_size): Remove.
2404 (INITIAL_CONTEXT_STACK_SIZE): Remove.
2405 (prepare_for_building, end_symtab_get_static_block)
2406 (augment_type_symtab, push_context): Update.
2407 (pop_context): Return struct context_stack.
2408 (outermost_context_p, get_current_context_stack)
2409 (get_context_stack_depth): New functions.
2410 (buildsym_init): Update.
2412 2018-07-20 Tom Tromey <tom@tromey.com>
2414 * rust-exp.y: Now a pure parser. Update all rules.
2415 (%union): Move earlier.
2416 (current_parser, work_obstack): Remove globals.
2417 (rust_parser, ~rust_parser): Update.
2418 (class rust_parser) <copy_name, concat3, crate_name, super_name,
2419 lex_character, lex_number, lex_string, lex_identifier,
2420 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2421 convert_name, convert_params_to_expression,
2422 convert_ast_to_expression, ast_basic_type, ast_operation,
2423 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2424 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2425 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2426 ast_array_type, ast_slice_type, ast_reference_type,
2427 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2428 (rust_parse): Update.
2429 (rustyyerror, rustyylex): Add parser parameter.
2430 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2431 (rust_lex_stringish_test, rust_lex_test_sequence)
2432 (rust_lex_test_trailing_dot, rust_lex_test_completion)
2433 (rust_lex_test_push_back, rust_lex_tests): Update.
2435 2018-07-19 Pedro Alves <palves@redhat.com>
2437 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2438 gdb::unique_xmalloc_ptr.
2439 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2440 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2441 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2442 copy-initialization.
2443 * guile/scm-pretty-print.c (ppscm_print_children): Use
2444 gdb::unique_xmalloc_ptr instead of cleanups.
2445 (gdbscm_apply_val_pretty_printer): Remove cleanups.
2446 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2447 gdb::unique_xmalloc_ptr.
2448 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2449 Adjust to use gdb::unique_xmalloc_ptr.
2450 * guile/scm-utils.c (extract_arg): Adjust.
2451 * guile/scm-value.c (gdbscm_value_field): Adjust to use
2452 gdb::unique_xmalloc_ptr instead of a cleanup.
2454 2018-07-19 Tom Tromey <tom@tromey.com>
2456 * utils.c (do_value_free_to_mark)
2457 (make_cleanup_value_free_to_mark): Remove.
2458 * utils.h (make_cleanup_value_free_to_mark): Remove.
2460 2018-07-19 Pedro Alves <palves@redhat.com>
2462 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2463 forwarding reference.
2465 2018-07-18 Pedro Alves <palves@redhat.com>
2467 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2468 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
2471 2018-07-18 Pedro Alves <palves@redhat.com>
2473 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2475 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2477 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2478 directly instead of a cleanup.
2479 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2480 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
2481 (vlscm_binop_gdbthrow): New, factored out from ...
2482 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
2483 (vlscm_rich_compare): Use gdbscm_wrap.
2484 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2485 instead of a cleanup.
2486 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2488 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2489 Use xfree directly instead of a cleanup.
2490 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2491 Adjust to use gdbscm_wrap and scoped_value_mark.
2492 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2493 (gdbscm_value_address, gdbscm_value_dereference)
2494 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2496 (gdbscm_value_dynamic_type): Use scoped_value_mark.
2497 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2499 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2500 gdbscm_wrap and scoped_value_mark.
2501 (gdbscm_value_to_string): Use xfree directly instead of a
2502 cleanup. Move 'buffer' unique_ptr to TRY scope.
2503 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2504 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
2506 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2507 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2509 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2512 2018-07-18 Tom de Vries <tdevries@suse.de>
2514 * findvar.c (default_read_var_value): Also resolve dynamic type for
2515 LOC_OPTIMIZED_OUT vars.
2517 2018-07-18 Maciej W. Rozycki <macro@mips.com>
2519 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2522 2018-07-17 Tom Tromey <tom@tromey.com>
2524 * guile/scm-param.c (pascm_set_func, pascm_show_func)
2525 (compute_enum_list, pascm_set_param_value_x)
2526 (gdbscm_parameter_value): Update.
2527 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2528 (gdbscm_scm_to_host_string): Update.
2529 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2531 * guile/scm-cmd.c (cmdscm_add_completion): Update.
2532 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2533 * guile/scm-string.c (gdbscm_scm_to_string): Return
2535 (gdbscm_scm_to_host_string): Likewise.
2537 2018-07-17 Tom Tromey <tom@tromey.com>
2539 * guile/guile.c (gdbscm_eval_from_control_command): Update.
2540 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2541 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2542 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2545 2018-07-17 Tom Tromey <tom@tromey.com>
2547 * guile/scm-param.c (pascm_signal_setshow_error): Update.
2548 * guile/guile-internal.h (gdbscm_exception_message_to_string):
2550 * guile/scm-cmd.c (cmdscm_function): Update.
2551 * guile/scm-pretty-print.c
2552 (ppscm_print_exception_unless_memory_error): Update.
2553 * guile/scm-exception.c (gdbscm_exception_message_to_string):
2554 Return unique_xmalloc_ptr.
2556 2018-07-17 Tom Tromey <tom@tromey.com>
2558 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2561 2018-07-17 Jim Wilson <jimw@sifive.com>
2563 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2564 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
2565 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
2566 unecessary braces after EF_RISCV_RVC test. Delete call to
2567 set_gdbarch_decr_pc_after_break.
2569 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2570 RISCV_LAST_FP_REGNUM + 1.
2571 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2573 2018-07-17 Tom Tromey <tom@tromey.com>
2575 * configure.ac: Remove --disable-gdbcli.
2576 * configure: Rebuild.
2577 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2578 (SUBDIR_CLI_CFLAGS): Remove.
2579 (SFILES): Use SUBDIR_CLI_SRCS.
2580 (COMMON_OBS): Use SUBDIR_CLI_OBS.
2582 2018-07-17 Tom Tromey <tom@tromey.com>
2585 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2587 2018-07-16 Jim Wilson <jimw@sifive.com>
2589 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2591 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2593 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2595 (libunwind_frame_sniffer): Likewise.
2596 (libunwind_frame_prev_register): Likewise.
2597 (libunwind_sigtramp_frame_sniffer): Likewise.
2598 * ia64-tdep.c (ia64_access_reg): Likewise.
2599 (ia64_access_rse_reg): Likewise.
2600 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2601 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2603 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2605 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2607 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2609 * remote-sim.c (gdbsim_target::close,
2610 gdbsim_target::mourn_inferior): Remove unused variables.
2612 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
2614 * ia64-tdep.c (ktab_buf): New global.
2615 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2616 (get_kernel_table): Adjust.
2618 2018-07-16 Tom Tromey <tom@tromey.com>
2620 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2621 * dwarf2read.c (using_directives, new_symbol): Use
2622 outermost_context_p.
2623 * dbxread.c (process_one_symbol): Use outermost_context_p.
2624 * coffread.c (coff_symtab_read): Use outermost_context_p.
2626 2018-07-16 Tom Tromey <tom@tromey.com>
2628 * dwarf2read.c (using_directives, read_func_scope)
2629 (read_lexical_block_scope): Update.
2630 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2631 * buildsym.h (local_using_directives, global_using_directives):
2633 (get_local_using_directives, set_local_using_directives)
2634 (get_global_using_directives): Declare.
2635 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2636 m_global_using_directives>: New members.
2637 (finish_block_internal, prepare_for_building)
2638 (reset_symtab_globals, end_symtab_get_static_block)
2639 (push_context): Update.
2640 (get_local_using_directives, set_local_using_directives)
2641 (get_global_using_directives): New functions.
2642 (buildsym_init): Update.
2644 2018-07-16 Tom Tromey <tom@tromey.com>
2646 * xcoffread.c (xcoff_initial_scan): Don't call
2647 free_pending_blocks.
2648 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2649 * buildsym.h (class scoped_free_pendings): Add constructor.
2650 (free_pending_blocks): Don't declare.
2651 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2652 (free_pending_blocks): Now static.
2654 2018-07-16 Tom Tromey <tom@tromey.com>
2656 * buildsym.h (push_subfile, pop_subfile): Update declarations.
2657 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2659 (struct subfile_stack): Remove.
2660 (subfile_stack): Remove.
2661 (push_subfile, pop_subfile, buildsym_init): Update.
2663 2018-07-16 Tom Tromey <tom@tromey.com>
2665 * buildsym.c (push_subfile): Use gdb_assert.
2666 (pop_subfile): Use gdb_assert.
2668 2018-07-16 Tom Tromey <tom@tromey.com>
2670 * buildsym.h (merge_symbol_lists): Remove.
2671 * buildsym.c (merge_symbol_lists): Remove.
2673 2018-07-16 Tom Tromey <tom@tromey.com>
2675 * stabsread.c (scan_file_globals): Update comment.
2676 * stabsread.h (scan_file_globals): Move from buildsym.h.
2677 * buildsym.h (scan_file_globals): Move to stabsread.h.
2679 2018-07-16 Tom Tromey <tom@tromey.com>
2681 * xcoffread.c (xcoff_new_init): Update.
2682 * mipsread.c (mipscoff_new_init): Update.
2683 * mdebugread.c (mdebug_build_psymtabs): Update.
2684 * elfread.c (elf_new_init): Update.
2685 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2686 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2687 * buildsym.h (buildsym_new_init): Don't declare.
2688 * buildsym.c (buildsym_new_init): Remove.
2690 2018-07-16 Tom Tromey <tom@tromey.com>
2692 * stabsread.h (within_function): Move from buildsym.h.
2693 * stabsread.c (start_stabs): Clear within_function.
2694 * coffread.c (coff_start_symtab): Clear within_function.
2695 * buildsym.h (within_function): Move to stabsread.h.
2696 * buildsym.c (prepare_for_building): Update.
2698 2018-07-16 Tom Tromey <tom@tromey.com>
2700 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2701 * dwarf2read.c (dwarf2_start_symtab): Don't set
2702 processing_gcc_compilation.
2703 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2705 2018-07-16 Tom Tromey <tom@tromey.com>
2707 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2708 (next_symbol_text_func): Move from buildsym.h.
2709 * stabsread.c (hashname): Move from buildsym.c.
2710 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2711 (next_symbol_text_func, hashname): Move to stabsread.h.
2712 * buildsym.c: Don't include bcache.h
2713 (hashname): Move to stasbread.c.
2715 2018-07-16 Tom Tromey <tom@tromey.com>
2717 * buildsym.h (context_stack_size): Don't declare.
2718 * buildsym.c (context_stack_size): New global.
2720 2018-07-16 Tom Tromey <tom@tromey.com>
2722 * dbxread.c (processing_acc_compilation): New global.
2723 * buildsym.h (processing_acc_compilation): Don't declare.
2725 2018-07-16 Tom Tromey <tom@tromey.com>
2727 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2728 * dbxread.c (read_ofile_symtab): Update.
2729 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2730 * buildsym.h (last_source_start_addr): Remove.
2731 (set_last_source_start_addr, get_last_source_start_addr):
2733 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2735 (struct buildsym_compunit) <m_last_source_start_addr>: New
2737 (prepare_for_building): Remove start_addr parameter.
2738 (start_symtab, restart_symtab, end_symtab_get_static_block)
2739 (end_symtab_with_blockvector): Update.
2740 (set_last_source_start_addr, get_last_source_start_addr): New
2743 2018-07-16 Tom Tromey <tom@tromey.com>
2745 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2747 (have_line_numbers): Remove.
2748 (record_line, prepare_for_building, end_symtab_get_static_block)
2749 (augment_type_symtab): Update.
2751 2018-07-16 Tom Tromey <tom@tromey.com>
2753 * buildsym.c (~buildsym_compunit): Free the macro table.
2754 (struct buildsym_compunit) <get_macro_table, release_macros>: New
2756 <m_pending_macros>: New member.
2757 (pending_macros): Remove.
2758 (~scoped_free_pendings, get_macro_table, prepare_for_building)
2759 (reset_symtab_globals, end_symtab_get_static_block)
2760 (end_symtab_with_blockvector, augment_type_symtab)
2761 (buildsym_init): Update.
2763 2018-07-16 Tom Tromey <tom@tromey.com>
2765 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2767 (buildsym_compunit::set_last_source_file): New method.
2768 <m_last_source_file>: New member.
2769 (prepare_for_building): Remove "name" parameter.
2770 (start_symtab, restart_symtab, reset_symtab_globals): Update.
2771 (last_source_file): Remove.
2772 (set_last_source_file, get_last_source_file): Update.
2774 2018-07-16 Tom Tromey <tom@tromey.com>
2776 * buildsym.c (prepare_for_building): Add assert.
2778 2018-07-16 Tom Tromey <tom@tromey.com>
2780 * buildsym.c (~buildsym_compunit): Update.
2781 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2782 (start_subfile, patch_subfile_names)
2783 (end_symtab_with_blockvector): Update.
2785 2018-07-16 Tom Tromey <tom@tromey.com>
2787 * buildsym.c (struct buildsym_compunit): Add constructor,
2788 destructor, initializers.
2789 (start_buildsym_compunit): Remove.
2790 (free_buildsym_compunit): Use "delete".
2791 (start_symtab, restart_symtab): Use "new".
2793 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
2795 * symfile.c (set_objfile_default_section_offset): Remove struct
2798 2018-07-14 Stafford Horne <shorne@gmail.com>
2800 * (Responsible Maintainers): Add myself as or1k maintainer.
2802 2018-07-13 Tom Tromey <tom@tromey.com>
2804 * symfile.c (set_objfile_default_section_offset): Use extra braces
2807 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2809 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2812 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2814 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2815 unittests/cli-utils-selftests.c
2816 * unittests/cli-utils-selftests.c: New file.
2818 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2820 * NEWS: Mention new commands. Mention change to 'thread apply'.
2822 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2824 * thread.c (thr_try_catch_cmd): New function.
2825 (thread_apply_all_command): Handle qcs flags.
2826 (thread_apply_command): Handle qcs flags.
2827 (taas_command): New function.
2828 (tfaas_command): New function.
2829 (_initialize_thread): Update to setup the new commands 'taas
2830 and 'tfaas'. Change doc string for 'thread apply'.
2832 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2834 * stack.c: (trailing_outermost_frame): New function, mostly
2835 extracted from backtrace_command_1.
2836 (leading_innermost_frame): New function.
2837 (backtrace_command_1): Update to call trailing_outermost_frame.
2838 (frame_apply_command_count): New function.
2839 (frame_apply_level_command): New function.
2840 (frame_apply_all_command): New function.
2841 (frame_apply_command): New function.
2842 (faas_command): New function.
2843 (frame_cmd_list): New variable.
2844 (_initialize_stack): Update to setup the new commands 'frame apply'
2847 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2849 * cli-utils.c (number_or_range_parser::get_number): Only handle
2850 numbers or convenience var as numbers.
2851 (parse_flags): New function.
2852 (parse_flags_qcs): New function.
2853 (number_or_range_parser::finished): Ensure parsing end is detected
2854 before end of string.
2855 * cli-utils.h (parse_flags): New function.
2856 (parse_flags_qcs): New function.
2857 (number_or_range_parser): Remove m_finished bool.
2858 (number_or_range_parser::skip_range): Set m_in_range to false.
2860 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
2862 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2865 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2866 Jan Kratochvil <jan.kratochvil@redhat.com>
2867 Paul Fertser <fercerpav@gmail.com>
2868 Tsutomu Seki <sekiriki@gmail.com>
2869 Pedro Alves <palves@redhat.com>
2871 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2872 'unittests/parse-connection-spec-selftests.c'.
2873 (COMMON_SFILES): Add 'common/netstuff.c'.
2874 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2875 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2876 * common/netstuff.c: New file.
2877 * common/netstuff.h: New file.
2878 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2879 (wait_for_connect): Update comment. New parameter
2880 'gdb::optional<int> sock' instead of 'struct serial *scb'.
2881 Use 'sock' directly instead of 'scb->fd'.
2882 (try_connect): New function, with code from 'net_open'.
2883 (net_open): Rewrite main loop to deal with multiple
2884 sockets/addresses. Handle IPv6-style hostnames; implement
2885 support for IPv6 connections.
2886 * unittests/parse-connection-spec-selftests.c: New file.
2888 2018-07-11 Pedro Alves <palves@redhat.com>
2891 * remote.c (remote_target::remote_detach_pid): Call
2892 set_current_process.
2894 2018-07-11 Pedro Alves <palves@redhat.com>
2896 * h8300-tdep.c (h8300_gdbarch_init): Remove
2897 set_gdbarch_ecoff_reg_to_regnum calls.
2899 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2902 * c-typeprint.c (c_type_print_base_struct_union): Don't print
2903 offsets/sizes for static members of a class/struct.
2905 2018-07-11 Alan Hayward <alan.hayward@arm.com>
2907 * target-descriptions.c (tdesc_register_bitsize): Rename.
2908 * target-descriptions.h (tdesc_register_bitsize): Likewise.
2909 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2910 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2912 2018-07-10 Tom Tromey <tom@tromey.com>
2914 * breakpoint.c (moribund_locations): Now static and a
2916 (breakpoint_init_inferior, moribund_breakpoint_here_p)
2917 (build_bpstat_chain, update_global_location_list)
2918 (breakpoint_retire_moribund): Update.
2919 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
2922 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2924 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2925 (riscv_register_reggroup_p): Use new function, remove unneeded
2927 (riscv_push_dummy_call): Extend assert to compare against xlen or
2928 flen based on register type.
2930 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2932 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2934 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
2936 * remote.c (show_hardware_watchpoint_limit): New function.
2937 (show_hardware_watchpoint_length_limit): New function.
2938 (show_hardware_breakpoint_limit): New function.
2939 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2940 where appropriate, update help text.
2942 2018-07-09 Tom Tromey <tom@tromey.com>
2944 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2945 (CLIBS): Don't mention NAT_CLIBS.
2947 2018-07-09 Tom Tromey <tom@tromey.com>
2949 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2950 (LIBGDB_OBS, clean mostlyclean): Update.
2951 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2953 2018-07-09 Tom Tromey <tom@tromey.com>
2955 * Makefile.in (%.c: %.y): Use ECHO_YACC.
2956 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
2957 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2959 2018-07-09 Tom Tromey <tom@tromey.com>
2961 * Makefile.in (ALLDEPFILES): Remove exec.c.
2962 (COMMON_OBS): Remove exec.o.
2963 (COMMON_SFILES): Add exec.c.
2965 2018-07-09 Tom Tromey <tom@tromey.com>
2967 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2969 2018-07-09 Tom Tromey <tom@tromey.com>
2971 * Makefile.in (clean mostlyclean): Remove stamp-version.
2972 (version.c): Depend on stamp-version.
2973 (stamp-version): New rule, from version.c rule.
2975 2018-07-09 Tom Tromey <tom@tromey.com>
2977 * Makefile.in (init.c): Depend on stamp-init.
2978 (stamp-init): New rule, from init.c rule.
2979 (clean mostlyclean): Remove stamp-init.
2981 2018-07-09 Tom Tromey <tom@tromey.com>
2983 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2984 SUBDIR_GCC_COMPILE_SRCS.
2986 2018-07-09 Tom Tromey <tom@tromey.com>
2988 * Makefile.in (init.c): Remove some unused sed rules.
2990 2018-07-09 Tom Tromey <tom@tromey.com>
2992 * Makefile.in (TSOBS): Remove.
2993 (INIT_FILES): Update.
2994 (LIBGDB_OBS): Update.
2995 (COMMON_SFILES): Add inflow.c.
2996 (SFILES): Remove inflow.c.
2998 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3000 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3002 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
3004 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3005 get_saveloc_name, is_signal_frame_name, step_name,
3006 init_remote_name, create_addr_space_name,
3007 destroy_addr_space_name, search_unwind_table_name,
3008 find_dyn_list_name): Constify.
3010 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
3012 * darwin-nat.c (darwin_pthread_kill): New function.
3013 (darwin_resume_thread): Use darwin_pthread_kill.
3015 2018-07-05 Tom de Vries <tdevries@suse.de>
3017 * macroexp.c (macro_buffer) <operator=>: New member function.
3019 2018-07-04 Tom Tromey <tom@tromey.com>
3021 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3023 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
3025 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3026 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3027 * maint.c: Likewise.
3030 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3032 * NEWS: Create a new section for the next release branch.
3033 Rename the section of the current branch, now that it has
3036 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3038 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3039 * version.in: Bump version to 8.2.50.DATE-git.
3041 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
3042 Pedro Alves <palves@redhat.com>
3044 * linux-nat.c (linux_init_ptrace): Rename to ...
3045 (linux_init_ptrace_procfs): ... this. Call
3046 linux_proc_init_warnings.
3047 (linux_nat_target::post_attach)
3048 (linux_nat_target::post_startup_inferior): Adjust.
3049 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3050 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3052 2018-07-04 Tom de Vries <tdevries@suse.de>
3054 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3056 (read_comp_unit_head): ... here.
3058 2018-07-03 Tom Tromey <tom@tromey.com>
3060 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3061 (stop_tracing, tstatus_command)
3062 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3063 (print_one_static_tracepoint_marker): Update.
3064 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3066 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
3068 (all_tracepoints, static_tracepoints_here): Return std::vector.
3070 2018-07-03 Tom Tromey <tom@tromey.com>
3072 * common/ptid.c (ptid_equal): Remove.
3073 * common/ptid.h (ptid_equal): Don't declare.
3074 * ada-tasks.c: Update.
3075 * breakpoint.c: Update.
3076 * common/agent.c: Update.
3077 * corelow.c: Update.
3078 * darwin-nat-info.c: Update.
3079 * darwin-nat.c: Update.
3081 * dtrace-probe.c: Update.
3082 * dummy-frame.c: Update.
3083 * fbsd-nat.c: Update.
3085 * gdbthread.h: Update.
3086 * gnu-nat.c: Update.
3087 * go32-nat.c: Update.
3088 * inf-loop.c: Update.
3089 * inf-ptrace.c: Update.
3090 * infcall.c: Update.
3094 * linux-fork.c: Update.
3095 * linux-nat.c: Update.
3096 * linux-thread-db.c: Update.
3097 * mi/mi-cmd-var.c: Update.
3098 * mi/mi-interp.c: Update.
3099 * mi/mi-main.c: Update.
3100 * nto-procfs.c: Update.
3101 * ppc-linux-tdep.c: Update.
3103 * python/py-inferior.c: Update.
3104 * python/py-record-btrace.c: Update.
3105 * python/py-record.c: Update.
3106 * ravenscar-thread.c: Update.
3107 * regcache.c: Update.
3108 * remote-sim.c: Update.
3110 * sol-thread.c: Update.
3113 * tui/tui-stack.c: Update.
3115 * windows-nat.c: Update.
3116 * windows-tdep.c: Update.
3118 2018-07-03 Tom Tromey <tom@tromey.com>
3120 * common/ptid.c (ptid_match): Remove.
3121 * common/ptid.h (ptid_match): Don't declare.
3122 * fbsd-nat.c: Update.
3125 * linux-nat.c: Update.
3126 * record-btrace.c: Update.
3127 * regcache.c: Update.
3130 2018-07-03 Tom Tromey <tom@tromey.com>
3132 * common/ptid.c (ptid_tid_p): Remove.
3133 * common/ptid.h (ptid_tid_p): Don't declare.
3134 * sol-thread.c: Update.
3136 2018-07-03 Tom Tromey <tom@tromey.com>
3138 * common/ptid.c (ptid_lwp_p): Remove.
3139 * common/ptid.h (ptid_lwp_p): Don't declare.
3140 * fbsd-nat.c: Update.
3141 * linux-nat.c: Update.
3142 * nat/linux-procfs.c: Update.
3143 * nat/x86-linux-dregs.c: Update.
3144 * sol-thread.c: Update.
3146 2018-07-03 Tom Tromey <tom@tromey.com>
3148 * common/ptid.c (ptid_is_pid): Remove.
3149 * common/ptid.h (ptid_is_pid): Don't declare.
3151 * linux-nat.c: Update.
3152 * mi/mi-interp.c: Update.
3156 2018-07-03 Tom Tromey <tom@tromey.com>
3158 * common/ptid.c (ptid_get_tid): Remove.
3159 * common/ptid.h (ptid_get_tid): Don't declare.
3160 * ada-tasks.c: Update.
3161 * aix-thread.c: Update.
3162 * bsd-uthread.c: Update.
3163 * darwin-nat.c: Update.
3164 * fbsd-nat.c: Update.
3165 * i386-darwin-nat.c: Update.
3167 * linux-tdep.c: Update.
3168 * nto-procfs.c: Update.
3169 * ppc-ravenscar-thread.c: Update.
3170 * python/py-infthread.c: Update.
3171 * ravenscar-thread.c: Update.
3172 * sol-thread.c: Update.
3173 * sparc-ravenscar-thread.c: Update.
3174 * windows-nat.c: Update.
3176 2018-07-03 Tom Tromey <tom@tromey.com>
3178 * common/ptid.c (ptid_get_lwp): Remove.
3179 * common/ptid.h (ptid_get_lwp): Don't declare.
3180 * aarch64-linux-nat.c: Update.
3181 * ada-tasks.c: Update.
3182 * aix-thread.c: Update.
3183 * amd64-linux-nat.c: Update.
3184 * arm-linux-nat.c: Update.
3185 * corelow.c: Update.
3186 * fbsd-nat.c: Update.
3187 * fbsd-tdep.c: Update.
3188 * gnu-nat.c: Update.
3189 * i386-cygwin-tdep.c: Update.
3190 * i386-gnu-nat.c: Update.
3191 * i386-linux-nat.c: Update.
3192 * ia64-linux-nat.c: Update.
3193 * inf-ptrace.c: Update.
3195 * linux-fork.c: Update.
3196 * linux-nat.c: Update.
3197 * linux-tdep.c: Update.
3198 * linux-thread-db.c: Update.
3199 * mips-linux-nat.c: Update.
3200 * nat/aarch64-linux-hw-point.c: Update.
3201 * nat/aarch64-linux.c: Update.
3202 * nat/linux-btrace.c: Update.
3203 * nat/linux-osdata.c: Update.
3204 * nat/linux-procfs.c: Update.
3205 * nat/x86-linux-dregs.c: Update.
3206 * obsd-nat.c: Update.
3207 * ppc-fbsd-nat.c: Update.
3208 * ppc-linux-nat.c: Update.
3210 * python/py-infthread.c: Update.
3211 * ravenscar-thread.c: Update.
3213 * s390-linux-nat.c: Update.
3214 * sol-thread.c: Update.
3215 * sol2-tdep.c: Update.
3216 * spu-linux-nat.c: Update.
3217 * x86-linux-nat.c: Update.
3218 * xtensa-linux-nat.c: Update.
3220 2018-07-03 Tom Tromey <tom@tromey.com>
3222 * common/ptid.c (ptid_get_pid): Remove.
3223 * common/ptid.h (ptid_get_pid): Don't declare.
3224 * aarch64-linux-nat.c: Update.
3225 * ada-lang.c: Update.
3226 * aix-thread.c: Update.
3227 * alpha-bsd-nat.c: Update.
3228 * amd64-fbsd-nat.c: Update.
3229 * amd64-linux-nat.c: Update.
3230 * arm-linux-nat.c: Update.
3231 * arm-nbsd-nat.c: Update.
3233 * break-catch-syscall.c: Update.
3234 * breakpoint.c: Update.
3235 * bsd-uthread.c: Update.
3236 * corelow.c: Update.
3238 * darwin-nat.c: Update.
3239 * fbsd-nat.c: Update.
3240 * fbsd-tdep.c: Update.
3242 * gnu-nat.c: Update.
3243 * hppa-nbsd-nat.c: Update.
3244 * hppa-obsd-nat.c: Update.
3245 * i386-fbsd-nat.c: Update.
3246 * ia64-linux-nat.c: Update.
3247 * inf-ptrace.c: Update.
3249 * inferior.c: Update.
3250 * inferior.h: Update.
3253 * linux-fork.c: Update.
3254 * linux-nat.c: Update.
3255 * linux-tdep.c: Update.
3256 * linux-thread-db.c: Update.
3257 * m68k-bsd-nat.c: Update.
3258 * mi/mi-interp.c: Update.
3259 * mi/mi-main.c: Update.
3260 * mips-linux-nat.c: Update.
3261 * mips-nbsd-nat.c: Update.
3262 * mips64-obsd-nat.c: Update.
3263 * nat/aarch64-linux-hw-point.c: Update.
3264 * nat/aarch64-linux.c: Update.
3265 * nat/linux-btrace.c: Update.
3266 * nat/linux-osdata.c: Update.
3267 * nat/linux-procfs.c: Update.
3268 * nat/x86-linux-dregs.c: Update.
3269 * nto-procfs.c: Update.
3270 * obsd-nat.c: Update.
3271 * ppc-linux-nat.c: Update.
3272 * ppc-nbsd-nat.c: Update.
3273 * ppc-obsd-nat.c: Update.
3274 * proc-service.c: Update.
3276 * python/py-inferior.c: Update.
3277 * python/py-infthread.c: Update.
3278 * ravenscar-thread.c: Update.
3280 * remote-sim.c: Update.
3282 * rs6000-nat.c: Update.
3283 * s390-linux-nat.c: Update.
3284 * sh-nbsd-nat.c: Update.
3285 * sol-thread.c: Update.
3286 * sparc-nat.c: Update.
3287 * sparc64-tdep.c: Update.
3288 * spu-linux-nat.c: Update.
3289 * spu-tdep.c: Update.
3290 * target-debug.h: Update.
3293 * tid-parse.c: Update.
3294 * tracefile-tfile.c: Update.
3295 * vax-bsd-nat.c: Update.
3296 * windows-nat.c: Update.
3297 * x86-linux-nat.c: Update.
3298 * x86-nat.c: Update.
3300 2018-07-03 Tom Tromey <tom@tromey.com>
3302 * common/ptid.c (pid_to_ptid): Remove.
3303 * common/ptid.h (pid_to_ptid): Don't declare.
3304 * aix-thread.c: Update.
3305 * arm-linux-nat.c: Update.
3306 * common/ptid.c: Update.
3307 * common/ptid.h: Update.
3308 * corelow.c: Update.
3310 * darwin-nat.c: Update.
3311 * fbsd-nat.c: Update.
3312 * fork-child.c: Update.
3313 * gnu-nat.c: Update.
3314 * go32-nat.c: Update.
3315 * inf-ptrace.c: Update.
3317 * inferior.c: Update.
3319 * linux-fork.c: Update.
3320 * linux-nat.c: Update.
3321 * nat/aarch64-linux-hw-point.c: Update.
3322 * nat/fork-inferior.c: Update.
3323 * nat/x86-linux-dregs.c: Update.
3324 * nto-procfs.c: Update.
3325 * obsd-nat.c: Update.
3327 * progspace.c: Update.
3329 * rs6000-nat.c: Update.
3330 * s390-linux-nat.c: Update.
3331 * sol-thread.c: Update.
3332 * spu-linux-nat.c: Update.
3335 * tracefile-tfile.c: Update.
3336 * windows-nat.c: Update.
3338 2018-07-03 Tom Tromey <tom@tromey.com>
3340 * common/ptid.h (ptid_build): Don't declare.
3341 * common/ptid.c (ptid_build): Remove.
3342 * aix-thread.c: Update.
3343 * bsd-kvm.c: Update.
3344 * bsd-uthread.c: Update.
3345 * common/agent.c: Update.
3346 * common/ptid.c: Update.
3347 * common/ptid.h: Update.
3348 * corelow.c: Update.
3349 * darwin-nat.c: Update.
3350 * fbsd-nat.c: Update.
3351 * gnu-nat.c: Update.
3352 * linux-fork.c: Update.
3353 * linux-nat.c: Update.
3354 * linux-thread-db.c: Update.
3355 * nat/linux-osdata.c: Update.
3356 * nat/linux-procfs.c: Update.
3357 * nto-procfs.c: Update.
3358 * obsd-nat.c: Update.
3359 * proc-service.c: Update.
3361 * ravenscar-thread.c: Update.
3362 * remote-sim.c: Update.
3364 * sol-thread.c: Update.
3366 * windows-nat.c: Update.
3368 2018-07-03 Tom Tromey <tom@tromey.com>
3370 * infrun.c (follow_exec): Use exit_inferior_silent.
3371 * inferior.c (exit_inferior_num_silent): Remove.
3372 * inferior.h (exit_inferior_num_silent): Don't declare.
3374 2018-07-03 Tom Tromey <tom@tromey.com>
3377 * darwin-nat.c (darwin_attach_pid): Reset inferior and
3378 inferior_ptid on error.
3380 2018-07-02 Maciej W. Rozycki <macro@mips.com>
3381 Simon Marchi <simon.marchi@polymtl.ca>
3384 * disasm.h (gdb_disassembler): Add
3385 `m_disassembler_options_holder'. member
3386 * disasm.c (get_all_disassembler_options): New function.
3387 (gdb_disassembler::gdb_disassembler): Use it.
3388 (gdb_buffered_insn_length_init_dis): Likewise.
3389 (gdb_buffered_insn_length): Adjust accordingly.
3390 (set_disassembler_options): Handle options with arguments.
3391 (show_disassembler_options_sfunc): Likewise. Add a leading new
3392 line if showing options with descriptions.
3393 (disassembler_options_completer): Adapt to using the
3394 `disasm_options_and_args_t' structure.
3395 * mips-tdep.c (mips_disassembler_options): New variable.
3396 (mips_disassembler_options_o32): Likewise.
3397 (mips_disassembler_options_n32): Likewise.
3398 (mips_disassembler_options_n64): Likewise.
3399 (gdb_print_insn_mips): Don't set `disassembler_options'.
3400 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3402 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3403 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
3404 `gdbarch_disassembler_options_implicit' and
3405 `gdbarch_valid_disassembler_options'.
3406 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3407 `disasm_options_and_args_t' structure.
3408 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3410 (valid_disassembler_options): Switch from `disasm_options_t' to
3411 the `disasm_options_and_args_t' structure.
3412 * NEWS: Document `set disassembler-options' support for the MIPS
3414 * gdbarch.h: Regenerate.
3415 * gdbarch.c: Regenerate.
3417 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
3419 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3421 2018-06-29 Joel Brobecker <brobecker@adacore.com>
3423 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3424 parameter in call to amd64_target_description.
3425 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3426 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3427 (amd64fbsd_init_abi): Likewise.
3428 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3429 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3430 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3431 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3433 2018-06-29 Pedro Alves <palves@redhat.com>
3435 * gdb/amd64-tdep.h (amd64_create_target_description): Add
3436 "segments" parameter.
3437 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3438 (_initialize_amd64_tdep): Update call to
3439 amd64_create_target_description.
3440 (amd64_target_description): Add "segments" parameter. Adjust
3441 the implementation to use it.
3442 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3443 call to amd64_create_target_description.
3444 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3445 * gdb/arch/amd64.h (amd64_create_target_description): Add
3446 "segments" register.
3447 * gdb/arch/amd64.c (amd64_create_target_description): Add
3448 "segments" parameter. Call create_feature_i386_64bit_segments
3449 only if SEGMENTS is true.
3450 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3451 call to amd64_create_target_description.
3453 2018-06-29 Pedro Alves <palves@redhat.com>
3455 * thread.c (thread_target_id_str): New, factored out from ...
3456 (print_thread_info_1): ... here. Use it to compute the max
3457 "Target Id" column width.
3459 2018-06-29 Pedro Alves <palves@redhat.com>
3461 * remote.c (remote_target::extra_thread_info): Delete
3462 'display_buf' and 'n' locals. from the cache, regardless of
3463 packet mechanims is in use. Use cache for qThreadExtra and qP
3466 2018-06-29 Pedro Alves <palves@redhat.com>
3468 * blockframe.c (find_pc_sect_containing_function): New function.
3469 * breakpoint.c (print_breakpoint_location): Don't call
3470 find_pc_sect_function.
3471 * linespec.c (create_sals_line_offset): Record the location's
3473 * linespec.c (convert_address_location_to_sals): Fill in sal's
3474 symbol with find_pc_sect_containing_function.
3475 * symtab.c (find_function_start_sal): Rename to ...
3476 (find_function_start_sal_1): ... this.
3477 (find_function_start_sal): Reimplement as wrapper around
3478 find_function_start_sal_1, and use
3479 find_pc_sect_containing_function to fill in the sal's symbol.
3480 (find_function_start_sal(symbol*, bool)): Adjust.
3481 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3483 (find_pc_sect_containing_function): Declare.
3485 2018-06-29 Pedro Alves <palves@redhat.com>
3487 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3488 true if the the location has no symbol.
3490 2018-06-28 Tom Tromey <tom@tromey.com>
3492 * NEWS: Mention --enable-codesign.
3493 * silent-rules.mk (ECHO_SIGN): New variable.
3494 * configure.ac: Add --enable-codesign.
3495 * configure: Rebuild.
3496 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3497 (gdb$(EXEEXT)): Optionally invoke codesign.
3499 2018-06-28 Pedro Alves <palves@redhat.com>
3501 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3503 (switch_to_thread_no_regs): Adjust comment.
3504 * infcmd.c (stop_pc): Delete.
3505 (post_create_inferior, info_program_command): Replace references
3506 to stop_pc with references to thread_info->suspend.stop_pc.
3507 * inferior.h (stop_pc): Delete declaration.
3508 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3509 (handle_inferior_event_1, handle_signal_stop)
3510 (process_event_stop_test, keep_going_stepped_thread)
3511 (handle_step_into_function, handle_step_into_function_backward)
3512 (print_stop_location): Replace references to stop_pc with
3513 references to thread_info->suspend.stop_pc.
3514 (struct infcall_suspend_state) <stop_pc>: Delete field.
3515 (save_infcall_suspend_state, restore_infcall_suspend_state):
3516 Remove references to inf_stat->stop_pc.
3517 * linux-fork.c (fork_load_infrun_state): Likewise.
3518 * record-btrace.c (record_btrace_set_replay): Likewise.
3519 * record-full.c (record_full_goto_entry): Likewise.
3520 * remote.c (print_one_stopped_thread): Likewise.
3521 * target.c (target_resume): Extend comment.
3522 * thread.c (set_executing_thread): New.
3523 (set_executing): Use it.
3524 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3525 Remove references to stop_pc.
3527 2018-06-28 Pedro Alves <palves@redhat.com>
3529 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3530 Moving fetching stop_pc until after ecs->event_thread is refreshed.
3532 2018-06-28 Tom Tromey <tom@tromey.com>
3534 * coffread.c (coff_symfile_finish): Update.
3535 * xcoffread.c (xcoff_symfile_finish): Update.
3536 * elfread.c (elf_symfile_finish): Update.
3537 * symfile.h (dwarf2_free_objfile): Don't declare.
3538 * dwarf2read.c (_initialize_dwarf2_read): Use
3539 register_objfile_data_with_cleanup.
3540 (dwarf2_free_objfile): Now static. Change signature.
3542 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3544 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3545 option "-o" to add-symbol-file-load to add an offset to each
3546 section's load address.
3547 * symfile.c (set_objfile_default_section_offset): New function.
3549 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3551 * symfile.c (add_symbol_file_command): Make sure that sections
3552 with the same name are sorted in the same order.
3554 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3556 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3557 require the second argument. If omitted, load sections at the
3558 addresses specified in the file.
3560 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3562 * symfile.c (symbol_file_command, symbol_file_add_main_1)
3563 (_initialize_symfile): Add option "-o" to symbol-file to add an
3564 offset to each section of the symbol file.
3566 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3568 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3570 2018-06-27 Tom Tromey <tom@tromey.com>
3572 * stack.c (_initialize_stack): Update "func" help text.
3574 2018-06-27 Tom Tromey <tom@tromey.com>
3576 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3578 (unwind_infopy_str, pyuw_create_unwind_info)
3579 (unwind_infopy_add_saved_register, pyuw_sniffer)
3580 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3582 (struct saved_reg): Add constructor.
3583 <value>: Now a gdbpy_ref<>.
3585 2018-06-27 Tom Tromey <tom@tromey.com>
3587 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3589 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3591 * gdb-gdb.py.in: Format using autopep8.
3593 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3595 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3596 (type_lookup_function): Recognize CORE_ADDR values.
3598 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3600 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3603 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3605 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3608 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3610 * gdb-gdb.py: Move to...
3611 * gdb-gdb.py.in: ... here.
3612 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3613 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3615 (distclean): Remove gdb-gdb.py when cleaning.
3616 (gdb-gdb.py, gdb-gdb.gdb): New rules.
3617 * configure: Re-generate.
3619 2018-06-27 Pedro Alves <palves@redhat.com>
3621 * proc-service.c (get_ps_regcache): New.
3622 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3623 (ps_lsetfpregs): Use it.
3625 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
3628 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3629 (dwarf_decode_lines_1): Adjust.
3631 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3633 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3635 <info_proc>: Likewise.
3637 2018-06-26 Joel Brobecker <brobecker@adacore.com>
3639 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3640 to windows_fetch_one_register, and only handle the case of
3641 fetching one register. Move the code that reloads the context
3642 and iterates over all registers if R is negative to...
3643 (windows_nat_target::fetch_registers): ... here.
3644 (do_windows_store_inferior_registers): Rename to
3645 windows_store_one_register, and only handle the case of storing
3646 one register. Move the code that handles the case where r is
3648 (windows_nat_target::store_registers) ... here.
3650 2018-06-26 Tom Tromey <tom@tromey.com>
3653 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3654 * rust-lang.c (rust_print_struct_def): Add podata parameter.
3656 (rust_internal_print_type): Add podata parameter.
3657 (rust_print_type): Update.
3659 2018-06-26 Tom Tromey <tom@tromey.com>
3661 * typeprint.h (struct print_offset_data) <update, finish,
3662 maybe_print_hole>: New methods.
3663 <indentation>: New constant.
3664 * typeprint.c (print_offset_data::indentation): Define.
3665 (print_offset_data::maybe_print_hole, print_offset_data::update)
3666 (print_offset_data::finish): Move from c-typeprint.c and rename.
3667 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3668 (print_spaces_filtered_with_print_options): Update.
3669 (c_print_type_union_field_offset, maybe_print_hole)
3670 (c_print_type_struct_field_offset): Move to typeprint.c and
3672 (c_type_print_base_struct_union): Update.
3674 2018-06-25 Pedro Alves <palves@redhat.com>
3676 * gdbthread.h (thread_info_ref, delete_thread)
3677 (delete_thread_silent, first_thread_of_inferior)
3678 (any_thread_of_inferior, switch_to_thread)
3679 (enable_thread_stack_temporaries)
3680 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3681 (get_last_thread_stack_temporary)
3682 (value_in_thread_stack_temporaries, can_access_registers_thread):
3683 Spell out "struct thread_info" instead of just "thread_info".
3684 * inferior.h (notice_new_inferior): Likewise.
3686 2018-06-25 Pedro Alves <palves@redhat.com>
3688 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3689 pass thread_info pointer to delete_thread.
3690 (windows_nat_target::detach): Pass inferior pointer to
3692 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3694 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3695 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3696 and pass a thread_info pointer to delete_thread.
3697 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3698 pass thread_info pointer to delete_thread.
3699 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3700 delete_thread_silent call.
3701 * procfs.c (procfs_target::detach): Pass inferior pointer to
3703 (procfs_target::wait): Pass thread_info pointer to delete_thread.
3704 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3705 delete_thread_silent call.
3706 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3707 pass thread_info pointer to delete_thread.
3708 (windows_nat_target::detach): Pass inferior pointer to
3711 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3713 * regcache.c (readable_regcache::read_part): Fix asserts.
3714 (reg_buffer::raw_collect_part): New function.
3715 (regcache::write_part): Fix asserts.
3716 (reg_buffer::raw_supply_part): New function.
3717 (regcache::transfer_regset_register): New helper function.
3718 (regcache::transfer_regset): Call new functions.
3719 (regcache_supply_regset): Use gdb_byte*.
3720 (regcache::supply_regset): Likewise.
3721 (regcache_collect_regset): Likewise.
3722 (regcache::collect_regset): Likewise.
3723 * regcache.h (reg_buffer::raw_collect_part): New declaration.
3724 (reg_buffer::raw_supply_part): Likewise.
3725 (regcache::transfer_regset_register): Likewise.
3726 (regcache::transfer_regset): Use gdb_byte*.
3728 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3730 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3732 2018-06-21 Pedro Alves <palves@redhat.com>
3734 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3735 instead of a ptid_t. All callers adjusted.
3736 * ada-tasks.c (ada_get_task_number): Likewise. All callers
3738 (print_ada_task_info, display_current_task_id, task_command_1):
3740 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3742 (breakpoint_kind): Adjust.
3743 (remove_breakpoints_pid): Rename to ...
3744 (remove_breakpoints_inf): ... this. Adjust to take an inferior
3745 pointer. All callers adjusted.
3746 (bpstat_clear_actions): Use inferior_thread.
3747 (get_bpstat_thread): New.
3748 (bpstat_do_actions): Use it.
3749 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3750 to take a thread_info pointer. All callers adjusted.
3751 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3752 (breakpoint_re_set_thread): Use inferior_thread.
3753 * breakpoint.h (struct inferior): Forward declare.
3754 (bpstat_stop_status): Update.
3755 (remove_breakpoints_pid): Delete.
3756 (remove_breakpoints_inf): New.
3757 * bsd-uthread.c (bsd_uthread_target::wait)
3758 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3759 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3760 (maint_btrace_packet_history_cmd)
3761 (maint_btrace_clear_packet_history_cmd): Adjust.
3762 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3764 * cli/cli-interp.c: Include "inferior.h".
3765 * common/refcounted-object.h (struct
3766 refcounted_object_ref_policy): New.
3767 * compile/compile-object-load.c: Include gdbthread.h.
3768 (store_regs): Use inferior_thread.
3769 * corelow.c (core_target::close): Use current_inferior.
3770 (core_target_open): Adjust to use first_thread_of_inferior and use
3771 the current inferior.
3772 * ctf.c (ctf_target::close): Adjust to use current_inferior.
3773 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3774 <thread>: ... this new field. All references adjusted.
3775 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3776 Take a thread_info pointer instead of a ptid_t.
3777 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3778 (dummy_frame_discard, register_dummy_frame_dtor): Take a
3779 thread_info pointer instead of a ptid_t.
3780 * elfread.c: Include "inferior.h".
3781 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3782 Use inferior_thread.
3783 * eval.c (evaluate_subexp): Likewise.
3784 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3786 * gdb_proc_service.h (struct thread_info): Forward declare.
3787 (struct ps_prochandle) <ptid>: Delete, replaced by ...
3788 <thread>: ... this new field. All references adjusted.
3789 * gdbarch.h, gdbarch.c: Regenerate.
3790 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3791 'thread' parameter. All implementations and callers adjusted.
3792 * gdbthread.h (thread_info) <set_running>: New method.
3793 (delete_thread, delete_thread_silent): Take a thread_info pointer
3795 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3796 (first_thread_of_process): Delete, replaced by ...
3797 (first_thread_of_inferior): ... this new function. All callers
3799 (any_live_thread_of_process): Delete, replaced by ...
3800 (any_live_thread_of_inferior): ... this new function. All callers
3802 (switch_to_thread, switch_to_no_thread): Declare.
3803 (is_executing): Delete.
3804 (enable_thread_stack_temporaries): Update comment.
3805 <enable_thread_stack_temporaries>: Take a thread_info pointer
3806 instead of a ptid_t. Incref the thread.
3807 <~enable_thread_stack_temporaries>: Decref the thread.
3810 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3811 (get_last_thread_stack_temporary)
3812 (value_in_thread_stack_temporaries, can_access_registers_thread):
3813 Take a thread_info pointer instead of a ptid_t. All callers
3815 * infcall.c (get_call_return_value): Use inferior_thread.
3816 (run_inferior_call): Work with thread pointers instead of ptid_t.
3817 (call_function_by_hand_dummy): Work with thread pointers instead
3818 of ptid_t. Use thread_info_ref.
3819 * infcmd.c (proceed_thread_callback): Access thread's state
3821 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3822 access thread's state directly.
3823 (continue_command): Use inferior_thread.
3824 (info_program_command): Use find_thread_ptid and access thread
3826 (proceed_after_attach_callback): Use thread state directly.
3827 (notice_new_inferior): Take a thread_info pointer instead of a
3828 ptid_t. All callers adjusted.
3829 (exit_inferior): Take an inferior pointer instead of a pid. All
3831 (exit_inferior_silent): New.
3832 (detach_inferior): Delete.
3833 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3834 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3835 (detach_inferior_command, kill_inferior_command): Use
3836 find_inferior_id instead of valid_gdb_inferior_id and
3837 gdb_inferior_id_to_pid.
3838 (inferior_command): Use inferior and thread pointers.
3839 * inferior.h (struct thread_info): Forward declare.
3840 (notice_new_inferior): Take a thread_info pointer instead of a
3841 ptid_t. All callers adjusted.
3842 (detach_inferior): Delete declaration.
3843 (exit_inferior, exit_inferior_silent): Take an inferior pointer
3844 instead of a pid. All callers adjusted.
3845 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3846 (valid_gdb_inferior_id): Delete.
3847 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3848 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3849 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3851 <inf>: ... this new field.
3852 <step_ptid>: Delete, replaced by ...
3853 <step_thread>: ... this new field.
3854 (get_displaced_stepping_state): Take an inferior pointer instead
3855 of a pid. All callers adjusted.
3856 (displaced_step_in_progress_any_inferior): Adjust.
3857 (displaced_step_in_progress_thread): Take a thread pointer instead
3858 of a ptid_t. All callers adjusted.
3859 (displaced_step_in_progress, add_displaced_stepping_state): Take
3860 an inferior pointer instead of a pid. All callers adjusted.
3861 (get_displaced_step_closure_by_addr): Adjust.
3862 (remove_displaced_stepping_state): Take an inferior pointer
3863 instead of a pid. All callers adjusted.
3864 (displaced_step_prepare_throw, displaced_step_prepare)
3865 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3866 All callers adjusted.
3867 (start_step_over): Adjust.
3868 (infrun_thread_ptid_changed): Remove bit updating ptids in the
3869 displaced step queue.
3870 (do_target_resume): Adjust.
3871 (fetch_inferior_event): Use inferior_thread.
3872 (context_switch, get_inferior_stop_soon): Take an
3873 execution_control_state pointer instead of a ptid_t. All callers
3875 (switch_to_thread_cleanup): Delete.
3876 (stop_all_threads): Use scoped_restore_current_thread.
3877 * inline-frame.c: Include "gdbthread.h".
3878 (inline_state) <inline_state>: Take a thread pointer instead of a
3879 ptid_t. All callers adjusted.
3880 <ptid>: Delete, replaced by ...
3881 <thread>: ... this new field.
3882 (find_inline_frame_state): Take a thread pointer instead of a
3883 ptid_t. All callers adjusted.
3884 (skip_inline_frames, step_into_inline_frame)
3885 (inline_skipped_frames, inline_skipped_symbol): Take a thread
3886 pointer instead of a ptid_t. All callers adjusted.
3887 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3888 (inline_skipped_frames, inline_skipped_symbol): Likewise.
3889 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3891 * linux-nat.c (get_detach_signal): Likewise.
3892 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3893 (thread_db_notice_clone): Adjust.
3894 (thread_db_find_new_threads_silently)
3895 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3896 a thread pointer instead of a ptid_t. All callers adjusted.
3897 * mi/mi-cmd-var.c: Include "inferior.h".
3898 (mi_cmd_var_update_iter): Update to use thread pointers.
3899 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3901 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3903 (mi_output_running): ... this new function.
3904 (mi_on_resume_1): Adjust to use it.
3905 (mi_user_selected_context_changed): Adjust to use inferior_thread.
3906 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3908 (interrupt_thread_callback): : Adjust to use thread and inferior
3910 * proc-service.c: Include "gdbthread.h".
3911 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3912 * progspace-and-thread.c: Include "inferior.h".
3913 * progspace.c: Include "inferior.h".
3914 * python/py-exitedevent.c (create_exited_event_object): Adjust to
3915 hold a reference to an inferior_object.
3916 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3918 * python/py-inferior.c (struct inferior_object): Give the type a
3919 tag name instead of a typedef.
3920 (python_on_normal_stop): No need to check if the current thread is
3922 (inferior_to_inferior_object): Change return type to
3923 inferior_object. All callers adjusted.
3924 (find_thread_object): Delete, bits factored out to ...
3925 (thread_to_thread_object): ... this new function.
3926 * python/py-infthread.c (create_thread_object): Use
3927 inferior_to_inferior_object.
3928 (thpy_is_stopped): Use thread pointer directly.
3929 (gdbpy_selected_thread): Use inferior_thread.
3930 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3931 field, replaced with ...
3932 <thread>: ... this new field. All users adjusted.
3933 (btpy_insn_or_gap_new): Drop const.
3934 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
3936 * python/py-record.c: Include "gdbthread.h".
3937 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3938 a ptid_t. All callers adjusted.
3939 (gdbpy_current_recording): Use inferior_thread.
3940 * python/py-record.h (recpy_record_object) <ptid>: Delete
3941 field, replaced with ...
3942 <thread>: ... this new field. All users adjusted.
3943 (recpy_element_object) <ptid>: Delete
3944 field, replaced with ...
3945 <thread>: ... this new field. All users adjusted.
3946 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3947 a ptid_t. All callers adjusted.
3948 * python/py-threadevent.c: Include "gdbthread.h".
3949 (get_event_thread): Use thread_to_thread_object.
3950 * python/python-internal.h (struct inferior_object): Forward
3952 (find_thread_object, find_inferior_object): Delete declarations.
3953 (thread_to_thread_object, inferior_to_inferior_object): New
3955 * record-btrace.c: Include "inferior.h".
3956 (require_btrace_thread): Use inferior_thread.
3957 (record_btrace_frame_sniffer)
3958 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3959 (get_thread_current_frame): Use scoped_restore_current_thread and
3961 (get_thread_current_frame): Use thread pointer directly.
3962 (record_btrace_replay_at_breakpoint): Use thread's inferior
3964 * record-full.c: Include "inferior.h".
3965 * regcache.c: Include "gdbthread.h".
3966 (get_thread_arch_regcache): Use the inferior's address space
3968 (get_thread_regcache, registers_changed_thread): New.
3969 * regcache.h (get_thread_regcache(thread_info *thread)): New
3971 (registers_changed_thread): New.
3972 (remote_target) <remote_detach_1>: Swap order of parameters.
3973 (remote_add_thread): <remote_add_thread>: Return the new thread.
3974 (get_remote_thread_info(ptid_t)): New overload.
3975 (remote_target::remote_notice_new_inferior): Use thread pointers
3977 (remote_target::process_initial_stop_replies): Use
3978 thread_info::set_running.
3979 (remote_target::remote_detach_1, remote_target::detach)
3980 (extended_remote_target::detach): Adjust.
3981 * stack.c (frame_show_address): Use inferior_thread.
3982 * target-debug.h (target_debug_print_thread_info_pp): New.
3983 * target-delegates.c: Regenerate.
3984 * target.c (default_thread_address_space): Delete.
3985 (memory_xfer_partial_1): Use current_inferior.
3986 (target_detach): Use current_inferior.
3987 (target_thread_address_space): Delete.
3988 (generic_mourn_inferior): Use current_inferior.
3989 * target.h (struct target_ops) <thread_address_space>: Delete.
3990 (target_thread_address_space): Delete.
3991 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
3993 (delete_thread_1, delete_thread, delete_thread_silent): Take a
3994 thread pointer instead of a ptid_t. Adjust all callers.
3995 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3996 (first_thread_of_process): Delete, replaced by ...
3997 (first_thread_of_inferior): ... this new function. All callers
3999 (any_thread_of_process): Rename to ...
4000 (any_thread_of_inferior): ... this, and take an inferior pointer.
4001 (any_live_thread_of_process): Rename to ...
4002 (any_live_thread_of_inferior): ... this, and take an inferior
4004 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4005 (value_in_thread_stack_temporaries)
4006 (get_last_thread_stack_temporary): Take a thread pointer instead
4007 of a ptid_t. Adjust all callers.
4008 (thread_info::set_running): New.
4009 (validate_registers_access): Use inferior_thread.
4010 (can_access_registers_ptid): Rename to ...
4011 (can_access_registers_thread): ... this, and take a thread
4013 (print_thread_info_1): Adjust to compare thread pointers instead
4015 (switch_to_no_thread, switch_to_thread): Make extern.
4016 (scoped_restore_current_thread::~scoped_restore_current_thread):
4017 Use m_thread pointer directly.
4018 (scoped_restore_current_thread::scoped_restore_current_thread):
4019 Use inferior_thread.
4020 (thread_command): Use thread pointer directly.
4021 (thread_num_make_value_helper): Use inferior_thread.
4022 * top.c (execute_command): Use inferior_thread.
4023 * tui/tui-interp.c: Include "inferior.h".
4024 * varobj.c (varobj_create): Use inferior_thread.
4025 (value_of_root_1): Use find_thread_global_id instead of
4026 global_thread_id_to_ptid.
4028 2018-06-21 Alan Hayward <alan.hayward@arm.com>
4030 * regcache.c (readable_regcache::read_part): Avoid memcpy when
4032 (regcache::write_part): Likewise.
4033 (readable_regcache::cooked_read_part): Update comment.
4034 (readable_regcache::cooked_write_part): Likewise.
4035 * regcache.h: (readable_regcache::read_part): Likewise.
4036 (regcache::write_part): Likewise.
4038 2018-06-21 Richard Bunt <richard.bunt@arm.com>
4039 Dirk Schubert <dirk.schubert@arm.com>
4041 * aarch64-linux-nat.c (post_attach): New.
4042 (aarch64_linux_nat_target::post_attach): Override post_attach to
4043 record the number of hardware debug registers.
4045 2018-06-20 Tom Tromey <tom@tromey.com>
4047 * python/py-param.c (add_setshow_generic): Make parameters const.
4048 (parmpy_init): Update.
4050 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4052 * regcache.h (regcache_cooked_read_ftype): Rename to...
4053 (register_read_ftype): ...this, change type to function_view.
4054 (class reg_buffer) <save>: Remove src parameter.
4055 (readonly_detached_regcache) <readonly_detached_regcache>: Make
4056 parameter non-const in first overload. Remove src parameter in
4058 * regcache.c (do_cooked_read): Remove.
4059 (readonly_detached_regcache::readonly_detached_regcache): Make
4060 parameter non-const, adjust call to other constructor.
4061 (reg_buffer::save): Remove src parameter.
4062 * frame.c (do_frame_register_read): Remove.
4063 (frame_save_as_regcache): Use lambda function.
4064 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4065 parameter to ppu2spu_data *.
4066 (ppu2spu_sniffer): Use lambda function.
4068 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4070 * record-full.c (record_full_target::insert_breakpoint): Remove
4071 "struct" keyword, add const.
4073 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
4075 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4076 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4077 * configure.ac: Remove AC_PREREQ, add missing quoting.
4078 * gnulib/configure.ac: Modernize usage of
4079 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
4080 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4081 (AUTOMAKE_VERSION): Bump to 1.15.1.
4082 * configure: Re-generate.
4083 * config.in: Re-generate.
4084 * aclocal.m4: Re-generate.
4085 * gnulib/aclocal.m4: Re-generate.
4086 * gnulib/config.in: Re-generate.
4087 * gnulib/configure: Re-generate.
4088 * gnulib/import/Makefile.in: Re-generate.
4090 2018-06-19 Pedro Alves <palves@redhat.com>
4092 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4093 (lookup_minimal_symbol_by_pc_section): ... here with
4094 gdb_assert_not_reached added.
4096 2018-06-19 Pedro Alves <palves@redhat.com>
4098 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4099 parameter with a block parameter. Compare location's block symbol
4100 with the frame's block instead of addresses.
4101 (skip_inline_frames): Pass the current block instead of the
4102 frame's address. Break out as soon as we determine the frame
4103 should not be skipped.
4105 2018-06-18 Tom Tromey <tom@tromey.com>
4107 * solib-aix.c (solib_aix_get_section_offsets): Return
4109 (solib_aix_solib_create_inferior_hook): Update.
4111 2018-06-18 Tom Tromey <tom@tromey.com>
4113 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4115 2018-06-18 Tom Tromey <tom@tromey.com>
4117 * solib-frv.c (frv_relocate_main_executable): Use
4119 * solib-dsbt.c (dsbt_relocate_main_executable): Use
4122 2018-06-18 Tom Tromey <tom@tromey.com>
4124 * objfiles.h (inhibit_section_map_updates): Update.
4125 (resume_section_map_updates, resume_section_map_updates_cleanup):
4127 * solib-svr4.c (svr4_handle_solib_event): Update.
4128 * objfiles.c (inhibit_section_map_updates): Return
4129 scoped_restore_tmpl<int>.
4130 (resume_section_map_updates, resume_section_map_updates_cleanup):
4133 2018-06-18 Tom Tromey <tom@tromey.com>
4135 * valprint.h (read_string): Update.
4136 * valprint.c (read_string): Change type of "buffer".
4137 (val_print_string): Update.
4138 * python/py-value.c (valpy_string): Update.
4139 * language.h (struct language_defn) <la_get_string>: Change
4141 (default_get_string, c_get_string): Update.
4142 * language.c (default_get_string): Change type of "buffer".
4143 * guile/scm-value.c (gdbscm_value_to_string): Update.
4144 * c-lang.c (c_get_string): Change type of "buffer".
4146 2018-06-18 Tom Tromey <tom@tromey.com>
4148 * ser-mingw.c (struct pipe_state_destroyer): New.
4149 (pipe_state_up): New typedef.
4150 (cleanup_pipe_state): Remove.
4151 (pipe_windows_open): Use pipe_state_up. Don't release argv.
4153 2018-06-18 Tom Tromey <tom@tromey.com>
4155 * rust-lang.h (rust_yyerror): Don't declare.
4156 * rust-lang.c (rust_language_defn): Update.
4157 * rust-exp.y (yyerror): Now static.
4158 * parse.c (parse_exp_in_context_1): Update.
4159 * p-lang.h (p_yyerror): Don't declare.
4160 * p-lang.c (p_language_defn): Update.
4161 * p-exp.y (yyerror): Now static.
4162 * opencl-lang.c (opencl_language_defn): Update.
4163 * objc-lang.c (objc_language_defn): Update.
4164 * m2-lang.h (m2_yyerror): Don't declare.
4165 * m2-lang.c (m2_language_defn): Update.
4166 * m2-exp.y (yyerror): Now static.
4167 * language.h (struct language_defn) <la_error>: Remove.
4168 * language.c (unk_lang_error): Remove.
4169 (unknown_language_defn, auto_language_defn): Remove.
4170 * go-lang.h (go_yyerror): Don't declare.
4171 * go-lang.c (go_language_defn): Update.
4172 * go-exp.y (yyerror): Now static.
4173 * f-lang.h (f_yyerror): Don't declare.
4174 * f-lang.c (f_language_defn): Update.
4175 * f-exp.y (yyerror): Now static.
4176 * d-lang.h (d_yyerror): Don't declare.
4177 * d-lang.c (d_language_defn): Update.
4178 * d-exp.y (yyerror): Now static.
4179 * c-lang.h (c_yyerror): Don't declare.
4180 * c-lang.c (c_language_defn, cplus_language_defn)
4181 (asm_language_defn, minimal_language_defn): Update.
4182 * c-exp.y (yyerror): Now static.
4183 * ada-lang.h (ada_yyerror): Don't declare.
4184 * ada-lang.c (ada_language_defn): Update.
4185 * ada-exp.y (yyerror): Now static.
4187 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4189 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4190 (store_sveregs_to_thread): Likewise.
4191 (aarch64_linux_fetch_inferior_registers): Check for SVE.
4192 (aarch64_linux_store_inferior_registers): Likewise.
4193 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4195 (aarch64_sve_regs_copy_to_regcache): Likewise.
4196 (aarch64_sve_regs_copy_from_regcache): Likewise.
4197 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4199 (aarch64_sve_regs_copy_to_regcache): Likewise.
4200 (aarch64_sve_regs_copy_from_regcache): Likewise.
4201 (sve_context): Structure from Linux headers.
4202 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4203 (SVE_SIG_ZREG_SIZE): Likewise.
4204 (SVE_SIG_PREG_SIZE): Likewise.
4205 (SVE_SIG_FFR_SIZE): Likewise.
4206 (SVE_SIG_REGS_OFFSET): Likewise.
4207 (SVE_SIG_ZREGS_OFFSET): Likewise.
4208 (SVE_SIG_ZREG_OFFSET): Likewise.
4209 (SVE_SIG_ZREGS_SIZE): Likewise.
4210 (SVE_SIG_PREGS_OFFSET): Likewise.
4211 (SVE_SIG_PREG_OFFSET): Likewise.
4212 (SVE_SIG_PREGS_SIZE): Likewise.
4213 (SVE_SIG_FFR_OFFSET): Likewise.
4214 (SVE_SIG_REGS_SIZE): Likewise.
4215 (SVE_SIG_CONTEXT_SIZE): Likewise.
4216 (SVE_PT_REGS_MASK): Likewise.
4217 (SVE_PT_REGS_FPSIMD): Likewise.
4218 (SVE_PT_REGS_SVE): Likewise.
4219 (SVE_PT_VL_INHERIT): Likewise.
4220 (SVE_PT_VL_ONEXEC): Likewise.
4221 (SVE_PT_REGS_OFFSET): Likewise.
4222 (SVE_PT_FPSIMD_OFFSET): Likewise.
4223 (SVE_PT_FPSIMD_SIZE): Likewise.
4224 (SVE_PT_SVE_ZREG_SIZE): Likewise.
4225 (SVE_PT_SVE_PREG_SIZE): Likewise.
4226 (SVE_PT_SVE_FFR_SIZE): Likewise.
4227 (SVE_PT_SVE_FPSR_SIZE): Likewise.
4228 (SVE_PT_SVE_FPCR_SIZE): Likewise.
4229 (__SVE_SIG_TO_PT): Likewise.
4230 (SVE_PT_SVE_OFFSET): Likewise.
4231 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4232 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4233 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4234 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4235 (SVE_PT_SVE_PREG_OFFSET): Likewise.
4236 (SVE_PT_SVE_PREGS_SIZE): Likewise.
4237 (SVE_PT_SVE_FFR_OFFSET): Likewise.
4238 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4239 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4240 (SVE_PT_SVE_SIZE): Likewise.
4241 (SVE_PT_SIZE): Likewise.
4242 (HAS_SVE_STATE): New define.
4244 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4246 * nat/aarch64-sve-linux-sigcontext.h: New file.
4247 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4249 (SVE_VQ_MIN): Likewise.
4250 (SVE_VQ_MAX): Likewise.
4251 (SVE_VL_MIN): Likewise.
4252 (SVE_VL_MAX): Likewise.
4253 (SVE_NUM_ZREGS): Likewise.
4254 (SVE_NUM_PREGS): Likewise.
4255 (sve_vl_valid): Likewise.
4256 (struct user_sve_header): Likewise.
4258 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
4259 Richard Bunt <Richard.Bunt@arm.com>
4261 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4262 was requested by GDB.
4264 2018-06-15 Tom de Vries <tdevries@suse.de>
4266 * MAINTAINERS (Write After Approval): Add Tom de Vries.
4268 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
4270 * gnulib/update-gnulib.sh: Print expected versions of
4273 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
4275 * arch-utils.c (default_type_align): Use type_length_units.
4276 * gdbtypes.c (type_align): Use type_length_units.
4278 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4280 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4281 of 'define' command.
4283 2018-06-14 Tom de Vries <tdevries@suse.de>
4286 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4287 get_no_prettyformat_print_options.
4289 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
4291 * sparc-nat.h: Include target.h.
4292 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4293 <fetch_registers>: Remove this argument in function call.
4294 <store_registers>: Remove this argument in function call, remove
4296 <low_forget_process>: Call sparc64_forget_process instead of
4297 sparc_forget_process.
4299 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4301 * procfs.c (_initialize_procfs): Use add_inf_child_target.
4302 (procfs_target::make_corefile_notes): Adjust to new
4303 target_read_alloc return type.
4305 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4306 Stephen Roberts <stephen.roberts@arm.com>
4309 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4310 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4311 Move should_notify_stop local into more inner scope.
4313 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4314 Stephen Roberts <stephen.roberts@arm.com>
4317 * infrun.c (resume_1): Add call to mark_async_event_handler.
4319 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4321 * infrun.c (do_target_wait): Change old version of $pc printed.
4323 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
4325 * dwarf2read.c (read_index_from_section): Rename to...
4326 (read_gdb_index_from_section): ... this, update all callers.
4327 (dwarf2_read_index): Rename to...
4328 (dwarf2_read_gdb_index): ... this, update all callers.
4330 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
4332 * gdb/hppa-linux-nat.c
4333 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4334 hppa_linux_nat_target::fetch_registers.
4336 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4338 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4339 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4340 (AARCH64_DWARF_SVE_FFR): Likewise.
4341 (AARCH64_DWARF_SVE_P0): Likewise.
4342 (AARCH64_DWARF_SVE_Z0): Likewise.
4344 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4346 * common/common-regcache.h (raw_compare): New function.
4347 * regcache.c (regcache::raw_compare): Likewise.
4348 * regcache.h (regcache::raw_compare): New declaration.
4350 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4352 * common/common-regcache.h (reg_buffer_common): New structure.
4353 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4354 (reg_buffer::raw_supply): Likewise.
4355 (reg_buffer::raw_supply_integer): Likewise.
4356 (reg_buffer::raw_supply_zeroed): Likewise.
4357 (reg_buffer::raw_collect): Likewise.
4358 (reg_buffer::raw_collect_integer): Likewise.
4359 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4360 (reg_buffer::raw_supply): Likewise.
4361 (reg_buffer::raw_supply_integer): Likewise.
4362 (reg_buffer::raw_supply_zeroed): Likewise.
4363 (reg_buffer::raw_collect): Likewise.
4364 (reg_buffer::raw_collect_integer): Likewise.
4366 2018-06-10 Tom Tromey <tom@tromey.com>
4368 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
4369 (class remote_state) <stop_reply_queue>: Now std::vector.
4370 (remote_state::~remote_state)
4371 (remote_target::stop_reply_queue_length): Update.
4372 (struct queue_iter_param, remove_child_of_pending_fork)
4373 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4374 (check_pending_event_prevents_wildcard_vcont_callback)
4375 (remove_stop_reply_for_inferior)
4376 (remove_stop_reply_of_remote_state)
4377 (remote_notif_remove_once_on_match)
4378 (stop_reply_match_ptid_and_ws)
4379 (remote_kill_child_of_pending_fork): Remove.
4380 (remote_target::remove_new_fork_children)
4381 (remote_target::check_pending_events_prevent_wildcard_vcont)
4382 (remote_target::discard_pending_stop_replies)
4383 (remote_target::discard_pending_stop_replies_in_queue)
4384 (remote_target::remote_notif_remove_queued_reply)
4385 (remote_target::queued_stop_reply)
4386 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4387 (remote_target::wait, remote_target::kill_new_fork_children)
4388 (remote_target::async): Update.
4390 2018-06-10 Tom Tromey <tom@tromey.com>
4392 * record-full.c (record_full_arch_list_cleanups): Remove.
4393 (record_full_message): Use try/catch.
4394 (record_full_wait_cleanups): Remove.
4395 (record_full_wait_1): Use try/catch.
4396 (record_full_restore): Likewise.
4398 2018-06-10 Tom Tromey <tom@tromey.com>
4400 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
4401 declare VEC. Add constructor.
4402 <in_target_beneath>: Now bool.
4403 (record_full_breakpoints): Now a std::vector, static.
4404 (record_full_sync_record_breakpoints)
4405 (record_full_init_record_breakpoints)
4406 (record_full_target::insert_breakpoint)
4407 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
4409 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
4411 * dwarf2read.c (process_cu_includes): Remove struct keyword.
4412 * serial.c (serial_interface_lookup): Remove struct keyword.
4414 2018-06-10 Tom Tromey <tom@tromey.com>
4416 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4418 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4420 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4422 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4423 "beneath" as a method.
4424 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4425 Use "beneath" as a method.
4427 2018-06-10 Tom Tromey <tom@tromey.com>
4429 * tracefile.c (struct trace_file_writer_deleter): New.
4430 <operator()>: Rename from trace_file_writer_xfree.
4431 (trace_file_writer_up): New typedef.
4432 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4434 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4436 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4437 <m_registers, m_register_status>: Change type to
4439 * regcache.c (reg_buffer::reg_buffer): Use new instead of
4442 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4444 * common/common-regcache.h (enum register_status): Add
4445 underlying type "signed char".
4446 * regcache.h (reg_buffer) <m_register_status>: Change type to
4448 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4449 register_status instead of signed char.
4450 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4451 (reg_buffer::get_register_status): Remove cast.
4452 (readable_regcache::raw_read): Remove cast.
4453 (readable_regcache::cooked_read): Remove cast.
4455 2018-06-09 Tom Tromey <tom@tromey.com>
4457 * source.c (reverse_search_command, forward_search_command): Use
4460 2018-06-09 Tom Tromey <tom@tromey.com>
4462 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
4463 (serial_ops_list): Now static, std::vector.
4464 (serial_interface_lookup, serial_add_interface): Update.
4466 2018-06-09 Tom Tromey <tom@tromey.com>
4468 * dwarf2read.c (process_cu_includes): Update.
4469 (process_full_comp_unit): Update.
4470 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4473 2018-06-08 Paul Koning <paul_koning@dell.com>
4477 * python/python.c (do_start_initialization):
4478 Avoid call to internal Python API.
4479 (init__gdb_module): New function.
4481 2018-06-08 Gary Benson <gbenson@redhat.com>
4483 * linux-thread-db.c (valprint.h): New include.
4484 (struct check_thread_db_info): New structure.
4485 (check_thread_db_on_load, tdb_testinfo): New static globals.
4486 (check_thread_db, check_thread_db_callback): New functions.
4487 (try_thread_db_load_1): Run integrity checks if requested.
4488 (maintenance_check_libthread_db): New function.
4489 (_initialize_thread_db): Register "maint check libthread-db"
4490 and "maint set/show check-libthread-db".
4491 * NEWS: Mention the above new commands.
4493 2018-06-08 Tom Tromey <tom@tromey.com>
4495 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4498 2018-06-08 Tom Tromey <tom@tromey.com>
4500 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4502 2018-06-08 Tom Tromey <tom@tromey.com>
4504 * common/btrace-common.h (struct btrace_data): Add constructor,
4505 destructor, move assignment operator.
4506 <empty, clear, fini>: New methods.
4507 <format>: Initialize.
4508 (btrace_data_init, btrace_data_fini, btrace_data_clear)
4509 (btrace_data_empty): Don't declare.
4510 * common/btrace-common.c (btrace_data_init): Remove.
4511 (btrace_data::fini): Rename from btrace_data_fini.
4512 (btrace_data::empty): Rename from btrace_data_empty.
4513 (btrace_data::clear): Rename from btrace_data_clear. Return
4515 * btrace.h (make_cleanup_btrace_data): Don't declare.
4516 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4517 (parse_xml_btrace): Update.
4518 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4519 (maint_btrace_clear_packet_history_cmd): Update.
4521 2018-06-07 Pedro Alves <palves@redhat.com>
4523 * target.h (target_ops) <beneath>: Now a method. All references
4525 (class target_stack): New.
4526 * target.c (g_target_stack): New.
4527 (g_current_top_target): Delete.
4528 (current_top_target): Get the top target out of g_target_stack.
4529 (target_stack::push, target_stack::unpush): New.
4530 (push_target, unpush_target): Reimplement.
4531 (target_is_pushed): Reimplement in terms of g_target_stack.
4532 (target_ops::beneath, target_stack::find_beneath): New.
4534 2018-06-07 Pedro Alves <palves@redhat.com>
4536 * target.h (find_target_beneath): Delete declaration.
4537 * target.c (find_target_beneath): Delete definition.
4538 * aix-thread.c: All callers of find_target_beneath adjusted to
4539 call target_ops::beneath instead.
4540 * bsd-uthread.c: Likewise.
4541 * linux-thread-db.c: Likewise.
4542 * ravenscar-thread.c: Likewise.
4543 * sol-thread.c: Likewise.
4544 * spu-multiarch.c: Likewise.
4546 2018-06-07 Pedro Alves <palves@redhat.com>
4548 * target.h (target_ops) <beneath>: Now a method. All references
4550 (target_ops) <m_beneath>: New.
4551 * target.c (target_ops::beneath): New.
4552 * corelow.c: Adjust all references to target_ops::beneath.
4553 * linux-thread-db.c: Likewise.
4554 * make-target-delegates: Likewise.
4555 * record-btrace.c: Likewise.
4556 * record-full.c: Likewise.
4557 * remote.c: Likewise.
4558 * target.c: Likewise.
4559 * target-delegates.c: Regenerate.
4561 2018-06-07 Pedro Alves <palves@redhat.com>
4563 * target.h (target_stack): Delete.
4564 (current_top_target): Declare function.
4565 * target.c (target_stack): Delete.
4566 (g_current_top_target): New.
4567 (current_top_target): New function.
4568 * auxv.c: Use current_top_target instead of target_stack
4570 * avr-tdep.c: Likewise.
4571 * breakpoint.c: Likewise.
4572 * corefile.c: Likewise.
4573 * elfread.c: Likewise.
4575 * exceptions.c: Likewise.
4576 * frame.c: Likewise.
4577 * gdbarch-selftests.c: Likewise.
4578 * gnu-v3-abi.c: Likewise.
4579 * ia64-tdep.c: Likewise.
4580 * ia64-vms-tdep.c: Likewise.
4581 * infcall.c: Likewise.
4582 * infcmd.c: Likewise.
4583 * infrun.c: Likewise.
4584 * linespec.c: Likewise.
4585 * linux-tdep.c: Likewise.
4586 * minsyms.c: Likewise.
4587 * ppc-linux-nat.c: Likewise.
4588 * ppc-linux-tdep.c: Likewise.
4589 * procfs.c: Likewise.
4590 * regcache.c: Likewise.
4591 * remote.c: Likewise.
4592 * rs6000-tdep.c: Likewise.
4593 * s390-linux-nat.c: Likewise.
4594 * s390-tdep.c: Likewise.
4595 * solib-aix.c: Likewise.
4596 * solib-darwin.c: Likewise.
4597 * solib-dsbt.c: Likewise.
4598 * solib-spu.c: Likewise.
4599 * solib-svr4.c: Likewise.
4600 * solib-target.c: Likewise.
4601 * sparc-tdep.c: Likewise.
4602 * sparc64-tdep.c: Likewise.
4603 * spu-tdep.c: Likewise.
4604 * symfile.c: Likewise.
4605 * symtab.c: Likewise.
4606 * target-descriptions.c: Likewise.
4607 * target-memory.c: Likewise.
4608 * target.c: Likewise.
4609 * target.h: Likewise.
4610 * tracefile-tfile.c: Likewise.
4611 * tracepoint.c: Likewise.
4612 * valops.c: Likewise.
4613 * valprint.c: Likewise.
4614 * value.c: Likewise.
4615 * windows-tdep.c: Likewise.
4616 * mi/mi-main.c: Likewise.
4618 2018-06-07 Tom Tromey <tom@tromey.com>
4620 * valprint.h (build_address_symbolic): Declare.
4621 * printcmd.c (print_address_symbolic): Update.
4622 (build_address_symbolic): Change "name" and "filename" to
4624 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4626 * defs.h (build_address_symbolic): Remove declaration.
4628 2018-06-07 Alan Hayward <alan.hayward@arm.com>
4630 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4631 (aarch64_vnv_type): Add function.
4632 (aarch64_pseudo_register_name): Add V regs for SVE.
4633 (aarch64_pseudo_register_type): Likewise.
4634 (aarch64_pseudo_register_reggroup_p): Likewise.
4635 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4636 (aarch64_pseudo_read_value): Add V regs for SVE.
4637 (aarch64_pseudo_write_2): Use V0 offset for SVE
4638 (aarch64_pseudo_write): Add V regs for SVE.
4639 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4641 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
4643 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4644 (sve_vl_from_vq): Likewise.
4646 2018-06-05 Tom Tromey <tom@tromey.com>
4648 * cli/cli-cmds.c (show_version): Update.
4649 * top.c (print_gdb_version): Add "interactive" parameter.
4651 * main.c (captured_main_1): Update.
4652 * top.h (print_gdb_version): Add "interactive" parameter and a
4655 2018-06-05 David Malcolm <dmalcolm@redhat.com>
4657 * common/enum-flags.h: Add trailing semicolon to example in
4660 2018-06-05 Tom Tromey <tom@tromey.com>
4663 * NEWS: Add entry about pager.
4664 * utils.c (pagination_disabled_for_command): New global.
4665 (prompt_for_continue): Allow "c" response to prompt.
4666 (reinitialize_more_filter): Clear
4667 pagination_disabled_for_command.
4668 (fputs_maybe_filtered): Check pagination_disabled_for_command.
4670 2018-06-04 Tom Tromey <tom@tromey.com>
4672 * ada-lang.h (ada_lookup_symbol_list): Update.
4673 * ada-lang.c (resolve_subexp): Update.
4674 (symbols_are_identical_enums): Change type of syms. Remove nsyms
4676 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4677 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4678 results parameter to std::vector.
4679 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4681 * ada-exp.y (block_lookup): Update.
4682 (select_possible_type_sym): Change type of syms. Remove nsyms
4684 (write_var_or_type, write_name_assoc): Update.
4686 2018-06-04 Joel Brobecker <brobecker@adacore.com>
4688 * windows-nat.c (windows_nat_target::xfer_partial): Return
4689 TARGET_XFER_E_IO if we need to delegate to the target beneath
4690 but BENEATH is NULL.
4692 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
4694 * Makefile.in (config.status): Add configure.nat as a
4697 2018-06-04 Tom Tromey <tom@tromey.com>
4699 * cp-name-parser.y (cpname_state): Add method declarations.
4700 (HANDLE_QUAL): Update.
4701 (cpname_state::d_grab, cpname_state::fill_comp)
4702 (cpname_state::make_operator, cpname_state::make_dtor)
4703 (cpname_state::make_builtin_type, cpname_state::make_name)
4704 (cpname_state::d_qualify, cpname_state::d_int_type)
4705 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4706 (%union): Move earlier.
4708 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4710 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4712 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4714 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4715 (aarch64_pseudo_write_1): Likewise.
4716 (aarch64_pseudo_read_value): Use helper.
4717 (aarch64_pseudo_write): Likewise.
4719 2018-06-04 Pedro Alves <palves@redhat.com>
4721 * darwin-nat.c (darwin_ops): Delete.
4722 (darwin_attach_pid): Use get_native_target.
4724 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4726 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4727 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4729 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4731 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4732 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4733 (aarch64_gdbarch_init): Check for SVE.
4734 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4736 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4738 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4739 * aarch64-tdep.h (aarch64_read_description): Likewise.
4740 * arch/aarch64.c (aarch64_create_target_description): Likewise.
4741 * arch/aarch64.h (aarch64_create_target_description): Likewise.
4742 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4743 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4744 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4746 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
4748 * value.c (value_fetch_lazy_bitfield): New.
4749 (value_fetch_lazy_memory): New.
4750 (value_fetch_lazy_register): New.
4751 (value_fetch_lazy): Factor out to smaller functions.
4753 2018-06-01 Tom Tromey <tom@tromey.com>
4755 * cp-name-parser.y (backslashable, represented): Now const.
4757 2018-06-01 Tom Tromey <tom@tromey.com>
4759 * cp-name-parser.y: Include parser-defs.h.
4760 (parser_fprintf): Remove declaration.
4762 2018-06-01 Tom Tromey <tom@tromey.com>
4764 * cp-name-parser.y: Use %pure-parser, %lex-param, and
4766 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4767 (global_result): Remove globals.
4768 (struct cpname_state): New.
4769 (yyparse): Don't declare.
4770 (yylex, yyerror): Move declarations after %union.
4771 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4772 (make_name): Add state parameter.
4774 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4776 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4778 (yylex): Add lvalp, state parameters.
4779 (yyerror): Add state parameter.
4780 (cp_demangled_name_to_comp): Update.
4782 2018-06-01 Tom Tromey <tom@tromey.com>
4784 * cp-name-parser.y (parser_fprintf): Declare.
4785 (GDB_YY_REMAP_PREFIX): Define.
4786 Include yy-remap.h. Don't redefine yy* identifiers.
4788 2018-06-01 Tom Tromey <tom@tromey.com>
4790 * python/py-type.c (typy_legacy_template_argument): Update.
4791 * cp-support.h (cp_demangled_name_to_comp): Update.
4792 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4793 parameter to be a "std::string *".
4796 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
4798 * ada-lex.l: Include "diagnostics.h" instead of
4799 "common/diagnostics.h".
4800 * unittests/environ-selftests.c: Likewise.
4801 * common/diagnostics.h: Moved to ../include.
4803 2018-06-01 Joel Brobecker <brobecker@adacore.com>
4805 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4806 to language_mode_manual while calling breakpoint_re_set_one.
4808 2018-06-01 Tom Tromey <tom@tromey.com>
4810 * valops.c (value_cast_structs, destructor_name_p): Update.
4811 * symtab.c (gdb_mangle_name): Update.
4812 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4814 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4815 (pascal_object_print_value_fields, pascal_object_print_value):
4817 * p-typeprint.c (pascal_type_print_derivation_info): Update.
4818 * linespec.c (find_methods): Update.
4819 * gdbtypes.h (type_name_no_tag): Remove.
4820 (type_name_or_error): Rename from type_name_no_tag_or_error.
4821 * gdbtypes.c (type_name_no_tag): Remove.
4822 (type_name_or_error): Rename from type_name_no_tag_or_error.
4823 (lookup_struct_elt_type, check_typedef): Update.
4824 * expprint.c (print_subexp_standard): Update.
4825 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4826 * d-namespace.c (d_lookup_nested_symbol): Update.
4827 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4828 (cp_print_class_member): Update.
4829 * cp-namespace.c (cp_lookup_nested_symbol): Update.
4830 * completer.c (add_struct_fields): Update.
4831 * c-typeprint.c (cp_type_print_derivation_info)
4832 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4834 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4835 (ada_prefer_type, ada_is_exception_sym): Update.
4837 2018-06-01 Tom Tromey <tom@tromey.com>
4839 * valops.c (enum_constant_from_type, value_namespace_elt)
4840 (value_maybe_namespace_elt): Update.
4841 * valarith.c (find_size_for_pointer_math): Update.
4842 * target-descriptions.c (make_gdb_type): Update.
4843 * symmisc.c (print_symbol): Update.
4844 * stabsread.c (define_symbol, read_type)
4845 (complain_about_struct_wipeout, add_undefined_type)
4846 (cleanup_undefined_types_1): Update.
4847 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4848 (rust_range_type_p, val_print_struct, rust_print_struct_def)
4849 (rust_internal_print_type, rust_composite_type)
4850 (rust_evaluate_funcall, rust_evaluate_subexp)
4851 (rust_inclusive_range_type_p): Update.
4852 * python/py-type.c (typy_get_tag): Update.
4853 * p-typeprint.c (pascal_type_print_base): Update.
4854 * mdebugread.c (parse_symbol, parse_type): Update.
4855 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4857 * guile/scm-type.c (gdbscm_type_tag): Update.
4858 * go-lang.c (sixg_string_p): Update.
4859 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4861 * gdbtypes.h (struct main_type) <tag_name>: Remove.
4862 (TYPE_TAG_NAME): Remove.
4863 * gdbtypes.c (type_name_no_tag): Simplify.
4864 (check_typedef, check_types_equal, recursive_dump_type)
4865 (copy_type_recursive, arch_composite_type): Update.
4866 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
4867 in summary mode when needed.
4868 * eval.c (evaluate_funcall): Update.
4869 * dwarf2read.c (fixup_go_packaging, read_structure_type)
4870 (process_structure_scope, read_enumeration_type)
4871 (read_namespace_type, read_module_type, determine_prefix): Update.
4872 * cp-support.c (inspect_type): Update.
4873 * coffread.c (process_coff_symbol, decode_base_type): Update.
4874 * c-varobj.c (c_is_path_expr_parent): Update.
4875 * c-typeprint.c (c_type_print_base_struct_union): Update.
4876 (c_type_print_base_1): Update. Print struct/class/union/enum in
4877 summary when using C language.
4878 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4879 (gen_maybe_namespace_elt): Update.
4880 * ada-lang.c (ada_type_name): Simplify.
4881 (empty_record, ada_template_to_fixed_record_type_1)
4882 (template_to_static_fixed_type)
4883 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4885 2018-06-01 Tom Tromey <tom@tromey.com>
4887 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4889 * c-typeprint.c (c_print_type_1): Add "language" parameter.
4890 (c_print_type): Update.
4891 (c_print_type): New overload.
4892 (c_type_print_varspec_prefix, c_type_print_args)
4893 (c_type_print_varspec_suffix, c_print_type_no_offsets)
4894 (c_type_print_base_struct_union, c_type_print_base_1)
4895 (cp_type_print_method_args): Add "language" parameter.
4896 (c_type_print_base): Update.
4897 * c-lang.h (c_print_type): Add new overload.
4899 2018-06-01 Tom Tromey <tom@tromey.com>
4901 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4902 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4904 2018-06-01 Alan Hayward <alan.hayward@arm.com>
4906 * aarch64-tdep.c (aarch64_sve_register_names): New const
4908 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4909 (AARCH64_SVE_Z_REGS_NUM): New define.
4910 (AARCH64_SVE_P_REGS_NUM): Likewise.
4911 (AARCH64_SVE_NUM_REGS): Likewise.
4913 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4915 * nat/linux-ptrace.h [__alpha__]
4916 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4919 2018-05-31 Maciej W. Rozycki <macro@mips.com>
4921 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4922 the endianness selected.
4923 * NEWS: Document `set endian auto' mode operation update.
4925 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4927 * Makefile.in: Add new header.
4928 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4929 (sve_vl_from_vg): Likewise.
4930 (sve_vq_from_vl): Likewise.
4931 (sve_vl_from_vq): Likewise.
4932 (sve_vq_from_vg): Likewise.
4933 (sve_vg_from_vq): Likewise.
4934 * configure.nat: Add new c file.
4935 * nat/aarch64-sve-linux-ptrace.c: New file.
4936 * nat/aarch64-sve-linux-ptrace.h: New file.
4938 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4940 * aarch64-linux-nat.c (aarch64_linux_read_description):
4942 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4944 * aarch64-tdep.c (tdesc_aarch64_list): Add.
4945 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4946 (aarch64_gdbarch_init): Add parmeter zero.
4947 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4948 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4949 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4951 * doc/gdb.texinfo: Describe SVE feature
4952 * features/aarch64-sve.c: New file.
4954 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
4957 * gdbarch.sh (significant_addr_bit): Default to zero when
4958 not set by target architecture.
4959 * gdbarch.c: Re-generated.
4960 * utils.c (address_significant): Update.
4962 2018-05-30 Joel Brobecker <brobecker@adacore.com>
4964 * stack.c (func_command): Remove trailing newline in call to error.
4966 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4968 * regcache.h (regcache_raw_collect): Remove, update callers to
4969 use regcache::raw_collect.
4970 * regcache.c (regcache_raw_collect): Remove.
4972 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4974 * regcache.h (regcache_raw_supply): Remove, update callers to
4975 use detached_regcache::raw_supply.
4976 * regcache.c (regcache_raw_supply): Remove.
4978 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4980 * regcache.h (regcache_cooked_write_part): Remove, update
4981 callers to use regcache::cooked_write_part.
4982 * regcache.c (regcache_cooked_write_part): Remove.
4984 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4986 * regcache.h (regcache_cooked_read_part): Remove, update callers
4987 to use readable_regcache::cooked_read_part.
4988 * regcache.c (regcache_cooked_read_part): Remove.
4990 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4992 * regcache.h (regcache_cooked_read_value): Remove, update
4993 callers to use readable_regcache::cooked_read_value.
4994 * regcache.c (regcache_cooked_read_value): Remove.
4996 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4998 * regcache.h (regcache_cooked_write): Remove, update callers to
4999 use regcache::cooked_write.
5000 * regcache.c (regcache_cooked_write): Remove.
5002 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5004 * regcache.h (regcache_invalidate): Remove, update callers to
5005 use detached_regcache::invalidate instead.
5006 * regcache.c (regcache_invalidate): Remove.
5008 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5010 * regcache.h (regcache_raw_write_part): Remove, update callers
5011 to use regcache::raw_write_part instead.
5012 * regcache.c (regcache_raw_write_part): Remove.
5014 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5016 * regcache.h (regcache_raw_read_part): Remove, update callers to
5017 use readable_regcache::raw_read_part instead.
5018 * regcache.c (regcache_raw_read_part): Remove.
5020 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5022 * regcache.h (regcache_cooked_read): Remove, update callers to
5023 use readable_regcache::cooked_read instead.
5024 * regcache.c (regcache_cooked_read): Remove.
5026 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5028 * regcache.h (regcache_raw_write): Remove, update callers to use
5029 regcache::raw_write instead.
5030 * regcache.c (regcache_raw_write): Remove.
5032 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5034 * regcache.h (regcache_raw_read): Remove, update callers to use
5035 readable_regcache::raw_read instead.
5036 * regcache.c (regcache_raw_read): Remove.
5038 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5040 * regcache.h (regcache_raw_update): Remove, update callers to
5041 use readable_regcache::raw_update instead.
5042 * regcache.c (regcache_raw_update): Remove.
5044 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5046 * regcache.h (regcache_register_status): Remove, update callers
5047 to use reg_buffer::get_register_status directly instead.
5048 * regcache.c (regcache_register_status): Remove.
5050 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5052 * regcache.h (regcache_get_ptid): Remove, update all callers to
5053 call regcache::ptid instead.
5054 * regcache.c (regcache_get_ptid): Remove.
5056 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5058 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5060 2018-05-30 Pedro Alves <palves@redhat.com>
5062 * common/common-exceptions.h (exception_rethrow): Use
5065 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
5067 * breakpoint.c (print_solib_event, check_status_catch_solib):
5068 Remove struct keyword in range-based for loops.
5069 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5070 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5072 * linespec.c (find_superclass_methods, search_minsyms_for_name):
5074 * symfile.c (addr_info_make_relative): Likewise.
5075 * thread.c (value_in_thread_stack_temporaries): Likewise.
5077 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
5080 * valops.c (value_struct_elt_for_reference): Call check_typedef on
5081 aggregate type to get its real type before accessing it.
5083 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
5085 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5086 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5087 * coff-pe-read.c (add_pe_forwarded_sym): Replace
5088 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5089 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5090 * jit.c (jit_breakpoint_re_set_internal): Likewise.
5091 * printcmd.c (info_address_command): Likewise.
5093 2018-05-29 Tom Tromey <tom@tromey.com>
5095 * windows-nat.c (handle_exception): Update fall-through comment.
5097 2018-05-29 Tom Tromey <tom@tromey.com>
5099 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
5100 (struct program_space) <added_solibs>: Now a std::vector.
5101 * breakpoint.c (print_solib_event): Update.
5102 (check_status_catch_solib): Update.
5103 * progspace.c (clear_program_space_solib_cache): Update.
5104 * solib.c (update_solib_list): Update.
5106 2018-05-29 Tom Tromey <tom@tromey.com>
5108 * python/py-type.c (typy_richcompare): Update.
5109 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5110 * gdbtypes.h (types_deeply_equal): Return bool.
5111 (types_equal): Likewise.
5112 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
5114 (check_types_equal): Change worklist to std::vector. Return
5116 (struct type_equality_entry): Add constructor.
5117 (compare_maybe_null_strings): Return bool.
5118 (check_types_worklist): Return bool. Change worklist to
5120 (types_deeply_equal): Use std::vector.
5121 (types_equal): Return bool.
5122 (compare_maybe_null_strings): Simplify.
5124 2018-05-29 Tom Tromey <tom@tromey.com>
5126 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
5128 2018-05-29 Tom Tromey <tom@tromey.com>
5130 * objc-lang.h: Don't include cp-support.h.
5131 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
5134 2018-05-27 Tom Tromey <tom@tromey.com>
5136 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5138 2018-05-25 Tom Tromey <tom@tromey.com>
5140 * value.c (value::location): Initialize.
5142 2018-05-25 Tom Tromey <tom@tromey.com>
5144 * dbxread.c (init_bincl_list): Remove.
5145 (bincl_list): Now a std::vector.
5146 (bincls_allocated, next_bincl): Remove.
5147 (free_bincl_list, do_free_bincl_list_cleanup)
5148 (make_cleanup_free_bincl_list): Remove.
5149 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5151 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5152 (struct header_file_location): Add constructor.
5153 (add_bincl_to_list): Remove.
5155 2018-05-25 Tom Tromey <tom@tromey.com>
5157 * tui/tui.c (tui_enable): Update.
5158 * mi/mi-interp.c (mi_interp::init): Update.
5159 * interps.h (class interp) <name>: New method.
5160 <m_name>: Rename from name.
5161 (~scoped_restore_interp): Update.
5162 * interps.c (interp::interp): Update.
5163 (interp_add, interp_set, interp_lookup_existing)
5164 (current_interp_named_p): Update.
5166 2018-05-25 Tom Tromey <tom@tromey.com>
5168 * interps.c (interp_name): Remove.
5169 * mi/mi-interp.c (mi_interp::init): Update.
5170 * interps.h (interp_name): Remove.
5171 (~scoped_restore_interp): Update.
5172 * tui/tui.c (tui_enable): Update.
5174 2018-05-25 Tom Tromey <tom@tromey.com>
5176 * utils.c (fputs_maybe_filtered): Update.
5177 * linespec.c (decode_line_full): Update.
5178 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5179 (mi_print_breakpoint_for_event, mi_solib_loaded)
5180 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5181 (mi_user_selected_context_changed): Update.
5182 * mi/mi-main.c (mi_execute_command): Update.
5183 * cli/cli-script.c (execute_control_command): Update.
5184 * python/python.c (execute_gdb_command): Update.
5185 * solib.c (info_sharedlibrary_command): Update.
5186 * interps.c (interp_ui_out): Remove.
5187 * interps.h (interp_ui_out): Remove.
5189 2018-05-25 Tom Tromey <tom@tromey.com>
5191 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5192 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5193 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5195 2018-05-25 Tom Tromey <tom@tromey.com>
5197 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5198 * interps.c (interp_exec): Use scoped_restore.
5200 2018-05-25 Tom Tromey <tom@tromey.com>
5202 * remote.c (remote_target::remote_file_get): Use
5204 (remote_target::remote_file_put): Likewise.
5206 2018-05-25 Tom Tromey <tom@tromey.com>
5208 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5210 (get_pe_section_index, add_pe_exported_sym): Update.
5211 (read_pe_exported_syms): Use gdb::def_vector.
5213 2018-05-25 Tom Tromey <tom@tromey.com>
5215 * frame.c (remove_prev_frame): Remove.
5216 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5218 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5220 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5222 * mips-linux-nat.c (supply_fpregset): Always call
5223 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5224 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5225 `mips_fill_fpregset'.
5226 * mips-linux-tdep.c (mips_supply_fpregset)
5227 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5228 (mips_fill_fpregset_wrapper): Remove functions.
5229 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5230 (mips_linux_fpregset): Remove variable.
5231 (mips_linux_iterate_over_regset_sections): Use
5232 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5233 (mips_linux_o32_sigframe_init): Remove comment.
5235 2018-05-25 Pedro Alves <palves@redhat.com>
5237 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5238 (struct readahead_cache, struct packet_reg, struct
5239 remote_arch_state, class remote_state): Move higher up in the
5241 (remote_target::m_remote_state): Now an object instead of a pointer.
5242 (remote_target::get_remote_state): Adjust.
5244 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5246 * stack.c (select_and_print_frame): Delete.
5247 (struct function_bounds): Move struct within function.
5248 (func_command): Most content moved into new function
5249 find_frame_for_function, use new function, print result, add
5251 (find_frame_for_function): New function, now returns a result.
5253 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5255 * stack.c (iterate_over_block_arg_vars): Fix comment.
5256 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5258 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5262 (scoped_restore_selected_frame::scoped_restore_selected_frame):
5264 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5266 * frame.h (class scoped_restore_selected_frame): New class.
5267 * stack.c (print_frame_local_vars): Remove catching and rethrowing
5268 of any exception, use scoped_restore_selected_frame to restore the
5271 2018-05-24 Pedro Alves <palves@redhat.com>
5273 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5276 2018-05-23 Tom Tromey <tom@tromey.com>
5278 * complaints.c (struct complaints): Remove.
5279 (symfile_complaint_book): Remove.
5280 (series): New global.
5281 (complaint_internal): Update.
5282 (clear_complaints): Update.
5284 2018-05-23 Tom Tromey <tom@tromey.com>
5286 * complaints.c (counters): New global.
5287 (struct complain): Remove.
5288 (struct complaints) <root>: Remove.
5289 (complaint_sentinel): Remove.
5290 (symfile_complaint_book): Update.
5291 (find_complaint) Remove.
5292 (complaint_internal, clear_complaints): Update.
5294 2018-05-23 Tom Tromey <tom@tromey.com>
5296 * complaints.c (struct complain) <file, line>: Remove.
5297 (find_complaint): Remove file, line parameters.
5298 (complaint_internal): Update.
5300 2018-05-23 Tom Tromey <tom@tromey.com>
5302 * complaints.c (vcomplaint): Remove.
5303 (complaint_internal) Merge in contents of vcomplaint.
5305 2018-05-23 Tom Tromey <tom@tromey.com>
5307 * complaints.c (struct complaints) <explanation>: Remove.
5308 (symfile_explanations): Remove.
5309 (symfile_complaint_book): Update.
5310 (vcomplaint): Update.
5311 (struct explanation): Remove.
5313 2018-05-23 Tom Tromey <tom@tromey.com>
5315 * complaints.c (symfile_complaints): Remove.
5316 (complaint_internal): Remove "complaints" parameter.
5317 (clear_complaints, vcomplaint): Remove "c" parameter.
5318 (get_complaints): Remove.
5319 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5320 (dwarf2_debug_line_missing_file_complaint)
5321 (dwarf2_debug_line_missing_end_sequence_complaint)
5322 (dwarf2_complex_location_expr_complaint)
5323 (dwarf2_const_value_length_mismatch_complaint)
5324 (dwarf2_section_buffer_overflow_complaint)
5325 (dwarf2_macro_malformed_definition_complaint)
5326 (dwarf2_invalid_attrib_class_complaint)
5327 (create_addrmap_from_index, dw2_symtab_iter_next)
5328 (dw2_expand_marked_cus)
5329 (dw2_debug_names_iterator::find_vec_in_debug_names)
5330 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5331 (create_debug_type_hash_table, init_cutu_and_read_dies)
5332 (partial_die_parent_scope, add_partial_enumeration)
5333 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5334 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5335 (read_import_statement, read_file_scope, create_dwo_cu_reader)
5336 (create_cus_hash_table, create_dwp_hash_table)
5337 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5338 (dwarf2_rnglists_process, dwarf2_ranges_process)
5339 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5340 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5341 (handle_struct_member_die, process_structure_scope)
5342 (read_array_type, read_common_block, read_module_type)
5343 (read_tag_pointer_type, read_typedef, read_base_type)
5344 (read_subrange_type, load_partial_dies, partial_die_info::read)
5345 (partial_die_info::read, partial_die_info::read)
5346 (partial_die_info::read, read_checked_initial_length_and_offset)
5347 (dwarf2_string_attr, read_formatted_entries)
5348 (dwarf_decode_line_header)
5349 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5350 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5351 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5352 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5353 (get_signatured_type, get_DW_AT_signature_type)
5354 (decode_locdesc, file_file_name, consume_improper_spaces)
5355 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5356 (dwarf_decode_macro_bytes, dwarf_decode_macros)
5357 (dwarf2_symbol_mark_computed, set_die_type)
5358 (read_attribute_value): Update.
5359 * stap-probe.c (handle_stap_probe, get_stap_base_address):
5361 * dbxread.c (unknown_symtype_complaint)
5362 (lbrac_mismatch_complaint, repeated_header_complaint)
5363 (set_namestring, function_outside_compilation_unit_complaint)
5364 (read_dbx_symtab, process_one_symbol): Update.
5365 * gdbtypes.c (stub_noname_complaint): Update.
5366 * windows-nat.c (handle_unload_dll): Update.
5367 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5368 (decode_base_type): Update.
5369 * xcoffread.c (bf_notfound_complaint, ef_complaint)
5370 (eb_complaint, record_include_begin, record_include_end)
5371 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5372 (process_xcoff_symbol, read_symbol)
5373 (function_outside_compilation_unit_complaint)
5374 (scan_xcoff_symtab): Update.
5375 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5376 * buildsym.c (finish_block_internal, make_blockvector)
5377 (end_symtab_get_static_block, augment_type_symtab): Update.
5378 * dtrace-probe.c (dtrace_process_dof)
5379 (dtrace_static_probe_ops::get_probes): Update.
5380 * complaints.h (struct complaint): Don't declare.
5381 (symfile_complaints): Remove.
5382 (complaint_internal): Remove "complaints" parameter.
5383 (complaint): Likewise.
5384 (clear_complaints): Likewise.
5385 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5386 (reread_symbols): Update.
5387 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5388 (dwarf2_frame_cache, decode_frame_entry): Update.
5389 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5390 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5391 (info_selectors_command): Update.
5392 * macrotab.c (macro_include, check_for_redefinition)
5393 (macro_undef): Update.
5394 * objfiles.c (filter_overlapping_sections): Update.
5395 * stabsread.c (invalid_cpp_abbrev_complaint)
5396 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5397 (define_symbol, error_type, read_type, rs6000_builtin_type)
5398 (stabs_method_name_from_physname, read_member_functions)
5399 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5400 (attach_fields_to_type, complain_about_struct_wipeout)
5401 (read_range_type, read_args, common_block_start)
5402 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5404 * mdebugread.c (index_complaint, unknown_ext_complaint)
5405 (basic_type_complaint, bad_tag_guess_complaint)
5406 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5407 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5408 (parse_procedure, parse_lines)
5409 (function_outside_compilation_unit_complaint)
5410 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5411 (bad_tag_guess_complaint, reg_value_complaint): Update.
5412 * cp-support.c (demangled_name_complaint): Update.
5413 * macroscope.c (sal_macro_scope): Update.
5414 * dwarf-index-write.c (class debug_names): Update.
5416 2018-05-23 Tom Tromey <tom@tromey.com>
5418 * complaints.c (clear_complaints): Remove "noisy" parameter.
5419 * complaints.h (clear_complaints): Update.
5420 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5421 (reread_symbols): Update.
5423 2018-05-23 Tom Tromey <tom@tromey.com>
5425 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5427 (vcomplaint, clear_complaints): Update.
5428 (symfile_explanations): Remove some messages.
5430 2018-05-23 Tom Tromey <tom@tromey.com>
5432 * complaints.c (internal_complaint): Remove.
5433 * complaints.h (internal_complaint): Remove.
5435 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5437 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5439 2018-05-22 Pedro Alves <palves@redhat.com>
5441 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5442 (remote_fileio_badfd, remote_fileio_return_errno)
5443 (remote_fileio_return_success, remote_fileio_func_open)
5444 (remote_fileio_func_open, remote_fileio_func_close)
5445 (remote_fileio_func_read, remote_fileio_func_write)
5446 (remote_fileio_func_lseek, remote_fileio_func_rename)
5447 (remote_fileio_func_unlink, remote_fileio_func_stat)
5448 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5449 (remote_fileio_func_isatty, remote_fileio_func_system): Add
5450 remote_target parameter.
5451 (remote_fio_func_map) <func>: Add remote_target parameter.
5452 (do_remote_fileio_request, remote_fileio_request):
5453 * remote-fileio.h (remote_fileio_request):
5454 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5455 remote_target parameter.
5456 (remote_notif_process, handle_notification): Adjust to pass down
5458 (remote_notif_state_allocate): Add remote_target parameter. Save
5460 * remote-notif.h (struct remote_target): Forward declare.
5461 (struct notif_client) <parse, ack, can_get_pending_events>: Add
5462 remote_target parameter.
5463 (struct remote_notif_state) <remote>: New field.
5464 (remote_notif_ack, remote_notif_parse): Add remote_target
5466 (remote_notif_state_allocate, remote_notif_state_allocate): Add
5467 remote_target parameter.
5468 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5469 (threads_listing_context, rmt_thread_action, protocol_feature)
5470 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5471 (packet_result, struct threads_listing_context, remote_state):
5472 Move definitions and declarations higher up.
5473 (remote_target) <~remote_target>: Declare.
5474 (remote_download_command_source, remote_file_put, remote_file_get)
5475 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5476 (remote_hostio_pread_vFile, remote_hostio_send_command)
5477 (remote_hostio_set_filesystem, remote_hostio_open)
5478 (remote_hostio_close, remote_hostio_unlink, remote_state)
5479 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5480 (get_memory_write_packet_size, get_memory_read_packet_size)
5481 (append_pending_thread_resumptions, remote_detach_1)
5482 (append_resumption, remote_resume_with_vcont)
5483 (add_current_inferior_and_thread, wait_ns, wait_as)
5484 (process_stop_reply, remote_notice_new_inferior)
5485 (process_initial_stop_replies, remote_add_thread)
5486 (btrace_sync_conf, remote_btrace_maybe_reopen)
5487 (remove_new_fork_children, kill_new_fork_children)
5488 (discard_pending_stop_replies, stop_reply_queue_length)
5489 (check_pending_events_prevent_wildcard_vcont)
5490 (discard_pending_stop_replies_in_queue, stop_reply)
5491 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5492 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5493 (remote_interrupt_as, remote_interrupt_ns)
5494 (remote_get_noisy_reply, remote_query_attached)
5495 (remote_add_inferior, remote_current_thread, get_current_thread)
5496 (set_thread, set_general_thread, set_continue_thread)
5497 (set_general_process, write_ptid)
5498 (remote_unpack_thread_info_response, remote_get_threadinfo)
5499 (parse_threadlist_response, remote_get_threadlist)
5500 (remote_threadlist_iterator, remote_get_threads_with_ql)
5501 (remote_get_threads_with_qxfer)
5502 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5503 (get_offsets, remote_check_symbols, remote_supported_packet)
5504 (remote_query_supported, remote_packet_size)
5505 (remote_serial_quit_handler, remote_detach_pid)
5506 (remote_vcont_probe, remote_resume_with_hc)
5507 (send_interrupt_sequence, interrupt_query)
5508 (remote_notif_get_pending_events, fetch_register_using_p)
5509 (send_g_packet, process_g_packet, fetch_registers_using_g)
5510 (store_register_using_P, store_registers_using_G)
5511 (set_remote_traceframe, check_binary_download)
5512 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5513 (remote_xfer_live_readonly_partial, remote_read_bytes)
5514 (remote_send_printf, remote_flash_write, readchar)
5515 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5516 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5517 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5518 (extended_remote_disable_randomization, extended_remote_run)
5519 (send_environment_packet, extended_remote_environment_support)
5520 (extended_remote_set_inferior_cwd, remote_write_qxfer)
5521 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5522 (packet_command): Now methods of ...
5523 (remote_target): ... this class.
5524 (m_remote_state) <remote_target>: New field.
5525 (struct remote_state) <stop_reply_queue,
5526 remote_async_inferior_event_token, wait_forever_enabled_p>: New
5528 (remote_state::remote_state): Allocate stop_reply_queue.
5529 (remote_state): Delete global.
5530 (get_remote_state_raw): Delete.
5531 (remote_target::get_remote_state): Allocate m_remote_state on
5533 (get_current_remote_target): New.
5534 (remote_ops, extended_remote_ops): Delete.
5535 (wait_forever_enabled_p, remote_async_inferior_event_token):
5536 Delete, moved to struct remote_state.
5537 (remote_target::close): Delete self. Destruction bits split to
5539 (remote_target::~remote_target): ... this.
5540 (show_memory_packet_size): Adjust to use
5541 get_current_remote_target.
5542 (struct protocol_feature) <func>: Add remote_target parameter.
5543 All callers adjusted.
5544 (curr_quit_handler_target): New.
5545 (remote_serial_quit_handler): Reimplement.
5546 (remote_target::open_1): Adjust to use get_current_remote_target.
5547 Heap-allocate remote_target/extended_remote_target instances.
5548 (vcont_builder::vcont_builder): Add remote_target parameter, and
5549 save it in m_remote. All callers adjusted.
5550 (vcont_builder::m_remote): New field.
5551 (vcont_builder::restart, vcont_builder::flush)
5552 (vcont_builder::push_action): Use it.
5553 (remote_target::commit_resume): Use it.
5554 (struct queue_iter_param) <remote>: New field.
5555 (remote_target::remove_new_fork_children): Fill in 'remote' field.
5556 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5557 (check_pending_event_prevents_wildcard_vcont_callback)
5558 (remote_target::check_pending_events_prevent_wildcard_vcont)
5559 (remote_target::discard_pending_stop_replies)
5560 (remote_target::discard_pending_stop_replies_in_queue)
5561 (remote_target::remote_notif_remove_queued_reply): Fill in
5563 (remote_notif_get_pending_events): New.
5564 (remote_target::readchar, remote_target::remote_serial_write):
5565 Save/restore curr_quit_handler_target.
5567 (kill_new_fork_children): Fill in 'remote' field.
5568 (packet_command): Use get_current_remote_target, defer to
5569 remote_target method of same name.
5570 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5571 parameter, and save it in m_remote. All callers adjusted.
5572 (scoped_remote_fd::release): Use m_remote.
5573 (scoped_remote_fd::m_remote): New field.
5574 (remote_file_put, remote_file_get, remote_file_delete): Use
5575 get_current_remote_target, defer to remote_target method of same
5577 (remote_btrace_reset): Add remote_state paremeter. Update all
5579 (remote_async_inferior_event_handler). Pass down 'data'.
5580 (remote_new_objfile): Use get_current_remote_target.
5581 (remote_target::vcont_r_supported): New.
5582 (set_range_stepping): Use get_current_remote_target and
5583 remote_target::vcont_r_supported.
5584 (_initialize_remote): Don't allocate 'remote_state' and
5585 'stop_reply_queue' globals.
5586 * remote.h (struct remote_target): Forward declare.
5587 (getpkt, putpkt, remote_notif_get_pending_events): Add
5588 'remote_target' parameter.
5590 2018-05-22 Pedro Alves <palves@redhat.com>
5592 * remote.c (vcont_builder): Now a class. Make all data members
5594 (vcont_builder) <vcont_builder, restart, flush, push_action>:
5596 (vcont_builder_restart): Rename to ...
5597 (vcont_builder::restart): ... this.
5598 (vcont_builder_flush): Rename to ...
5599 (vcont_builder::flush): ... this.
5600 (vcont_builder_push_action): Rename to ...
5601 (vcont_builder::push_action): ... this.
5602 (remote_target::commit_resume): Adjust.
5604 2018-05-22 Pedro Alves <palves@redhat.com>
5606 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5607 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5608 (get_fixed_memory_packet_size): New.
5609 (get_memory_packet_size): Use it.
5610 (set_memory_packet_size): Don't override the config size with
5611 DEFAULT_MAX_MEMORY_PACKET_SIZE.
5612 (show_memory_packet_size): Use get_fixed_memory_packet_size.
5613 Don't refer to get_memory_packet_size if not connected to a remote
5614 target. Show "(default)" if configured size is 0.
5616 2018-05-22 Pedro Alves <palves@redhat.com>
5618 * remote.c (remote_target::mourn_inferior): Move
5619 discard_pending_stop_replies call here from ...
5620 (_initialize_remote): ... here.
5622 2018-05-22 Pedro Alves <palves@redhat.com>
5624 * remote.c (compare_section_command): Remove set_general_process
5627 2018-05-22 Pedro Alves <palves@redhat.com>
5629 * remote.c (struct packet_reg, struct remote_arch_state):
5630 Move higher up in the file.
5631 (remote_state) <m_arch_states>: Store remote_arch_state values
5632 instead of remote_arch_state pointers.
5633 (remote_state::get_remote_arch_state): Adjust.
5635 2018-05-22 Pedro Alves <palves@redhat.com>
5637 * remote.c: Include <unordered_map>.
5638 (remote_state): Now a class.
5639 (remote_state) <get_remote_arch_state>: Declare method.
5640 <get_remote_arch_state>: New field.
5641 (remote_arch_state) <remote_arch_state>: Declare ctor.
5642 <regs>: Now a unique_ptr.
5643 (remote_gdbarch_data_handle): Delete.
5644 (get_remote_arch_state): Delete.
5645 (remote_state::get_remote_arch_state): New.
5646 (get_remote_state): Adjust to call remote_state's
5647 get_remote_arch_state method.
5648 (init_remote_state): Delete, bits factored out to ...
5649 (remote_arch_state::remote_arch_state): ... this new method.
5650 (get_remote_packet_size, get_memory_packet_size)
5651 (process_g_packet, remote_target::fetch_registers)
5652 (remote_target::prepare_to_store, store_registers_using_G)
5653 (remote_target::store_registers, remote_target::get_trace_status):
5654 Adjust to call remote_state's method.
5655 (_initialize_remote): Remove reference to
5656 remote_gdbarch_data_handle.
5658 2018-05-22 Pedro Alves <palves@redhat.com>
5660 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5661 pread>: New method declarations.
5662 (remote_target::open_1): Adjust.
5663 (readahead_cache_invalidate): Rename to ...
5664 (readahead_cache::invalidate): ... this, and adjust to be a class
5666 (readahead_cache_invalidate_fd): Rename to ...
5667 (readahead_cache::invalidate_fd): ... this, and adjust to be a
5669 (remote_hostio_pwrite): Adjust.
5670 (remote_hostio_pread_from_cache): Rename to ...
5671 (readahead_cache::pread): ... this, and adjust to be a class
5673 (remote_hostio_close): Adjust.
5675 2018-05-22 Pedro Alves <palves@redhat.com>
5677 * remote.c (remote_hostio_close_cleanup): Delete.
5678 (class scoped_remote_fd): New.
5679 (remote_file_put, remote_file_get): Use it.
5681 2018-05-22 Pedro Alves <palves@redhat.com>
5683 (struct vCont_action_support): Use bool and initialize all fields.
5684 (struct readahead_cache): Initialize all fields.
5685 (remote_state): Use bool and initialize all fields.
5686 (remote_state::remote_state, remote_state::~remote_state): New.
5687 (new_remote_state): Delete.
5688 (_initialize_remote): Use new to allocate remote_state.
5690 2018-05-22 Pedro Alves <palves@redhat.com>
5694 * c-exp.y: Include "c-support.h".
5695 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5696 of tolower. Use c_ident_is_alpha to scan names.
5697 * c-lang.c: Include "c-support.h".
5698 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5699 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5700 * c-support.h: New file, with bits factored out from ...
5701 * cp-name-parser.y: ... this file.
5702 Include "c-support.h".
5703 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5704 c-support.h and renamed.
5705 (symbol_end, yylex): Adjust.
5707 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5709 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5710 parameter type to CORE_ADDR.
5711 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5712 parameter type in declaration to CORE_ADDR.
5713 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5714 target_auxv_search to get AT_HWCAP and use the result to get the
5716 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5717 to CORE_ADDR. Remove the cast of the return value to unsigned
5718 long. Fix error predicate of target_auxv_search.
5719 (ppc_linux_nat_target::read_description): Change the type of the
5720 hwcap variable to CORE_ADDR.
5722 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5724 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5725 if the size of fpscr is larger than 32 bits.
5727 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5729 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5730 (ppc32_linux_vsxregmap): New global.
5731 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5732 regcache_supply_regset, and regcache_collect_regset.
5733 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5734 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5735 (fetch_vsx_register, store_vsx_register): Remove.
5736 (fetch_vsx_registers): Add regno parameter. Get regset using
5737 ppc_linux_vsxregset. Use regset to supply registers.
5738 (store_vsx_registers): Add regno parameter. Get regset using
5739 ppc_linux_vsxregset. Use regset to collect registers.
5740 (fetch_register): Call fetch_vsx_registers instead of
5742 (store_register): Call store_vsx_registers instead of
5744 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5745 new regno parameter.
5746 (store_ppc_registers): Call store_vsx_registers with -1 for the
5747 new regno parameter.
5748 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5749 (ppc_collect_vsxregset): Remove.
5751 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5753 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5755 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5756 for vector register offset fields.
5757 (ppc64_fbsd_reg_offsets): Likewise.
5758 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5759 to vector register offset fields.
5760 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5761 to vector register offset fields.
5762 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5763 vector register offset fields.
5764 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5765 initializers for vector register offset fields.
5766 (rs6000_aix64_reg_offsets): Likewise.
5767 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5768 (ppc_supply_vrregset): Remove.
5769 (ppc_collect_vrregset): Remove.
5770 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5771 (ppc_linux_vrregset) : New function.
5772 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5773 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5774 (ppc32_linux_vrregset): Remove.
5775 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5776 and use result instead of ppc32_linux_vrregset.
5777 (ppc32_linux_reg_offsets): Remove initializers for vector register
5779 (ppc64_linux_reg_offsets): Likewise.
5780 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5781 * ppc-linux-nat.c: Include regset.h.
5782 (gdb_vrregset_t): Adjust comment to account for little-endian
5784 (supply_vrregset, fill_vrregset): Remove.
5785 (fetch_altivec_register, store_altivec_register): Remove.
5786 (fetch_altivec_registers): Add regno parameter. Get regset using
5787 ppc_linux_vrregset. Use regset to supply registers.
5788 (store_altivec_registers): Add regno parameter. Get regset using
5789 ppc_linux_vrregset. Use regset to collect registers.
5790 (fetch_register): Call fetch_altivec_registers instead of
5791 fetch_altivec_register.
5792 (store_register): Call store_altivec_registers instead of
5793 store_altivec_register.
5794 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5795 the new regno parameter.
5796 (store_ppc_registers): Call store_altivec_registers with -1 for
5797 the new regno parameter.
5799 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5801 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5802 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5803 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5804 (gdb_vrregset_t): Change array type size to
5805 PPC_LINUX_SIZEOF_VRREGSET.
5806 (gdb_vsxregset_t): Change array type size to
5807 PPC_LINUX_SIZEOF_VSXREGSET.
5808 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5809 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5810 PPC_LINUX_SIZEOF_VSXREGSET.
5812 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5814 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5815 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5817 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5818 ppc_linux_target_wordsize with tid.
5819 (ppc_linux_nat_target::read_description): Call ppc_linux_target
5821 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5822 (ppc64_64bit_inferior_p): Add static and inline specifiers.
5823 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5824 tid parameter. Remove static specifier.
5825 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5826 (ppc_linux_target_wordsize): New declaration.
5828 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5830 * arch/ppc-linux-common.c: New file.
5831 * arch/ppc-linux-common.h: New file.
5832 * arch/ppc-linux-tdesc.h: New file.
5833 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5834 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5835 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5836 arch/ppc-linux-tdesc.h.
5837 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5838 arch/ppc-linux-tdesc.h.
5839 (ppc_linux_nat_target::read_description): Remove target
5840 description matching code. Fill a ppc_linux_features struct and
5841 call ppc_linux_match_description with it. Move comment about ISA
5842 2.05 to ppc-linux-common.c.
5843 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5844 arch/ppc-linux-tdesc.h.
5845 (ppc_linux_core_read_description): Remove target description
5846 matching code. Fill a ppc_linux_features struct and call
5847 ppc_linux_match_description with it.
5848 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5849 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5850 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5851 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5852 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5853 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5854 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5855 (tdesc_powerpc_e500l): Remove.
5857 2018-05-22 Joel Brobecker <brobecker@adacore.com>
5859 * ada-lang.c (catch_assert_command): Pass empty string instead
5860 of NULL for excep_string argument.
5862 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5864 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5865 the width of the requested register exceeds the width of the
5868 2018-05-21 Tom Tromey <tom@tromey.com>
5870 * printcmd.c (output_command): Remove.
5871 (output_command_const): Rename to output_command.
5872 * valprint.h (output_command): Rename from output_command_const.
5873 * tracepoint.c (trace_dump_actions): Call output_command.
5875 2018-05-21 Tom Tromey <tom@tromey.com>
5877 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5878 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5879 * ada-lang.h (create_ada_exception_catchpoint): Update.
5880 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5882 (create_excep_cond_exprs, ~ada_catchpoint)
5883 (should_stop_exception, print_one_exception)
5884 (print_mention_exception, print_recreate_exception): Update.
5885 (ada_get_next_arg): Remove.
5886 (catch_ada_exception_command_split): Use std::string. Change type
5887 of "excep_string", "cond_string".
5888 (catch_ada_exception_command): Update.
5889 (create_ada_exception_catchpoint): Change type of excep_string.
5890 (ada_exception_sal): Remove excep_string parameter.
5891 (~ada_catchpoint): Remove.
5893 2018-05-21 Tom Tromey <tom@tromey.com>
5895 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5898 2018-05-21 Tom Tromey <tom@tromey.com>
5900 * ada-lang.c (ada_exception_message_1, ada_exception_message):
5901 Return unique_xmalloc_ptr.
5902 (print_it_exception): Update.
5904 2018-05-21 Tom Tromey <tom@tromey.com>
5906 * tracepoint.c (trace_dump_actions): Use std::string.
5908 2018-05-21 Tom Tromey <tom@tromey.com>
5910 * symfile.c (reread_symbols): Use std::string for original_name.
5912 2018-05-21 Tom Tromey <tom@tromey.com>
5914 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5915 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
5918 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
5920 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5922 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5923 * objfiles.c (get_objfile_bfd_data): Allocate
5924 objfile_per_bfd_storage with obstack_new when allocating on
5927 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5929 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5931 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5932 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5933 * mdebugread.c (mdebug_build_psymtabs): Likewise.
5934 (add_pending): Likewise.
5935 (parse_symbol): Likewise.
5936 (parse_partial_symbols): Likewise.
5937 (psymtab_to_symtab_1): Likewise.
5938 (new_psymtab): Likewise.
5939 (elfmdebug_build_psymtabs): Likewise.
5940 * minsyms.c (terminate_minimal_symbol_table): Likewise.
5941 * objfiles.c (get_objfile_bfd_data): Likewise.
5942 (objfile_register_static_link): Likewise.
5943 * psymtab.c (allocate_psymtab): Likewise.
5944 * stabsread.c (read_member_functions): Likewise.
5945 * xcoffread.c (xcoff_end_psymtab): Likewise.
5947 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5949 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5950 compiler supports std::is_trivially_constructible.
5951 * common/poison.h: Include obstack.h.
5952 (IsMallocable): Define to is_trivially_constructible if the
5953 compiler supports it, define to true_type otherwise.
5957 (XOBNEWVEC): Redefine.
5958 * gdb_obstack.h (obstack_zalloc): New.
5959 (OBSTACK_ZALLOC): Redefine.
5960 (obstack_calloc): New.
5961 (OBSTACK_CALLOC): Redefine.
5963 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5964 (gdbarch_obstack): New declaration in gdbarch.h, definition in
5966 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5967 obstack_calloc/obstack_zalloc.
5968 (gdbarch_obstack_zalloc): Remove.
5969 * target-descriptions.c (tdesc_data_init): Use obstack_new.
5971 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5973 * stack.c (backtrace_command_1): Remove useless variable int i.
5975 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5977 * stack.c (print_frame_info): Fix comment.
5979 2018-05-18 Tom Tromey <tom@tromey.com>
5981 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5982 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5983 (~dwarf2_per_objfile): Update
5984 (dwarf2_get_dwz_file): Use new.
5985 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5988 2018-05-18 Tom Tromey <tom@tromey.com>
5990 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5992 * dwarf2read.c (struct dwp_file): Add constructor and
5994 (open_and_init_dwp_file): Return a unique_ptr.
5995 (dwarf2_per_objfile, create_dwp_hash_table)
5996 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5997 (lookup_dwo_unit_in_dwp): Update.
5998 (open_and_init_dwp_file, get_dwp_file): Update.
6000 2018-05-18 Tom Tromey <tom@tromey.com>
6002 * dwarf2read.c (dwarf2_per_objfile): Update.
6003 (struct mapped_index): Add initializers.
6004 (dwarf2_read_index): Use new.
6005 (dw2_symtab_iter_init): Update.
6006 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6009 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6011 * dwarf2read.c (mapped_index) <total_size>: Remove.
6013 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6015 * unittests/format_pieces-selftests.c (test_format_specifier):
6018 2018-05-18 Tom Tromey <tom@tromey.com>
6020 * c-typeprint.c (maybe_print_hole): New function.
6021 (c_print_type_struct_field_offset): Update.
6022 (c_type_print_base_struct_union): Call maybe_print_hole.
6024 2018-05-17 Keith Seitz <keiths@redhat.com>
6026 * breakpoint.c (build_bpstat_chain): New function, moved from
6028 (bpstat_stop_status): Add optional parameter, `stop_chain'.
6029 If no stop chain is passed, call build_bpstat_chain to build it.
6030 * breakpoint.h (build_bpstat_chain): Declare.
6031 (bpstat_stop_status): Move documentation here from breakpoint.c.
6032 * infrun.c (handle_signal_stop): Before eliding inlined frames,
6033 build the stop chain and pass it to skip_inline_frames.
6034 Pass this stop chain to bpstat_stop_status.
6035 * inline-frame.c: Include breakpoint.h.
6036 (stopped_by_user_bp_inline_frame): New function.
6037 (skip_inline_frames): Add parameter `stop_chain'.
6038 Move documention to inline-frame.h.
6039 If non-NULL, use stopped_by_user_bp_inline_frame to determine
6040 whether the frame should be elided.
6041 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6042 Add moved documentation and update for new parameter.
6044 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6047 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6048 unittests/format_pieces-selftests.c.
6049 * common/format.h (format_piece) <operator==>: New.
6050 (format_pieces) <operator[]>: Remove.
6051 * common/format.c (format_pieces::format_pieces): Handle \e.
6052 * unittests/format_pieces-selftests.c: New.
6054 2018-05-17 Tom Tromey <tom@tromey.com>
6057 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6058 (dw2_instantiate_symtab): Add skip_partial parameter.
6059 (dw2_find_last_source_symtab, dw2_map_expand_apply)
6060 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6061 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6062 (dw2_expand_symtabs_matching_one)
6063 (dw2_find_pc_sect_compunit_symtab)
6064 (dw2_debug_names_lookup_symbol)
6065 (dw2_debug_names_expand_symtabs_for_function): Update.
6066 (init_cutu_and_read_dies): Add skip_partial parameter.
6067 (process_psymtab_comp_unit, build_type_psymtabs_1)
6068 (process_skeletonless_type_unit, load_partial_comp_unit)
6069 (psymtab_to_symtab_1): Update.
6070 (load_full_comp_unit): Add skip_partial parameter.
6071 (process_imported_unit_die, dwarf2_read_addr_index)
6072 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6073 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6074 (read_signatured_type): Update.
6076 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6078 * value.c (release_value): Remove unused variable.
6079 (record_latest_value): Likewise.
6080 (access_value_history): Likewise.
6081 (preserve_values): Likewise.
6083 2018-05-17 Tom Tromey <tom@tromey.com>
6085 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6088 2018-05-16 Maciej W. Rozycki <macro@mips.com>
6091 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6092 Also handle registers whose width is not a multiple of
6094 (linux_nat_trad_target::store_register): Likewise.
6096 2018-05-16 Tom Tromey <tom@tromey.com>
6098 * gdbcore.h (core_bfd): Redefine.
6099 * corelow.c (core_target::close): Update.
6100 (core_target_open): Update.
6101 * progspace.h (struct program_space) <cbfd>: Now a
6104 2018-05-16 Tom Tromey <tom@tromey.com>
6107 * symfile-add-flags.h (enum symfile_add_flags)
6108 <SYMFILE_NOT_FILENAME>: New constant.
6109 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
6110 objfile name from BFD.
6111 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6112 * minidebug.c (find_separate_debug_file_in_section): Put
6113 ".gnu_debugdata" into BFD's file name.
6115 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
6117 * regcache.c (regcache_read_ftype, regcache_write_ftype):
6120 2018-05-15 Tamar Christina <tamar.christina@arm.com>
6123 * aarch64-tdep.c (aarch64_analyze_prologue,
6124 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6125 Indicate not interested in errors.
6127 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6129 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6130 Supply the MIPS_ZERO_REGNUM register.
6132 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6134 * mips-tdep.c (mask_address_var): Make variable static.
6136 2018-05-14 Tom Tromey <tom@tromey.com>
6138 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6140 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
6142 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6143 FXSAVE_ADDR for the mxcsr register.
6145 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
6147 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6149 2018-05-11 Pedro Alves <palves@redhat.com>
6151 * corelow.c (core_target) <core_target>: No longer inline.
6152 Initialize m_core_gdbarch, m_core_vec and build the section table
6154 <~core_target>: New.
6155 <core_gdbarch, get_core_register_section>: New methods.
6156 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6157 factored out from ...
6158 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6160 (sniff_core_bfd): Add gdbarch parameter.
6161 (core_close): Delete, merged into ...
6162 (core_target::close): ... here. Delete self.
6163 (core_close_cleanup): Delete.
6164 (core_target_open): Allocate a core_target on the heap. Use a
6165 unique_ptr instead of a cleanup. Bits moved into the core_target
6166 ctor. Adjust to use core_target methods instead of globals.
6167 (get_core_register_section): Rename to ...
6168 (core_target::get_core_register_section): ... this and adjust.
6169 (struct get_core_registers_cb_data): New.
6170 (get_core_registers_cb): Use it. Use bool.
6171 (core_target::fetch_registers, core_target::files_info)
6172 (core_target::xfer_partial, core_target::read_description)
6173 (core_target::pid_to, core_target::thread_name): Adjust to
6174 reference class fields instead of globals.
6175 * target.h (struct target_ops_deleter, target_ops_up): New.
6177 2018-05-11 Pedro Alves <palves@redhat.com>
6179 * corefile.c (core_file_command): Move to corelow.c.
6180 * corelow.c (the_core_target): Delete.
6181 (core_file_command): Moved from corefile.c. Check exec_bfd
6182 instead of the_core_target. Use target_detach instead of calling
6183 into the_core_target directly.
6184 (maybe_say_no_core_file_now): New.
6185 (core_target::detach): Use it.
6186 (_initialize_corelow): Remove references to the_core_target.
6187 * gdbcore.h (the_core_target): Delete.
6189 2018-05-11 Tom Tromey <tromey@redhat.com>
6190 Pedro Alves <palves@redhat.com>
6192 * corefile.c (core_bfd): Remove.
6193 * gdbcore.h (core_bfd): Now a macro.
6194 * progspace.h (struct program_space) <cbfd>: New field.
6196 2018-05-11 Tom Tromey <tom@tromey.com>
6198 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6201 2018-05-10 Tom Tromey <tom@tromey.com>
6203 * configure: Rebuild.
6204 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6206 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6209 * regformats/regdat.sh: Adjust script, following the addition
6210 of the new expedite_regs parameter to init_target_desc.
6212 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
6215 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6216 set_gdbarch_significant_addr_bit.
6217 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6218 set_gdbarch_significant_addr_bit.
6219 * utils.c (address_significant): Update to sign extend addr.
6221 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
6223 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6224 (xtensa_linux_init_abi): Limit tdep->num_regs by
6225 tdep->num_nopriv_regs.
6226 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6227 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6230 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
6232 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6234 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
6236 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6237 (I387_MXCSR_INIT_VAL): New constant.
6238 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6239 buffer if it was supplied by the inferior.
6240 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6241 (i387_xsave_get_clear_bv): New function.
6242 (i387_supply_xsave): Only read x87 control registers from the
6243 xsave buffer if the feature is enabled, and the state will have
6244 been written, otherwise, provide a suitable default.
6245 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6246 including x87 control registers. Update control registers if they
6247 have changed from the default value, and mark features as enabled
6249 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6251 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6253 * spu-tdep.c (info_spu_event_command): Fix output formatting.
6255 2018-05-07 Tom Tromey <tom@tromey.com>
6257 * configure: Rebuild.
6258 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6260 2018-05-07 Tom Tromey <tom@tromey.com>
6263 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6264 bit. Use correct value for VDIV.
6266 2018-05-04 Tom Tromey <tom@tromey.com>
6268 * configure: Rebuild.
6269 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6271 2018-05-04 Tom Tromey <tom@tromey.com>
6273 * linux-record.c (record_linux_system_call) <case
6274 RECORD_SYS_RECVFROM>: Add "break".
6276 2018-05-04 Tom Tromey <tom@tromey.com>
6278 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6279 Add missing "break".
6280 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6281 Add missing "break".
6283 2018-05-04 Tom Tromey <tom@tromey.com>
6285 * rs6000-tdep.c (ppc_process_record_op4)
6286 (ppc_process_record_op63): Add fall-through comment.
6288 2018-05-04 Tom Tromey <tom@tromey.com>
6290 * i386-tdep.c (i386_process_record): Add fall-through comment.
6292 2018-05-04 Tom Tromey <tom@tromey.com>
6294 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6297 2018-05-04 Tom Tromey <tom@tromey.com>
6299 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6300 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6301 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6303 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6305 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6308 2018-05-04 Tom Tromey <tom@tromey.com>
6310 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6312 2018-05-04 Tom Tromey <tom@tromey.com>
6314 * s390-tdep.c (s390_process_record): Fix fall-through comments.
6315 * xcoffread.c (scan_xcoff_symtab): Move comment later.
6316 * symfile.c (section_is_mapped): Fix fall-through comment.
6317 * stabsread.c (define_symbol, read_member_functions): Fix
6318 fall-through comment.
6319 * s390-linux-tdep.c (s390_process_record): Fix fall-through
6321 * remote.c (remote_wait_as): Fix fall-through comment.
6322 * p-exp.y (yylex): Fix fall-through comment.
6323 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6325 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6326 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6327 * jv-exp.y (yylex): Fix fall-through comment.
6328 * go-exp.y (lex_one_token): Fix fall-through comment.
6329 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6330 fall-through comment.
6331 * f-exp.y (yylex): Fix fall-through comment.
6332 * dwarf2read.c (process_die): Fix fall-through comments.
6333 * dbxread.c (process_one_symbol): Fix fall-through comment.
6334 * d-exp.y (lex_one_token): Fix fall-through comment.
6335 * cp-name-parser.y (yylex): Fix fall-through comment.
6336 * coffread.c (coff_symtab_read): Fix fall-through comment.
6337 * c-exp.y (lex_one_token): Fix fall-through comment.
6338 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6340 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6343 2018-05-04 Tom Tromey <tom@tromey.com>
6346 * NEWS: Mention gdb.execute change.
6347 * gdbcmd.h (execute_control_command): Don't declare.
6348 * python/python.c (execute_gdb_command): Use read_command_lines_1,
6349 execute_control_commands, execute_control_commands_to_string.
6350 * cli/cli-script.h (execute_control_commands)
6351 (execute_control_commands_to_string): Declare.
6352 (execute_control_command): Add from_tty parameter.
6353 * cli/cli-script.c (execute_control_commands)
6354 (execute_control_commands_to_string): New functions.
6355 (execute_user_command): Use execute_control_commands.
6356 (execute_control_command_1): Add "from_tty" parameter. Update.
6357 (execute_control_command): Likewise.
6359 2018-05-04 Tom Tromey <tom@tromey.com>
6362 * NEWS: Mention that breakpoint commands are writable.
6363 * python/py-breakpoint.c (bppy_set_commands): New function.
6364 (breakpoint_object_getset) <"commands">: Use it.
6366 2018-05-04 Tom Tromey <tom@tromey.com>
6368 * tracepoint.c (actions_command): Update.
6369 * mi/mi-cmd-break.c (mi_command_line_array)
6370 (mi_command_line_array_cnt, mi_command_line_array_ptr)
6371 (mi_read_next_line): Remove.
6372 (mi_cmd_break_commands): Update.
6373 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6375 * cli/cli-script.c (get_command_line): Update.
6376 (process_next_line): Use function_view. Constify.
6377 (recurse_read_control_structure, read_command_lines)
6378 (read_command_lines_1): Change argument types to function_view.
6379 (do_define_command, document_command): Update.
6380 * breakpoint.h (check_tracepoint_command): Don't declare.
6381 * breakpoint.c (check_tracepoint_command): Remove.
6382 (commands_command_1, create_tracepoint_from_upload): Update.
6384 2018-05-04 Tom Tromey <tom@tromey.com>
6387 * cli/cli-script.h (enum command_control_type) <define_control>:
6389 * cli/cli-script.c (multi_line_command_p): Handle define_control.
6390 (build_command_line, execute_control_command_1)
6391 (process_next_line): Likewise.
6392 (do_define_command): New function, extracted from define_command.
6393 (define_command): Use it.
6395 2018-05-04 Tom Tromey <tom@tromey.com>
6397 * tracepoint.c (actions_command): Update.
6398 * cli/cli-script.h (read_command_lines): Update.
6399 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6400 (MAX_TMPBUF): Remove define.
6401 (define_command): Use string_printf.
6402 (document_command): Likewise.
6403 * breakpoint.c (commands_command_1): Update.
6405 2018-05-04 Tom Tromey <tom@tromey.com>
6407 * top.c (execute_command): Update.
6408 * cli/cli-script.h (print_command_lines): Now varargs.
6409 * cli/cli-script.c (print_command_lines): Now varargs.
6410 (execute_control_command_1) <case while_control, case if_control>:
6413 2018-05-04 Tom Tromey <tom@tromey.com>
6415 * tracepoint.c (all_tracepoint_actions): Rename from
6416 all_tracepoint_actions_and_cleanup. Change return type.
6417 (actions_command, encode_actions_1, encode_actions)
6418 (trace_dump_actions, tdump_command): Update.
6419 * remote.c (remote_download_command_source): Update.
6420 * python/python.c (gdbpy_eval_from_control_command)
6421 (python_command, python_interactive_command): Update.
6422 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6423 * guile/guile.c (guile_command)
6424 (gdbscm_eval_from_control_command, guile_command): Update.
6425 * compile/compile.c (compile_code_command)
6426 (compile_print_command, compile_to_object): Update.
6427 * cli/cli-script.h (struct command_lines_deleter): New.
6428 (counted_command_line): New typedef.
6429 (struct command_line): Add constructor, destructor.
6430 <body_list>: Remove.
6431 <body_list_0, body_list_1>: New members.
6432 (command_line_up): Remove typedef.
6433 (read_command_lines, read_command_lines_1, get_command_line):
6435 (copy_command_lines): Don't declare.
6436 * cli/cli-script.c (build_command_line): Use "new".
6437 (get_command_line): Return counted_command_line.
6438 (print_command_lines, execute_user_command)
6439 (execute_control_command_1, while_command, if_command): Update.
6440 (realloc_body_list): Remove.
6441 (process_next_line, recurse_read_control_structure): Update.
6442 (read_command_lines, read_command_lines_1): Return counted_command_line.
6443 (free_command_lines): Use "delete".
6444 (copy_command_lines): Remove.
6445 (define_command, document_command, show_user_1): Update.
6446 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6447 a counted_command_line.
6448 * breakpoint.h (counted_command_line): Remove typedef.
6449 (breakpoint_set_commands): Update.
6450 * breakpoint.c (check_no_tracepoint_commands)
6451 (validate_commands_for_breakpoint): Update.
6452 (breakpoint_set_commands): Change commands to be a
6453 counted_command_line.
6454 (commands_command_1, update_dprintf_command_list)
6455 (create_tracepoint_from_upload): Update.
6457 2018-05-04 Tom Tromey <tom@tromey.com>
6459 * cli/cli-decode.h (cmd_list_element): New constructor.
6460 (~cmd_list_element): New destructor.
6461 (struct cmd_list_element): Add initializers.
6462 * cli/cli-decode.c (do_add_cmd): Use "new".
6463 (delete_cmd): Use "delete".
6465 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6466 Pedro Alves <palves@redhat.com>
6468 PR breakpoints/19806 and support for PR external/20207.
6469 * NEWS: Mention Aarch64 watchpoint improvements.
6470 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6471 watchpoints and PR external/20207 watchpoints.
6472 * nat/aarch64-linux-hw-point.c
6473 (kernel_supports_any_contiguous_range): New.
6474 (aarch64_watchpoint_offset): New.
6475 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6476 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6477 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6478 (aarch64_align_watchpoint): New parameters aligned_offset_p and
6479 next_addr_orig_p. Support PR external/20207 watchpoints.
6480 (aarch64_downgrade_regs): New.
6481 (aarch64_dr_state_insert_one_point): New parameters offset and
6483 (aarch64_dr_state_remove_one_point): Likewise.
6484 (aarch64_handle_breakpoint): Update caller.
6485 (aarch64_handle_aligned_watchpoint): Likewise.
6486 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6488 (aarch64_linux_set_debug_regs): Remove const from state. Call
6489 aarch64_downgrade_regs.
6490 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6491 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6492 (DR_CONTROL_MASK): ... this.
6493 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6494 (unsigned int aarch64_watchpoint_offset): New prototype.
6495 (aarch64_linux_set_debug_regs): Remove const from state.
6496 * utils.c (align_up, align_down): Move to ...
6497 * common/common-utils.c (align_up, align_down): ... here.
6498 * utils.h (align_up, align_down): Move to ...
6499 * common/common-utils.h (align_up, align_down): ... here.
6501 2018-05-04 Joel Brobecker <brobecker@adacore.com>
6503 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6504 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6505 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6506 Re-implement to match the ABI as summarized in GCC's
6507 gcc/config/sparc/sparc.c. All callers updated.
6508 (sparc32_store_arguments): Remove assertion.
6510 2018-05-04 Tom Tromey <tom@tromey.com>
6512 * printcmd.c: Don't include tui.h.
6513 (decode_format): Use skip_spaces.
6515 2018-05-04 Tom Tromey <tom@tromey.com>
6518 * printcmd.c (last_count): New global.
6519 (x_command): Use saved count when repeating.
6521 2018-05-04 Tom Tromey <tom@tromey.com>
6523 * nto-procfs.c (do_closedir_cleanup): Remove.
6524 (procfs_pidlist): Use gdb_dir_up.
6525 * procfs.c (do_closedir_cleanup): Remove.
6526 (proc_update_threads): Use gdb_dir_up.
6527 * common/filestuff.h (struct gdb_dir_deleter): New.
6528 (gdb_dir_up): New typedef.
6530 2018-05-04 Tom Tromey <tom@tromey.com>
6532 * ada-lang.c (print_mention_exception): Use std::string.
6534 2018-05-04 Tom Tromey <tom@tromey.com>
6536 * ada-lang.c (create_excep_cond_exprs): Update.
6537 (ada_exception_catchpoint_cond_string): Use std::string.
6539 2018-05-04 Tom Tromey <tom@tromey.com>
6541 * ada-lang.c (xget_renaming_scope): Return std::string.
6542 (old_renaming_is_invisible): Update.
6544 2018-05-04 Tom Tromey <tom@tromey.com>
6546 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6547 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6549 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
6551 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6553 2018-05-04 Tom Tromey <tom@tromey.com>
6555 * remote.c (remote_query_supported_append): Change type.
6556 (remote_check_symbols): Update.
6558 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
6561 * configure.ac: Prepend libpython.
6562 * python/python-config.py: Likewise.
6563 * configure: Regenerate.
6565 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
6567 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6569 2018-05-03 Pedro Alves <palves@redhat.com>
6572 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6573 override. Write 'true' instead of '1'.
6574 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6577 2018-05-02 Pedro Alves <palves@redhat.com>
6579 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6580 add_inf_child_target.
6581 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6582 add_inf_child_target.
6583 * aix-thread.c (aix_thread_target_info): New.
6584 (aix_thread_target) <shortname, longname, doc>: Delete.
6586 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6587 add_inf_child_target.
6588 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6589 add_inf_child_target.
6590 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6591 add_inf_child_target.
6592 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6593 add_inf_child_target.
6594 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6595 add_inf_child_target.
6596 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6597 add_inf_child_target.
6598 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6599 add_inf_child_target.
6600 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6601 add_inf_child_target.
6602 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6603 add_inf_child_target.
6604 * bfd-target.c (target_bfd_target_info): New.
6605 (target_bfd) <shortname, longname, doc>: Delete.
6607 * bsd-kvm.c (bsd_kvm_target_info): New.
6608 (bsd_kvm_target) <shortname, longname, doc>: Delete.
6610 (bsd_kvm_target::open): Rename to ...
6611 (bsd_kvm_target_open): ... this. Adjust.
6612 * bsd-uthread.c (bsd_uthread_target_info): New.
6613 (bsd_uthread_target) <shortname, longname, doc>: Delete.
6615 * corefile.c (core_file_command): Adjust.
6616 * corelow.c (core_target_info): New.
6617 (core_target) <shortname, longname, doc>: Delete.
6619 (core_target::open): Rename to ...
6620 (core_target_open): ... this. Adjust.
6621 * ctf.c (ctf_target_info): New.
6622 (ctf_target) <shortname, longname, doc>: Delete.
6624 (ctf_target::open): Rename to ...
6625 (ctf_target_open): ... this.
6626 (_initialize_ctf): Adjust.
6627 * exec.c (exec_target_info): New.
6628 (exec_target) <shortname, longname, doc>: Delete.
6630 (exec_target::open): Rename to ...
6631 (exec_target_open): ... this.
6632 * gdbcore.h (core_target_open): Declare.
6633 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6634 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6635 add_inf_child_target.
6636 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6637 add_inf_child_target.
6638 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6639 add_inf_child_target.
6640 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6641 add_inf_child_target.
6642 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6643 add_inf_child_target.
6644 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6645 add_inf_child_target.
6646 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6647 add_inf_child_target.
6648 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6649 add_inf_child_target.
6650 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6651 add_inf_child_target.
6652 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6653 add_inf_child_target.
6654 * inf-child.c (inf_child_target_info): New.
6655 (inf_child_target::info): New.
6656 (inf_child_open_target): Remove 'target' parameter. Use
6657 get_native_target instead.
6658 (inf_child_target::open): Delete.
6659 (add_inf_child_target): New.
6660 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6663 (add_inf_child_target): Declare.
6664 (inf_child_open_target): Declare.
6665 * linux-thread-db.c (thread_db_target_info): New.
6666 (thread_db_target) <shortname, longname, doc>: Delete.
6668 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6669 add_inf_child_target.
6670 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6671 add_inf_child_target.
6672 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6673 add_inf_child_target.
6674 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6675 add_inf_child_target.
6676 * make-target-delegates (print_class): Adjust.
6677 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6678 add_inf_child_target.
6679 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6680 add_inf_child_target.
6681 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6682 add_inf_child_target.
6683 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6684 add_inf_child_target.
6685 * nto-procfs.c (nto_native_target_info): New.
6686 (nto_procfs_target_native) <shortname, longname, doc>:
6689 (nto_procfs_target_info): New.
6690 (nto_procfs_target_procfs) <shortname, longname, doc>:
6693 (init_procfs_targets): Adjust.
6694 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6695 add_inf_child_target.
6696 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6697 add_inf_child_target.
6698 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6699 add_inf_child_target.
6700 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6701 add_inf_child_target.
6702 * ravenscar-thread.c (ravenscar_target_info): New.
6703 (ravenscar_thread_target) <shortname, longname, doc>:
6706 * record-btrace.c (record_btrace_target_info):
6707 (record_btrace_target) <shortname, longname, doc>: Delete.
6709 (record_btrace_target::open): Rename to ...
6710 (record_btrace_target_open): ... this. Adjust.
6711 * record-full.c (record_longname, record_doc): New.
6712 (record_full_base_target) <shortname, longname, doc>: Delete.
6714 (record_full_target_info): New.
6715 (record_full_target): <shortname>: Delete.
6717 (record_full_core_open_1, record_full_open_1): Update comments.
6718 (record_full_base_target::open): Rename to ...
6719 (record_full_open): ... this.
6720 (cmd_record_full_restore): Update.
6721 (_initialize_record_full): Update.
6722 * remote-sim.c (remote_sim_target_info): New.
6723 (gdbsim_target) <shortname, longname, doc>: Delete.
6725 (gdbsim_target::open): Rename to ...
6726 (gdbsim_target_open): ... this.
6727 (_initialize_remote_sim): Adjust.
6728 * remote.c (remote_doc): New.
6729 (remote_target_info): New.
6730 (remote_target) <shortname, longname, doc>: Delete.
6732 (extended_remote_target_info): New.
6733 (extended_remote_target) <shortname, longname, doc>: Delete.
6735 (remote_target::open_1): Make static. Adjust.
6736 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6737 * s390-linux-nat.c (_initialize_s390_nat): Use
6738 add_inf_child_target.
6739 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6740 add_inf_child_target.
6741 * sol-thread.c (thread_db_target_info): New.
6742 (sol_thread_target) <shortname, longname, doc>: Delete.
6744 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6745 add_inf_child_target.
6746 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6747 add_inf_child_target.
6748 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6749 add_inf_child_target.
6750 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6751 add_inf_child_target.
6752 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6753 add_inf_child_target.
6754 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6755 add_inf_child_target.
6756 * spu-linux-nat.c (_initialize_spu_nat): Use
6757 add_inf_child_target.
6758 * spu-multiarch.c (spu_multiarch_target_info): New.
6759 (spu_multiarch_target) <shortname, longname, doc>: Delete.
6761 * target-delegates.c: Regenerate.
6762 * target.c: Include <unordered_map>.
6763 (target_ops_p): Delete.
6764 (DEF_VEC_P(target_ops_p)): Delete.
6765 (target_factories): New.
6766 (test_target_info): New.
6767 (test_target_ops::info): New.
6768 (open_target): Adjust to use target_factories.
6769 (add_target_with_completer): Rename to ...
6770 (add_target): ... this. Change prototype. Register target_info
6771 and open callback in target_factories. Register target_info in
6772 command context instead of target_ops.
6773 (add_target): Delete old implementation.
6774 (add_deprecated_target_alias): Change prototype. Adjust.
6775 (the_native_target): New.
6776 (set_native_target, get_native_target): New.
6777 (find_default_run_target): Use the_native_target.
6778 (find_attach_target, find_run_target): Simplify.
6779 (target_ops::open): Delete.
6780 (dummy_target_info): New.
6781 (dummy_target::shortname, dummy_target::longname)
6782 (dummy_target::doc): Delete.
6783 (dummy_target::info): New.
6784 (debug_target::shortname, debug_target::longname)
6785 (debug_target::doc): Delete.
6786 (debug_target::info): New.
6787 * target.h (struct target_info): New.
6788 (target_ops::~target_ops): Add comment.
6789 (target_ops::info): New.
6790 (target_ops::shortname, target_ops::longname, target_ops::doc): No
6791 longer virtual. Implement in terms of target_info.
6792 (set_native_target, get_native_target): Declare.
6793 (target_open_ftype): New.
6794 (add_target, add_target_with_completer)
6795 (add_deprecated_target_alias): Change prototype.
6796 (test_target) <shortname, longname, doc>: Delete.
6798 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6799 add_inf_child_target.
6800 * tracefile-tfile.c (tfile_target_info): New.
6801 (tfile_target) <shortname, longname, doc>: Delete.
6803 (tfile_target::open): Rename to ...
6804 (tfile_target_open): ... this.
6805 (_initialize_tracefile_tfile): Adjust.
6806 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6807 add_inf_child_target.
6808 * windows-nat.c (_initialize_windows_nat): Use
6809 add_inf_child_target.
6810 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6811 add_inf_child_target.
6813 2018-05-02 Pedro Alves <palves@redhat.com>
6815 * linux-nat.h (linux_nat_target) <low_new_thread,
6816 low_delete_thread, low_new_fork, low_forget_process,
6817 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6818 New virtual methods.
6819 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6820 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6821 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6822 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6823 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6825 * linux-fork.c (delete_fork): Adjust to call low method.
6826 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6827 (linux_nat_new_fork, linux_nat_forget_process_hook)
6828 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6829 (linux_nat_status_is_event):
6830 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6831 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6833 (sigtrap_is_event): Rename to ...
6834 (linux_nat_target::low_status_is_event): ... this.
6835 (linux_nat_set_status_is_event): Delete.
6836 (save_stop_reason, linux_nat_wait_1)
6837 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6839 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6840 (linux_nat_set_new_fork, linux_nat_set_forget_process)
6841 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6842 (linux_nat_set_prepare_to_resume): Delete.
6843 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6844 low virtual methods.
6845 * amd64-linux-nat.c: Likewise.
6846 * arm-linux-nat.c: Likewise.
6847 * i386-linux-nat.c: Likewise.
6848 * ia64-linux-nat.c: Likewise.
6849 * mips-linux-nat.c: Likewise.
6850 * ppc-linux-nat.c: Likewise.
6851 * s390-linux-nat.c: Likewise.
6852 * sparc64-linux-nat.c: Likewise.
6853 * x86-linux-nat.c: Likewise.
6854 * x86-linux-nat.h: Include "nat/x86-linux.h".
6855 (x86_linux_nat_target) <low_new_fork, low_forget_process,
6856 low_prepare_to_resume, low_new_thread, low_delete_thread>:
6859 2018-05-02 Pedro Alves <palves@redhat.com>
6861 * target.h (target_ops)
6862 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6863 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6864 stopped_by_watchpoint, have_continuable_watchpoint,
6865 stopped_data_address, watchpoint_addr_within_range,
6866 can_accel_watchpoint_condition, can_run, thread_alive,
6867 has_all_memory, has_memory, has_stack, has_registers,
6868 has_execution, can_async_p, is_async_p, supports_non_stop,
6869 always_non_stop_p, can_execute_reverse, supports_multi_process,
6870 supports_enable_disable_tracepoint,
6871 supports_disable_randomization, supports_string_tracing,
6872 supports_evaluation_of_breakpoint_conditions,
6873 can_run_breakpoint_commands, filesystem_is_local,
6874 can_download_tracepoint, get_trace_state_variable_value,
6875 set_trace_notes, get_tib_address, use_agent, can_use_agent,
6876 record_is_replaying, record_will_replay,
6877 augmented_libraries_svr4_read>: Adjust to return bool.
6878 * aarch64-linux-nat.c: All implementations adjusted.
6879 * aix-thread.c: All implementations adjusted.
6880 * arm-linux-nat.c: All implementations adjusted.
6881 * breakpoint.c: All implementations adjusted.
6882 * bsd-kvm.c: All implementations adjusted.
6883 * bsd-uthread.c: All implementations adjusted.
6884 * corelow.c: All implementations adjusted.
6885 * ctf.c: All implementations adjusted.
6886 * darwin-nat.c: All implementations adjusted.
6887 * darwin-nat.h: All implementations adjusted.
6888 * exec.c: All implementations adjusted.
6889 * fbsd-nat.c: All implementations adjusted.
6890 * fbsd-nat.h: All implementations adjusted.
6891 * gnu-nat.c: All implementations adjusted.
6892 * gnu-nat.h: All implementations adjusted.
6893 * go32-nat.c: All implementations adjusted.
6894 * ia64-linux-nat.c: All implementations adjusted.
6895 * inf-child.c: All implementations adjusted.
6896 * inf-child.h: All implementations adjusted.
6897 * inf-ptrace.c: All implementations adjusted.
6898 * inf-ptrace.h: All implementations adjusted.
6899 * linux-nat.c: All implementations adjusted.
6900 * linux-nat.h: All implementations adjusted.
6901 * mips-linux-nat.c: All implementations adjusted.
6902 * nto-procfs.c: All implementations adjusted.
6903 * ppc-linux-nat.c: All implementations adjusted.
6904 * procfs.c: All implementations adjusted.
6905 * ravenscar-thread.c: All implementations adjusted.
6906 * record-btrace.c: All implementations adjusted.
6907 * record-full.c: All implementations adjusted.
6908 * remote-sim.c: All implementations adjusted.
6909 * remote.c: All implementations adjusted.
6910 * s390-linux-nat.c: All implementations adjusted.
6911 * sol-thread.c: All implementations adjusted.
6912 * spu-multiarch.c: All implementations adjusted.
6913 * target-delegates.c: All implementations adjusted.
6914 * target.c: All implementations adjusted.
6915 * target.h: All implementations adjusted.
6916 * tracefile-tfile.c: All implementations adjusted.
6917 * tracefile.c: All implementations adjusted.
6918 * tracefile.h: All implementations adjusted.
6919 * windows-nat.c: All implementations adjusted.
6920 * x86-linux-nat.h: All implementations adjusted.
6921 * x86-nat.h: All implementations adjusted.
6923 2018-05-02 Pedro Alves <palves@redhat.com>
6925 * make-target-delegates (scan_target_h): Don't trim lines here.
6926 Replace sequences of tabs and/or whitespace with a single
6928 (top level, parsing methods): Trim each line before processing it
6931 2018-05-02 Pedro Alves <palves@redhat.com>
6932 John Baldwin <jhb@freebsd.org>
6934 * target.h (enum strata) <debug_stratum>: New.
6935 (struct target_ops) <all delegation methods>: Replace by C++
6936 virtual methods, and drop "to_" prefix. All references updated
6938 <to_shortname, to_longname, to_doc, to_data,
6939 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6940 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6941 virtual methods. All references updated throughout.
6942 <can_attach, supports_terminal_ours, can_create_inferior,
6943 get_thread_control_capabilities, attach_no_wait>: New
6945 <insert_breakpoint, remove_breakpoint>: Now
6946 TARGET_DEFAULT_NORETURN methods.
6947 <info_proc>: Now returns bool.
6949 (OPS_MAGIC): Delete.
6950 (current_target): Delete. All references replaced by references
6952 (target_stack): ... this. New.
6953 (target_shortname, target_longname): Adjust.
6954 (target_can_run): Now a function declaration.
6955 (default_child_has_all_memory, default_child_has_memory)
6956 (default_child_has_stack, default_child_has_registers)
6957 (default_child_has_execution): Remove target_ops parameter.
6958 (complete_target_initialization): Delete.
6959 (memory_breakpoint_target): New template class.
6960 (test_target_ops): Refactor as a C++ class with virtual methods.
6961 * make-target-delegates (NAME_PART): Tighten.
6962 (POINTER_PART, CP_SYMBOL): New.
6963 (SIMPLE_RETURN_PART): Reimplement.
6964 (VEC_RETURN_PART): Expect less.
6965 (RETURN_PART, VIRTUAL_PART): New.
6966 (METHOD): Adjust to C++ virtual methods.
6967 (scan_target_h): Remove reference to C99.
6968 (dname): Output "target_ops::" prefix.
6969 (write_function_header): Adjust to output a C++ class method.
6970 (write_declaration): New.
6971 (write_delegator): Adjust to output a C++ class method.
6972 (tdname): Output "dummy_target::" prefix.
6973 (write_tdefault, write_debugmethod): Adjust to output a C++ class
6975 (tdefault_names, debug_names): Delete.
6976 (return_types, tdefaults, styles, argtypes_array): New.
6977 (top level): All methods are delegators.
6979 (top level): Print dummy_target and debug_target classes.
6980 * target-delegates.c: Regenerate.
6981 * target-debug.h (target_debug_print_enum_info_proc_what)
6982 (target_debug_print_thread_control_capabilities)
6983 (target_debug_print_thread_info_p): New.
6984 * target.c (dummy_target): Delete.
6985 (the_dummy_target, the_debug_target): New.
6986 (target_stack): Now extern.
6987 (set_targetdebug): Push/unpush debug target.
6988 (default_child_has_all_memory, default_child_has_memory)
6989 (default_child_has_stack, default_child_has_registers)
6990 (default_child_has_execution): Remove target_ops parameter.
6991 (complete_target_initialization): Delete.
6992 (add_target_with_completer): No longer call
6993 complete_target_initialization.
6994 (target_supports_terminal_ours): Use regular delegation.
6995 (update_current_target): Delete.
6996 (push_target): No longer check magic number. Don't call
6997 update_current_target.
6998 (unpush_target): Don't call update_current_target.
6999 (target_is_pushed): No longer check magic number.
7000 (target_require_runnable): Skip for all stratums over
7002 (target_ops::info_proc): New.
7003 (target_info_proc): Use find_target_at and
7004 find_default_run_target.
7005 (target_supports_disable_randomization): Use regular delegation.
7006 (target_get_osdata): Use find_target_at.
7007 (target_ops::open, target_ops::close, target_ops::can_attach)
7008 (target_ops::attach, target_ops::can_create_inferior)
7009 (target_ops::create_inferior, target_ops::can_run)
7010 (target_can_run): New.
7011 (default_fileio_target): Use regular delegation.
7012 (target_ops::fileio_open, target_ops::fileio_pwrite)
7013 (target_ops::fileio_pread, target_ops::fileio_fstat)
7014 (target_ops::fileio_close, target_ops::fileio_unlink)
7015 (target_ops::fileio_readlink): New.
7016 (target_fileio_open_1, target_fileio_unlink)
7017 (target_fileio_readlink): Always call the target method. Handle
7019 (return_zero, return_zero_has_execution): Delete.
7020 (init_dummy_target): Delete.
7021 (dummy_target::dummy_target, dummy_target::shortname)
7022 (dummy_target::longname, dummy_target::doc)
7023 (debug_target::debug_target, debug_target::shortname)
7024 (debug_target::longname, debug_target::doc): New.
7025 (target_supports_delete_record): Use regular delegation.
7026 (setup_target_debug): Delete.
7027 (maintenance_print_target_stack): Skip debug_stratum.
7028 (initialize_targets): Instantiate the_dummy_target and
7030 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
7032 (target_auxv_search, fprint_target_auxv): Adjust.
7033 (info_auxv_command): Adjust to use target_stack.
7034 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7035 * exceptions.c (print_flush): Handle a NULL target_stack.
7036 * regcache.c (target_ops_no_register): Refactor as class with
7039 * exec.c (exec_target): New class.
7040 (exec_ops): Now an exec_target.
7041 (exec_open, exec_close_1, exec_get_section_table)
7042 (exec_xfer_partial, exec_files_info, exec_has_memory)
7043 (exec_make_note_section): Refactor as exec_target methods.
7044 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7046 (exec_target::find_memory_regions): New.
7047 (_initialize_exec): Don't call init_exec_ops.
7048 * gdbcore.h (exec_file_clear): Delete.
7050 * corefile.c (core_target): Delete.
7051 (core_file_command): Adjust.
7052 * corelow.c (core_target): New class.
7053 (the_core_target): New.
7054 (core_close): Remove target_ops parameter.
7055 (core_close_cleanup): Adjust.
7056 (core_target::close): New.
7057 (core_open, core_detach, get_core_registers, core_files_info)
7058 (core_xfer_partial, core_thread_alive, core_read_description)
7059 (core_pid_to_str, core_thread_name, core_has_memory)
7060 (core_has_stack, core_has_registers, core_info_proc): Rework as
7061 core_target methods.
7062 (ignore, core_remove_breakpoint, init_core_ops): Delete.
7063 (_initialize_corelow): Initialize the_core_target.
7064 * gdbcore.h (core_target): Delete.
7065 (the_core_target): New.
7067 * ctf.c: (ctf_target): New class.
7068 (ctf_ops): Now a ctf_target.
7069 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7070 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7071 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7073 (init_ctf_ops): Delete.
7074 (_initialize_ctf): Don't call it.
7075 * tracefile-tfile.c (tfile_target): New class.
7076 (tfile_ops): Now a tfile_target.
7077 (tfile_open, tfile_close, tfile_files_info)
7078 (tfile_get_tracepoint_status, tfile_trace_find)
7079 (tfile_fetch_registers, tfile_xfer_partial)
7080 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7081 Refactor as tfile_target methods.
7082 (tfile_xfer_partial_features): Remove target_ops parameter.
7083 (init_tfile_ops): Delete.
7084 (_initialize_tracefile_tfile): Don't call it.
7085 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7086 (tracefile_has_stack, tracefile_has_registers)
7087 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7088 tracefile_target methods.
7089 (init_tracefile_ops): Delete.
7090 (tracefile_target::tracefile_target): New.
7091 * tracefile.h: Include "target.h".
7092 (tracefile_target): New class.
7093 (init_tracefile_ops): Delete.
7095 * spu-multiarch.c (spu_multiarch_target): New class.
7096 (spu_ops): Now a spu_multiarch_target.
7097 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7098 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7099 (spu_search_memory, spu_mourn_inferior): Refactor as
7100 spu_multiarch_target methods.
7101 (init_spu_ops): Delete.
7102 (_initialize_spu_multiarch): Remove references to init_spu_ops,
7103 complete_target_initialization.
7105 * ravenscar-thread.c (ravenscar_thread_target): New class.
7106 (ravenscar_ops): Now a ravenscar_thread_target.
7107 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7108 (ravenscar_thread_alive, ravenscar_pid_to_str)
7109 (ravenscar_fetch_registers, ravenscar_store_registers)
7110 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7111 (ravenscar_stopped_by_hw_breakpoint)
7112 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7113 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7114 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7116 (init_ravenscar_thread_ops): Delete.
7117 (_initialize_ravenscar): Remove references to
7118 init_ravenscar_thread_ops and complete_target_initialization.
7120 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7121 (bsd_uthread_target): New class.
7122 (bsd_uthread_ops): Now a bsd_uthread_target.
7123 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7124 (bsd_uthread_close, bsd_uthread_mourn_inferior)
7125 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7126 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7127 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7128 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7129 (bsd_uthread_target): Delete function.
7130 (_initialize_bsd_uthread): Remove reference to
7131 complete_target_initialization.
7133 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
7134 (target_bfd): ... this new class.
7135 (target_bfd_xfer_partial, target_bfd_get_section_table)
7136 (target_bfd_close): Refactor as target_bfd methods.
7137 (target_bfd::~target_bfd): New.
7138 (target_bfd_reopen): Adjust.
7139 (target_bfd::close): New.
7141 * record-btrace.c (record_btrace_target): New class.
7142 (record_btrace_ops): Now a record_btrace_target.
7143 (record_btrace_open, record_btrace_stop_recording)
7144 (record_btrace_disconnect, record_btrace_close)
7145 (record_btrace_async, record_btrace_info)
7146 (record_btrace_insn_history, record_btrace_insn_history_range)
7147 (record_btrace_insn_history_from, record_btrace_call_history)
7148 (record_btrace_call_history_range)
7149 (record_btrace_call_history_from, record_btrace_record_method)
7150 (record_btrace_is_replaying, record_btrace_will_replay)
7151 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7152 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7153 (record_btrace_store_registers, record_btrace_prepare_to_store)
7154 (record_btrace_to_get_unwinder)
7155 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7156 (record_btrace_commit_resume, record_btrace_wait)
7157 (record_btrace_stop, record_btrace_can_execute_reverse)
7158 (record_btrace_stopped_by_sw_breakpoint)
7159 (record_btrace_supports_stopped_by_sw_breakpoint)
7160 (record_btrace_stopped_by_hw_breakpoint)
7161 (record_btrace_supports_stopped_by_hw_breakpoint)
7162 (record_btrace_update_thread_list, record_btrace_thread_alive)
7163 (record_btrace_goto_begin, record_btrace_goto_end)
7164 (record_btrace_goto, record_btrace_stop_replaying_all)
7165 (record_btrace_execution_direction)
7166 (record_btrace_prepare_to_generate_core)
7167 (record_btrace_done_generating_core): Refactor as
7168 record_btrace_target methods.
7169 (init_record_btrace_ops): Delete.
7170 (_initialize_record_btrace): Remove reference to
7171 init_record_btrace_ops.
7172 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7173 the execution_direction global.
7174 (record_full_base_target, record_full_target)
7175 (record_full_core_target): New classes.
7176 (record_full_ops): Now a record_full_target.
7177 (record_full_core_ops): Now a record_full_core_target.
7178 (record_full_target::detach, record_full_target::disconnect)
7179 (record_full_core_target::disconnect)
7180 (record_full_target::mourn_inferior, record_full_target::kill):
7182 (record_full_open, record_full_close, record_full_async): Refactor
7183 as methods of the record_full_base_target class.
7184 (record_full_resume, record_full_commit_resume): Refactor
7185 as methods of the record_full_target class.
7186 (record_full_wait, record_full_stopped_by_watchpoint)
7187 (record_full_stopped_data_address)
7188 (record_full_stopped_by_sw_breakpoint)
7189 (record_full_supports_stopped_by_sw_breakpoint)
7190 (record_full_stopped_by_hw_breakpoint)
7191 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7192 methods of the record_full_base_target class.
7193 (record_full_store_registers, record_full_xfer_partial)
7194 (record_full_insert_breakpoint, record_full_remove_breakpoint):
7195 Refactor as methods of the record_full_target class.
7196 (record_full_can_execute_reverse, record_full_get_bookmark)
7197 (record_full_goto_bookmark, record_full_execution_direction)
7198 (record_full_record_method, record_full_info, record_full_delete)
7199 (record_full_is_replaying, record_full_will_replay)
7200 (record_full_goto_begin, record_full_goto_end, record_full_goto)
7201 (record_full_stop_replaying): Refactor as methods of the
7202 record_full_base_target class.
7203 (record_full_core_resume, record_full_core_kill)
7204 (record_full_core_fetch_registers)
7205 (record_full_core_prepare_to_store)
7206 (record_full_core_store_registers, record_full_core_xfer_partial)
7207 (record_full_core_insert_breakpoint)
7208 (record_full_core_remove_breakpoint)
7209 (record_full_core_has_execution): Refactor
7210 as methods of the record_full_core_target class.
7211 (record_full_base_target::supports_delete_record): New.
7212 (init_record_full_ops): Delete.
7213 (init_record_full_core_ops): Delete.
7214 (record_full_save): Refactor as method of the
7215 record_full_base_target class.
7216 (_initialize_record_full): Remove references to
7217 init_record_full_ops and init_record_full_core_ops.
7219 * remote.c (remote_target, extended_remote_target): New classes.
7220 (remote_ops): Now a remote_target.
7221 (extended_remote_ops): Now an extended_remote_target.
7222 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7223 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7224 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7225 (remote_pass_signals, remote_set_syscall_catchpoint)
7226 (remote_program_signals, )
7227 (remote_thread_always_alive): Remove target_ops parameter.
7228 (remote_thread_alive, remote_thread_name)
7229 (remote_update_thread_list, remote_threads_extra_info)
7230 (remote_static_tracepoint_marker_at)
7231 (remote_static_tracepoint_markers_by_strid)
7232 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7233 (remote_open): Refactor as methods of remote_target.
7234 (extended_remote_open, extended_remote_detach)
7235 (extended_remote_attach, extended_remote_post_attach):
7236 (extended_remote_supports_disable_randomization)
7237 (extended_remote_create_inferior): : Refactor as method of
7238 extended_remote_target.
7239 (remote_set_permissions, remote_open_1, remote_detach)
7240 (remote_follow_fork, remote_follow_exec, remote_disconnect)
7241 (remote_resume, remote_commit_resume, remote_stop)
7242 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7243 (remote_terminal_ours, remote_wait, remote_fetch_registers)
7244 (remote_prepare_to_store, remote_store_registers)
7245 (remote_flash_erase, remote_flash_done, remote_files_info)
7246 (remote_kill, remote_mourn, remote_insert_breakpoint)
7247 (remote_remove_breakpoint, remote_insert_watchpoint)
7248 (remote_watchpoint_addr_within_range)
7249 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7250 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7251 (remote_supports_stopped_by_sw_breakpoint)
7252 (remote_stopped_by_hw_breakpoint)
7253 (remote_supports_stopped_by_hw_breakpoint)
7254 (remote_stopped_by_watchpoint, remote_stopped_data_address)
7255 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7256 (remote_verify_memory): Refactor as methods of remote_target.
7257 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7259 (remote_xfer_partial, remote_get_memory_xfer_limit)
7260 (remote_search_memory, remote_rcmd, remote_memory_map)
7261 (remote_pid_to_str, remote_get_thread_local_address)
7262 (remote_get_tib_address, remote_read_description): Refactor as
7263 methods of remote_target.
7264 (remote_target::fileio_open, remote_target::fileio_pwrite)
7265 (remote_target::fileio_pread, remote_target::fileio_close): New.
7266 (remote_hostio_readlink, remote_hostio_fstat)
7267 (remote_filesystem_is_local, remote_can_execute_reverse)
7268 (remote_supports_non_stop, remote_supports_disable_randomization)
7269 (remote_supports_multi_process, remote_supports_cond_breakpoints)
7270 (remote_supports_enable_disable_tracepoint)
7271 (remote_supports_string_tracing)
7272 (remote_can_run_breakpoint_commands, remote_trace_init)
7273 (remote_download_tracepoint, remote_can_download_tracepoint)
7274 (remote_download_trace_state_variable, remote_enable_tracepoint)
7275 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7276 (remote_trace_start, remote_get_trace_status)
7277 (remote_get_tracepoint_status, remote_trace_stop)
7278 (remote_trace_find, remote_get_trace_state_variable_value)
7279 (remote_save_trace_data, remote_get_raw_trace_data)
7280 (remote_set_disconnected_tracing, remote_core_of_thread)
7281 (remote_set_circular_trace_buffer, remote_traceframe_info)
7282 (remote_get_min_fast_tracepoint_insn_len)
7283 (remote_set_trace_buffer_size, remote_set_trace_notes)
7284 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7285 (remote_disable_btrace, remote_teardown_btrace)
7286 (remote_read_btrace, remote_btrace_conf)
7287 (remote_augmented_libraries_svr4_read, remote_load)
7288 (remote_pid_to_exec_file, remote_can_do_single_step)
7289 (remote_execution_direction, remote_thread_handle_to_thread_info):
7290 Refactor as methods of remote_target.
7291 (init_remote_ops, init_extended_remote_ops): Delete.
7292 (remote_can_async_p, remote_is_async_p, remote_async)
7293 (remote_thread_events, remote_upload_tracepoints)
7294 (remote_upload_trace_state_variables): Refactor as methods of
7296 (_initialize_remote): Remove references to init_remote_ops and
7297 init_extended_remote_ops.
7299 * remote-sim.c (gdbsim_target): New class.
7300 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7301 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7302 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7303 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7304 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7305 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7306 Refactor as methods of gdbsim_target.
7307 (gdbsim_ops): Now a gdbsim_target.
7308 (init_gdbsim_ops): Delete.
7309 (gdbsim_cntrl_c): Adjust.
7310 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7312 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7313 (the_amd64_linux_nat_target): New.
7314 (amd64_linux_fetch_inferior_registers)
7315 (amd64_linux_store_inferior_registers): Refactor as methods of
7316 amd64_linux_nat_target.
7317 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
7318 * i386-linux-nat.c: Don't include "linux-nat.h".
7319 (i386_linux_nat_target): New class.
7320 (the_i386_linux_nat_target): New.
7321 (i386_linux_fetch_inferior_registers)
7322 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7323 as methods of i386_linux_nat_target.
7324 (_initialize_i386_linux_nat): Adjust. Set linux_target.
7325 * inf-child.c (inf_child_ops): Delete.
7326 (inf_child_fetch_inferior_registers)
7327 (inf_child_store_inferior_registers): Delete.
7328 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7329 methods of inf_child_target.
7330 (inf_child_target::supports_terminal_ours)
7331 (inf_child_target::terminal_init)
7332 (inf_child_target::terminal_inferior)
7333 (inf_child_target::terminal_ours_for_output)
7334 (inf_child_target::terminal_ours, inf_child_target::interrupt)
7335 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7337 (inf_child_open, inf_child_disconnect, inf_child_close)
7338 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7339 (inf_child_post_startup_inferior, inf_child_can_run)
7340 (inf_child_pid_to_exec_file): Refactor as methods of
7342 (inf_child_follow_fork): Delete.
7343 (inf_child_target::can_create_inferior)
7344 (inf_child_target::can_attach): New.
7345 (inf_child_target::has_all_memory, inf_child_target::has_memory)
7346 (inf_child_target::has_stack, inf_child_target::has_registers)
7347 (inf_child_target::has_execution): New.
7348 (inf_child_fileio_open, inf_child_fileio_pwrite)
7349 (inf_child_fileio_pread, inf_child_fileio_fstat)
7350 (inf_child_fileio_close, inf_child_fileio_unlink)
7351 (inf_child_fileio_readlink, inf_child_use_agent)
7352 (inf_child_can_use_agent): Refactor as methods of
7354 (return_zero, inf_child_target): Delete.
7355 (inf_child_target::inf_child_target): New.
7356 * inf-child.h: Include "target.h".
7357 (inf_child_target): Delete function prototype.
7358 (inf_child_target): New class.
7359 (inf_child_open_target, inf_child_mourn_inferior)
7360 (inf_child_maybe_unpush_target): Delete.
7361 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7362 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7363 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7364 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7365 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7366 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7367 (inf_ptrace_wait, inf_ptrace_xfer_partial)
7368 (inf_ptrace_thread_alive, inf_ptrace_files_info)
7369 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7370 methods of inf_ptrace_target.
7371 (inf_ptrace_target): Delete function.
7372 * inf-ptrace.h: Include "inf-child.h".
7373 (inf_ptrace_target): Delete function declaration.
7374 (inf_ptrace_target): New class.
7375 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7376 * linux-nat.c (linux_target): New.
7377 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7378 (linux_nat_target::~linux_nat_target): New.
7379 (linux_child_post_attach, linux_child_post_startup_inferior)
7380 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7381 (linux_child_remove_fork_catchpoint)
7382 (linux_child_insert_vfork_catchpoint)
7383 (linux_child_remove_vfork_catchpoint)
7384 (linux_child_insert_exec_catchpoint)
7385 (linux_child_remove_exec_catchpoint)
7386 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7387 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7388 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7389 (linux_nat_stopped_data_address)
7390 (linux_nat_stopped_by_sw_breakpoint)
7391 (linux_nat_supports_stopped_by_sw_breakpoint)
7392 (linux_nat_stopped_by_hw_breakpoint)
7393 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7394 (linux_nat_kill, linux_nat_mourn_inferior)
7395 (linux_nat_xfer_partial, linux_nat_thread_alive)
7396 (linux_nat_update_thread_list, linux_nat_pid_to_str)
7397 (linux_nat_thread_name, linux_child_pid_to_exec_file)
7398 (linux_child_static_tracepoint_markers_by_strid)
7399 (linux_nat_is_async_p, linux_nat_can_async_p)
7400 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7401 (linux_nat_supports_multi_process)
7402 (linux_nat_supports_disable_randomization, linux_nat_async)
7403 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7404 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7405 (linux_nat_fileio_open, linux_nat_fileio_readlink)
7406 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7407 methods of linux_nat_target.
7408 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7409 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7411 (check_stopped_by_watchpoint): Adjust.
7412 (linux_xfer_partial): Delete.
7413 (linux_target_install_ops, linux_target, linux_nat_add_target):
7415 (linux_nat_target::linux_nat_target): New.
7416 * linux-nat.h: Include "inf-ptrace.h".
7417 (linux_nat_target): New.
7418 (linux_target, linux_target_install_ops, linux_nat_add_target):
7419 Delete function declarations.
7420 (linux_target): Declare global.
7421 * linux-thread-db.c (thread_db_target): New.
7422 (thread_db_target::thread_db_target): New.
7423 (thread_db_ops): Delete.
7424 (the_thread_db_target): New.
7425 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7426 (thread_db_update_thread_list, thread_db_pid_to_str)
7427 (thread_db_extra_thread_info)
7428 (thread_db_thread_handle_to_thread_info)
7429 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7430 (thread_db_resume): Refactor as methods of thread_db_target.
7431 (init_thread_db_ops): Delete.
7432 (_initialize_thread_db): Remove reference to init_thread_db_ops.
7433 * x86-linux-nat.c: Don't include "linux-nat.h".
7434 (super_post_startup_inferior): Delete.
7435 (x86_linux_nat_target::~x86_linux_nat_target): New.
7436 (x86_linux_child_post_startup_inferior)
7437 (x86_linux_read_description, x86_linux_enable_btrace)
7438 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7439 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7440 methods of x86_linux_nat_target.
7441 (x86_linux_create_target): Delete. Bits folded ...
7442 (x86_linux_add_target): ... here. Now takes a linux_nat_target
7444 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7445 (x86_linux_nat_target): New class.
7446 (x86_linux_create_target): Delete.
7447 (x86_linux_add_target): Now takes a linux_nat_target pointer.
7448 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7449 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7450 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7451 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7452 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7454 (x86_use_watchpoints): Delete.
7455 * x86-nat.h: Include "breakpoint.h" and "target.h".
7456 (x86_use_watchpoints): Delete.
7457 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7458 (x86_stopped_by_watchpoint, x86_stopped_data_address)
7459 (x86_insert_watchpoint, x86_remove_watchpoint)
7460 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7461 (x86_stopped_by_hw_breakpoint): New declarations.
7462 (x86_nat_target): New template class.
7464 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7465 (the_ppc_linux_nat_target): New.
7466 (ppc_linux_fetch_inferior_registers)
7467 (ppc_linux_can_use_hw_breakpoint)
7468 (ppc_linux_region_ok_for_hw_watchpoint)
7469 (ppc_linux_ranged_break_num_registers)
7470 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7471 (ppc_linux_insert_mask_watchpoint)
7472 (ppc_linux_remove_mask_watchpoint)
7473 (ppc_linux_can_accel_watchpoint_condition)
7474 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7475 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7476 (ppc_linux_watchpoint_addr_within_range)
7477 (ppc_linux_masked_watch_num_registers)
7478 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7479 (ppc_linux_read_description): Refactor as methods of
7480 ppc_linux_nat_target.
7481 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
7483 * procfs.c (procfs_xfer_partial): Delete forward declaration.
7484 (procfs_target): New class.
7485 (the_procfs_target): New.
7486 (procfs_target): Delete function.
7487 (procfs_auxv_parse, procfs_attach, procfs_detach)
7488 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7489 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7490 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7491 (procfs_create_inferior, procfs_update_thread_list)
7492 (procfs_thread_alive, procfs_pid_to_str)
7493 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7494 (procfs_stopped_data_address, procfs_insert_watchpoint)
7495 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7496 (proc_find_memory_regions, procfs_info_proc)
7497 (procfs_make_note_section): Refactor as methods of procfs_target.
7498 (_initialize_procfs): Adjust.
7499 * sol-thread.c (sol_thread_target): New class.
7500 (sol_thread_ops): Now a sol_thread_target.
7501 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7502 (sol_thread_fetch_registers, sol_thread_store_registers)
7503 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7504 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7505 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7506 (init_sol_thread_ops): Delete.
7507 (_initialize_sol_thread): Adjust. Remove references to
7508 init_sol_thread_ops and complete_target_initialization.
7510 * windows-nat.c (windows_nat_target): New class.
7511 (windows_fetch_inferior_registers)
7512 (windows_store_inferior_registers, windows_resume, windows_wait)
7513 (windows_attach, windows_detach, windows_pid_to_exec_file)
7514 (windows_files_info, windows_create_inferior)
7515 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7516 (windows_close, windows_pid_to_str, windows_xfer_partial)
7517 (windows_get_tib_address, windows_get_ada_task_ptid)
7518 (windows_thread_name, windows_thread_alive): Refactor as
7519 windows_nat_target methods.
7520 (do_initial_windows_stuff): Adjust.
7521 (windows_target): Delete function.
7522 (_initialize_windows_nat): Adjust.
7524 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7525 (darwin_mourn_inferior, darwin_kill_inferior)
7526 (darwin_create_inferior, darwin_attach, darwin_detach)
7527 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7528 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7529 (darwin_supports_multi_process): Refactor as darwin_nat_target
7531 (darwin_resume_to, darwin_files_info): Delete.
7532 (_initialize_darwin_inferior): Rename to ...
7533 (_initialize_darwin_nat): ... this. Adjust to C++ification.
7534 * darwin-nat.h: Include "inf-child.h".
7535 (darwin_nat_target): New class.
7536 (darwin_complete_target): Delete.
7537 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7538 (darwin_target): New.
7539 (i386_darwin_fetch_inferior_registers)
7540 (i386_darwin_store_inferior_registers): Refactor as methods of
7542 (darwin_complete_target): Delete, with ...
7543 (_initialize_i386_darwin_nat): ... bits factored out here.
7545 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7546 (the_alpha_linux_nat_target): New.
7547 (alpha_linux_register_u_offset): Refactor as
7548 alpha_linux_nat_target method.
7549 (_initialize_alpha_linux_nat): Adjust.
7550 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7551 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7552 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7553 methods of linux_nat_trad_target.
7554 (linux_trad_target): Delete.
7555 * linux-nat-trad.h (linux_trad_target): Delete function.
7556 (linux_nat_trad_target): New class.
7557 * mips-linux-nat.c (mips_linux_nat_target): New class.
7558 (super_fetch_registers, super_store_registers, super_close):
7560 (the_mips_linux_nat_target): New.
7561 (mips64_linux_regsets_fetch_registers)
7562 (mips64_linux_regsets_store_registers)
7563 (mips64_linux_fetch_registers, mips64_linux_store_registers)
7564 (mips_linux_register_u_offset, mips_linux_read_description)
7565 (mips_linux_can_use_hw_breakpoint)
7566 (mips_linux_stopped_by_watchpoint)
7567 (mips_linux_stopped_data_address)
7568 (mips_linux_region_ok_for_hw_watchpoint)
7569 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7570 (mips_linux_close): Refactor as methods of mips_linux_nat.
7571 (_initialize_mips_linux_nat): Adjust to C++ification.
7573 * aix-thread.c (aix_thread_target): New class.
7574 (aix_thread_ops): Now an aix_thread_target.
7575 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7576 (aix_thread_fetch_registers, aix_thread_store_registers)
7577 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7578 (aix_thread_thread_alive, aix_thread_pid_to_str)
7579 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7580 Refactor as methods of aix_thread_target.
7581 (init_aix_thread_ops): Delete.
7582 (_initialize_aix_thread): Remove references to init_aix_thread_ops
7583 and complete_target_initialization.
7584 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7585 (rs6000_nat_target): New class.
7586 (the_rs6000_nat_target): New.
7587 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7588 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7589 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7590 (super_create_inferior): Delete.
7591 (_initialize_rs6000_nat): Adjust to C++ification.
7593 * arm-linux-nat.c (arm_linux_nat_target): New class.
7594 (the_arm_linux_nat_target): New.
7595 (arm_linux_fetch_inferior_registers)
7596 (arm_linux_store_inferior_registers, arm_linux_read_description)
7597 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7598 (arm_linux_remove_hw_breakpoint)
7599 (arm_linux_region_ok_for_hw_watchpoint)
7600 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7601 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7602 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7603 arm_linux_nat_target.
7604 (_initialize_arm_linux_nat): Adjust to C++ification.
7606 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7607 (the_aarch64_linux_nat_target): New.
7608 (aarch64_linux_fetch_inferior_registers)
7609 (aarch64_linux_store_inferior_registers)
7610 (aarch64_linux_child_post_startup_inferior)
7611 (aarch64_linux_read_description)
7612 (aarch64_linux_can_use_hw_breakpoint)
7613 (aarch64_linux_insert_hw_breakpoint)
7614 (aarch64_linux_remove_hw_breakpoint)
7615 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7616 (aarch64_linux_region_ok_for_hw_watchpoint)
7617 (aarch64_linux_stopped_data_address)
7618 (aarch64_linux_stopped_by_watchpoint)
7619 (aarch64_linux_watchpoint_addr_within_range)
7620 (aarch64_linux_can_do_single_step): Refactor as methods of
7621 aarch64_linux_nat_target.
7622 (super_post_startup_inferior): Delete.
7623 (_initialize_aarch64_linux_nat): Adjust to C++ification.
7625 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7626 (the_hppa_linux_nat_target): New.
7627 (hppa_linux_fetch_inferior_registers)
7628 (hppa_linux_store_inferior_registers): Refactor as methods of
7629 hppa_linux_nat_target.
7630 (_initialize_hppa_linux_nat): Adjust to C++ification.
7632 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7633 (the_ia64_linux_nat_target): New.
7634 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7635 (ia64_linux_stopped_data_address)
7636 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7637 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7638 ia64_linux_nat_target methods.
7639 (super_xfer_partial): Delete.
7640 (_initialize_ia64_linux_nat): Adjust to C++ification.
7642 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7643 (the_m32r_linux_nat_target): New.
7644 (m32r_linux_fetch_inferior_registers)
7645 (m32r_linux_store_inferior_registers): Refactor as
7646 m32r_linux_nat_target methods.
7647 (_initialize_m32r_linux_nat): Adjust to C++ification.
7649 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7650 (the_m68k_linux_nat_target): New.
7651 (m68k_linux_fetch_inferior_registers)
7652 (m68k_linux_store_inferior_registers): Refactor as
7653 m68k_linux_nat_target methods.
7654 (_initialize_m68k_linux_nat): Adjust to C++ification.
7656 * s390-linux-nat.c (s390_linux_nat_target): New class.
7657 (the_s390_linux_nat_target): New.
7658 (s390_linux_fetch_inferior_registers)
7659 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7660 (s390_insert_watchpoint, s390_remove_watchpoint)
7661 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7662 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7663 (s390_auxv_parse, s390_read_description): Refactor as methods of
7664 s390_linux_nat_target.
7665 (_initialize_s390_nat): Adjust to C++ification.
7667 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7668 (the_sparc_linux_nat_target): New.
7669 (_initialize_sparc_linux_nat): Adjust to C++ification.
7670 * sparc-nat.c (sparc_fetch_inferior_registers)
7671 (sparc_store_inferior_registers): Remove target_ops parameter.
7672 * sparc-nat.h (sparc_fetch_inferior_registers)
7673 (sparc_store_inferior_registers): Remove target_ops parameter.
7674 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7675 (the_sparc64_linux_nat_target): New.
7676 (_initialize_sparc64_linux_nat): Adjust to C++ification.
7678 * spu-linux-nat.c (spu_linux_nat_target): New class.
7679 (the_spu_linux_nat_target): New.
7680 (spu_child_post_startup_inferior, spu_child_post_attach)
7681 (spu_child_wait, spu_fetch_inferior_registers)
7682 (spu_store_inferior_registers, spu_xfer_partial)
7683 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7685 (_initialize_spu_nat): Adjust to C++ification.
7687 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7688 (the_tilegx_linux_nat_target): New.
7689 (fetch_inferior_registers, store_inferior_registers):
7690 Refactor as methods.
7691 (_initialize_tile_linux_nat): Adjust to C++ification.
7693 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7694 (the_xtensa_linux_nat_target): New.
7695 (xtensa_linux_fetch_inferior_registers)
7696 (xtensa_linux_store_inferior_registers): Refactor as
7697 xtensa_linux_nat_target methods.
7698 (_initialize_xtensa_linux_nat): Adjust to C++ification.
7700 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7701 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7702 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7703 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7704 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7705 (fbsd_stopped_by_sw_breakpoint)
7706 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7707 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7708 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7709 (fbsd_post_startup_inferior, fbsd_post_attach)
7710 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7711 (fbsd_set_syscall_catchpoint)
7712 (super_xfer_partial, super_resume, super_wait)
7713 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7714 (fbsd_handle_debug_trap): Remove target_ops parameter.
7715 (fbsd_nat_add_target): Delete.
7716 * fbsd-nat.h: Include "inf-ptrace.h".
7717 (fbsd_nat_add_target): Delete.
7718 (USE_SIGTRAP_SIGINFO): Define.
7719 (fbsd_nat_target): New class.
7721 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7722 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7723 (amd64bsd_target): Delete.
7724 * amd64-bsd-nat.h: New file.
7725 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7727 (amd64_fbsd_nat_target): New class.
7728 (the_amd64_fbsd_nat_target): New.
7729 (amd64fbsd_read_description): Refactor as method of
7730 amd64_fbsd_nat_target.
7731 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7732 (_initialize_amd64fbsd_nat): Adjust to C++ification.
7733 * amd64-nat.h (amd64bsd_target): Delete function declaration.
7734 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7735 (i386bsd_store_inferior_registers): Remove target_ops parameter.
7736 (i386bsd_target): Delete.
7737 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7738 (i386bsd_fetch_inferior_registers)
7739 (i386bsd_store_inferior_registers): Declare.
7740 (i386_bsd_nat_target): New class.
7741 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7742 (the_i386_fbsd_nat_target): New.
7743 (i386fbsd_resume, i386fbsd_read_description): Refactor as
7744 i386_fbsd_nat_target methods.
7745 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7746 (_initialize_i386fbsd_nat): Adjust to C++ification.
7747 * x86-bsd-nat.c (super_mourn_inferior): Delete.
7748 (x86bsd_mourn_inferior, x86bsd_target): Delete.
7749 (_initialize_x86_bsd_nat): Adjust to C++ification.
7750 * x86-bsd-nat.h: Include "x86-nat.h".
7751 (x86bsd_target): Delete declaration.
7752 (x86bsd_nat_target): New class.
7754 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7755 (the_aarch64_fbsd_nat_target): New.
7756 (aarch64_fbsd_fetch_inferior_registers)
7757 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7758 aarch64_fbsd_nat_target.
7759 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7760 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7761 (the_alpha_bsd_nat_target): New.
7762 (alphabsd_fetch_inferior_registers)
7763 (alphabsd_store_inferior_registers): Refactor as
7764 alpha_bsd_nat_target methods.
7765 (_initialize_alphabsd_nat): Refactor as methods of
7766 alpha_bsd_nat_target.
7767 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7768 (the_amd64_nbsd_nat_target): New.
7769 (_initialize_amd64nbsd_nat): Adjust to C++ification.
7770 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7771 (the_amd64_obsd_nat_target): New.
7772 (_initialize_amd64obsd_nat): Adjust to C++ification.
7773 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7774 (the_arm_fbsd_nat_target): New.
7775 (arm_fbsd_fetch_inferior_registers)
7776 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7777 (_initialize_arm_fbsd_nat): Refactor as methods of
7778 arm_fbsd_nat_target.
7779 (_initialize_arm_fbsd_nat): Adjust to C++ification.
7780 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7781 (the_arm_netbsd_nat_target): New.
7782 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7783 arm_netbsd_nat_target.
7784 (_initialize_arm_netbsd_nat): Adjust to C++ification.
7785 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7786 (the_hppa_nbsd_nat_target): New.
7787 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7788 hppa_nbsd_nat_target methods.
7789 (_initialize_hppanbsd_nat): Adjust to C++ification.
7790 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7791 (the_hppa_obsd_nat_target): New.
7792 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7793 methods of hppa_obsd_nat_target.
7794 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
7796 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7797 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
7799 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7800 (_initialize_i386obsd_nat): Use add_target.
7801 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7802 (the_m68k_bsd_nat_target): New.
7803 (m68kbsd_fetch_inferior_registers)
7804 (m68kbsd_store_inferior_registers): Refactor as methods of
7805 m68k_bsd_nat_target.
7806 (_initialize_m68kbsd_nat): Adjust to C++ification.
7807 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7808 (the_mips_fbsd_nat_target): New.
7809 (mips_fbsd_fetch_inferior_registers)
7810 (mips_fbsd_store_inferior_registers): Refactor as methods of
7811 mips_fbsd_nat_target.
7812 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
7814 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7815 (the_mips_nbsd_nat_target): New.
7816 (mipsnbsd_fetch_inferior_registers)
7817 (mipsnbsd_store_inferior_registers): Refactor as methods of
7818 mips_nbsd_nat_target.
7819 (_initialize_mipsnbsd_nat): Adjust to C++ification.
7820 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7821 (the_mips64_obsd_nat_target): New.
7822 (mips64obsd_fetch_inferior_registers)
7823 (mips64obsd_store_inferior_registers): Refactor as methods of
7824 mips64_obsd_nat_target.
7825 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
7827 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7829 * nbsd-nat.h: Include "inf-ptrace.h".
7830 (nbsd_nat_target): New class.
7831 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7832 (obsd_wait): Refactor as methods of obsd_nat_target.
7833 (obsd_add_target): Delete.
7834 * obsd-nat.h: Include "inf-ptrace.h".
7835 (obsd_nat_target): New class.
7836 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7837 (the_ppc_fbsd_nat_target): New.
7838 (ppcfbsd_fetch_inferior_registers)
7839 (ppcfbsd_store_inferior_registers): Refactor as methods of
7840 ppc_fbsd_nat_target.
7841 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
7843 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7844 (the_ppc_nbsd_nat_target): New.
7845 (ppcnbsd_fetch_inferior_registers)
7846 (ppcnbsd_store_inferior_registers): Refactor as methods of
7847 ppc_nbsd_nat_target.
7848 (_initialize_ppcnbsd_nat): Adjust to C++ification.
7849 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7850 (the_ppc_obsd_nat_target): New.
7851 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7852 methods of ppc_obsd_nat_target.
7853 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
7855 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7856 (the_sh_nbsd_nat_target): New.
7857 (shnbsd_fetch_inferior_registers)
7858 (shnbsd_store_inferior_registers): Refactor as methods of
7860 (_initialize_shnbsd_nat): Adjust to C++ification.
7861 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7862 (inf_ptrace_xfer_partial): Delete.
7863 (sparc_xfer_partial, sparc_target): Delete.
7864 * sparc-nat.h (sparc_fetch_inferior_registers)
7865 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7866 (sparc_target): Delete function declaration.
7867 (sparc_target): New template class.
7868 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7869 (_initialize_sparcnbsd_nat): Adjust to C++ification.
7870 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7871 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
7873 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7874 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7875 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7876 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
7878 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7879 (the_vax_bsd_nat_target): New.
7880 (vaxbsd_fetch_inferior_registers)
7881 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7883 (_initialize_vaxbsd_nat): Adjust to C++ification.
7885 * bsd-kvm.c (bsd_kvm_target): New class.
7886 (bsd_kvm_ops): Now a bsd_kvm_target.
7887 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7888 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7889 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7891 (bsd_kvm_return_one): Delete.
7892 (bsd_kvm_add_target): Adjust to C++ification.
7894 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7895 (nto_procfs_target_procfs): New classes.
7896 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7897 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7898 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7899 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7900 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7901 (procfs_remove_hw_breakpoint, procfs_resume)
7902 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7903 (procfs_kill_inferior, procfs_store_registers)
7904 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7905 as methods of nto_procfs_target.
7906 (nto_procfs_ops): Now an nto_procfs_target_procfs.
7907 (nto_native_ops): Delete.
7908 (procfs_open, procfs_native_open): Delete.
7909 (nto_native_ops): Now an nto_procfs_target_native.
7910 (init_procfs_targets): Adjust to C++ification.
7911 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7912 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7913 Refactor as methods of nto_procfs_target.
7915 * go32-nat.c (go32_nat_target): New class.
7916 (the_go32_nat_target): New.
7917 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7918 (go32_store_registers, go32_xfer_partial, go32_files_info)
7919 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7920 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7921 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7922 (go32_pid_to_str): Refactor as methods of go32_nat_target.
7923 (go32_target): Delete.
7924 (_initialize_go32_nat): Adjust to C++ification.
7926 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7927 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7928 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7929 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7931 (gnu_target): Delete.
7932 * gnu-nat.h (gnu_target): Delete.
7933 (gnu_nat_target): New class.
7934 * i386-gnu-nat.c (gnu_base_target): New.
7935 (i386_gnu_nat_target): New class.
7936 (the_i386_gnu_nat_target): New.
7937 (_initialize_i386gnu_nat): Adjust to C++ification.
7939 2018-05-02 Pedro Alves <palves@redhat.com>
7941 * bfd-target.c (target_bfd_xclose): Rename to ...
7942 (target_bfd_close): ... this.
7943 (target_bfd_reopen): Adjust.
7944 * target.c (target_close): Remove references to to_xclose.
7945 * target.h (target_ops::to_xclose): Delete.
7946 (target_ops::to_close): Update comments.
7948 2018-05-02 Pedro Alves <palves@redhat.com>
7950 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7952 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7953 * inf-ptrace.c (inf_ptrace_register_u_offset)
7954 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7955 (inf_ptrace_store_register, inf_ptrace_store_registers)
7956 (inf_ptrace_trad_target): Move to ...
7957 * linux-nat-trad.c: ... this new file.
7958 * linux-nat-trad.h: New file.
7959 * linux-nat.c (linux_target_install_ops): Make extern.
7960 (linux_trad_target): Delete.
7961 * linux-nat.h (linux_trad_target): Delete declaration.
7962 (linux_target_install_ops): Declare.
7963 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7966 2018-05-02 Pedro Alves <palves@redhat.com>
7968 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7969 procfs_target/add_target here.
7970 * procfs.c (procfs_target): Make static.
7971 (_initialize_procfs): Call add_target here.
7972 * procfs.h (struct target_ops): Remove forward declaration.
7973 (procfs_target): Remove declaration.
7974 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7976 2018-05-02 Pedro Alves <palves@redhat.com>
7978 * procfs.c (procfs_stopped_by_watchpoint)
7979 (procfs_insert_watchpoint, procfs_remove_watchpoint)
7980 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7982 (procfs_use_watchpoints): Delete, move contents...
7983 (procfs_target): ... here.
7984 * procfs.h (procfs_use_watchpoints): Delete declaration.
7985 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7986 procfs_use_watchpoints.
7987 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7988 procfs_use_watchpoints.
7990 2018-05-02 Tom Tromey <tom@tromey.com>
7993 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7994 and var_zuinteger_unlimited.
7995 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7996 and PARAM_ZUINTEGER_UNLIMITED.
7997 (set_parameter_value): Handle var_zuinteger and
7998 var_zuinteger_unlimited.
7999 (add_setshow_generic): Likewise.
8000 (parmpy_init): Likewise.
8002 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
8005 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8006 pointer is not null before dereferencing it.
8008 2018-04-30 Tom Tromey <tom@tromey.com>
8010 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8013 2018-04-30 Tom Tromey <tom@tromey.com>
8015 * breakpoint.c (mention): Remove use of is_mi_like_p.
8016 (print_mention_ranged_breakpoint): Likewise.
8017 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8020 2018-04-30 Tom Tromey <tom@tromey.com>
8022 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8024 2018-04-30 Tom Tromey <tom@tromey.com>
8026 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8027 (info_spu_event_command): Remove some uses of is_mi_like_p.
8029 2018-04-30 Tom Tromey <tom@tromey.com>
8031 * python/py-framefilter.c (py_print_single_arg)
8032 (enumerate_locals, py_print_args, py_print_frame): Remove some
8033 uses of is_mi_like_p.
8035 2018-04-30 Tom Tromey <tom@tromey.com>
8038 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8039 * ui-out.h (ui_out::is_mi_like_p): Now const.
8040 (ui_out::do_is_mi_like_p): Now const.
8041 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8043 2018-04-30 Tom Tromey <tom@tromey.com>
8045 * varobj.c (varobj_set_visualizer): Use new_reference.
8046 * python/python.c (gdbpy_decode_line): Use new_reference.
8047 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8050 2018-04-30 Tom Tromey <tom@tromey.com>
8052 * varobj.c (install_new_value): Use new_reference.
8053 * value.h (value_incref): Return void. Swap intro comment with
8055 * value.c (set_value_parent): Use new_reference.
8056 (value_incref): Return void. Update intro comment.
8057 (release_value): Use new_reference.
8058 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8060 2018-04-30 Tom Tromey <tom@tromey.com>
8062 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8063 * gdb_bfd.h (new_bfd_ref): Remove.
8064 (gdb_bfd_open): Update comment.
8065 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8066 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8067 (gdb_bfd_fdopenr): Use new_reference.
8068 * exec.c (exec_file_attach): Use new_reference.
8070 2018-04-30 Tom Tromey <tom@tromey.com>
8072 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8075 2018-04-30 Tom Tromey <tom@tromey.com>
8077 * jit.c (jit_read_code_entry): Use type_align.
8078 * i386-tdep.c (i386_gdbarch_init): Don't call
8079 set_gdbarch_long_long_align_bit.
8080 * gdbarch.sh: Remove long_long_align_bit.
8081 * gdbarch.c, gdbarch.h: Rebuild.
8082 * arc-tdep.c (arc_type_align): New function.
8083 (arc_gdbarch_init): Use arc_type_align. Don't call
8084 set_gdbarch_long_long_align_bit.
8086 2018-04-30 Tom Tromey <tom@tromey.com>
8088 * rust-lang.c (rust_type_alignment): Remove.
8089 (rust_composite_type): Use type_align.
8091 2018-04-30 Tom Tromey <tom@tromey.com>
8093 * NEWS: Mention Type.align.
8094 * python/py-type.c (typy_get_alignof): New function.
8095 (type_object_getset): Add "alignof".
8097 2018-04-30 Tom Tromey <tom@tromey.com>
8101 * std-operator.def (UNOP_ALIGNOF): New operator.
8102 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8104 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8105 * c-lang.c (c_op_print_tab): Add alignof.
8106 * c-exp.y (ALIGNOF): New token.
8107 (exp): Add "ALIGNOF" production.
8108 (ident_tokens): Add _Alignof and alignof.
8110 2018-04-30 Tom Tromey <tom@tromey.com>
8112 * i386-tdep.c (i386_type_align): New function.
8113 (i386_gdbarch_init): Update.
8114 * gdbarch.sh (type_align): New method.
8115 * gdbarch.c, gdbarch.h: Rebuild.
8116 * arch-utils.h (default_type_align): Declare.
8117 * arch-utils.c (default_type_align): New function.
8118 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8119 (struct type) <align_log2>: New field.
8120 <instance_flags>: Now a bitfield.
8121 (TYPE_RAW_ALIGN): New macro.
8122 (type_align, type_raw_align, set_type_align): Declare.
8123 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8125 * dwarf2read.c (quirk_rust_enum): Set type alignment.
8126 (get_alignment, maybe_set_alignment): New functions.
8127 (read_structure_type, read_enumeration_type, read_array_type)
8128 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8129 (read_subrange_type, read_base_type): Set type alignment.
8131 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
8133 * dwarf2read.c (read_index_from_section): Use bool.
8135 2018-04-29 Fabian Groffen <grobian@gentoo.org>
8138 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8141 2018-04-29 John Reiser <jreiser@BitWagon.com>
8144 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8145 last step, and do it atomically.
8147 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
8149 * compile/compile-c-types.c (convert_int, convert_float):
8152 2018-04-27 Tom Tromey <tom@tromey.com>
8155 * rust-lang.c (rust_inclusive_range_type_p): New function.
8156 (rust_range): Handle inclusive ranges.
8157 (rust_compute_range): Likewise.
8158 * rust-exp.y (struct rust_op) <inclusive>: New field.
8159 (DOTDOTEQ): New constant.
8160 (range_expr): Add "..=" productions.
8161 (operator_tokens): Add "..=" token.
8162 (ast_range): Add "inclusive" parameter.
8163 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8165 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8167 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8168 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8170 * expprint.c (print_subexp_standard): Handle new bounds values.
8171 (dump_subexp_body_standard): Likewise.
8173 2018-04-27 Tom Tromey <tom@tromey.com>
8175 * configure: Rebuild.
8176 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8177 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8179 (class symbol_needs_eval_context): Likewise.
8180 * dwarf2read.c (mock_mapped_index::symbol_name_count)
8181 (mock_mapped_index::symbol_name_at): Use "override". Remove
8183 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8185 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8186 * aarch64-tdep.c (instruction_reader::read): Use "override".
8187 (instruction_reader_test::read): Likewise.
8188 * arm-tdep.c (instruction_reader::read): Use "override".
8189 (instruction_reader_thumb::read): Likewise.
8191 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
8194 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8195 instead of remote_send.
8196 (remote_send): Remove.
8198 2018-04-26 Pedro Alves <palves@redhat.com>
8200 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8201 find_function_start_sal instead of find_pc_line.
8203 2018-04-26 Pedro Alves <palves@redhat.com>
8205 * breakpoint.c (set_breakpoint_location_function): Handle
8207 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8208 * elfread.c (elf_symtab_read): Give data symbols with
8209 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8210 (elf_rel_plt_read): Update comment.
8211 * linespec.c (convert_linespec_to_sals): Handle
8213 (minsym_found): Handle mst_data_gnu_ifunc.
8214 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8215 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8216 * parse.c (find_minsym_type_and_address): Handle
8218 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8219 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8220 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8222 <mst_data_gnu_ifunc>: New enumerator.
8224 2018-04-26 Pedro Alves <palves@redhat.com>
8226 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8227 (lookup_minimal_symbol_by_pc_section): ... this. Replace
8228 'want_trampoline' parameter by a lookup_msym_prefer parameter.
8230 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8231 (lookup_minimal_symbol_by_pc): Adjust.
8232 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8233 (lookup_solib_trampoline_symbol_by_pc): Adjust.
8234 * minsyms.h (lookup_msym_prefer): New enum.
8235 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8236 parameter by a lookup_msym_prefer parameter.
8238 2018-04-26 Pedro Alves <palves@redhat.com>
8240 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8241 ends in "@plt" instead of looking at the symbol's section.
8243 2018-04-26 Pedro Alves <palves@redhat.com>
8245 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
8247 (find_pc_partial_function_gnu_ifunc): Rename to ...
8248 (find_pc_partial_function): ... this, and remove references to
8250 (find_pc_partial_function): Delete old implementation.
8251 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8253 2018-04-26 Pedro Alves <palves@redhat.com>
8255 * linespec.c (struct bound_minimal_symbol_search_key): New.
8256 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
8257 skip first line if we found a GNU ifunc minimal symbol by name.
8258 (compare_msymbols): Change parameters to work with a destructured
8260 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8263 2018-04-26 Pedro Alves <palves@redhat.com>
8265 * breakpoint.c (set_breakpoint_location_function): Don't resolve
8266 ifunc targets here. Instead, if we have an ifunc minsym, use its
8268 (add_location_to_breakpoint): Store the minsym and the objfile in
8269 the breakpoint location.
8270 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8271 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8272 Record the minsym in the sal.
8273 * symtab.h (symtab_and_line) <msymbol>: New field.
8275 2018-04-26 Pedro Alves <palves@redhat.com>
8277 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8278 unless we actually resolved the ifunc.
8280 2018-04-26 Pedro Alves <palves@redhat.com>
8282 * c-exp.y (variable production): Prefer ifunc minsyms over
8283 regular function symbols.
8284 * symtab.c (find_gnu_ifunc): New function.
8285 * minsyms.h (lookup_msym_prefer): New enum.
8286 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8287 parameter by a lookup_msym_prefer parameter.
8288 * symtab.h (find_gnu_ifunc): New declaration.
8290 2018-04-26 Pedro Alves <palves@redhat.com>
8292 * blockframe.c (find_gnu_ifunc_target_type): New function.
8293 (find_function_type): New.
8294 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8295 return a value with a memory address.
8296 (eval_call): For calls to GNU ifunc functions, try to find the
8297 type of the target function from the type that the resolver
8299 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8301 * infcall.c (find_function_return_type): Delete.
8302 (find_function_addr): Add 'function_type' parameter. For calls to
8303 GNU ifunc functions, try to find the type of the target function
8304 from the type that the resolver returns, and return it via
8306 (call_function_by_hand_dummy): Adjust to use the function type
8307 returned by find_function_addr.
8308 (find_function_addr): Add 'function_type' parameter and move
8310 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8313 2018-04-26 Pedro Alves <palves@redhat.com>
8315 * c-exp.y (variable production): Skip finding an alias for ifunc
8318 2018-04-26 Pedro Alves <palves@redhat.com>
8320 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8322 2018-04-25 Pedro Alves <palves@redhat.com>
8324 * infcmd.c (kill_command): Print the pid as string, not the whole
8325 thread's ptid. Add comment. s/has been killed/killed/ in output
8327 * remote.c (remote_detach_1): Print the pid as string, not the
8328 whole thread's ptid.
8330 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8331 Sergio Durigan Junior <sergiodj@redhat.com>
8332 Pedro Alves <palves@redhat.com>
8334 * infcmd.c (kill_command): Print message when inferior has
8336 * inferior.c (print_inferior_events): Remove 'static'. Set as
8338 (add_inferior): Improve message printed when
8339 'print_inferior_events' is on.
8340 (exit_inferior): Remove message printed when
8341 'print_inferior_events' is on.
8342 (detach_inferior): Improve message printed when
8343 'print_inferior_events' is on.
8344 (initialize_inferiors): Use 'add_inferior_silent' to set
8345 'current_inferior_'.
8346 * inferior.h (print_inferior_events): Declare here as
8348 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8349 '[Detaching...]' messages when 'print_inferior_events' is on.
8350 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
8351 as prefix/suffix for messages. Remove periods. Fix erroneous
8352 'Detaching after fork from child...', replace it by '... from
8354 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8355 prefix/suffix when printing 'Detaching...' messages. Print
8356 them when 'print_inferior_events' is on.
8357 * remote.c (remote_detach_1): Print message when detaching
8358 from inferior and '!is_fork_parent'.
8360 2018-04-24 Tom Tromey <tom@tromey.com>
8362 * cli-out.h: Reindent.
8364 2018-04-24 Tom Tromey <tom@tromey.com>
8366 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8367 (cli_ui_out::do_field_string): Use fputs_filtered.
8368 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8370 2018-04-23 Tom Tromey <tom@tromey.com>
8372 * guile/scm-frame.c (gdbscm_frame_read_var): Use
8373 gdb::unique_xmalloc_ptr.
8375 2018-04-23 Tom Tromey <tom@tromey.com>
8377 * configure: Rebuild.
8379 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
8382 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8383 prepare_for_testing. Set normal_bp to r_debug_state if target
8386 2018-04-21 Pedro Alves <palves@redhat.com>
8387 Rajendra SY <rajendra.sy@gmail.com>
8389 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8390 * remote.c (extended_remote_attach): In all-stop mode, mark the
8391 thread as executing.
8393 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8395 * thread.c (thread_apply_all_command): Fix comment.
8396 (thread_command): Fix comment.
8398 2018-04-10 Alan Hayward <alan.hayward@arm.com>
8400 * common/tdesc.h (tdesc_create_feature): Remove xml filename
8402 * features/aarch64-core.c (create_feature_aarch64_core):
8404 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8406 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8408 * features/i386/32bit-avx512.c
8409 (create_feature_i386_32bit_avx512): Likewise.
8410 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8412 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8414 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8416 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8418 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8420 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8422 * features/i386/64bit-avx512.c
8423 (create_feature_i386_64bit_avx512): Likewise.
8424 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8426 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8428 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8430 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8432 * features/i386/64bit-segments.c
8433 (create_feature_i386_64bit_segments): Likewise.
8434 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8436 * features/i386/x32-core.c
8437 (create_feature_i386_x32_core): Likewise.
8438 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8439 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8440 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8441 * target-descriptions.c: In generated code, don't pass xml
8444 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8446 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8447 (print_xml_feature::visit_post): Likewise.
8448 (print_xml_feature::visit): Likewise.
8449 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8450 (print_xml_feature): Add new class.
8451 * regformats/regdat.sh: Null xmltarget on feature targets.
8452 * target-descriptions.c (struct target_desc): Add xmltarget.
8453 (maintenance_check_tdesc_xml_convert): Add unittest function.
8454 (tdesc_get_features_xml): Add function to get xml.
8455 (maintenance_check_xml_descriptions): Test xml generation.
8456 * xml-tdesc.c (string_read_description_xml): Add function.
8457 * xml-tdesc.h (string_read_description_xml): Add declaration.
8459 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8461 * features/Makefile: Add feature marker to targets with new style
8462 target descriptions.
8463 * regformats/aarch64.dat: Regenerate.
8464 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8465 * regformats/i386/amd64-avx-linux.dat: Likewise.
8466 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8467 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8468 * regformats/i386/amd64-linux.dat: Likewise.
8469 * regformats/i386/amd64-mpx-linux.dat: Likewise.
8470 * regformats/i386/amd64.dat: Likewise.
8471 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8472 * regformats/i386/i386-avx-linux.dat: Likewise.
8473 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8474 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8475 * regformats/i386/i386-linux.dat: Likewise.
8476 * regformats/i386/i386-mmx-linux.dat: Likewise.
8477 * regformats/i386/i386-mpx-linux.dat: Likewise.
8478 * regformats/i386/i386.dat: Likewise.
8479 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8480 * regformats/i386/x32-avx-linux.dat: Likewise.
8481 * regformats/i386/x32-linux.dat: Likewise.
8482 * regformats/tic6x-c62x-linux.dat: Likewise.
8483 * regformats/tic6x-c64x-linux.dat: Likewise.
8484 * regformats/tic6x-c64xp-linux.dat: Likewise.
8485 * regformats/regdat.sh: Parse feature marker.
8487 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8489 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8490 (tdesc_osabi_name): Likewise.
8491 * target-descriptions.c (tdesc_architecture_name): Add new
8493 (tdesc_osabi_name): Likewise.
8495 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8497 * common/tdesc.c (tdesc_predefined_type): Move to here.
8498 (tdesc_named_type): Likewise.
8499 (tdesc_create_vector): Likewise.
8500 (tdesc_create_struct): Likewise.
8501 (tdesc_set_struct_size): Likewise.
8502 (tdesc_create_union): Likewise.
8503 (tdesc_create_flags): Likewise.
8504 (tdesc_create_enum): Likewise.
8505 (tdesc_add_field): Likewise.
8506 (tdesc_add_typed_bitfield): Likewise.
8507 (tdesc_add_bitfield): Likewise.
8508 (tdesc_add_flag): Likewise.
8509 (tdesc_add_enum_value): Likewise.
8510 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8511 (struct tdesc_type_vector): Likewise.
8512 (struct tdesc_type_field): Likewise.
8513 (struct tdesc_type_with_fields): Likewise.
8514 (tdesc_create_enum): Add declaration.
8515 (tdesc_add_typed_bitfield): Likewise.
8516 (tdesc_add_enum_value): Likewise.
8517 * target-descriptions.c (tdesc_type_field): Move from here.
8518 (tdesc_type_builtin): Likewise.
8519 (tdesc_type_vector): Likewise.
8520 (tdesc_type_with_fields): Likewise.
8521 (tdesc_predefined_types): Likewise.
8522 (tdesc_named_type): Likewise.
8523 (tdesc_create_vector): Likewise.
8524 (tdesc_create_struct): Likewise.
8525 (tdesc_set_struct_size): Likewise.
8526 (tdesc_create_union): Likewise.
8527 (tdesc_create_flags): Likewise.
8528 (tdesc_create_enum): Likewise.
8529 (tdesc_add_field): Likewise.
8530 (tdesc_add_typed_bitfield): Likewise.
8531 (tdesc_add_bitfield): Likewise.
8532 (tdesc_add_flag): Likewise.
8533 (tdesc_add_enum_value): Likewise.
8534 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8535 (tdesc_add_typed_bitfield): Likewise.
8536 (tdesc_add_enum_value): Likewise.
8538 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8540 * common/tdesc.c (tdesc_feature::accept): Move to here.
8541 (tdesc_feature::operator==): Likewise.
8542 (tdesc_create_reg): Likewise.
8543 * common/tdesc.h (tdesc_type_kind): Likewise.
8544 (struct tdesc_type): Likewise.
8545 (struct tdesc_feature): Likewise.
8546 * regformats/regdat.sh: Create a feature.
8547 * target-descriptions.c (tdesc_type_kind): Move from here.
8548 (tdesc_type): Likewise.
8549 (tdesc_type_up): Likewise.
8550 (tdesc_feature): Likewise.
8551 (tdesc_create_reg): Likewise.
8553 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8555 * Makefile.in: Add arch/tdesc.c
8556 * common/tdesc.c: New file.
8557 * common/tdesc.h (tdesc_element_visitor): Move to here.
8558 (tdesc_element): Likewise.
8559 (tdesc_reg): Likewise.
8560 (tdesc_reg_up): Likewise.
8561 * regformats/regdef.h (reg): Add offset to constructors.
8562 * target-descriptions.c (tdesc_element_visitor): Move from here.
8563 (tdesc_element): Likewise.
8564 (tdesc_reg): Likewise.
8565 (tdesc_reg_up): Likewise.
8567 2018-04-17 Tom Tromey <tom@tromey.com>
8569 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8572 2018-04-17 Tom Tromey <tom@tromey.com>
8574 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8576 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
8578 * symtab.c (print_symbol_info): Skip printing filename and line
8579 number when `last' is NULL.
8580 (symtab_symbol_info): Use empty string instead of NULL for first
8581 invocation of print_symbol_info.
8582 (rbreak_command): Pass NULL to `last' parameter of
8585 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
8587 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8590 2018-04-16 Pedro Alves <palves@redhat.com>
8592 * MAINTAINERS (sh): Remove.
8593 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8594 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8595 (ALLDEPFILES): Remove sh64-tdep.c.
8596 * NEWS: Mentions that support for SH-5/SH64 is removed.
8597 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8598 (sh*-*-openbsd*): Ditto.
8599 (sh64-*-elf*): Remove.
8601 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8602 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8603 * sh-tdep.c: No longer include "sh64-tdep.h".
8604 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8605 * sh64-tdep.c, sh64-tdep.h: Remove files.
8607 2018-04-16 Pedro Alves <palves@redhat.com>
8609 * MAINTAINERS: Remove m88k.
8610 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8611 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8612 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8613 * NEWS: Mention that support for m88k was removed.
8614 * configure.host (m88*-*-*): Remove support.
8615 * configure.nat (m88k-*-*): Remove support.
8616 * configure.tgt (m88*-*-openbsd*): Remove.
8617 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8619 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
8621 * configure.tgt (x86_tobjs): New variable.
8622 (amd64_tobjs, i386_tobjs): Use it.
8624 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8626 * symtab.c (print_symbol_info): Precede the symbol definition by
8627 the line number when available.
8628 * NEWS: Advertise this enhancement.
8630 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8632 * NEWS (New options): announce set/show record btrace cpu.
8633 * btrace.c: Include record-btrace.h.
8634 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8635 the vendor is unknown.
8636 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
8637 Maybe overwrite the btrace configuration's cpu.
8638 (btrace_compute_ftrace): Add cpu parameter. Update callers.
8639 (btrace_fetch): Add cpu parameter. Update callers.
8640 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8641 Maybe overwrite the btrace configuration's cpu. Skip enabling
8642 errata workarounds if the vendor is unknown.
8643 * python/py-record-btrace.c: Include record-btrace.h.
8644 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8645 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8646 * record-btrace.c (record_btrace_cpu_state_kind): New.
8647 (record_btrace_cpu): New.
8648 (set_record_btrace_cpu_cmdlist): New.
8649 (record_btrace_get_cpu): New.
8650 (require_btrace_thread, record_btrace_info)
8651 (record_btrace_resume_thread): Call record_btrace_get_cpu.
8652 (cmd_set_record_btrace_cpu_none): New.
8653 (cmd_set_record_btrace_cpu_auto): New.
8654 (cmd_set_record_btrace_cpu): New.
8655 (cmd_show_record_btrace_cpu): New.
8656 (_initialize_record_btrace): Initialize set/show record btrace cpu
8658 * record-btrace.h (record_btrace_get_cpu): New.
8660 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8662 * record.c (set_record_command): Fix typo in message.
8664 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8666 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8668 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8670 * infrun.c (process_event_stop_test): Call
8671 gdbarch_in_indirect_branch_thunk.
8672 * gdbarch.sh (in_indirect_branch_thunk): New.
8673 * gdbarch.c: Regenerated.
8674 * gdbarch.h: Regenerated.
8677 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8678 (HFILES_NO_SRCDIR): Add x86-tdep.h.
8679 (ALLDEPFILES): Add x86-tdep.c.
8680 * arch-utils.h (default_in_indirect_branch_thunk): New.
8681 * arch-utils.c (default_in_indirect_branch_thunk): New.
8682 * i386-tdep: Include x86-tdep.h.
8683 (i386_in_indirect_branch_thunk): New.
8684 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8686 * amd64-tdep: Include x86-tdep.h.
8687 (amd64_in_indirect_branch_thunk): New.
8688 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8690 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8693 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8694 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8695 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8698 2018-04-12 Tom Tromey <tom@tromey.com>
8700 * rust-lang.c (rust_print_struct_def): Remove univariant code.
8701 (rust_evaluate_subexp): Likewise.
8703 2018-04-12 Pedro Alves <palves@redhat.com>
8705 * procfs.c (procfs_detach): Make forward declaration's prototype
8706 match definition's protototype.
8707 (proc_get_LDT_entry): Remove stale do_cleanups call.
8709 2018-04-12 Pedro Alves <palves@redhat.com>
8711 * target.h (target_ops::to_has_exited): Delete.
8712 (target_has_exited): Delete.
8713 * target-delegates.c: Regenerate.
8715 2018-04-11 Pedro Alves <palves@redhat.com>
8717 * target.c (fileio_fh_t::t): Add comment.
8718 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8719 (target_fileio_close): Handle a NULL target.
8720 (invalidate_fileio_fh): New.
8721 (target_close): Call it.
8722 * remote.c (remote_hostio_send_command): No longer check whether
8723 remote_desc is open.
8725 2018-04-11 Pedro Alves <palves@redhat.com>
8727 * target.c (fileio_fh_t): Make it a named struct instead of a
8729 (fileio_fh_t::is_closed): New method.
8730 (DEF_VEC_O (fileio_fh_t)): Remove.
8731 (fileio_fhandles): Now a std::vector.
8732 (is_closed_fileio_fh): Delete.
8733 (acquire_fileio_fd): Adjust. Rename parameters.
8734 (release_fileio_fd): Adjust.
8735 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8736 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8737 (target_fileio_close): Adjust.
8739 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
8741 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8744 2018-04-10 Pedro Alves <palves@redhat.com>
8746 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8747 (scoped_finish_thread_state): New class.
8748 * infcmd.c (run_command_1): Use it instead of finish_thread_state
8750 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8751 (fetch_inferior_event, normal_stop): Likewise.
8752 * thread.c (finish_thread_state_cleanup): Delete.
8754 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8755 Pedro Alves <palves@redhat.com>
8757 * value.c: Include "selftest.h" and "common/array-view.h".
8758 (struct range) <operator ==>: New.
8759 (test_ranges_contain): New.
8760 (check_ranges_vector): New.
8761 (test_insert_into_bit_range_vector): New.
8762 (_initialize_values): Register selftests.
8763 * common/array-view.h (operator==, operator!=): New.
8765 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8767 * common/gdb_vecs.h (unordered_remove): Add overload that takes
8769 * inline-frame.c: Include <algorithm>.
8770 (struct inline_state): Add constructor.
8771 (inline_state_s): Remove.
8772 (DEF_VEC_O(inline_state_s)): Remove.
8773 (inline_states): Change type to std::vector.
8774 (find_inline_frame_state): Adjust to std::vector.
8775 (allocate_inline_frame_state): Remove.
8776 (clear_inline_frame_state): Adjust to std::vector.
8777 (skip_inline_frames): Adjust to std::vector.
8779 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8781 * tracepoint.h (struct trace_state_variable): Add constructor.
8782 <name>: Change type to std::string.
8783 * tracepoint.c (tsv_s): Remove.
8784 (DEF_VEC_O(tsv_s)): Remove.
8785 (tvariables): Change to std::vector.
8786 (create_trace_state_variable): Adjust to std::vector.
8787 (find_trace_state_variable): Likewise.
8788 (find_trace_state_variable_by_number): Likewise.
8789 (delete_trace_state_variable): Likewise.
8790 (trace_variable_command): Adjust to std::string.
8791 (delete_trace_variable_command): Likewise.
8792 (tvariables_info_1): Adjust to std::vector.
8793 (save_trace_state_variables): Likewise.
8794 (start_tracing): Likewise.
8795 (merge_uploaded_trace_state_variables): Adjust to std::vector
8797 * target.h (struct target_ops)
8798 <to_download_trace_state_variable>: Pass reference to
8799 trace_state_variable.
8800 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8801 * target-delegates.c: Re-generate.
8802 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8803 (mi_tsv_deleted): Likewise.
8804 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8805 * remote.c (remote_download_trace_state_variable): Change
8806 pointer to reference and adjust.
8807 * make-target-delegates (parse_argtypes): Handle references.
8808 (write_function_header): Likewise.
8809 (munge_type): Likewise.
8811 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8813 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8814 string_view-selftests.c.
8815 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8817 * unittests/basic_string_view/cons/char/1.cc: Likewise.
8818 * unittests/basic_string_view/cons/char/2.cc: Likewise.
8819 * unittests/basic_string_view/cons/char/3.cc: Likewise.
8820 * unittests/basic_string_view/element_access/char/1.cc:
8822 * unittests/basic_string_view/element_access/char/empty.cc:
8824 * unittests/basic_string_view/element_access/char/front_back.cc:
8826 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8827 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8829 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8831 * unittests/basic_string_view/modifiers/swap/char/1.cc:
8833 * unittests/basic_string_view/operations/compare/char/1.cc:
8835 * unittests/basic_string_view/operations/compare/char/13650.cc:
8837 * unittests/basic_string_view/operations/copy/char/1.cc:
8839 * unittests/basic_string_view/operations/data/char/1.cc:
8841 * unittests/basic_string_view/operations/find/char/1.cc:
8843 * unittests/basic_string_view/operations/find/char/2.cc:
8845 * unittests/basic_string_view/operations/find/char/3.cc:
8847 * unittests/basic_string_view/operations/find/char/4.cc:
8849 * unittests/basic_string_view/operations/rfind/char/1.cc:
8851 * unittests/basic_string_view/operations/rfind/char/2.cc:
8853 * unittests/basic_string_view/operations/rfind/char/3.cc:
8855 * unittests/basic_string_view/operations/substr/char/1.cc:
8857 * unittests/basic_string_view/operators/char/2.cc: Likewise.
8858 * unittests/string_view-selftests.c: New file.
8860 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8862 * unittests/basic_string_view/capacity/1.cc: New file.
8863 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8864 * unittests/basic_string_view/cons/char/1.cc: New file.
8865 * unittests/basic_string_view/cons/char/2.cc: New file.
8866 * unittests/basic_string_view/cons/char/3.cc: New file.
8867 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8868 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8869 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8870 * unittests/basic_string_view/element_access/char/1.cc: New file.
8871 * unittests/basic_string_view/element_access/char/2.cc: New file.
8872 * unittests/basic_string_view/element_access/char/empty.cc: New file.
8873 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8874 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8875 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8876 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8877 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8878 * unittests/basic_string_view/include.cc: New file.
8879 * unittests/basic_string_view/inserters/char/1.cc: New file.
8880 * unittests/basic_string_view/inserters/char/2.cc: New file.
8881 * unittests/basic_string_view/inserters/char/3.cc: New file.
8882 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8883 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8884 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8885 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8886 * unittests/basic_string_view/literals/types.cc: New file.
8887 * unittests/basic_string_view/literals/values.cc: New file.
8888 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8889 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8890 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8891 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8892 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8893 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8894 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8895 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8896 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8897 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8898 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8899 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8900 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8901 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8902 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8903 * unittests/basic_string_view/operations/data/char/1.cc: New file.
8904 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8905 * unittests/basic_string_view/operations/find/char/1.cc: New file.
8906 * unittests/basic_string_view/operations/find/char/2.cc: New file.
8907 * unittests/basic_string_view/operations/find/char/3.cc: New file.
8908 * unittests/basic_string_view/operations/find/char/4.cc: New file.
8909 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8910 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8911 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8912 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8913 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8914 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8915 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8916 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8917 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8918 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8919 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8920 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8921 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8922 * unittests/basic_string_view/operators/char/2.cc: New file.
8923 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8924 * unittests/basic_string_view/range_access/char/1.cc: New file.
8925 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8926 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8927 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8928 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8929 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8930 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8931 * unittests/basic_string_view/requirements/typedefs.cc: New file.
8932 * unittests/basic_string_view/typedefs.cc: New file.
8933 * unittests/basic_string_view/types/1.cc: New file.
8935 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8937 * common/gdb_string_view.h: Remove libstdc++ implementation
8938 details, adjust to gdb reality.
8939 * common/gdb_string_view.tcc: Likewise.
8940 * cli/cli-script.c (struct string_view): Remove.
8941 (user_args) <m_args>: Change element type to gdb::string_view.
8942 (user_args::insert_args): Adjust.
8944 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8946 * common/gdb_string_view.h: New file.
8947 * common/gdb_string_view.tcc: New file.
8949 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8951 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8952 * configure: Re-generate.
8954 2018-04-09 Pedro Alves <palves@redhat.com>
8956 * gdbarch.sh: Include "observable.h" instead of "observer.h".
8957 (set_target_gdbarch): Call
8958 gdb::observers::architecture_changed.notify instead of
8959 observer_notify_architecture_changed.
8961 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8963 * tracepoint.c (struct current_traceframe_cleanup): Remove.
8964 (do_restore_current_traceframe_cleanup): Remove.
8965 (restore_current_traceframe_cleanup_dtor): Remove.
8966 (make_cleanup_restore_current_traceframe): Remove.
8967 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8969 * tracepoint.h (struct scoped_restore_current_traceframe): New.
8970 * infrun.c (fetch_inferior_event): Use
8971 scoped_restore_current_traceframe.
8973 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8975 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8977 <n_allocated_type_units>: Remove.
8978 <all_type_units>: Change to std::vector.
8979 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8980 to std::vector change.
8981 (dwarf2_per_objfile::get_cutu): Likewise.
8982 (dwarf2_per_objfile::get_tu): Likewise.
8983 (create_signatured_type_table_from_index): Likewise.
8984 (create_signatured_type_table_from_debug_names): Likewise.
8985 (dw2_symtab_iter_next): Likewise.
8986 (dw2_print_stats): Likewise.
8987 (dw2_expand_all_symtabs): Likewise.
8988 (dw2_expand_marked_cus): Likewise.
8989 (dw2_debug_names_iterator::next): Likewise.
8990 (dwarf2_initialize_objfile): Likewise.
8991 (add_signatured_type_cu_to_table): Likewise.
8992 (create_all_type_units): Likewise.
8993 (add_type_unit): Likewise.
8994 (struct tu_abbrev_offset): Add constructor.
8995 (build_type_psymtabs_1): Adjust to std::vector change.
8996 (print_tu_stats): Likewise.
8997 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8998 (write_debug_names): Likewise.
9000 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9002 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9003 Make an std::vector.
9004 <n_comp_units>: Remove.
9005 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9006 to std::vector change.
9007 (dwarf2_per_objfile::get_cutu): Likewise.
9008 (dwarf2_per_objfile::get_cu): Likewise.
9009 (create_cus_from_index): Likewise.
9010 (create_addrmap_from_index): Likewise.
9011 (create_addrmap_from_aranges): Likewise.
9012 (dwarf2_read_index): Likewise.
9013 (dw2_find_last_source_symtab): Likewise.
9014 (dw2_map_symtabs_matching_filename): Likewise.
9015 (dw2_symtab_iter_next): Likewise.
9016 (dw2_print_stats): Likewise.
9017 (dw2_expand_all_symtabs): Likewise.
9018 (dw2_expand_symtabs_with_fullname): Likewise.
9019 (dw2_expand_marked_cus): Likewise.
9020 (dw2_map_symbol_filenames): Likewise.
9021 (create_cus_from_debug_names): Likewise.
9022 (dwarf2_read_debug_names): Likewise.
9023 (dw2_debug_names_iterator::next): Likewise.
9024 (dwarf2_initialize_objfile): Likewise.
9025 (set_partial_user): Likewise.
9026 (dwarf2_build_psymtabs_hard): Likewise.
9027 (read_comp_units_from_section): Remove arguments, adjust to
9029 (create_all_comp_units): Adjust to std::vector and
9030 read_comp_units_from_section changes.
9031 (dwarf2_find_containing_comp_unit): Adjust to std::vector
9033 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9034 (psyms_seen_size): Likewise.
9035 (write_gdbindex): Likewise.
9036 (write_debug_names): Likewise.
9038 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9040 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9041 with dwarf2_per_objfile.
9042 (create_cus_from_index): Likewise.
9043 (create_signatured_type_table_from_index): Likewise.
9044 (dwarf2_read_index): Likewise.
9045 (dwarf2_initialize_objfile): Likewise.
9046 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
9047 per_cu rather than get_dwarf2_per_objfile.
9049 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9051 * dwarf2read.h (struct signatured_type): Forward declare.
9052 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9054 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9055 (dw2_get_cutu): ...this.
9056 (dwarf2_per_objfile::get_cu): Rename from...
9057 (dw2_get_cu): ...this.
9058 (dwarf2_per_objfile::get_tu): New.
9059 (create_addrmap_from_index): Adjust.
9060 (create_addrmap_from_aranges): Adjust.
9061 (dw2_find_last_source_symtab): Adjust.
9062 (dw2_map_symtabs_matching_filename): Adjust.
9063 (dw2_symtab_iter_next): Adjust.
9064 (dw2_print_stats): Adjust.
9065 (dw2_expand_all_symtabs): Adjust.
9066 (dw2_expand_symtabs_with_fullname): Adjust.
9067 (dw2_expand_marked_cus): Adjust.
9068 (dw_expand_symtabs_matching_file_matcher): Adjust.
9069 (dw2_map_symbol_filenames): Adjust.
9070 (dw2_debug_names_iterator::next): Adjust.
9071 (dwarf2_initialize_objfile): Adjust.
9072 (set_partial_user): Adjust.
9073 (dwarf2_build_psymtabs_hard): Adjust.
9075 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9077 * dwarf2read.c (create_signatured_type_table_from_debug_names):
9078 Remove unused variables.
9079 (dw2_map_symtabs_matching_filename): Likewise.
9080 (dwarf2_record_block_ranges): Likewise.
9081 (dwarf2_read_addr_index): Likewise.
9082 (follow_die_offset): Likewise.
9084 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9086 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9087 to symbol_file_add_main.
9089 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9092 * mi/mi-console.c (do_fputc_async_safe): New.
9093 (mi_console_file::write_async_safe): New.
9094 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9095 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9097 * ui-file.c (ui_file::putstrn): Adjust call to
9098 fputstrn_unfiltered.
9099 * utils.c (printchar): Replace do_fputs and do_fprintf
9100 parameters by do_fputc.
9101 (fputstr_filtered): Adjust call to printchar.
9102 (fputstr_unfiltered): Likewise.
9103 (fputstrn_filtered): Likewise.
9104 (fputstrn_unfiltered): Add do_fputc parameter, pass to
9106 * utils.h (do_fputc_ftype): New typedef.
9107 (fputstrn_unfiltered): Add do_fputc parameter.
9109 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9111 * regformats/i386/i386-avx.dat: Remove.
9113 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9116 * amd64-tdep.c (amd64_none_init_abi): New function.
9117 (amd64_x32_none_init_abi): New function.
9118 (_initialize_amd64_tdep): Register handlers for x86-64 and
9119 x64_32 with GDB_OSABI_NONE.
9120 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9121 GDB_OSABI_NONE osabi.
9123 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9126 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9128 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9129 * osabi.c (gdb_osabi_names): Add "unknown" entry.
9131 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9133 * common/byte-vector.h (char_vector): New type.
9134 * target.h (target_read_alloc): Return
9135 gdb::optional<byte_vector>.
9136 (target_read_stralloc): Return gdb::optional<char_vector>.
9137 (target_get_osdata): Return gdb::optional<char_vector>.
9138 * target.c (target_read_alloc_1): Templatize. Replacement
9139 manual memory management with vector.
9140 (target_read_alloc): Change return type, adjust.
9141 (target_read_stralloc): Change return type, adjust.
9142 (target_get_osdata): Change return type, adjust.
9143 * auxv.c (struct auxv_info) <length>: Remove.
9144 <data>: Change type to gdb::optional<byte_vector>.
9145 (auxv_inferior_data_cleanup): Free auxv_info with delete.
9146 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9147 (target_auxv_search): Adjust.
9148 (fprint_target_auxv): Adjust.
9149 * avr-tdep.c (avr_io_reg_read_command): Adjust.
9150 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9151 (linux_make_corefile_notes): Adjust.
9152 * osdata.c (get_osdata): Adjust.
9153 * remote.c (remote_get_threads_with_qxfer): Adjust.
9154 (remote_memory_map): Adjust.
9155 (remote_traceframe_info): Adjust.
9156 (btrace_read_config): Adjust.
9157 (remote_read_btrace): Adjust.
9158 (remote_pid_to_exec_file): Adjust.
9159 * solib-aix.c (solib_aix_get_library_list): Adjust.
9160 * solib-dsbt.c (decode_loadmap): Don't free buf.
9161 (dsbt_get_initial_loadmaps): Adjust.
9162 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9163 * solib-target.c (solib_target_current_sos): Adjust.
9164 * tracepoint.c (sdata_make_value): Adjust.
9165 * xml-support.c (xinclude_start_include): Adjust.
9166 (xml_fetch_content_from_file): Adjust.
9167 * xml-support.h (xml_fetch_another): Change return type.
9168 (xml_fetch_content_from_file): Change return type.
9169 * xml-syscall.c (xml_init_syscalls_info): Adjust.
9170 * xml-tdesc.c (file_read_description_xml): Adjust.
9171 (fetch_available_features_from_target): Change return type.
9172 (target_fetch_description_xml): Adjust.
9173 (target_read_description_xml): Adjust.
9175 2018-04-06 Tom Tromey <tom@tromey.com>
9177 * value.c (~value): Update.
9178 (struct value) <contents>: Now unique_xmalloc_ptr.
9179 (value_contents_bits_eq, allocate_value_contents)
9180 (value_contents_raw, value_contents_all_raw)
9181 (value_contents_for_printing, value_contents_for_printing_const)
9182 (set_value_enclosing_type): Update.
9184 2018-04-06 Tom Tromey <tom@tromey.com>
9186 * value.c (range_s): Remove typedef, VEC.
9187 (struct range): Add operator<.
9188 (range_lessthan): Remove.
9189 (ranges_contain): Change type.
9191 (struct value) <unavailable, optimized_out>: Now std::vector.
9192 (value_entirely_available)
9193 (value_entirely_covered_by_range_vector)
9194 (value_entirely_unavailable, value_entirely_optimized_out):
9196 (insert_into_bit_range_vector): Change argument type.
9197 (find_first_range_overlap): Likewise.
9198 (struct ranges_and_idx, value_contents_bits_eq)
9199 (require_not_optimized_out, require_available): Update.
9200 (ranges_copy_adjusted): Change argument types.
9201 (value_optimized_out, value_copy, value_fetch_lazy): Update.
9203 2018-04-06 Tom Tromey <tom@tromey.com>
9205 * value.c (~value): Update.
9206 (struct value) <parent>: Now a value_ref_ptr.
9207 (value_parent, set_value_parent, value_address, value_copy):
9210 2018-04-06 Tom Tromey <tom@tromey.com>
9212 * value.c (struct value): Add constructor, destructor, and member
9214 (allocate_value_lazy, value_decref): Update.
9216 2018-04-06 Tom Tromey <tom@tromey.com>
9218 * value.c (struct value) <released, next>: Remove.
9219 (all_values): Now a std::vector.
9220 (allocate_value_lazy): Update.
9221 (value_next): Remove.
9222 (value_mark, value_free_to_mark, release_value)
9223 (value_release_to_mark): Update.
9225 2018-04-06 Tom Tromey <tom@tromey.com>
9227 * value.h (fetch_subexp_value, value_release_to_mark): Update.
9228 (free_value_chain): Remove.
9229 * value.c (free_value_chain): Remove.
9230 (value_release_to_mark): Return a std::vector.
9231 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9233 (check_condition): Update.
9234 * eval.c (fetch_subexp_value): Change "val_chain" to a
9236 * breakpoint.c (update_watchpoint): Update.
9237 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9239 2018-04-06 Tom Tromey <tom@tromey.com>
9241 * value.h (free_all_values): Remove.
9242 * value.c (free_all_values): Remove.
9244 2018-04-06 Tom Tromey <tom@tromey.com>
9246 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9247 (value_history_chain, value_history_count): Remove.
9248 (value_history): New global.
9249 (record_latest_value, access_value_history, show_values)
9250 (preserve_values): Update.
9252 2018-04-06 Tom Tromey <tom@tromey.com>
9254 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9255 * varobj.c (varobj_set_display_format, varobj_set_value)
9256 (install_default_visualizer, construct_visualizer)
9257 (install_new_value, ~varobj, varobj_get_value_type)
9258 (my_value_of_variable, varobj_editable_p): Update.
9259 * c-varobj.c (c_describe_child, c_value_of_variable)
9260 (cplus_number_of_children, cplus_describe_child): Update.
9261 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9262 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9263 (ada_value_of_variable, ada_value_is_changeable_p): Update.
9265 2018-04-06 Tom Tromey <tom@tromey.com>
9267 * printcmd.c (last_examine_address): Change type to
9269 (do_examine, x_command): Update.
9271 2018-04-06 Tom Tromey <tom@tromey.com>
9273 * value.c (release_value): Update.
9274 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9275 (struct bpstats) <val>: Now a value_ref_ptr.
9276 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9277 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9278 (~watchpoint, print_it_watchpoint, watch_command_1)
9279 (invalidate_bp_value_on_memory_change): Update.
9281 2018-04-06 Tom Tromey <tom@tromey.com>
9283 * varobj.c (varobj_clear_saved_item)
9284 (update_dynamic_varobj_children, install_new_value, ~varobj):
9286 * value.h (value_incref): Move declaration earlier.
9287 (value_decref): Rename from value_free.
9288 (struct value_ref_policy): New.
9289 (value_ref_ptr): New typedef.
9290 (struct value_deleter): Remove.
9291 (gdb_value_up): Remove typedef.
9292 (release_value): Change return type.
9293 (release_value_or_incref): Remove.
9294 * value.c (set_value_parent): Update.
9295 (value_incref): Change return type.
9296 (value_decref): Rename from value_free.
9297 (value_free_to_mark, free_all_values, free_value_chain): Update.
9298 (release_value): Return value_ref_ptr.
9299 (release_value_or_incref): Remove.
9300 (record_latest_value, set_internalvar, clear_internalvar):
9302 * stack.c (info_frame_command): Don't call value_free.
9303 * python/py-value.c (valpy_dealloc, valpy_new)
9304 (value_to_value_object): Update.
9305 * printcmd.c (do_examine): Update.
9306 * opencl-lang.c (lval_func_free_closure): Update.
9307 * mi/mi-main.c (register_changed_p): Don't call value_free.
9308 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9309 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9310 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9312 * guile/scm-value.c (vlscm_free_value_smob)
9313 (vlscm_scm_from_value): Update.
9314 * frame.c (frame_register_unwind, frame_unwind_register_signed)
9315 (frame_unwind_register_unsigned, get_frame_register_bytes)
9316 (put_frame_register_bytes): Don't call value_free.
9317 * findvar.c (address_from_register): Don't call value_free.
9318 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9319 * dwarf2loc.c (entry_data_value_free_closure)
9320 (value_of_dwarf_reg_entry, free_pieced_value_closure)
9321 (dwarf2_evaluate_loc_desc_full): Update.
9322 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9323 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9324 (~watchpoint, watch_command_1)
9325 (invalidate_bp_value_on_memory_change): Update.
9326 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9328 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
9331 * warning.m4: Add -Wno-error=deprecated-register.
9332 * configure: Re-generate.
9334 2018-04-05 Tom Tromey <tom@tromey.com>
9336 * linespec.h: Remove include of "vec.h".
9338 2018-04-05 Tom Tromey <tom@tromey.com>
9340 * linespec.c (typep): Remove typedef.
9341 (find_methods, find_superclass_methods): Take a std::vector.
9342 (find_method): Use std::vector.
9344 2018-04-05 Tom Tromey <tom@tromey.com>
9346 * utils.c (compare_strings): Remove.
9347 * utils.h (compare_strings): Remove.
9348 * objc-lang.h (find_imps): Update.
9349 * objc-lang.c (find_methods): Take a std::vector.
9350 (uniquify_strings, find_imps): Likewise.
9351 * linespec.c (find_methods): Take a std::vector.
9352 (decode_objc): Use std::vector.
9353 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9355 (find_method, find_function_symbols): Use std::vector.
9357 2018-04-05 Tom Tromey <tom@tromey.com>
9359 * completer.c (completion_tracker::completion_tracker): Remove
9361 (completion_tracker::discard_completions): Likewise.
9362 * breakpoint.c (ambiguous_names_p): Remove cast.
9363 * ada-lang.c (_initialize_ada_language): Remove cast.
9364 * utils.h (streq): Update.
9365 (streq_hash): Add new declaration.
9366 * utils.c (streq): Return bool.
9367 (streq_hash): New function.
9369 2018-04-05 Tom Tromey <tom@tromey.com>
9371 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9372 Remove a string copy.
9374 2018-04-05 Tom Tromey <tom@tromey.com>
9376 * linespec.c (filter_results): Use std::vector.
9377 (decode_line_2, decode_line_full): Update.
9379 2018-04-05 Tom Tromey <tom@tromey.com>
9381 * linespec.c (canonical_to_fullform): Return std::string.
9382 (filter_results): Update.
9383 (struct decode_line_2_item): Add constructor.
9384 <fullform, displayform>: Now std::string.
9385 (decode_line_2_compare_items): Now a std::sort comparator.
9386 (decode_line_2): Update.
9388 2018-04-05 Tom Tromey <tom@tromey.com>
9390 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9391 (unexpected_linespec_error): Update.
9392 (linespec_parse_basic, parse_linespec): Update.
9394 2018-04-05 Tom Tromey <tom@tromey.com>
9396 * linespec.c (linespec_parse_basic): Reindent.
9398 2018-04-05 Tom Tromey <tom@tromey.com>
9400 * minsyms.h (iterate_over_minimal_symbols): Update.
9401 * minsyms.c (iterate_over_minimal_symbols): Take a
9403 * linespec.c (struct collect_minsyms): Remove.
9404 (compare_msyms): Now a std::sort comparator.
9405 (add_minsym): Add parameters.
9406 (search_minsyms_for_name): Update. Use std::vector.
9408 2018-04-03 Tom Tromey <tom@tromey.com>
9410 * mipsread.c (read_alphacoff_dynamic_symtab): Use
9413 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9415 * MAINTAINERS (Write After Approval): Add Weimin Pan.
9417 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9420 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
9421 printing static type.
9423 2018-04-01 Tom Tromey <tom@tromey.com>
9425 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9426 (rs6000_xfer_shared_libraries): Update.
9428 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
9430 * common/gdb_vecs.h (char_ptr): Remove.
9431 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9433 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9435 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9437 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9439 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9441 * tracepoint.h (struct uploaded_tp): Initialize fields.
9442 <actions, step_actions, cmd_strings>: Change type to
9443 std::vector<char *>.
9444 * tracepoint.c (get_uploaded_tp): Allocate with new.
9445 (free_uploaded_tps): Free with delete.
9446 (parse_tracepoint_definition): Adjust to std::vector change.
9447 * breakpoint.c (read_uploaded_action): Likewise.
9448 (create_tracepoint_from_upload): Likewise.
9449 * ctf.c (ctf_write_uploaded_tp): Likewise.
9450 (SET_ARRAY_FIELD): Likewise.
9451 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9453 2018-03-30 Tom Tromey <tom@tromey.com>
9455 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
9457 (svr4_keep_data_in_core): Update.
9458 (svr4_read_so_list): Update.
9460 2018-03-30 Tom Tromey <tom@tromey.com>
9462 * windows-nat.c (handle_output_debug_string, handle_exception):
9464 * target.h (target_read_string): Update.
9465 * target.c (target_read_string): Change "string" to
9467 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9469 * solib-frv.c (frv_current_sos): Update.
9470 * solib-dsbt.c (dsbt_current_sos): Update.
9471 * solib-darwin.c (darwin_current_sos): Update.
9472 * linux-thread-db.c (inferior_has_bug): Update.
9473 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9474 Update. Remove alloca.
9475 * ada-lang.c (ada_main_name): Update.
9477 2018-03-30 Tom Tromey <tom@tromey.com>
9479 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9480 (struct dwo_file_deleter): New.
9481 (dwo_file_up): New typedef.
9482 (open_and_init_dwo_file): Use dwo_file_up.
9483 (free_dwo_file_cleanup): Remove.
9485 2018-03-30 Tom Tromey <tom@tromey.com>
9487 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9488 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9490 2018-03-30 Tom Tromey <tom@tromey.com>
9492 * dwarf2read.c (class free_cached_comp_units): New class.
9493 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9494 (free_cached_comp_units): Remove function.
9496 2018-03-30 Tom Tromey <tom@tromey.com>
9498 * utils.h (make_cleanup_unpush_target): Remove.
9499 * inf-ptrace.c (struct target_unpusher): New.
9500 (target_unpush_up) New typedef.
9501 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9503 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9505 2018-03-27 Tom Tromey <tom@tromey.com>
9507 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9509 2018-03-27 Pedro Alves <palves@redhat.com>
9510 Tom Tromey <tom@tromey.com>
9512 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9513 destructor. Now a class.
9514 (gdb_readline_wrapper_cleanup): Remove function.
9515 (gdb_readline_wrapper): Remove cleanups.
9517 2018-03-27 Tom Tromey <tom@tromey.com>
9519 * typeprint.h (struct type_print_options) <local_typedefs,
9520 global_typedefs>: Remove "struct" keyword.
9521 (class typedef_hash_table): New class.
9522 (recursively_update_typedef_hash, add_template_parameters)
9523 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9524 (find_typedef_in_hash): Don't declare.
9525 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9526 (typedef_hash_table::recursively_update): Rename from
9527 recursively_update_typedef_hash. Now a member.
9528 (typedef_hash_table::add_template_parameters): Rename from
9529 add_template_parameters. Now a member.
9530 (typedef_hash_table::typedef_hash_table): Now a constructor;
9531 rename from create_typedef_hash.
9532 (typedef_hash_table::~typedef_hash_table): Now a destructor;
9533 rename from free_typedef_hash.
9534 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9535 (do_free_global_table): Remove.
9536 (typedef_hash_table::typedef_hash_table): New constructor; renamed
9537 from copy_type_recursive.
9538 (create_global_typedef_table): Remove.
9539 (typedef_hash_table::find_global_typedef): Now a member of
9541 (typedef_hash_table::find_typedef): Rename from
9542 find_typedef_in_hash; now a member.
9543 (whatis_exp): Update.
9544 * extension.h (struct ext_lang_type_printers): Add constructor and
9546 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9548 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9549 Now a constructor; rename from start_ext_lang_type_printers.
9550 (ext_lang_type_printers): Now a destructor; rename from
9551 free_ext_lang_type_printers.
9552 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9554 (c_type_print_base_struct_union): Update. Remove cleanups.
9556 2018-03-27 Tom Tromey <tom@tromey.com>
9558 * dwarf-index-write.c: Include <cmath>.
9560 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9562 * NEWS: Add entry describing new "set|show varsize-limit" command.
9563 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9565 * printcmd.c (_initialize_printcmd): Add "set var" alias of
9568 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
9570 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9572 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9573 * dwarf-index-common.c: New file.
9574 * dwarf-index-common.h: New file.
9575 * dwarf-index-write.c: New file.
9576 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9577 (struct dwarf2_section_info): Move from here.
9578 (dwarf2_section_info_def): Likewise.
9579 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9580 (offset_type): Likewise.
9581 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9582 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9583 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9584 (byte_swap): Likewise.
9585 (MAYBE_SWAP): Likewise.
9586 (dwarf2_per_cu_ptr): Likewise.
9587 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9588 (struct tu_stats): Likewise.
9589 (struct dwarf2_per_objfile): Likewise.
9590 (struct dwarf2_per_cu_data): Likewise.
9591 (struct signatured_type): Likewise.
9592 (sig_type_ptr): Likewise.
9593 (DEF_VEC_P (sig_type_ptr)): Likewise.
9594 (INDEX4_SUFFIX): Likewise.
9595 (INDEX5_SUFFIX): Likewise.
9596 (DEBUG_STR_SUFFIX): Likewise.
9597 (dwarf2_read_section): Make non-static.
9598 (mapped_index_string_hash): Move from here.
9599 (dwarf5_djb_hash): Likewise.
9600 (file_write): Likewise.
9601 (class data_buf): Likewise.
9602 (struct symtab_index_entry): Likewise.
9603 (struct mapped_symtab): Likewise.
9604 (find_slot): Likewise.
9605 (hash_expand): Likewise.
9606 (add_index_entry): Likewise.
9607 (uniquify_cu_indices): Likewise.
9608 (class c_str_view): Likewise.
9609 (class c_str_view_hasher): Likewise.
9610 (class vector_hasher): Likewise.
9611 (write_hash_table): Likewise.
9612 (psym_index_map): Likewise.
9613 (struct addrmap_index_data): Likewise.
9614 (add_address_entry): Likewise.
9615 (add_address_entry_worker): Likewise.
9616 (write_address_map): Likewise.
9617 (symbol_kind): Likewise.
9618 (write_psymbols): Likewise.
9619 (struct signatured_type_index_data): Likewise.
9620 (write_one_signatured_type): Likewise.
9621 (recursively_count_psymbols): Likewise.
9622 (recursively_write_psymbols): Likewise.
9623 (class debug_names): Likewise.
9624 (check_dwarf64_offsets): Likewise.
9625 (psyms_seen_size): Likewise.
9626 (write_gdbindex): Likewise.
9627 (write_debug_names): Likewise.
9628 (assert_file_size): Likewise.
9629 (write_psymtabs_to_index): Likewise.
9630 (save_gdb_index_command): Likewise.
9631 (_initialize_dwarf2_read): Don't register the "save gdb-index"
9633 * dwarf2read.h: New file.
9635 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9638 * dwarf2read.c (dwarf2_physname): Do not return the demangled
9639 symbol name if the CU's language stores symbol names in linkage
9641 * language.h (struct language_defn)
9642 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
9643 all instances of this struct.
9645 2018-03-26 Tom Tromey <tom@tromey.com>
9647 * stack.c (backtrace_command_1): Remove verbose code.
9649 2018-03-26 Tom Tromey <tom@tromey.com>
9651 * python/py-framefilter.c (py_print_type): Don't catch
9652 exceptions. Return void.
9653 (py_print_value): Likewise.
9654 (py_print_single_arg): Likewise.
9655 (enumerate_args): Don't catch exceptions.
9656 (py_print_args): Likewise.
9657 (py_print_frame): Likewise.
9658 (gdbpy_apply_frame_filter): Catch exceptions here.
9660 2018-03-26 Tom Tromey <tom@tromey.com>
9662 * stack.c (_initialize_stack): Remove trailing newlines from help
9663 text. Add "Usage" line to "backtrace" help.
9665 2018-03-26 Tom Tromey <tom@tromey.com>
9668 * python/py-framefilter.c (py_print_args): Call wrap_hint.
9670 2018-03-26 Tom Tromey <tom@tromey.com>
9672 * python/py-framefilter.c (py_print_single_arg): Return
9673 EXT_LANG_BT_ERROR from catch.
9675 2018-03-26 Tom Tromey <tom@tromey.com>
9678 * stack.c (backtrace_command_1): Move some code into no-filters
9681 2018-03-26 Tom Tromey <tom@tromey.com>
9683 * python/py-framefilter.c (throw_quit_or_print_exception): New
9685 (gdbpy_apply_frame_filter): Use it.
9687 2018-03-26 Tom Tromey <tom@tromey.com>
9690 * python/py-framefilter.c (py_print_type, py_print_value)
9691 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9694 2018-03-26 Tom Tromey <tom@tromey.com>
9696 * python/py-framefilter.c (enumerate_args): Use
9697 gdb::unique_xmalloc_ptr.
9699 2018-03-26 Tom Tromey <tom@tromey.com>
9701 * python/py-framefilter.c (py_print_frame): Return
9703 (gdbpy_apply_frame_filter): Update comment.
9704 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9706 <EXT_LANG_BT_NO_FILTERS>: Change value.
9708 2018-03-26 Tom Tromey <tom@tromey.com>
9711 * stack.c (backtrace_command): Parse "hide" argument.
9712 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9713 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9716 2018-03-26 Tom Tromey <tom@tromey.com>
9718 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9720 (backtrace_command): Remove "fulltrace", add "flags".
9722 2018-03-26 Tom Tromey <tom@tromey.com>
9724 * stack.c (backtrace_command): Rewrite command line parsing.
9726 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9728 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9730 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9732 * filename-seen-cache.h: Add include guard.
9734 2018-03-26 Keith Seitz <keiths@redhat.com>
9736 * symfile.c (place_section): Remove "struct" from section_addr_info
9738 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9739 "struct" keyword from section_addr_info.
9741 2018-03-26 Alan Hayward <alan.hayward@arm.com>
9743 * regformats/regdef.h (reg): Add constructors.
9745 2018-03-25 Pedro Alves <palves@redhat.com>
9747 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9748 if then/else bodies in var_func_name extraction.
9750 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
9752 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9753 lookup_minimal_symbol() to find symbol entry.
9754 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9756 2018-03-23 Keith Seitz <keiths@redhat.com>
9759 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9760 nested type definitions for C++, too.
9762 2018-03-23 Tom Tromey <tom@tromey.com>
9764 * machoread.c (struct oso_el): Add a constructor. Don't define as
9766 (macho_register_oso): Remove.
9767 (macho_symtab_read): Take a std::vector.
9768 (oso_el_compare_name): Now a std::sort comparator.
9769 (macho_symfile_read_all_oso): Take a std::vector.
9770 (macho_symfile_read): Use std::vector. Remove cleanups.
9772 2018-03-22 Tom Tromey <tom@tromey.com>
9774 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9775 (record_full_goto_bookmark): Use std::string.
9777 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9780 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9783 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9785 * rs6000-tdep.c (store_insn_p): New function.
9786 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9787 and cr_reg to their unshifted values. Use store_insn_p to
9788 match LR saves using either R1 or fdata->alloca_reg. Use
9789 store_insn_p to match CR saves. Set alloca_reg_offset
9790 when alloca_reg and framep are set. Remove lr_reg shift
9791 when assigning to fdata->lr_register.
9793 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
9795 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9796 command line args instead of emitting a warning.
9798 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9800 * tracepoint.h (struct static_tracepoint_marker): Initialize
9801 fields, define default constructor, move constructor and move
9802 assignment, disable the rest.
9803 <str_id, extra>: Make std::string.
9804 (release_static_tracepoint_marker): Remove.
9805 (free_current_marker): Remove.
9806 * tracepoint.c (free_current_marker): Remove.
9807 (parse_static_tracepoint_marker_definition): Adjust to
9808 std::string, use new hex2str overload.
9809 (release_static_tracepoint_marker): Remove.
9810 (print_one_static_tracepoint_marker): Get marker by reference
9811 and adjust to std::string.
9812 (info_static_tracepoint_markers_command): Adjust to std::vector
9814 * target.h (static_tracepoint_marker_p): Remove typedef.
9815 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9816 (struct target_ops) <to_static_tracepoint_marker_at>: Return
9818 <to_static_tracepoint_markers_by_strid>: Return std::vector.
9820 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9821 (target_debug_print_std_vector_static_tracepoint_marker): New.
9822 (target_debug_print_struct_static_tracepoint_marker_p): Rename
9824 (target_debug_print_static_tracepoint_marker_p): ... this.
9825 * target-delegates.c: Re-generate.
9826 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9828 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9829 (decode_static_tracepoint_spec): Adjust to std::vector.
9830 (tracepoint_print_one_detail): Adjust to std::string.
9831 (strace_marker_decode_location): Adjust to std::string.
9832 (update_static_tracepoint): Adjust to std::string, remove call
9833 to release_static_tracepoint_marker.
9834 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9835 Adjust to std::vector.
9836 * remote.c (remote_static_tracepoint_marker_at): Return bool.
9837 (remote_static_tracepoint_markers_by_strid): Adjust to
9839 * common/rsp-low.h (hex2str): New overload with explicit count
9841 * common/rsp-low.c (hex2str): New overload with explicit count
9843 * unittests/rsp-low-selftests.c (test_hex2str): New function.
9844 (_initialize_rsp_low_selftests): Add test_hex2str test.
9845 * unittests/tracepoint-selftests.c
9846 (test_parse_static_tracepoint_marker_definition): Adjust to
9849 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9851 * tracepoint.c (parse_static_tracepoint_marker_definition):
9852 Consider case where the definition is followed by more
9854 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9855 tracepoint-selftests.c.
9856 * unittests/tracepoint-selftests.c: New.
9858 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9860 * MAINTAINERS (Write After Approval): Add Pedro Franco de
9863 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9865 * symtab.c (find_pc_sect_line): fixed indentation.
9867 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9869 * symtab.c (find_pc_sect_line): now uses binary search.
9871 2018-03-19 Tom Tromey <tom@tromey.com>
9873 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9876 2018-03-19 Pedro Alves <palves@redhat.com>
9877 Tom Tromey <tom@tromey.com>
9879 * unittests/observable-selftests.c: New file.
9880 * common/observable.h: New file.
9881 * observable.h: New file.
9882 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9883 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9884 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9885 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9886 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9887 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9888 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9889 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9890 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9891 python/py-breakpoint.c, python/py-finishbreakpoint.c,
9892 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9893 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9894 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9895 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9896 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9897 tui/tui-interp.c, valops.c: Update all users.
9898 * tui/tui-hooks.c (tui_bp_created_observer)
9899 (tui_bp_deleted_observer, tui_bp_modified_observer)
9900 (tui_inferior_exit_observer, tui_before_prompt_observer)
9901 (tui_normal_stop_observer, tui_register_changed_observer):
9903 (tui_observers_token): New global.
9904 (attach_or_detach, tui_attach_detach_observers): New functions.
9905 (tui_install_hooks, tui_remove_hooks): Use
9906 tui_attach_detach_observers.
9907 * record-btrace.c (record_btrace_thread_observer): Remove.
9908 (record_btrace_thread_observer_token): New global.
9909 * observer.sh: Remove.
9910 * observer.c: Rename to observable.c.
9911 * observable.c (namespace gdb_observers): Define new objects.
9912 (observer_debug): Move into gdb_observers namespace.
9913 (struct observer, struct observer_list, xalloc_observer_list_node)
9914 (xfree_observer_list_node, generic_observer_attach)
9915 (generic_observer_detach, generic_observer_notify): Remove.
9916 (_initialize_observer): Update.
9917 Don't include observer.inc.
9918 * Makefile.in (generated_files): Remove observer.h, observer.inc.
9919 (clean mostlyclean): Likewise.
9920 (observer.h, observer.inc): Remove targets.
9921 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9922 (COMMON_SFILES): Use observable.c, not observer.c.
9923 * .gitignore: Remove observer.h.
9925 2018-03-18 Tom Tromey <tom@tromey.com>
9927 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9929 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9931 2018-03-17 Tom Tromey <tom@tromey.com>
9933 * auto-load.c (auto_load_objfile_script_1): Use std::string.
9935 2018-03-17 Tom Tromey <tom@tromey.com>
9937 * target.c (class scoped_target_fd): New.
9938 (target_fileio_close_cleanup): Remove.
9939 (target_fileio_read_alloc_1): Use scoped_target_fd.
9941 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
9943 * silent-rules.mk: New.
9944 * Makefile.in: Include silent-rules.mk
9945 (srcdir, VPATH, top_srcdir): Move up.
9946 (COMPILE): Add ECHO_CXX.
9947 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9948 (init.c): Add ECHO_INIT_C.
9949 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9950 (version.c): Add ECHO_GEN.
9951 (printcmd.o): Add ECHO_CXX.
9952 (target-float.o): Add ECHO_CXX.
9953 (ada-exp.o): Add ECHO_CXX.
9954 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9955 (insight$(EXEEXT)): Add ECHO_CXXLD.
9956 * gnulib/configure.ac: Add AM_SILENT_RULES.
9957 * gnulib/aclocal.m4: Re-generate.
9958 * gnulib/configure: Re-generate.
9959 * gnulib/import/Makefile.in: Re-generate.
9961 2018-03-16 Tom Tromey <tom@tromey.com>
9963 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9964 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9965 * utils.c (do_free_section_addr_info)
9966 (make_cleanup_free_section_addr_info): Remove.
9967 * symfile.h (struct other_sections): Add constructor.
9968 (struct section_addr_info): Remove.
9969 (section_addr_info): New typedef.
9970 (struct sym_fns) <sym_offsets>: Change type of parameter.
9971 (build_section_addr_info_from_objfile)
9972 (relative_addr_info_to_section_offsets, addr_info_make_relative)
9973 (default_symfile_offsets, symbol_file_add)
9974 (symbol_file_add_from_bfd)
9975 (build_section_addr_info_from_section_table): Update.
9976 (alloc_section_addr_info, free_section_addr_info): Don't declare.
9977 * symfile.c (alloc_section_addr_info): Remove.
9978 (build_section_addr_info_from_section_table): Change return type.
9980 (build_section_addr_info_from_bfd)
9981 (build_section_addr_info_from_objfile): Likewise.
9982 (free_section_addr_info): Remove.
9983 (relative_addr_info_to_section_offsets): Change type of "addrs".
9984 (addrs_section_compar): Now a std::sort comparator.
9985 (addrs_section_sort): Change return type.
9986 (addr_info_make_relative): Change type of "addrs". Update.
9987 (default_symfile_offsets, syms_from_objfile_1)
9988 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9989 (symbol_file_add_separate): Update.
9990 (symbol_file_add): Change type of "addrs". Update.
9991 (add_symbol_file_command): Update. Remove cleanups.
9992 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
9994 * symfile-debug.c (debug_sym_offsets): Change type of "info".
9995 * solib.c (solib_read_symbols): Update.
9996 * objfiles.c (objfile_relocate): Update. Remove cleanups.
9997 * machoread.c (macho_symfile_offsets): Update.
9998 * jit.c (jit_bfd_try_read_symtab): Update.
10000 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
10002 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10003 unittests/utils-selftests.c.
10004 * unittests/utils-selftests.c: New file.
10006 2018-03-14 Tom Tromey <tom@tromey.com>
10009 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10012 2018-03-14 Tom Tromey <tom@tromey.com>
10015 * printcmd.c (printf_pointer): Allow "-" in format.
10017 2018-03-14 Tom Tromey <tom@tromey.com>
10019 * printcmd.c (_initialize_printcmd): Add usage to printf.
10021 2018-03-14 Yao Qi <qiyao@sourceware.org>
10023 * MAINTAINERS: Update my email address.
10025 2018-03-13 Tom Tromey <tom@tromey.com>
10027 * machoread.c (macho_check_dsym): Change filenamep to a
10029 (macho_symfile_read): Update.
10030 * symfile.c (load_command): Use std::string.
10032 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
10034 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10035 to error message string.
10036 (riscv_register_name): Use xsnprintf instead of sprintf.
10037 (riscv_insn::fetch_instruction): Use gdb_assert instead of
10039 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10041 (riscv_push_dummy_call): Likewise.
10043 2018-03-12 Tom Tromey <tom@tromey.com>
10045 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10046 Use gdb::byte_vector.
10047 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10049 2018-03-12 Yao Qi <yao.qi@linaro.org>
10051 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10052 parameter type to readable_regcache.
10053 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10056 2018-03-11 Tom Tromey <tom@tromey.com>
10058 * dwarf2read.c (struct nextfield): Add initializers.
10059 (struct nextfnfield): Remove.
10060 (struct fnfieldlist): Add initializers. Remove "length" and
10061 "head", use std::vector.
10062 (struct decl_field_list): Remove.
10063 (struct field_info): Add initializers.
10064 <fields, baseclasses>: Now std::vector.
10065 <nbaseclasses, nfnfields, typedef_field_list_count,
10066 nested_types_list_count>: Remove.
10067 (dwarf2_add_field, dwarf2_add_type_defn)
10068 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10069 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10070 (process_structure_scope): Update.
10072 2018-03-11 Tom Tromey <tom@tromey.com>
10074 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10075 for use by std::sort.
10076 (build_type_psymtabs_1): Use std::vector.
10078 2018-03-09 Eli Zaretskii <eliz@gnu.org>
10080 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10081 and LIBMPFR in the printed configuration.
10083 2018-03-08 Tom Tromey <tom@tromey.com>
10085 * source.c (get_filename_and_charpos): Use scoped_fd.
10086 * nto-procfs.c (procfs_open_1): Use scoped_fd.
10087 (procfs_pidlist): Likewise.
10088 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10089 (iterate_over_mappings): Likewise.
10091 2018-03-08 Tom Tromey <tom@tromey.com>
10093 * infcall.c (struct call_return_meta_info)
10094 <stack_temporaries_enabled>: Remove.
10095 (get_call_return_value, call_function_by_hand_dummy): Update.
10096 * thread.c (disable_thread_stack_temporaries): Remove.
10097 (enable_thread_stack_temporaries): Remove.
10098 (thread_stack_temporaries_enabled_p): Return bool.
10099 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10100 (get_last_thread_stack_temporary): Update.
10101 * eval.c (evaluate_subexp): Update.
10102 * gdbthread.h (class enable_thread_stack_temporaries): Now a
10103 class, not a function.
10104 (value_ptr, value_vec): Remove typedefs.
10105 (class thread_info) <stack_temporaries_enabled>: Now bool.
10106 <stack_temporaries>: Now a std::vector.
10107 (thread_stack_temporaries_enabled_p)
10108 (value_in_thread_stack_temporaries): Return bool.
10110 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
10112 * remote.c (putpkt_binary): Fix omitted bytes reporting.
10113 (getpkt_or_notif_sane_1): Likewise.
10115 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10117 * build-id.c (build_id_to_debug_bfd): Use std::string.
10119 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10121 * build-id.c (find_separate_debug_file_by_buildid): Return
10123 * build-id.h (find_separate_debug_file_by_buildid): Return
10125 * coffread.c (coff_symfile_read): Adjust to std::string.
10126 * elfread.c (elf_symfile_read): Adjust to std::string.
10127 * symfile.c (separate_debug_file_exists): Change parameter to
10129 (find_separate_debug_file): Return std::string.
10130 (find_separate_debug_file_by_debuglink): Return std::string.
10131 * symfile.h (find_separate_debug_file_by_debuglink): Return
10134 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10136 * common/xml-utils.c (xml_escape_text): Move code to...
10137 (xml_escape_text_append): ... this new function.
10138 * common/xml-utils.h (xml_escape_text_append): New declaration.
10139 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10141 (_initialize_xml_utils): register test_xml_escape_text_append as
10144 2018-03-07 Alan Hayward <alan.hayward@arm.com>
10146 * defs.h: Remove MAX_REGISTER_SIZE.
10147 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10149 * python/py-unwind.c (pyuw_sniffer): Likewise.
10151 2018-03-07 Tom Tromey <tom@tromey.com>
10153 * linux-tdep.c (linux_info_proc): Update.
10154 * target.h (struct target_ops) <to_fileio_readlink>: Return
10156 (target_fileio_readlink): Return optional<string>.
10157 * remote.c (remote_hostio_readlink): Return optional<string>.
10158 * inf-child.c (inf_child_fileio_readlink): Return
10160 * target.c (target_fileio_readlink): Return optional<string>.
10162 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
10164 * regcache.c (cooked_read_test): Add riscv to the list of
10165 architectures that have a save_reggroup.
10167 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
10169 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10170 value is not a dynamic class object.
10172 2018-03-06 Tom Tromey <tom@tromey.com>
10174 * rust-exp.y: Formatting fixes.
10176 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10178 * riscv-tdep.c (riscv_register_name): Remove target description
10180 (riscv_gdbarch_init): Remove target description check.
10182 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10184 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10186 * riscv-tdep.h: Likewise.
10188 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10190 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10191 (riscv_pseudo_register_write): Delete.
10192 (riscv_gdbarch_init): Remove all use of pseudo registers.
10194 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10196 * record-btrace.c (btrace_print_lines): Replace cleanup
10197 parameter with RAII equivalents.
10198 (btrace_insn_history): Replace cleanup with RAII equivalents.
10199 * ui-out.h (make_cleanup_ui_out_list_begin_end,
10200 make_cleanup_ui_out_tuple_begin_end): Remove.
10201 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10202 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10203 make_cleanup_ui_out_list_begin_end): Remove.
10205 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10207 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10208 parameter types to std::vector. Use bool.
10209 (record_btrace_wait): Replace VEC(tp_t) with
10210 std::vector<thread_info *>.
10211 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10213 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10215 * record-btrace.c (record_btrace_disable_callback): Remove.
10216 (struct scoped_btrace_disable): New.
10217 (record_btrace_open): Use scoped_btrace_disable.
10219 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10221 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10222 reading values from registers.
10224 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10226 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10229 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10231 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10232 change parameter type. Use GDB's print functions, and use
10233 core_addr_to_string where appropriate.
10234 (riscv_push_dummy_call): Use core_addr_to_string where
10235 appropriate, update call to riscv_print_arg_location, and reindent
10237 (riscv_return_value): Update call to riscv_print_arg_location.
10239 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10240 Tim Newsome <tim@sifive.com>
10241 Albert Ou <a0u@eecs.berkeley.edu>
10242 Darius Rad <darius@bluespec.com>
10244 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10245 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10246 (ALLDEPFILES): Add riscv-tdep.c
10247 * configure.tgt: Add riscv support.
10248 * riscv-tdep.c: New file.
10249 * riscv-tdep.h: New file.
10250 * NEWS: Mention new target.
10251 * MAINTAINERS: Add entry for riscv.
10253 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10255 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10256 fields within aggregates.
10258 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
10260 * record-btrace.c (btrace_print_lines): Change type of flags to
10261 gdb_disassembly_flags.
10263 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10265 * fbsd-nat.c: Include "inf-ptrace.h".
10266 (USE_SIGTRAP_SIGINFO): Conditionally define.
10267 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10268 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10269 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10271 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10273 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10275 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10276 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10277 "supports_stopped_by_hw_breakpoint" target methods.
10279 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10281 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10282 * fbsd-nat.c (debug_fbsd_nat): New variable.
10283 (show_fbsd_nat_debug): New function.
10284 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10285 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10287 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10289 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10290 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10292 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10293 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10296 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10298 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10299 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10301 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10303 * charset.c (struct charset_vector): New.
10304 (charsets): Change type to charset_vector.
10305 (find_charset_names): Adjust.
10307 (_initialize_charset): Adjust.
10309 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10311 * progspace.h (struct program_space) <deleted_solibs>: Change
10312 type to std::vector<std::string>.
10313 * progspace.c (clear_program_space_solib_cache): Adjust.
10314 * breakpoint.c (print_solib_event): Adjust.
10315 (check_status_catch_solib): Adjust.
10316 * solib.c (update_solib_list): Adjust.
10317 * ui-out.h (class ui_out) <field_string>: New overload.
10318 * ui-out.c (ui_out::field_string): New overload.
10320 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10322 * progspace.h (struct program_space): Add constructor and
10323 destructor, initialize fields.
10324 (add_program_space): Remove.
10325 * progspace.c (add_program_space): Rename to...
10326 (program_space::program_space): ... this.
10327 (release_program_space): Rename to...
10328 (program_space::~program_space): ... this.
10329 (delete_program_space): Use delete to delete program_space.
10330 (initialize_progspace): Use new to allocate program_space.
10331 * inferior.c (add_inferior_with_spaces): Likewise.
10332 (clone_inferior_command): Likewise.
10333 * infrun.c (follow_fork_inferior): Likewise.
10334 (handle_vfork_child_exec_or_exit): Likewise.
10336 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10338 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10339 (delim_string_to_char_ptr_vec): Return std::vector of
10340 gdb::unique_xmalloc_ptr.
10341 (dirnames_to_char_ptr_vec_append): Take std::vector of
10342 gdb::unique_xmalloc_ptr.
10343 (dirnames_to_char_ptr_vec): Return std::vector of
10344 gdb::unique_xmalloc_ptr.
10345 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10346 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10347 (delim_string_to_char_ptr_vec): Return an std::vector of
10348 gdb::unique_xmalloc_ptr, adjust the code.
10349 (dirnames_to_char_ptr_vec_append): Take an std::vector of
10350 gdb::unique_xmalloc_ptr, adjust the code.
10351 (dirnames_to_char_ptr_vec): Return an std::vector of
10352 gdb::unique_xmalloc_ptr, adjust the code.
10353 * auto-load.c (auto_load_safe_path_vec): Change type to
10354 std::vector of gdb::unique_xmalloc_ptr.
10355 (auto_load_expand_dir_vars): Return an std::vector of
10356 gdb::unique_xmalloc_ptr, adjust the code.
10357 (auto_load_safe_path_vec_update): Adjust.
10358 (filename_is_in_auto_load_safe_path_vec): Adjust.
10359 (auto_load_objfile_script_1): Adjust.
10360 * build-id.c (build_id_to_debug_bfd): Adjust.
10361 * linux-thread-db.c (thread_db_load_search): Adjust.
10362 * source.c (add_path): Adjust.
10364 * symfile.c (find_separate_debug_file): Adjust.
10365 * utils.c (do_free_char_ptr_vec): Remove.
10366 (make_cleanup_free_char_ptr_vec): Remove.
10368 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
10371 * common/pathstuff.c: Conditionally include "<windows.h>".
10373 2018-03-01 Georg Sauthoff <mail@georg.so>
10376 * gcore.in: Quote variables and switch interpreter to bash.
10378 2018-03-01 Tom Tromey <tom@tromey.com>
10380 * dwarf2read.c (alloc_discriminant_info): Fix default_index
10381 assertion. Add assertion for discriminant_index.
10382 (quirk_rust_enum): Use correct base type name in univariant case.
10384 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
10386 * record.c (get_call_history_modifiers): Return a
10387 record_print_flags.
10388 (cmd_record_call_history): Adjust.
10389 * record-btrace.c (record_btrace_call_history): Adjust.
10390 (record_btrace_call_history_range): Adjust.
10391 (record_btrace_call_history_from): Adjust.
10392 * target-debug.h (target_debug_print_record_print_flags): New.
10393 * target-delegates.c: Re-generate.
10394 * target.c (target_call_history): Change flags type.
10395 (target_call_history_from): Likewise.
10396 (target_call_history_range): Likewise.
10397 * target.h (struct target_ops) <target_call_history>: Likewise.
10398 (target_call_history_from): Likewise.
10399 (target_call_history_range): Likewise.
10401 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10402 Simon Marchi <simon.marchi@polymtl.ca>
10404 * common/common-utils.c: Include "sys/stat.h".
10405 (is_regular_file): Move here from "source.c"; change return
10407 * common/common-utils.h (is_regular_file): New prototype.
10408 * common/pathstuff.c (contains_dir_separator): New function.
10409 * common/pathstuff.h (contains_dir_separator): New prototype.
10410 * source.c: Don't include "sys/stat.h".
10411 (is_regular_file): Move to "common/common-utils.c".
10413 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10415 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10416 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10417 * auto-load.c: Include "common/pathstuff.h".
10418 * common/common-def.h (current_directory): Move here.
10419 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10421 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10423 * common/pathstuff.c: New file.
10424 * common/pathstuff.h: New file.
10425 * compile/compile.c: Include "common/pathstuff.h".
10426 * defs.h (current_directory): Move to "common/common-defs.h".
10427 * dwarf2read.c: Include "common/pathstuff.h".
10428 * exec.c: Likewise.
10429 * guile/scm-safe-call.c: Likewise.
10430 * linux-thread-db.c: Likewise.
10431 * main.c: Likewise.
10432 * nto-tdep.c: Likewise.
10433 * objfiles.c: Likewise.
10434 * source.c: Likewise.
10435 * symtab.c: Likewise.
10436 * utils.c: Include "common/pathstuff.h".
10437 (gdb_realpath): Move to "common/pathstuff.c".
10438 (gdb_realpath_keepfile): Likewise.
10439 (gdb_abspath): Likewise.
10440 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10441 (gdb_realpath_keepfile): Likewise.
10442 (gdb_abspath): Likewise.
10444 2018-02-28 John Baldwin <jhb@FreeBSD.org>
10446 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10447 wildcard process pid for super_resume for kernels with a
10450 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
10452 * compile/compile.c (get_args): Add additional comments
10453 explaining function.
10455 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
10456 Tom Tromey <tom@tromey.com>
10458 * target.h (memory_write_request_s): Remove typedef. Don't define
10460 (target_write_memory_blocks): Change argument to std::vector.
10461 (struct memory_write_request): Add constructor.
10462 * target-memory.c (compare_block_starting_address): Return bool.
10463 Change argument types.
10464 (claim_memory): Change arguments to use std::vector.
10465 (split_regular_and_flash_blocks, blocks_to_erase)
10466 (compute_garbled_blocks): Likewise.
10467 (cleanup_request_data, cleanup_write_requests_vector): Remove.
10468 (target_write_memory_blocks): Change argument to std::vector.
10469 * symfile.c (struct load_section_data): Add constructor and
10470 destructor. Use std::vector for "requests".
10471 (struct load_progress_data): Add initializers.
10472 (load_section_callback): Update. Use "new".
10473 (clear_memory_write_data): Remove.
10474 (generic_load): Update.
10476 2018-02-27 Alan Hayward <alan.hayward@arm.com>
10478 * arch/aarch64.h: Use common/tdesc.h.
10480 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10482 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10483 architecture with a 64-bit ABI.
10485 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10487 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10488 ahead of target description loading.
10490 2018-02-26 Tom Tromey <tom@tromey.com>
10492 * stack.c (backtrace_command_1): Update.
10493 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10495 * python/py-framefilter.c (py_print_frame)
10496 (gdbpy_apply_frame_filter): Change type of "flags".
10497 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10499 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10500 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10501 * extension.h (enum frame_filter_flag): Rename from
10502 frame_filter_flags.
10503 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10504 (apply_ext_lang_frame_filter): Change type of "flags".
10505 * extension.c (apply_ext_lang_frame_filter): Change type of
10507 * extension-priv.h (struct extension_language_ops)
10508 <apply_frame_filter>: Change type of "flags".
10510 2018-02-26 Tom Tromey <tom@tromey.com>
10513 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
10514 off-by-one in py_end computation.
10515 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10517 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10520 2018-02-26 Tom Tromey <tom@tromey.com>
10522 * dwarf2read.c (struct variant_field): New.
10523 (struct nextfield) <variant>: New field.
10524 (dwarf2_add_field): Handle DW_TAG_variant_part.
10525 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10526 discriminated union.
10527 (read_structure_type): Handle DW_TAG_variant_part.
10528 (handle_struct_member_die): New function, extracted from
10529 process_structure_scope. Handle DW_TAG_variant.
10530 (process_structure_scope): Handle discriminated unions. Call
10531 handle_struct_member_die.
10533 2018-02-26 Tom Tromey <tom@tromey.com>
10535 * rust-lang.h (rust_last_path_segment): Declare.
10536 * rust-lang.c (rust_last_path_segment): Now public. Change
10538 (struct disr_info): Remove.
10539 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10540 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10541 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10542 (rust_enum_p, rust_enum_variant): New function.
10543 (rust_underscore_fields): Remove "offset" parameter.
10544 (rust_print_enum): New function.
10545 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10546 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10547 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
10549 (rust_internal_print_type): New function, from rust_print_type.
10551 (rust_print_type): Call rust_internal_print_type.
10552 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10553 Update enum handling.
10554 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10555 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10556 (rust_union_quirks): New functions.
10557 (process_full_comp_unit, process_full_type_unit): Call
10559 (process_structure_scope): Update rust_unions if necessary.
10561 2018-02-26 Tom Tromey <tom@tromey.com>
10563 * value.h (value_union_variant): Declare.
10564 * valops.c (value_union_variant): New function.
10565 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10566 (struct discriminant_info): New.
10567 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10569 (struct main_type) <flag_discriminated_union>: New field.
10571 2018-02-26 Tom Tromey <tom@tromey.com>
10573 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10574 unittests/unpack-selftests.c.
10575 * unittests/unpack-selftests.c: New file.
10576 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10578 2018-02-26 Yao Qi <yao.qi@linaro.org>
10580 * dwarf2read.c (struct partial_die_info) <read>: New method.
10581 (read_partial_die): Remove the declaration.
10582 (load_partial_dies): Update.
10583 (partial_die_info::partial_die_info):
10584 (read_partial_die): Change it to partial_die_info::read.
10586 2018-02-26 Yao Qi <yao.qi@linaro.org>
10588 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10589 (fixup_partial_die): Remove declaration.
10590 (scan_partial_symbols): Update.
10591 (partial_die_parent_scope): Likewise.
10592 (partial_die_full_name): Likewise.
10593 (fixup_partial_die): Change it to partial_die_info::fixup.
10595 2018-02-26 Yao Qi <yao.qi@linaro.org>
10597 * dwarf2read.c (read_partial_die): Update the declaration.
10598 (load_partial_dies): Caller update.
10599 (read_partial_die): Remove one argument abbrev_len.
10601 2018-02-26 Yao Qi <yao.qi@linaro.org>
10603 * dwarf2read.c (struct partial_die_info): Add ctor, delete
10604 assignment operator.
10605 (load_partial_dies): Use ctor and copy ctor.
10606 (read_partial_die): Update.
10607 (dwarf2_cu::find_partial_die): Use ctor.
10609 2018-02-26 Yao Qi <yao.qi@linaro.org>
10611 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10612 (find_partial_die_in_comp_unit): Change it to
10613 dwarf2_cu::find_partial_die.
10614 (find_partial_die): Update.
10616 2018-02-26 Yao Qi <yao.qi@linaro.org>
10618 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10621 2018-02-26 Yao Qi <yao.qi@linaro.org>
10623 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10625 2018-02-26 Alan Hayward <alan.hayward@arm.com>
10627 * arch/amd64.h: Use common/tdesc.h.
10628 * arch/i386.c: Likewise.
10629 * arch/i386.h: Likewise.
10630 * arch/tic6x.c: Likewise.
10631 * arch/tdesc.h: Move file from here...
10632 * common/tdesc.h: ...to here.
10633 * features/aarch64-core.c: Regenerate.
10634 * features/aarch64-fpu.c: Regenerate.
10635 * features/i386/32bit-avx.c: Regenerate.
10636 * features/i386/32bit-avx512.c: Regenerate.
10637 * features/i386/32bit-core.c: Regenerate.
10638 * features/i386/32bit-linux.c: Regenerate.
10639 * features/i386/32bit-mpx.c: Regenerate.
10640 * features/i386/32bit-pkeys.c: Regenerate.
10641 * features/i386/32bit-sse.c: Regenerate.
10642 * features/i386/64bit-avx.c: Regenerate.
10643 * features/i386/64bit-avx512.c: Regenerate.
10644 * features/i386/64bit-core.c: Regenerate.
10645 * features/i386/64bit-linux.c: Regenerate.
10646 * features/i386/64bit-mpx.c: Regenerate.
10647 * features/i386/64bit-pkeys.c: Regenerate.
10648 * features/i386/64bit-segments.c: Regenerate.
10649 * features/i386/64bit-sse.c: Regenerate.
10650 * features/i386/x32-core.c: Regenerate.
10651 * features/tic6x-c6xp.c: Regenerate.
10652 * features/tic6x-core.c: Regenerate.
10653 * features/tic6x-gp.c: Regenerate.
10654 * target-descriptions.c: Use common/tdesc.h.
10655 * target-descriptions.h: Likewise.
10657 2018-02-24 Tom Tromey <tom@tromey.com>
10659 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10660 (try_thread_db_load_from_dir, thread_db_load_search): Use
10662 (info_auto_load_libthread_db_compare): Return bool. Change
10664 (info_auto_load_libthread_db): Use std::vector, std::string.
10667 2018-02-24 Tom Tromey <tom@tromey.com>
10669 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10671 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10673 * gdbarch.c: Rebuild.
10674 * gdbarch.h: Rebuild.
10675 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10676 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10677 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10680 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
10682 * gdbtypes.h (sect_offset): Change type to uint64_t.
10683 (sect_offset_str): New function.
10684 * dwarf2read.c (create_addrmap_from_aranges): Use
10686 (error_check_comp_unit_head): Likewise.
10687 (create_debug_type_hash_table): Likewise.
10688 (read_cutu_die_from_dwo): Likewise.
10689 (init_cutu_and_read_dies): Likewise.
10690 (init_cutu_and_read_dies_no_follow): Likewise.
10691 (process_psymtab_comp_unit_reader): Likewise.
10692 (partial_die_parent_scope): Likewise.
10693 (peek_die_abbrev): Likewise.
10694 (process_queue): Likewise.
10695 (dwarf2_physname): Likewise.
10696 (read_namespace_alias): Likewise.
10697 (read_import_statement): Likewise.
10698 (create_dwo_cu_reader): Likewise.
10699 (create_cus_hash_table): Likewise.
10700 (lookup_dwo_cutu): Likewise.
10701 (inherit_abstract_dies): Likewise.
10702 (read_func_scope): Likewise.
10703 (read_call_site_scope): Likewise.
10704 (dwarf2_add_member_fn): Likewise.
10705 (read_common_block): Likewise.
10706 (read_module_type): Likewise.
10707 (read_typedef): Likewise.
10708 (read_subrange_type): Likewise.
10709 (load_partial_dies): Likewise.
10710 (read_partial_die): Likewise.
10711 (find_partial_die): Likewise.
10712 (read_str_index): Likewise.
10713 (dwarf2_string_attr): Likewise.
10714 (build_error_marker_type): Likewise.
10715 (lookup_die_type): Likewise.
10716 (dump_die_shallow): Likewise.
10717 (follow_die_ref): Likewise.
10718 (dwarf2_fetch_die_loc_sect_off): Likewise.
10719 (dwarf2_fetch_constant_bytes): Likewise.
10720 (follow_die_sig): Likewise.
10721 (get_signatured_type): Likewise.
10722 (get_DW_AT_signature_type): Likewise.
10723 (dwarf2_find_containing_comp_unit): Likewise.
10724 (set_die_type): Likewise.
10726 2018-02-21 John Baldwin <jhb@FreeBSD.org>
10728 * arch/aarch64.c: Include "common-defs.h".
10729 * arch/amd64.c: Likewise.
10730 * arch/i386.c: Likewise.
10732 2018-02-21 Tom Tromey <tom@tromey.com>
10734 * value.h: (extract_field_op): Update.
10735 * eval.c (extract_field_op): Return a const char *.
10736 * expression.h (parse_expression_for_completion): Update.
10737 * completer.c (complete_expression): Update.
10738 (add_struct_fields): Make fieldname const.
10739 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10740 (mark_completion_tag, parse_exp_in_context_1): Update.
10741 (parse_expression_for_completion): Change "name" to
10742 unique_xmalloc_ptr*.
10744 2018-02-21 Tom Tromey <tom@tromey.com>
10746 * infcall.c (call_function_by_hand_dummy): Use std::vector.
10748 2018-02-21 Yao Qi <yao.qi@linaro.org>
10750 * avr-tdep.c (avr_read_pc): Change parameter type to
10752 * gdbarch.sh (read_pc): Likewise.
10753 * gdbarch.c: Re-generated.
10754 * gdbarch.h: Re-generated.
10755 * hppa-tdep.c (hppa_read_pc): Change parameter type to
10757 * ia64-tdep.c (ia64_read_pc): Likewise.
10758 * mips-tdep.c (mips_read_pc): Likewise.
10759 * spu-tdep.c (spu_read_pc): Likewise.
10761 2018-02-21 Yao Qi <yao.qi@linaro.org>
10763 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10764 * regcache-dump.c: New file.
10765 * regcache.c: Move register_dump to regcache-dump.c.
10766 (maintenance_print_registers): Likewise.
10767 (maintenance_print_raw_registers): Likewise.
10768 (maintenance_print_cooked_registers): Likewise.
10769 (maintenance_print_register_groups): Likewise.
10770 (maintenance_print_remote_registers): Likewise.
10771 (_initialize_regcache): Likewise.
10772 * regcache.h (register_dump): Moved from regcache.c.
10774 2018-02-21 Yao Qi <yao.qi@linaro.org>
10776 * regcache.c (regcache::regcache): Update.
10777 (regcache::invalidate): Move it to detached_regcache::invalidate.
10778 (get_thread_arch_aspace_regcache): Update.
10779 (regcache::raw_update): Update.
10780 (regcache::cooked_read): Remove some code.
10781 (regcache::cooked_read_value): Likewise.
10782 (regcache::raw_write): Remove assert on m_readonly_p.
10783 (regcache::raw_supply_integer): Move it to
10784 detached_regcache::raw_supply_integer.
10785 (regcache::raw_supply_zeroed): Likewise.
10786 * regcache.h (detached_regcache) <raw_supply_integer>: New
10788 <raw_supply_zeroed, invalidate>: Likewise.
10789 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10790 <invalidate>: Likewise.
10791 <m_readonly_p>: Removed.
10793 2018-02-21 Yao Qi <yao.qi@linaro.org>
10795 * infcmd.c (get_return_value): Let stop_regs point to
10796 get_current_regcache.
10797 * regcache.c (regcache::regcache): Remove.
10798 (register_dump_reg_buffer): New class.
10799 (regcache_print): Adjust.
10800 * regcache.h (regcache): Remove constructors.
10802 2018-02-21 Yao Qi <yao.qi@linaro.org>
10804 * regcache.c (class register_dump): New class.
10805 (register_dump_regcache, register_dump_none): New class.
10806 (register_dump_remote, register_dump_groups): New class.
10807 (regcache_print): Update.
10808 * regcache.h (regcache_dump_what): Move it to regcache.c.
10809 (regcache) <dump>: Remove.
10811 2018-02-21 Yao Qi <yao.qi@linaro.org>
10813 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10815 (jit_unwind_reg_set_impl): Call raw_supply.
10816 (jit_frame_sniffer): Use reg_buffer_rw.
10817 * record-full.c (record_full_core_regbuf): Change its type.
10818 (record_full_core_open_1): Use reg_buffer_rw.
10819 (record_full_close): Likewise.
10820 (record_full_core_fetch_registers): Use regcache->raw_supply.
10821 (record_full_core_store_registers): Likewise.
10822 * regcache.c (regcache::get_register_status): Move it to
10824 (regcache_raw_set_cached_value): Remove.
10825 (regcache::raw_set_cached_value): Remove.
10826 (regcache::raw_write): Call raw_supply.
10827 (regcache::raw_supply): Move it to reg_buffer_rw.
10828 * regcache.h (regcache_raw_set_cached_value): Remove.
10829 (reg_buffer_rw): New class.
10831 2018-02-21 Yao Qi <yao.qi@linaro.org>
10833 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10834 readonly_detached_regcache.
10835 (dummy_frame_prev_register): Use regcache->cooked_read.
10836 * frame.c (frame_save_as_regcache): Change return type.
10837 (frame_pop): Update.
10838 * frame.h (frame_save_as_regcache): Update declaration.
10839 * inferior.h (get_infcall_suspend_state_regcache): Update
10841 * infrun.c (infcall_suspend_state) <registers>: use
10842 readonly_detached_regcache.
10843 (save_infcall_suspend_state): Don't use regcache_dup.
10844 (get_infcall_suspend_state_regcache): Change return type.
10845 * linux-fork.c (struct fork_info) <savedregs>: Change to
10846 readonly_detached_regcache.
10848 (fork_save_infrun_state): Don't use regcache_dup.
10849 (info_checkpoints_command): Adjust.
10850 * mi/mi-main.c (register_changed_p): Update declaration.
10851 (mi_cmd_data_list_changed_registers): Use
10852 readonly_detached_regcache.
10853 (register_changed_p): Change parameter type to
10854 readonly_detached_regcache.
10855 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10856 readonly_detached_regcache.
10857 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10858 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10860 (regcache::save): Move it to reg_buffer.
10861 (regcache::restore): Change parameter type.
10862 (regcache_dup): Remove.
10863 * regcache.h (reg_buffer) <save>: New method.
10864 (readonly_detached_regcache): New class.
10865 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10866 readonly_detached_regcache.
10867 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10869 2018-02-21 Yao Qi <yao.qi@linaro.org>
10871 * frame.c (frame_save_as_regcache): Use regcache method save.
10872 (frame_pop): Use regcache method restore.
10873 * infrun.c (restore_infcall_suspend_state): Likewise.
10874 * linux-fork.c (fork_load_infrun_state): Likewise.
10875 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10877 * regcache.c (regcache_save): Remove.
10878 (regcache::restore): More asserts.
10879 (regcache_cpy): Remove.
10880 * regcache.h (regcache_save): Remove the declaration.
10881 (regcache::restore): Move from private to public.
10882 Remove the friend declaration of regcache_cpy.
10883 (regcache_cpy): Remove declaration.
10885 2018-02-21 Yao Qi <yao.qi@linaro.org>
10887 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10888 parameter type to 'readable_regcache *'.
10889 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10890 * arm-tdep.c (arm_neon_quad_read): Likewise.
10891 (arm_pseudo_read): Likewise.
10892 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10893 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10894 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10895 * gdbarch.c: Re-generated.
10896 * gdbarch.h: Re-generated.
10897 * gdbarch.sh (pseudo_register_read): Change parameter type to
10898 'readable_regcache *'.
10899 (pseudo_register_read_value): Likewise.
10900 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10901 (h8300_pseudo_register_read): Likewise.
10902 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10903 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10904 (i386_pseudo_register_read_into_value): Likewise.
10905 (i386_pseudo_register_read_value): Likewise.
10906 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10908 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10909 * m32c-tdep.c (m32c_raw_read): Likewise.
10910 (m32c_read_flg): Likewise.
10911 (m32c_banked_register): Likewise.
10912 (m32c_banked_read): Likewise.
10913 (m32c_sb_read): Likewise.
10914 (m32c_part_read): Likewise.
10915 (m32c_cat_read): Likewise.
10916 (m32c_r3r2r1r0_read): Likewise.
10917 (m32c_pseudo_register_read): Likewise.
10918 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10919 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10920 (mep_pseudo_cr64_read): Likewise.
10921 (mep_pseudo_register_read): Likewise.
10922 * mips-tdep.c (mips_pseudo_register_read): Likewise.
10923 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10924 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10925 * regcache.c (regcache::raw_read): Move it to readable_regcache.
10926 (regcache::cooked_read): Likewise.
10927 (regcache::cooked_read_value): Likewise.
10928 (regcache_cooked_read_signed):
10929 (regcache::cooked_read): Likewise.
10930 * regcache.h (readable_regcache): New class.
10931 (regcache): Inherit readable_regcache. Move some methods to
10933 * rl78-tdep.c (rl78_pseudo_register_read): Change
10934 parameter type to 'readable_regcache *'.
10935 * rs6000-tdep.c (do_regcache_raw_read): Remove.
10936 (e500_pseudo_register_read): Change parameter type to
10937 'readable_regcache *'.
10938 (dfp_pseudo_register_read): Likewise.
10939 (vsx_pseudo_register_read): Likewise.
10940 (efpr_pseudo_register_read): Likewise.
10941 * s390-tdep.c (s390_pseudo_register_read): Likewise.
10942 * sh-tdep.c (sh_pseudo_register_read): Likewise.
10943 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10944 (sh64_pseudo_register_read): Likewise.
10945 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10946 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10947 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10948 (spu_pseudo_register_read): Likewise.
10949 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10950 (xtensa_pseudo_register_read): Likewise.
10952 2018-02-21 Yao Qi <yao.qi@linaro.org>
10954 * regcache.c (regcache::regcache): Call reg_buffer ctor.
10955 (regcache::arch): Move it to reg_buffer::arch.
10956 (regcache::register_buffer): Likewise.
10957 (regcache::assert_regnum): Likewise.
10958 (regcache::num_raw_registers): Likewise.
10959 * regcache.h (reg_buffer): New class.
10960 (regcache): Inherit reg_buffer.
10962 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
10964 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10965 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10967 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
10969 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10971 2018-02-19 Alan Hayward <alan.hayward@arm.com>
10973 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10974 (SFILES): Remove common/*.c files.
10975 (COMMON_OBS): Remove some *.o files built from common/*.c files.
10976 * common/common.host: Add common reference.
10977 * configure.ac: Likewise.
10978 * configure: Regenerate.
10980 2018-02-16 Yao Qi <yao.qi@linaro.org>
10982 * block.c (block_namespace_info): Inherit allocate_on_obstack.
10983 (block_initialize_namespace): Use new.
10984 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10985 (dwarf2_free_objfile): Use delete.
10986 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10987 (copy_type_recursive): Use new.
10988 * gdb_obstack.h (allocate_on_obstack): New.
10990 2018-02-15 Yao Qi <yao.qi@linaro.org>
10993 * inferior.c (exit_inferior_1): Reset inf->control.
10995 2018-02-15 Joel Brobecker <brobecker@adacore.com>
10997 * ada-lang.c (ada_to_fixed_value_create): Delete advance
11000 2018-02-14 Pedro Alves <palves@redhat.com>
11002 * frame-unwind.c (frame_unwind_try_unwinder): Always call
11003 frame_cleanup_after_sniffer on exception.
11005 2018-02-14 Tom Tromey <tom@tromey.com>
11007 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11009 (solib_bfd_open): Make pathname const.
11010 * solib.c (solib_bfd_open): Make pathname const.
11011 * solib-spu.c (spu_bfd_fopen): Make name const.
11012 (spu_bfd_open): Make pathname const.
11013 * solib-darwin.c (darwin_bfd_open): Make pathname const.
11014 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11016 2018-02-14 Tom Tromey <tom@tromey.com>
11018 * symfile.c (symfile_bfd_open): Update.
11019 * source.h (openp, source_full_path_of, find_and_open_source):
11020 Change argument type to unique_xmalloc_ptr.
11021 * source.c (openp): Take a unique_xmalloc_ptr.
11022 (source_full_path_of, find_and_open_source): Likewise.
11023 (open_source_file, symtab_to_fullname): Update.
11024 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11025 unique_xmalloc_ptr.
11026 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11027 (exec_file_find): Update.
11028 * psymtab.c (psymtab_to_fullname): Update.
11029 * nto-tdep.h (nto_find_and_open_solib): Update.
11030 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11031 unique_xmalloc_ptr.
11032 * exec.c (exec_file_attach): Update.
11033 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11034 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11036 2018-02-14 Tom Tromey <tom@tromey.com>
11038 * solib.c: Include source.h.
11039 * nto-tdep.c: Include source.h.
11040 * mi/mi-cmd-env.c: Include source.h.
11041 * infcmd.c: Include source.h.
11042 * exec.c: Include source.h.
11043 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11044 (add_path, directory_switch, source_path, init_source_path): Move
11046 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11047 (add_path, directory_switch, source_path, init_source_path):
11050 2018-02-14 Tom Tromey <tom@tromey.com>
11052 * solist.h (exec_file_find, solib_find): Return
11053 unique_xmalloc_ptr.
11054 (solib_bfd_fopen): Take a const char *.
11055 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11056 (exec_file_find, solib_find): Likewise.
11057 (solib_bfd_fopen): Do not take ownership of "pathname".
11058 (solib_bfd_open): Use unique_xmalloc_ptr.
11059 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11060 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11061 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11062 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11064 2018-02-14 Joel Brobecker <brobecker@adacore.com>
11066 * ada-lang.c (name_match_type_from_name): Remove reference to
11067 ada_name_for_lookup in function's documentation.
11068 * ada-lang.h (ada_name_for_lookup): Delete declaration.
11070 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11072 * defs.h (enum openp_flags): New enum.
11073 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11074 Move to enum openp_flags.
11075 (openp_flags): New enum flags.
11076 (openp): Change parameter type to openp_flags.
11077 * source.c (openp): Change parameter type to openp_flags.
11078 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11079 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11081 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11083 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11086 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
11088 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11090 (class dwarf2_queue_guard): ...the destructor of this new class.
11091 (dw2_do_instantiate_symtab): Create instance of the new class
11092 dwarf2_queue_guard, remove cleanup.
11094 2018-02-09 Tom Tromey <tom@tromey.com>
11096 * source.c (find_source_lines): Don't reference past the end of
11099 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11101 * remote.c (remote_btrace_maybe_reopen): Change error message.
11102 * btrace.c (btrace_enable): Likewise.
11103 (parse_xml_btrace): Likewise.
11104 (parse_xml_btrace_conf): Likewise.
11106 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11108 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11109 (linux_enable_pt, linux_enable_bts): Call
11110 diagnose_perf_event_open_fail.
11112 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11114 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11115 Remove parameter and change return type. Update callers. Move it.
11116 (linux_enable_bts, linux_enable_pt): Improve error message.
11117 (linux_enable_pt): Remove zero buffer size check.
11118 (linux_enable_btrace): Improve error messages. Remove NULL return
11121 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11123 * btrace.c (btrace_enable): Remove target_supports_btrace call.
11124 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11125 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11126 (linux_supports_pt, linux_supports_btrace): Remove.
11127 (linux_enable_bts): Call cpu_supports_bts.
11128 * nat/linux-btrace.h (linux_supports_btrace): Remove.
11129 * remote.c (remote_supports_btrace): Remove.
11130 (init_remote_ops): Remove remote_supports_btrace.
11131 * target-delegates.c: Regenerated.
11132 * target.c (target_supports_btrace): Remove.
11133 * target.h (target_ops) <to_supports_btrace>: Remove
11134 (target_supports_btrace): Remove.
11135 * x86-linux-nat.c (x86_linux_create_target): Remove
11136 linux_supports_btrace.
11138 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11140 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11142 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11143 exception and use message in own exception.
11145 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11147 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11148 (perf_event_pt_event_type): Use gdb_file_up.
11149 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11150 scoped_fd, and scoped_mmap.
11152 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11154 * common/scoped_mmap.h: New.
11155 * unittests/scoped_mmap-selftest.c: New.
11156 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11157 unittests/scoped_mmap-selftest.c.
11159 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11161 * common/scoped_fd.h: New.
11162 * unittests/scoped_fd-selftest.c: New.
11163 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11164 unittests/scoped_fd-selftest.c.
11166 2018-02-09 Tom Tromey <tom@tromey.com>
11168 * auto-load.c (auto_load_section_scripts): Use
11169 gdb::unique_xmalloc_ptr.
11171 2018-02-09 Tom Tromey <tom@tromey.com>
11173 * auto-load.c (execute_script_contents): Use std::string.
11175 2018-02-09 Joel Brobecker <brobecker@adacore.com>
11177 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11178 Python function, rather than a new command.
11180 2018-02-08 Tom Tromey <tom@tromey.com>
11182 * solib.c (solib_find_1): Use std::string.
11183 (solib_bfd_fopen): Use unique_xmalloc_ptr.
11185 2018-02-08 Tom Tromey <tom@tromey.com>
11187 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11189 2018-02-08 Tom Tromey <tom@tromey.com>
11191 * source.c (find_source_lines): Use gdb::def_vector.
11193 2018-02-08 Tom Tromey <tom@tromey.com>
11195 * macrocmd.c (struct temporary_macro_definition): New.
11196 (macro_define_command): Use temporary_macro_definition. Remove
11198 (free_macro_definition_ptr): Remove.
11200 2018-02-08 Tom Tromey <tom@tromey.com>
11202 * macroexp.c (maybe_expand): Use std::string.
11204 2018-02-08 Tom Tromey <tom@tromey.com>
11206 * macroexp.c (struct macro_buffer): Add initializers for some
11208 (init_buffer, init_shared_buffer, free_buffer)
11209 (free_buffer_return_text): Remove.
11210 (macro_buffer): New constructors.
11211 (~macro_buffer): New destructor.
11212 (macro_buffer::set_shared): New method.
11213 (macro_buffer::resize_buffer, macro_buffer::appendc)
11214 (macro_buffer::appendmem): Now methods, not free functions.
11215 (set_token, append_tokens_without_splicing, stringify)
11216 (macro_stringify): Update.
11217 (gather_arguments): Change return type. Remove argc_p argument,
11218 add args_ptr argument. Use std::vector.
11219 (substitute_args): Remove argc argument. Accept std::vector.
11220 (expand): Update. Use std::vector.
11221 (scan, macro_expand, macro_expand_next): Update.
11223 2018-02-08 Tom Tromey <tom@tromey.com>
11225 * symtab.c (default_collect_symbol_completion_matches_break_on):
11226 Use unique_xmalloc_ptr.
11227 * macroscope.h: (sal_macro_scope, user_macro_scope)
11228 (default_macro_scope): Return unique_xmalloc_ptr.
11229 * macroscope.c (sal_macro_scope, user_macro_scope)
11230 (default_macro_scope): Return unique_xmalloc_ptr.
11231 * macroexp.h (macro_expand, macro_expand_once): Return
11232 unique_xmalloc_ptr.
11233 * macroexp.c (macro_expand, macro_expand_once): Return
11234 unique_xmalloc_ptr.
11235 * macrocmd.c (macro_expand_command, macro_expand_once_command)
11236 (info_macro_command, info_macros_command): Use
11237 unique_xmalloc_ptr.
11238 * compile/compile-c-support.c (write_macro_definitions): Use
11239 unique_xmalloc_ptr.
11240 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11242 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
11244 * value.c (value_static_field): Assign field type instead of
11245 containing type when returning an optimized out value.
11247 2018-02-06 Yao Qi <yao.qi@linaro.org>
11249 * ft32-tdep.c (ft32_read_pc): Remove.
11250 (ft32_write_pc): Remove.
11251 (ft32_gdbarch_init): Update.
11252 * m32r-tdep.c (m32r_read_pc): Remove.
11253 (m32r_gdbarch_init): Update.
11254 * mep-tdep.c (mep_read_pc): Remove.
11255 (mep_gdbarch_init): Update.
11256 * microblaze-tdep.c (microblaze_write_pc): Remove.
11257 (microblaze_gdbarch_init): Update.
11258 * mn10300-tdep.c (mn10300_read_pc): Remove.
11259 (mn10300_write_pc): Remove.
11260 (mn10300_gdbarch_init): Update.
11261 * moxie-tdep.c (moxie_read_pc): Remove.
11262 (moxie_write_pc): Remove.
11263 (moxie_gdbarch_init): Update.
11265 2018-02-06 Yao Qi <yao.qi@linaro.org>
11267 * expprint.c (print_subexp_standard): Handle
11268 OP_F77_UNDETERMINED_ARGLIST.
11269 (dump_subexp_body_standard): Likewise.
11271 2018-02-05 Alan Hayward <alan.hayward@arm.com>
11273 * target-descriptions.c (tdesc_element_visitor) Add empty
11275 (tdesc_type): Move make_gdb_type from here.
11276 (tdesc_type_builtin): Likewise.
11277 (tdesc_type_vector): Likewise.
11278 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11279 (make_gdb_type_struct): Move from tdesc_type_with_fields.
11280 (make_gdb_type_union): Likewise.
11281 (make_gdb_type_flags): Likewise.
11282 (make_gdb_type_enum): Likewise.
11283 (make_gdb_type): New function.
11284 (tdesc_register_type): Use static make_gdb_type.
11286 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
11288 * infcmd.c (default_print_one_register_info): Align natural-format
11289 column values consistently one under another.
11290 (pad_to_column): New function.
11292 2018-02-05 Joel Brobecker <brobecker@adacore.com>
11294 * dwarf2read.c (dwarf2_physname): Move commment.
11296 2018-02-01 Leszek Swirski <leszeks@google.com>
11298 * varobj.c (varobj_formatted_print_options): Allow recursive
11299 pretty printing if pretty printing is enabled.
11301 2018-02-01 Leszek Swirski <leszeks@google.com>
11303 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11304 names after a structop as a filename.
11306 2018-02-01 Yao Qi <yao.qi@linaro.org>
11308 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11309 (arm_record_coproc_data_proc): Likewise.
11311 2018-02-01 Yao Qi <yao.qi@linaro.org>
11313 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11315 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
11317 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11318 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11320 2018-01-31 Pedro Alves <palves@redhat.com>
11322 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11323 * inflow.c (child_terminal_save_inferior): Wrap reference to
11324 tcgetpgrp in HAVE_TERMIOS_H.
11325 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11327 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11328 always iterate over all inferiors.
11329 (gdbsim_cntrl_c): Adjust.
11330 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11332 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11334 * gdbtypes.c (lookup_array_range_type): Make sure the array's
11335 index type is objfile-owned if the element type is as well.
11337 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11341 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
11343 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11344 "features/s390x-linux64.c".
11345 (_initialize_s390_linux_tdep): Remove initialization of tdescs
11346 s390_linux32 and s390x_linux64.
11347 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11349 * s390-tdep.c: Include "features/s390-linux32.c" and
11350 "features/s390x-linux64.c".
11351 (s390_tdesc_valid): Add check for tdesc_has_registers.
11352 (s390_gdbarch_init): Make sure there is always a valid tdesc.
11353 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11354 tdesc_s390x_linux64.
11355 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11356 tdesc_s390x_linux64 to...
11357 * s390-tdep.h: ...here.
11359 2018-01-30 Pedro Alves <palves@redhat.com>
11362 * config.in, configure: Regenerate.
11363 * configure.ac: Check for getpgid.
11364 * go32-nat.c (go32_pass_ctrlc): New.
11365 (go32_target): Install it.
11366 * inf-child.c (inf_child_target): Install
11367 child_terminal_save_inferior, child_pass_ctrlc and
11369 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11370 (inf_ptrace_target): No longer install it.
11371 * infcmd.c (interrupt_target_1): Adjust.
11372 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11373 (child_interrupt): Declare.
11374 (inferior::terminal_state): New.
11375 * inflow.c (struct terminal_info): Update comments.
11376 (inferior_process_group): Delete.
11377 (terminal_is_ours): Delete.
11378 (gdb_tty_state): New.
11379 (child_terminal_init): Adjust.
11380 (is_gdb_terminal, sharing_input_terminal_1)
11381 (sharing_input_terminal): New functions.
11382 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
11383 Set the process's actual process group in the foreground if
11384 possible. Handle is_ours_for_output/is_ours distinction. Don't
11385 mark terminal as the inferior's if not sharing GDB's terminal.
11386 Don't check attach_flag.
11387 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11388 pass down a target_terminal_state.
11389 (child_terminal_save_inferior): New, factored out from ...
11390 (child_terminal_ours_1): ... this. Handle
11391 target_terminal_state::is_ours_for_output.
11392 (child_interrupt, child_pass_ctrlc): New.
11393 (inflow_inferior_exit): Clear the inferior's terminal_state.
11394 (copy_terminal_info): Copy the inferior's terminal state.
11395 (_initialize_inflow): Remove reference to terminal_is_ours.
11396 * inflow.h (inferior_process_group): Delete.
11397 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11398 * procfs.c (procfs_target): Don't install procfs_interrupt.
11399 (procfs_interrupt): Delete.
11400 * remote.c (remote_serial_quit_handler): Adjust.
11401 (remote_interrupt): Remove ptid parameter. Adjust.
11402 * target-delegates.c: Regenerate.
11403 * target.c: Include "terminal.h".
11404 (target_terminal::terminal_state): Rename to ...
11405 (target_terminal::m_terminal_state): ... this.
11406 (target_terminal::init): Adjust.
11407 (target_terminal::inferior): Adjust to per-inferior
11409 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11410 (target_terminal::ours, target_terminal::ours_for_output): Use
11411 target_terminal_is_ours_kind.
11412 (target_interrupt): Remove ptid parameter. Adjust.
11413 (default_target_pass_ctrlc): Adjust.
11414 * target.h (target_ops::to_terminal_save_inferior): New field.
11415 (target_ops::to_interrupt): Remove ptid_t parameter.
11416 (target_interrupt): Remove ptid_t parameter. Update comment.
11417 (target_pass_ctrlc): Update comment.
11418 * target/target.h (target_terminal_state): New scoped enum,
11419 factored out of ...
11420 (target_terminal::terminal_state): ... here.
11421 (target_terminal::inferior): Update comments.
11422 (target_terminal::restore_inferior): New.
11423 (target_terminal::is_inferior, target_terminal::is_ours)
11424 (target_terminal::is_ours_for_output): Adjust.
11425 (target_terminal::scoped_restore_terminal_state): Adjust to
11426 rename, and call restore_inferior() instead of inferior().
11427 (target_terminal::scoped_restore_terminal_state::m_state): Change
11429 (target_terminal::terminal_state): Rename to ...
11430 (target_terminal::m_terminal_state): ... this and change type.
11432 2018-01-30 Pedro Alves <palves@redhat.com>
11434 * linux-nat.c (wait_for_signal): New function.
11435 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11437 (async_terminal_is_ours)
11438 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11439 (linux_nat_add_target): Don't override
11440 to_terminal_inferior/to_terminal_ours.
11442 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
11444 * remote.c (remote_follow_fork): Don't call "detach_inferior".
11446 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
11448 * dwarf2read.c (free_dwo_files): Add forward-declaration.
11449 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11450 dwarf2_per_objfile_free here.
11451 (dwarf2_per_objfile_free): Remove.
11452 (_initialize_dwarf2_read): Don't register
11453 dwarf2_per_objfile_free as a registry cleanup.
11455 2018-01-27 Eli Zaretskii <eliz@gnu.org>
11457 Avoid compilation errors in MinGW native builds
11459 The error is triggered by including python-internal.h, and the
11462 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11463 from build-gnulib/import/math.h:27,
11464 from d:/usr/Python26/include/pyport.h:235,
11465 from d:/usr/Python26/include/Python.h:58,
11466 from python/python-internal.h:94,
11467 from python/py-arch.c:24:
11468 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11472 This happens because Python headers define 'hypot' to expand t
11473 '_hypot' in the Windows builds.
11474 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11475 'hypoth'. This avoids a compilation error.
11477 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11479 * MAINTAINERS (Write After Approval): Fix ordering.
11481 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11483 * MAINTAINERS (Write After Approval): Add Alan Hayward.
11485 2018-01-26 Alan Modra <amodra@gmail.com>
11487 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11488 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11489 Remove nop. Make const. Comment.
11490 (powerpc32_plt_stub_so_2): New.
11491 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11492 Correct count. Update uses.
11493 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11494 Move common code reading PLT entry word. Correct
11495 powerpc32_plt_stub PLT address calculation.
11496 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11497 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11498 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11499 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11500 (ppc64_standard_linkage8): Likewise.
11501 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11502 Correct insns description.
11503 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11505 2018-01-24 Pedro Alves <palves@redhat.com>
11507 GCC PR libstdc++/83906
11508 * gdbtypes.c (operator==(const dynamic_prop &,
11509 const dynamic_prop &)): New.
11510 (operator==(const range_bounds &, const range_bounds &)): New.
11511 (check_types_equal): Use them instead of memcmp.
11512 * gdbtypes.h (operator==(const dynamic_prop &,
11513 const dynamic_prop &)): Declare.
11514 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11515 (operator==(const range_bounds &, const range_bounds &)): Declare.
11516 (operator!=(const range_bounds &, const range_bounds &)): Declare.
11518 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11520 * s390-linux-tdep.c (s390_record_address_mask)
11521 (s390_record_calc_disp_common, s390_record_calc_disp)
11522 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11523 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11524 (s390_process_record): Move to s390-tdep.c.
11525 (s390_linux_init_abi_any): Adjust.
11526 * s390-tdep.c (s390_record_address_mask)
11527 (s390_record_calc_disp_common, s390_record_calc_disp)
11528 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11529 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11530 (s390_process_record): Moved from s390-linux-tdep.c
11531 (s390_gdbarch_init): Adjust.
11533 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11535 * s390-linux-nat.c (s390-tdep.h): New include.
11536 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11537 (HFILES_NO_SRCDIR): Add s390-tdep.h.
11538 (ALLDEPFILES): Add s390-tdep.c.
11539 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11540 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11541 * s390-tdep.h: ...this. New file.
11542 * s390-linux-tdep.c (s390-tdep.h): New include.
11543 (_initialize_s390_tdep): Rename to...
11544 (_initialize_s390_linux_tdep): ...this and adjust.
11545 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11546 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11548 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11549 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11550 (s390_is_partial_instruction, s390_software_single_step)
11551 (is_non_branch_ril, s390_displaced_step_copy_insn)
11552 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11553 (s390_prologue_data, s390_addr, s390_store, s390_load)
11554 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11555 (s390_register_call_saved, s390_guess_tracepoint_registers)
11556 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11557 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11558 (s390_pseudo_register_name, s390_pseudo_register_type)
11559 (s390_pseudo_register_read, s390_pseudo_register_write)
11560 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11561 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11562 (s390_addr_bits_remove, s390_address_class_type_flags)
11563 (s390_address_class_type_flags_to_name)
11564 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11565 (s390_function_arg_float, s390_function_arg_vector)
11566 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11567 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11568 (s390_frame_align, s390_register_return_value, s390_return_value)
11569 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11570 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11571 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11572 (s390_trad_frame_prev_register, s390_unwind_cache)
11573 (s390_prologue_frame_unwind_cache)
11574 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11575 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11576 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11577 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11578 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11579 (s390_frame_base_address, s390_local_base_address)
11580 (s390_frame_base, s390_gcc_target_options)
11581 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11582 (s390_validate_reg_range, s390_tdesc_valid)
11583 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11584 * s390-tdep.c: ...this. New file.
11586 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11588 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11589 (s390_process_record, s390_gdbarch_tdep_alloc)
11590 (s390_linux_init_abi_any): Use/set new hook.
11592 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11594 * s390-linux-tdep.c (osabi.h): New include.
11595 (s390_linux_init_abi_31, s390_linux_init_abi_64)
11596 (s390_linux_init_abi_any): New functions.
11597 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11599 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11601 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11602 tdesc_has_registers check
11604 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11606 * s390-linux-tdep.c (s390_tdesc_valid): New function.
11607 (s390_validate_reg_range): New macro.
11608 (s390_gdbarch_init): Adjust.
11610 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11612 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11613 (s390_gdbarch_tdep_alloc): Adjust.
11614 (s390_gdbarch_init): Adjust.
11616 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11618 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11619 <have_tdb>: Change type to bool.
11620 (s390_gdbarch_tdep_alloc): Adjust.
11621 (s390_gdbarch_init): Adjust.
11623 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11625 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11626 (gdbarch_tdep) <have_upper, have_vx>: New fields.
11627 (s390_gdbarch_tdep_alloc): New function.
11628 (s390_gdbarch_init): Allocate tdep at start and use its fields
11629 instead of separate variables.
11631 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11633 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11634 when looking for cached gdbarch and add comment for remaining.
11636 2018-01-22 Pedro Alves <palves@redhat.com>
11637 Sergio Durigan Junior <sergiodj@redhat.com>
11639 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11642 2018-01-22 Maciej W. Rozycki <macro@mips.com>
11644 * MAINTAINERS: Update my company e-mail address.
11646 2018-01-22 Yao Qi <yao.qi@linaro.org>
11648 * regcache.c (cooked_write_test): New function.
11649 (_initialize_regcache): Register the test.
11651 2018-01-22 Yao Qi <yao.qi@linaro.org>
11653 * ia64-tdep.c (ia64_pseudo_register_read): Call
11654 regcache->cooked_read instead of regcache_cooked_read_unsigned.
11655 * m32c-tdep.c (m32c_cat_read): Likewise.
11656 (m32c_r3r2r1r0_read): Likewise.
11657 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11658 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11660 2018-01-22 Yao Qi <yao.qi@linaro.org>
11662 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11663 method raw_read instead of regcache_raw_read.
11664 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11665 * arm-tdep.c (arm_neon_quad_read): Likewise.
11666 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11667 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11668 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11669 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11670 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11671 (i386_pseudo_register_read_into_value): Likewise.
11672 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11673 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11674 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11675 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11676 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11677 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11678 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11679 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11680 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11682 2018-01-22 Yao Qi <yao.qi@linaro.org>
11684 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11685 * configure.tgt: Remove target mt.
11686 * mt-tdep.c: Remove.
11687 * regcache.c (cooked_read_test): Remove the check for mt.
11689 2018-01-22 Yao Qi <yao.qi@linaro.org>
11691 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11692 instead of gdbarch_pseudo_register_read_value.
11694 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11696 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11699 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11701 * linespec.c (create_sals_line_offset): Remove code that preserved
11702 the symtab_and_line's line number.
11704 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11706 * varobj.c (varobj_create): Don't set valid_block when creating a
11709 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11711 * varobj.c (varobj_create): Remove out of date comment.
11713 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11716 * ada-exp.y (write_var_from_sym): Pass extra parameter when
11717 updating innermost block.
11718 * parse.c (innermost_block_tracker::update): Take extra type
11719 parameter, and check types match before updating innermost block.
11720 (write_dollar_variable): Update innermost block for registers.
11721 * parser-defs.h (enum innermost_block_tracker_type): New enum.
11722 (innermost_block_tracker::innermost_block_tracker): Initialise
11724 (innermost_block_tracker::reset): Take type parameter.
11725 (innermost_block_tracker::update): Take type parameter, and pass
11726 type through as needed.
11727 (innermost_block_tracker::m_types): New member.
11728 * varobj.c (varobj_create): Pass type when reseting innermost
11731 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11733 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11734 * ada-lang.c (resolve_subexp): Likewise.
11735 * breakpoint.c (set_breakpoint_condition) Likewise.
11736 (watch_command_1) Likewise.
11737 * c-exp.y (variable): Likewise.
11738 * d-exp.y (PrimaryExpression): Likewise.
11739 * f-exp.y (variable): Likewise.
11740 * go-exp.y (variable): Likewise.
11741 * m2-exp.y (variable): Likewise.
11742 * objfiles.c (objfile::~objfile): Likewise.
11743 * p-exp.y (variable): Likewise.
11744 * parse.c (innermost_block): Change type.
11745 * parser-defs.h (class innermost_block_tracker): New.
11746 (innermost_block): Change to innermost_block_tracker.
11747 * printcmd.c (display_command): Switch to innermost_block API.
11748 (do_one_display): Likewise.
11749 * rust-exp.y (do_one_display): Likewise.
11750 * symfile.c (clear_symtab_users): Likewise.
11751 * varobj.c (varobj_create): Switch to innermost_block API, replace
11752 use of innermost_block with block stored on varobj object.
11754 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11756 * expression.h (innermost_block): Remove declaration.
11757 * varobj.c: Add 'parser-defs.h' include.
11759 2018-01-19 Tom Tromey <tom@tromey.com>
11761 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11762 symbols in the static and global blocks.
11764 2018-01-19 James Clarke <jrtc27@jrtc27.com>
11766 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11767 gdb_ptrace.h, and move including gdb_wait.h ...
11768 * nat/linux-ptrace.h: ... to here.
11770 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11772 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11773 inf_ptrace_detach_success.
11774 (inf_ptrace_detach_success): Add inferior parameter, use it
11775 instead of inferior_ptid, pass it to detach_inferior.
11776 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11778 * inferior.c (detach_inferior): Add overload that takes an
11780 * inferior.h (detach_inferior): Likewise.
11781 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11782 use inferior_ptid, adjust call to inf_ptrace_detach_success.
11783 * linux-thread-db.c (thread_db_detach): Use inf parameter.
11785 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11787 * target.h (struct target_ops) <to_detach>: Add inferior
11789 (target_detach): Likewise.
11790 * target.c (dispose_inferior): Pass inferior down.
11791 (target_detach): Pass inferior down. Assert that it is equal to
11792 the current inferior.
11793 * aix-thread.c (aix_thread_detach): Pass inferior down.
11794 * corefile.c (core_file_command): Pass current_inferior() down.
11795 * corelow.c (core_detach): Add inferior parameter.
11796 * darwin-nat.c (darwin_detach): Likewise.
11797 * gnu-nat.c (gnu_detach): Likewise.
11798 * inf-ptrace.c (inf_ptrace_detach): Likewise.
11799 * infcmd.c (detach_command): Pass current_inferior() down to
11801 * infrun.c (follow_fork_inferior): Pass parent_inf to
11803 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11805 * linux-nat.c (linux_nat_detach): Add inferior parameter.
11806 * linux-thread-db.c (thread_db_detach): Likewise.
11807 * nto-procfs.c (procfs_detach): Likewise.
11808 * procfs.c (procfs_detach): Likewise.
11809 * record.c (record_detach): Likewise.
11810 * record.h (struct inferior): Forward-declare.
11811 (record_detach): Add inferior parameter.
11812 * remote-sim.c (gdbsim_detach): Likewise.
11813 * remote.c (remote_detach_1): Likewise.
11814 (remote_detach): Likewise.
11815 (extended_remote_detach): Likewise.
11816 * sol-thread.c (sol_thread_detach): Likewise.
11817 * target-debug.h (target_debug_print_inferior_p): New macro.
11818 * target-delegates.c: Re-generate.
11819 * top.c (kill_or_detach): Pass inferior down to target_detach.
11820 * windows-nat.c (windows_detach): Add inferior parameter.
11822 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11824 * target.h (struct target_ops) <to_detach>: Remove args
11826 (target_detach): Likewise.
11827 * target.c (dispose_inferior): Adjust.
11828 (target_detach): Remove args parameter, adjust.
11829 * aix-thread.c (aix_thread_detach): Adjust.
11830 * corefile.c (core_file_command): Adjust.
11831 * corelow.c (core_detach): Adjust.
11832 * darwin-nat.c (darwin_detach): Adjust.
11833 * gnu-nat.c (gnu_detach): Adjust.
11834 * inf-ptrace.c (inf_ptrace_detach): Adjust.
11835 * infcmd.c (detach_command): Adjust
11836 * infrun.c (follow_fork_inferior): Adjust.
11837 (handle_vfork_child_exec_or_exit): Adjust.
11838 * linux-fork.c (linux_fork_detach): Remove args parameter.
11839 * linux-fork.h (linux_fork_detach): Likewise.
11840 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11841 * linux-thread-db.c (thread_db_detach): Likewise.
11842 * nto-procfs.c (procfs_detach): Likewise.
11843 * procfs.c (procfs_detach): Likewise.
11844 (do_detach): Remove signo parameter.
11845 * record.c (record_detach): Remove args parameter.
11846 * record.h (record_detach): Likewise.
11847 * remote-sim.c (gdbsim_detach): Likewise.
11848 * remote.c (remote_detach_1): Likewise.
11849 (remote_detach): Likewise.
11850 (extended_remote_detach): Likewise.
11851 * sol-thread.c (sol_thread_detach): Likewise.
11852 * target-delegates.c: Re-generate.
11853 * top.c (struct qt_args) <args>: Remove field.
11854 (kill_or_detach): Don't pass args.
11855 (quit_force): Don't set args.
11856 * windows-nat.c (windows_detach): Remove args parameter.
11858 2018-01-19 Yao Qi <yao.qi@linaro.org>
11860 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11861 (arm_linux_init_abi): Install it.
11863 2018-01-19 Yao Qi <yao.qi@linaro.org>
11865 * osabi.c (gdb_osabi_names): Extend the regexp for
11866 arm-linux-gnueabihf.
11868 2018-01-18 Yao Qi <yao.qi@linaro.org>
11870 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11872 (abbrev_table::add_abbrev): Update.
11873 (abbrev_table::lookup_abbrev): Update.
11875 2018-01-18 Yao Qi <yao.qi@linaro.org>
11877 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11879 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
11881 * compile/compile.c (compile_to_object): Convert "triplet_rx"
11884 2018-01-17 Tom Tromey <tom@tromey.com>
11886 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
11888 2018-01-17 Tom Tromey <tom@tromey.com>
11890 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11891 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11892 (create_array_type_with_stride): Update.
11893 * dwarf2read.c (set_die_type): Update.
11895 2018-01-17 Tom Tromey <tom@tromey.com>
11897 * dwarf2read.c (delayed_method_info): Remove typedef.
11898 (dwarf2_cu::method_info): Now a std::vector.
11899 (add_to_method_list): Update.
11900 (free_delayed_list): Remove.
11901 (compute_delayed_physnames): Update.
11902 (process_full_comp_unit, process_full_type_unit): Clear the method
11903 list. Remove cleanups.
11904 (psymtab_include_file_name): Add name_holder parameter. Use
11905 unique_xmalloc_ptr.
11906 (dwarf_decode_lines): Update.
11908 2018-01-17 Tom Tromey <tom@tromey.com>
11909 Simon Marchi <simon.marchi@ericsson.com>
11911 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11912 (dwarf2_per_objfile::free_cached_comp_units)
11913 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11914 (init_cutu_and_read_dies_no_follow): Update.
11915 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11916 (dwarf2_cu::~dwarf2_cu): New.
11917 (free_heap_comp_unit, free_stack_comp_unit): Remove.
11918 (age_cached_comp_units, free_one_cached_comp_unit): Update.
11920 2018-01-17 Tom Tromey <tom@tromey.com>
11921 Simon Marchi <simon.marchi@ericsson.com>
11923 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11924 (struct die_reader_specs) <abbrev_table>: New member.
11925 (struct abbrev_table): Add constructor.
11926 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11927 <abbrev_obstack>: Now an auto_obstack.
11928 (abbrev_table_up): New typedef.
11929 (init_cu_die_reader): Add abbrev_table parameter.
11930 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11931 Add result_dwo_abbrev_table.
11932 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11933 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11935 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11937 (skip_children): Update.
11938 (abbrev_table::alloc_abbrev): Rename from
11939 abbrev_table_alloc_abbrev.
11940 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11941 (abbrev_table::lookup_abbrev): Rename from
11942 abbrev_table_lookup_abbrev.
11943 (abbrev_table_read_table): Return abbrev_table_up.
11944 (abbrev_table_free, abbrev_table_free_cleanup)
11945 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11946 (load_partial_dies): Update.
11948 2018-01-17 Tom Tromey <tom@tromey.com>
11950 * dwarf2read.c (dwarf2_compute_name): Update comment.
11951 (read_func_scope, read_variable): Update.
11952 (new_symbol): Remove.
11953 (new_symbol_full): Rename to new_symbol.
11955 2018-01-17 Mike Gulick <mgulick@mathworks.com>
11958 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11959 a warning instead of throwing an error, set section size to 0 and return
11961 * gdb_bfd.h (gdb_bfd_map_section): Update description.
11963 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11965 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11967 (linux_ptrace_attach_fail_reason_string): Likewise.
11968 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11970 (linux_ptrace_attach_fail_reason_string): Likewise.
11971 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11973 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11975 * linux-nat.c (linux_nat_attach): Remove xstrdup.
11977 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
11980 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11981 checking for fs_base/gs_base fields in struct user_regs_struct.
11982 * configure: Regenerate.
11984 2018-01-17 Yao Qi <yao.qi@linaro.org>
11986 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11988 (aarch64_linux_init_abi): Install it to gdbarch hook
11989 gcc_target_options.
11991 2018-01-15 Pedro Alves <palves@redhat.com>
11993 * common/signals-state-save-restore.c
11994 (save_original_signals_state): Fix typos.
11996 2017-01-12 Tom Tromey <tom@tromey.com>
11997 Sergio Durigan Junior <sergiodj@redhat.com>
11999 * Makefile.in (install-only): Install gdb-add-index.
12001 2018-01-12 John Baldwin <jhb@FreeBSD.org>
12003 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12005 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12007 * infrun.c (keep_going_pass_signal): Clear step-over info when
12008 insert_breakpoints fails.
12010 2018-01-11 Pedro Alves <palves@redhat.com>
12013 * infrun.c (resume): Rename to ...
12014 (resume_1): ... this.
12015 (resume): Reimplement as wrapper around resume_1.
12017 2018-01-11 Pedro Alves <palves@redhat.com>
12020 * remote.c (remote_parse_stop_reply): Default to the last-set
12021 general thread instead of to 'magic_null_ptid'.
12023 2018-01-10 Pedro Alves <palves@redhat.com>
12025 * language.h (language_get_symbol_name_matcher): Rename ...
12026 (get_symbol_name_matcher): ... this.
12027 * language.c (language_get_symbol_name_matcher): Ditto.
12028 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12031 2018-01-10 Pedro Alves <palves@redhat.com>
12035 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12036 Adjust to use language_get_symbol_name_matcher instead of
12037 language_defn::la_get_symbol_name_matcher.
12038 * language.c (language_get_symbol_name_matcher): If in Ada mode
12039 and the lookup name is a verbatim match, return Ada's matcher.
12040 * language.h (language_get_symbol_name_matcher): Adjust comment.
12041 (ada_lookup_name_info::verbatim_p):: New method.
12043 2018-01-10 Pedro Alves <palves@redhat.com>
12046 * ada-lang.c (ada_collect_symbol_completion_matches): If the
12047 minsym's language is language_auto or language_cplus, pass down
12048 language_ada instead.
12049 * symtab.c (compare_symbol_name): Don't frob symbol language here.
12051 2018-01-10 Pedro Alves <palves@redhat.com>
12054 * minsyms.c (linkage_name_str): New function.
12055 (iterate_over_minimal_symbols): Use it.
12057 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12059 * NEWS: Document that 'info proc' now works on FreeBSD.
12061 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12063 * configure.ac: Check for kinfo_getfile in libutil.
12064 * configure: Regenerate.
12065 * config.in: Regenerate.
12066 * fbsd-nat.c: Include "fbsd-tdep.h".
12067 (fbsd_fetch_cmdline): New.
12068 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12069 rather than calling error.
12070 (fbsd_info_proc): New.
12071 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12072 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12073 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12075 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12077 * fbsd-nat.c (struct free_deleter): Remove.
12078 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12080 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12082 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12083 NULL for an empty pathname.
12085 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12087 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12088 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12089 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12090 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12091 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12092 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12093 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12094 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12095 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12096 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12097 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12098 (fbsd_core_fetch_timeval, fbsd_print_sigset)
12099 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12100 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
12101 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12103 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
12105 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12106 (gnu_xfer_auxv): New function.
12107 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12108 TARGET_OBJECT_AUXV.
12110 2018-01-08 Yao Qi <yao.qi@linaro.org>
12111 Simon Marchi <simon.marchi@ericsson.com>
12113 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12115 (COMMON_OBS): Remove selftest.o.
12116 * configure.ac: Append selftest-arch.c and common/selftest.c to
12117 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
12118 * configure: Re-generated.
12119 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12121 (maintenance_info_selftests): Likewise.
12123 2018-01-08 Xavier Roirand <roirand@adacore.com>
12125 * ada-valprint.c (val_print_packed_array_elements): Use
12126 proper number of elements when printing an array indexed
12127 by an enumeration type.
12129 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12131 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12132 (dw2_get_file_names_reader): Adjust.
12133 (lookup_dwo_signatured_type): Adjust.
12134 (lookup_dwp_signatured_type): Adjust.
12135 (lookup_signatured_type): Adjust.
12136 (create_type_unit_group): Adjust.
12137 (get_type_unit_group): Adjust.
12138 (process_psymtab_comp_unit_reader): Adjust.
12139 (build_type_psymtabs_reader): Adjust.
12140 (scan_partial_symbols): Adjust.
12141 (add_partial_symbol): Adjust.
12142 (add_partial_subprogram): Adjust.
12143 (peek_die_abbrev): Adjust.
12144 (fixup_go_packaging): Adjust.
12145 (process_imported_unit_die): Adjust.
12146 (dwarf2_compute_name): Adjust.
12147 (dwarf2_physname): Adjust.
12148 (read_import_statement): Adjust.
12149 (handle_DW_AT_stmt_list): Adjust.
12150 (read_file_scope): Adjust.
12151 (read_func_scope): Adjust.
12152 (read_lexical_block_scope): Adjust.
12153 (read_call_site_scope): Adjust.
12154 (read_variable): Adjust.
12155 (dwarf2_rnglists_process): Adjust.
12156 (dwarf2_ranges_process): Adjust.
12157 (dwarf2_ranges_read): Adjust.
12158 (dwarf2_get_pc_bounds): Adjust.
12159 (dwarf2_record_block_ranges): Adjust.
12160 (dwarf2_add_field): Adjust.
12161 (dwarf2_add_member_fn): Adjust.
12162 (read_structure_type): Adjust.
12163 (process_structure_scope): Adjust.
12164 (read_enumeration_type): Adjust.
12165 (read_array_type): Adjust.
12166 (mark_common_block_symbol_computed): Adjust.
12167 (read_common_block): Adjust.
12168 (read_namespace_type): Adjust.
12169 (read_namespace): Adjust.
12170 (read_module_type): Adjust.
12171 (read_tag_pointer_type): Adjust.
12172 (read_tag_ptr_to_member_type): Adjust.
12173 (read_tag_string_type): Adjust.
12174 (read_subroutine_type): Adjust.
12175 (read_typedef): Adjust.
12176 (read_base_type): Adjust.
12177 (attr_to_dynamic_prop): Adjust.
12178 (read_subrange_type): Adjust.
12179 (read_unspecified_type): Adjust.
12180 (dwarf2_read_abbrevs): Adjust.
12181 (load_partial_dies): Adjust.
12182 (read_partial_die): Adjust.
12183 (find_partial_die): Adjust.
12184 (guess_partial_die_structure_name): Adjust.
12185 (fixup_partial_die): Adjust.
12186 (read_attribute_value): Adjust.
12187 (read_addr_index): Adjust.
12188 (read_addr_index_from_leb128): Adjust.
12189 (read_str_index): Adjust.
12190 (dwarf2_string_attr): Adjust.
12191 (get_debug_line_section): Adjust.
12192 (dwarf_decode_line_header): Adjust.
12193 (lnp_state_machine::check_line_address): Adjust.
12194 (dwarf_decode_lines_1): Adjust.
12195 (dwarf_decode_lines): Adjust.
12196 (dwarf2_start_symtab): Adjust.
12197 (var_decode_location): Adjust.
12198 (new_symbol_full): Adjust.
12199 (dwarf2_const_value_data): Adjust.
12200 (dwarf2_const_value_attr): Adjust.
12201 (dwarf2_const_value): Adjust.
12202 (die_type): Adjust.
12203 (die_containing_type): Adjust.
12204 (build_error_marker_type): Adjust.
12205 (lookup_die_type): Adjust.
12206 (guess_full_die_structure_name): Adjust.
12207 (anonymous_struct_prefix): Adjust.
12208 (determine_prefix): Adjust.
12209 (dwarf2_name): Adjust.
12210 (follow_die_ref_or_sig): Adjust.
12211 (follow_die_offset): Adjust.
12212 (follow_die_ref): Adjust.
12213 (follow_die_sig_1): Adjust.
12214 (follow_die_sig): Adjust.
12215 (get_signatured_type): Adjust.
12216 (get_DW_AT_signature_type): Adjust.
12217 (decode_locdesc): Adjust.
12218 (dwarf_decode_macros): Adjust.
12219 (cu_debug_loc_section): Adjust.
12220 (fill_in_loclist_baton): Adjust.
12221 (dwarf2_symbol_mark_computed): Adjust.
12222 (init_one_comp_unit): Don't assign
12223 dwarf2_cu::dwarf2_per_objfile.
12224 (set_die_type): Adjust.
12226 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12228 * dwarf2read.c (struct mapped_debug_names): Add constructor.
12229 <dwarf2_per_objfile>: New field.
12230 (dwarf2_per_objfile): Remove global.
12231 (get_dwarf2_per_objfile): New function.
12232 (set_dwarf2_per_objfile): New function.
12233 (dwarf2_build_psymtabs_hard): Change objfile parameter to
12234 dwarf2_per_objfile.
12235 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12236 (read_abbrev_offset): Likewise.
12237 (read_indirect_string): Likewise.
12238 (read_indirect_line_string): Likewise.
12239 (read_indirect_string_at_offset): Likewise.
12240 (read_indirect_string_from_dwz): Likewise.
12241 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12242 dwarf2_per_objfile.
12243 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12244 (create_all_comp_units): Change objfile parameter to
12245 dwarf2_per_objfile.
12246 (create_all_type_units): Likewise.
12247 (process_queue): Add dwarf2_per_objfile parameter.
12248 (read_and_check_comp_unit_head): Likewise.
12249 (lookup_dwo_unit_in_dwp): Likewise.
12250 (get_dwp_file): Likewise.
12251 (process_cu_includes): Likewise.
12252 (struct free_dwo_file_cleanup_data): New struct.
12253 (dwarf2_has_info): Use get_dwarf2_per_objfile and
12254 set_dwarf2_per_objfile.
12255 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12256 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12257 context, adjust calls.
12258 (dw2_instantiate_symtab): Likewise.
12259 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12260 (dw2_get_cu): Likewise.
12261 (create_cu_from_index_list): Change objfile parameter to
12262 dwarf2_per_objfile.
12263 (create_cus_from_index_list): Get dwarf2_per_objfile from
12264 context, adjust calls.
12265 (create_cus_from_index): Likewise.
12266 (create_signatured_type_table_from_index): Change objfile
12267 parameter to dwarf2_per_objfile.
12268 (create_signatured_type_table_from_debug_names): Change objfile
12269 parameter to dwarf2_per_objfile.
12270 (create_addrmap_from_index): Likewise.
12271 (create_addrmap_from_aranges): Likewise.
12272 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12273 (dw2_setup): Remove.
12274 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12276 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12277 get_dwarf2_per_objfile.
12278 (dw2_forget_cached_source_info): Likewise.
12279 (dw2_map_symtabs_matching_filename): Likewise.
12280 (struct dw2_symtab_iterator) <index>: Remove.
12281 <dwarf2_per_objfile>: New field.
12282 (dw2_symtab_iter_init): Replace index parameter with
12283 dwarf2_per_objfile.
12284 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12285 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12286 (dw2_print_stats): Likewise.
12287 (dw2_dump): Likewise.
12288 (dw2_expand_symtabs_for_function): Likewise.
12289 (dw2_expand_all_symtabs): Likewise.
12290 (dw2_expand_symtabs_with_fullname): Likewise.
12291 (dw2_expand_marked_cus): Replace index and objfile parameters
12292 with dwarf2_per_objfile.
12293 (dw_expand_symtabs_matching_file_matcher): Add
12294 dwarf2_per_objfile parameter and adjust calls.
12295 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12297 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12298 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12300 (create_cus_from_debug_names_list): Replace objfile parameter
12301 with dwarf2_per_objfile and adjust calls.
12302 (create_cus_from_debug_names): Likewise.
12303 (dwarf2_read_debug_names): Likewise.
12304 (mapped_debug_names::namei_to_name): Adjust call.
12305 (dw2_debug_names_iterator::next): Likewise.
12306 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12307 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12308 (dw2_debug_names_dump): Likewise.
12309 (dw2_debug_names_expand_symtabs_for_function): Likewise.
12310 (dw2_debug_names_expand_symtabs_matching): Likewise.
12311 (dwarf2_initialize_objfile): Likewise.
12312 (dwarf2_build_psymtabs): Likewise.
12313 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12315 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12316 (read_and_check_comp_unit_head): Likewise.
12317 (read_abbrev_offset): Likewise.
12318 (create_debug_type_hash_table): Likewise.
12319 (create_debug_types_hash_table): Likewise.
12320 (create_all_type_units): Replace objfile parameter with
12321 dwarf2_per_objfile.
12322 (add_type_unit): Add dwarf2_per_objfile parameter.
12323 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12324 with dwarf2_per_objfile.
12325 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12326 (lookup_dwp_signatured_type): Likewise.
12327 (lookup_signatured_type): Likewise.
12328 (read_cutu_die_from_dwo): Likewise.
12329 (init_tu_and_read_dwo_dies): Likewise.
12330 (init_cutu_and_read_dies): Likewise.
12331 (init_cutu_and_read_dies_no_follow): Likewise.
12332 (allocate_type_unit_groups_table): Add objfile parameter.
12333 (create_type_unit_group): Use dwarf2_per_objfile from cu.
12334 (get_type_unit_group): Likewise.
12335 (process_psymtab_comp_unit): Update call.
12336 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12337 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12338 (print_tu_stats): Likewise.
12339 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12340 in void* parameter.
12341 (build_type_psymtabs): Change objfile parameter to
12342 dwarf2_per_objfile.
12343 (process_skeletonless_type_unit): Use dwarf2_per_objfile
12344 passed in void* parameter.
12345 (process_skeletonless_type_units): Change objfile parameter to
12346 dwarf2_per_objfile.
12347 (set_partial_user): Likewise.
12348 (dwarf2_build_psymtabs_hard): Likewise.
12349 (read_comp_units_from_section): Likewise.
12350 (create_all_comp_units): Likewise.
12351 (scan_partial_symbols): Update calls.
12352 (add_partial_symbol): Likewise.
12353 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12354 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12355 (process_queue): Add dwarf2_per_objfile parameter.
12356 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12357 (compute_compunit_symtab_includes): Likewise.
12358 (process_cu_includes): Add dwarf2_per_objfile parameter.
12359 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12360 (process_full_type_unit): Likewise.
12361 (process_imported_unit_die): Update call.
12362 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12363 (read_file_scope): Likewise.
12364 (allocate_dwo_file_hash_table): Add objfile parameter.
12365 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12366 (create_cus_hash_table): Likewise.
12367 (create_dwp_hash_table): Likewise.
12368 (create_dwo_unit_in_dwp_v1): Likewise.
12369 (create_dwp_v2_section): Likewise.
12370 (create_dwo_unit_in_dwp_v2): Likewise.
12371 (lookup_dwo_unit_in_dwp): Likewise.
12372 (try_open_dwop_file): Likewise.
12373 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12374 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12375 cleanup to include a reference to dwarf2_per_objfile.
12376 (open_dwp_file): Add dwarf2_per_objfile parameter.
12377 (open_and_init_dwp_file): Likewise.
12378 (get_dwp_file): Likewise.
12379 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12380 (queue_and_load_all_dwo_tus): Update call.
12381 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12383 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12384 (dwarf2_ranges_process): Likewise.
12385 (dwarf2_get_pc_bounds): Likewise.
12386 (mark_common_block_symbol_computed): Likewise.
12387 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12388 (dwarf2_read_abbrevs): Update call.
12389 (read_partial_die): Use dwarf2_per_objfile from cu.
12390 (find_partial_die): Likewise.
12391 (fixup_partial_die): Likewise.
12392 (read_attribute_value): Likewise.
12393 (read_indirect_string_at_offset_from): Add objfile parameter.
12394 (read_indirect_string_at_offset): Add dwarf2_per_objfile
12396 (read_indirect_string_from_dwz): Add objfile parameter.
12397 (read_indirect_string): Add objfile parameter.
12398 (read_addr_index_1): Add dwarf2_per_objfile parameter.
12399 (read_addr_index): Use dwarf2_per_objfile from cu.
12400 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12402 (read_str_index): Use dwarf2_per_objfile from cu.
12403 (get_debug_line_section): Likewise.
12404 (read_formatted_entries): Add dwarf2_per_objfile parameter.
12405 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12406 (new_symbol_full): Use dwarf2_per_objfile from cu.
12407 (build_error_marker_type): Likewise.
12408 (lookup_die_type): Likewise.
12409 (determine_prefix): Likewise.
12410 (follow_die_offset): Likewise.
12411 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12412 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12413 (dwarf2_fetch_die_type_sect_off): Likewise.
12414 (dwarf2_get_die_type): Likewise.
12415 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12416 (get_signatured_type): Likewise.
12417 (get_DW_AT_signature_type): Likewise.
12418 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12419 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12420 (cu_debug_loc_section): Likewise.
12421 (fill_in_loclist_baton): Likewise.
12422 (dwarf2_symbol_mark_computed): Likewise.
12423 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12424 dwarf2_per_objfile.
12425 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12427 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12428 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12429 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12430 (set_die_type): Use dwarf2_free_objfile from cu.
12431 (get_die_type_at_offset): Likewise.
12432 (dwarf2_per_objfile_free): Don't assign global variable.
12433 (debug_names) <constructor>: Add dwarf2_per_objfile
12434 parameter, update m_debugstrlookup construction.
12435 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12437 <m_dwarf2_per_objfile>: New field.
12438 <lookup>: Use m_dwarf2_per_objfile.
12439 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12440 (psyms_seen_size): Likewise.
12441 (write_gdbindex): Replace objfile parameter with
12442 dwarf2_per_objfile.
12443 (write_debug_names): Likewise.
12444 (write_psymtabs_to_index): Likewise.
12445 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12448 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12450 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12451 <dwarf2_per_objfile>: New field.
12452 (struct dwarf2_per_cu_data) <objfile>: Remove.
12453 <dwarf2_per_objfile>: New field.
12454 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12456 (create_signatured_type_table_from_index): Likewise.
12457 (create_debug_type_hash_table): Likewise.
12458 (fill_in_sig_entry_from_dwo_entry): Likewise.
12459 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12460 (create_type_unit_group): Assign dwarf2_per_objfile instead of
12462 (create_partial_symtab): Access objfile through
12463 dwarf2_per_objfile.
12464 (process_psymtab_comp_unit_reader): Likewise.
12465 (read_comp_units_from_section): Likewise.
12466 (scan_partial_symbols): Likewise.
12467 (add_partial_symbol): Likewise.
12468 (add_partial_subprogram): Likewise.
12469 (peek_die_abbrev): Likewise.
12470 (fixup_go_packaging): Likewise.
12471 (process_full_comp_unit): Likewise.
12472 (process_full_type_unit): Likewise.
12473 (process_imported_unit_die): Likewise.
12474 (dwarf2_compute_name): Likewise.
12475 (dwarf2_physname): Likewise.
12476 (read_import_statement): Likewise.
12477 (create_cus_hash_table): Assign dwarf2_physname instead of
12479 (read_func_scope): Access objfile through dwarf2_per_objfile.
12480 (read_lexical_block_scope): Likewise.
12481 (read_call_site_scope): Likewise.
12482 (read_variable): Likewise.
12483 (dwarf2_rnglists_process): Likewise.
12484 (dwarf2_ranges_process): Likewise.
12485 (dwarf2_ranges_read): Likewise.
12486 (dwarf2_record_block_ranges): Likewise.
12487 (dwarf2_add_field): Likewise.
12488 (dwarf2_add_member_fn): Likewise.
12489 (read_structure_type): Likewise.
12490 (process_structure_scope): Likewise.
12491 (read_enumeration_type): Likewise.
12492 (read_array_type): Likewise.
12493 (read_common_block): Likewise.
12494 (read_namespace_type): Likewise.
12495 (read_namespace): Likewise.
12496 (read_module_type): Likewise.
12497 (read_tag_pointer_type): Likewise.
12498 (read_tag_ptr_to_member_type): Likewise.
12499 (read_tag_string_type): Likewise.
12500 (read_subroutine_type): Likewise.
12501 (read_typedef): Likewise.
12502 (read_base_type): Likewise.
12503 (attr_to_dynamic_prop): Likewise.
12504 (read_subrange_type): Likewise.
12505 (read_unspecified_type): Likewise.
12506 (load_partial_dies): Likewise.
12507 (read_partial_die): Likewise.
12508 (find_partial_die): Likewise.
12509 (guess_partial_die_structure_name): Likewise.
12510 (fixup_partial_die): Likewise.
12511 (read_attribute_value): Likewise.
12512 (read_addr_index_from_leb128): Likewise.
12513 (dwarf2_read_addr_index): Likewise.
12514 (dwarf2_string_attr): Likewise.
12515 (lnp_state_machine::check_line_address): Likewise.
12516 (dwarf_decode_lines_1): Likewise.
12517 (dwarf_decode_lines): Likewise.
12518 (dwarf2_start_symtab): Likewise.
12519 (var_decode_location): Likewise.
12520 (new_symbol_full): Likewise.
12521 (dwarf2_const_value_data): Likewise.
12522 (dwarf2_const_value_attr): Likewise.
12523 (dwarf2_const_value): Likewise.
12524 (die_type): Likewise.
12525 (die_containing_type): Likewise.
12526 (lookup_die_type): Likewise.
12527 (guess_full_die_structure_name): Likewise.
12528 (anonymous_struct_prefix): Likewise.
12529 (dwarf2_name): Likewise.
12530 (follow_die_ref_or_sig): Likewise.
12531 (follow_die_offset): Likewise.
12532 (follow_die_ref): Likewise.
12533 (dwarf2_fetch_die_loc_sect_off): Likewise.
12534 (dwarf2_fetch_constant_bytes): Likewise.
12535 (dwarf2_fetch_die_type_sect_off): Likewise.
12536 (dwarf2_get_die_type): Likewise.
12537 (follow_die_sig): Likewise.
12538 (decode_locdesc): Likewise.
12539 (dwarf2_per_cu_objfile): Likewise.
12540 (dwarf2_per_cu_text_offset): Likewise.
12541 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12543 (set_die_type): Access objfile through
12544 dwarf2_per_objfile.
12546 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12548 * valprint.c (converted_character_d): Remove typedef.
12549 (DEF_VEC_O (converted_character_d)): Remove.
12550 (count_next_character): Use std::vector.
12551 (print_converted_chars_to_obstack): Likewise.
12552 (generic_printstr): Likewise.
12554 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12556 * xml-support.h (struct gdb_xml_value): Add constructor.
12557 <value>: Change type to unique_xmalloc_ptr.
12558 (gdb_xml_value_s): Remove typedef.
12559 (DEF_VEC_O (gdb_xml_value_s)): Remove.
12560 (gdb_xml_element_start_handler): Change parameter type to
12562 (xml_find_attribute): Likewise.
12563 * xml-support.c (xml_find_attribute): Change parameter type to
12564 std::vector and adjust.
12565 (gdb_xml_values_cleanup): Remove.
12566 (gdb_xml_parser::start_element): Adjust to std::vector.
12567 (xinclude_start_include): Change paraeter type to std::vector
12569 * btrace.c (check_xml_btrace_version): Likewise.
12570 (parse_xml_btrace_block): Likewise.
12571 (parse_xml_btrace_pt_config_cpu): Likewise.
12572 (parse_xml_btrace_pt): Likewise.
12573 (parse_xml_btrace_conf_bts): Likewise.
12574 (parse_xml_btrace_conf_pt): Likewise.
12575 * memory-map.c (memory_map_start_memory): Likewise.
12576 (memory_map_start_property): Likewise.
12577 * osdata.c (osdata_start_osdata): Likewise.
12578 (osdata_start_item): Likewise.
12579 (osdata_start_column): Likewise.
12580 * remote.c (start_thread): Likewise.
12581 * solib-aix.c (library_list_start_library): Likewise.
12582 (library_list_start_list): Likewise.
12583 * solib-svr4.c (library_list_start_library): Likewise.
12584 (svr4_library_list_start_list): Likewise.
12585 * solib-target.c (library_list_start_segment): Likewise.
12586 (library_list_start_section): Likewise.
12587 (library_list_start_library): Likewise.
12588 (library_list_start_list): Likewise.
12589 * tracepoint.c (traceframe_info_start_memory): Likewise.
12590 (traceframe_info_start_tvar): Likewise.
12591 * xml-syscall.c (syscall_start_syscall): Likewise.
12592 * xml-tdesc.c (tdesc_start_target): Likewise.
12593 (tdesc_start_feature): Likewise.
12594 (tdesc_start_reg): Likewise.
12595 (tdesc_start_union): Likewise.
12596 (tdesc_start_struct): Likewise.
12597 (tdesc_start_flags): Likewise.
12598 (tdesc_start_enum): Likewise.
12599 (tdesc_start_field): Likewise.
12600 (tdesc_start_enum_value): Likewise.
12601 (tdesc_start_vector): Likewise.
12603 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12605 * extension.h (struct xmethod_worker) <clone>: Remove.
12606 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12608 (python_xmethod_worker::clone): Remove.
12609 * valops.c (find_overload_match): Use std::move instead of
12612 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12614 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12615 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12616 <free_xmethod_worker_data>: Remove.
12617 <get_matching_xmethod_workers>: Chance VEC to std::vector.
12618 <get_xmethod_arg_types>: Remove.
12619 <get_xmethod_result_type>: Remove.
12620 <invoke_xmethod>: Remove.
12621 * extension.c (new_xmethod_worker): Remove.
12622 (clone_xmethod_worker): Remove.
12623 (get_matching_xmethod_workers): Return void, pass std::vector by
12625 (get_xmethod_arg_types): Rename to...
12626 (xmethod_worker::get_arg_types): ... this, and adjust.
12627 (get_xmethod_result_type): Rename to...
12628 (xmethod_worker::get_result_type): ... this, and adjust.
12629 (invoke_xmethod): Remove.
12630 (free_xmethod_worker): Remove.
12631 (free_xmethod_worker_vec): Remove.
12632 * extension.h (enum ext_lang_rc): Move here from
12634 (struct xmethod_worker): Add constructor and destructor.
12637 <invoke, clone, do_get_result_type, do_get_arg_types>: New
12638 virtual pure methods.
12639 <get_arg_types, get_result_type>: New methods.
12640 (xmethod_worker_ptr): Remove typedef.
12641 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12642 (xmethod_worker_vec): Remove typedef.
12643 (xmethod_worker_up): New typedef.
12644 (invoke_xmethod): Remove.
12645 (clone_xmethod_worker): Remove.
12646 (free_xmethod_worker): Remove.
12647 (free_xmethod_worker_vec): Remove.
12648 (get_xmethod_arg_types): Remove.
12649 (get_xmethod_result_type): Remove.
12650 * valops.c (find_method_list): Use std::vector, don't use
12651 intermediate vector.
12652 (value_find_oload_method_list): Use std::vector.
12653 (find_overload_match): Use std::vector.
12654 (find_oload_champ): Use std::vector.
12655 * value.c (value_free): Use operator delete.
12656 (value_of_xmethod): Rename to...
12657 (value_from_xmethod): ... this. Don't assign
12658 xmethod_worker::value, take rvalue-reference.
12659 (result_type_of_xmethod): Adjust.
12660 (call_xmethod): Adjust.
12661 * value.h: Include extension.h.
12662 (struct xmethod_worker): Don't forward-declare.
12663 (value_of_xmethod): Rename to...
12664 (value_from_xmethod): ... this, take rvalue-reference.
12665 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12666 (struct python_xmethod_worker): ... this, add constructor and
12668 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12669 (gdbpy_free_xmethod_worker_data): Rename to...
12670 (python_xmethod_worker::~python_xmethod_worker): ... this and
12672 (gdbpy_clone_xmethod_worker_data): Rename to...
12673 (python_xmethod_worker::clone): ... this and adjust.
12674 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12676 (gdbpy_get_xmethod_arg_types): Rename to...
12677 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12678 (gdbpy_get_xmethod_result_type): Rename to...
12679 (python_xmethod_worker::do_get_result_type): ... this and
12681 (gdbpy_invoke_xmethod): Rename to...
12682 (python_xmethod_worker::invoke): ... this and adjust.
12683 (new_python_xmethod_worker): Rename to...
12684 (python_xmethod_worker::python_xmethod_worker): ... this and
12686 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12688 (gdbpy_free_xmethod_worker_data): Remove.
12689 (gdbpy_get_matching_xmethod_workers): Use std::vector.
12690 (gdbpy_get_xmethod_arg_types): Remove.
12691 (gdbpy_get_xmethod_result_type): Remove.
12692 (gdbpy_invoke_xmethod): Remove.
12693 * python/python.c (python_extension_ops): Remove obsolete
12696 2018-01-05 Pedro Alves <palves@redhat.com>
12699 * common/signals-state-save-restore.c
12700 (save_original_signals_state): New parameter 'quiet'. Warn if we
12701 find a custom handler preinstalled, instead of internal erroring.
12702 But only warn if !quiet.
12703 * common/signals-state-save-restore.h
12704 (save_original_signals_state): New parameter 'quiet'.
12705 * main.c (captured_main_1): Move save_original_signals_state call
12706 after option handling, and pass QUIET.
12708 2018-01-05 Pedro Alves <palves@redhat.com>
12710 * spu-tdep.c (spu_catch_start): Pass
12711 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12713 2018-01-05 Pedro Alves <palves@redhat.com>
12716 * ada-lang.c (literal_symbol_name_matcher): New function.
12717 (ada_get_symbol_name_matcher): Use it for
12718 symbol_name_match_type::SEARCH_NAME.
12719 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
12720 it down instead of assuming symbol_name_match_type::FULL.
12721 * block.h (block_lookup_symbol): New parameter 'match_type'.
12722 * c-valprint.c (print_unpacked_pointer): Use
12723 lookup_symbol_search_name instead of lookup_symbol.
12724 * compile/compile-object-load.c (get_out_value_type): Pass down
12725 symbol_name_match_type::SEARCH_NAME.
12726 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12727 symbol_name_match_type::FULL.
12728 * cp-support.c (cp_get_symbol_name_matcher): Handle
12729 symbol_name_match_type::SEARCH_NAME.
12730 * infrun.c (insert_exception_resume_breakpoint): Use
12731 lookup_symbol_search_name.
12732 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12733 * psymtab.c (maintenance_check_psymtabs): Use
12734 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12735 * stack.c (print_frame_args): Use lookup_symbol_search_name and
12736 SYMBOL_SEARCH_NAME.
12737 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12738 if symbol_name_match_type::SEARCH_NAME.
12739 (lookup_symbol_in_language): Pass down
12740 symbol_name_match_type::FULL.
12741 (lookup_symbol_search_name): New.
12742 (lookup_language_this): Pass down
12743 symbol_name_match_type::SEARCH_NAME.
12744 (lookup_symbol_aux, lookup_local_symbol): New parameter
12745 'match_type'. Pass it down.
12746 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12747 (lookup_symbol_search_name): New declaration.
12748 (lookup_symbol_in_block): New 'match_type' parameter.
12750 2018-01-05 Pedro Alves <palves@redhat.com>
12753 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12755 (ada_lookup_symbol): Reimplement in terms of
12756 ada_lookup_symbol_list, bits factored out from
12757 ada_lookup_encoded_symbol.
12759 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12761 * ada-exp.y (write_object_renaming): When subscripting an array
12762 using a symbol as the index, pass the block in call to
12763 ada_lookup_encoded_symbol when looking that symbol up.
12765 2018-01-05 Jerome Guitton <guitton@adacore.com>
12767 * ada-lang.c (ada_array_length): Use ada_index_type instead of
12770 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12772 * ada-lang.c (ada_to_fixed_value_create): Add handling of
12773 the case where VALUE_LVAL (val0) is not lval_memory.
12775 2018-01-05 Xavier Roirand <roirand@adacore.com>
12777 * ada-valprint.c (print_optional_low_bound): Handle
12778 character-indexed array printing like boolean-indexed array
12781 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12783 * NEWS: Create a new section for the next release branch.
12784 Rename the section of the current branch, now that it has
12787 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12789 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12790 * version.in: Bump version to 8.1.50.DATE-git.
12792 2018-01-03 Xavier Roirand <roirand@adacore.com>
12794 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12796 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12798 (default_exception_support_info) <catch_handlers_sym>: Add field.
12799 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12800 (ada_exception_name_addr_1): Add "catch handlers" handling.
12801 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12802 Update all callers.
12803 (create_excep_cond_exprs) <ex>: Add parameter.
12804 (re_set_exception): Update create_excep_cond_exprs call.
12805 (print_it_exception, print_one_exception, print_mention_exception)
12806 (print_recreate_exception): Add "catch handler" handling.
12807 (allocate_location_catch_handlers, re_set_catch_handlers)
12808 (check_status_catch_handlers, print_it_catch_handlers)
12809 (print_one_catch_handlers, print_mention_catch_handlers)
12810 (print_recreate_catch_handlers): New function.
12811 (catch_handlers_breakpoint_ops): New variable.
12812 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12813 Add parameter. Add "catch handler" handling.
12814 (ada_exception_sym_name, ada_exception_breakpoint_ops):
12815 Add "catch handler" handling.
12816 (ada_exception_catchpoint_cond_string): Add "catch handler"
12818 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12820 (catch_ada_handlers_command): New function.
12821 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12822 operations structure.
12823 (_initialize_ada_language): Add "catch handlers" command entry.
12824 * NEWS: Document "catch handlers" feature.
12826 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12828 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12829 account when creating the array type of the slice.
12830 (ada_value_slice): Likewise.
12832 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12834 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12836 (create_array_type_with_stride): Add byte_stride_prop parameter.
12837 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12838 New parameter. Update all callers in this file.
12839 (array_type_has_dynamic_stride): New function.
12840 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12841 of arrays with dynamic byte strides.
12842 * dwarf2read.c (read_array_type): Add support for dynamic
12843 DW_AT_byte_stride attributes.
12845 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12847 * dwarf2read.c (read_unspecified_type): Treat
12848 DW_TAG_enumeration_type DIEs from Ada units as stubs.
12850 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12852 Update copyright year range in all GDB files.
12854 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12856 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12857 and gdb/testsuite/gdb.base/step-line.c.
12859 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12861 * copyright.py (main): Dump the contents of
12862 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12863 even if BY_HAND is empty.
12865 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12867 * top.c (print_gdb_version): Update Copyright year in version
12870 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12872 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12874 For older changes see ChangeLog-2017.
12880 version-control: never